(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{19368:function(e,t,n){"use strict";n.d(t,{Y7:function(){return zr},BN:function(){return s()},$r:function(){return Ii},P6:function(){return ti}});var r=n(48764),o=n(14990),i=n(13550),s=n.n(i),a=n(77191),c=n.n(a),u=n(84037),l=n.n(u),d=n(15970);function f(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"===typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Expected Uint8Array");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function h(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function p(e,t){f(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}function m(e){return e instanceof Uint8Array||null!=e&&"object"===typeof e&&"Uint8Array"===e.constructor.name}const g=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),y=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function b(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!m(e))throw new Error("expected Uint8Array, got "+typeof e);return e}function v(e){const t=t=>e().update(b(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const w=(e,t,n)=>e&t^e&n^t&n,x=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),E=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_=new Uint32Array(64);class k extends class extends class{clone(){return this._cloneInto()}}{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=g(this.buffer)}update(e){h(this);const{view:t,buffer:n,blockLen:r}=this,o=(e=b(e)).length;for(let i=0;i<o;){const s=Math.min(r-this.pos,o-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=g(e);for(;r<=o-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){h(this),p(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;t[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let l=i;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const s=g(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)s.setUint32(4*l,u[l],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}}{constructor(){super(64,32,8,!1),this.A=0|E[0],this.B=0|E[1],this.C=0|E[2],this.D=0|E[3],this.E=0|E[4],this.F=0|E[5],this.G=0|E[6],this.H=0|E[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a}=this;return[e,t,n,r,o,i,s,a]}set(e,t,n,r,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let d=0;d<16;d++,t+=4)_[d]=e.getUint32(t,!1);for(let d=16;d<64;d++){const e=_[d-15],t=_[d-2],n=y(e,7)^y(e,18)^e>>>3,r=y(t,17)^y(t,19)^t>>>10;_[d]=r+_[d-7]+n+_[d-16]|0}let{A:n,B:r,C:o,D:i,E:s,F:a,G:c,H:u}=this;for(let d=0;d<64;d++){const e=u+(y(s,6)^y(s,11)^y(s,25))+((l=s)&a^~l&c)+x[d]+_[d]|0,t=(y(n,2)^y(n,13)^y(n,22))+w(n,r,o)|0;u=c,c=a,a=s,s=i+e|0,i=o,o=r,r=n,n=e+t|0}var l;n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,o,i,s,a,c,u)}roundClean(){_.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const S=v((()=>new k));function I(e){let t=e.length;for(;--t>=0;)e[t]=0}const C=256,T=286,A=30,P=15,O=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),j=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),B=new Array(576);I(B);const N=new Array(60);I(N);const L=new Array(512);I(L);const U=new Array(256);I(U);const D=new Array(29);I(D);const F=new Array(A);function z(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}let $,q,Z;function H(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}I(F);const W=e=>e<256?L[e]:L[256+(e>>>7)],G=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},K=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,G(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},V=(e,t,n)=>{K(e,n[2*t],n[2*t+1])},X=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},Y=(e,t,n)=>{const r=new Array(16);let o,i,s=0;for(o=1;o<=P;o++)s=s+n[o-1]<<1,r[o]=s;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=X(r[t]++,t))}},J=e=>{let t;for(t=0;t<T;t++)e.dyn_ltree[2*t]=0;for(t=0;t<A;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Q=e=>{e.bi_valid>8?G(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},ee=(e,t,n,r)=>{const o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]},te=(e,t,n)=>{const r=e.heap[n];let o=n<<1;for(;o<=e.heap_len&&(o<e.heap_len&&ee(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!ee(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r},ne=(e,t,n)=>{let r,o,i,s,a=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+a++],r+=(255&e.pending_buf[e.sym_buf+a++])<<8,o=e.pending_buf[e.sym_buf+a++],0===r?V(e,o,t):(i=U[o],V(e,i+C+1,t),s=O[i],0!==s&&(o-=D[i],K(e,o,s)),r--,i=W(r),V(e,i,n),s=j[i],0!==s&&(r-=F[i],K(e,r,s)))}while(a<e.sym_next);V(e,256,t)},re=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems;let s,a,c,u=-1;for(e.heap_len=0,e.heap_max=573,s=0;s<i;s++)0!==n[2*s]?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):n[2*s+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=u<2?++u:0,n[2*c]=1,e.depth[c]=0,e.opt_len--,o&&(e.static_len-=r[2*c+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)te(e,n,s);c=i;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],te(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[2*c]=n[2*s]+n[2*a],e.depth[c]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[2*s+1]=n[2*a+1]=c,e.heap[1]=c++,te(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,l,d,f,h,p,m=0;for(f=0;f<=P;f++)e.bl_count[f]=0;for(n[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)l=e.heap[u],f=n[2*n[2*l+1]+1]+1,f>c&&(f=c,m++),n[2*l+1]=f,l>r||(e.bl_count[f]++,h=0,l>=a&&(h=s[l-a]),p=n[2*l],e.opt_len+=p*(f+h),i&&(e.static_len+=p*(o[2*l+1]+h)));if(0!==m){do{for(f=c-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(f=c;0!==f;f--)for(l=e.bl_count[f];0!==l;)d=e.heap[--u],d>r||(n[2*d+1]!==f&&(e.opt_len+=(f-n[2*d+1])*n[2*d],n[2*d+1]=f),l--)}})(e,t),Y(n,u,e.bl_count)},oe=(e,t,n)=>{let r,o,i=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=s,s=t[2*(r+1)+1],++a<c&&o===s||(a<u?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,i=o,0===s?(c=138,u=3):o===s?(c=6,u=3):(c=7,u=4))},ie=(e,t,n)=>{let r,o,i=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),r=0;r<=n;r++)if(o=s,s=t[2*(r+1)+1],!(++a<c&&o===s)){if(a<u)do{V(e,o,e.bl_tree)}while(0!==--a);else 0!==o?(o!==i&&(V(e,o,e.bl_tree),a--),V(e,16,e.bl_tree),K(e,a-3,2)):a<=10?(V(e,17,e.bl_tree),K(e,a-3,3)):(V(e,18,e.bl_tree),K(e,a-11,7));a=0,i=o,0===s?(c=138,u=3):o===s?(c=6,u=3):(c=7,u=4)}};let se=!1;const ae=(e,t,n,r)=>{K(e,0+(r?1:0),3),Q(e),G(e,n),G(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var ce=e=>{se||((()=>{let e,t,n,r,o;const i=new Array(16);for(n=0,r=0;r<28;r++)for(D[r]=n,e=0;e<1<<O[r];e++)U[n++]=r;for(U[n-1]=r,o=0,r=0;r<16;r++)for(F[r]=o,e=0;e<1<<j[r];e++)L[o++]=r;for(o>>=7;r<A;r++)for(F[r]=o<<7,e=0;e<1<<j[r]-7;e++)L[256+o++]=r;for(t=0;t<=P;t++)i[t]=0;for(e=0;e<=143;)B[2*e+1]=8,e++,i[8]++;for(;e<=255;)B[2*e+1]=9,e++,i[9]++;for(;e<=279;)B[2*e+1]=7,e++,i[7]++;for(;e<=287;)B[2*e+1]=8,e++,i[8]++;for(Y(B,287,i),e=0;e<A;e++)N[2*e+1]=5,N[2*e]=X(e,5);$=new z(B,O,257,T,P),q=new z(N,j,0,A,P),Z=new z(new Array(0),M,0,19,7)})(),se=!0),e.l_desc=new H(e.dyn_ltree,$),e.d_desc=new H(e.dyn_dtree,q),e.bl_desc=new H(e.bl_tree,Z),e.bi_buf=0,e.bi_valid=0,J(e)},ue=(e,t,n,r)=>{let o,i,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<C;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),re(e,e.l_desc),re(e,e.d_desc),s=(e=>{let t;for(oe(e,e.dyn_ltree,e.l_desc.max_code),oe(e,e.dyn_dtree,e.d_desc.max_code),re(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*R[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=n+5,n+4<=o&&-1!==t?ae(e,t,n,r):4===e.strategy||i===o?(K(e,2+(r?1:0),3),ne(e,B,N)):(K(e,4+(r?1:0),3),((e,t,n,r)=>{let o;for(K(e,t-257,5),K(e,n-1,5),K(e,r-4,4),o=0;o<r;o++)K(e,e.bl_tree[2*R[o]+1],3);ie(e,e.dyn_ltree,t-1),ie(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),ne(e,e.dyn_ltree,e.dyn_dtree)),J(e),r&&Q(e)},le=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(U[n]+C+1)]++,e.dyn_dtree[2*W(t)]++),e.sym_next===e.sym_end),de={_tr_init:ce,_tr_stored_block:ae,_tr_flush_block:ue,_tr_tally:le,_tr_align:e=>{K(e,2,3),V(e,256,B),(e=>{16===e.bi_valid?(G(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var fe=(e,t,n,r)=>{let o=65535&e|0,i=e>>>16&65535|0,s=0;for(;0!==n;){s=n>2e3?2e3:n,n-=s;do{o=o+t[r++]|0,i=i+o|0}while(--s);o%=65521,i%=65521}return o|i<<16|0};const he=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var pe=(e,t,n,r)=>{const o=he,i=r+n;e^=-1;for(let s=r;s<i;s++)e=e>>>8^o[255&(e^t[s])];return-1^e},me={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ge={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:ye,_tr_stored_block:be,_tr_flush_block:ve,_tr_tally:we,_tr_align:xe}=de,{Z_NO_FLUSH:Ee,Z_PARTIAL_FLUSH:_e,Z_FULL_FLUSH:ke,Z_FINISH:Se,Z_BLOCK:Ie,Z_OK:Ce,Z_STREAM_END:Te,Z_STREAM_ERROR:Ae,Z_DATA_ERROR:Pe,Z_BUF_ERROR:Oe,Z_DEFAULT_COMPRESSION:je,Z_FILTERED:Me,Z_HUFFMAN_ONLY:Re,Z_RLE:Be,Z_FIXED:Ne,Z_DEFAULT_STRATEGY:Le,Z_UNKNOWN:Ue,Z_DEFLATED:De}=ge,Fe=258,ze=262,$e=42,qe=113,Ze=666,He=(e,t)=>(e.msg=me[t],t),We=e=>2*e-(e>4?9:0),Ge=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ke=e=>{let t,n,r,o=e.w_size;t=e.hash_size,r=t;do{n=e.head[--r],e.head[r]=n>=o?n-o:0}while(--t);t=o,r=t;do{n=e.prev[--r],e.prev[r]=n>=o?n-o:0}while(--t)};let Ve=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Xe=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ye=(e,t)=>{ve(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Xe(e.strm)},Je=(e,t)=>{e.pending_buf[e.pending++]=t},Qe=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},et=(e,t,n,r)=>{let o=e.avail_in;return o>r&&(o=r),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),n),1===e.state.wrap?e.adler=fe(e.adler,t,o,n):2===e.state.wrap&&(e.adler=pe(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)},tt=(e,t)=>{let n,r,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match;const c=e.strstart>e.w_size-ze?e.strstart-(e.w_size-ze):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+Fe;let h=u[i+s-1],p=u[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(n=t,u[n+s]===p&&u[n+s-1]===h&&u[n]===u[i]&&u[++n]===u[i+1]){i+=2,n++;do{}while(u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&i<f);if(r=Fe-(f-i),i=f-Fe,r>s){if(e.match_start=t,s=r,r>=a)break;h=u[i+s-1],p=u[i+s]}}}while((t=d[t&l])>c&&0!==--o);return s<=e.lookahead?s:e.lookahead},nt=e=>{const t=e.w_size;let n,r,o;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ze)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ke(e),r+=t),0===e.strm.avail_in)break;if(n=et(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=Ve(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=Ve(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<ze&&0!==e.strm.avail_in)},rt=(e,t)=>{let n,r,o,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,a=e.strm.avail_in;do{if(n=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o)break;if(o=e.strm.avail_out-o,r=e.strstart-e.block_start,n>r+e.strm.avail_in&&(n=r+e.strm.avail_in),n>o&&(n=o),n<i&&(0===n&&t!==Se||t===Ee||n!==r+e.strm.avail_in))break;s=t===Se&&n===r+e.strm.avail_in?1:0,be(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Xe(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(et(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===s);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==Ee&&t!==Se&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(et(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,i=o>e.w_size?e.w_size:o,r=e.strstart-e.block_start,(r>=i||(r||t===Se)&&t!==Ee&&0===e.strm.avail_in&&r<=o)&&(n=r>o?o:r,s=t===Se&&0===e.strm.avail_in&&n===r?1:0,be(e,e.block_start,n,s),e.block_start+=n,Xe(e.strm)),s?3:1)},ot=(e,t)=>{let n,r;for(;;){if(e.lookahead<ze){if(nt(e),e.lookahead<ze&&t===Ee)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=Ve(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-ze&&(e.match_length=tt(e,n)),e.match_length>=3)if(r=we(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Ve(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Ve(e,e.ins_h,e.window[e.strstart+1]);else r=we(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ye(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Se?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2},it=(e,t)=>{let n,r,o;for(;;){if(e.lookahead<ze){if(nt(e),e.lookahead<ze&&t===Ee)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=Ve(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ze&&(e.match_length=tt(e,n),e.match_length<=5&&(e.strategy===Me||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=we(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=Ve(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ye(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=we(e,0,e.window[e.strstart-1]),r&&Ye(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=we(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Se?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2};function st(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}const at=[new st(0,0,0,0,rt),new st(4,4,8,4,ot),new st(4,5,16,8,ot),new st(4,6,32,32,ot),new st(4,4,16,16,it),new st(8,16,32,32,it),new st(8,16,128,128,it),new st(8,32,128,256,it),new st(32,128,258,1024,it),new st(32,258,258,4096,it)];function ct(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=De,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ge(this.dyn_ltree),Ge(this.dyn_dtree),Ge(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ge(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ge(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const ut=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==$e&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==qe&&t.status!==Ze?1:0},lt=e=>{if(ut(e))return He(e,Ae);e.total_in=e.total_out=0,e.data_type=Ue;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?$e:qe,e.adler=2===t.wrap?0:1,t.last_flush=-2,ye(t),Ce},dt=e=>{const t=lt(e);var n;return t===Ce&&((n=e.state).window_size=2*n.w_size,Ge(n.head),n.max_lazy_match=at[n.level].max_lazy,n.good_match=at[n.level].good_length,n.nice_match=at[n.level].nice_length,n.max_chain_length=at[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ft=(e,t,n,r,o,i)=>{if(!e)return Ae;let s=1;if(t===je&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||n!==De||r<8||r>15||t<0||t>9||i<0||i>Ne||8===r&&1!==s)return He(e,Ae);8===r&&(r=9);const a=new ct;return e.state=a,a.strm=e,a.status=$e,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=o+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<o+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=i,a.method=n,dt(e)};var ht={deflateInit:(e,t)=>ft(e,t,De,15,8,Le),deflateInit2:ft,deflateReset:dt,deflateResetKeep:lt,deflateSetHeader:(e,t)=>ut(e)||2!==e.state.wrap?Ae:(e.state.gzhead=t,Ce),deflate:(e,t)=>{if(ut(e)||t>Ie||t<0)return e?He(e,Ae):Ae;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===Ze&&t!==Se)return He(e,0===e.avail_out?Oe:Ae);const r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Xe(e),0===e.avail_out)return n.last_flush=-1,Ce}else if(0===e.avail_in&&We(t)<=We(r)&&t!==Se)return He(e,Oe);if(n.status===Ze&&0!==e.avail_in)return He(e,Oe);if(n.status===$e&&0===n.wrap&&(n.status=qe),n.status===$e){let t=De+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=Re||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=r<<6,0!==n.strstart&&(t|=32),t+=31-t%31,Qe(n,t),0!==n.strstart&&(Qe(n,e.adler>>>16),Qe(n,65535&e.adler)),e.adler=1,n.status=qe,Xe(e),0!==n.pending)return n.last_flush=-1,Ce}if(57===n.status)if(e.adler=0,Je(n,31),Je(n,139),Je(n,8),n.gzhead)Je(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Je(n,255&n.gzhead.time),Je(n,n.gzhead.time>>8&255),Je(n,n.gzhead.time>>16&255),Je(n,n.gzhead.time>>24&255),Je(n,9===n.level?2:n.strategy>=Re||n.level<2?4:0),Je(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Je(n,255&n.gzhead.extra.length),Je(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=pe(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(Je(n,0),Je(n,0),Je(n,0),Je(n,0),Je(n,0),Je(n,9===n.level?2:n.strategy>=Re||n.level<2?4:0),Je(n,3),n.status=qe,Xe(e),0!==n.pending)return n.last_flush=-1,Ce;if(69===n.status){if(n.gzhead.extra){let t=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let o=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=pe(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=o,Xe(e),0!==n.pending)return n.last_flush=-1,Ce;t=0,r-=o}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=pe(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=pe(e.adler,n.pending_buf,n.pending-r,r)),Xe(e),0!==n.pending)return n.last_flush=-1,Ce;r=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Je(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=pe(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=pe(e.adler,n.pending_buf,n.pending-r,r)),Xe(e),0!==n.pending)return n.last_flush=-1,Ce;r=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Je(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=pe(e.adler,n.pending_buf,n.pending-r,r))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Xe(e),0!==n.pending))return n.last_flush=-1,Ce;Je(n,255&e.adler),Je(n,e.adler>>8&255),e.adler=0}if(n.status=qe,Xe(e),0!==n.pending)return n.last_flush=-1,Ce}if(0!==e.avail_in||0!==n.lookahead||t!==Ee&&n.status!==Ze){let r=0===n.level?rt(n,t):n.strategy===Re?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(nt(e),0===e.lookahead)){if(t===Ee)return 1;break}if(e.match_length=0,n=we(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ye(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Se?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===Be?((e,t)=>{let n,r,o,i;const s=e.window;for(;;){if(e.lookahead<=Fe){if(nt(e),e.lookahead<=Fe&&t===Ee)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,r=s[o],r===s[++o]&&r===s[++o]&&r===s[++o])){i=e.strstart+Fe;do{}while(r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&o<i);e.match_length=Fe-(i-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=we(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=we(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ye(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Se?(Ye(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ye(e,!1),0===e.strm.avail_out)?1:2})(n,t):at[n.level].func(n,t);if(3!==r&&4!==r||(n.status=Ze),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),Ce;if(2===r&&(t===_e?xe(n):t!==Ie&&(be(n,0,0,!1),t===ke&&(Ge(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Xe(e),0===e.avail_out))return n.last_flush=-1,Ce}return t!==Se?Ce:n.wrap<=0?Te:(2===n.wrap?(Je(n,255&e.adler),Je(n,e.adler>>8&255),Je(n,e.adler>>16&255),Je(n,e.adler>>24&255),Je(n,255&e.total_in),Je(n,e.total_in>>8&255),Je(n,e.total_in>>16&255),Je(n,e.total_in>>24&255)):(Qe(n,e.adler>>>16),Qe(n,65535&e.adler)),Xe(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?Ce:Te)},deflateEnd:e=>{if(ut(e))return Ae;const t=e.state.status;return e.state=null,t===qe?He(e,Pe):Ce},deflateSetDictionary:(e,t)=>{let n=t.length;if(ut(e))return Ae;const r=e.state,o=r.wrap;if(2===o||1===o&&r.status!==$e||r.lookahead)return Ae;if(1===o&&(e.adler=fe(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===o&&(Ge(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const i=e.avail_in,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,nt(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=Ve(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,nt(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=a,e.avail_in=i,r.wrap=o,Ce},deflateInfo:"pako deflate (from Nodeca project)"};const pt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var mt=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(const t in n)pt(n,t)&&(e[t]=n[t])}}return e},gt=e=>{let t=0;for(let r=0,o=e.length;r<o;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,o=0,i=e.length;r<i;r++){let t=e[r];n.set(t,o),o+=t.length}return n};let yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Ci){yt=!1}const bt=new Uint8Array(256);for(let Ti=0;Ti<256;Ti++)bt[Ti]=Ti>=252?6:Ti>=248?5:Ti>=240?4:Ti>=224?3:Ti>=192?2:1;bt[254]=bt[254]=1;var vt=e=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,o,i,s=e.length,a=0;for(o=0;o<s;o++)n=e.charCodeAt(o),55296===(64512&n)&&o+1<s&&(r=e.charCodeAt(o+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),i=0,o=0;i<a;o++)n=e.charCodeAt(o),55296===(64512&n)&&o+1<s&&(r=e.charCodeAt(o+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},wt=(e,t)=>{const n=t||e.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,o;const i=new Array(2*n);for(o=0,r=0;r<n;){let t=e[r++];if(t<128){i[o++]=t;continue}let s=bt[t];if(s>4)i[o++]=65533,r+=s-1;else{for(t&=2===s?31:3===s?15:7;s>1&&r<n;)t=t<<6|63&e[r++],s--;s>1?i[o++]=65533:t<65536?i[o++]=t:(t-=65536,i[o++]=55296|t>>10&1023,i[o++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&yt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(i,o)},xt=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+bt[e[n]]>t?n:t};var Et=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const _t=Object.prototype.toString,{Z_NO_FLUSH:kt,Z_SYNC_FLUSH:St,Z_FULL_FLUSH:It,Z_FINISH:Ct,Z_OK:Tt,Z_STREAM_END:At,Z_DEFAULT_COMPRESSION:Pt,Z_DEFAULT_STRATEGY:Ot,Z_DEFLATED:jt}=ge;function Mt(e){this.options=mt({level:Pt,method:jt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ot},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Et,this.strm.avail_out=0;let n=ht.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Tt)throw new Error(me[n]);if(t.header&&ht.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"===typeof t.dictionary?vt(t.dictionary):"[object ArrayBuffer]"===_t.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=ht.deflateSetDictionary(this.strm,e),n!==Tt)throw new Error(me[n]);this._dict_set=!0}}function Rt(e,t){const n=new Mt(t);if(n.push(e,!0),n.err)throw n.msg||me[n.err];return n.result}Mt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Ct:kt,"string"===typeof e?n.input=vt(e):"[object ArrayBuffer]"===_t.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(i===St||i===It)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(o=ht.deflate(n,i),o===At)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),o=ht.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Tt;if(0!==n.avail_out){if(i>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},Mt.prototype.onData=function(e){this.chunks.push(e)},Mt.prototype.onEnd=function(e){e===Tt&&(this.result=gt(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Bt={Deflate:Mt,deflate:Rt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,Rt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,Rt(e,t)},constants:ge};const Nt=16209;var Lt=function(e,t){let n,r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,b,v,w,x,E,_,k,S;const I=e.state;n=e.next_in,k=e.input,r=n+(e.avail_in-5),o=e.next_out,S=e.output,i=o-(t-e.avail_out),s=o+(e.avail_out-257),a=I.dmax,c=I.wsize,u=I.whave,l=I.wnext,d=I.window,f=I.hold,h=I.bits,p=I.lencode,m=I.distcode,g=(1<<I.lenbits)-1,y=(1<<I.distbits)-1;e:do{h<15&&(f+=k[n++]<<h,h+=8,f+=k[n++]<<h,h+=8),b=p[f&g];t:for(;;){if(v=b>>>24,f>>>=v,h-=v,v=b>>>16&255,0===v)S[o++]=65535&b;else{if(!(16&v)){if(0===(64&v)){b=p[(65535&b)+(f&(1<<v)-1)];continue t}if(32&v){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=Nt;break e}w=65535&b,v&=15,v&&(h<v&&(f+=k[n++]<<h,h+=8),w+=f&(1<<v)-1,f>>>=v,h-=v),h<15&&(f+=k[n++]<<h,h+=8,f+=k[n++]<<h,h+=8),b=m[f&y];n:for(;;){if(v=b>>>24,f>>>=v,h-=v,v=b>>>16&255,!(16&v)){if(0===(64&v)){b=m[(65535&b)+(f&(1<<v)-1)];continue n}e.msg="invalid distance code",I.mode=Nt;break e}if(x=65535&b,v&=15,h<v&&(f+=k[n++]<<h,h+=8,h<v&&(f+=k[n++]<<h,h+=8)),x+=f&(1<<v)-1,x>a){e.msg="invalid distance too far back",I.mode=Nt;break e}if(f>>>=v,h-=v,v=o-i,x>v){if(v=x-v,v>u&&I.sane){e.msg="invalid distance too far back",I.mode=Nt;break e}if(E=0,_=d,0===l){if(E+=c-v,v<w){w-=v;do{S[o++]=d[E++]}while(--v);E=o-x,_=S}}else if(l<v){if(E+=c+l-v,v-=l,v<w){w-=v;do{S[o++]=d[E++]}while(--v);if(E=0,l<w){v=l,w-=v;do{S[o++]=d[E++]}while(--v);E=o-x,_=S}}}else if(E+=l-v,v<w){w-=v;do{S[o++]=d[E++]}while(--v);E=o-x,_=S}for(;w>2;)S[o++]=_[E++],S[o++]=_[E++],S[o++]=_[E++],w-=3;w&&(S[o++]=_[E++],w>1&&(S[o++]=_[E++]))}else{E=o-x;do{S[o++]=S[E++],S[o++]=S[E++],S[o++]=S[E++],w-=3}while(w>2);w&&(S[o++]=S[E++],w>1&&(S[o++]=S[E++]))}break}}break}}while(n<r&&o<s);w=h>>3,n-=w,h-=w<<3,f&=(1<<h)-1,e.next_in=n,e.next_out=o,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=o<s?s-o+257:257-(o-s),I.hold=f,I.bits=h};const Ut=15,Dt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Ft=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),zt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),$t=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var qt=(e,t,n,r,o,i,s,a)=>{const c=a.bits;let u,l,d,f,h,p,m=0,g=0,y=0,b=0,v=0,w=0,x=0,E=0,_=0,k=0,S=null;const I=new Uint16Array(16),C=new Uint16Array(16);let T,A,P,O=null;for(m=0;m<=Ut;m++)I[m]=0;for(g=0;g<r;g++)I[t[n+g]]++;for(v=c,b=Ut;b>=1&&0===I[b];b--);if(v>b&&(v=b),0===b)return o[i++]=20971520,o[i++]=20971520,a.bits=1,0;for(y=1;y<b&&0===I[y];y++);for(v<y&&(v=y),E=1,m=1;m<=Ut;m++)if(E<<=1,E-=I[m],E<0)return-1;if(E>0&&(0===e||1!==b))return-1;for(C[1]=0,m=1;m<Ut;m++)C[m+1]=C[m]+I[m];for(g=0;g<r;g++)0!==t[n+g]&&(s[C[t[n+g]]++]=g);if(0===e?(S=O=s,p=20):1===e?(S=Dt,O=Ft,p=257):(S=zt,O=$t,p=0),k=0,g=0,m=y,h=i,w=v,x=0,d=-1,_=1<<v,f=_-1,1===e&&_>852||2===e&&_>592)return 1;for(;;){T=m-x,s[g]+1<p?(A=0,P=s[g]):s[g]>=p?(A=O[s[g]-p],P=S[s[g]-p]):(A=96,P=0),u=1<<m-x,l=1<<w,y=l;do{l-=u,o[h+(k>>x)+l]=T<<24|A<<16|P|0}while(0!==l);for(u=1<<m-1;k&u;)u>>=1;if(0!==u?(k&=u-1,k+=u):k=0,g++,0===--I[m]){if(m===b)break;m=t[n+s[g]]}if(m>v&&(k&f)!==d){for(0===x&&(x=v),h+=y,w=m-x,E=1<<w;w+x<b&&(E-=I[w+x],!(E<=0));)w++,E<<=1;if(_+=1<<w,1===e&&_>852||2===e&&_>592)return 1;d=k&f,o[d]=v<<24|w<<16|h-i|0}}return 0!==k&&(o[h+k]=m-x<<24|64<<16|0),a.bits=v,0};const{Z_FINISH:Zt,Z_BLOCK:Ht,Z_TREES:Wt,Z_OK:Gt,Z_STREAM_END:Kt,Z_NEED_DICT:Vt,Z_STREAM_ERROR:Xt,Z_DATA_ERROR:Yt,Z_MEM_ERROR:Jt,Z_BUF_ERROR:Qt,Z_DEFLATED:en}=ge,tn=16180,nn=16190,rn=16191,on=16192,sn=16194,an=16199,cn=16200,un=16206,ln=16209,dn=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function fn(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const hn=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<tn||t.mode>16211?1:0},pn=e=>{if(hn(e))return Xt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=tn,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Gt},mn=e=>{if(hn(e))return Xt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,pn(e)},gn=(e,t)=>{let n;if(hn(e))return Xt;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Xt:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,mn(e))},yn=(e,t)=>{if(!e)return Xt;const n=new fn;e.state=n,n.strm=e,n.window=null,n.mode=tn;const r=gn(e,t);return r!==Gt&&(e.state=null),r};let bn,vn,wn=!0;const xn=e=>{if(wn){bn=new Int32Array(512),vn=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(qt(1,e.lens,0,288,bn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;qt(2,e.lens,0,32,vn,0,e.work,{bits:5}),wn=!1}e.lencode=bn,e.lenbits=9,e.distcode=vn,e.distbits=5},En=(e,t,n,r)=>{let o;const i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(t.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),i.window.set(t.subarray(n-r,n-r+o),i.wnext),(r-=o)?(i.window.set(t.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0};var _n=(e,t)=>{let n,r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,b,v,w,x,E,_,k=0;const S=new Uint8Array(4);let I,C;const T=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(hn(e)||!e.output||!e.input&&0!==e.avail_in)return Xt;n=e.state,n.mode===rn&&(n.mode=on),s=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,r=e.input,a=e.avail_in,u=n.hold,l=n.bits,d=a,f=c,_=Gt;e:for(;;)switch(n.mode){case tn:if(0===n.wrap){n.mode=on;break}for(;l<16;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(2&n.wrap&&35615===u){0===n.wbits&&(n.wbits=15),n.check=0,S[0]=255&u,S[1]=u>>>8&255,n.check=pe(n.check,S,2,0),u=0,l=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=ln;break}if((15&u)!==en){e.msg="unknown compression method",n.mode=ln;break}if(u>>>=4,l-=4,E=8+(15&u),0===n.wbits&&(n.wbits=E),E>15||E>n.wbits){e.msg="invalid window size",n.mode=ln;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&u?16189:rn,u=0,l=0;break;case 16181:for(;l<16;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(n.flags=u,(255&n.flags)!==en){e.msg="unknown compression method",n.mode=ln;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ln;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&4&n.wrap&&(S[0]=255&u,S[1]=u>>>8&255,n.check=pe(n.check,S,2,0)),u=0,l=0,n.mode=16182;case 16182:for(;l<32;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}n.head&&(n.head.time=u),512&n.flags&&4&n.wrap&&(S[0]=255&u,S[1]=u>>>8&255,S[2]=u>>>16&255,S[3]=u>>>24&255,n.check=pe(n.check,S,4,0)),u=0,l=0,n.mode=16183;case 16183:for(;l<16;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&4&n.wrap&&(S[0]=255&u,S[1]=u>>>8&255,n.check=pe(n.check,S,2,0)),u=0,l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;l<16;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&4&n.wrap&&(S[0]=255&u,S[1]=u>>>8&255,n.check=pe(n.check,S,2,0)),u=0,l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(h=n.length,h>a&&(h=a),h&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(i,i+h),E)),512&n.flags&&4&n.wrap&&(n.check=pe(n.check,r,h,i)),a-=h,i+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===a)break e;h=0;do{E=r[i+h++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E))}while(E&&h<a);if(512&n.flags&&4&n.wrap&&(n.check=pe(n.check,r,h,i)),a-=h,i+=h,E)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===a)break e;h=0;do{E=r[i+h++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E))}while(E&&h<a);if(512&n.flags&&4&n.wrap&&(n.check=pe(n.check,r,h,i)),a-=h,i+=h,E)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;l<16;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(4&n.wrap&&u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ln;break}u=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=rn;break;case 16189:for(;l<32;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}e.adler=n.check=dn(u),u=0,l=0,n.mode=nn;case nn:if(0===n.havedict)return e.next_out=s,e.avail_out=c,e.next_in=i,e.avail_in=a,n.hold=u,n.bits=l,Vt;e.adler=n.check=1,n.mode=rn;case rn:if(t===Ht||t===Wt)break e;case on:if(n.last){u>>>=7&l,l-=7&l,n.mode=un;break}for(;l<3;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}switch(n.last=1&u,u>>>=1,l-=1,3&u){case 0:n.mode=16193;break;case 1:if(xn(n),n.mode=an,t===Wt){u>>>=2,l-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ln}u>>>=2,l-=2;break;case 16193:for(u>>>=7&l,l-=7&l;l<32;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if((65535&u)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ln;break}if(n.length=65535&u,u=0,l=0,n.mode=sn,t===Wt)break e;case sn:n.mode=16195;case 16195:if(h=n.length,h){if(h>a&&(h=a),h>c&&(h=c),0===h)break e;o.set(r.subarray(i,i+h),s),a-=h,i+=h,c-=h,s+=h,n.length-=h;break}n.mode=rn;break;case 16196:for(;l<14;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(n.nlen=257+(31&u),u>>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ln;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;l<3;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}n.lens[T[n.have++]]=7&u,u>>>=3,l-=3}for(;n.have<19;)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,I={bits:n.lenbits},_=qt(0,n.lens,0,19,n.lencode,0,n.work,I),n.lenbits=I.bits,_){e.msg="invalid code lengths set",n.mode=ln;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;k=n.lencode[u&(1<<n.lenbits)-1],g=k>>>24,y=k>>>16&255,b=65535&k,!(g<=l);){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(b<16)u>>>=g,l-=g,n.lens[n.have++]=b;else{if(16===b){for(C=g+2;l<C;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(u>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=ln;break}E=n.lens[n.have-1],h=3+(3&u),u>>>=2,l-=2}else if(17===b){for(C=g+3;l<C;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}u>>>=g,l-=g,E=0,h=3+(7&u),u>>>=3,l-=3}else{for(C=g+7;l<C;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}u>>>=g,l-=g,E=0,h=11+(127&u),u>>>=7,l-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ln;break}for(;h--;)n.lens[n.have++]=E}}if(n.mode===ln)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ln;break}if(n.lenbits=9,I={bits:n.lenbits},_=qt(1,n.lens,0,n.nlen,n.lencode,0,n.work,I),n.lenbits=I.bits,_){e.msg="invalid literal/lengths set",n.mode=ln;break}if(n.distbits=6,n.distcode=n.distdyn,I={bits:n.distbits},_=qt(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,I),n.distbits=I.bits,_){e.msg="invalid distances set",n.mode=ln;break}if(n.mode=an,t===Wt)break e;case an:n.mode=cn;case cn:if(a>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=i,e.avail_in=a,n.hold=u,n.bits=l,Lt(e,f),s=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,r=e.input,a=e.avail_in,u=n.hold,l=n.bits,n.mode===rn&&(n.back=-1);break}for(n.back=0;k=n.lencode[u&(1<<n.lenbits)-1],g=k>>>24,y=k>>>16&255,b=65535&k,!(g<=l);){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(y&&0===(240&y)){for(v=g,w=y,x=b;k=n.lencode[x+((u&(1<<v+w)-1)>>v)],g=k>>>24,y=k>>>16&255,b=65535&k,!(v+g<=l);){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}u>>>=v,l-=v,n.back+=v}if(u>>>=g,l-=g,n.back+=g,n.length=b,0===y){n.mode=16205;break}if(32&y){n.back=-1,n.mode=rn;break}if(64&y){e.msg="invalid literal/length code",n.mode=ln;break}n.extra=15&y,n.mode=16201;case 16201:if(n.extra){for(C=n.extra;l<C;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;k=n.distcode[u&(1<<n.distbits)-1],g=k>>>24,y=k>>>16&255,b=65535&k,!(g<=l);){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(0===(240&y)){for(v=g,w=y,x=b;k=n.distcode[x+((u&(1<<v+w)-1)>>v)],g=k>>>24,y=k>>>16&255,b=65535&k,!(v+g<=l);){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}u>>>=v,l-=v,n.back+=v}if(u>>>=g,l-=g,n.back+=g,64&y){e.msg="invalid distance code",n.mode=ln;break}n.offset=b,n.extra=15&y,n.mode=16203;case 16203:if(n.extra){for(C=n.extra;l<C;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ln;break}n.mode=16204;case 16204:if(0===c)break e;if(h=f-c,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ln;break}h>n.wnext?(h-=n.wnext,p=n.wsize-h):p=n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=o,p=s-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do{o[s++]=m[p++]}while(--h);0===n.length&&(n.mode=cn);break;case 16205:if(0===c)break e;o[s++]=n.length,c--,n.mode=cn;break;case un:if(n.wrap){for(;l<32;){if(0===a)break e;a--,u|=r[i++]<<l,l+=8}if(f-=c,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=n.flags?pe(n.check,o,f,s-f):fe(n.check,o,f,s-f)),f=c,4&n.wrap&&(n.flags?u:dn(u))!==n.check){e.msg="incorrect data check",n.mode=ln;break}u=0,l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;l<32;){if(0===a)break e;a--,u+=r[i++]<<l,l+=8}if(4&n.wrap&&u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ln;break}u=0,l=0}n.mode=16208;case 16208:_=Kt;break e;case ln:_=Yt;break e;case 16210:return Jt;default:return Xt}return e.next_out=s,e.avail_out=c,e.next_in=i,e.avail_in=a,n.hold=u,n.bits=l,(n.wsize||f!==e.avail_out&&n.mode<ln&&(n.mode<un||t!==Zt))&&En(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=n.flags?pe(n.check,o,f,e.next_out-f):fe(n.check,o,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===rn?128:0)+(n.mode===an||n.mode===sn?256:0),(0===d&&0===f||t===Zt)&&_===Gt&&(_=Qt),_},kn={inflateReset:mn,inflateReset2:gn,inflateResetKeep:pn,inflateInit:e=>yn(e,15),inflateInit2:yn,inflate:_n,inflateEnd:e=>{if(hn(e))return Xt;let t=e.state;return t.window&&(t.window=null),e.state=null,Gt},inflateGetHeader:(e,t)=>{if(hn(e))return Xt;const n=e.state;return 0===(2&n.wrap)?Xt:(n.head=t,t.done=!1,Gt)},inflateSetDictionary:(e,t)=>{const n=t.length;let r,o,i;return hn(e)?Xt:(r=e.state,0!==r.wrap&&r.mode!==nn?Xt:r.mode===nn&&(o=1,o=fe(o,t,n,0),o!==r.check)?Yt:(i=En(e,t,n,n),i?(r.mode=16210,Jt):(r.havedict=1,Gt)))},inflateInfo:"pako inflate (from Nodeca project)"};var Sn=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const In=Object.prototype.toString,{Z_NO_FLUSH:Cn,Z_FINISH:Tn,Z_OK:An,Z_STREAM_END:Pn,Z_NEED_DICT:On,Z_STREAM_ERROR:jn,Z_DATA_ERROR:Mn,Z_MEM_ERROR:Rn}=ge;function Bn(e){this.options=mt({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Et,this.strm.avail_out=0;let n=kn.inflateInit2(this.strm,t.windowBits);if(n!==An)throw new Error(me[n]);if(this.header=new Sn,kn.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=vt(t.dictionary):"[object ArrayBuffer]"===In.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=kn.inflateSetDictionary(this.strm,t.dictionary),n!==An)))throw new Error(me[n])}function Nn(e,t){const n=new Bn(t);if(n.push(e),n.err)throw n.msg||me[n.err];return n.result}Bn.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,o=this.options.dictionary;let i,s,a;if(this.ended)return!1;for(s=t===~~t?t:!0===t?Tn:Cn,"[object ArrayBuffer]"===In.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=kn.inflate(n,s),i===On&&o&&(i=kn.inflateSetDictionary(n,o),i===An?i=kn.inflate(n,s):i===Mn&&(i=On));n.avail_in>0&&i===Pn&&n.state.wrap>0&&0!==e[n.next_in];)kn.inflateReset(n),i=kn.inflate(n,s);switch(i){case jn:case Mn:case On:case Rn:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(0===n.avail_out||i===Pn))if("string"===this.options.to){let e=xt(n.output,n.next_out),t=n.next_out-e,o=wt(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(o)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(i!==An||0!==a){if(i===Pn)return i=kn.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Bn.prototype.onData=function(e){this.chunks.push(e)},Bn.prototype.onEnd=function(e){e===An&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=gt(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ln={Inflate:Bn,inflate:Nn,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Nn(e,t)},ungzip:Nn,constants:ge};const{Deflate:Un,deflate:Dn,deflateRaw:Fn,gzip:zn}=Bt,{Inflate:$n,inflate:qn,inflateRaw:Zn,ungzip:Hn}=Ln;var Wn=qn,Gn=n(26729),Kn=n.n(Gn),Vn=n(48764).Buffer;const Xn=e=>"version"in e;var Yn=Object.freeze({__proto__:null,encode:function(e){return e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),"0x")},decode:function(e){0===e.indexOf("0x")&&(e=e.substr(2)),e.length%2===1&&(e="0"+e);let t=e.match(/.{2}/g);return null===t?r.Buffer.from([]):r.Buffer.from(t.map((e=>parseInt(e,16))))}});function Jn(e){return new TextDecoder("utf-8").decode(e)}var Qn=Object.freeze({__proto__:null,decode:Jn,encode:function(e){return(new TextEncoder).encode(e)}});function er(e){return c().encode(e)}var tr=Object.freeze({__proto__:null,encode:er,decode:function(e){return c().decode(e)}});function nr(e){return e.toString("base64")}function rr(e){return r.Buffer.from(e,"base64")}var or=Object.freeze({__proto__:null,encode:nr,decode:rr}),ir=Object.freeze({__proto__:null,hex:Yn,utf8:Qn,bs58:tr,base64:or});function sr(e){return"accounts"in e}const ar=d.struct([d.publicKey("authority"),d.vecU8("data")]);function cr(e,t,n,r){return(null===e||void 0===e?void 0:e.length)?e[0].name?n(e):r(e):t()}function ur(e,...t){if(e.args.length!=t.length)throw new Error("Invalid argument length");const n={};let r=0;return e.args.forEach((e=>{n[e.name]=t[r],r+=1})),n}function lr(e,t={}){e.forEach((e=>{if(sr(e))lr(e.accounts,t[e.name]);else if(!t[e.name])throw new Error(`Account \`${e.name}\` not provided.`)}))}function dr(e){return e instanceof o.PublicKey?e:new o.PublicKey(e)}class fr extends TypeError{constructor(e,t){let n;const{message:r,...o}=e,{path:i}=e;super(0===i.length?r:"At path: "+i.join(".")+" -- "+r),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var r;return null!=(r=n)?r:n=[e,...t()]}}}function hr(e){return"object"===typeof e&&null!=e}function pr(e){return"string"===typeof e?JSON.stringify(e):""+e}function mr(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"===typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:s}=n,{refinement:a,message:c="Expected a value of type `"+s+"`"+(a?" with refinement `"+a+"`":"")+", but received: `"+pr(r)+"`"}=e;return{value:r,type:s,refinement:a,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*gr(e,t,n,r){var o;hr(o=e)&&"function"===typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=mr(i,t,n,r);e&&(yield e)}}function*yr(e,t,n){void 0===n&&(n={});const{path:r=[],branch:o=[e],coerce:i=!1,mask:s=!1}=n,a={path:r,branch:o};if(i&&(e=t.coercer(e,a),s&&"type"!==t.type&&hr(t.schema)&&hr(e)&&!Array.isArray(e)))for(const u in e)void 0===t.schema[u]&&delete e[u];let c=!0;for(const u of t.validator(e,a))c=!1,yield[u,void 0];for(let[u,l,d]of t.entries(e,a)){const t=yr(l,d,{path:void 0===u?r:[...r,u],branch:void 0===u?o:[...o,l],coerce:i,mask:s});for(const n of t)n[0]?(c=!1,yield[n[0],void 0]):i&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):hr(e)&&(e[u]=l))}if(c)for(const u of t.refiner(e,a))c=!1,yield[u,void 0];c&&(yield[void 0,e])}class br{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=n,this.entries=s,this.coercer=i,this.validator=r?(e,t)=>gr(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>gr(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const n=xr(e,t);if(n[0])throw n[0]}(e,this)}create(e){return vr(e,this)}is(e){return wr(e,this)}mask(e){return function(e,t){const n=xr(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}validate(e,t){return void 0===t&&(t={}),xr(e,this,t)}}function vr(e,t){const n=xr(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function wr(e,t){return!xr(e,t)[0]}function xr(e,t,n){void 0===n&&(n={});const r=yr(e,t,n),o=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(o[0]){return[new fr(o[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}function Er(e,t){return new br({type:e,schema:null,validator:t})}function _r(e){return new br({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+pr(e)})}function kr(e){const t=pr(e),n=typeof e;return new br({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `"+t+"`, but received: "+pr(n)})}function Sr(e){return new br({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function Ir(){return Er("number",(e=>"number"===typeof e&&!isNaN(e)||"Expected a number, but received: "+pr(e)))}function Cr(e){return new br({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function Tr(){return Er("string",(e=>"string"===typeof e||"Expected a string, but received: "+pr(e)))}function Ar(e){const t=Object.keys(e);return new br({type:"type",schema:e,*entries(n){if(hr(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>hr(e)||"Expected an object, but received: "+pr(e)})}function Pr(e){const t=e.map((e=>e.type)).join(" | ");return new br({type:"union",schema:null,coercer:(t,n)=>(e.find((e=>{const[n]=e.validate(t,{coerce:!0});return!n}))||Or()).coercer(t,n),validator(n,r){const o=[];for(const t of e){const[...e]=yr(n,t,r),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return["Expected the value to satisfy a union of `"+t+"`, but received: "+pr(n),...o]}})}function Or(){return Er("unknown",(()=>!0))}async function jr(e,t,n){if(t.length<=99)return await Mr(e,t,n);{const r=function(e,t){return Array.apply(0,new Array(Math.ceil(e.length/t))).map(((n,r)=>e.slice(r*t,(r+1)*t)))}(t,99);return(await Promise.all(r.map((t=>Mr(e,t,n))))).flat()}}async function Mr(e,t,n){const r=null!==n&&void 0!==n?n:e.commitment,{value:o,context:i}=await e.getMultipleAccountsInfoAndContext(t,r);return o.map(((e,n)=>null===e?null:{publicKey:t[n],account:e,context:i}))}async function Rr(e,t,n,r,i){var s;n&&n.length>0&&t.sign(...n);const a=t._compile(),c=a.serialize(),u=t._serialize(c).toString("base64"),l={encoding:"base64",commitment:null!==r&&void 0!==r?r:e.commitment};if(i){const e=(Array.isArray(i)?i:a.nonProgramIds()).map((e=>e.toBase58()));l.accounts={encoding:"base64",addresses:e}}n&&n.length>0&&(l.sigVerify=!0);const d=[u,l],f=vr(await e._rpcRequest("simulateTransaction",d),Ur);if("error"in f){let e;if("data"in f.error&&(e=null===(s=f.error.data)||void 0===s?void 0:s.logs,e&&Array.isArray(e))){const t="\n    ",n=t+e.join(t);console.error(f.error.message,n)}throw new o.SendTransactionError("failed to simulate transaction: "+f.error.message,e)}return f.result}function Br(e){return function(e,t,n){return new br({...e,coercer:(r,o)=>wr(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}(Lr(e),Nr,(t=>"error"in t?t:{...t,result:vr(t.result,e)}))}const Nr=Lr(Or());function Lr(e){return Pr([Ar({jsonrpc:kr("2.0"),id:Tr(),result:e}),Ar({jsonrpc:kr("2.0"),id:Tr(),error:Ar({code:Or(),message:Tr(),data:Cr(Er("any",(()=>!0)))})})])}const Ur=(Dr=Ar({err:Sr(Pr([Ar({}),Tr()])),logs:Sr(_r(Tr())),accounts:Cr(Sr(_r(Sr(Ar({executable:Er("boolean",(e=>"boolean"===typeof e)),owner:Tr(),lamports:Ir(),data:_r(Tr()),rentEpoch:Cr(Ir())}))))),unitsConsumed:Cr(Ir())}),Br(Ar({context:Ar({slot:Ir()}),value:Dr})));var Dr,Fr=Object.freeze({__proto__:null,invoke:async function(e,t,n,r){e=dr(e),r||(r=Hr());const i=new o.Transaction;if(i.add(new o.TransactionInstruction({programId:e,keys:null!==t&&void 0!==t?t:[],data:n})),void 0===r.sendAndConfirm)throw new Error("This function requires 'Provider.sendAndConfirm' to be implemented.");return await r.sendAndConfirm(i,[])},getMultipleAccounts:async function(e,t,n){return(await jr(e,t,n)).map((e=>e?{publicKey:e.publicKey,account:e.account}:null))},getMultipleAccountsAndContext:jr,simulateTransaction:Rr});class zr{constructor(e,t,n=zr.defaultOptions()){this.connection=e,this.wallet=t,this.opts=n,this.publicKey=null===t||void 0===t?void 0:t.publicKey}static defaultOptions(){return{preflightCommitment:"processed",commitment:"processed"}}static local(e,t=zr.defaultOptions()){throw new Error("Provider local is not available on browser.")}static env(){throw new Error("Provider env is not available on browser.")}async sendAndConfirm(e,t,n){var r,i,s,a;if(void 0===n&&(n=this.opts),Xn(e))t&&e.sign(t);else if(e.feePayer=null!==(r=e.feePayer)&&void 0!==r?r:this.wallet.publicKey,e.recentBlockhash=(await this.connection.getLatestBlockhash(n.preflightCommitment)).blockhash,t)for(const o of t)e.partialSign(o);const c=(e=await this.wallet.signTransaction(e)).serialize();try{return await qr(this.connection,c,n)}catch(He){if(He instanceof Zr){const n=er(Xn(e)?(null===(i=e.signatures)||void 0===i?void 0:i[0])||new Uint8Array:null!==(s=e.signature)&&void 0!==s?s:new Uint8Array),r=await this.connection.getTransaction(n,{commitment:"confirmed"});if(r){const e=null===(a=r.meta)||void 0===a?void 0:a.logMessages;throw e?new o.SendTransactionError(He.message,e):He}throw He}throw He}}async sendAll(e,t){var n,r,i;void 0===t&&(t=this.opts);const s=(await this.connection.getLatestBlockhash(t.preflightCommitment)).blockhash;let a=e.map((e=>{var t,n;if(Xn(e.tx)){let t=e.tx;return e.signers&&t.sign(e.signers),t}{let r=e.tx,o=null!==(t=e.signers)&&void 0!==t?t:[];return r.feePayer=null!==(n=r.feePayer)&&void 0!==n?n:this.wallet.publicKey,r.recentBlockhash=s,o.forEach((e=>{r.partialSign(e)})),r}}));const c=await this.wallet.signAllTransactions(a),u=[];for(let l=0;l<a.length;l+=1){const e=c[l],s=e.serialize();try{u.push(await qr(this.connection,s,t))}catch(He){if(He instanceof Zr){const s=er(Xn(e)?(null===(n=e.signatures)||void 0===n?void 0:n[0])||new Uint8Array:null!==(r=e.signature)&&void 0!==r?r:new Uint8Array),a=await this.connection.getTransaction(s,{commitment:"confirmed"});if(a){const e=null===(i=a.meta)||void 0===i?void 0:i.logMessages;throw e?new o.SendTransactionError(He.message,e):He}throw He}throw He}}return u}async simulate(e,t,n,r){let o,i=(await this.connection.getLatestBlockhash(null!==n&&void 0!==n?n:this.connection.commitment)).blockhash;if(Xn(e)?(t&&t.length>0&&(e.sign(t),e=await this.wallet.signTransaction(e)),o=await this.connection.simulateTransaction(e,{commitment:n})):(e.feePayer=e.feePayer||this.wallet.publicKey,e.recentBlockhash=i,t&&t.length>0&&(e=await this.wallet.signTransaction(e)),o=await Rr(this.connection,e,t,n,r)),o.value.err)throw new $r(o.value);return o.value}}class $r extends Error{constructor(e,t){super(t),this.simulationResponse=e}}async function qr(e,t,n){const r=n&&{skipPreflight:n.skipPreflight,preflightCommitment:n.preflightCommitment||n.commitment},o=await e.sendRawTransaction(t,r),i=(await e.confirmTransaction(o,n&&n.commitment)).value;if(i.err)throw new Zr(`Raw transaction ${o} failed (${JSON.stringify(i)})`);return o}class Zr extends Error{constructor(e){super(e)}}function Hr(){return null===Wr?zr.local():Wr}let Wr=null;const Gr=new Set(["debug-logs"]),Kr=new Map;function Vr(e){return void 0!==Kr.get(e)}var Xr=Object.freeze({__proto__:null,set:function(e){if(!Gr.has(e))throw new Error("Invalid feature");Kr.set(e,!0)},isSet:Vr});class Yr extends Error{constructor(e){super(e),this.name="IdlError"}}class Jr{constructor(e){this.stack=e}static parse(e){var t;const n=/^Program (\w*) invoke/,r=/^Program \w* success/,i=[];for(let s=0;s<e.length;s++){if(r.exec(e[s])){i.pop();continue}const a=null===(t=n.exec(e[s]))||void 0===t?void 0:t[1];a&&i.push(new o.PublicKey(a))}return new Jr(i)}}class Qr extends Error{constructor(e,t,n,r,o,i){super(n.join("\n").replace("Program log: ","")),this.errorLogs=n,this.logs=r,this.error={errorCode:e,errorMessage:t,comparedValues:i,origin:o},this._programErrorStack=Jr.parse(r)}static parse(e){if(!e)return null;const t=e.findIndex((e=>e.startsWith("Program log: AnchorError")));if(-1===t)return null;const n=e[t],r=[n];let i;if(t+1<e.length)if("Program log: Left:"===e[t+1]){const n=/^Program log: (.*)$/,s=n.exec(e[t+2])[1],a=n.exec(e[t+4])[1];i=[new o.PublicKey(s),new o.PublicKey(a)],r.push(...e.slice(t+1,t+5))}else if(e[t+1].startsWith("Program log: Left:")){const n=/^Program log: (Left|Right): (.*)$/,o=n.exec(e[t+1])[2],s=n.exec(e[t+2])[2];r.push(...e.slice(t+1,t+3)),i=[o,s]}const s=/^Program log: AnchorError occurred\. Error Code: (.*)\. Error Number: (\d*)\. Error Message: (.*)\./.exec(n),a=/^Program log: AnchorError thrown in (.*):(\d*)\. Error Code: (.*)\. Error Number: (\d*)\. Error Message: (.*)\./.exec(n),c=/^Program log: AnchorError caused by account: (.*)\. Error Code: (.*)\. Error Number: (\d*)\. Error Message: (.*)\./.exec(n);if(s){const[t,n,o]=s.slice(1,4),a={code:t,number:parseInt(n)};return new Qr(a,o,r,e,void 0,i)}if(a){const[t,n,o,s,c]=a.slice(1,6),u={code:o,number:parseInt(s)},l={file:t,line:parseInt(n)};return new Qr(u,c,r,e,l,i)}if(c){const[t,n,o,s]=c.slice(1,5),a=t,u={code:n,number:parseInt(o)};return new Qr(u,s,r,e,a,i)}return null}get program(){return this._programErrorStack.stack[this._programErrorStack.stack.length-1]}get programErrorStack(){return this._programErrorStack.stack}toString(){return this.message}}class eo extends Error{constructor(e,t,n){super(),this.code=e,this.msg=t,this.logs=n,n&&(this._programErrorStack=Jr.parse(n))}static parse(e,t){const n=e.toString();let r,o;if(n.includes("custom program error:")){let e=n.split("custom program error: ");if(2!==e.length)return null;r=e[1]}else{const e=n.match(/"Custom":([0-9]+)}/g);if(!e||e.length>1)return null;r=e[0].match(/([0-9]+)/g)[0]}try{o=parseInt(r)}catch(s){return null}let i=t.get(o);return void 0!==i?new eo(o,i,e.logs):(i=no.get(o),void 0!==i?new eo(o,i,e.logs):null)}get program(){var e;return null===(e=this._programErrorStack)||void 0===e?void 0:e.stack[this._programErrorStack.stack.length-1]}get programErrorStack(){var e;return null===(e=this._programErrorStack)||void 0===e?void 0:e.stack}toString(){return this.msg}}function to(e,t){Vr("debug-logs")&&console.log("Translating error:",e);const n=Qr.parse(e.logs);if(n)return n;const r=eo.parse(e,t);if(r)return r;if(e.logs){const t={get:function(t,n){return"programErrorStack"===n?t.programErrorStack.stack:"program"===n?t.programErrorStack.stack[e.programErrorStack.stack.length-1]:Reflect.get(...arguments)}};return e.programErrorStack=Jr.parse(e.logs),new Proxy(e,t)}return e}const no=new Map([[100,"8 byte instruction identifier not provided"],[101,"Fallback functions are not supported"],[102,"The program could not deserialize the given instruction"],[103,"The program could not serialize the given instruction"],[1e3,"The program was compiled without idl instructions"],[1001,"The transaction was given an invalid program for the IDL instruction"],[1002,"IDL account must be empty in order to resize, try closing first"],[1500,"The program was compiled without `event-cpi` feature"],[2e3,"A mut constraint was violated"],[2001,"A has one constraint was violated"],[2002,"A signer constraint was violated"],[2003,"A raw constraint was violated"],[2004,"An owner constraint was violated"],[2005,"A rent exemption constraint was violated"],[2006,"A seeds constraint was violated"],[2007,"An executable constraint was violated"],[2008,"Deprecated Error, feel free to replace with something else"],[2009,"An associated constraint was violated"],[2010,"An associated init constraint was violated"],[2011,"A close constraint was violated"],[2012,"An address constraint was violated"],[2013,"Expected zero account discriminant"],[2014,"A token mint constraint was violated"],[2015,"A token owner constraint was violated"],[2016,"A mint mint authority constraint was violated"],[2017,"A mint freeze authority constraint was violated"],[2018,"A mint decimals constraint was violated"],[2019,"A space constraint was violated"],[2020,"A required account for the constraint is None"],[2021,"A token account token program constraint was violated"],[2022,"A mint token program constraint was violated"],[2023,"An associated token account token program constraint was violated"],[2024,"A group pointer extension constraint was violated"],[2025,"A group pointer extension authority constraint was violated"],[2026,"A group pointer extension group address constraint was violated"],[2027,"A group member pointer extension constraint was violated"],[2028,"A group member pointer extension authority constraint was violated"],[2029,"A group member pointer extension group address constraint was violated"],[2030,"A metadata pointer extension constraint was violated"],[2031,"A metadata pointer extension authority constraint was violated"],[2032,"A metadata pointer extension metadata address constraint was violated"],[2033,"A close authority constraint was violated"],[2034,"A close authority extension authority constraint was violated"],[2035,"A permanent delegate extension constraint was violated"],[2036,"A permanent delegate extension delegate constraint was violated"],[2037,"A transfer hook extension constraint was violated"],[2038,"A transfer hook extension authority constraint was violated"],[2039,"A transfer hook extension transfer hook program id constraint was violated"],[2500,"A require expression was violated"],[2501,"A require_eq expression was violated"],[2502,"A require_keys_eq expression was violated"],[2503,"A require_neq expression was violated"],[2504,"A require_keys_neq expression was violated"],[2505,"A require_gt expression was violated"],[2506,"A require_gte expression was violated"],[3e3,"The account discriminator was already set on this account"],[3001,"No 8 byte discriminator was found on the account"],[3002,"8 byte discriminator did not match what was expected"],[3003,"Failed to deserialize the account"],[3004,"Failed to serialize the account"],[3005,"Not enough account keys given to the instruction"],[3006,"The given account is not mutable"],[3007,"The given account is owned by a different program than expected"],[3008,"Program ID was not as expected"],[3009,"Program account is not executable"],[3010,"The given account did not sign"],[3011,"The given account is not owned by the system program"],[3012,"The program expected this account to be already initialized"],[3013,"The given account is not a program data account"],[3014,"The given account is not the associated token account"],[3015,"The given public key does not match the required sysvar"],[3016,"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"],[3017,"The account was duplicated for more than one reallocation"],[4100,"The declared program id does not match the actual program id"],[4101,"You cannot/should not initialize the payer account as a program account"],[5e3,"The API being used is deprecated and should no longer be used"]]);class ro{static fieldLayout(e,t=[],n){const r=e.name;switch(e.type){case"bool":return d.bool(r);case"u8":return d.u8(r);case"i8":return d.i8(r);case"u16":return d.u16(r);case"i16":return d.i16(r);case"u32":return d.u32(r);case"i32":return d.i32(r);case"f32":return d.f32(r);case"u64":return d.u64(r);case"i64":return d.i64(r);case"f64":return d.f64(r);case"u128":return d.u128(r);case"i128":return d.i128(r);case"u256":return d.u256(r);case"i256":return d.i256(r);case"bytes":return d.vecU8(r);case"string":return d.str(r);case"pubkey":return d.publicKey(r);default:if("option"in e.type)return d.option(ro.fieldLayout({type:e.type.option},t,n),r);if("vec"in e.type)return d.vec(ro.fieldLayout({type:e.type.vec},t,n),r);if("array"in e.type){let[o,i]=e.type.array;return i=ro.resolveArrayLen(i,n),d.array(ro.fieldLayout({type:o},t,n),i,r)}if("defined"in e.type){if(!t)throw new Yr("User defined types not provided");const o=e.type.defined.name,i=t.find((e=>e.name===o));if(!i)throw new Yr(`Type not found: ${e.name}`);return ro.typeDefLayout({typeDef:i,types:t,genericArgs:null!==n&&void 0!==n?n:e.type.defined.generics,name:r})}if("generic"in e.type){const t=null===n||void 0===n?void 0:n.at(0);if("type"!==(null===t||void 0===t?void 0:t.kind))throw new Yr(`Invalid generic field: ${e.name}`);return ro.fieldLayout({...e,type:t.type})}throw new Yr(`Not yet implemented: ${JSON.stringify(e.type)}`)}}static typeDefLayout({typeDef:e,types:t,name:n,genericArgs:r}){switch(e.type.kind){case"struct":{const o=cr(e.type.fields,(()=>[]),(n=>n.map((n=>{const o=r?ro.resolveGenericArgs({type:n.type,typeDef:e,genericArgs:r}):r;return ro.fieldLayout(n,t,o)}))),(n=>n.map(((n,o)=>{const i=r?ro.resolveGenericArgs({type:n,typeDef:e,genericArgs:r}):r;return ro.fieldLayout({name:o.toString(),type:n},t,i)}))));return d.struct(o,n)}case"enum":{const o=e.type.variants.map((n=>{const o=cr(n.fields,(()=>[]),(n=>n.map((n=>{const o=r?ro.resolveGenericArgs({type:n.type,typeDef:e,genericArgs:r}):r;return ro.fieldLayout(n,t,o)}))),(n=>n.map(((n,o)=>{const i=r?ro.resolveGenericArgs({type:n,typeDef:e,genericArgs:r}):r;return ro.fieldLayout({name:o.toString(),type:n},t,i)}))));return d.struct(o,n.name)}));return void 0!==n?d.rustEnum(o).replicate(n):d.rustEnum(o,n)}case"type":return ro.fieldLayout({type:e.type.alias,name:n},t)}}static typeSize(e,t,n){var r;switch(e){case"bool":case"u8":case"i8":case"bytes":case"string":return 1;case"i16":case"u16":return 2;case"u32":case"i32":case"f32":return 4;case"u64":case"i64":case"f64":return 8;case"u128":case"i128":return 16;case"u256":case"i256":case"pubkey":return 32;default:if("option"in e)return 1+ro.typeSize(e.option,t,n);if("coption"in e)return 4+ro.typeSize(e.coption,t,n);if("vec"in e)return 1;if("array"in e){let[r,o]=e.array;return o=ro.resolveArrayLen(o,n),ro.typeSize(r,t,n)*o}if("defined"in e){const o=null===(r=t.types)||void 0===r?void 0:r.find((t=>t.name===e.defined.name));if(!o)throw new Yr(`Type not found: ${JSON.stringify(e)}`);const i=r=>{const i=null!==n&&void 0!==n?n:e.defined.generics,s=i?ro.resolveGenericArgs({type:r,typeDef:o,genericArgs:i}):i;return ro.typeSize(r,t,s)};switch(o.type.kind){case"struct":return cr(o.type.fields,(()=>[0]),(e=>e.map((e=>i(e.type)))),(e=>e.map((e=>i(e))))).reduce(((e,t)=>e+t),0);case"enum":{const e=o.type.variants.map((e=>cr(e.fields,(()=>[0]),(e=>e.map((e=>i(e.type)))),(e=>e.map((e=>i(e))))).reduce(((e,t)=>e+t),0)));return Math.max(...e)+1}case"type":return ro.typeSize(o.type.alias,t,n)}}if("generic"in e){const r=null===n||void 0===n?void 0:n.at(0);if("type"!==(null===r||void 0===r?void 0:r.kind))throw new Yr(`Invalid generic: ${e.generic}`);return ro.typeSize(r.type,t,n)}throw new Error(`Invalid type ${JSON.stringify(e)}`)}}static resolveArrayLen(e,t){if("number"===typeof e)return e;if(t){const n=t.find((e=>"const"===e.kind));"const"===(null===n||void 0===n?void 0:n.kind)&&(e=+n.value)}if("number"!==typeof e)throw new Yr("Generic array length did not resolve");return e}static resolveGenericArgs({type:e,typeDef:t,genericArgs:n,isDefined:r}){if("object"!==typeof e)return null;for(const o in t.generics){const i=t.generics[o];if("generic"in e&&i.name===e.generic)return[n[o]];if("option"in e){const o=ro.resolveGenericArgs({type:e.option,typeDef:t,genericArgs:n,isDefined:r});if(!o||!r)return o;if("type"===o[0].kind)return[{kind:"type",type:{option:o[0].type}}]}if("vec"in e){const o=ro.resolveGenericArgs({type:e.vec,typeDef:t,genericArgs:n,isDefined:r});if(!o||!r)return o;if("type"===o[0].kind)return[{kind:"type",type:{vec:o[0].type}}]}if("array"in e){const[s,a]=e.array,c="object"===typeof a,u=ro.resolveGenericArgs({type:s,typeDef:t,genericArgs:n,isDefined:r});if(u){for(const e in t.generics.slice(+o)){const r=+o+ +e;c&&t.generics[r].name===a.generic&&u.push(n[r])}if(!r)return u;if("type"===u[0].kind&&"const"===u[1].kind)return[{kind:"type",type:{array:[u[0].type,+u[1].value]}}]}if(c&&i.name===a.generic){const e=n[o];return r?[{kind:"type",type:{array:[s,+e.value]}}]:[e]}return null}if("defined"in e)return e.defined.generics?e.defined.generics.flatMap((e=>{switch(e.kind){case"type":return ro.resolveGenericArgs({type:e.type,typeDef:t,genericArgs:n,isDefined:!0});case"const":return[e]}})).filter((e=>null!==e)):null}return null}}class oo{constructor(e){this.idl=e;const t=e.instructions.map((t=>{const n=t.name,r=t.args.map((t=>ro.fieldLayout(t,e.types))),o=d.struct(r,n);return[n,{discriminator:t.discriminator,layout:o}]}));this.ixLayouts=new Map(t);const n=t.map((([e,{discriminator:t,layout:n}])=>[c().encode(t),{name:e,layout:n}]));this.sighashLayouts=new Map(n)}encode(e,t){const n=r.Buffer.alloc(1e3),o=this.ixLayouts.get(e);if(!o)throw new Error(`Unknown method: ${e}`);const i=o.layout.encode(t,n),s=n.slice(0,i);return r.Buffer.concat([r.Buffer.from(o.discriminator),s])}decode(e,t="hex"){"string"===typeof e&&(e="hex"===t?r.Buffer.from(e,"hex"):c().decode(e));const n=e.slice(0,so),o=e.slice(so),i=this.sighashLayouts.get(c().encode(n));return i?{name:i.name,data:i.layout.decode(o)}:null}format(e,t){return io.format(e,t,this.idl)}}class io{static format(e,t,n){const r=n.instructions.find((t=>e.name===t.name));if(!r)return console.error("Invalid instruction given"),null;const o=r.args.map((t=>({name:t.name,type:io.formatIdlType(t.type),data:io.formatIdlData(t,e.data[t.name],n.types)}))),i=io.flattenIdlAccounts(r.accounts);return{args:o,accounts:t.map(((e,t)=>t<i.length?{name:i[t].name,...e}:{name:void 0,...e}))}}static formatIdlType(e){if("string"===typeof e)return e;if("option"in e)return`Option<${this.formatIdlType(e.option)}>`;if("coption"in e)return`COption<${this.formatIdlType(e.coption)}>`;if("vec"in e)return`Vec<${this.formatIdlType(e.vec)}>`;if("array"in e)return`Array<${e.array[0]}; ${e.array[1]}>`;if("defined"in e){const t=e.defined.name;if(e.defined.generics){return`${t}<${e.defined.generics.map((e=>{switch(e.kind){case"type":return io.formatIdlType(e.type);case"const":return e.value}})).join(", ")}>`}return t}throw new Error(`Unknown IDL type: ${e}`)}static formatIdlData(e,t,n){if("string"===typeof e.type)return t.toString();if("vec"in e.type)return"["+t.map((t=>this.formatIdlData({name:"",type:e.type.vec},t,n))).join(", ")+"]";if("option"in e.type)return null===t?"null":this.formatIdlData({name:"",type:e.type.option},t,n);if("defined"in e.type){if(!n)throw new Error("User defined types not provided");const r=e.type.defined.name,o=n.find((e=>e.name===r));if(!o)throw new Error(`Type not found: ${r}`);return io.formatIdlDataDefined(o,t,n)}return"unknown"}static formatIdlDataDefined(e,t,n){switch(e.type.kind){case"struct":return"{ "+cr(e.type.fields,(()=>""),(e=>Object.entries(t).map((([t,r])=>{const o=e.find((e=>e.name===t));if(!o)throw new Error(`Field not found: ${t}`);return t+": "+io.formatIdlData(o,r,n)})).join(", ")),(e=>Object.entries(t).map((([t,r])=>t+": "+io.formatIdlData({name:"",type:e[t]},r,n))).join(", ")))+" }";case"enum":{const r=Object.keys(t)[0],o=e.type.variants.find((e=>e.name===r));if(!o)throw new Error(`Unable to find variant: ${r}`);const i=t[r];return cr(o.fields,(()=>r),(e=>{const t=Object.keys(i).map((t=>{const r=i[t],o=e.find((e=>e.name===t));if(!o)throw new Error(`Field not found: ${t}`);return t+": "+io.formatIdlData(o,r,n)})).join(", ");return`${r} { ${t} }`}),(e=>{const t=Object.entries(i).map((([t,r])=>t+": "+io.formatIdlData({name:"",type:e[t]},r,n))).join(", ");return`${r} { ${t} }`}))}case"type":return io.formatIdlType(e.type.alias)}}static flattenIdlAccounts(e,t){return e.map((e=>{const n=function(e){const t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)}(e.name);if(e.hasOwnProperty("accounts")){const r=t?`${t} > ${n}`:n;return io.flattenIdlAccounts(e.accounts,r)}return{...e,name:t?`${t} > ${n}`:n}})).flat()}}const so=8;class ao{constructor(e){if(this.idl=e,!e.accounts)return void(this.accountLayouts=new Map);const t=e.types;if(!t)throw new Error("Accounts require `idl.types`");const n=e.accounts.map((e=>{const n=t.find((t=>t.name===e.name));if(!n)throw new Error(`Account not found: ${e.name}`);return[e.name,ro.typeDefLayout({typeDef:n,types:t})]}));this.accountLayouts=new Map(n)}async encode(e,t){const n=r.Buffer.alloc(1e3),o=this.accountLayouts.get(e);if(!o)throw new Error(`Unknown account: ${e}`);const i=o.encode(t,n),s=n.slice(0,i),a=this.accountDiscriminator(e);return r.Buffer.concat([a,s])}decode(e,t){if(this.accountDiscriminator(e).compare(t.slice(0,so)))throw new Error("Invalid account discriminator");return this.decodeUnchecked(e,t)}decodeAny(e){const t=e.slice(0,so),n=Array.from(this.accountLayouts.keys()).find((e=>this.accountDiscriminator(e).equals(t)));if(!n)throw new Error("Account not found");return this.decodeUnchecked(n,e)}decodeUnchecked(e,t){const n=t.subarray(so),r=this.accountLayouts.get(e);if(!r)throw new Error(`Unknown account: ${e}`);return r.decode(n)}memcmp(e,t){const n=this.accountDiscriminator(e);return{offset:0,bytes:c().encode(t?r.Buffer.concat([n,t]):n)}}size(e){return so+ro.typeSize({defined:{name:e}},this.idl)}accountDiscriminator(e){var t;const n=null===(t=this.idl.accounts)||void 0===t?void 0:t.find((t=>t.name===e));if(!n)throw new Error(`Account not found: ${e}`);return r.Buffer.from(n.discriminator)}}class co{constructor(e){var t;if(!e.events)return void(this.layouts=new Map);const n=e.types;if(!n)throw new Error("Events require `idl.types`");const o=e.events.map((e=>{const t=n.find((t=>t.name===e.name));if(!t)throw new Error(`Event not found: ${e.name}`);return[e.name,ro.typeDefLayout({typeDef:t,types:n})]}));this.layouts=new Map(o),this.discriminators=new Map((null!==(t=e.events)&&void 0!==t?t:[]).map((e=>[nr(r.Buffer.from(e.discriminator)),e.name])))}decode(e){let t;try{t=rr(e)}catch(i){return null}const n=nr(t.slice(0,8)),r=this.discriminators.get(n);if(!r)return null;const o=this.layouts.get(r);if(!o)throw new Error(`Unknown event: ${r}`);return{data:o.decode(t.slice(8)),name:r}}}class uo{constructor(e){const t=e.types;if(!t)return void(this.typeLayouts=new Map);const n=t.filter((e=>!e.generics)).map((e=>[e.name,ro.typeDefLayout({typeDef:e,types:t})]));this.typeLayouts=new Map(n)}encode(e,t){const n=r.Buffer.alloc(1e3),o=this.typeLayouts.get(e);if(!o)throw new Error(`Unknown type: ${e}`);const i=o.encode(t,n);return n.slice(0,i)}decode(e,t){const n=this.typeLayouts.get(e);if(!n)throw new Error(`Unknown type: ${e}`);return n.decode(t)}}class lo{constructor(e){this.instruction=new oo(e),this.accounts=new ao(e),this.events=new co(e),this.types=new uo(e)}}var fo="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{};function ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}class po{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}decode(e,t){throw new Error("Layout is abstract")}encode(e,t,n){throw new Error("Layout is abstract")}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}var mo=po;class go extends po{isCount(){throw new Error("ExternalLayout is abstract")}}class yo extends go{constructor(e,t,n){if(!(e instanceof po))throw new TypeError("layout must be a Layout");if(void 0===t)t=0;else if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof bo||this.layout instanceof vo}decode(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}encode(e,t,n){return void 0===n&&(n=0),this.layout.encode(e,t,n+this.offset)}}class bo extends po{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeUIntLE(e,n,this.span),this.span}}class vo extends po{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeUIntBE(e,n,this.span),this.span}}const wo=Math.pow(2,32);function xo(e){const t=Math.floor(e/wo);return{hi32:t,lo32:e-t*wo}}function Eo(e,t){return e*wo+t}class _o extends po{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);const n=e.readUInt32LE(t);return Eo(e.readUInt32LE(t+4),n)}encode(e,t,n){void 0===n&&(n=0);const r=xo(e);return t.writeUInt32LE(r.lo32,n),t.writeUInt32LE(r.hi32,n+4),8}}class ko extends po{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);const n=e.readUInt32LE(t);return Eo(e.readInt32LE(t+4),n)}encode(e,t,n){void 0===n&&(n=0);const r=xo(e);return t.writeUInt32LE(r.lo32,n),t.writeInt32LE(r.hi32,n+4),8}}class So extends po{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce(((e,t)=>e&&t instanceof po),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof t&&void 0===n&&(n=t,t=void 0);for(const i of e)if(0>i.span&&void 0===i.property)throw new Error("fields cannot contain unnamed variable-length layout");let r=-1;try{r=e.reduce(((e,t)=>e+t.getSpan()),0)}catch(o){}super(r,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0;try{n=this.fields.reduce(((n,r)=>{const o=r.getSpan(e,t);return t+=o,n+o}),0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,t){void 0===t&&(t=0);const n=this.makeDestinationObject();for(const r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return n}encode(e,t,n){void 0===n&&(n=0);const r=n;let o=0,i=0;for(const s of this.fields){let r=s.span;if(i=0<r?r:0,void 0!==s.property){const o=e[s.property];void 0!==o&&(i=s.encode(o,t,n),0>r&&(r=s.getSpan(t,n)))}o=n,n+=r}return o+i-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!==typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}class Io{constructor(e){this.property=e}decode(){throw new Error("UnionDiscriminator is abstract")}encode(){throw new Error("UnionDiscriminator is abstract")}}class Co extends Io{constructor(e,t){if(!(e instanceof go&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}class To extends po{constructor(e,t,n){const r=e instanceof bo||e instanceof vo;if(r)e=new Co(new yo(e));else if(e instanceof go&&e.isCount())e=new Co(e);else if(!(e instanceof Io))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===t&&(t=null),!(null===t||t instanceof po))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let o=-1;t&&(o=t.span,0<=o&&r&&(o+=e.layout.span)),super(o,n),this.discriminator=e,this.usesPrefixDiscriminator=r,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return i(e)},this.configGetSourceVariant=function(e){i=e.bind(this)}}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(e.hasOwnProperty(n.property))return n}throw new Error("unable to infer src variant")}decode(e,t){let n;void 0===t&&(t=0);const r=this.discriminator,o=r.decode(e,t);let i=this.registry[o];if(void 0===i){let s=0;i=this.defaultLayout,this.usesPrefixDiscriminator&&(s=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=this.defaultLayout.decode(e,t+s)}else n=i.decode(e,t);return n}encode(e,t,n){void 0===n&&(n=0);const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(e[r.property],t,n),i+o.encode(e[o.property],t,n+i)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new Ao(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t){let n=e;return Vn.isBuffer(e)&&(void 0===t&&(t=0),n=this.discriminator.decode(e,t)),this.registry[n]}}class Ao extends po{constructor(e,t,n,r){if(!(e instanceof To))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof po))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}let o=e.span;0>e.span&&(o=n?n.span:0,0<=o&&e.usesPrefixDiscriminator&&(o+=e.discriminator.layout.span)),super(o,r),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(e,t+n)}decode(e,t){const n=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n){void 0===n&&(n=0);let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let o=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),o+=this.layout.getSpan(t,n+r),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}class Po extends po{constructor(e,t){if(!(e instanceof go&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof go||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t){void 0===t&&(t=0);let n=this.span;return 0>n&&(n=this.length.decode(e,t)),e.slice(t,t+n)}encode(e,t,n){let r=this.length;if(this.length instanceof go&&(r=e.length),!Vn.isBuffer(e)||r!==e.length)throw new TypeError((o="Blob.encode",((i=this).property?o+"["+i.property+"]":o)+" requires (length "+r+") Buffer as src"));var o,i;if(n+r>t.length)throw new RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),n,r,"hex"),this.length instanceof go&&this.length.encode(r,t,n),r}}var Oo=(e,t,n)=>new yo(e,t,n),jo=e=>new bo(4,e),Mo=e=>new ko(e),Ro=(e,t,n)=>new So(e,t,n),Bo=(e,t,n)=>new To(e,t,n),No=(e,t)=>new Po(e,t);class Lo extends mo{constructor(e){super(-1,e),this.property=e,this.layout=Ro([jo("length"),jo("lengthPadding"),No(Oo(jo(),-8),"chars")],this.property)}encode(e,t,n=0){if(null===e||void 0===e)return this.layout.span;const r={chars:Vn.from(e,"utf8")};return this.layout.encode(r,t,n)}decode(e,t=0){return this.layout.decode(e,t).chars.toString()}getSpan(e,t=0){return jo().span+jo().span+new(s())(new Uint8Array(e).slice(t,t+4),10,"le").toNumber()}}function Uo(e){return new Lo(e)}function Do(e){return No(32,e)}const Fo=Bo(jo("instruction"));Fo.addVariant(0,Ro([Mo("lamports"),Mo("space"),Do("owner")]),"createAccount"),Fo.addVariant(1,Ro([Do("owner")]),"assign"),Fo.addVariant(2,Ro([Mo("lamports")]),"transfer"),Fo.addVariant(3,Ro([Do("base"),Uo("seed"),Mo("lamports"),Mo("space"),Do("owner")]),"createAccountWithSeed"),Fo.addVariant(4,Ro([Do("authorized")]),"advanceNonceAccount"),Fo.addVariant(5,Ro([Mo("lamports")]),"withdrawNonceAccount"),Fo.addVariant(6,Ro([Do("authorized")]),"initializeNonceAccount"),Fo.addVariant(7,Ro([Do("authorized")]),"authorizeNonceAccount"),Fo.addVariant(8,Ro([Mo("space")]),"allocate"),Fo.addVariant(9,Ro([Do("base"),Uo("seed"),Mo("space"),Do("owner")]),"allocateWithSeed"),Fo.addVariant(10,Ro([Do("base"),Uo("seed"),Do("owner")]),"assignWithSeed"),Fo.addVariant(11,Ro([Mo("lamports"),Uo("seed"),Do("owner")]),"transferWithSeed");Math.max(...Object.values(Fo.registry).map((e=>e.span)));class zo extends mo{constructor(e,t,n,r){super(e.span,r),this.layout=e,this.decoder=t,this.encoder=n}decode(e,t){return this.decoder(this.layout.decode(e,t))}encode(e,t,n){return this.layout.encode(this.encoder(e),t,n)}getSpan(e,t){return this.layout.getSpan(e,t)}}function $o(e){return new zo(No(32),(e=>new o.PublicKey(e)),(e=>e.toBuffer()),e)}Ro([jo("version"),jo("state"),$o("authorizedPubkey"),$o("nonce"),Ro([(qo="lamportsPerSignature",new _o(qo))],"feeCalculator")]);var qo;var Zo=Object.freeze({__proto__:null,hash:function(e){return(new TextDecoder).decode(S(e))}});var Ho=Object.freeze({__proto__:null,createWithSeedSync:function(e,t,n){const i=r.Buffer.concat([e.toBuffer(),r.Buffer.from(t),n.toBuffer()]);return new o.PublicKey(S(i))}});const Wo=new o.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),Go=new o.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");var Ko=Object.freeze({__proto__:null,TOKEN_PROGRAM_ID:Wo,ASSOCIATED_PROGRAM_ID:Go,associatedAddress:function({mint:e,owner:t}){return o.PublicKey.findProgramAddressSync([t.toBuffer(),Wo.toBuffer(),e.toBuffer()],Go)[0]}}),Vo={exports:{}};!function(e,t){var n="undefined"!==typeof self?self:fo,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var n=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=function(e){var t=e.toUpperCase();return b.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function x(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},y.call(v.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];E.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(He){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,i){var s=new v(e,n);if(s.signal&&s.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:x(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;r(new E(t,e))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send("undefined"===typeof s._bodyInit?null:s._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=f,e.Request=v,e.Response=E),t.Headers=f,t.Request=v,t.Response=E,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(Vo,Vo.exports);var Xo=ho(Vo.exports);async function Yo(e,t){const n=await e.getAccountInfo(t);if(null===n)throw new Error("program account not found");const{program:r}=Qo(n.data),o=await e.getAccountInfo(r.programdataAddress);if(null===o)throw new Error("program data account not found");const{programData:i}=Qo(o.data);return i}const Jo=d.rustEnum([d.struct([],"uninitialized"),d.struct([d.option(d.publicKey(),"authorityAddress")],"buffer"),d.struct([d.publicKey("programdataAddress")],"program"),d.struct([d.u64("slot"),d.option(d.publicKey(),"upgradeAuthorityAddress")],"programData")],void 0,d.u32());function Qo(e){return Jo.decode(e)}var ei=Object.freeze({__proto__:null,verifiedBuild:async function(e,t,n=5){const r=`https://api.apr.dev/api/v0/program/${t.toString()}/latest?limit=${n}`,[o,i]=await Promise.all([Yo(e,t),Xo(r)]),s=(await i.json()).filter((e=>!e.aborted&&"Built"===e.state&&"Verified"===e.verified));if(0===s.length)return null;const a=s[0];return o.slot.toNumber()!==a.verified_slot?null:a},fetchData:Yo,decodeUpgradeableLoaderState:Qo}),ti=Object.freeze({__proto__:null,sha256:Zo,rpc:Fr,publicKey:Ho,bytes:ir,token:Ko,features:Xr,registry:ei});function ni(e,t){var n,r;let o={};const i=e.args?e.args.length:0;if(t.length>i){if(t.length!==i+1)throw new Error(`provided too many arguments ${t} to instruction ${null===e||void 0===e?void 0:e.name} expecting: ${null!==(r=null===(n=e.args)||void 0===n?void 0:n.map((e=>e.name)))&&void 0!==r?r:[]}`);o=t.pop()}return[t,o]}class ri{static build(e,t,n){if("_inner"===e.name)throw new Yr("the _inner name is reserved");const r=(...i)=>{const[s,a]=ni(e,[...i]);lr(e.accounts,a.accounts);const c=r.accounts(a.accounts);return void 0!==a.remainingAccounts&&c.push(...a.remainingAccounts),Vr("debug-logs")&&console.log("Outgoing account metas:",c),new o.TransactionInstruction({keys:c,programId:n,data:t(e.name,ur(e,...s))})};return r.accounts=t=>ri.accountsArray(t,e.accounts,n,e.name),r}static accountsArray(e,t,n,r){return e?t.map((t=>{if(sr(t)){const o=e[t.name];return ri.accountsArray(o,t.accounts,n,r).flat()}let o;try{o=dr(e[t.name])}catch(He){throw new Error(`Wrong input type for account "${t.name}" in the instruction accounts object${void 0!==r?' for instruction "'+r+'"':""}. Expected PublicKey or string.`)}const i=t.optional&&o.equals(n);return{pubkey:o,isWritable:Boolean(t.writable&&!i),isSigner:Boolean(t.signer&&!i)}})).flat():[]}}class oi{get size(){return this._size}get programId(){return this._programId}get provider(){return this._provider}get coder(){return this._coder}constructor(e,t,n,r,o){this._idlAccount=t,this._programId=n,this._provider=null!==r&&void 0!==r?r:Hr(),this._coder=null!==o&&void 0!==o?o:new lo(e),this._size=this._coder.accounts.size(t.name)}async fetchNullable(e,t){const{data:n}=await this.fetchNullableAndContext(e,t);return n}async fetchNullableAndContext(e,t){const n=await this.getAccountInfoAndContext(e,t),{value:r,context:o}=n;return{data:r&&0!==r.data.length?this._coder.accounts.decode(this._idlAccount.name,r.data):null,context:o}}async fetch(e,t){const{data:n}=await this.fetchNullableAndContext(e,t);if(null===n)throw new Error(`Account does not exist or has no data ${e.toString()}`);return n}async fetchAndContext(e,t){const{data:n,context:r}=await this.fetchNullableAndContext(e,t);if(null===n)throw new Error(`Account does not exist ${e.toString()}`);return{data:n,context:r}}async fetchMultiple(e,t){return(await this.fetchMultipleAndContext(e,t)).map((e=>e?e.data:null))}async fetchMultipleAndContext(e,t){return(await jr(this._provider.connection,e.map((e=>dr(e))),t)).map((e=>{if(null==e)return null;const{account:t,context:n}=e;return{data:this._coder.accounts.decode(this._idlAccount.name,t.data),context:n}}))}async all(e){const t=this.coder.accounts.memcmp(this._idlAccount.name,e instanceof Vn?e:void 0),n=[];return void 0!=(null===t||void 0===t?void 0:t.offset)&&void 0!=(null===t||void 0===t?void 0:t.bytes)&&n.push({memcmp:{offset:t.offset,bytes:t.bytes}}),void 0!=(null===t||void 0===t?void 0:t.dataSize)&&n.push({dataSize:t.dataSize}),(await this._provider.connection.getProgramAccounts(this._programId,{commitment:this._provider.connection.commitment,filters:[...n,...Array.isArray(e)?e:[]]})).map((({pubkey:e,account:t})=>({publicKey:e,account:this._coder.accounts.decode(this._idlAccount.name,t.data)})))}subscribe(e,t){const n=ii.get(e.toString());if(n)return n.ee;const r=new(Kn());e=dr(e);const o=this._provider.connection.onAccountChange(e,(e=>{const t=this._coder.accounts.decode(this._idlAccount.name,e.data);r.emit("change",t)}),t);return ii.set(e.toString(),{ee:r,listener:o}),r}async unsubscribe(e){let t=ii.get(e.toString());t?ii&&await this._provider.connection.removeAccountChangeListener(t.listener).then((()=>{ii.delete(e.toString())})).catch(console.error):console.warn("Address is not subscribed")}async createInstruction(e,t){const n=this.size;if(void 0===this._provider.publicKey)throw new Error("This function requires the Provider interface implementor to have a 'publicKey' field.");return o.SystemProgram.createAccount({fromPubkey:this._provider.publicKey,newAccountPubkey:e.publicKey,space:null!==t&&void 0!==t?t:n,lamports:await this._provider.connection.getMinimumBalanceForRentExemption(null!==t&&void 0!==t?t:n),programId:this._programId})}async getAccountInfo(e,t){return await this._provider.connection.getAccountInfo(dr(e),t)}async getAccountInfoAndContext(e,t){return await this._provider.connection.getAccountInfoAndContext(dr(e),t)}}const ii=new Map,si="Program log: ",ai="Program data: ",ci=si.length,ui=ai.length;class li{constructor(e,t,n){this._programId=e,this._provider=t,this._eventParser=new di(e,n),this._eventCallbacks=new Map,this._eventListeners=new Map,this._listenerIdCount=0}addEventListener(e,t){var n;let r=this._listenerIdCount;return this._listenerIdCount+=1,this._eventListeners.has(e)||this._eventListeners.set(e,[]),this._eventListeners.set(e,(null!==(n=this._eventListeners.get(e))&&void 0!==n?n:[]).concat(r)),this._eventCallbacks.set(r,[e,t]),void 0!==this._onLogsSubscriptionId||(this._onLogsSubscriptionId=this._provider.connection.onLogs(this._programId,((e,t)=>{if(!e.err)for(const n of this._eventParser.parseLogs(e.logs)){const r=this._eventListeners.get(n.name);r&&r.forEach((r=>{const o=this._eventCallbacks.get(r);if(o){const[,r]=o;r(n.data,t.slot,e.signature)}}))}}))),r}async removeEventListener(e){const t=this._eventCallbacks.get(e);if(!t)throw new Error(`Event listener ${e} doesn't exist!`);const[n]=t;let r=this._eventListeners.get(n);if(!r)throw new Error(`Event listeners don't exist for ${n}!`);if(this._eventCallbacks.delete(e),r=r.filter((t=>t!==e)),this._eventListeners.set(n,r),0===r.length&&this._eventListeners.delete(n),0===this._eventCallbacks.size){if(0!==this._eventListeners.size)throw new Error(`Expected event listeners size to be 0 but got ${this._eventListeners.size}`);void 0!==this._onLogsSubscriptionId&&(await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId),this._onLogsSubscriptionId=void 0)}}}class di{constructor(e,t){this.coder=t,this.programId=e}*parseLogs(e,t=!1){const n=new hi(e),r=new fi;let o=n.next();for(;null!==o;){let[e,i,s]=this.handleLog(r,o,t);e&&(yield e),i&&r.push(i),s&&r.pop(),o=n.next()}}handleLog(e,t,n){return e.stack.length>0&&e.program()===this.programId.toString()?this.handleProgramLog(t,n):[null,...this.handleSystemLog(t)]}handleProgramLog(e,t){if(e.startsWith(si)||e.startsWith(ai)){const n=e.startsWith(si)?e.slice(ci):e.slice(ui),r=this.coder.events.decode(n);if(t&&null===r)throw new Error(`Unable to decode event ${n}`);return[r,null,!1]}return[null,...this.handleSystemLog(e)]}handleSystemLog(e){const t=e.split(":")[0];return null!==t.match(/^Program (.*) success/g)?[null,!0]:t.startsWith(`Program ${this.programId.toString()} invoke`)?[this.programId.toString(),!1]:t.includes("invoke")?["cpi",!1]:[null,!1]}}class fi{constructor(){this.stack=[]}program(){if(!this.stack.length)throw new Error("Expected the stack to have elements");return this.stack[this.stack.length-1]}push(e){this.stack.push(e)}pop(){if(!this.stack.length)throw new Error("Expected the stack to have elements");this.stack.pop()}}class hi{constructor(e){this.logs=e}next(){if(0===this.logs.length)return null;let e=this.logs[0];return this.logs=this.logs.slice(1),e}}function pi(e){return new yi(No(8),(e=>vi.fromBuffer(e)),(e=>e.toBuffer()),e)}function mi(e){return new yi(No(32),(e=>new o.PublicKey(e)),(e=>e.toBuffer()),e)}function gi(e,t){return new bi(e,t)}class yi extends mo{constructor(e,t,n,r){super(e.span,r),this.layout=e,this.decoder=t,this.encoder=n}decode(e,t){return this.decoder(this.layout.decode(e,t))}encode(e,t,n){return this.layout.encode(this.encoder(e),t,n)}getSpan(e,t){return this.layout.getSpan(e,t)}}class bi extends mo{constructor(e,t){super(-1,t),this.layout=e,this.discriminator=jo()}encode(e,t,n=0){return null===e||void 0===e?this.layout.span+this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+4)+4)}decode(e,t=0){const n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+4);throw new Error("Invalid coption "+this.layout.property)}getSpan(e,t=0){return this.layout.getSpan(e,t+4)+4}}class vi extends(s()){toBuffer(){const e=super.toArray().reverse(),t=Vn.from(e);if(8===t.length)return t;if(t.length>=8)throw new Error("u64 too large");const n=Vn.alloc(8);return t.copy(n),n}static fromBuffer(e){if(8!==e.length)throw new Error(`Invalid buffer length: ${e.length}`);return new vi([...e].reverse().map((e=>`00${e.toString(16)}`.slice(-2))).join(""),16)}}const wi=Ro([mi("mint"),mi("owner"),pi("amount"),gi(mi(),"delegate"),(e=>{const t=Bo((e=>new bo(1,e))("discriminator"),null,"state");return t.addVariant(0,Ro([]),"uninitialized"),t.addVariant(1,Ro([]),"initialized"),t.addVariant(2,Ro([]),"frozen"),t})(),gi(pi(),"isNative"),pi("delegatedAmount"),gi(mi(),"closeAuthority")]);class xi{constructor(e,t,n,r,o,i,s,a){this._args=e,this._accounts=t,this._provider=n,this._programId=r,this._idlIx=o,this._idlTypes=s,this._customResolver=a,this._accountStore=new Ei(n,i,r)}args(e){this._args=e}async resolve(){this.resolveEventCpi(this._idlIx.accounts),this.resolveConst(this._idlIx.accounts);let e=0;for(;await this.resolvePdasAndRelations(this._idlIx.accounts)+await this.resolveCustom()>0;)if(e++,16===e)throw new Error("Reached maximum depth for account resolution")}resolveOptionals(e){Object.assign(this._accounts,this.resolveOptionalsHelper(e,this._idlIx.accounts))}get(e){const t=e.reduce(((e,t)=>e&&e[t]),this._accounts);if(t&&t.toBase58)return t}set(e,t){let n=this._accounts;e.forEach(((r,o)=>{var i;o===e.length-1&&(n[r]=t),n[r]=null!==(i=n[r])&&void 0!==i?i:{},n=n[r]}))}resolveOptionalsHelper(e,t){const n={};for(const r of t){const t=r.name,o=e[t];void 0!==o&&(_i(o)?sr(r)?n[t]=this.resolveOptionalsHelper(o,r.accounts):n[t]=ki(o,!0):null!==o?n[t]=dr(o):r.optional&&(n[t]=this._programId))}return n}async resolveCustom(){if(this._customResolver){const{accounts:e,resolved:t}=await this._customResolver({args:this._args,accounts:this._accounts,provider:this._provider,programId:this._programId,idlIx:this._idlIx});return this._accounts=e,t}return 0}resolveEventCpi(e,t=[]){for(const n in e){const r=e[n];sr(r)&&this.resolveEventCpi(r.accounts,[...t,r.name]);const i=+n+1;if(i===e.length)return;const s=e[n].name,a=e[i].name;if("eventAuthority"===s&&"program"===a){const e=[...t,s],n=[...t,a];return this.get(e)||this.set(e,o.PublicKey.findProgramAddressSync([Vn.from("__event_authority")],this._programId)[0]),void(this.get(n)||this.set(n,this._programId))}}}resolveConst(e,t=[]){for(const n of e){const e=n.name;if(sr(n))this.resolveConst(n.accounts,[...t,e]);else{const r=n;if((r.signer||r.address)&&!this.get([...t,e])){if(r.signer){if(!this._provider.wallet)throw new Error("This function requires the `Provider` interface implementor to have a `wallet` field.");this.set([...t,e],this._provider.wallet.publicKey)}r.address&&this.set([...t,e],dr(r.address))}}}}async resolvePdasAndRelations(e,t=[]){let n=0;for(const r of e){const e=r.name;if(sr(r))n+=await this.resolvePdasAndRelations(r.accounts,[...t,e]);else{const i=r;if((i.pda||i.relations)&&!this.get([...t,e])){n++;try{if(i.pda){const n=await Promise.all(i.pda.seeds.map((e=>this.toBuffer(e,t))));if(n.some((e=>!e)))continue;const r=await this.parseProgramId(i,t),[s]=o.PublicKey.findProgramAddressSync(n,r);this.set([...t,e],s)}}catch{}try{if(i.relations){const n=this.get([...t,i.relations[0]]);if(n){const r=await this._accountStore.fetchAccount({publicKey:n});this.set([...t,e],r[e])}}}catch{}}}}return n}async parseProgramId(e,t=[]){var n;if(!(null===(n=e.pda)||void 0===n?void 0:n.program))return this._programId;const r=await this.toBuffer(e.pda.program,t);if(!r)throw new Error(`Program seed not resolved: ${e.name}`);return new o.PublicKey(r)}async toBuffer(e,t=[]){switch(e.kind){case"const":return this.toBufferConst(e);case"arg":return await this.toBufferArg(e);case"account":return await this.toBufferAccount(e,t);default:throw new Error(`Unexpected seed: ${e}`)}}toBufferConst(e){return this.toBufferValue("bytes",e.value)}async toBufferArg(e){const[t,...n]=e.path.split("."),r=this._idlIx.args.findIndex((e=>e.name===t));if(-1===r)throw new Error(`Unable to find argument for seed: ${t}`);const o=n.reduce(((e,t)=>(null!==e&&void 0!==e?e:{})[t]),this._args[r]);if(void 0===o)return;const i=this.getType(this._idlIx.args[r].type,n);return this.toBufferValue(i,o)}async toBufferAccount(e,t=[]){const[n,...r]=e.path.split("."),o=this.get([...t,n]);if(!o)return;if(!r.length)return this.toBufferValue("pubkey",o);if(!e.account)throw new Error(`Seed account is required in order to resolve type: ${e.path}`);let i=await this._accountStore.fetchAccount({publicKey:o,name:e.account}),s=r;for(;s.length>0;)i=i[s[0]],s=s.slice(1);if(void 0===i)return;const a=this.getType({defined:{name:e.account}},r);return this.toBufferValue(a,i)}toBufferValue(e,t){switch(e){case"u8":case"i8":return Vn.from([t]);case"u16":case"i16":return new(s())(t).toArrayLike(Vn,"le",2);case"u32":case"i32":return new(s())(t).toArrayLike(Vn,"le",4);case"u64":case"i64":return new(s())(t).toArrayLike(Vn,"le",8);case"u128":case"i128":return new(s())(t).toArrayLike(Vn,"le",16);case"u256":case"i256":return new(s())(t).toArrayLike(Vn,"le",32);case"string":case"bytes":return Vn.from(t);case"pubkey":return t.toBuffer();default:if(null===e||void 0===e?void 0:e.array)return Vn.from(t);throw new Error(`Unexpected seed type: ${e}`)}}getType(e,t=[]){var n;const r=null===(n=null===e||void 0===e?void 0:e.defined)||void 0===n?void 0:n.name;if(r){if("tokenAccount"===r)switch(t.at(0)){case"mint":case"owner":return"pubkey";case"amount":case"delagatedAmount":return"u64";default:throw new Error(`Unknown token account path: ${t}`)}const e=this._idlTypes.find((e=>e.name===r));if(!e)throw new Error(`Type not found: ${r}`);const[n,...o]=t,i=e.type.fields.find((e=>e.name===n));if(!i)throw new Error(`Field not found: ${n}`);return this.getType(i.type,o)}return e}}class Ei{constructor(e,t,n){this._provider=e,this._cache=new Map,this._idls={},this._idls[n.toBase58()]=t}async fetchAccount({publicKey:e,name:t}){const n=e.toBase58();if(!this._cache.has(n)){const o=await this._provider.connection.getAccountInfo(e);if(null===o)throw new Error(`Account not found: ${n}`);if("tokenAccount"===t){const e=(r=o.data,wi.decode(r));this._cache.set(n,e)}else{const e=await this.getAccountsNs(o.owner);if(e){const t=Object.values(e)[0];if(t){const e=t.coder.accounts.decodeAny(o.data);this._cache.set(n,e)}}}}var r;return this._cache.get(n)}async getAccountsNs(e){const t=e.toBase58();if(!this._idls[t]){const n=await Ii.fetchIdl(e,this._provider);if(n){const e=new Ii(n,this._provider);this._idls[t]=e.account}}return this._idls[t]}}function _i(e){return"object"===typeof e&&null!==e&&!("_bn"in e)}function ki(e,t){const n={};for(const r in e){const o=e[r];if(null!==o)n[r]=_i(o)?ki(o,!0):dr(o);else if(t)throw new Error("Failed to resolve optionals due to IDL type mismatch with input accounts!")}return n}class Si{constructor(e,t,n,r,o,i,s,a,c,u,l,d){this._args=e,this._ixFn=t,this._txFn=n,this._rpcFn=r,this._simulateFn=o,this._viewFn=i,this._accounts={},this._remainingAccounts=[],this._signers=[],this._preInstructions=[],this._postInstructions=[],this._resolveAccounts=!0,this._accountsResolver=new xi(e,this._accounts,s,a,c,u,l,d)}args(e){this._args=e,this._accountsResolver.args(e)}accounts(e){return this.accountsPartial(e)}accountsPartial(e){return this._resolveAccounts=!0,this._accountsResolver.resolveOptionals(e),this}accountsStrict(e){return this._resolveAccounts=!1,this._accountsResolver.resolveOptionals(e),this}signers(e){return this._signers=this._signers.concat(e),this}remainingAccounts(e){return this._remainingAccounts=this._remainingAccounts.concat(e),this}preInstructions(e,t=!1){return this._preInstructions=t?e.concat(this._preInstructions):this._preInstructions.concat(e),this}postInstructions(e){return this._postInstructions=this._postInstructions.concat(e),this}async pubkeys(){return this._resolveAccounts&&await this._accountsResolver.resolve(),this._accounts}async rpc(e){return this._resolveAccounts&&await this._accountsResolver.resolve(),this._rpcFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:e})}async rpcAndKeys(e){return{pubkeys:await this.pubkeys(),signature:await this.rpc(e)}}async view(e){if(this._resolveAccounts&&await this._accountsResolver.resolve(),!this._viewFn)throw new Error("Method does not support views");return this._viewFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:e})}async simulate(e){return this._resolveAccounts&&await this._accountsResolver.resolve(),this._simulateFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:e})}async instruction(){return this._resolveAccounts&&await this._accountsResolver.resolve(),this._ixFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}async prepare(){return{instruction:await this.instruction(),pubkeys:await this.pubkeys(),signers:this._signers}}async transaction(){return this._resolveAccounts&&await this._accountsResolver.resolve(),this._txFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}}class Ii{get programId(){return this._programId}get idl(){return this._idl}get rawIdl(){return this._rawIdl}get coder(){return this._coder}get provider(){return this._provider}constructor(e,t=Hr(),n,r){const i=function(e){const t=["name","path","account","relations","generic"],n=e=>e.split(".").map(l()).join("."),r=e=>{for(const o in e){const i=e[o];t.includes(o)?e[o]=Array.isArray(i)?i.map(n):n(i):"object"===typeof i&&r(i)}},o=structuredClone(e);return r(o),o}(e);this._idl=i,this._rawIdl=e,this._provider=t,this._programId=dr(e.address),this._coder=null!==n&&void 0!==n?n:new lo(i),this._events=new li(this._programId,t,this._coder);const[s,a,c,u,d,f,h]=class{static build(e,t,n,r,i){const s={},a={},c={},u={},l={},d={},f=function(e){const t=new Map;return e.errors&&e.errors.forEach((e=>{var n;let r=null!==(n=e.msg)&&void 0!==n?n:e.name;t.set(e.code,r)})),t}(e),h=e.accounts?class{static build(e,t,n,r){var o;return(null!==(o=e.accounts)&&void 0!==o?o:[]).reduce(((o,i)=>(o[i.name]=new oi(e,i,n,r,t),o)),{})}}.build(e,t,n,r):{};return e.instructions.forEach((p=>{const m=ri.build(p,((e,n)=>t.instruction.encode(e,n)),n),g=class{static build(e,t){return(...n)=>{var r,i,s;const[,a]=ni(e,[...n]),c=new o.Transaction;if(a.preInstructions&&a.instructions)throw new Error("instructions is deprecated, use preInstructions");return null===(r=a.preInstructions)||void 0===r||r.forEach((e=>c.add(e))),null===(i=a.instructions)||void 0===i||i.forEach((e=>c.add(e))),c.add(t(...n)),null===(s=a.postInstructions)||void 0===s||s.forEach((e=>c.add(e))),c}}}.build(p,m),y=class{static build(e,t,n,r){return async(...o)=>{var i;const s=t(...o),[,a]=ni(e,[...o]);if(void 0===r.sendAndConfirm)throw new Error("This function requires 'Provider.sendAndConfirm' to be implemented.");try{return await r.sendAndConfirm(s,null!==(i=a.signers)&&void 0!==i?i:[],a.options)}catch(He){throw to(He,n)}}}}.build(p,g,f,r),b=class{static build(e,t,n,r,o,i,s){return async(...a)=>{var c;const u=t(...a),[,l]=ni(e,[...a]);let d;if(void 0===r.simulate)throw new Error("This function requires 'Provider.simulate' to be implemented.");try{d=await r.simulate(u,l.signers,null===(c=l.options)||void 0===c?void 0:c.commitment)}catch(He){throw to(He,n)}if(void 0===d)throw new Error("Unable to simulate transaction");const f=d.logs;if(!f)throw new Error("Simulated logs not found");const h=[];if(s.events){let e=new di(i,o);for(const t of e.parseLogs(f))h.push(t)}return{events:h,raw:f}}}}.build(p,g,f,r,t,n,e),v=class{static build(e,t,n,r){const o=t.accounts.find((e=>e.writable)),i=!!t.returns;if(!o&&i)return async(...o)=>{let i=await n(...o);const s=`Program return: ${e} `;let a=i.raw.find((e=>e.startsWith(s)));if(!a)throw new Error("View expected return log");let c=rr(a.slice(s.length)),u=t.returns;if(!u)throw new Error("View expected return type");return ro.fieldLayout({type:u},r.types).decode(c)}}}.build(n,p,b,e),w=class{static build(e,t,n,r,o,i,s,a,c,u,l){return(...d)=>new Si(d,r,o,i,s,a,e,t,n,c,u,l)}}.build(r,n,p,m,g,y,b,v,h,e.types||[],null===i||void 0===i?void 0:i(p)),x=p.name;a[x]=m,c[x]=g,s[x]=y,u[x]=b,l[x]=w,v&&(d[x]=v)})),[s,a,c,h,u,l,d]}}.build(i,this._coder,this._programId,t,r);this.rpc=s,this.instruction=a,this.transaction=c,this.account=u,this.simulate=d,this.methods=f,this.views=h}static async at(e,t){const n=dr(e),r=await Ii.fetchIdl(n,t);if(!r)throw new Error(`IDL not found for program: ${e.toString()}`);return new Ii(r,t)}static async fetchIdl(e,t){t=null!==t&&void 0!==t?t:Hr();const n=dr(e),r=await async function(e){const t=(await o.PublicKey.findProgramAddress([],e))[0];return await o.PublicKey.createWithSeed(t,"anchor:idl",e)}(n),i=await t.connection.getAccountInfo(r);if(!i)return null;let s=(a=i.data.slice(8),ar.decode(a));var a;const c=Wn(s.data);return JSON.parse(Jn(c))}addEventListener(e,t){return this._events.addEventListener(e,t)}async removeEventListener(e){return await this._events.removeEventListener(e)}}new o.PublicKey("11111111111111111111111111111111")},84037:function(e){"use strict";const t=/[\p{Lu}]/u,n=/[\p{Ll}]/u,r=/^[\p{Lu}](?![\p{Lu}])/gu,o=/([\p{Alpha}\p{N}_]|$)/u,i=/[_.\- ]+/,s=new RegExp("^"+i.source),a=new RegExp(i.source+o.source,"gu"),c=new RegExp("\\d+"+o.source,"gu"),u=(e,o)=>{if("string"!==typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(o={pascalCase:!1,preserveConsecutiveUppercase:!1,...o},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const i=!1===o.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(o.locale),u=!1===o.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(o.locale);if(1===e.length)return o.pascalCase?u(e):i(e);return e!==i(e)&&(e=((e,r,o)=>{let i=!1,s=!1,a=!1;for(let c=0;c<e.length;c++){const u=e[c];i&&t.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,a=s,s=!0,c++):s&&a&&n.test(u)?(e=e.slice(0,c-1)+"-"+e.slice(c-1),a=s,s=!1,i=!0):(i=r(u)===u&&o(u)!==u,a=s,s=o(u)===u&&r(u)!==u)}return e})(e,i,u)),e=e.replace(s,""),e=o.preserveConsecutiveUppercase?((e,t)=>(r.lastIndex=0,e.replace(r,(e=>t(e)))))(e,i):i(e),o.pascalCase&&(e=u(e.charAt(0))+e.slice(1)),((e,t)=>(a.lastIndex=0,c.lastIndex=0,e.replace(a,((e,n)=>t(n))).replace(c,(e=>t(e)))))(e,u)};e.exports=u,e.exports.default=u},15970:function(e,t,n){"use strict";var r=n(48764).Buffer,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.array=t.rustEnum=t.str=t.vecU8=t.tagged=t.vec=t.bool=t.option=t.publicKey=t.i256=t.u256=t.i128=t.u128=t.i64=t.u64=t.struct=t.f64=t.f32=t.i32=t.u32=t.i16=t.u16=t.i8=t.u8=void 0;const i=n(20698),s=n(14990),a=o(n(13550));var c=n(20698);Object.defineProperty(t,"u8",{enumerable:!0,get:function(){return c.u8}}),Object.defineProperty(t,"i8",{enumerable:!0,get:function(){return c.s8}}),Object.defineProperty(t,"u16",{enumerable:!0,get:function(){return c.u16}}),Object.defineProperty(t,"i16",{enumerable:!0,get:function(){return c.s16}}),Object.defineProperty(t,"u32",{enumerable:!0,get:function(){return c.u32}}),Object.defineProperty(t,"i32",{enumerable:!0,get:function(){return c.s32}}),Object.defineProperty(t,"f32",{enumerable:!0,get:function(){return c.f32}}),Object.defineProperty(t,"f64",{enumerable:!0,get:function(){return c.f64}}),Object.defineProperty(t,"struct",{enumerable:!0,get:function(){return c.struct}});class u extends i.Layout{constructor(e,t,n){super(e,n),this.blob=(0,i.blob)(e),this.signed=t}decode(e,t=0){const n=new a.default(this.blob.decode(e,t),10,"le");return this.signed?n.fromTwos(8*this.span).clone():n}encode(e,t,n=0){return this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(r,"le",this.span),t,n)}}function l(e){return new u(8,!1,e)}t.u64=l,t.i64=function(e){return new u(8,!0,e)},t.u128=function(e){return new u(16,!1,e)},t.i128=function(e){return new u(16,!0,e)},t.u256=function(e){return new u(32,!1,e)},t.i256=function(e){return new u(32,!0,e)};class d extends i.Layout{constructor(e,t,n,r){super(e.span,r),this.layout=e,this.decoder=t,this.encoder=n}decode(e,t){return this.decoder(this.layout.decode(e,t))}encode(e,t,n){return this.layout.encode(this.encoder(e),t,n)}getSpan(e,t){return this.layout.getSpan(e,t)}}t.publicKey=function(e){return new d((0,i.blob)(32),(e=>new s.PublicKey(e)),(e=>e.toBuffer()),e)};class f extends i.Layout{constructor(e,t){super(-1,t),this.layout=e,this.discriminator=(0,i.u8)()}encode(e,t,n=0){return null===e||void 0===e?this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+1)+1)}decode(e,t=0){const n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+1);throw new Error("Invalid option "+this.property)}getSpan(e,t=0){const n=this.discriminator.decode(e,t);if(0===n)return 1;if(1===n)return this.layout.getSpan(e,t+1)+1;throw new Error("Invalid option "+this.property)}}function h(e){if(0===e)return!1;if(1===e)return!0;throw new Error("Invalid bool: "+e)}function p(e){return e?1:0}function m(e){const t=(0,i.u32)("length"),n=(0,i.struct)([t,(0,i.blob)((0,i.offset)(t,-t.span),"data")]);return new d(n,(({data:e})=>e),(e=>({data:e})),e)}t.option=function(e,t){return new f(e,t)},t.bool=function(e){return new d((0,i.u8)(),h,p,e)},t.vec=function(e,t){const n=(0,i.u32)("length"),r=(0,i.struct)([n,(0,i.seq)(e,(0,i.offset)(n,-n.span),"values")]);return new d(r,(({values:e})=>e),(e=>({values:e})),t)},t.tagged=function(e,t,n){const r=(0,i.struct)([l("tag"),t.replicate("data")]);return new d(r,(function({tag:t,data:n}){if(!t.eq(e))throw new Error("Invalid tag, expected: "+e.toString("hex")+", got: "+t.toString("hex"));return n}),(t=>({tag:e,data:t})),n)},t.vecU8=m,t.str=function(e){return new d(m(),(e=>e.toString("utf-8")),(e=>r.from(e,"utf-8")),e)},t.rustEnum=function(e,t,n){const r=(0,i.union)(null!==n&&void 0!==n?n:(0,i.u8)(),t);return e.forEach(((e,t)=>r.addVariant(t,e,e.property))),r},t.array=function(e,t,n){const r=(0,i.struct)([(0,i.seq)(e,t,"values")]);return new d(r,(({values:e})=>e),(e=>({values:e})),n)};class g extends i.Layout{constructor(e,t,n){super(e.span+t.span,n),this.keyLayout=e,this.valueLayout=t}decode(e,t){t=t||0;return[this.keyLayout.decode(e,t),this.valueLayout.decode(e,t+this.keyLayout.getSpan(e,t))]}encode(e,t,n){n=n||0;const r=this.keyLayout.encode(e[0],t,n);return r+this.valueLayout.encode(e[1],t,n+r)}getSpan(e,t){return this.keyLayout.getSpan(e,t)+this.valueLayout.getSpan(e,t)}}t.map=function(e,t,n){const r=(0,i.u32)("length"),o=(0,i.struct)([r,(0,i.seq)(new g(e,t),(0,i.offset)(r,-r.span),"values")]);return new d(o,(({values:e})=>new Map(e)),(e=>({values:Array.from(e.entries())})),n)}},8417:function(e,t,n){"use strict";n.d(t,{Z:function(){return oe}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),o=Math.abs,i=String.fromCharCode,s=Object.assign;function a(e){return e.trim()}function c(e,t,n){return e.replace(t,n)}function u(e,t){return e.indexOf(t)}function l(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function f(e){return e.length}function h(e){return e.length}function p(e,t){return t.push(e),e}var m=1,g=1,y=0,b=0,v=0,w="";function x(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:m,column:g,length:s,return:""}}function E(e,t){return s(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function _(){return v=b>0?l(w,--b):0,g--,10===v&&(g=1,m--),v}function k(){return v=b<y?l(w,b++):0,g++,10===v&&(g=1,m++),v}function S(){return l(w,b)}function I(){return b}function C(e,t){return d(w,e,t)}function T(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function A(e){return m=g=1,y=f(w=e),b=0,[]}function P(e){return w="",e}function O(e){return a(C(b-1,R(91===e?e+2:40===e?e+1:e)))}function j(e){for(;(v=S())&&v<33;)k();return T(e)>2||T(v)>3?"":" "}function M(e,t){for(;--t&&k()&&!(v<48||v>102||v>57&&v<65||v>70&&v<97););return C(e,I()+(t<6&&32==S()&&32==k()))}function R(e){for(;k();)switch(v){case e:return b;case 34:case 39:34!==e&&39!==e&&R(v);break;case 40:41===e&&R(e);break;case 92:k()}return b}function B(e,t){for(;k()&&e+v!==57&&(e+v!==84||47!==S()););return"/*"+C(t,b-1)+"*"+i(47===e?e:k())}function N(e){for(;!T(S());)k();return C(e,b)}var L="-ms-",U="-moz-",D="-webkit-",F="comm",z="rule",$="decl",q="@keyframes";function Z(e,t){for(var n="",r=h(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function H(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case $:return e.return=e.return||e.value;case F:return"";case q:return e.return=e.value+"{"+Z(e.children,r)+"}";case z:e.value=e.props.join(",")}return f(n=Z(e.children,r))?e.return=e.value+"{"+n+"}":""}function W(e){return P(G("",null,null,null,[""],e=A(e),0,[0],e))}function G(e,t,n,r,o,s,a,d,h){for(var m=0,g=0,y=a,b=0,v=0,w=0,x=1,E=1,C=1,T=0,A="",P=o,R=s,L=r,U=A;E;)switch(w=T,T=k()){case 40:if(108!=w&&58==l(U,y-1)){-1!=u(U+=c(O(T),"&","&\f"),"&\f")&&(C=-1);break}case 34:case 39:case 91:U+=O(T);break;case 9:case 10:case 13:case 32:U+=j(w);break;case 92:U+=M(I()-1,7);continue;case 47:switch(S()){case 42:case 47:p(V(B(k(),I()),t,n),h);break;default:U+="/"}break;case 123*x:d[m++]=f(U)*C;case 125*x:case 59:case 0:switch(T){case 0:case 125:E=0;case 59+g:-1==C&&(U=c(U,/\f/g,"")),v>0&&f(U)-y&&p(v>32?X(U+";",r,n,y-1):X(c(U," ","")+";",r,n,y-2),h);break;case 59:U+=";";default:if(p(L=K(U,t,n,m,g,o,d,A,P=[],R=[],y),s),123===T)if(0===g)G(U,t,L,L,P,s,y,d,R);else switch(99===b&&110===l(U,3)?100:b){case 100:case 108:case 109:case 115:G(e,L,L,r&&p(K(e,L,L,0,0,o,d,A,o,P=[],y),R),o,R,y,d,r?P:R);break;default:G(U,L,L,L,[""],R,0,d,R)}}m=g=v=0,x=C=1,A=U="",y=a;break;case 58:y=1+f(U),v=w;default:if(x<1)if(123==T)--x;else if(125==T&&0==x++&&125==_())continue;switch(U+=i(T),T*x){case 38:C=g>0?1:(U+="\f",-1);break;case 44:d[m++]=(f(U)-1)*C,C=1;break;case 64:45===S()&&(U+=O(k())),b=S(),g=y=f(A=U+=N(I())),T++;break;case 45:45===w&&2==f(U)&&(x=0)}}return s}function K(e,t,n,r,i,s,u,l,f,p,m){for(var g=i-1,y=0===i?s:[""],b=h(y),v=0,w=0,E=0;v<r;++v)for(var _=0,k=d(e,g+1,g=o(w=u[v])),S=e;_<b;++_)(S=a(w>0?y[_]+" "+k:c(k,/&\f/g,y[_])))&&(f[E++]=S);return x(e,t,n,0===i?z:l,f,p,m)}function V(e,t,n){return x(e,t,n,F,i(v),d(e,2,-2),0)}function X(e,t,n,r){return x(e,t,n,$,d(e,0,r),d(e,r+1,-1),r)}var Y=function(e,t,n){for(var r=0,o=0;r=o,o=S(),38===r&&12===o&&(t[n]=1),!T(o);)k();return C(e,b)},J=function(e,t){return P(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===S()&&(t[n]=1),e[n]+=Y(b-1,t,n);break;case 2:e[n]+=O(r);break;case 4:if(44===r){e[++n]=58===S()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=k());return e}(A(e),t))},Q=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var o=[],i=J(t,o),s=n.props,a=0,c=0;a<i.length;a++)for(var u=0;u<s.length;u++,c++)e.props[c]=o[a]?i[a].replace(/&\f/g,s[u]):s[u]+" "+i[a]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^l(e,0)?(((t<<2^l(e,0))<<2^l(e,1))<<2^l(e,2))<<2^l(e,3):0}(e,t)){case 5103:return"-webkit-print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return D+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return D+e+U+e+L+e+e;case 6828:case 4268:return D+e+L+e+e;case 6165:return D+e+L+"flex-"+e+e;case 5187:return D+e+c(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return D+e+L+"flex-item-"+c(e,/flex-|-self/,"")+e;case 4675:return D+e+L+"flex-line-pack"+c(e,/align-content|flex-|-self/,"")+e;case 5548:return D+e+L+c(e,"shrink","negative")+e;case 5292:return D+e+L+c(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+c(e,"-grow","")+D+e+L+c(e,"grow","positive")+e;case 4554:return D+c(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return c(c(c(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return c(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return c(c(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+D+e+e;case 4095:case 3583:case 4068:case 2532:return c(e,/(.+)-inline(.+)/,"-webkit-$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(f(e)-1-t>6)switch(l(e,t+1)){case 109:if(45!==l(e,t+4))break;case 102:return c(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==l(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?ne(c(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==l(e,t+1))break;case 6444:switch(l(e,f(e)-3-(~u(e,"!important")&&10))){case 107:return c(e,":",":-webkit-")+e;case 101:return c(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===l(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(l(e,t+11)){case 114:return D+e+L+c(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return D+e+L+c(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return D+e+L+c(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return D+e+L+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case $:e.return=ne(e.value,e.length);break;case q:return Z([E(e,{value:c(e.value,"@","@-webkit-")})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Z([E(e,{props:[c(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Z([E(e,{props:[c(t,/:(plac\w+)/,":-webkit-input-$1")]}),E(e,{props:[c(t,/:(plac\w+)/,":-moz-$1")]}),E(e,{props:[c(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||re;var i,s,a={},c=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;c.push(e)}));var u,l,d=[H,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],f=function(e){var t=h(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}([ee,te].concat(o,d));s=function(e,t,n,r){u=n,Z(W(e?e+"{"+t.styles+"}":t.styles),f),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:s};return p.sheet.hydrate(c),p}},45042:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return r}})},75260:function(e,t,n){"use strict";n.d(t,{T:function(){return c},i:function(){return i},w:function(){return a}});var r=n(67294),o=n(8417),i=(n(48137),n(27278),!0),s=r.createContext("undefined"!==typeof HTMLElement?(0,o.Z)({key:"css"}):null);s.Provider;var a=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(s);return e(t,o,n)}))};i||(a=function(e){return function(t){var n=(0,r.useContext)(s);return null===n?(n=(0,o.Z)({key:"css"}),r.createElement(s.Provider,{value:n},e(t,n))):e(t,n)}});var c=r.createContext({})},70917:function(e,t,n){"use strict";n.d(t,{F4:function(){return l},iv:function(){return u},xB:function(){return c}});var r=n(75260),o=n(67294),i=n(70444),s=n(27278),a=n(48137),c=(n(8417),n(8679),(0,r.w)((function(e,t){var n=e.styles,c=(0,a.O)([n],void 0,o.useContext(r.T));if(!r.i){for(var u,l=c.name,d=c.styles,f=c.next;void 0!==f;)l+=" "+f.name,d+=f.styles,f=f.next;var h=!0===t.compat,p=t.insert("",{name:l,styles:d},t.sheet,h);return h?null:o.createElement("style",((u={})["data-emotion"]=t.key+"-global "+l,u.dangerouslySetInnerHTML={__html:p},u.nonce=t.sheet.nonce,u))}var m=o.useRef();return(0,s.j)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,o=document.querySelector('style[data-emotion="'+e+" "+c.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),m.current=[n,r],function(){n.flush()}}),[t]),(0,s.j)((function(){var e=m.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==c.next&&(0,i.My)(t,c.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",c,n,!1)}}),[t,c.name]),null})));function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.O)(t)}var l=function(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},48137:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(45042),i=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=(0,o.Z)((function(e){return a(e)?e:e.replace(i,"-$&").toLowerCase()})),l=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||a(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)f={name:r.name,styles:r.styles,next:f},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=d(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!==typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":c(s)&&(r+=u(i)+":"+l(i,s)+";");else if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=d(e,t,s);switch(i){case"animation":case"animationName":r+=u(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var f=0;f<s.length;f++)c(s[f])&&(r+=u(i)+":"+l(i,s[f])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=f,i=n(e);return f=o,d(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var f,h=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var p=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";f=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=d(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=d(n,t,e[s]),r&&(o+=i[s]);h.lastIndex=0;for(var a,c="";null!==(a=h.exec(o));)c+="-"+a[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:u,styles:o,next:f}}},16829:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(87462),o=n(67294),i=n(45042),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,a=(0,i.Z)((function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),c=n(75260),u=n(70444),l=n(48137),d=n(27278),f=a,h=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?f:h},m=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,u.hC)(t,n,r),(0,d.L)((function(){return(0,u.My)(t,n,r)})),null},y=function e(t,n){var i,s,a=t.__emotion_real===t,d=a&&t.__emotion_base||t;void 0!==n&&(i=n.label,s=n.target);var f=m(t,n,a),h=f||p(d),y=!h("as");return function(){var b=arguments,v=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&v.push("label:"+i+";"),null==b[0]||void 0===b[0].raw)v.push.apply(v,b);else{0,v.push(b[0][0]);for(var w=b.length,x=1;x<w;x++)v.push(b[x],b[0][x])}var E=(0,c.w)((function(e,t,n){var r=y&&e.as||d,i="",a=[],m=e;if(null==e.theme){for(var b in m={},e)m[b]=e[b];m.theme=o.useContext(c.T)}"string"===typeof e.className?i=(0,u.fp)(t.registered,a,e.className):null!=e.className&&(i=e.className+" ");var w=(0,l.O)(v.concat(a),t.registered,m);i+=t.key+"-"+w.name,void 0!==s&&(i+=" "+s);var x=y&&void 0===f?p(r):h,E={};for(var _ in e)y&&"as"===_||x(_)&&(E[_]=e[_]);return E.className=i,E.ref=n,o.createElement(o.Fragment,null,o.createElement(g,{cache:t,serialized:w,isStringTag:"string"===typeof r}),o.createElement(r,E))}));return E.displayName=void 0!==i?i:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",E.defaultProps=t.defaultProps,E.__emotion_real=E,E.__emotion_base=d,E.__emotion_styles=v,E.__emotion_forwardProp=f,Object.defineProperty(E,"toString",{value:function(){return"."+s}}),E.withComponent=function(t,o){return e(t,(0,r.Z)({},n,o,{shouldForwardProp:m(E,o,!0)})).apply(void 0,v)},E}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){y[e]=y(e)}))},27278:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return s},j:function(){return a}});var o=n(67294),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,s=i||function(e){return e()},a=i||o.useLayoutEffect},70444:function(e,t,n){"use strict";n.d(t,{My:function(){return i},fp:function(){return r},hC:function(){return o}});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},18356:function(e,t,n){"use strict";n.d(t,{Kn:function(){return m},UJ:function(){return g}});var r=n(16441),o=n(13550),i=n.n(o),s=n(1581);var a=i().BN;new s.Yd("bignumber/5.7.0");var c=n(38197);const u=new s.Yd("address/5.7.0");function l(e){(0,r.A7)(e,20)||u.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let r=0;r<40;r++)n[r]=t[r].charCodeAt(0);const o=(0,r.lE)((0,c.w)(n));for(let r=0;r<40;r+=2)o[r>>1]>>4>=8&&(t[r]=t[r].toUpperCase()),(15&o[r>>1])>=8&&(t[r+1]=t[r+1].toUpperCase());return"0x"+t.join("")}const d={};for(let y=0;y<10;y++)d[String(y)]=String(y);for(let y=0;y<26;y++)d[String.fromCharCode(65+y)]=String(10+y);const f=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));var h;function p(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>d[e])).join("");for(;t.length>=f;){let e=t.substring(0,f);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}function m(e){let t=null;if("string"!==typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&u.throwArgumentError("bad icap checksum","address",e),n=e.substring(4),t=new a(n,36).toString(16);t.length<40;)t="0"+t;t=l("0x"+t)}else u.throwArgumentError("invalid address","address",e);var n;return t}function g(e){try{return m(e),!0}catch(t){}return!1}},16441:function(e,t,n){"use strict";n.d(t,{lE:function(){return c},zo:function(){return u},E1:function(){return h},p3:function(){return p},$m:function(){return m},Dv:function(){return f},A7:function(){return l},N:function(){return g}});const r=new(n(1581).Yd)("bytes/5.7.0");function o(e){return!!e.toHexString}function i(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function s(e){return"number"===typeof e&&e==e&&e%1===0}function a(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const n=e[t];if(!s(n)||n<0||n>=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),i(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),l(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":r.throwArgumentError("hex data is odd-length","value",e));const o=[];for(let e=0;e<n.length;e+=2)o.push(parseInt(n.substring(e,e+2),16));return i(new Uint8Array(o))}return a(e)?i(new Uint8Array(e)):r.throwArgumentError("invalid arrayify value","value",e)}function u(e){const t=e.map((e=>c(e))),n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);return t.reduce(((e,t)=>(r.set(t,e),e+t.length)),0),i(r)}function l(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const d="0123456789abcdef";function f(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=d[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(l(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":r.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(a(e)){let t="0x";for(let n=0;n<e.length;n++){let r=e[n];t+=d[(240&r)>>4]+d[15&r]}return t}return r.throwArgumentError("invalid hexlify value","value",e)}function h(e){if("string"!==typeof e)e=f(e);else if(!l(e)||e.length%2)return null;return(e.length-2)/2}function p(e,t,n){return"string"!==typeof e?e=f(e):(!l(e)||e.length%2)&&r.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function m(e,t){for("string"!==typeof e?e=f(e):l(e)||r.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&r.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function g(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(l(n=e)&&!(n.length%2)||a(n)){let n=c(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=f(n.slice(0,32)),t.s=f(n.slice(32,64))):65===n.length?(t.r=f(n.slice(0,32)),t.s=f(n.slice(32,64)),t.v=n[64]):r.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:r.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=f(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const n=function(e,t){(e=c(e)).length>t&&r.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(t);return n.set(e,t-e.length),i(n)}(c(t._vs),32);t._vs=f(n);const o=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&r.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;const s=f(n);null==t.s?t.s=s:t.s!==s&&r.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?r.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const n=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==n&&r.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&l(t.r)?t.r=m(t.r,32):r.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&l(t.s)?t.s=m(t.s,32):r.throwArgumentError("signature missing or invalid s","signature",e);const n=c(t.s);n[0]>=128&&r.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(n[0]|=128);const o=f(n);t._vs&&(l(t._vs)||r.throwArgumentError("signature invalid _vs","signature",e),t._vs=m(t._vs,32)),null==t._vs?t._vs=o:t._vs!==o&&r.throwArgumentError("signature _vs mismatch v and s","signature",e)}var n;return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},38197:function(e,t,n){"use strict";n.d(t,{w:function(){return s}});var r=n(91094),o=n.n(r),i=n(16441);function s(e){return"0x"+o().keccak_256((0,i.lE)(e))}},1581:function(e,t,n){"use strict";n.d(t,{Yd:function(){return f}});let r=!1,o=!1;const i={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=i.default,a=null;const c=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var u,l;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(u||(u={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(l||(l={}));const d="0123456789abcdef";class f{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();null==i[n]&&this.throwArgumentError("invalid log level name","logLevel",e),s>i[n]||console.log.apply(console,t)}debug(...e){this._log(f.levels.DEBUG,e)}info(...e){this._log(f.levels.INFO,e)}warn(...e){this._log(f.levels.WARNING,e)}makeError(e,t,n){if(o)return this.makeError("censored error",t,{});t||(t=f.errors.UNKNOWN_ERROR),n||(n={});const r=[];Object.keys(n).forEach((e=>{const t=n[e];try{if(t instanceof Uint8Array){let n="";for(let e=0;e<t.length;e++)n+=d[t[e]>>4],n+=d[15&t[e]];r.push(e+"=Uint8Array(0x"+n+")")}else r.push(e+"="+JSON.stringify(t))}catch(a){r.push(e+"="+JSON.stringify(n[e].toString()))}})),r.push(`code=${t}`),r.push(`version=${this.version}`);const i=e;let s="";switch(t){case l.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=t,Object.keys(n).forEach((function(e){a[e]=n[e]})),a}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,f.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),c&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:c})}checkSafeUint53(e,t){"number"===typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",e<t&&this.throwError("missing argument"+n,f.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+n,f.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new f("logger/5.7.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r){if(!e)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!e,r=!!t}static setLogLevel(e){const t=i[e.toLowerCase()];null!=t?s=t:f.globalLogger().warn("invalid log level - "+e)}static from(e){return new f(e)}}f.errors=l,f.levels=u},23926:function(e,t,n){"use strict";var r=n(67294),o=n(30067),i=n(73633),s=n(57094),a=n(85893);function c(e){return e.substring(2).toLowerCase()}t.Z=function(e){const{children:t,disableReactTree:n=!1,mouseEvent:u="onClick",onClickAway:l,touchEvent:d="onTouchEnd"}=e,f=r.useRef(!1),h=r.useRef(null),p=r.useRef(!1),m=r.useRef(!1);r.useEffect((()=>(setTimeout((()=>{p.current=!0}),0),()=>{p.current=!1})),[]);const g=(0,o.Z)(t.ref,h),y=(0,i.Z)((e=>{const t=m.current;m.current=!1;const r=(0,s.Z)(h.current);if(!p.current||!h.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(f.current)return void(f.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(h.current)>-1:!r.documentElement.contains(e.target)||h.current.contains(e.target),o||!n&&t||l(e)})),b=e=>n=>{m.current=!0;const r=t.props[e];r&&r(n)},v={ref:g};return!1!==d&&(v[d]=b(d)),r.useEffect((()=>{if(!1!==d){const e=c(d),t=(0,s.Z)(h.current),n=()=>{f.current=!0};return t.addEventListener(e,y),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,y),t.removeEventListener("touchmove",n)}}}),[y,d]),!1!==u&&(v[u]=b(u)),r.useEffect((()=>{if(!1!==u){const e=c(u),t=(0,s.Z)(h.current);return t.addEventListener(e,y),()=>{t.removeEventListener(e,y)}}}),[y,u]),(0,a.jsx)(r.Fragment,{children:r.cloneElement(t,v)})}},93470:function(e,t,n){"use strict";var r=n(67294),o=n(30067),i=n(57094),s=n(85893);const a=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function c(e){const t=[],n=[];return Array.from(e.querySelectorAll(a)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function u(){return!0}t.Z=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:a=!1,disableRestoreFocus:l=!1,getTabbable:d=c,isEnabled:f=u,open:h}=e,p=r.useRef(),m=r.useRef(null),g=r.useRef(null),y=r.useRef(null),b=r.useRef(null),v=r.useRef(!1),w=r.useRef(null),x=(0,o.Z)(t.ref,w),E=r.useRef(null);r.useEffect((()=>{h&&w.current&&(v.current=!n)}),[n,h]),r.useEffect((()=>{if(!h||!w.current)return;const e=(0,i.Z)(w.current);return w.current.contains(e.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex",-1),v.current&&w.current.focus()),()=>{l||(y.current&&y.current.focus&&(p.current=!0,y.current.focus()),y.current=null)}}),[h]),r.useEffect((()=>{if(!h||!w.current)return;const e=(0,i.Z)(w.current),t=t=>{const{current:n}=w;if(null!==n)if(e.hasFocus()&&!a&&f()&&!p.current){if(!n.contains(e.activeElement)){if(t&&b.current!==t.target||e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!v.current)return;let i=[];if(e.activeElement!==m.current&&e.activeElement!==g.current||(i=d(w.current)),i.length>0){var r,o;const e=Boolean((null==(r=E.current)?void 0:r.shiftKey)&&"Tab"===(null==(o=E.current)?void 0:o.key)),t=i[0],n=i[i.length-1];e?n.focus():t.focus()}else n.focus()}}else p.current=!1},n=t=>{E.current=t,!a&&f()&&"Tab"===t.key&&e.activeElement===w.current&&t.shiftKey&&(p.current=!0,g.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",n,!0);const r=setInterval((()=>{"BODY"===e.activeElement.tagName&&t()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",t),e.removeEventListener("keydown",n,!0)}}),[n,a,l,f,h,d]);const _=e=>{null===y.current&&(y.current=e.relatedTarget),v.current=!0};return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{tabIndex:h?0:-1,onFocus:_,ref:m,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:x,onFocus:e=>{null===y.current&&(y.current=e.relatedTarget),v.current=!0,b.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,s.jsx)("div",{tabIndex:h?0:-1,onFocus:_,ref:g,"data-testid":"sentinelEnd"})]})}},78385:function(e,t,n){"use strict";var r=n(67294),o=n(73935),i=n(30067),s=n(16600),a=n(7960),c=n(85893);const u=r.forwardRef((function(e,t){const{children:n,container:u,disablePortal:l=!1}=e,[d,f]=r.useState(null),h=(0,i.Z)(r.isValidElement(n)?n.ref:null,t);return(0,s.Z)((()=>{l||f(function(e){return"function"===typeof e?e():e}(u)||document.body)}),[u,l]),(0,s.Z)((()=>{if(d&&!l)return(0,a.Z)(t,d),()=>{(0,a.Z)(t,null)}}),[t,d,l]),l?r.isValidElement(n)?r.cloneElement(n,{ref:h}):n:(0,c.jsx)(r.Fragment,{children:d?o.createPortal(n,d):d})}));t.Z=u},10238:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(87462),o=n(28442);function i(e,t,n){return(0,o.Z)(e)?t:(0,r.Z)({},t,{ownerState:(0,r.Z)({},t.ownerState,n)})}},28442:function(e,t){"use strict";t.Z=function(e){return"string"===typeof e}},71276:function(e,t,n){"use strict";function r(e,t){return"function"===typeof e?e(t):e}n.d(t,{Z:function(){return r}})},18793:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(87462),o=n(63366),i=n(30067),s=n(10238),a=n(86010);function c(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function u(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:i,className:s}=e;if(!t){const e=(0,a.default)(null==i?void 0:i.className,null==o?void 0:o.className,s,null==n?void 0:n.className),t=(0,r.Z)({},null==n?void 0:n.style,null==i?void 0:i.style,null==o?void 0:o.style),c=(0,r.Z)({},n,i,o);return e.length>0&&(c.className=e),Object.keys(t).length>0&&(c.style=t),{props:c,internalRef:void 0}}const u=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}((0,r.Z)({},i,o)),l=c(o),d=c(i),f=t(u),h=(0,a.default)(null==f?void 0:f.className,null==n?void 0:n.className,s,null==i?void 0:i.className,null==o?void 0:o.className),p=(0,r.Z)({},null==f?void 0:f.style,null==n?void 0:n.style,null==i?void 0:i.style,null==o?void 0:o.style),m=(0,r.Z)({},f,n,d,l);return h.length>0&&(m.className=h),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:f.ref}}var l=n(71276);const d=["elementType","externalSlotProps","ownerState"];function f(e){var t;const{elementType:n,externalSlotProps:a,ownerState:c}=e,f=(0,o.Z)(e,d),h=(0,l.Z)(a,c),{props:p,internalRef:m}=u((0,r.Z)({},f,{externalSlotProps:h})),g=(0,i.Z)(m,null==h?void 0:h.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,s.Z)(n,(0,r.Z)({},p,{ref:g}),c)}},13379:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");t.Z=s},99879:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"}),"Brightness4");t.Z=s},57289:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}),"Brightness7");t.Z=s},50594:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=s},23508:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=s},75503:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");t.Z=s},90813:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");t.Z=s},326:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),s=(0,o.default)((0,i.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");t.Z=s},64938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(58075)},74065:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(63366),o=n(87462),i=n(67294),s=(n(76607),n(86010)),a=n(94780),c=n(81719),u=n(78884),l=n(98885),d=n(53204),f=n(53566),h=n(62097),p=n(84771),m=n(1588),g=n(34867);function y(e){return(0,g.Z)("MuiCollapse",e)}(0,m.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=n(85893);const v=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=(0,c.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((({theme:e,ownerState:t})=>(0,o.Z)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===t.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===t.state&&(0,o.Z)({height:"auto",overflow:"visible"},"horizontal"===t.orientation&&{width:"auto"}),"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&{visibility:"hidden"}))),x=(0,c.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((({ownerState:e})=>(0,o.Z)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"}))),E=(0,c.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((({ownerState:e})=>(0,o.Z)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"}))),_=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiCollapse"}),{addEndListener:c,children:m,className:g,collapsedSize:_="0px",component:k,easing:S,in:I,onEnter:C,onEntered:T,onEntering:A,onExit:P,onExited:O,onExiting:j,orientation:M="vertical",style:R,timeout:B=d.x9.standard,TransitionComponent:N=l.ZP}=n,L=(0,r.Z)(n,v),U=(0,o.Z)({},n,{orientation:M,collapsedSize:_}),D=(e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,a.Z)(r,y,n)})(U),F=(0,h.Z)(),z=i.useRef(),$=i.useRef(null),q=i.useRef(),Z="number"===typeof _?`${_}px`:_,H="horizontal"===M,W=H?"width":"height";i.useEffect((()=>()=>{clearTimeout(z.current)}),[]);const G=i.useRef(null),K=(0,p.Z)(t,G),V=e=>t=>{if(e){const n=G.current;void 0===t?e(n):e(n,t)}},X=()=>$.current?$.current[H?"clientWidth":"clientHeight"]:0,Y=V(((e,t)=>{$.current&&H&&($.current.style.position="absolute"),e.style[W]=Z,C&&C(e,t)})),J=V(((e,t)=>{const n=X();$.current&&H&&($.current.style.position="");const{duration:r,easing:o}=(0,f.C)({style:R,timeout:B,easing:S},{mode:"enter"});if("auto"===B){const t=F.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,q.current=t}else e.style.transitionDuration="string"===typeof r?r:`${r}ms`;e.style[W]=`${n}px`,e.style.transitionTimingFunction=o,A&&A(e,t)})),Q=V(((e,t)=>{e.style[W]="auto",T&&T(e,t)})),ee=V((e=>{e.style[W]=`${X()}px`,P&&P(e)})),te=V(O),ne=V((e=>{const t=X(),{duration:n,easing:r}=(0,f.C)({style:R,timeout:B,easing:S},{mode:"exit"});if("auto"===B){const n=F.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,q.current=n}else e.style.transitionDuration="string"===typeof n?n:`${n}ms`;e.style[W]=Z,e.style.transitionTimingFunction=r,j&&j(e)}));return(0,b.jsx)(N,(0,o.Z)({in:I,onEnter:Y,onEntered:Q,onEntering:J,onExit:ee,onExited:te,onExiting:ne,addEndListener:e=>{"auto"===B&&(z.current=setTimeout(e,q.current||0)),c&&c(G.current,e)},nodeRef:G,timeout:"auto"===B?null:B},L,{children:(e,t)=>(0,b.jsx)(w,(0,o.Z)({as:k,className:(0,s.default)(D.root,g,{entered:D.entered,exited:!I&&"0px"===Z&&D.hidden}[e]),style:(0,o.Z)({[H?"minWidth":"minHeight"]:Z},R),ownerState:(0,o.Z)({},U,{state:e}),ref:K},t,{children:(0,b.jsx)(x,{ownerState:(0,o.Z)({},U,{state:e}),className:D.wrapper,ref:$,children:(0,b.jsx)(E,{ownerState:(0,o.Z)({},U,{state:e}),className:D.wrapperInner,children:m})})}))}))}));_.muiSupportAuto=!0;var k=_,S=n(70918),I=n(42248),C=n(42293);function T(e){return(0,g.Z)("MuiAccordion",e)}var A=(0,m.Z)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]);const P=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","TransitionComponent","TransitionProps"],O=(0,c.ZP)(S.Z,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${A.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&:before":{display:"none"}},[`&.${A.expanded}`]:{"&:before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&:before":{display:"none"}}},[`&.${A.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),(({theme:e,ownerState:t})=>(0,o.Z)({},!t.square&&{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},!t.disableGutters&&{[`&.${A.expanded}`]:{margin:"16px 0"}})));var j=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiAccordion"}),{children:c,className:l,defaultExpanded:d=!1,disabled:f=!1,disableGutters:h=!1,expanded:p,onChange:m,square:g=!1,TransitionComponent:y=k,TransitionProps:v}=n,w=(0,r.Z)(n,P),[x,E]=(0,C.Z)({controlled:p,default:d,name:"Accordion",state:"expanded"}),_=i.useCallback((e=>{E(!x),m&&m(e,!x)}),[x,m,E]),[S,...A]=i.Children.toArray(c),j=i.useMemo((()=>({expanded:x,disabled:f,disableGutters:h,toggle:_})),[x,f,h,_]),M=(0,o.Z)({},n,{square:g,disabled:f,disableGutters:h,expanded:x}),R=(e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e,s={root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],region:["region"]};return(0,a.Z)(s,T,t)})(M);return(0,b.jsxs)(O,(0,o.Z)({className:(0,s.default)(R.root,l),ref:t,ownerState:M,square:g},w,{children:[(0,b.jsx)(I.Z.Provider,{value:j,children:S}),(0,b.jsx)(y,(0,o.Z)({in:x,timeout:"auto"},v,{children:(0,b.jsx)("div",{"aria-labelledby":S.props.id,id:S.props["aria-controls"],role:"region",className:R.region,children:A})}))]}))}))},42248:function(e,t,n){"use strict";const r=n(67294).createContext({});t.Z=r},47028:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(87462),o=n(63366),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(1588),d=n(34867);function f(e){return(0,d.Z)("MuiAccordionDetails",e)}(0,l.Z)("MuiAccordionDetails",["root"]);var h=n(85893);const p=["className"],m=(0,c.ZP)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({padding:e.spacing(1,2,2)})));var g=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiAccordionDetails"}),{className:i}=n,c=(0,o.Z)(n,p),l=n,d=(e=>{const{classes:t}=e;return(0,a.Z)({root:["root"]},f,t)})(l);return(0,h.jsx)(m,(0,r.Z)({className:(0,s.default)(d.root,i),ref:t,ownerState:l},c))}))},29618:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(50522),d=n(42248),f=n(1588),h=n(34867);function p(e){return(0,h.Z)("MuiAccordionSummary",e)}var m=(0,f.Z)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),g=n(85893);const y=["children","className","expandIcon","focusVisibleClassName","onClick"],b=(0,c.ZP)(l.Z,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>{const n={duration:e.transitions.duration.shortest};return(0,o.Z)({display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],n),[`&.${m.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${m.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${m.disabled})`]:{cursor:"pointer"}},!t.disableGutters&&{[`&.${m.expanded}`]:{minHeight:64}})})),v=(0,c.ZP)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((({theme:e,ownerState:t})=>(0,o.Z)({display:"flex",flexGrow:1,margin:"12px 0"},!t.disableGutters&&{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${m.expanded}`]:{margin:"20px 0"}}))),w=(0,c.ZP)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${m.expanded}`]:{transform:"rotate(180deg)"}})));var x=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiAccordionSummary"}),{children:c,className:l,expandIcon:f,focusVisibleClassName:h,onClick:m}=n,x=(0,r.Z)(n,y),{disabled:E=!1,disableGutters:_,expanded:k,toggle:S}=i.useContext(d.Z),I=(0,o.Z)({},n,{expanded:k,disabled:E,disableGutters:_}),C=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e,i={root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,a.Z)(i,p,t)})(I);return(0,g.jsxs)(b,(0,o.Z)({focusRipple:!1,disableRipple:!0,disabled:E,component:"div","aria-expanded":k,className:(0,s.default)(C.root,l),focusVisibleClassName:(0,s.default)(C.focusVisible,h),onClick:e=>{S&&S(e),m&&m(e)},ref:t,ownerState:I},x,{children:[(0,g.jsx)(v,{className:C.content,ownerState:I,children:c}),f&&(0,g.jsx)(w,{className:C.expandIconWrapper,ownerState:I,children:f})]}))}))},19604:function(e,t,n){"use strict";n.d(t,{Z:function(){return O}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(41796),u=n(81719),l=n(78884),d=n(36622),f=n(70918),h=n(1588),p=n(34867);function m(e){return(0,p.Z)("MuiAlert",e)}var g=(0,h.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),y=n(80562),b=n(58175),v=n(85893),w=(0,b.Z)((0,v.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),x=(0,b.Z)((0,v.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),E=(0,b.Z)((0,v.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),_=(0,b.Z)((0,v.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),k=n(96903);const S=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],I=(0,u.ZP)(f.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,d.Z)(n.color||n.severity)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?c._j:c.$n,r="light"===e.palette.mode?c.$n:c._j,i=t.color||t.severity;return(0,o.Z)({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},i&&"standard"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${i}StandardBg`]:r(e.palette[i].light,.9),[`& .${g.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:"dark"===e.palette.mode?e.palette[i].main:e.palette[i].light}},i&&"outlined"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),border:`1px solid ${(e.vars||e).palette[i].light}`,[`& .${g.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:"dark"===e.palette.mode?e.palette[i].main:e.palette[i].light}},i&&"filled"===t.variant&&(0,o.Z)({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${i}FilledColor`],backgroundColor:e.vars.palette.Alert[`${i}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[i].dark:e.palette[i].main,color:e.palette.getContrastText("dark"===e.palette.mode?e.palette[i].dark:e.palette[i].main)}))})),C=(0,u.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),T=(0,u.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),A=(0,u.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),P={success:(0,v.jsx)(w,{fontSize:"inherit"}),warning:(0,v.jsx)(x,{fontSize:"inherit"}),error:(0,v.jsx)(E,{fontSize:"inherit"}),info:(0,v.jsx)(_,{fontSize:"inherit"})};var O=i.forwardRef((function(e,t){var n,i,c,u,f,h;const p=(0,l.Z)({props:e,name:"MuiAlert"}),{action:g,children:b,className:w,closeText:x="Close",color:E,components:_={},componentsProps:O={},icon:j,iconMapping:M=P,onClose:R,role:B="alert",severity:N="success",slotProps:L={},slots:U={},variant:D="standard"}=p,F=(0,r.Z)(p,S),z=(0,o.Z)({},p,{color:E,severity:N,variant:D}),$=(e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`${t}${(0,d.Z)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,a.Z)(i,m,o)})(z),q=null!=(n=null!=(i=U.closeButton)?i:_.CloseButton)?n:y.Z,Z=null!=(c=null!=(u=U.closeIcon)?u:_.CloseIcon)?c:k.Z,H=null!=(f=L.closeButton)?f:O.closeButton,W=null!=(h=L.closeIcon)?h:O.closeIcon;return(0,v.jsxs)(I,(0,o.Z)({role:B,elevation:0,ownerState:z,className:(0,s.default)($.root,w),ref:t},F,{children:[!1!==j?(0,v.jsx)(C,{ownerState:z,className:$.icon,children:j||M[N]||P[N]}):null,(0,v.jsx)(T,{ownerState:z,className:$.message,children:b}),null!=g?(0,v.jsx)(A,{ownerState:z,className:$.action,children:g}):null,null==g&&R?(0,v.jsx)(A,{ownerState:z,className:$.action,children:(0,v.jsx)(q,(0,o.Z)({size:"small","aria-label":x,title:x,color:"inherit",onClick:R},H,{children:(0,v.jsx)(Z,(0,o.Z)({fontSize:"small"},W))}))}):null]}))}))},85050:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(36622),d=n(70918),f=n(1588),h=n(34867);function p(e){return(0,h.Z)("MuiAppBar",e)}(0,f.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);var m=n(85893);const g=["className","color","enableColorOnDark","position"],y=(e,t)=>`${null==e?void 0:e.replace(")","")}, ${t})`,b=(0,c.ZP)(d.Z,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,l.Z)(n.position)}`],t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,o.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&(0,o.Z)({},"default"===t.color&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&(0,o.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,o.Z)({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:y(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:y(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:y(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:y(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}));var v=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiAppBar"}),{className:i,color:c="primary",enableColorOnDark:d=!1,position:f="fixed"}=n,h=(0,r.Z)(n,g),y=(0,o.Z)({},n,{color:c,position:f,enableColorOnDark:d}),v=(e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${(0,l.Z)(t)}`,`position${(0,l.Z)(n)}`]};return(0,a.Z)(o,p,r)})(y);return(0,m.jsx)(b,(0,o.Z)({square:!0,component:"header",ownerState:y,elevation:4,className:(0,s.default)(v.root,i,"fixed"===f&&"mui-fixed"),ref:t},h))}))},58735:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(9942),d=n(1588),f=n(34867);function h(e){return(0,f.Z)("MuiBackdrop",e)}(0,d.Z)("MuiBackdrop",["root","invisible"]);var p=n(85893);const m=["children","component","components","componentsProps","className","invisible","open","slotProps","slots","transitionDuration","TransitionComponent"],g=(0,c.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>(0,o.Z)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})));var y=i.forwardRef((function(e,t){var n,i,c;const d=(0,u.Z)({props:e,name:"MuiBackdrop"}),{children:f,component:y="div",components:b={},componentsProps:v={},className:w,invisible:x=!1,open:E,slotProps:_={},slots:k={},transitionDuration:S,TransitionComponent:I=l.Z}=d,C=(0,r.Z)(d,m),T=(0,o.Z)({},d,{component:y,invisible:x}),A=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,a.Z)(r,h,t)})(T),P=null!=(n=_.root)?n:v.root;return(0,p.jsx)(I,(0,o.Z)({in:E,timeout:S},C,{children:(0,p.jsx)(g,(0,o.Z)({"aria-hidden":!0},P,{as:null!=(i=null!=(c=k.root)?c:b.Root)?i:y,className:(0,s.default)(A.root,w,null==P?void 0:P.className),ownerState:(0,o.Z)({},T,null==P?void 0:P.ownerState),classes:A,ref:t,children:f}))}))}))},61953:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(87462),o=n(63366),i=n(67294),s=n(86010),a=n(78883),c=n(86523),u=n(39707),l=n(96682),d=n(85893);const f=["className","component"];var h=n(37078);const p=function(e={}){const{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:h,styleFunctionSx:p=c.Z}=e,m=(0,a.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(p);return i.forwardRef((function(e,i){const a=(0,l.Z)(t),c=(0,u.Z)(e),{className:p,component:g="div"}=c,y=(0,o.Z)(c,f);return(0,d.jsx)(m,(0,r.Z)({as:g,ref:i,className:(0,s.default)(p,h?h(n):n),theme:a},y))}))}({defaultTheme:(0,n(74821).Z)(),defaultClassName:"MuiBox-root",generateClassName:h.Z.generate});var m=p},75084:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(47925),c=n(94780),u=n(41796),l=n(81719),d=n(78884),f=n(50522),h=n(36622),p=n(1588),m=n(34867);function g(e){return(0,m.Z)("MuiButton",e)}var y=(0,p.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var b=i.createContext({}),v=n(85893);const w=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],x=e=>(0,o.Z)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),E=(0,l.ZP)(f.Z,{shouldForwardProp:e=>(0,l.FO)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,h.Z)(n.color)}`],t[`size${(0,h.Z)(n.size)}`],t[`${n.variant}Size${(0,h.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;return(0,o.Z)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,o.Z)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,o.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${y.focusVisible}`]:(0,o.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${y.disabled}`]:(0,o.Z)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"outlined"===t.variant&&"secondary"===t.color&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,u.Fq)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${y.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${y.disabled}`]:{boxShadow:"none"}})),_=(0,l.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,h.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},x(e)))),k=(0,l.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,h.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},x(e))));var S=i.forwardRef((function(e,t){const n=i.useContext(b),u=(0,a.Z)(n,e),l=(0,d.Z)({props:u,name:"MuiButton"}),{children:f,color:p="primary",component:m="button",className:y,disabled:x=!1,disableElevation:S=!1,disableFocusRipple:I=!1,endIcon:C,focusVisibleClassName:T,fullWidth:A=!1,size:P="medium",startIcon:O,type:j,variant:M="text"}=l,R=(0,r.Z)(l,w),B=(0,o.Z)({},l,{color:p,component:m,disabled:x,disableElevation:S,disableFocusRipple:I,fullWidth:A,size:P,type:j,variant:M}),N=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:s,classes:a}=e,u={root:["root",s,`${s}${(0,h.Z)(t)}`,`size${(0,h.Z)(i)}`,`${s}Size${(0,h.Z)(i)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${(0,h.Z)(i)}`],endIcon:["endIcon",`iconSize${(0,h.Z)(i)}`]},l=(0,c.Z)(u,g,a);return(0,o.Z)({},a,l)})(B),L=O&&(0,v.jsx)(_,{className:N.startIcon,ownerState:B,children:O}),U=C&&(0,v.jsx)(k,{className:N.endIcon,ownerState:B,children:C});return(0,v.jsxs)(E,(0,o.Z)({ownerState:B,className:(0,s.default)(n.className,N.root,y),component:m,disabled:x,focusRipple:!I,focusVisibleClassName:(0,s.default)(N.focusVisible,T),ref:t,type:j},R,{classes:N,children:[L,f,U]}))}))},50522:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(87462),o=n(63366),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(84771),d=n(26432),f=n(51625),h=n(89747),p=n(70917),m=n(85893);var g=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:a,rippleSize:c,in:u,onExited:l,timeout:d}=e,[f,h]=i.useState(!1),p=(0,s.default)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:c,height:c,top:-c/2+a,left:-c/2+o},y=(0,s.default)(n.child,f&&n.childLeaving,r&&n.childPulsate);return u||f||h(!0),i.useEffect((()=>{if(!u&&null!=l){const e=setTimeout(l,d);return()=>{clearTimeout(e)}}}),[l,u,d]),(0,m.jsx)("span",{className:p,style:g,children:(0,m.jsx)("span",{className:y})})},y=n(1588);var b=(0,y.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const v=["center","classes","className"];let w,x,E,_,k=e=>e;const S=(0,p.F4)(w||(w=k`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),I=(0,p.F4)(x||(x=k`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),C=(0,p.F4)(E||(E=k`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),T=(0,c.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),A=(0,c.ZP)(g,{name:"MuiTouchRipple",slot:"Ripple"})(_||(_=k`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),b.rippleVisible,S,550,(({theme:e})=>e.transitions.easing.easeInOut),b.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),b.child,b.childLeaving,I,550,(({theme:e})=>e.transitions.easing.easeInOut),b.childPulsate,C,(({theme:e})=>e.transitions.easing.easeInOut));var P=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiTouchRipple"}),{center:a=!1,classes:c={},className:l}=n,d=(0,o.Z)(n,v),[f,p]=i.useState([]),g=i.useRef(0),y=i.useRef(null);i.useEffect((()=>{y.current&&(y.current(),y.current=null)}),[f]);const w=i.useRef(!1),x=i.useRef(null),E=i.useRef(null),_=i.useRef(null);i.useEffect((()=>()=>{clearTimeout(x.current)}),[]);const k=i.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:i}=e;p((e=>[...e,(0,m.jsx)(A,{classes:{ripple:(0,s.default)(c.ripple,b.ripple),rippleVisible:(0,s.default)(c.rippleVisible,b.rippleVisible),ripplePulsate:(0,s.default)(c.ripplePulsate,b.ripplePulsate),child:(0,s.default)(c.child,b.child),childLeaving:(0,s.default)(c.childLeaving,b.childLeaving),childPulsate:(0,s.default)(c.childPulsate,b.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},g.current)])),g.current+=1,y.current=i}),[c]),S=i.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:o=a||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&w.current)return void(w.current=!1);"touchstart"===(null==e?void 0:e.type)&&(w.current=!0);const s=i?null:_.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,l,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(c.width/2),l=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-c.left),l=Math.round(n-c.top)}if(o)d=Math.sqrt((2*c.width**2+c.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-l),l)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===E.current&&(E.current=()=>{k({pulsate:r,rippleX:u,rippleY:l,rippleSize:d,cb:n})},x.current=setTimeout((()=>{E.current&&(E.current(),E.current=null)}),80)):k({pulsate:r,rippleX:u,rippleY:l,rippleSize:d,cb:n})}),[a,k]),I=i.useCallback((()=>{S({},{pulsate:!0})}),[S]),C=i.useCallback(((e,t)=>{if(clearTimeout(x.current),"touchend"===(null==e?void 0:e.type)&&E.current)return E.current(),E.current=null,void(x.current=setTimeout((()=>{C(e,t)})));E.current=null,p((e=>e.length>0?e.slice(1):e)),y.current=t}),[]);return i.useImperativeHandle(t,(()=>({pulsate:I,start:S,stop:C})),[I,S,C]),(0,m.jsx)(T,(0,r.Z)({className:(0,s.default)(b.root,c.root,l),ref:_},d,{children:(0,m.jsx)(h.Z,{component:null,exit:!0,children:f})}))})),O=n(34867);function j(e){return(0,O.Z)("MuiButtonBase",e)}var M=(0,y.Z)("MuiButtonBase",["root","disabled","focusVisible"]);const R=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],B=(0,c.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${M.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var N=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiButtonBase"}),{action:c,centerRipple:h=!1,children:p,className:g,component:y="button",disabled:b=!1,disableRipple:v=!1,disableTouchRipple:w=!1,focusRipple:x=!1,LinkComponent:E="a",onBlur:_,onClick:k,onContextMenu:S,onDragLeave:I,onFocus:C,onFocusVisible:T,onKeyDown:A,onKeyUp:O,onMouseDown:M,onMouseLeave:N,onMouseUp:L,onTouchEnd:U,onTouchMove:D,onTouchStart:F,tabIndex:z=0,TouchRippleProps:$,touchRippleRef:q,type:Z}=n,H=(0,o.Z)(n,R),W=i.useRef(null),G=i.useRef(null),K=(0,l.Z)(G,q),{isFocusVisibleRef:V,onFocus:X,onBlur:Y,ref:J}=(0,f.Z)(),[Q,ee]=i.useState(!1);b&&Q&&ee(!1),i.useImperativeHandle(c,(()=>({focusVisible:()=>{ee(!0),W.current.focus()}})),[]);const[te,ne]=i.useState(!1);i.useEffect((()=>{ne(!0)}),[]);const re=te&&!v&&!b;function oe(e,t,n=w){return(0,d.Z)((r=>{t&&t(r);return!n&&G.current&&G.current[e](r),!0}))}i.useEffect((()=>{Q&&x&&!v&&te&&G.current.pulsate()}),[v,x,Q,te]);const ie=oe("start",M),se=oe("stop",S),ae=oe("stop",I),ce=oe("stop",L),ue=oe("stop",(e=>{Q&&e.preventDefault(),N&&N(e)})),le=oe("start",F),de=oe("stop",U),fe=oe("stop",D),he=oe("stop",(e=>{Y(e),!1===V.current&&ee(!1),_&&_(e)}),!1),pe=(0,d.Z)((e=>{W.current||(W.current=e.currentTarget),X(e),!0===V.current&&(ee(!0),T&&T(e)),C&&C(e)})),me=()=>{const e=W.current;return y&&"button"!==y&&!("A"===e.tagName&&e.href)},ge=i.useRef(!1),ye=(0,d.Z)((e=>{x&&!ge.current&&Q&&G.current&&" "===e.key&&(ge.current=!0,G.current.stop(e,(()=>{G.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),A&&A(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!b&&(e.preventDefault(),k&&k(e))})),be=(0,d.Z)((e=>{x&&" "===e.key&&G.current&&Q&&!e.defaultPrevented&&(ge.current=!1,G.current.stop(e,(()=>{G.current.pulsate(e)}))),O&&O(e),k&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&k(e)}));let ve=y;"button"===ve&&(H.href||H.to)&&(ve=E);const we={};"button"===ve?(we.type=void 0===Z?"button":Z,we.disabled=b):(H.href||H.to||(we.role="button"),b&&(we["aria-disabled"]=b));const xe=(0,l.Z)(t,J,W);const Ee=(0,r.Z)({},n,{centerRipple:h,component:y,disabled:b,disableRipple:v,disableTouchRipple:w,focusRipple:x,tabIndex:z,focusVisible:Q}),_e=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i={root:["root",t&&"disabled",n&&"focusVisible"]},s=(0,a.Z)(i,j,o);return n&&r&&(s.root+=` ${r}`),s})(Ee);return(0,m.jsxs)(B,(0,r.Z)({as:ve,className:(0,s.default)(_e.root,g),ownerState:Ee,onBlur:he,onClick:k,onContextMenu:se,onFocus:pe,onKeyDown:ye,onKeyUp:be,onMouseDown:ie,onMouseLeave:ue,onMouseUp:ce,onDragLeave:ae,onTouchEnd:de,onTouchMove:fe,onTouchStart:le,ref:xe,tabIndex:b?-1:z,type:Z},we,H,{children:[p,re?(0,m.jsx)(P,(0,r.Z)({ref:K,center:h},$)):null]}))}))},36336:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(28320),c=n(34867),u=n(94780),l=n(65149);var d=(0,n(70182).ZP)(),f=n(66500),h=n(85893);const p=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,f.Z)(),g=d("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,a.Z)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),y=e=>(0,l.Z)({props:e,name:"MuiContainer",defaultTheme:m});var b=n(36622),v=n(81719),w=n(78884);const x=function(e={}){const{createStyledComponent:t=g,useThemeProps:n=y,componentName:l="MuiContainer"}=e,d=t((({theme:e,ownerState:t})=>(0,o.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}})),(({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce(((t,n)=>{const r=n,o=e.breakpoints.values[r];return 0!==o&&(t[e.breakpoints.up(r)]={maxWidth:`${o}${e.breakpoints.unit}`}),t}),{})),(({theme:e,ownerState:t})=>(0,o.Z)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}))),f=i.forwardRef((function(e,t){const i=n(e),{className:f,component:m="div",disableGutters:g=!1,fixed:y=!1,maxWidth:b="lg"}=i,v=(0,r.Z)(i,p),w=(0,o.Z)({},i,{component:m,disableGutters:g,fixed:y,maxWidth:b}),x=((e,t)=>{const{classes:n,fixed:r,disableGutters:o,maxWidth:i}=e,s={root:["root",i&&`maxWidth${(0,a.Z)(String(i))}`,r&&"fixed",o&&"disableGutters"]};return(0,u.Z)(s,(e=>(0,c.Z)(t,e)),n)})(w,l);return(0,h.jsx)(d,(0,o.Z)({as:m,ownerState:w,className:(0,s.default)(x.root,f),ref:t},v))}));return f}({createStyledComponent:(0,v.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,b.Z)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,w.Z)({props:e,name:"MuiContainer"})});var E=x},40793:function(e,t,n){"use strict";var r=n(87462),o=n(67294),i=n(78884),s=n(43918),a=n(85893);const c=(e,t)=>(0,r.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),u=e=>(0,r.Z)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});t.ZP=function(e){const t=(0,i.Z)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:l=!1}=t;return(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(s.Z,{styles:e=>((e,t=!1)=>{var n,o;const i={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((([t,n])=>{var r;i[e.getColorSchemeSelector(t).replace(/\s*&/,"")]={colorScheme:null==(r=n.palette)?void 0:r.mode}}));let s=(0,r.Z)({html:c(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,r.Z)({margin:0},u(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},i);const a=null==(n=e.components)||null==(o=n.MuiCssBaseline)?void 0:o.styleOverrides;return a&&(s=[s,a]),s})(e,l)}),n]})}},29620:function(e,t,n){"use strict";var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(57579),u=n(36622),l=n(92096),d=n(9942),f=n(70918),h=n(78884),p=n(81719),m=n(26069),g=n(15156),y=n(58735),b=n(62097),v=n(85893);const w=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],x=(0,p.ZP)(y.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),E=(0,p.ZP)(l.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),_=(0,p.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,u.Z)(n.scroll)}`]]}})((({ownerState:e})=>(0,o.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),k=(0,p.ZP)(f.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,u.Z)(n.scroll)}`],t[`paperWidth${(0,u.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>(0,o.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${m.Z.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${m.Z.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.Z.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),S=i.forwardRef((function(e,t){const n=(0,h.Z)({props:e,name:"MuiDialog"}),l=(0,b.Z)(),p={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":y,"aria-labelledby":S,BackdropComponent:I,BackdropProps:C,children:T,className:A,disableEscapeKeyDown:P=!1,fullScreen:O=!1,fullWidth:j=!1,maxWidth:M="sm",onBackdropClick:R,onClose:B,open:N,PaperComponent:L=f.Z,PaperProps:U={},scroll:D="paper",TransitionComponent:F=d.Z,transitionDuration:z=p,TransitionProps:$}=n,q=(0,r.Z)(n,w),Z=(0,o.Z)({},n,{disableEscapeKeyDown:P,fullScreen:O,fullWidth:j,maxWidth:M,scroll:D}),H=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,s={root:["root"],container:["container",`scroll${(0,u.Z)(n)}`],paper:["paper",`paperScroll${(0,u.Z)(n)}`,`paperWidth${(0,u.Z)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,a.Z)(s,m.D,t)})(Z),W=i.useRef(),G=(0,c.Z)(S),K=i.useMemo((()=>({titleId:G})),[G]);return(0,v.jsx)(E,(0,o.Z)({className:(0,s.default)(H.root,A),closeAfterTransition:!0,components:{Backdrop:x},componentsProps:{backdrop:(0,o.Z)({transitionDuration:z,as:I},C)},disableEscapeKeyDown:P,onClose:B,open:N,ref:t,onClick:e=>{W.current&&(W.current=null,R&&R(e),B&&B(e,"backdropClick"))},ownerState:Z},q,{children:(0,v.jsx)(F,(0,o.Z)({appear:!0,in:N,timeout:z,role:"presentation"},$,{children:(0,v.jsx)(_,{className:(0,s.default)(H.container),onMouseDown:e=>{W.current=e.target===e.currentTarget},ownerState:Z,children:(0,v.jsx)(k,(0,o.Z)({as:L,elevation:24,role:"dialog","aria-describedby":y,"aria-labelledby":G},U,{className:(0,s.default)(H.paper,U.className),ownerState:Z,children:(0,v.jsx)(g.Z.Provider,{value:K,children:T})}))})}))}))}));t.Z=S},15156:function(e,t,n){"use strict";const r=(0,n(67294).createContext)({});t.Z=r},26069:function(e,t,n){"use strict";n.d(t,{D:function(){return i}});var r=n(1588),o=n(34867);function i(e){return(0,o.Z)("MuiDialog",e)}const s=(0,r.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);t.Z=s},76779:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(1588),d=n(34867);function f(e){return(0,d.Z)("MuiDialogActions",e)}(0,l.Z)("MuiDialogActions",["root","spacing"]);var h=n(85893);const p=["className","disableSpacing"],m=(0,c.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>(0,o.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})));var g=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:c=!1}=n,l=(0,r.Z)(n,p),d=(0,o.Z)({},n,{disableSpacing:c}),g=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,a.Z)(r,f,t)})(d);return(0,h.jsx)(m,(0,o.Z)({className:(0,s.default)(g.root,i),ownerState:d,ref:t},l))}))},95398:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(1588),d=n(34867);function f(e){return(0,d.Z)("MuiDialogContent",e)}(0,l.Z)("MuiDialogContent",["root","dividers"]);var h=n(32941),p=n(85893);const m=["className","dividers"],g=(0,c.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>(0,o.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${h.Z.root} + &`]:{paddingTop:0}})));var y=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiDialogContent"}),{className:i,dividers:c=!1}=n,l=(0,r.Z)(n,m),d=(0,o.Z)({},n,{dividers:c}),h=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,a.Z)(r,f,t)})(d);return(0,p.jsx)(g,(0,o.Z)({className:(0,s.default)(h.root,i),ownerState:d,ref:t},l))}))},77745:function(e,t,n){"use strict";var r=n(87462),o=n(63366),i=n(67294),s=n(86010),a=n(94780),c=n(29630),u=n(81719),l=n(78884),d=n(32941),f=n(15156),h=n(85893);const p=["className","id"],m=(0,u.ZP)(c.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),g=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiDialogTitle"}),{className:c,id:u}=n,g=(0,o.Z)(n,p),y=n,b=(e=>{const{classes:t}=e;return(0,a.Z)({root:["root"]},d.a,t)})(y),{titleId:v=u}=i.useContext(f.Z);return(0,h.jsx)(m,(0,r.Z)({component:"h2",className:(0,s.default)(b.root,c),ownerState:y,ref:t,variant:"h6",id:v},g))}));t.Z=g},32941:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(1588),o=n(34867);function i(e){return(0,o.Z)("MuiDialogTitle",e)}const s=(0,r.Z)("MuiDialogTitle",["root"]);t.Z=s},44373:function(e,t,n){"use strict";var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(41796),u=n(81719),l=n(78884),d=n(75741),f=n(85893);const h=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],p=(0,u.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>(0,o.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,c.Fq)(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({theme:e,ownerState:t})=>(0,o.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{position:"relative",width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,top:"50%",content:'""',transform:"translateY(50%)"}})),(({theme:e,ownerState:t})=>(0,o.Z)({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",top:"0%",left:"50%",borderTop:0,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,transform:"translateX(0%)"}})),(({ownerState:e})=>(0,o.Z)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),m=(0,u.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>(0,o.Z)({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),g=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiDivider"}),{absolute:i=!1,children:c,className:u,component:g=(c?"div":"hr"),flexItem:y=!1,light:b=!1,orientation:v="horizontal",role:w=("hr"!==g?"separator":void 0),textAlign:x="center",variant:E="fullWidth"}=n,_=(0,r.Z)(n,h),k=(0,o.Z)({},n,{absolute:i,component:g,flexItem:y,light:b,orientation:v,role:w,textAlign:x,variant:E}),S=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:s,textAlign:c,variant:u}=e,l={root:["root",t&&"absolute",u,i&&"light","vertical"===s&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===s&&"withChildrenVertical","right"===c&&"vertical"!==s&&"textAlignRight","left"===c&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]};return(0,a.Z)(l,d.V,r)})(k);return(0,f.jsx)(p,(0,o.Z)({as:g,className:(0,s.default)(S.root,u),role:w,ref:t,ownerState:k},_,{children:c?(0,f.jsx)(m,{className:S.wrapper,ownerState:k,children:c}):null}))}));t.Z=g},75741:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});var r=n(1588),o=n(34867);function i(e){return(0,o.Z)("MuiDivider",e)}const s=(0,r.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=s},9942:function(e,t,n){"use strict";var r=n(87462),o=n(63366),i=n(67294),s=n(98885),a=n(62097),c=n(53566),u=n(84771),l=n(85893);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],f={entering:{opacity:1},entered:{opacity:1}},h=i.forwardRef((function(e,t){const n=(0,a.Z)(),h={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:p,appear:m=!0,children:g,easing:y,in:b,onEnter:v,onEntered:w,onEntering:x,onExit:E,onExited:_,onExiting:k,style:S,timeout:I=h,TransitionComponent:C=s.ZP}=e,T=(0,o.Z)(e,d),A=i.useRef(null),P=(0,u.Z)(A,g.ref,t),O=e=>t=>{if(e){const n=A.current;void 0===t?e(n):e(n,t)}},j=O(x),M=O(((e,t)=>{(0,c.n)(e);const r=(0,c.C)({style:S,timeout:I,easing:y},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),v&&v(e,t)})),R=O(w),B=O(k),N=O((e=>{const t=(0,c.C)({style:S,timeout:I,easing:y},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),E&&E(e)})),L=O(_);return(0,l.jsx)(C,(0,r.Z)({appear:m,in:b,nodeRef:A,onEnter:M,onEntered:R,onEntering:j,onExit:N,onExited:L,onExiting:B,addEndListener:e=>{p&&p(A.current,e)},timeout:I},T,{children:(e,t)=>i.cloneElement(g,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||b?void 0:"hidden"},f[e],S,g.props.style),ref:P},t))}))}));t.Z=h},43918:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(87462),o=(n(67294),n(70917)),i=n(85893);function s(e){const{styles:t,defaultTheme:n={}}=e,r="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(o.xB,{styles:r})}var a=n(25165);var c=function(e){return(0,i.jsx)(s,(0,r.Z)({},e,{defaultTheme:a.Z}))}},79072:function(e,t,n){"use strict";n.d(t,{ZP:function(){return I}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(95408),c=n(39707),u=n(94780),l=n(81719),d=n(78884),f=n(62097);var h=i.createContext(),p=n(1588),m=n(34867);function g(e){return(0,m.Z)("MuiGrid",e)}const y=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];var b=(0,p.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...y.map((e=>`grid-xs-${e}`)),...y.map((e=>`grid-sm-${e}`)),...y.map((e=>`grid-md-${e}`)),...y.map((e=>`grid-lg-${e}`)),...y.map((e=>`grid-xl-${e}`))]),v=n(85893);const w=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function x(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function E({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const _=(0,l.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:s,wrap:a,zeroMinWidth:c,breakpoints:u}=n;let l=[];r&&(l=function(e,t,n={}){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(s,u,t));const d=[];return u.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,c&&t.zeroMinWidth,...l,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==a&&t[`wrap-xs-${String(a)}`],...d]}})((({ownerState:e})=>(0,o.Z)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){const n=(0,a.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,a.k9)({theme:e},n,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${b.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=(0,a.P$)({values:r,breakpoints:e.breakpoints.values});let n;"object"===typeof t&&(n=E({breakpoints:e.breakpoints.values,values:t})),o=(0,a.k9)({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${x(i)}`,[`& > .${b.item}`]:{paddingTop:x(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${b.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=(0,a.P$)({values:r,breakpoints:e.breakpoints.values});let n;"object"===typeof t&&(n=E({breakpoints:e.breakpoints.values,values:t})),o=(0,a.k9)({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${x(i)})`,marginLeft:`-${x(i)}`,[`& > .${b.item}`]:{paddingLeft:x(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${b.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,i)=>{let s={};if(t[i]&&(n=t[i]),!n)return r;if(!0===n)s={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const c=(0,a.P$)({values:t.columns,breakpoints:e.breakpoints.values}),u="object"===typeof c?c[i]:c;if(void 0===u||null===u)return r;const l=Math.round(n/u*1e8)/1e6+"%";let d={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${x(n)})`;d={flexBasis:e,maxWidth:e}}}s=(0,o.Z)({flexBasis:l,flexGrow:0,maxWidth:l},d)}return 0===e.breakpoints.values[i]?Object.assign(r,s):r[e.breakpoints.up(i)]=s,r}),{})}));const k=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:s,zeroMinWidth:a,breakpoints:c}=e;let l=[];n&&(l=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,c));const d=[];c.forEach((t=>{const n=e[t];n&&d.push(`grid-${t}-${String(n)}`)}));const f={root:["root",n&&"container",o&&"item",a&&"zeroMinWidth",...l,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==s&&`wrap-xs-${String(s)}`,...d]};return(0,u.Z)(f,g,t)},S=i.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiGrid"}),{breakpoints:a}=(0,f.Z)(),u=(0,c.Z)(n),{className:l,columns:p,columnSpacing:m,component:g="div",container:y=!1,direction:b="row",item:x=!1,rowSpacing:E,spacing:S=0,wrap:I="wrap",zeroMinWidth:C=!1}=u,T=(0,r.Z)(u,w),A=E||S,P=m||S,O=i.useContext(h),j=y?p||12:O,M={},R=(0,o.Z)({},T);a.keys.forEach((e=>{null!=T[e]&&(M[e]=T[e],delete R[e])}));const B=(0,o.Z)({},u,{columns:j,container:y,direction:b,item:x,rowSpacing:A,columnSpacing:P,wrap:I,zeroMinWidth:C,spacing:S},M,{breakpoints:a.keys}),N=k(B);return(0,v.jsx)(h.Provider,{value:j,children:(0,v.jsx)(_,(0,o.Z)({ownerState:B,className:(0,s.default)(N.root,l),as:g,ref:t},R))})}));var I=S},61760:function(e,t,n){"use strict";var r=n(87462),o=n(63366),i=n(67294),s=n(98885),a=n(62097),c=n(53566),u=n(84771),l=n(85893);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function f(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:f(1)},entered:{opacity:1,transform:"none"}},p="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),m=i.forwardRef((function(e,t){const{addEndListener:n,appear:m=!0,children:g,easing:y,in:b,onEnter:v,onEntered:w,onEntering:x,onExit:E,onExited:_,onExiting:k,style:S,timeout:I="auto",TransitionComponent:C=s.ZP}=e,T=(0,o.Z)(e,d),A=i.useRef(),P=i.useRef(),O=(0,a.Z)(),j=i.useRef(null),M=(0,u.Z)(j,g.ref,t),R=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},B=R(x),N=R(((e,t)=>{(0,c.n)(e);const{duration:n,delay:r,easing:o}=(0,c.C)({style:S,timeout:I,easing:y},{mode:"enter"});let i;"auto"===I?(i=O.transitions.getAutoHeightDuration(e.clientHeight),P.current=i):i=n,e.style.transition=[O.transitions.create("opacity",{duration:i,delay:r}),O.transitions.create("transform",{duration:p?i:.666*i,delay:r,easing:o})].join(","),v&&v(e,t)})),L=R(w),U=R(k),D=R((e=>{const{duration:t,delay:n,easing:r}=(0,c.C)({style:S,timeout:I,easing:y},{mode:"exit"});let o;"auto"===I?(o=O.transitions.getAutoHeightDuration(e.clientHeight),P.current=o):o=t,e.style.transition=[O.transitions.create("opacity",{duration:o,delay:n}),O.transitions.create("transform",{duration:p?o:.666*o,delay:p?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=f(.75),E&&E(e)})),F=R(_);return i.useEffect((()=>()=>{clearTimeout(A.current)}),[]),(0,l.jsx)(C,(0,r.Z)({appear:m,in:b,nodeRef:j,onEnter:N,onEntered:L,onEntering:B,onExit:D,onExited:F,onExiting:U,addEndListener:e=>{"auto"===I&&(A.current=setTimeout(e,P.current||0)),n&&n(j.current,e)},timeout:"auto"===I?null:I},T,{children:(e,t)=>i.cloneElement(g,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:f(.75),visibility:"exited"!==e||b?void 0:"hidden"},h[e],S,g.props.style),ref:M},t))}))}));m.muiSupportAuto=!0,t.Z=m},80562:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(41796),u=n(81719),l=n(78884),d=n(50522),f=n(36622),h=n(1588),p=n(34867);function m(e){return(0,p.Z)("MuiIconButton",e)}var g=(0,h.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),y=n(85893);const b=["edge","children","className","color","disabled","disableFocusRipple","size"],v=(0,u.ZP)(d.Z,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,f.Z)(n.color)}`],n.edge&&t[`edge${(0,f.Z)(n.edge)}`],t[`size${(0,f.Z)(n.size)}`]]}})((({theme:e,ownerState:t})=>(0,o.Z)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return(0,o.Z)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,o.Z)({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":(0,o.Z)({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.Fq)(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${g.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}));var w=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:c,className:u,color:d="default",disabled:h=!1,disableFocusRipple:p=!1,size:g="medium"}=n,w=(0,r.Z)(n,b),x=(0,o.Z)({},n,{edge:i,color:d,disabled:h,disableFocusRipple:p,size:g}),E=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled","default"!==r&&`color${(0,f.Z)(r)}`,o&&`edge${(0,f.Z)(o)}`,`size${(0,f.Z)(i)}`]};return(0,a.Z)(s,m,t)})(x);return(0,y.jsx)(v,(0,o.Z)({className:(0,s.default)(E.root,u),centerRipple:!0,focusRipple:!p,disabled:h,ref:t,ownerState:x},w,{children:c}))}))},85214:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(57742),d=n(1588),f=n(34867);function h(e){return(0,f.Z)("MuiList",e)}(0,d.Z)("MuiList",["root","padding","dense","subheader"]);var p=n(85893);const m=["children","className","component","dense","disablePadding","subheader"],g=(0,c.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>(0,o.Z)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})));var y=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiList"}),{children:c,className:d,component:f="ul",dense:y=!1,disablePadding:b=!1,subheader:v}=n,w=(0,r.Z)(n,m),x=i.useMemo((()=>({dense:y})),[y]),E=(0,o.Z)({},n,{component:f,dense:y,disablePadding:b}),_=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,a.Z)(i,h,t)})(E);return(0,p.jsx)(l.Z.Provider,{value:x,children:(0,p.jsxs)(g,(0,o.Z)({as:f,className:(0,s.default)(_.root,d),ref:t,ownerState:E},w,{children:[v,c]}))})}))},57742:function(e,t,n){"use strict";const r=n(67294).createContext({});t.Z=r},18746:function(e,t,n){"use strict";n.d(t,{ZP:function(){return T}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(28442),u=n(41796),l=n(81719),d=n(78884),f=n(50522),h=n(7335),p=n(63289),m=n(84771),g=n(57742),y=n(1588),b=n(34867);function v(e){return(0,b.Z)("MuiListItem",e)}var w=(0,y.Z)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),x=n(94960),E=n(47825),_=n(85893);const k=["className"],S=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],I=(0,l.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((({theme:e,ownerState:t})=>(0,o.Z)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,o.Z)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${x.Z.root}`]:{paddingRight:48}},{[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${w.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),C=(0,l.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"});var T=i.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiListItem"}),{alignItems:u="center",autoFocus:l=!1,button:y=!1,children:b,className:x,component:T,components:A={},componentsProps:P={},ContainerComponent:O="li",ContainerProps:{className:j}={},dense:M=!1,disabled:R=!1,disableGutters:B=!1,disablePadding:N=!1,divider:L=!1,focusVisibleClassName:U,secondaryAction:D,selected:F=!1,slotProps:z={},slots:$={}}=n,q=(0,r.Z)(n.ContainerProps,k),Z=(0,r.Z)(n,S),H=i.useContext(g.Z),W=i.useMemo((()=>({dense:M||H.dense||!1,alignItems:u,disableGutters:B})),[u,H.dense,M,B]),G=i.useRef(null);(0,p.Z)((()=>{l&&G.current&&G.current.focus()}),[l]);const K=i.Children.toArray(b),V=K.length&&(0,h.Z)(K[K.length-1],["ListItemSecondaryAction"]),X=(0,o.Z)({},n,{alignItems:u,autoFocus:l,button:y,dense:W.dense,disabled:R,disableGutters:B,disablePadding:N,divider:L,hasSecondaryAction:V,selected:F}),Y=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:s,disablePadding:c,divider:u,hasSecondaryAction:l,selected:d}=e,f={root:["root",o&&"dense",!s&&"gutters",!c&&"padding",u&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",l&&"secondaryAction",d&&"selected"],container:["container"]};return(0,a.Z)(f,v,r)})(X),J=(0,m.Z)(G,t),Q=$.root||A.Root||I,ee=z.root||P.root||{},te=(0,o.Z)({className:(0,s.default)(Y.root,ee.className,x),disabled:R},Z);let ne=T||"li";return y&&(te.component=T||"div",te.focusVisibleClassName=(0,s.default)(w.focusVisible,U),ne=f.Z),V?(ne=te.component||T?ne:"div","li"===O&&("li"===ne?ne="div":"li"===te.component&&(te.component="div")),(0,_.jsx)(g.Z.Provider,{value:W,children:(0,_.jsxs)(C,(0,o.Z)({as:O,className:(0,s.default)(Y.container,j),ref:J,ownerState:X},q,{children:[(0,_.jsx)(Q,(0,o.Z)({},ee,!(0,c.Z)(Q)&&{as:ne,ownerState:(0,o.Z)({},X,ee.ownerState)},te,{children:K})),K.pop()]}))})):(0,_.jsx)(g.Z.Provider,{value:W,children:(0,_.jsxs)(Q,(0,o.Z)({},ee,{as:ne,ref:J},!(0,c.Z)(Q)&&{ownerState:(0,o.Z)({},X,ee.ownerState)},te,{children:[K,D&&(0,_.jsx)(E.Z,{children:D})]}))})}))},95309:function(e,t,n){"use strict";var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(41796),u=n(81719),l=n(78884),d=n(50522),f=n(63289),h=n(84771),p=n(57742),m=n(94960),g=n(85893);const y=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],b=(0,u.ZP)(d.Z,{shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>(0,o.Z)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${m.Z.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${m.Z.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${m.Z.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${m.Z.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${m.Z.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),v=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiListItemButton"}),{alignItems:c="center",autoFocus:u=!1,component:d="div",children:v,dense:w=!1,disableGutters:x=!1,divider:E=!1,focusVisibleClassName:_,selected:k=!1,className:S}=n,I=(0,r.Z)(n,y),C=i.useContext(p.Z),T=i.useMemo((()=>({dense:w||C.dense||!1,alignItems:c,disableGutters:x})),[c,C.dense,w,x]),A=i.useRef(null);(0,f.Z)((()=>{u&&A.current&&A.current.focus()}),[u]);const P=(0,o.Z)({},n,{alignItems:c,dense:T.dense,disableGutters:x,divider:E,selected:k}),O=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:s,divider:c,selected:u}=e,l={root:["root",r&&"dense",!s&&"gutters",c&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",u&&"selected"]},d=(0,a.Z)(l,m.t,n);return(0,o.Z)({},n,d)})(P),j=(0,h.Z)(A,t);return(0,g.jsx)(p.Z.Provider,{value:T,children:(0,g.jsx)(b,(0,o.Z)({ref:j,href:I.href||I.to,component:(I.href||I.to)&&"div"===d?"a":d,focusVisibleClassName:(0,s.default)(O.focusVisible,_),ownerState:P,className:(0,s.default)(O.root,S)},I,{classes:O,children:v}))})}));t.Z=v},94960:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(1588),o=n(34867);function i(e){return(0,o.Z)("MuiListItemButton",e)}const s=(0,r.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);t.Z=s},29894:function(e,t,n){"use strict";var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(8164),d=n(57742),f=n(85893);const h=["className"],p=(0,c.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>(0,o.Z)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),m=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiListItemIcon"}),{className:c}=n,m=(0,r.Z)(n,h),g=i.useContext(d.Z),y=(0,o.Z)({},n,{alignItems:g.alignItems}),b=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,a.Z)(r,l.f,n)})(y);return(0,f.jsx)(p,(0,o.Z)({className:(0,s.default)(b.root,c),ownerState:y,ref:t},m))}));t.Z=m},8164:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var r=n(1588),o=n(34867);function i(e){return(0,o.Z)("MuiListItemIcon",e)}const s=(0,r.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);t.Z=s},47825:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(57742),d=n(1588),f=n(34867);function h(e){return(0,f.Z)("MuiListItemSecondaryAction",e)}(0,d.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);var p=n(85893);const m=["className"],g=(0,c.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((({ownerState:e})=>(0,o.Z)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),y=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiListItemSecondaryAction"}),{className:c}=n,d=(0,r.Z)(n,m),f=i.useContext(l.Z),y=(0,o.Z)({},n,{disableGutters:f.disableGutters}),b=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,a.Z)(r,h,n)})(y);return(0,p.jsx)(g,(0,o.Z)({className:(0,s.default)(b.root,c),ownerState:y,ref:t},d))}));y.muiName="ListItemSecondaryAction";var b=y},61702:function(e,t,n){"use strict";var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(29630),u=n(57742),l=n(78884),d=n(81719),f=n(97484),h=n(85893);const p=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=(0,d.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${f.Z.primary}`]:t.primary},{[`& .${f.Z.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((({ownerState:e})=>(0,o.Z)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),g=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiListItemText"}),{children:d,className:g,disableTypography:y=!1,inset:b=!1,primary:v,primaryTypographyProps:w,secondary:x,secondaryTypographyProps:E}=n,_=(0,r.Z)(n,p),{dense:k}=i.useContext(u.Z);let S=null!=v?v:d,I=x;const C=(0,o.Z)({},n,{disableTypography:y,inset:b,primary:!!S,secondary:!!I,dense:k}),T=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e,s={root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,a.Z)(s,f.L,t)})(C);return null==S||S.type===c.Z||y||(S=(0,h.jsx)(c.Z,(0,o.Z)({variant:k?"body2":"body1",className:T.primary,component:null!=w&&w.variant?void 0:"span",display:"block"},w,{children:S}))),null==I||I.type===c.Z||y||(I=(0,h.jsx)(c.Z,(0,o.Z)({variant:"body2",className:T.secondary,color:"text.secondary",display:"block"},E,{children:I}))),(0,h.jsxs)(m,(0,o.Z)({className:(0,s.default)(T.root,g),ownerState:C,ref:t},_,{children:[S,I]}))}));t.Z=g},97484:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(1588),o=n(34867);function i(e){return(0,o.Z)("MuiListItemText",e)}const s=(0,r.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);t.Z=s},19117:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(87462),o=n(63366),i=n(67294),s=(n(76607),n(86010)),a=n(94780),c=n(852),u=n(70918),l=n(43963),d=n(81719),f=n(62097),h=n(78884),p=n(1588),m=n(34867);function g(e){return(0,m.Z)("MuiMenu",e)}(0,p.Z)("MuiMenu",["root","paper","list"]);var y=n(85893);const b=["onEntering"],v=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],w={vertical:"top",horizontal:"right"},x={vertical:"top",horizontal:"left"},E=(0,d.ZP)(l.ZP,{shouldForwardProp:e=>(0,d.FO)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),_=(0,d.ZP)(u.Z,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),k=(0,d.ZP)(c.Z,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0});var S=i.forwardRef((function(e,t){const n=(0,h.Z)({props:e,name:"MuiMenu"}),{autoFocus:c=!0,children:u,disableAutoFocusItem:l=!1,MenuListProps:d={},onClose:p,open:m,PaperProps:S={},PopoverClasses:I,transitionDuration:C="auto",TransitionProps:{onEntering:T}={},variant:A="selectedMenu"}=n,P=(0,o.Z)(n.TransitionProps,b),O=(0,o.Z)(n,v),j=(0,f.Z)(),M="rtl"===j.direction,R=(0,r.Z)({},n,{autoFocus:c,disableAutoFocusItem:l,MenuListProps:d,onEntering:T,PaperProps:S,transitionDuration:C,TransitionProps:P,variant:A}),B=(e=>{const{classes:t}=e;return(0,a.Z)({root:["root"],paper:["paper"],list:["list"]},g,t)})(R),N=c&&!l&&m,L=i.useRef(null);let U=-1;return i.Children.map(u,((e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===A&&e.props.selected||-1===U)&&(U=t))})),(0,y.jsx)(E,(0,r.Z)({classes:I,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:M?"right":"left"},transformOrigin:M?w:x,PaperProps:(0,r.Z)({component:_},S,{classes:(0,r.Z)({},S.classes,{root:B.paper})}),className:B.root,open:m,ref:t,transitionDuration:C,TransitionProps:(0,r.Z)({onEntering:(e,t)=>{L.current&&L.current.adjustStyleForScrollbar(e,j),T&&T(e,t)}},P),ownerState:R},O,{children:(0,y.jsx)(k,(0,r.Z)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),p&&p(e,"tabKeyDown"))},actions:L,autoFocus:c&&(-1===U||l),autoFocusItem:N,variant:A},d,{className:(0,s.default)(B.list,d.className),children:u}))}))}))},31538:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(41796),u=n(81719),l=n(78884),d=n(57742),f=n(50522),h=n(63289),p=n(84771),m=n(75741),g=n(8164),y=n(97484),b=n(1588),v=n(34867);function w(e){return(0,v.Z)("MuiMenuItem",e)}var x=(0,b.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),E=n(85893);const _=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],k=(0,u.ZP)(f.Z,{shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>(0,o.Z)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${x.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${x.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,c.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${x.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${m.Z.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${m.Z.inset}`]:{marginLeft:52},[`& .${y.Z.root}`]:{marginTop:0,marginBottom:0},[`& .${y.Z.inset}`]:{paddingLeft:36},[`& .${g.Z.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,o.Z)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${g.Z.root} svg`]:{fontSize:"1.25rem"}}))));var S=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiMenuItem"}),{autoFocus:c=!1,component:u="li",dense:f=!1,divider:m=!1,disableGutters:g=!1,focusVisibleClassName:y,role:b="menuitem",tabIndex:v,className:x}=n,S=(0,r.Z)(n,_),I=i.useContext(d.Z),C=i.useMemo((()=>({dense:f||I.dense||!1,disableGutters:g})),[I.dense,f,g]),T=i.useRef(null);(0,h.Z)((()=>{c&&T.current&&T.current.focus()}),[c]);const A=(0,o.Z)({},n,{dense:C.dense,divider:m,disableGutters:g}),P=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:s,classes:c}=e,u={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},l=(0,a.Z)(u,w,c);return(0,o.Z)({},c,l)})(n),O=(0,p.Z)(T,t);let j;return n.disabled||(j=void 0!==v?v:-1),(0,E.jsx)(d.Z.Provider,{value:C,children:(0,E.jsx)(k,(0,o.Z)({ref:O,role:b,tabIndex:j,component:u,focusVisibleClassName:(0,s.default)(P.focusVisible,y),className:(0,s.default)(P.root,x)},S,{ownerState:A,classes:P}))})}))},852:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(87462),o=n(63366),i=n(67294),s=(n(76607),n(47505)),a=n(85214),c=n(95806).Z,u=n(84771),l=n(63289),d=n(85893);const f=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function h(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function p(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function m(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function g(e,t,n,r,o,i){let s=!1,a=o(e,t,!!t&&n);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const t=!r&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&m(a,i)&&!t)return a.focus(),!0;a=o(e,a,n)}return!1}var y=i.forwardRef((function(e,t){const{actions:n,autoFocus:y=!1,autoFocusItem:b=!1,children:v,className:w,disabledItemsFocusable:x=!1,disableListWrap:E=!1,onKeyDown:_,variant:k="selectedMenu"}=e,S=(0,o.Z)(e,f),I=i.useRef(null),C=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,l.Z)((()=>{y&&I.current.focus()}),[y]),i.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!I.current.style.width;if(e.clientHeight<I.current.clientHeight&&n){const n=`${c((0,s.Z)(e))}px`;I.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,I.current.style.width=`calc(100% + ${n})`}return I.current}})),[]);const T=(0,u.Z)(I,t);let A=-1;i.Children.forEach(v,((e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===k&&e.props.selected||-1===A)&&(A=t))}));const P=i.Children.map(v,((e,t)=>{if(t===A){const t={};return b&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===k&&(t.tabIndex=0),i.cloneElement(e,t)}return e}));return(0,d.jsx)(a.Z,(0,r.Z)({role:"menu",ref:T,className:w,onKeyDown:e=>{const t=I.current,n=e.key,r=(0,s.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),g(t,r,E,x,h);else if("ArrowUp"===n)e.preventDefault(),g(t,r,E,x,p);else if("Home"===n)e.preventDefault(),g(t,null,E,x,h);else if("End"===n)e.preventDefault(),g(t,null,E,x,p);else if(1===n.length){const o=C.current,i=n.toLowerCase(),s=performance.now();o.keys.length>0&&(s-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=s,o.keys.push(i);const a=r&&!o.repeating&&m(r,o);o.previousKeyMatched&&(a||g(t,r,!1,x,h,o))?e.preventDefault():o.previousKeyMatched=!1}_&&_(e)},tabIndex:y?0:-1},S,{children:P}))}))},92096:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(63366),o=n(87462),i=n(67294),s=n(30067),a=n(57094),c=n(73633),u=n(49064),l=n(94780),d=n(78385),f=n(58290),h=n(95806);function p(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function m(e){return parseInt((0,f.Z)(e).getComputedStyle(e).paddingRight,10)||0}function g(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&p(e,o)}))}function y(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function b(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,a.Z)(e);return t.body===e?(0,f.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,h.Z)((0,a.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${m(r)+e}px`;const t=(0,a.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${m(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,a.Z)(r).body;else{const t=r.parentElement,n=(0,f.Z)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}var v=n(93470),w=n(1588),x=n(34867);function E(e){return(0,x.Z)("MuiModal",e)}(0,w.Z)("MuiModal",["root","hidden"]);var _=n(18793),k=n(85893);const S=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"];const I=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&p(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);g(t,e.mount,e.modalRef,r,!0);const o=y(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=y(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=b(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=y(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&p(e.modalRef,t),g(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&p(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};var C=i.forwardRef((function(e,t){var n,f;const{children:h,classes:m,closeAfterTransition:g=!1,component:y,container:b,disableAutoFocus:w=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:C=!1,disablePortal:T=!1,disableRestoreFocus:A=!1,disableScrollLock:P=!1,hideBackdrop:O=!1,keepMounted:j=!1,manager:M=I,onBackdropClick:R,onClose:B,onKeyDown:N,open:L,onTransitionEnter:U,onTransitionExited:D,slotProps:F={},slots:z={}}=e,$=(0,r.Z)(e,S),[q,Z]=i.useState(!0),H=i.useRef({}),W=i.useRef(null),G=i.useRef(null),K=(0,s.Z)(G,t),V=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(e),X=null==(n=e["aria-hidden"])||n,Y=()=>(H.current.modalRef=G.current,H.current.mountNode=W.current,H.current),J=()=>{M.mount(Y(),{disableScrollLock:P}),G.current.scrollTop=0},Q=(0,c.Z)((()=>{const e=function(e){return"function"===typeof e?e():e}(b)||(0,a.Z)(W.current).body;M.add(Y(),e),G.current&&J()})),ee=i.useCallback((()=>M.isTopModal(Y())),[M]),te=(0,c.Z)((e=>{W.current=e,e&&(L&&ee()?J():p(G.current,X))})),ne=i.useCallback((()=>{M.remove(Y(),X)}),[M,X]);i.useEffect((()=>()=>{ne()}),[ne]),i.useEffect((()=>{L?Q():V&&g||ne()}),[L,ne,V,g,Q]);const re=(0,o.Z)({},e,{classes:m,closeAfterTransition:g,disableAutoFocus:w,disableEnforceFocus:x,disableEscapeKeyDown:C,disablePortal:T,disableRestoreFocus:A,disableScrollLock:P,exited:q,hideBackdrop:O,keepMounted:j}),oe=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"]};return(0,l.Z)(o,E,r)})(re),ie=()=>{Z(!1),U&&U()},se=()=>{Z(!0),D&&D(),g&&ne()},ae={};void 0===h.props.tabIndex&&(ae.tabIndex="-1"),V&&(ae.onEnter=(0,u.Z)(ie,h.props.onEnter),ae.onExited=(0,u.Z)(se,h.props.onExited));const ce=null!=(f=null!=y?y:z.root)?f:"div",ue=(0,_.Z)({elementType:ce,externalSlotProps:F.root,externalForwardedProps:$,additionalProps:{ref:K,role:"presentation",onKeyDown:e=>{N&&N(e),"Escape"===e.key&&ee()&&(C||(e.stopPropagation(),B&&B(e,"escapeKeyDown")))}},className:oe.root,ownerState:re}),le=z.backdrop,de=(0,_.Z)({elementType:le,externalSlotProps:F.backdrop,additionalProps:{"aria-hidden":!0,onClick:e=>{e.target===e.currentTarget&&(R&&R(e),B&&B(e,"backdropClick"))},open:L},className:oe.backdrop,ownerState:re});return j||L||V&&!q?(0,k.jsx)(d.Z,{ref:te,container:b,disablePortal:T,children:(0,k.jsxs)(ce,(0,o.Z)({},ue,{children:[!O&&le?(0,k.jsx)(le,(0,o.Z)({},de)):null,(0,k.jsx)(v.Z,{disableEnforceFocus:x,disableAutoFocus:w,disableRestoreFocus:A,isEnabled:ee,open:L,children:i.cloneElement(h,ae)})]}))}):null})),T=n(71276),A=n(28442),P=n(81719),O=n(78884),j=n(58735);const M=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],R=(0,P.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>(0,o.Z)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),B=(0,P.ZP)(j.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1});var N=i.forwardRef((function(e,t){var n,s,a,c,u,l;const d=(0,O.Z)({name:"MuiModal",props:e}),{BackdropComponent:f=B,BackdropProps:h,closeAfterTransition:p=!1,children:m,component:g,components:y={},componentsProps:b={},disableAutoFocus:v=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:x=!1,disablePortal:E=!1,disableRestoreFocus:_=!1,disableScrollLock:S=!1,hideBackdrop:I=!1,keepMounted:P=!1,slotProps:j,slots:N,theme:L}=d,U=(0,r.Z)(d,M),[D,F]=i.useState(!0),z={closeAfterTransition:p,disableAutoFocus:v,disableEnforceFocus:w,disableEscapeKeyDown:x,disablePortal:E,disableRestoreFocus:_,disableScrollLock:S,hideBackdrop:I,keepMounted:P},$=(0,o.Z)({},d,z,{exited:D}),q=(e=>e.classes)($),Z=null!=(n=null!=(s=null==N?void 0:N.root)?s:y.Root)?n:R,H=null!=(a=null!=(c=null==N?void 0:N.backdrop)?c:y.Backdrop)?a:f,W=null!=(u=null==j?void 0:j.root)?u:b.root,G=null!=(l=null==j?void 0:j.backdrop)?l:b.backdrop;return(0,k.jsx)(C,(0,o.Z)({slots:{root:Z,backdrop:H},slotProps:{root:()=>(0,o.Z)({},(0,T.Z)(W,$),!(0,A.Z)(Z)&&{as:g,theme:L}),backdrop:()=>(0,o.Z)({},h,(0,T.Z)(G,$))},onTransitionEnter:()=>F(!1),onTransitionExited:()=>F(!0),ref:t},U,{classes:q},z,{children:m}))}))},70918:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(41796),u=n(81719),l=n(78884),d=n(1588),f=n(34867);function h(e){return(0,f.Z)("MuiPaper",e)}(0,d.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var p=n(85893);const m=["className","component","elevation","square","variant"],g=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)},y=(0,u.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return(0,o.Z)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,o.Z)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,c.Fq)("#fff",g(t.elevation))}, ${(0,c.Fq)("#fff",g(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))}));var b=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiPaper"}),{className:i,component:c="div",elevation:u=1,square:d=!1,variant:f="elevation"}=n,g=(0,r.Z)(n,m),b=(0,o.Z)({},n,{component:c,elevation:u,square:d,variant:f}),v=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,a.Z)(i,h,o)})(b);return(0,p.jsx)(y,(0,o.Z)({as:c,ownerState:b,className:(0,s.default)(v.root,i),ref:t},g))}))},43963:function(e,t,n){"use strict";n.d(t,{ZP:function(){return A}});var r=n(87462),o=n(63366),i=n(67294),s=n(86010),a=n(94780),c=n(81719),u=n(78884),l=n(75400),d=n(47505),f=n(57577),h=n(84771),p=n(61760),m=n(92096),g=n(70918),y=n(1588),b=n(34867);function v(e){return(0,b.Z)("MuiPopover",e)}(0,y.Z)("MuiPopover",["root","paper"]);var w=n(85893);const x=["onEntering"],E=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function _(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function k(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function S(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?`${e}px`:e)).join(" ")}function I(e){return"function"===typeof e?e():e}const C=(0,c.ZP)(m.Z,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),T=(0,c.ZP)(g.Z,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0});var A=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiPopover"}),{action:c,anchorEl:m,anchorOrigin:g={vertical:"top",horizontal:"left"},anchorPosition:y,anchorReference:b="anchorEl",children:A,className:P,container:O,elevation:j=8,marginThreshold:M=16,open:R,PaperProps:B={},transformOrigin:N={vertical:"top",horizontal:"left"},TransitionComponent:L=p.Z,transitionDuration:U="auto",TransitionProps:{onEntering:D}={}}=n,F=(0,o.Z)(n.TransitionProps,x),z=(0,o.Z)(n,E),$=i.useRef(),q=(0,h.Z)($,B.ref),Z=(0,r.Z)({},n,{anchorOrigin:g,anchorReference:b,elevation:j,marginThreshold:M,PaperProps:B,transformOrigin:N,TransitionComponent:L,transitionDuration:U,TransitionProps:F}),H=(e=>{const{classes:t}=e;return(0,a.Z)({root:["root"],paper:["paper"]},v,t)})(Z),W=i.useCallback((()=>{if("anchorPosition"===b)return y;const e=I(m),t=(e&&1===e.nodeType?e:(0,d.Z)($.current).body).getBoundingClientRect();return{top:t.top+_(t,g.vertical),left:t.left+k(t,g.horizontal)}}),[m,g.horizontal,g.vertical,y,b]),G=i.useCallback((e=>({vertical:_(e,N.vertical),horizontal:k(e,N.horizontal)})),[N.horizontal,N.vertical]),K=i.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=G(t);if("none"===b)return{top:null,left:null,transformOrigin:S(n)};const r=W();let o=r.top-n.vertical,i=r.left-n.horizontal;const s=o+t.height,a=i+t.width,c=(0,f.Z)(I(m)),u=c.innerHeight-M,l=c.innerWidth-M;if(o<M){const e=o-M;o-=e,n.vertical+=e}else if(s>u){const e=s-u;o-=e,n.vertical+=e}if(i<M){const e=i-M;i-=e,n.horizontal+=e}else if(a>l){const e=a-l;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:S(n)}}),[m,b,W,G,M]),[V,X]=i.useState(R),Y=i.useCallback((()=>{const e=$.current;if(!e)return;const t=K(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,X(!0)}),[K]);i.useEffect((()=>{R&&Y()})),i.useImperativeHandle(c,(()=>R?{updatePosition:()=>{Y()}}:null),[R,Y]),i.useEffect((()=>{if(!R)return;const e=(0,l.Z)((()=>{Y()})),t=(0,f.Z)(m);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[m,R,Y]);let J=U;"auto"!==U||L.muiSupportAuto||(J=void 0);const Q=O||(m?(0,d.Z)(I(m)).body:void 0);return(0,w.jsx)(C,(0,r.Z)({BackdropProps:{invisible:!0},className:(0,s.default)(H.root,P),container:Q,open:R,ref:t,ownerState:Z},z,{children:(0,w.jsx)(L,(0,r.Z)({appear:!0,in:R,onEntering:(e,t)=>{D&&D(e,t),Y()},onExited:()=>{X(!1)},timeout:J},F,{children:(0,w.jsx)(T,(0,r.Z)({elevation:j},B,{ref:q,className:(0,s.default)(H.paper,B.className)},V?void 0:{style:(0,r.Z)({},B.style,{opacity:0})},{ownerState:Z,children:A}))}))}))}))},58402:function(e,t,n){"use strict";n.d(t,{Z:function(){return De}});var r=n(87462),o=n(63366),i=n(67294),s=n(30067),a=n(16600),c=n(57094);function u(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function l(e){return e instanceof u(e).Element||e instanceof Element}function d(e){return e instanceof u(e).HTMLElement||e instanceof HTMLElement}function f(e){return"undefined"!==typeof ShadowRoot&&(e instanceof u(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,p=Math.min,m=Math.round;function g(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function y(){return!/^((?!chrome|android).)*safari/i.test(g())}function b(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&d(e)&&(o=e.offsetWidth>0&&m(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&m(r.height)/e.offsetHeight||1);var s=(l(e)?u(e):window).visualViewport,a=!y()&&n,c=(r.left+(a&&s?s.offsetLeft:0))/o,f=(r.top+(a&&s?s.offsetTop:0))/i,h=r.width/o,p=r.height/i;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function v(e){var t=u(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function w(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((l(e)?e.ownerDocument:e.document)||window.document).documentElement}function E(e){return b(x(e)).left+v(e).scrollLeft}function _(e){return u(e).getComputedStyle(e)}function k(e){var t=_(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function S(e,t,n){void 0===n&&(n=!1);var r=d(t),o=d(t)&&function(e){var t=e.getBoundingClientRect(),n=m(t.width)/e.offsetWidth||1,r=m(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=x(t),s=b(e,o,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(("body"!==w(t)||k(i))&&(a=function(e){return e!==u(e)&&d(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:v(e);var t}(t)),d(t)?((c=b(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=E(i))),{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function I(e){var t=b(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function C(e){return"html"===w(e)?e:e.assignedSlot||e.parentNode||(f(e)?e.host:null)||x(e)}function T(e){return["html","body","#document"].indexOf(w(e))>=0?e.ownerDocument.body:d(e)&&k(e)?e:T(C(e))}function A(e,t){var n;void 0===t&&(t=[]);var r=T(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=u(r),s=o?[i].concat(i.visualViewport||[],k(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(A(C(s)))}function P(e){return["table","td","th"].indexOf(w(e))>=0}function O(e){return d(e)&&"fixed"!==_(e).position?e.offsetParent:null}function j(e){for(var t=u(e),n=O(e);n&&P(n)&&"static"===_(n).position;)n=O(n);return n&&("html"===w(n)||"body"===w(n)&&"static"===_(n).position)?t:n||function(e){var t=/firefox/i.test(g());if(/Trident/i.test(g())&&d(e)&&"fixed"===_(e).position)return null;var n=C(e);for(f(n)&&(n=n.host);d(n)&&["html","body"].indexOf(w(n))<0;){var r=_(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var M="top",R="bottom",B="right",N="left",L="auto",U=[M,R,B,N],D="start",F="end",z="viewport",$="popper",q=U.reduce((function(e,t){return e.concat([t+"-"+D,t+"-"+F])}),[]),Z=[].concat(U,[L]).reduce((function(e,t){return e.concat([t,t+"-"+D,t+"-"+F])}),[]),H=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function W(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function G(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function X(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?K:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],a=!1,c={state:o,setOptions:function(n){var a="function"===typeof n?n(o.options):n;u(),o.options=Object.assign({},i,o.options,a),o.scrollParents={reference:l(e)?A(e):e.contextElement?A(e.contextElement):[],popper:A(t)};var d=function(e){var t=W(e);return H.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=d.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var a=i({state:o,name:t,instance:c,options:r}),u=function(){};s.push(a||u)}})),c.update()},forceUpdate:function(){if(!a){var e=o.elements,t=e.reference,n=e.popper;if(V(t,n)){o.rects={reference:S(t,j(n),"fixed"===o.options.strategy),popper:I(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],s=i.fn,u=i.options,l=void 0===u?{}:u,d=i.name;"function"===typeof s&&(o=s({state:o,options:l,name:d,instance:c})||o)}else o.reset=!1,r=-1}}},update:G((function(){return new Promise((function(e){c.forceUpdate(),e(o)}))})),destroy:function(){u(),a=!0}};if(!V(e,t))return c;function u(){s.forEach((function(e){return e()})),s=[]}return c.setOptions(n).then((function(e){!a&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Y={passive:!0};function J(e){return e.split("-")[0]}function Q(e){return e.split("-")[1]}function ee(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function te(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?J(o):null,s=o?Q(o):null,a=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case M:t={x:a,y:n.y-r.height};break;case R:t={x:a,y:n.y+n.height};break;case B:t={x:n.x+n.width,y:c};break;case N:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=i?ee(i):null;if(null!=u){var l="y"===u?"height":"width";switch(s){case D:t[u]=t[u]-(n[l]/2-r[l]/2);break;case F:t[u]=t[u]+(n[l]/2-r[l]/2)}}return t}var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,c=e.gpuAcceleration,l=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=s.x,p=void 0===h?0:h,g=s.y,y=void 0===g?0:g,b="function"===typeof d?d({x:p,y:y}):{x:p,y:y};p=b.x,y=b.y;var v=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),E=N,k=M,S=window;if(l){var I=j(n),C="clientHeight",T="clientWidth";if(I===u(n)&&"static"!==_(I=x(n)).position&&"absolute"===a&&(C="scrollHeight",T="scrollWidth"),o===M||(o===N||o===B)&&i===F)k=R,y-=(f&&I===S&&S.visualViewport?S.visualViewport.height:I[C])-r.height,y*=c?1:-1;if(o===N||(o===M||o===R)&&i===F)E=B,p-=(f&&I===S&&S.visualViewport?S.visualViewport.width:I[T])-r.width,p*=c?1:-1}var A,P=Object.assign({position:a},l&&ne),O=!0===d?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:m(t*r)/r||0,y:m(n*r)/r||0}}({x:p,y:y}):{x:p,y:y};return p=O.x,y=O.y,c?Object.assign({},P,((A={})[k]=w?"0":"",A[E]=v?"0":"",A.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+y+"px)":"translate3d("+p+"px, "+y+"px, 0)",A)):Object.assign({},P,((t={})[k]=w?y+"px":"",t[E]=v?p+"px":"",t.transform="",t))}var oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,s=Z.reduce((function(e,n){return e[n]=function(e,t,n){var r=J(e),o=[N,M].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[N,B].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,i),e}),{}),a=s[t.placement],c=a.x,u=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var ae={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function ue(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&f(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function le(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t,n){return t===z?le(function(e,t){var n=u(e),r=x(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;var l=y();(l||!l&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a+E(e),y:c}}(e,n)):l(t)?function(e,t){var n=b(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):le(function(e){var t,n=x(e),r=v(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=h(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+E(e),c=-r.scrollTop;return"rtl"===_(o||n).direction&&(a+=h(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:c}}(x(e)))}function fe(e,t,n,r){var o="clippingParents"===t?function(e){var t=A(C(e)),n=["absolute","fixed"].indexOf(_(e).position)>=0&&d(e)?j(e):e;return l(n)?t.filter((function(e){return l(e)&&ue(e,n)&&"body"!==w(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce((function(t,n){var o=de(e,n,r);return t.top=h(o.top,t.top),t.right=p(o.right,t.right),t.bottom=p(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),de(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function he(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function pe(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function me(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,s=void 0===i?e.strategy:i,a=n.boundary,c=void 0===a?"clippingParents":a,u=n.rootBoundary,d=void 0===u?z:u,f=n.elementContext,h=void 0===f?$:f,p=n.altBoundary,m=void 0!==p&&p,g=n.padding,y=void 0===g?0:g,v=he("number"!==typeof y?y:pe(y,U)),w=h===$?"reference":$,E=e.rects.popper,_=e.elements[m?w:h],k=fe(l(_)?_:_.contextElement||x(e.elements.popper),c,d,s),S=b(e.elements.reference),I=te({reference:S,element:E,strategy:"absolute",placement:o}),C=le(Object.assign({},E,I)),T=h===$?C:S,A={top:k.top-T.top+v.top,bottom:T.bottom-k.bottom+v.bottom,left:k.left-T.left+v.left,right:T.right-k.right+v.right},P=e.modifiersData.offset;if(h===$&&P){var O=P[o];Object.keys(A).forEach((function(e){var t=[B,R].indexOf(e)>=0?1:-1,n=[M,R].indexOf(e)>=0?"y":"x";A[e]+=O[n]*t}))}return A}function ge(e,t,n){return h(e,p(t,n))}var ye={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,c=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,f=n.tether,m=void 0===f||f,g=n.tetherOffset,y=void 0===g?0:g,b=me(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:l}),v=J(t.placement),w=Q(t.placement),x=!w,E=ee(v),_="x"===E?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,T="function"===typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,A="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(k){if(i){var L,U="y"===E?M:N,F="y"===E?R:B,z="y"===E?"height":"width",$=k[E],q=$+b[U],Z=$-b[F],H=m?-C[z]/2:0,W=w===D?S[z]:C[z],G=w===D?-C[z]:-S[z],K=t.elements.arrow,V=m&&K?I(K):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[U],te=X[F],ne=ge(0,S[z],V[z]),re=x?S[z]/2-H-ne-Y-A.mainAxis:W-ne-Y-A.mainAxis,oe=x?-S[z]/2+H+ne+te+A.mainAxis:G+ne+te+A.mainAxis,ie=t.elements.arrow&&j(t.elements.arrow),se=ie?"y"===E?ie.clientTop||0:ie.clientLeft||0:0,ae=null!=(L=null==P?void 0:P[E])?L:0,ce=$+oe-ae,ue=ge(m?p(q,$+re-ae-se):q,$,m?h(Z,ce):Z);k[E]=ue,O[E]=ue-$}if(a){var le,de="x"===E?M:N,fe="x"===E?R:B,he=k[_],pe="y"===_?"height":"width",ye=he+b[de],be=he-b[fe],ve=-1!==[M,N].indexOf(v),we=null!=(le=null==P?void 0:P[_])?le:0,xe=ve?ye:he-S[pe]-C[pe]-we+A.altAxis,Ee=ve?he+S[pe]+C[pe]-we-A.altAxis:be,_e=m&&ve?function(e,t,n){var r=ge(e,t,n);return r>n?n:r}(xe,he,Ee):ge(m?xe:ye,he,m?Ee:be);k[_]=_e,O[_]=_e-he}t.modifiersData[r]=O}},requiresIfExists:["offset"]};var be={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=J(n.placement),c=ee(a),u=[N,B].indexOf(a)>=0?"height":"width";if(i&&s){var l=function(e,t){return he("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:pe(e,U))}(o.padding,n),d=I(i),f="y"===c?M:N,h="y"===c?R:B,p=n.rects.reference[u]+n.rects.reference[c]-s[c]-n.rects.popper[u],m=s[c]-n.rects.reference[c],g=j(i),y=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=l[f],w=y-d[u]-l[h],x=y/2-d[u]/2+b,E=ge(v,x,w),_=c;n.modifiersData[r]=((t={})[_]=E,t.centerOffset=E-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ue(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function we(e){return[M,B,R,N].some((function(t){return e[t]>=0}))}var xe=X({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,s=r.resize,a=void 0===s||s,c=u(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach((function(e){e.addEventListener("scroll",n.update,Y)})),a&&c.addEventListener("resize",n.update,Y),function(){i&&l.forEach((function(e){e.removeEventListener("scroll",n.update,Y)})),a&&c.removeEventListener("resize",n.update,Y)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,c=void 0===a||a,u={placement:J(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];d(o)&&w(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});d(r)&&w(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},oe,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,u=n.padding,l=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,y=J(g),b=c||(y===g||!p?[se(g)]:function(e){if(J(e)===L)return[];var t=se(e);return[ce(e),t,ce(t)]}(g)),v=[g].concat(b).reduce((function(e,n){return e.concat(J(n)===L?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?Z:c,l=Q(r),d=l?a?q:q.filter((function(e){return Q(e)===l})):U,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var h=f.reduce((function(t,n){return t[n]=me(e,{placement:n,boundary:o,rootBoundary:i,padding:s})[J(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:l,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,x=t.rects.popper,E=new Map,_=!0,k=v[0],S=0;S<v.length;S++){var I=v[S],C=J(I),T=Q(I)===D,A=[M,R].indexOf(C)>=0,P=A?"width":"height",O=me(t,{placement:I,boundary:l,rootBoundary:d,altBoundary:f,padding:u}),j=A?T?B:N:T?R:M;w[P]>x[P]&&(j=se(j));var F=se(j),z=[];if(i&&z.push(O[C]<=0),a&&z.push(O[j]<=0,O[F]<=0),z.every((function(e){return e}))){k=I,_=!1;break}E.set(I,z)}if(_)for(var $=function(e){var t=v.find((function(t){var n=E.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},H=p?3:1;H>0;H--){if("break"===$(H))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ye,be,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=me(t,{elementContext:"reference"}),a=me(t,{altBoundary:!0}),c=ve(s,r),u=ve(a,o,i),l=we(c),d=we(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}}]}),Ee=n(94780),_e=n(78385),ke=n(34867);function Se(e){return(0,ke.Z)("MuiPopperUnstyled",e)}(0,n(1588).Z)("MuiPopperUnstyled",["root"]);var Ie=n(18793),Ce=n(85893);const Te=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],Ae=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function Pe(e){return"function"===typeof e?e():e}const Oe={},je=i.forwardRef((function(e,t){var n;const{anchorEl:c,children:u,component:l,direction:d,disablePortal:f,modifiers:h,open:p,ownerState:m,placement:g,popperOptions:y,popperRef:b,slotProps:v={},slots:w={},TransitionProps:x}=e,E=(0,o.Z)(e,Te),_=i.useRef(null),k=(0,s.Z)(_,t),S=i.useRef(null),I=(0,s.Z)(S,b),C=i.useRef(I);(0,a.Z)((()=>{C.current=I}),[I]),i.useImperativeHandle(b,(()=>S.current),[]);const T=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(g,d),[A,P]=i.useState(T);i.useEffect((()=>{S.current&&S.current.forceUpdate()})),(0,a.Z)((()=>{if(!c||!p)return;Pe(c);let e=[{name:"preventOverflow",options:{altBoundary:f}},{name:"flip",options:{altBoundary:f}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{P(e.placement)}}];null!=h&&(e=e.concat(h)),y&&null!=y.modifiers&&(e=e.concat(y.modifiers));const t=xe(Pe(c),_.current,(0,r.Z)({placement:T},y,{modifiers:e}));return C.current(t),()=>{t.destroy(),C.current(null)}}),[c,f,h,p,y,T]);const O={placement:A};null!==x&&(O.TransitionProps=x);const j=(0,Ee.Z)({root:["root"]},Se,{}),M=null!=(n=null!=l?l:w.root)?n:"div",R=(0,Ie.Z)({elementType:M,externalSlotProps:v.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:k},ownerState:(0,r.Z)({},e,m),className:j.root});return(0,Ce.jsx)(M,(0,r.Z)({},R,{children:"function"===typeof u?u(O):u}))}));var Me=i.forwardRef((function(e,t){const{anchorEl:n,children:s,container:a,direction:u="ltr",disablePortal:l=!1,keepMounted:d=!1,modifiers:f,open:h,placement:p="bottom",popperOptions:m=Oe,popperRef:g,style:y,transition:b=!1}=e,v=(0,o.Z)(e,Ae),[w,x]=i.useState(!0);if(!d&&!h&&(!b||w))return null;const E=a||(n?(0,c.Z)(Pe(n)).body:void 0);return(0,Ce.jsx)(_e.Z,{disablePortal:l,container:E,children:(0,Ce.jsx)(je,(0,r.Z)({anchorEl:n,direction:u,disablePortal:l,modifiers:f,ref:t,open:b?!w:h,placement:p,popperOptions:m,popperRef:g},v,{style:(0,r.Z)({position:"fixed",top:0,left:0,display:h||!d||b&&!w?null:"none"},y),TransitionProps:b?{in:h,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:null,children:s}))})})),Re=n(34168),Be=n(81719),Ne=n(78884);const Le=["components","componentsProps","slots","slotProps"],Ue=(0,Be.ZP)(Me,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({});var De=i.forwardRef((function(e,t){var n;const i=(0,Re.Z)(),s=(0,Ne.Z)({props:e,name:"MuiPopper"}),{components:a,componentsProps:c,slots:u,slotProps:l}=s,d=(0,o.Z)(s,Le),f=null!=(n=null==u?void 0:u.root)?n:null==a?void 0:a.Root;return(0,Ce.jsx)(Ue,(0,r.Z)({direction:null==i?void 0:i.direction,slots:{root:f},slotProps:null!=l?l:c},d,{ref:t}))}))},9144:function(e,t,n){"use strict";var r=n(63366),o=n(87462),i=n(67294),s=n(95408),a=n(98700),c=n(39707),u=n(59766),l=n(81719),d=n(78884),f=n(85893);const h=["component","direction","spacing","divider","children"];function p(e,t){const n=i.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,o)=>(e.push(r),o<n.length-1&&e.push(i.cloneElement(t,{key:`separator-${o}`})),e)),[])}const m=(0,l.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>[t.root]})((({ownerState:e,theme:t})=>{let n=(0,o.Z)({display:"flex",flexDirection:"column"},(0,s.k9)({theme:t},(0,s.P$)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e}))));if(e.spacing){const r=(0,a.hB)(t),o=Object.keys(t.breakpoints.values).reduce(((t,n)=>(("object"===typeof e.spacing&&null!=e.spacing[n]||"object"===typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t)),{}),i=(0,s.P$)({values:e.direction,base:o}),c=(0,s.P$)({values:e.spacing,base:o});"object"===typeof i&&Object.keys(i).forEach(((e,t,n)=>{if(!i[e]){const r=t>0?i[n[t-1]]:"column";i[e]=r}}));const l=(t,n)=>{return{"& > :not(style) + :not(style)":{margin:0,[`margin${o=n?i[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,a.NA)(r,t)}};var o};n=(0,u.Z)(n,(0,s.k9)({theme:t},c,l))}return n=(0,s.dt)(t.breakpoints,n),n})),g=i.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiStack"}),i=(0,c.Z)(n),{component:s="div",direction:a="column",spacing:u=0,divider:l,children:g}=i,y=(0,r.Z)(i,h),b={direction:a,spacing:u};return(0,f.jsx)(m,(0,o.Z)({as:s,ownerState:b,ref:t},y,{children:l?p(g,l):g}))}));t.Z=g},20784:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(78884),u=n(81719),l=n(1588),d=n(34867);function f(e){return(0,d.Z)("MuiToolbar",e)}(0,l.Z)("MuiToolbar",["root","gutters","regular","dense"]);var h=n(85893);const p=["className","component","disableGutters","variant"],m=(0,u.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((({theme:e,ownerState:t})=>(0,o.Z)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48})),(({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar));var g=i.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiToolbar"}),{className:i,component:u="div",disableGutters:l=!1,variant:d="regular"}=n,g=(0,r.Z)(n,p),y=(0,o.Z)({},n,{component:u,disableGutters:l,variant:d}),b=(e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return(0,a.Z)(o,f,t)})(y);return(0,h.jsx)(m,(0,o.Z)({as:u,className:(0,s.default)(b.root,i),ref:t,ownerState:y},g))}))},72389:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(94780),c=n(10238),u=n(41796),l=n(81719),d=n(62097),f=n(78884),h=n(36622),p=n(61760),m=n(58402),g=n(26432),y=n(84771),b=n(49669),v=n(51625),w=n(42293),x=n(1588),E=n(34867);function _(e){return(0,E.Z)("MuiTooltip",e)}var k=(0,x.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),S=n(85893);const I=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const C=(0,l.ZP)(m.Z,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((({theme:e,ownerState:t,open:n})=>(0,o.Z)({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${k.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${k.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${k.arrow}`]:(0,o.Z)({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${k.arrow}`]:(0,o.Z)({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),T=(0,l.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,h.Z)(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return(0,o.Z)({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,u.Fq)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:e.typography.fontWeightRegular},{[`.${k.popper}[data-popper-placement*="left"] &`]:(0,o.Z)({transformOrigin:"right center"},t.isRtl?(0,o.Z)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):(0,o.Z)({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${k.popper}[data-popper-placement*="right"] &`]:(0,o.Z)({transformOrigin:"left center"},t.isRtl?(0,o.Z)({marginRight:"14px"},t.touch&&{marginRight:"24px"}):(0,o.Z)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${k.popper}[data-popper-placement*="top"] &`]:(0,o.Z)({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${k.popper}[data-popper-placement*="bottom"] &`]:(0,o.Z)({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var n})),A=(0,l.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,u.Fq)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let P=!1,O=null;function j(e,t){return n=>{t&&t(n),e(n)}}var M=i.forwardRef((function(e,t){var n,u,l,x,E,k,M,R,B,N,L,U,D,F,z,$,q,Z,H;const W=(0,f.Z)({props:e,name:"MuiTooltip"}),{arrow:G=!1,children:K,components:V={},componentsProps:X={},describeChild:Y=!1,disableFocusListener:J=!1,disableHoverListener:Q=!1,disableInteractive:ee=!1,disableTouchListener:te=!1,enterDelay:ne=100,enterNextDelay:re=0,enterTouchDelay:oe=700,followCursor:ie=!1,id:se,leaveDelay:ae=0,leaveTouchDelay:ce=1500,onClose:ue,onOpen:le,open:de,placement:fe="bottom",PopperComponent:he,PopperProps:pe={},slotProps:me={},slots:ge={},title:ye,TransitionComponent:be=p.Z,TransitionProps:ve}=W,we=(0,r.Z)(W,I),xe=(0,d.Z)(),Ee="rtl"===xe.direction,[_e,ke]=i.useState(),[Se,Ie]=i.useState(null),Ce=i.useRef(!1),Te=ee||ie,Ae=i.useRef(),Pe=i.useRef(),Oe=i.useRef(),je=i.useRef(),[Me,Re]=(0,w.Z)({controlled:de,default:!1,name:"Tooltip",state:"open"});let Be=Me;const Ne=(0,b.Z)(se),Le=i.useRef(),Ue=i.useCallback((()=>{void 0!==Le.current&&(document.body.style.WebkitUserSelect=Le.current,Le.current=void 0),clearTimeout(je.current)}),[]);i.useEffect((()=>()=>{clearTimeout(Ae.current),clearTimeout(Pe.current),clearTimeout(Oe.current),Ue()}),[Ue]);const De=e=>{clearTimeout(O),P=!0,Re(!0),le&&!Be&&le(e)},Fe=(0,g.Z)((e=>{clearTimeout(O),O=setTimeout((()=>{P=!1}),800+ae),Re(!1),ue&&Be&&ue(e),clearTimeout(Ae.current),Ae.current=setTimeout((()=>{Ce.current=!1}),xe.transitions.duration.shortest)})),ze=e=>{Ce.current&&"touchstart"!==e.type||(_e&&_e.removeAttribute("title"),clearTimeout(Pe.current),clearTimeout(Oe.current),ne||P&&re?Pe.current=setTimeout((()=>{De(e)}),P?re:ne):De(e))},$e=e=>{clearTimeout(Pe.current),clearTimeout(Oe.current),Oe.current=setTimeout((()=>{Fe(e)}),ae)},{isFocusVisibleRef:qe,onBlur:Ze,onFocus:He,ref:We}=(0,v.Z)(),[,Ge]=i.useState(!1),Ke=e=>{Ze(e),!1===qe.current&&(Ge(!1),$e(e))},Ve=e=>{_e||ke(e.currentTarget),He(e),!0===qe.current&&(Ge(!0),ze(e))},Xe=e=>{Ce.current=!0;const t=K.props;t.onTouchStart&&t.onTouchStart(e)},Ye=ze,Je=$e,Qe=e=>{Xe(e),clearTimeout(Oe.current),clearTimeout(Ae.current),Ue(),Le.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",je.current=setTimeout((()=>{document.body.style.WebkitUserSelect=Le.current,ze(e)}),oe)},et=e=>{K.props.onTouchEnd&&K.props.onTouchEnd(e),Ue(),clearTimeout(Oe.current),Oe.current=setTimeout((()=>{Fe(e)}),ce)};i.useEffect((()=>{if(Be)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Fe(e)}}),[Fe,Be]);const tt=(0,y.Z)(K.ref,We,ke,t);ye||0===ye||(Be=!1);const nt=i.useRef({x:0,y:0}),rt=i.useRef(),ot={},it="string"===typeof ye;Y?(ot.title=Be||!it||Q?null:ye,ot["aria-describedby"]=Be?Ne:null):(ot["aria-label"]=it?ye:null,ot["aria-labelledby"]=Be&&!it?Ne:null);const st=(0,o.Z)({},ot,we,K.props,{className:(0,s.default)(we.className,K.props.className),onTouchStart:Xe,ref:tt},ie?{onMouseMove:e=>{const t=K.props;t.onMouseMove&&t.onMouseMove(e),nt.current={x:e.clientX,y:e.clientY},rt.current&&rt.current.update()}}:{});const at={};te||(st.onTouchStart=Qe,st.onTouchEnd=et),Q||(st.onMouseOver=j(Ye,st.onMouseOver),st.onMouseLeave=j(Je,st.onMouseLeave),Te||(at.onMouseOver=Ye,at.onMouseLeave=Je)),J||(st.onFocus=j(Ve,st.onFocus),st.onBlur=j(Ke,st.onBlur),Te||(at.onFocus=Ve,at.onBlur=Ke));const ct=i.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(Se),options:{element:Se,padding:4}}];return null!=(e=pe.popperOptions)&&e.modifiers&&(t=t.concat(pe.popperOptions.modifiers)),(0,o.Z)({},pe.popperOptions,{modifiers:t})}),[Se,pe]),ut=(0,o.Z)({},W,{isRtl:Ee,arrow:G,disableInteractive:Te,placement:fe,PopperComponentProp:he,touch:Ce.current}),lt=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,h.Z)(i.split("-")[0])}`],arrow:["arrow"]};return(0,a.Z)(s,_,t)})(ut),dt=null!=(n=null!=(u=ge.popper)?u:V.Popper)?n:C,ft=null!=(l=null!=(x=null!=(E=ge.transition)?E:V.Transition)?x:be)?l:p.Z,ht=null!=(k=null!=(M=ge.tooltip)?M:V.Tooltip)?k:T,pt=null!=(R=null!=(B=ge.arrow)?B:V.Arrow)?R:A,mt=(0,c.Z)(dt,(0,o.Z)({},pe,null!=(N=me.popper)?N:X.popper,{className:(0,s.default)(lt.popper,null==pe?void 0:pe.className,null==(L=null!=(U=me.popper)?U:X.popper)?void 0:L.className)}),ut),gt=(0,c.Z)(ft,(0,o.Z)({},ve,null!=(D=me.transition)?D:X.transition),ut),yt=(0,c.Z)(ht,(0,o.Z)({},null!=(F=me.tooltip)?F:X.tooltip,{className:(0,s.default)(lt.tooltip,null==(z=null!=($=me.tooltip)?$:X.tooltip)?void 0:z.className)}),ut),bt=(0,c.Z)(pt,(0,o.Z)({},null!=(q=me.arrow)?q:X.arrow,{className:(0,s.default)(lt.arrow,null==(Z=null!=(H=me.arrow)?H:X.arrow)?void 0:Z.className)}),ut);return(0,S.jsxs)(i.Fragment,{children:[i.cloneElement(K,st),(0,S.jsx)(dt,(0,o.Z)({as:null!=he?he:m.Z,placement:fe,anchorEl:ie?{getBoundingClientRect:()=>({top:nt.current.y,left:nt.current.x,right:nt.current.x,bottom:nt.current.y,width:0,height:0})}:_e,popperRef:rt,open:!!_e&&Be,id:Ne,transition:!0},at,mt,{popperOptions:ct,children:({TransitionProps:e})=>(0,S.jsx)(ft,(0,o.Z)({timeout:xe.transitions.duration.shorter},e,gt,{"data-foo":"bar",children:(0,S.jsxs)(ht,(0,o.Z)({},yt,{children:[ye,G?(0,S.jsx)(pt,(0,o.Z)({},bt,{ref:Ie})):null]}))}))}))]})}))},29630:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(63366),o=n(87462),i=n(67294),s=n(86010),a=n(39707),c=n(94780),u=n(81719),l=n(78884),d=n(36622),f=n(1588),h=n(34867);function p(e){return(0,h.Z)("MuiTypography",e)}(0,f.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(85893);const g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],y=(0,u.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,d.Z)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>(0,o.Z)({margin:0},t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},v={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var w=i.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiTypography"}),i=(e=>v[e]||e)(n.color),u=(0,a.Z)((0,o.Z)({},n,{color:i})),{align:f="inherit",className:h,component:w,gutterBottom:x=!1,noWrap:E=!1,paragraph:_=!1,variant:k="body1",variantMapping:S=b}=u,I=(0,r.Z)(u,g),C=(0,o.Z)({},u,{align:f,color:i,className:h,component:w,gutterBottom:x,noWrap:E,paragraph:_,variant:k,variantMapping:S}),T=w||(_?"p":S[k]||b[k])||"span",A=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,"inherit"!==e.align&&`align${(0,d.Z)(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,c.Z)(a,p,s)})(C);return(0,m.jsx)(y,(0,o.Z)({as:T,ref:t,ownerState:C,className:(0,s.default)(A.root,h)},I))}))},96903:function(e,t,n){"use strict";n(67294);var r=n(58175),o=n(85893);t.Z=(0,r.Z)((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},74821:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(87462),o=n(63366),i=n(71387),s=n(59766),a=n(66500);var c=n(41796);var u={black:"#000",white:"#fff"};var l={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var d={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var h={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var p={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var m={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var g={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const y=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.white,default:u.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},v={text:{primary:u.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:u.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,c.$n)(e.main,o):"dark"===t&&(e.dark=(0,c._j)(e.main,i)))}function x(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:a=.2}=e,x=(0,o.Z)(e,y),E=e.primary||function(e="light"){return"dark"===e?{main:p[200],light:p[50],dark:p[400]}:{main:p[700],light:p[400],dark:p[800]}}(t),_=e.secondary||function(e="light"){return"dark"===e?{main:d[200],light:d[50],dark:d[400]}:{main:d[500],light:d[300],dark:d[700]}}(t),k=e.error||function(e="light"){return"dark"===e?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(t),S=e.info||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:m[700],light:m[500],dark:m[900]}}(t),I=e.success||function(e="light"){return"dark"===e?{main:g[400],light:g[300],dark:g[700]}:{main:g[800],light:g[500],dark:g[900]}}(t),C=e.warning||function(e="light"){return"dark"===e?{main:h[400],light:h[300],dark:h[700]}:{main:"#ed6c02",light:h[500],dark:h[900]}}(t);function T(e){return(0,c.mi)(e,v.text.primary)>=n?v.text.primary:b.text.primary}const A=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:s=700})=>{if(!(e=(0,r.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,i.Z)(11,t?` (${t})`:"",n));if("string"!==typeof e.main)throw new Error((0,i.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return w(e,"light",o,a),w(e,"dark",s,a),e.contrastText||(e.contrastText=T(e.main)),e},P={dark:v,light:b};return(0,s.Z)((0,r.Z)({common:(0,r.Z)({},u),mode:t,primary:A({color:E,name:"primary"}),secondary:A({color:_,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:A({color:k,name:"error"}),warning:A({color:C,name:"warning"}),info:A({color:S,name:"info"}),success:A({color:I,name:"success"}),grey:l,contrastThreshold:n,getContrastText:T,augmentColor:A,tonalOffset:a},P[t]),x)}const E=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const _={textTransform:"uppercase"},k='"Roboto", "Helvetica", "Arial", sans-serif';function S(e,t){const n="function"===typeof t?t(e):t,{fontFamily:i=k,fontSize:a=14,fontWeightLight:c=300,fontWeightRegular:u=400,fontWeightMedium:l=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:h,pxToRem:p}=n,m=(0,o.Z)(n,E);const g=a/14,y=p||(e=>e/f*g+"rem"),b=(e,t,n,o,s)=>{return(0,r.Z)({fontFamily:i,fontWeight:e,fontSize:y(t),lineHeight:n},i===k?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},s,h);var a},v={h1:b(c,96,1.167,-1.5),h2:b(c,60,1.2,-.5),h3:b(u,48,1.167,0),h4:b(u,34,1.235,.25),h5:b(u,24,1.334,0),h6:b(l,20,1.6,.15),subtitle1:b(u,16,1.75,.15),subtitle2:b(l,14,1.57,.1),body1:b(u,16,1.5,.15),body2:b(u,14,1.43,.15),button:b(l,14,1.75,.4,_),caption:b(u,12,1.66,.4),overline:b(u,12,2.66,1,_)};return(0,s.Z)((0,r.Z)({htmlFontSize:f,pxToRem:y,fontFamily:i,fontSize:a,fontWeightLight:c,fontWeightRegular:u,fontWeightMedium:l,fontWeightBold:d},v),m,{clone:!1})}function I(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var C=["none",I(0,2,1,-1,0,1,1,0,0,1,3,0),I(0,3,1,-2,0,2,2,0,0,1,5,0),I(0,3,3,-2,0,3,4,0,0,1,8,0),I(0,2,4,-1,0,4,5,0,0,1,10,0),I(0,3,5,-1,0,5,8,0,0,1,14,0),I(0,3,5,-1,0,6,10,0,0,1,18,0),I(0,4,5,-2,0,7,10,1,0,2,16,1),I(0,5,5,-3,0,8,10,1,0,3,14,2),I(0,5,6,-3,0,9,12,1,0,3,16,2),I(0,6,6,-3,0,10,14,1,0,4,18,3),I(0,6,7,-4,0,11,15,1,0,4,20,3),I(0,7,8,-4,0,12,17,2,0,5,22,4),I(0,7,8,-4,0,13,19,2,0,5,24,4),I(0,7,9,-4,0,14,21,2,0,5,26,4),I(0,8,9,-5,0,15,22,2,0,6,28,5),I(0,8,10,-5,0,16,24,2,0,6,30,5),I(0,8,11,-5,0,17,26,2,0,6,32,5),I(0,9,11,-5,0,18,28,2,0,7,34,6),I(0,9,12,-6,0,19,29,2,0,7,36,6),I(0,10,13,-6,0,20,31,3,0,8,38,7),I(0,10,13,-6,0,21,33,3,0,8,40,7),I(0,10,14,-6,0,22,35,3,0,8,42,7),I(0,11,14,-7,0,23,36,3,0,9,44,8),I(0,11,15,-7,0,24,38,3,0,9,46,8)],T=n(53204);var A={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function O(e={},...t){const{mixins:n={},palette:c={},transitions:u={},typography:l={}}=e,d=(0,o.Z)(e,P);if(e.vars)throw new Error((0,i.Z)(18));const f=x(c),h=(0,a.Z)(e);let p=(0,s.Z)(h,{mixins:(m=h.breakpoints,g=n,(0,r.Z)({toolbar:{minHeight:56,[m.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[m.up("sm")]:{minHeight:64}}},g)),palette:f,shadows:C.slice(),typography:S(f,l),transitions:(0,T.ZP)(u),zIndex:(0,r.Z)({},A)});var m,g;return p=(0,s.Z)(p,d),p=t.reduce(((e,t)=>(0,s.Z)(e,t)),p),p}var j=O},53204:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l},x9:function(){return a}});var r=n(63366),o=n(87462);const i=["duration","easing","delay"],s={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function c(e){return`${Math.round(e)}ms`}function u(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function l(e){const t=(0,o.Z)({},s,e.easing),n=(0,o.Z)({},a,e.duration);return(0,o.Z)({getAutoHeightDuration:u,create:(e=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:u=0}=o;(0,r.Z)(o,i);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof s?s:c(s)} ${a} ${"string"===typeof u?u:c(u)}`)).join(",")}},e,{easing:t,duration:n})}},80702:function(e,t,n){"use strict";function r(e){return String(parseFloat(e)).length===String(e).length}function o(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function i(e){return parseFloat(e)}function s(e){return(t,n)=>{const r=o(t);if(r===n)return t;let s=i(t);"px"!==r&&("em"===r||"rem"===r)&&(s=i(t)*i(e));let a=s;if("px"!==n)if("em"===n)a=s/i(e);else{if("rem"!==n)return t;a=s/i(e)}return parseFloat(a.toFixed(5))+n}}function a({size:e,grid:t}){const n=e-e%t,r=n+t;return e-n<r-e?n:r}function c({lineHeight:e,pixels:t,htmlFontSize:n}){return t/(e*n)}function u({cssProperty:e,min:t,max:n,unit:r="rem",breakpoints:o=[600,900,1200],transform:i=null}){const s={[e]:`${t}${r}`},a=(n-t)/o[o.length-1];return o.forEach((n=>{let o=t+a*n;null!==i&&(o=i(o)),s[`@media (min-width:${n}px)`]={[e]:`${Math.round(1e4*o)/1e4}${r}`}})),s}n.d(t,{LV:function(){return a},Wy:function(){return o},YL:function(){return i},dA:function(){return r},vY:function(){return c},vs:function(){return s},ze:function(){return u}})},25165:function(e,t,n){"use strict";const r=(0,n(74821).Z)();t.Z=r},81719:function(e,t,n){"use strict";n.d(t,{Dz:function(){return s},FO:function(){return i}});var r=n(70182),o=n(25165);const i=e=>(0,r.x9)(e)&&"classes"!==e,s=r.x9,a=(0,r.ZP)({defaultTheme:o.Z,rootShouldForwardProp:i});t.ZP=a},62097:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});n(67294);var r=n(96682),o=n(25165);function i(){return(0,r.Z)(o.Z)}},78884:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(65149),o=n(25165);function i({props:e,name:t}){return(0,r.Z)({props:e,name:t,defaultTheme:o.Z})}},53566:function(e,t,n){"use strict";n.d(t,{C:function(){return o},n:function(){return r}});const r=e=>e.scrollTop;function o(e,t){var n,r;const{timeout:o,easing:i,style:s={}}=e;return{duration:null!=(n=s.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=s.transitionTimingFunction)?r:"object"===typeof i?i[t.mode]:i,delay:s.transitionDelay}}},36622:function(e,t,n){"use strict";var r=n(28320);t.Z=r.Z},58175:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(87462),o=n(67294),i=n(63366),s=n(86010),a=n(94780),c=n(36622),u=n(78884),l=n(81719),d=n(1588),f=n(34867);function h(e){return(0,f.Z)("MuiSvgIcon",e)}(0,d.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(85893);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,l.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,c.Z)(n.color)}`],t[`fontSize${(0,c.Z)(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(i=o.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(s=e.typography)||null==(a=s.pxToRem)?void 0:a.call(s,20))||"1.25rem",medium:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,24))||"1.5rem",large:(null==(l=e.typography)||null==(d=l.pxToRem)?void 0:d.call(l,35))||"2.1875rem"}[t.fontSize],color:null!=(f=null==(h=(e.vars||e).palette)||null==(p=h[t.color])?void 0:p.main)?f:{action:null==(m=(e.vars||e).palette)||null==(g=m.action)?void 0:g.active,disabled:null==(y=(e.vars||e).palette)||null==(b=y.action)?void 0:b.disabled,inherit:void 0}[t.color]}})),y=o.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSvgIcon"}),{children:o,className:l,color:d="inherit",component:f="svg",fontSize:y="medium",htmlColor:b,inheritViewBox:v=!1,titleAccess:w,viewBox:x="0 0 24 24"}=n,E=(0,i.Z)(n,m),_=(0,r.Z)({},n,{color:d,component:f,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:v,viewBox:x}),k={};v||(k.viewBox=x);const S=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&`color${(0,c.Z)(t)}`,`fontSize${(0,c.Z)(n)}`]};return(0,a.Z)(o,h,r)})(_);return(0,p.jsxs)(g,(0,r.Z)({as:f,className:(0,s.default)(S.root,l),focusable:"false",color:b,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},k,E,{ownerState:_,children:[o,w?(0,p.jsx)("title",{children:w}):null]}))}));y.muiName="SvgIcon";var b=y;function v(e,t){function n(n,o){return(0,p.jsx)(b,(0,r.Z)({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return n.muiName=b.muiName,o.memo(o.forwardRef(n))}},75400:function(e,t,n){"use strict";var r=n(87596);t.Z=r.Z},58075:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return o.Z},createChainedFunction:function(){return i},createSvgIcon:function(){return s.Z},debounce:function(){return a.Z},deprecatedPropType:function(){return c},isMuiElement:function(){return u.Z},ownerDocument:function(){return l.Z},ownerWindow:function(){return d.Z},requirePropFactory:function(){return f},setRef:function(){return h},unstable_ClassNameGenerator:function(){return x},unstable_useEnhancedEffect:function(){return p.Z},unstable_useId:function(){return m.Z},unsupportedProp:function(){return g},useControlled:function(){return y.Z},useEventCallback:function(){return b.Z},useForkRef:function(){return v.Z},useIsFocusVisible:function(){return w.Z}});var r=n(37078),o=n(36622),i=n(49064).Z,s=n(58175),a=n(75400);var c=function(e,t){return()=>null},u=n(7335),l=n(47505),d=n(57577);n(87462);var f=function(e,t){return()=>null},h=n(7960).Z,p=n(63289),m=n(49669);var g=function(e,t,n,r,o){return null},y=n(42293),b=n(26432),v=n(84771),w=n(51625);const x={configure:e=>{console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join("\n")),r.Z.configure(e)}}},7335:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294);var o=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},47505:function(e,t,n){"use strict";var r=n(57094);t.Z=r.Z},57577:function(e,t,n){"use strict";var r=n(58290);t.Z=r.Z},42293:function(e,t,n){"use strict";var r=n(8925);t.Z=r.Z},63289:function(e,t,n){"use strict";var r=n(16600);t.Z=r.Z},26432:function(e,t,n){"use strict";var r=n(73633);t.Z=r.Z},84771:function(e,t,n){"use strict";var r=n(30067);t.Z=r.Z},49669:function(e,t,n){"use strict";var r=n(57579);t.Z=r.Z},51625:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(67294);let o,i=!0,s=!1;const a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function l(){"hidden"===this.visibilityState&&s&&(i=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!a[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}var f=function(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",l,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(s=!0,window.clearTimeout(o),o=window.setTimeout((()=>{s=!1}),100),t.current=!1,!0)},ref:e}}},63023:function(e,t){"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case s:case f:case h:return e;default:switch(e=e&&e.$$typeof){case l:case u:case d:case m:case p:case c:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference")},76607:function(e,t,n){"use strict";n(63023)},44819:function(e,t,n){"use strict";const r=n(67294).createContext(null);t.Z=r},56760:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294),o=n(44819);function i(){return r.useContext(o.Z)}},78883:function(e,t,n){"use strict";n.d(t,{Co:function(){return i},ZP:function(){return o}});var r=n(16829);function o(e,t){return(0,r.Z)(e,t)}const i=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},95408:function(e,t,n){"use strict";n.d(t,{L7:function(){return c},P$:function(){return l},VO:function(){return o},W8:function(){return a},dt:function(){return u},k9:function(){return s}});var r=n(59766);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${o[e]}px)`};function s(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||i;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||i;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function a(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function c(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function u(e,...t){const n=a(e),o=[n,...t].reduce(((e,t)=>(0,r.Z)(e,t)),{});return c(Object.keys(n),o)}function l({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"===typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}},41796:function(e,t,n){"use strict";n.d(t,{$n:function(){return d},Fq:function(){return u},_4:function(){return f},_j:function(){return l},mi:function(){return c}});var r=n(71387);function o(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));let o,s=e.substring(t+1,e.length-1);if("color"===n){if(s=s.split(" "),o=s.shift(),4===s.length&&"/"===s[3].charAt(0)&&(s[3]=s[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,r.Z)(10,o))}else s=s.split(",");return s=s.map((e=>parseFloat(e))),{type:n,values:s,colorSpace:o}}function s(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function a(e){let t="hsl"===(e=i(e)).type||"hsla"===e.type?i(function(e){e=i(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),c=(e,t=(e+n/30)%12)=>o-a*Math.max(Math.min(t-3,9-t,1),-1);let u="rgb";const l=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(u+="a",l.push(t[3])),s({type:u,values:l})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=a(e),r=a(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e,t){return e=i(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,s(e)}function l(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return s(e)}function d(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return s(e)}function f(e,t=.15){return a(e)>.5?l(e,t):d(e,t)}},70182:function(e,t,n){"use strict";n.d(t,{ZP:function(){return b},x9:function(){return g}});var r=n(63366),o=n(87462),i=n(78883),s=n(66500),a=n(28320);const c=["variant"];function u(e){return 0===e.length}function l(e){const{variant:t}=e,n=(0,r.Z)(e,c);let o=t||"";return Object.keys(n).sort().forEach((t=>{o+="color"===t?u(o)?e[t]:(0,a.Z)(e[t]):`${u(o)?t:(0,a.Z)(t)}${(0,a.Z)(e[t].toString())}`})),o}var d=n(86523);const f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],h=["theme"],p=["theme"];function m(e){return 0===Object.keys(e).length}function g(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const y=(0,s.Z)();function b(e={}){const{defaultTheme:t=y,rootShouldForwardProp:n=g,slotShouldForwardProp:s=g,styleFunctionSx:a=d.Z}=e,c=e=>{const n=m(e.theme)?t:e.theme;return a((0,o.Z)({},e,{theme:n}))};return c.__mui_systemSx=!0,(e,a={})=>{(0,i.Co)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:u,slot:d,skipVariantsResolver:y,skipSx:b,overridesResolver:v}=a,w=(0,r.Z)(a,f),x=void 0!==y?y:d&&"Root"!==d||!1,E=b||!1;let _=g;"Root"===d?_=n:d?_=s:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(_=void 0);const k=(0,i.ZP)(e,(0,o.Z)({shouldForwardProp:_,label:undefined},w)),S=(e,...n)=>{const i=n?n.map((e=>"function"===typeof e&&e.__emotion_real!==e?n=>{let{theme:i}=n,s=(0,r.Z)(n,h);return e((0,o.Z)({theme:m(i)?t:i},s))}:e)):[];let s=e;u&&v&&i.push((e=>{const n=m(e.theme)?t:e.theme,r=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(u,n);if(r){const t={};return Object.entries(r).forEach((([r,i])=>{t[r]="function"===typeof i?i((0,o.Z)({},e,{theme:n})):i})),v(e,t)}return null})),u&&!x&&i.push((e=>{const n=m(e.theme)?t:e.theme;return((e,t,n,r)=>{var o,i;const{ownerState:s={}}=e,a=[],c=null==n||null==(o=n.components)||null==(i=o[r])?void 0:i.variants;return c&&c.forEach((n=>{let r=!0;Object.keys(n.props).forEach((t=>{s[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&a.push(t[l(n.props)])})),a})(e,((e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach((e=>{const t=l(e.props);r[t]=e.style})),r})(u,n),n,u)})),E||i.push(c);const a=i.length-n.length;if(Array.isArray(e)&&a>0){const t=new Array(a).fill("");s=[...e,...t],s.raw=[...e.raw,...t]}else"function"===typeof e&&e.__emotion_real!==e&&(s=n=>{let{theme:i}=n,s=(0,r.Z)(n,p);return e((0,o.Z)({theme:m(i)?t:i},s))});return k(s,...i)};return k.withConfig&&(S.withConfig=k.withConfig),S}}},66500:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(87462),o=n(63366),i=n(59766);const s=["values","unit","step"];function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:i=5}=e,a=(0,o.Z)(e,s),c=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,r.Z)({},e,{[t.key]:t.val})),{})})(t),u=Object.keys(c);function l(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function d(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-i/100}${n})`}function f(e,r){const o=u.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"===typeof t[u[o]]?t[u[o]]:r)-i/100}${n})`}return(0,r.Z)({keys:u,values:c,up:l,down:d,between:f,only:function(e){return u.indexOf(e)+1<u.length?f(e,u[u.indexOf(e)+1]):l(e)},not:function(e){const t=u.indexOf(e);return 0===t?l(u[1]):t===u.length-1?d(u[t]):f(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},a)}var c={borderRadius:4},u=n(98700);const l=["breakpoints","palette","spacing","shape"];var d=function(e={},...t){const{breakpoints:n={},palette:s={},spacing:d,shape:f={}}=e,h=(0,o.Z)(e,l),p=a(n),m=function(e=8){if(e.mui)return e;const t=(0,u.hB)({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(d);let g=(0,i.Z)({breakpoints:p,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},s),spacing:m,shape:(0,r.Z)({},c,f)},h);return g=t.reduce(((e,t)=>(0,i.Z)(e,t)),g),g}},85578:function(e,t,n){"use strict";n.d(t,{Gc:function(){return X},G$:function(){return V}});var r=n(54844),o=n(47730);var i=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?(0,o.Z)(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n},s=n(98700),a=n(95408);function c(e){return"number"!==typeof e?e:`${e}px solid`}const u=(0,r.Z)({prop:"border",themeKey:"borders",transform:c}),l=(0,r.Z)({prop:"borderTop",themeKey:"borders",transform:c}),d=(0,r.Z)({prop:"borderRight",themeKey:"borders",transform:c}),f=(0,r.Z)({prop:"borderBottom",themeKey:"borders",transform:c}),h=(0,r.Z)({prop:"borderLeft",themeKey:"borders",transform:c}),p=(0,r.Z)({prop:"borderColor",themeKey:"palette"}),m=(0,r.Z)({prop:"borderTopColor",themeKey:"palette"}),g=(0,r.Z)({prop:"borderRightColor",themeKey:"palette"}),y=(0,r.Z)({prop:"borderBottomColor",themeKey:"palette"}),b=(0,r.Z)({prop:"borderLeftColor",themeKey:"palette"}),v=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,s.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,s.NA)(t,e)});return(0,a.k9)(e,e.borderRadius,n)}return null};v.propTypes={},v.filterProps=["borderRadius"];var w=i(u,l,d,f,h,p,m,g,y,b,v);var x=i((0,r.Z)({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),(0,r.Z)({prop:"display"}),(0,r.Z)({prop:"overflow"}),(0,r.Z)({prop:"textOverflow"}),(0,r.Z)({prop:"visibility"}),(0,r.Z)({prop:"whiteSpace"}));var E=i((0,r.Z)({prop:"flexBasis"}),(0,r.Z)({prop:"flexDirection"}),(0,r.Z)({prop:"flexWrap"}),(0,r.Z)({prop:"justifyContent"}),(0,r.Z)({prop:"alignItems"}),(0,r.Z)({prop:"alignContent"}),(0,r.Z)({prop:"order"}),(0,r.Z)({prop:"flex"}),(0,r.Z)({prop:"flexGrow"}),(0,r.Z)({prop:"flexShrink"}),(0,r.Z)({prop:"alignSelf"}),(0,r.Z)({prop:"justifyItems"}),(0,r.Z)({prop:"justifySelf"}));const _=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,s.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,s.NA)(t,e)});return(0,a.k9)(e,e.gap,n)}return null};_.propTypes={},_.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,s.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,s.NA)(t,e)});return(0,a.k9)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const S=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,s.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,s.NA)(t,e)});return(0,a.k9)(e,e.rowGap,n)}return null};S.propTypes={},S.filterProps=["rowGap"];var I=i(_,k,S,(0,r.Z)({prop:"gridColumn"}),(0,r.Z)({prop:"gridRow"}),(0,r.Z)({prop:"gridAutoFlow"}),(0,r.Z)({prop:"gridAutoColumns"}),(0,r.Z)({prop:"gridAutoRows"}),(0,r.Z)({prop:"gridTemplateColumns"}),(0,r.Z)({prop:"gridTemplateRows"}),(0,r.Z)({prop:"gridTemplateAreas"}),(0,r.Z)({prop:"gridArea"}));var C=i((0,r.Z)({prop:"position"}),(0,r.Z)({prop:"zIndex",themeKey:"zIndex"}),(0,r.Z)({prop:"top"}),(0,r.Z)({prop:"right"}),(0,r.Z)({prop:"bottom"}),(0,r.Z)({prop:"left"}));function T(e,t){return"grey"===t?t:e}var A=i((0,r.Z)({prop:"color",themeKey:"palette",transform:T}),(0,r.Z)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:T}),(0,r.Z)({prop:"backgroundColor",themeKey:"palette",transform:T}));var P=(0,r.Z)({prop:"boxShadow",themeKey:"shadows"});function O(e){return e<=1&&0!==e?100*e+"%":e}const j=(0,r.Z)({prop:"width",transform:O}),M=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,o;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(o=r.values)?void 0:o[t])||a.VO[t]||O(t)}};return(0,a.k9)(e,e.maxWidth,t)}return null};M.filterProps=["maxWidth"];const R=(0,r.Z)({prop:"minWidth",transform:O}),B=(0,r.Z)({prop:"height",transform:O}),N=(0,r.Z)({prop:"maxHeight",transform:O}),L=(0,r.Z)({prop:"minHeight",transform:O});(0,r.Z)({prop:"size",cssProperty:"width",transform:O}),(0,r.Z)({prop:"size",cssProperty:"height",transform:O});var U=i(j,M,R,B,N,L,(0,r.Z)({prop:"boxSizing"}));const D=(0,r.Z)({prop:"fontFamily",themeKey:"typography"}),F=(0,r.Z)({prop:"fontSize",themeKey:"typography"}),z=(0,r.Z)({prop:"fontStyle",themeKey:"typography"}),$=(0,r.Z)({prop:"fontWeight",themeKey:"typography"}),q=(0,r.Z)({prop:"letterSpacing"}),Z=(0,r.Z)({prop:"textTransform"}),H=(0,r.Z)({prop:"lineHeight"}),W=(0,r.Z)({prop:"textAlign"});var G=i((0,r.Z)({prop:"typography",cssProperty:!1,themeKey:"typography"}),D,F,z,$,q,H,W,Z);const K={borders:w.filterProps,display:x.filterProps,flexbox:E.filterProps,grid:I.filterProps,positions:C.filterProps,palette:A.filterProps,shadows:P.filterProps,sizing:U.filterProps,spacing:s.ZP.filterProps,typography:G.filterProps},V={borders:w,display:x,flexbox:E,grid:I,positions:C,palette:A,shadows:P,sizing:U,spacing:s.ZP,typography:G},X=Object.keys(K).reduce(((e,t)=>(K[t].forEach((n=>{e[n]=V[t]})),e)),{})},47730:function(e,t,n){"use strict";var r=n(59766);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},98700:function(e,t,n){"use strict";n.d(t,{hB:function(){return p},eI:function(){return h},ZP:function(){return x},NA:function(){return m}});var r=n(95408),o=n(54844),i=n(47730);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!c[e])return[e];e=c[e]}const[t,n]=e.split(""),r=s[t],o=a[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),l=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...l,...d];function h(e,t,n,r){var i;const s=null!=(i=(0,o.D)(e,t,!1))?i:n;return"number"===typeof s?e=>"string"===typeof e?e:s*e:Array.isArray(s)?e=>"string"===typeof e?e:s[e]:"function"===typeof s?s:()=>{}}function p(e){return h(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function g(e,t,n,o){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(u(n),o),s=e[n];return(0,r.k9)(e,s,i)}function y(e,t){const n=p(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(i.Z,{})}function b(e){return y(e,l)}function v(e){return y(e,d)}function w(e){return y(e,f)}b.propTypes={},b.filterProps=l,v.propTypes={},v.filterProps=d,w.propTypes={},w.filterProps=f;var x=w},54844:function(e,t,n){"use strict";n.d(t,{D:function(){return i}});var r=n(28320),o=n(95408);function i(e,t,n=!0){if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function s(e,t,n,r=n){let o;return o="function"===typeof e?e(n):Array.isArray(e)?e[n]||r:i(e,n)||r,t&&(o=t(o,r)),o}t.Z=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:c}=e,u=e=>{if(null==e[t])return null;const u=e[t],l=i(e.theme,a)||{};return(0,o.k9)(e,u,(e=>{let o=s(l,c,e);return e===o&&"string"===typeof e&&(o=s(l,c,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n?o:{[n]:o}}))};return u.propTypes={},u.filterProps=[t],u}},39707:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(87462),o=n(63366),i=n(59766),s=n(85578);const a=["sx"];function c(e){const{sx:t}=e,n=(0,o.Z)(e,a),{systemProps:c,otherProps:u}=(e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((n=>{s.Gc[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]})),t})(n);let l;return l=Array.isArray(t)?[c,...t]:"function"===typeof t?(...e)=>{const n=t(...e);return(0,i.P)(n)?(0,r.Z)({},c,n):c}:(0,r.Z)({},c,t),(0,r.Z)({},u,{sx:l})}},86523:function(e,t,n){"use strict";var r=n(47730),o=n(85578),i=n(95408);const s=function(e=o.G$){const t=Object.keys(e).reduce(((t,n)=>(e[n].filterProps.forEach((r=>{t[r]=e[n]})),t)),{});function n(e,n,r){const o={[e]:n,theme:r},i=t[e];return i?i(o):{[e]:n}}return function e(o){const{sx:s,theme:a={}}=o||{};if(!s)return null;function c(o){let s=o;if("function"===typeof o)s=o(a);else if("object"!==typeof o)return o;if(!s)return null;const c=(0,i.W8)(a.breakpoints),u=Object.keys(c);let l=c;return Object.keys(s).forEach((o=>{const c=(u=s[o],d=a,"function"===typeof u?u(d):u);var u,d;if(null!==c&&void 0!==c)if("object"===typeof c)if(t[o])l=(0,r.Z)(l,n(o,c,a));else{const t=(0,i.k9)({theme:a},c,(e=>({[o]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(t,c)?l=(0,r.Z)(l,t):l[o]=e({sx:c,theme:a})}else l=(0,r.Z)(l,n(o,c,a))})),(0,i.L7)(u,l)}return Array.isArray(s)?s.map(c):c(s)}}();s.filterProps=["sx"],t.Z=s},96682:function(e,t,n){"use strict";var r=n(66500),o=n(34168);const i=(0,r.Z)();t.Z=function(e=i){return(0,o.Z)(e)}},65149:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(47925);var o=n(96682);function i({props:e,name:t,defaultTheme:n}){const i=function(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,o):o}({theme:(0,o.Z)(n),name:t,props:e});return i}},34168:function(e,t,n){"use strict";var r=n(56760);t.Z=function(e=null){const t=(0,r.Z)();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},37078:function(e,t){"use strict";const n=e=>e,r=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})();t.Z=r},28320:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(71387);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},94780:function(e,t,n){"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>(r&&(e.push(t(r)),n&&n[r]&&e.push(n[r])),e)),[]).join(" ")})),r}n.d(t,{Z:function(){return r}})},49064:function(e,t,n){"use strict";function r(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}n.d(t,{Z:function(){return r}})},87596:function(e,t,n){"use strict";function r(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}n.d(t,{Z:function(){return r}})},59766:function(e,t,n){"use strict";n.d(t,{P:function(){return o},Z:function(){return i}});var r=n(87462);function o(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function i(e,t,n={clone:!0}){const s=n.clone?(0,r.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(o(t[r])&&r in e&&o(e[r])?s[r]=i(e[r],t[r],n):s[r]=t[r])})),s}},71387:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{Z:function(){return r}})},34867:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(37078);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function i(e,t,n="Mui"){const i=o[t];return i?`${n}-${i}`:`${r.Z.generate(e)}-${t}`}},1588:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(34867);function o(e,t,n="Mui"){const o={};return t.forEach((t=>{o[t]=(0,r.Z)(e,t,n)})),o}},95806:function(e,t,n){"use strict";function r(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}n.d(t,{Z:function(){return r}})},57094:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},58290:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(57094);function o(e){return(0,r.Z)(e).defaultView||window}},47925:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(87462);function o(e,t){const n=(0,r.Z)({},t);return Object.keys(e).forEach((i=>{if(i.toString().match(/^(components|slots)$/))n[i]=(0,r.Z)({},e[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const s=e[i]||{},a=t[i];n[i]={},a&&Object.keys(a)?s&&Object.keys(s)?(n[i]=(0,r.Z)({},a),Object.keys(s).forEach((e=>{n[i][e]=o(s[e],a[e])}))):n[i]=a:n[i]=s}else void 0===n[i]&&(n[i]=e[i])})),n}},7960:function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},8925:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294);function o({controlled:e,default:t,name:n,state:o="value"}){const{current:i}=r.useRef(void 0!==e),[s,a]=r.useState(t);return[i?e:s,r.useCallback((e=>{i||a(e)}),[])]}},16600:function(e,t,n){"use strict";var r=n(67294);const o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;t.Z=o},73633:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294),o=n(16600);function i(e){const t=r.useRef(e);return(0,o.Z)((()=>{t.current=e})),r.useCallback(((...e)=>(0,t.current)(...e)),[])}},30067:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294),o=n(7960);function i(...e){return r.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{(0,o.Z)(e,t)}))}),e)}},57579:function(e,t,n){"use strict";var r;n.d(t,{Z:function(){return a}});var o=n(67294);let i=0;const s=(r||(r=n.t(o,2))).useId;function a(e){if(void 0!==s){const t=s();return null!=e?e:t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n(`mui-${i}`))}),[t]),r}(e)}},27320:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!==typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"===typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Expected Uint8Array");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=n,t.bool=r,t.bytes=o,t.hash=i,t.exists=s,t.output=a;const c={number:n,bool:r,bytes:o,hash:i,exists:s,output:a};t.default=c},27505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const r=n(27320),o=n(98089);class i extends o.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){(0,r.exists)(this);const{view:t,buffer:n,blockLen:i}=this,s=(e=(0,o.toBytes)(e)).length;for(let r=0;r<s;){const a=Math.min(i-this.pos,s-r);if(a!==i)n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===i&&(this.process(t,0),this.pos=0);else{const t=(0,o.createView)(e);for(;i<=s-r;r+=i)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.exists)(this),(0,r.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:i,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(n,0),a=0);for(let r=a;r<i;r++)t[r]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,i-8,BigInt(8*this.length),s),this.process(n,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let r=0;r<l;r++)c.setUint32(4*r,d[r],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}}t.SHA2=i},31945:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},79569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(27320),o=n(98089);class i extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(e);const n=(0,o.toBytes)(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let r=0;r<s.length;r++)s[r]^=54;this.iHash.update(s),this.oHash=e.create();for(let r=0;r<s.length;r++)s[r]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,r.exists)(this),this.iHash.update(e),this}digestInto(e){(0,r.exists)(this),(0,r.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:o,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=o,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i;t.hmac=(e,t,n)=>new i(e,t).update(n).digest(),t.hmac.create=(e,t)=>new i(e,t)},23061:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const r=n(27505),o=n(98089),i=(e,t,n)=>e&t^e&n^t&n,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends r.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a}=this;return[e,t,n,r,o,i,s,a]}set(e,t,n,r,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let o=0;o<16;o++,t+=4)c[o]=e.getUint32(t,!1);for(let i=16;i<64;i++){const e=c[i-15],t=c[i-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,r=(0,o.rotr)(t,17)^(0,o.rotr)(t,19)^t>>>10;c[i]=r+c[i-7]+n+c[i-16]|0}let{A:n,B:r,C:a,D:u,E:l,F:d,G:f,H:h}=this;for(let m=0;m<64;m++){const e=h+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((p=l)&d^~p&f)+s[m]+c[m]|0,t=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+i(n,r,a)|0;h=f,f=d,d=l,l=u+e|0,u=a,a=r,r=n,n=e+t|0}var p;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,r,a,u,l,d,f,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new u)),t.sha224=(0,o.wrapConstructor)((()=>new l))},98089:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const r=n(31945);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);function o(e){return e instanceof Uint8Array||null!=e&&"object"===typeof e&&"Uint8Array"===e.constructor.name}t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=i[e[n]];return t};const s=48,a=57,c=65,u=70,l=97,d=102;function f(e){return e>=s&&e<=a?e-s:e>=c&&e<=u?e-(c-10):e>=l&&e<=d?e-(l-10):void 0}t.hexToBytes=function(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const t=f(e.charCodeAt(i)),n=f(e.charCodeAt(i+1));if(void 0===t||void 0===n){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[o]=16*t+n}return r};function h(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function p(e){if("string"===typeof e&&(e=h(e)),!o(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.nextTick=async()=>{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let i=0;i<e;i++){r(i);const e=Date.now()-o;e>=0&&e<n||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=h,t.toBytes=p,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(!o(n))throw new Error("Uint8Array expected");t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n};t.Hash=class{clone(){return this._cloneInto()}};const m={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==m.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(p(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(p(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(p(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"===typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},79656:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.Signature=t.Point=t.CURVE=void 0;const r=n(69159),o=BigInt(0),i=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(8),u=Object.freeze({a:o,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:i,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});t.CURVE=u;const l=(e,t)=>(e+t/s)/t,d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){const{n:t}=u,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-i*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,a=BigInt("0x100000000000000000000000000000000"),c=l(s*e,t),d=l(-r*e,t);let f=L(e-c*n-d*o,t),h=L(-c*r-d*s,t);const p=f>a,m=h>a;if(p&&(f=t-f),m&&(h=t-h),f>a||h>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:p,k1:f,k2neg:m,k2:h}}},f=32,h=32;function p(e){const{a:t,b:n}=u,r=L(e*e),o=L(r*e);return L(o+t*e+n)}const m=u.a===o;class g extends Error{constructor(e){super(e)}}function y(e){if(!(e instanceof b))throw new TypeError("JacobianPoint expected")}class b{constructor(e,t,n){this.x=e,this.y=t,this.z=n}static fromAffine(e){if(!(e instanceof x))throw new TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(x.ZERO)?b.ZERO:new b(e.x,e.y,i)}static toAffineBatch(e){const t=function(e,t=u.P){const n=new Array(e.length),r=D(e.reduce(((e,r,i)=>r===o?e:(n[i]=e,L(e*r,t))),i),t);return e.reduceRight(((e,r,i)=>r===o?e:(n[i]=L(e*n[i],t),L(e*r,t))),r),n}(e.map((e=>e.z)));return e.map(((e,n)=>e.toAffine(t[n])))}static normalizeZ(e){return b.toAffineBatch(e).map(b.fromAffine)}equals(e){y(e);const{x:t,y:n,z:r}=this,{x:o,y:i,z:s}=e,a=L(r*r),c=L(s*s),u=L(t*c),l=L(o*a),d=L(L(n*s)*c),f=L(L(i*r)*a);return u===l&&d===f}negate(){return new b(this.x,L(-this.y),this.z)}double(){const{x:e,y:t,z:n}=this,r=L(e*e),o=L(t*t),i=L(o*o),u=e+o,l=L(s*(L(u*u)-r-i)),d=L(a*r),f=L(d*d),h=L(f-s*l),p=L(d*(l-h)-c*i),m=L(s*t*n);return new b(h,p,m)}add(e){y(e);const{x:t,y:n,z:r}=this,{x:i,y:a,z:c}=e;if(i===o||a===o)return this;if(t===o||n===o)return e;const u=L(r*r),l=L(c*c),d=L(t*l),f=L(i*u),h=L(L(n*c)*l),p=L(L(a*r)*u),m=L(f-d),g=L(p-h);if(m===o)return g===o?this.double():b.ZERO;const v=L(m*m),w=L(m*v),x=L(d*v),E=L(g*g-w-s*x),_=L(g*(x-E)-h*w),k=L(r*c*m);return new b(E,_,k)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const t=b.ZERO;if("bigint"===typeof e&&e===o)return t;let n=N(e);if(n===i)return this;if(!m){let e=t,r=this;for(;n>o;)n&i&&(e=e.add(r)),r=r.double(),n>>=i;return e}let{k1neg:r,k1:s,k2neg:a,k2:c}=d.splitScalar(n),u=t,l=t,f=this;for(;s>o||c>o;)s&i&&(u=u.add(f)),c&i&&(l=l.add(f)),f=f.double(),s>>=i,c>>=i;return r&&(u=u.negate()),a&&(l=l.negate()),l=new b(L(l.x*d.beta),l.y,l.z),u.add(l)}precomputeWindow(e){const t=m?128/e+1:256/e+1,n=[];let r=this,o=r;for(let i=0;i<t;i++){o=r,n.push(o);for(let t=1;t<2**(e-1);t++)o=o.add(r),n.push(o);r=o.double()}return n}wNAF(e,t){!t&&this.equals(b.BASE)&&(t=x.BASE);const n=t&&t._WINDOW_SIZE||1;if(256%n)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let r=t&&w.get(t);r||(r=this.precomputeWindow(n),t&&1!==n&&(r=b.normalizeZ(r),w.set(t,r)));let o=b.ZERO,s=b.BASE;const a=1+(m?128/n:256/n),c=2**(n-1),u=BigInt(2**n-1),l=2**n,d=BigInt(n);for(let f=0;f<a;f++){const t=f*c;let n=Number(e&u);e>>=d,n>c&&(n-=l,e+=i);const a=t,h=t+Math.abs(n)-1,p=f%2!==0,m=n<0;0===n?s=s.add(v(p,r[a])):o=o.add(v(m,r[h]))}return{p:o,f:s}}multiply(e,t){let n,r,o=N(e);if(m){const{k1neg:e,k1:i,k2neg:s,k2:a}=d.splitScalar(o);let{p:c,f:u}=this.wNAF(i,t),{p:l,f:f}=this.wNAF(a,t);c=v(e,c),l=v(s,l),l=new b(L(l.x*d.beta),l.y,l.z),n=c.add(l),r=u.add(f)}else{const{p:e,f:i}=this.wNAF(o,t);n=e,r=i}return b.normalizeZ([n,r])[0]}toAffine(e){const{x:t,y:n,z:r}=this,o=this.equals(b.ZERO);null==e&&(e=o?c:D(r));const s=e,a=L(s*s),u=L(a*s),l=L(t*a),d=L(n*u),f=L(r*s);if(o)return x.ZERO;if(f!==i)throw new Error("invZ was invalid");return new x(l,d)}}function v(e,t){const n=t.negate();return e?n:t}b.BASE=new b(u.Gx,u.Gy,i),b.ZERO=new b(o,i,o);const w=new WeakMap;class x{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,w.delete(this)}hasEvenY(){return this.y%s===o}static fromCompressedHex(e){const t=32===e.length,n=R(t?e:e.subarray(1));if(!H(n))throw new Error("Point is not on curve");let r=function(e){const{P:t}=u,n=BigInt(6),r=BigInt(11),o=BigInt(22),i=BigInt(23),c=BigInt(44),l=BigInt(88),d=e*e*e%t,f=d*d*e%t,h=U(f,a)*f%t,p=U(h,a)*f%t,m=U(p,s)*d%t,g=U(m,r)*m%t,y=U(g,o)*g%t,b=U(y,c)*y%t,v=U(b,l)*b%t,w=U(v,c)*y%t,x=U(w,a)*f%t,E=U(x,i)*g%t,_=U(E,n)*d%t,k=U(_,s);if(k*k%t!==e)throw new Error("Cannot find square root");return k}(p(n));const o=(r&i)===i;if(t)o&&(r=L(-r));else{1===(1&e[0])!==o&&(r=L(-r))}const c=new x(n,r);return c.assertValidity(),c}static fromUncompressedHex(e){const t=R(e.subarray(1,33)),n=R(e.subarray(33,65)),r=new x(t,n);return r.assertValidity(),r}static fromHex(e){const t=B(e),n=t.length,r=t[0];if(n===f)return this.fromCompressedHex(t);if(33===n&&(2===r||3===r))return this.fromCompressedHex(t);if(65===n&&4===r)return this.fromUncompressedHex(t);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${n}`)}static fromPrivateKey(e){return x.BASE.multiply(G(e))}static fromSignature(e,t,n){const{r:r,s:o}=V(t);if(![0,1,2,3].includes(n))throw new Error("Cannot recover: invalid recovery bit");const i=F(B(e)),{n:s}=u,a=2===n||3===n?r+s:r,c=D(a,s),l=L(-i*c,s),d=L(o*c,s),f=1&n?"03":"02",h=x.fromHex(f+A(a)),p=x.BASE.multiplyAndAddUnsafe(h,l,d);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(e=!1){return M(this.toHex(e))}toHex(e=!1){const t=A(this.x);if(e){return`${this.hasEvenY()?"02":"03"}${t}`}return`04${t}${A(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:t,y:n}=this;if(!H(t)||!H(n))throw new Error(e);const r=L(n*n);if(L(r-p(t))!==o)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new x(this.x,L(-this.y))}double(){return b.fromAffine(this).double().toAffine()}add(e){return b.fromAffine(this).add(b.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return b.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,n){const r=b.fromAffine(this),s=t===o||t===i||this!==x.BASE?r.multiplyUnsafe(t):r.multiply(t),a=b.fromAffine(e).multiplyUnsafe(n),c=s.add(a);return c.equals(b.ZERO)?void 0:c.toAffine()}}function E(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function _(e){if(e.length<2||2!==e[0])throw new Error(`Invalid signature integer tag: ${C(e)}`);const t=e[1],n=e.subarray(2,t+2);if(!t||n.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===n[0]&&n[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:R(n),left:e.subarray(t+2)}}t.Point=x,x.BASE=new x(u.Gx,u.Gy),x.ZERO=new x(o,o);class k{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){const t=e instanceof Uint8Array,n="Signature.fromCompact";if("string"!==typeof e&&!t)throw new TypeError(`${n}: Expected string or Uint8Array`);const r=t?C(e):e;if(128!==r.length)throw new Error(`${n}: Expected 64-byte hex`);return new k(j(r.slice(0,64)),j(r.slice(64,128)))}static fromDER(e){const t=e instanceof Uint8Array;if("string"!==typeof e&&!t)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:n,s:r}=function(e){if(e.length<2||48!=e[0])throw new Error(`Invalid signature tag: ${C(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:n}=_(e.subarray(2)),{data:r,left:o}=_(n);if(o.length)throw new Error(`Invalid signature: left bytes after parsing: ${C(o)}`);return{r:t,s:r}}(t?e:M(e));return new k(n,r)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:t}=this;if(!Z(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Z(t))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=u.n>>i;return this.s>e}normalizeS(){return this.hasHighS()?new k(this.r,L(-this.s,u.n)):this}toDERRawBytes(){return M(this.toDERHex())}toDERHex(){const e=E(O(this.s)),t=E(O(this.r)),n=e.length/2,r=t.length/2,o=O(n),i=O(r);return`30${O(r+n+4)}02${i}${t}02${o}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return M(this.toCompactHex())}toCompactHex(){return A(this.r)+A(this.s)}}function S(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}t.Signature=k;const I=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function C(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let n=0;n<e.length;n++)t+=I[e[n]];return t}const T=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function A(e){if("bigint"!==typeof e)throw new Error("Expected bigint");if(!(o<=e&&e<T))throw new Error("Expected number 0 <= n < 2^256");return e.toString(16).padStart(64,"0")}function P(e){const t=M(A(e));if(32!==t.length)throw new Error("Error: expected 32 bytes");return t}function O(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function j(e){if("string"!==typeof e)throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}function M(e){if("string"!==typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+e.length);const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n,o=e.slice(r,r+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");t[n]=i}return t}function R(e){return j(C(e))}function B(e){return e instanceof Uint8Array?Uint8Array.from(e):M(e)}function N(e){if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"===typeof e&&Z(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function L(e,t=u.P){const n=e%t;return n>=o?n:t+n}function U(e,t){const{P:n}=u;let r=e;for(;t-- >o;)r*=r,r%=n;return r}function D(e,t=u.P){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=L(e,t),r=t,s=o,a=i,c=i,l=o;for(;n!==o;){const e=r/n,t=r%n,o=s-c*e,i=a-l*e;r=n,n=t,s=c,a=l,c=o,l=i}if(r!==i)throw new Error("invert: does not exist");return L(s,t)}function F(e,t=!1){const n=function(e){const t=8*e.length-256,n=R(e);return t>0?n>>BigInt(t):n}(e);if(t)return n;const{n:r}=u;return n>=r?n-r:n}let z,$;class q{constructor(e,t){if(this.hashLen=e,this.qByteLen=t,"number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(...e){return t.utils.hmacSha256(this.k,...e)}hmacSync(...e){return $(this.k,...e)}checkSync(){if("function"!==typeof $)throw new g("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0;const t=[];for(;e<this.qByteLen;){this.v=await this.hmac(this.v);const n=this.v.slice();t.push(n),e+=this.v.length}return S(...t)}generateSync(){this.checkSync(),this.incr();let e=0;const t=[];for(;e<this.qByteLen;){this.v=this.hmacSync(this.v);const n=this.v.slice();t.push(n),e+=this.v.length}return S(...t)}}function Z(e){return o<e&&e<u.n}function H(e){return o<e&&e<u.P}function W(e,t,n,r=!0){const{n:s}=u,a=F(e,!0);if(!Z(a))return;const c=D(a,s),l=x.BASE.multiply(a),d=L(l.x,s);if(d===o)return;const f=L(c*L(t+n*d,s),s);if(f===o)return;let h=new k(d,f),p=(l.x===h.r?0:2)|Number(l.y&i);return r&&h.hasHighS()&&(h=h.normalizeS(),p^=1),{sig:h,recovery:p}}function G(e){let t;if("bigint"===typeof e)t=e;else if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"===typeof e){if(64!==e.length)throw new Error("Expected 32 bytes of private key");t=j(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(e.length!==h)throw new Error("Expected 32 bytes of private key");t=R(e)}if(!Z(t))throw new Error("Expected private key: 0 < key < n");return t}function K(e){return e instanceof x?(e.assertValidity(),e):x.fromHex(e)}function V(e){if(e instanceof k)return e.assertValidity(),e;try{return k.fromDER(e)}catch(t){return k.fromCompact(e)}}function X(e){const t=e instanceof Uint8Array,n="string"===typeof e,r=(t||n)&&e.length;return t?33===r||65===r:n?66===r||130===r:e instanceof x}function Y(e){return R(e.length>f?e.slice(0,f):e)}function J(e){const t=Y(e),n=L(t,u.n);return Q(n<o?t:n)}function Q(e){return P(e)}function ee(e,n,r){if(null==e)throw new Error(`sign: expected valid message hash, not "${e}"`);const o=B(e),i=G(n),s=[Q(i),J(o)];if(null!=r){!0===r&&(r=t.utils.randomBytes(f));const e=B(r);if(e.length!==f)throw new Error("sign: Expected 32 bytes of extra data");s.push(e)}return{seed:S(...s),m:Y(o),d:i}}function te(e,t){const{sig:n,recovery:r}=e,{der:o,recovered:i}=Object.assign({canonical:!0,der:!0},t),s=o?n.toDERRawBytes():n.toCompactRawBytes();return i?[s,r]:s}t.getPublicKey=function(e,t=!1){return x.fromPrivateKey(e).toRawBytes(t)},t.recoverPublicKey=function(e,t,n,r=!1){return x.fromSignature(e,t,n).toRawBytes(r)},t.getSharedSecret=function(e,t,n=!1){if(X(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!X(t))throw new TypeError("getSharedSecret: second arg must be public key");const r=K(t);return r.assertValidity(),r.multiply(G(e)).toRawBytes(n)},t.sign=async function(e,t,n={}){const{seed:r,m:o,d:i}=ee(e,t,n.extraEntropy),s=new q(32,h);let a;for(await s.reseed(r);!(a=W(await s.generate(),o,i,n.canonical));)await s.reseed();return te(a,n)},t.signSync=function(e,t,n={}){const{seed:r,m:o,d:i}=ee(e,t,n.extraEntropy),s=new q(32,h);let a;for(s.reseedSync(r);!(a=W(s.generateSync(),o,i,n.canonical));)s.reseedSync();return te(a,n)};const ne={strict:!0};function re(e){return L(R(e),u.n)}t.verify=function(e,t,n,r=ne){let o;try{o=V(e),t=B(t)}catch(m){return!1}const{r:i,s:s}=o;if(r.strict&&o.hasHighS())return!1;const a=F(t);let c;try{c=K(n)}catch(m){return!1}const{n:l}=u,d=D(s,l),f=L(a*d,l),h=L(i*d,l),p=x.BASE.multiplyAndAddUnsafe(c,f,h);return!!p&&L(p.x,l)===i};class oe{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){const t=B(e);if(64!==t.length)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${t.length}`);const n=R(t.subarray(0,32)),r=R(t.subarray(32,64));return new oe(n,r)}assertValidity(){const{r:e,s:t}=this;if(!H(e)||!Z(t))throw new Error("Invalid signature")}toHex(){return A(this.r)+A(this.s)}toRawBytes(){return M(this.toHex())}}class ie{constructor(e,n,r=t.utils.randomBytes()){if(null==e)throw new TypeError(`sign: Expected valid message, not "${e}"`);this.m=B(e);const{x:o,scalar:i}=this.getScalar(G(n));if(this.px=o,this.d=i,this.rand=B(r),32!==this.rand.length)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(e){const t=x.fromPrivateKey(e),n=t.hasEvenY()?e:u.n-e;return{point:t,scalar:n,x:t.toRawX()}}initNonce(e,t){return P(e^R(t))}finalizeNonce(e){const t=L(R(e),u.n);if(t===o)throw new Error("sign: Creation of signature failed. k is zero");const{point:n,x:r,scalar:i}=this.getScalar(t);return{R:n,rx:r,k:i}}finalizeSig(e,t,n,r){return new oe(e.x,L(t+n*r,u.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:e,d:n,px:r,rand:o}=this,i=t.utils.taggedHash,s=this.initNonce(n,await i(de.aux,o)),{R:a,rx:c,k:u}=this.finalizeNonce(await i(de.nonce,s,r,e)),l=re(await i(de.challenge,c,r,e)),d=this.finalizeSig(a,u,l,n);return await ce(d,e,r)||this.error(),d}calcSync(){const{m:e,d:n,px:r,rand:o}=this,i=t.utils.taggedHashSync,s=this.initNonce(n,i(de.aux,o)),{R:a,rx:c,k:u}=this.finalizeNonce(i(de.nonce,s,r,e)),l=re(i(de.challenge,c,r,e)),d=this.finalizeSig(a,u,l,n);return ue(d,e,r)||this.error(),d}}function se(e,t,n){const r=e instanceof oe,o=r?e:oe.fromHex(e);return r&&o.assertValidity(),{...o,m:B(t),P:K(n)}}function ae(e,t,n,r){const o=x.BASE.multiplyAndAddUnsafe(t,G(n),L(-r,u.n));return!(!o||!o.hasEvenY()||o.x!==e)}async function ce(e,n,r){try{const{r:o,s:i,m:s,P:a}=se(e,n,r),c=re(await t.utils.taggedHash(de.challenge,P(o),a.toRawX(),s));return ae(o,a,i,c)}catch(o){return!1}}function ue(e,n,r){try{const{r:o,s:i,m:s,P:a}=se(e,n,r),c=re(t.utils.taggedHashSync(de.challenge,P(o),a.toRawX(),s));return ae(o,a,i,c)}catch(o){if(o instanceof g)throw o;return!1}}t.schnorr={Signature:oe,getPublicKey:function(e){return x.fromPrivateKey(e).toRawX()},sign:async function(e,t,n){return new ie(e,t,n).calc()},verify:ce,signSync:function(e,t,n){return new ie(e,t,n).calcSync()},verifySync:ue},x.BASE._setWindowSize(8);const le={node:r,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},de={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},fe={};t.utils={bytesToHex:C,hexToBytes:M,concatBytes:S,mod:L,invert:D,isValidPrivateKey(e){try{return G(e),!0}catch(t){return!1}},_bigintTo32Bytes:P,_normalizePrivateKey:G,hashToPrivateKey:e=>{if((e=B(e)).length<40||e.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return P(L(R(e),u.n-i)+i)},randomBytes:(e=32)=>{if(le.web)return le.web.getRandomValues(new Uint8Array(e));if(le.node){const{randomBytes:t}=le.node;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(40)),precompute(e=8,t=x.BASE){const n=t===x.BASE?t:new x(t.x,t.y);return n._setWindowSize(e),n.multiply(a),n},sha256:async(...e)=>{if(le.web){const t=await le.web.subtle.digest("SHA-256",S(...e));return new Uint8Array(t)}if(le.node){const{createHash:t}=le.node,n=t("sha256");return e.forEach((e=>n.update(e))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(le.web){const n=await le.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),r=S(...t),o=await le.web.subtle.sign("HMAC",n,r);return new Uint8Array(o)}if(le.node){const{createHmac:n}=le.node,r=n("sha256",e);return t.forEach((e=>r.update(e))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...n)=>{let r=fe[e];if(void 0===r){const n=await t.utils.sha256(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=S(n,n),fe[e]=r}return t.utils.sha256(r,...n)},taggedHashSync:(e,...t)=>{if("function"!==typeof z)throw new g("sha256Sync is undefined, you need to set it");let n=fe[e];if(void 0===n){const t=z(Uint8Array.from(e,(e=>e.charCodeAt(0))));n=S(t,t),fe[e]=n}return z(n,...t)},_JacobianPoint:b},Object.defineProperties(t.utils,{sha256Sync:{configurable:!1,get:()=>z,set(e){z||(z=e)}},hmacSha256Sync:{configurable:!1,get:()=>$,set(e){$||($=e)}}})},77777:function(e,t,n){"use strict";t.N=void 0;var r=n(7352);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return r.SafeAppProvider}})},7352:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppProvider=void 0;const r=n(17187),o=n(93080);class i extends r.EventEmitter{constructor(e,t){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){const{method:t,params:n=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[e,t]=n;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address or message hash is invalid");const r=await this.sdk.txs.signMessage(e);return("signature"in r?r.signature:void 0)||"0x"}case"eth_sign":{const[e,t]=n;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw new Error("The address or message hash is invalid");const r=await this.sdk.txs.signMessage(t);return("signature"in r?r.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[e,t]=n,r="string"===typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw new Error("The address is invalid");const o=await this.sdk.txs.signTypedMessage(r);return("signature"in o?o.signature:void 0)||"0x"}case"eth_sendTransaction":const t=Object.assign(Object.assign({},n[0]),{value:n[0].value||"0",data:n[0].data||"0x"});"string"===typeof t.gas&&t.gas.startsWith("0x")&&(t.gas=parseInt(t.gas,16));const i=await this.sdk.txs.send({txs:[t],params:{safeTxGas:t.gas}});return this.submittedTxs.set(i.safeTxHash,{from:this.safe.safeAddress,hash:i.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:t.data,value:t.value,to:t.to,blockHash:null,blockNumber:null,transactionIndex:null}),i.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,o.getLowerCase)(n[0]),n[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,o.getLowerCase)(n[0]),n[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,o.getLowerCase)(n[0]),n[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,o.getLowerCase)(n[0]),n[1],n[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([n[0],n[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([n[0],n[1]]);case"eth_getTransactionByHash":let s=n[0];try{s=(await this.sdk.txs.getBySafeTxHash(s)).txHash||s}catch(r){}return this.submittedTxs.has(s)?this.submittedTxs.get(s):this.sdk.eth.getTransactionByHash([s]).then((e=>(e&&(e.hash=n[0]),e)));case"eth_getTransactionReceipt":{let e=n[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(r){}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=n[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(n[0]);case"eth_call":return this.sdk.eth.call([n[0],n[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([n[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(n[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([n[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((n=>t(null,{jsonrpc:"2.0",id:e.id,result:n}))).catch((e=>t(e,null)))}}t.SafeAppProvider=i},93080:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLowerCase=void 0,t.getLowerCase=function(e){return e?e.toLowerCase():e}},95068:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0});const i=n(65938);t.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"===typeof window,this.isValidMessage=({origin:e,data:t,source:n})=>{const r=!t,o=!this.isServer&&n===window.parent,i=("undefined"!==typeof t.version&&parseInt(t.version.split(".")[0]))>=1;let s=!0;return Array.isArray(this.allowedOrigins)&&(s=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!r&&o&&i&&s},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{const{id:t}=e,n=this.callbacks.get(t);n&&(n(e),this.callbacks.delete(t))},this.send=(e,t)=>{const n=i.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(n,"*"),new Promise(((e,t)=>{this.callbacks.set(n.id,(n=>{n.success?e(n):t(new Error(n.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},o(n(27473),t)},65938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;const r=n(55445),o=n(9331);class i{}t.MessageFormatter=i,i.makeRequest=(e,t)=>({id:(0,o.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,r.getSDKVersion)()}}),i.makeResponse=(e,t,n)=>({id:e,success:!0,version:n,data:t}),i.makeErrorResponse=(e,t,n)=>({id:e,success:!1,error:t,version:n})},27473:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"}(t.Methods||(t.Methods={})),function(e){e.requestAddressBook="requestAddressBook"}(t.RestrictedMethods||(t.RestrictedMethods={}))},9331:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;const n=e=>e.toString(16).padStart(2,"0");t.generateRequestId=()=>"undefined"!==typeof window?(e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,n).join("")})(10):(new Date).getTime().toString(36)},23417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11285),o=n(51741),i=(e,t)=>t.some((t=>t.parentCapability===e));t.default=()=>(e,t,n)=>{const s=n.value;return n.value=async function(){const e=new r.Wallet(this.communicator);let n=await e.getPermissions();if(i(t,n)||(n=await e.requestPermissions([{[t]:{}}])),!i(t,n))throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED);return s.apply(this)},n}},46794:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}},99750:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;const r=n(46794),o=n(27473),i={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};t.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:r.RPC_CALLS.eth_call,formatters:[null,i.defaultBlockParam]}),this.getBalance=this.buildRequest({call:r.RPC_CALLS.eth_getBalance,formatters:[null,i.defaultBlockParam]}),this.getCode=this.buildRequest({call:r.RPC_CALLS.eth_getCode,formatters:[null,i.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:r.RPC_CALLS.eth_getStorageAt,formatters:[null,i.blockNumberToHex,i.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:r.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:r.RPC_CALLS.eth_getBlockByHash,formatters:[null,i.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:r.RPC_CALLS.eth_getBlockByNumber,formatters:[i.blockNumberToHex,i.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionCount,formatters:[null,i.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:r.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:r.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:r.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:t,formatters:n}=e;return async e=>{n&&Array.isArray(e)&&n.forEach(((t,n)=>{t&&(e[n]=t(e[n]))}));const r={call:t,params:e||[]};return(await this.communicator.send(o.Methods.rpcCall,r)).data}}}},40936:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const s=i(n(66638));t.default=s.default,o(n(66638),t),o(n(8550),t),o(n(27473),t),o(n(65938),t);var a=n(55445);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return a.getSDKVersion}})},89385:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Safe=void 0;const i=n(15875),s=n(61181),a=n(27473),c=n(46794),u=n(8550),l=o(n(23417));class d{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(a.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(a.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(a.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){const n=await this.getInfo(),r=(0,i.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:c.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(a.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===s.MAGIC_VALUE}catch(u){return!1}}async check1271SignatureBytes(e,t="0x"){const n=await this.getInfo(),r=(0,i.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:c.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(a.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===s.MAGIC_VALUE_BYTES}catch(u){return!1}}calculateMessageHash(e){return(0,i.hashMessage)(e)}calculateTypedMessageHash(e){const t="object"===typeof e.domain.chainId?e.domain.chainId.toNumber():Number(e.domain.chainId);let n=e.primaryType;if(!n){const t=Object.values(e.types),r=Object.keys(e.types).filter((e=>t.every((t=>t.every((({type:t})=>t.replace("[","").replace("]","")!==e))))));if(0===r.length||r.length>1)throw new Error("Please specify primaryType");n=r[0]}return(0,i.hashTypedData)({message:e.message,domain:Object.assign(Object.assign({},e.domain),{chainId:t,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt}),types:e.types,primaryType:n})}async getOffChainSignature(e){return(await this.communicator.send(a.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let n;if("string"===typeof e&&(n=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,t)}),(0,u.isObjectEIP712TypedData)(e)&&(n=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,t)}),n){return await n()}throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){const n=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of n){if(await r(e,t))return!0}return!1}async getEnvironmentInfo(){return(await this.communicator.send(a.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(a.Methods.requestAddressBook,void 0)).data}}r([(0,l.default)()],d.prototype,"requestAddressBook",null),t.Safe=d},61181:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAGIC_VALUE_BYTES=t.MAGIC_VALUE=void 0;t.MAGIC_VALUE="0x1626ba7e";t.MAGIC_VALUE_BYTES="0x20c13b0b"},66638:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(95068)),i=n(44070),s=n(99750),a=n(89385),c=n(11285);t.default=class{constructor(e={}){const{allowedDomains:t=null,debug:n=!1}=e;this.communicator=new o.default(t,n),this.eth=new s.Eth(this.communicator),this.txs=new i.TXs(this.communicator),this.safe=new a.Safe(this.communicator),this.wallet=new c.Wallet(this.communicator)}}},44070:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;const r=n(27473),o=n(8550);t.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const t={message:e};return(await this.communicator.send(r.Methods.signMessage,t)).data}async signTypedMessage(e){if(!(0,o.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw new Error("No transactions were passed");const n={txs:e,params:t};return(await this.communicator.send(r.Methods.sendTransactions,n)).data}}},25946:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var r=n(18831);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})},8550:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(71734),t),o(n(13788),t),o(n(25946),t),o(n(13754),t)},13754:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(27473)},51741:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsError=t.PERMISSIONS_REQUEST_REJECTED=void 0,t.PERMISSIONS_REQUEST_REJECTED=4001;class n extends Error{constructor(e,t,r){super(e),this.code=t,this.data=r,Object.setPrototypeOf(this,n.prototype)}}t.PermissionsError=n},13788:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71734:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObjectEIP712TypedData=void 0;t.isObjectEIP712TypedData=e=>"object"===typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e},55445:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const o=r(n(29242));t.getSDKVersion=()=>o.default.version.split("-")[0]},11285:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const r=n(27473),o=n(51741);t.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new o.PermissionsError("Permissions request is invalid",o.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(r.Methods.wallet_requestPermissions,e)).data}catch(t){throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"===typeof e&&Object.keys(e).every((e=>!!Object.values(r.RestrictedMethods).includes(e)))))}}},1074:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BASE_URL=void 0,t.DEFAULT_BASE_URL="https://safe-client.safe.global"},76287:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteEndpoint=t.getEndpoint=t.postEndpoint=void 0;const r=n(59136);function o(e,t,n,o){return`${e}${(0,r.insertParams)(t,n)}${(0,r.stringifyQuery)(o)}`}t.postEndpoint=function(e,t,n){const i=o(e,t,null===n||void 0===n?void 0:n.path,null===n||void 0===n?void 0:n.query);return(0,r.fetchData)(i,null===n||void 0===n?void 0:n.body)},t.getEndpoint=function(e,t,n,i){if(i)return(0,r.fetchData)(i);const s=o(e,t,null===n||void 0===n?void 0:n.path,null===n||void 0===n?void 0:n.query);return(0,r.fetchData)(s)},t.deleteEndpoint=function(e,t,n){const i=o(e,t,null===n||void 0===n?void 0:n.path);return(0,r.deleteData)(i)}},18831:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterDevice=t.unregisterSafe=t.registerDevice=t.getDelegates=t.confirmSafeMessage=t.proposeSafeMessage=t.getSafeMessage=t.getSafeMessages=t.getDecodedData=t.getMasterCopies=t.getSafeApps=t.getChainConfig=t.getChainsConfig=t.proposeTransaction=t.getNonces=t.postSafeGasEstimation=t.getTransactionDetails=t.getTransactionQueue=t.getTransactionHistory=t.getCollectiblesPage=t.getCollectibles=t.getOwnedSafes=t.getFiatCurrencies=t.getBalances=t.getMultisigTransactions=t.getModuleTransactions=t.getIncomingTransfers=t.getSafeInfo=t.setBaseUrl=void 0;const i=n(76287),s=n(1074);o(n(32733),t),o(n(22394),t),o(n(17584),t),o(n(28996),t),o(n(23075),t),o(n(80247),t),o(n(83571),t),o(n(43150),t),o(n(50379),t);let a=s.DEFAULT_BASE_URL;t.setBaseUrl=e=>{a=e},t.getSafeInfo=function(e,t){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},t.getIncomingTransfers=function(e,t,n,r){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:n},r)},t.getModuleTransactions=function(e,t,n,r){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:n},r)},t.getMultisigTransactions=function(e,t,n,r){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:n},r)},t.getBalances=function(e,t,n="usd",r={}){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:n},query:r})},t.getFiatCurrencies=function(){return(0,i.getEndpoint)(a,"/v1/balances/supported-fiat-codes")},t.getOwnedSafes=function(e,t){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},t.getCollectibles=function(e,t,n={}){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:n})},t.getCollectiblesPage=function(e,t,n={},r){return(0,i.getEndpoint)(a,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:n},r)},t.getTransactionHistory=function(e,t,n,r){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:{trusted:r}},n)},t.getTransactionQueue=function(e,t,n,r){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:{trusted:r}},n)},t.getTransactionDetails=function(e,t){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},t.postSafeGasEstimation=function(e,t,n){return(0,i.postEndpoint)(a,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:n})},t.getNonces=function(e,t){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:e,safe_address:t}})},t.proposeTransaction=function(e,t,n){return(0,i.postEndpoint)(a,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:n})},t.getChainsConfig=function(e){return(0,i.getEndpoint)(a,"/v1/chains",{query:e})},t.getChainConfig=function(e){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}",{path:{chainId:e}})},t.getSafeApps=function(e,t={}){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},t.getMasterCopies=function(e){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},t.getDecodedData=function(e,t,n){return(0,i.postEndpoint)(a,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t,to:n}})},t.getSafeMessages=function(e,t,n){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},n)},t.getSafeMessage=function(e,t){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},t.proposeSafeMessage=function(e,t,n){return(0,i.postEndpoint)(a,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:n})},t.confirmSafeMessage=function(e,t,n){return(0,i.postEndpoint)(a,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:n})},t.getDelegates=function(e,t={}){return(0,i.getEndpoint)(a,"/v1/chains/{chainId}/delegates",{path:{chainId:e},query:t})},t.registerDevice=function(e){return(0,i.postEndpoint)(a,"/v1/register/notifications",{body:e})},t.unregisterSafe=function(e,t,n){return(0,i.deleteEndpoint)(a,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:e,safe_address:t,uuid:n}})},t.unregisterDevice=function(e,t){return(0,i.deleteEndpoint)(a,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:e,uuid:t}})}},28996:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=t.GAS_PRICE_TYPE=t.RPC_AUTHENTICATION=void 0,function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(t.RPC_AUTHENTICATION||(t.RPC_AUTHENTICATION={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.FIXED_1559="FIXED1559",e.UNKNOWN="UNKNOWN"}(t.GAS_PRICE_TYPE||(t.GAS_PRICE_TYPE={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",e.TX_SIMULATION="TX_SIMULATION",e.EIP1271="EIP1271"}(t.FEATURES||(t.FEATURES={}))},23075:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN"}(t.TokenType||(t.TokenType={}))},83571:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80247:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50379:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceType=void 0,function(e){e.ANDROID="ANDROID",e.IOS="IOS",e.WEB="WEB"}(t.DeviceType||(t.DeviceType={}))},22394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppSocialPlatforms=t.SafeAppFeatures=t.SafeAppAccessPolicyTypes=void 0,function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(t.SafeAppAccessPolicyTypes||(t.SafeAppAccessPolicyTypes={})),function(e){e.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(t.SafeAppFeatures||(t.SafeAppFeatures={})),function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD"}(t.SafeAppSocialPlatforms||(t.SafeAppSocialPlatforms={}))},32733:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationVersionState=void 0,function(e){e.UP_TO_DATE="UP_TO_DATE",e.OUTDATED="OUTDATED",e.UNKNOWN="UNKNOWN"}(t.ImplementationVersionState||(t.ImplementationVersionState={}))},43150:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeMessageStatus=t.SafeMessageListItemType=void 0,function(e){e.DATE_LABEL="DATE_LABEL",e.MESSAGE="MESSAGE"}(t.SafeMessageListItemType||(t.SafeMessageListItemType={})),function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(t.SafeMessageStatus||(t.SafeMessageStatus={}))},17584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LabelValue=t.DetailedExecutionInfoType=t.TransactionListItemType=t.ConflictType=t.TransactionInfoType=t.SettingsInfoType=t.TransactionTokenType=t.TransferDirection=t.TransactionStatus=t.Operation=void 0,function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(t.Operation||(t.Operation={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(t.TransactionStatus||(t.TransactionStatus={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(t.TransferDirection||(t.TransferDirection={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(t.TransactionTokenType||(t.TransactionTokenType={})),function(e){e.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",e.ADD_OWNER="ADD_OWNER",e.REMOVE_OWNER="REMOVE_OWNER",e.SWAP_OWNER="SWAP_OWNER",e.CHANGE_THRESHOLD="CHANGE_THRESHOLD",e.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",e.ENABLE_MODULE="ENABLE_MODULE",e.DISABLE_MODULE="DISABLE_MODULE",e.SET_GUARD="SET_GUARD",e.DELETE_GUARD="DELETE_GUARD"}(t.SettingsInfoType||(t.SettingsInfoType={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation"}(t.TransactionInfoType||(t.TransactionInfoType={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(t.ConflictType||(t.ConflictType={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(t.TransactionListItemType||(t.TransactionListItemType={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(t.DetailedExecutionInfoType||(t.DetailedExecutionInfoType={})),function(e){e.Queued="Queued",e.Next="Next"}(t.LabelValue||(t.LabelValue={}))},59136:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.deleteData=t.fetchData=t.stringifyQuery=t.insertParams=void 0;function r(e){return n(this,void 0,void 0,(function*(){let t;try{t=yield e.json()}catch(r){if(e.headers&&"0"!==e.headers.get("content-length"))throw new Error(`Invalid response content: ${e.statusText}`)}if(!e.ok){const r="object"===typeof(n=t)&&null!==n&&"code"in n&&"message"in n?`${t.code}: ${t.message}`:e.statusText;throw new Error(r)}var n;return t}))}t.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,n)=>function(e,t,n){return e.replace(new RegExp(`\\{${t}\\}`,"g"),n)}(e,n,String(t[n]))),e):e},t.stringifyQuery=function(e){if(!e)return"";const t=new URLSearchParams;Object.keys(e).forEach((n=>{null!=e[n]&&t.append(n,String(e[n]))}));const n=t.toString();return n?`?${n}`:""},t.fetchData=function(e,t){return n(this,void 0,void 0,(function*(){let n;null!=t&&(n={method:"POST",body:"string"===typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}});return r(yield fetch(e,n))}))},t.deleteData=function(e){return n(this,void 0,void 0,(function*(){return r(yield fetch(e,{method:"DELETE"}))}))}},39386:function(e,t,n){"use strict";t._O=t.Jq=t.KB=t.u8=t.cv=void 0,t.Ik=t.A9=t.n_=t.gM=void 0;const r=n(48764);function o(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function i(e){return o(e),r.Buffer.from(e.buffer,e.byteOffset,e.length)}class s{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function a(e,t){return t.property?e+"["+t.property+"]":e}class c extends s{isCount(){throw new Error("ExternalLayout is abstract")}}class u extends c{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){o(e);const n=e.length-t;return Math.floor(n/this.elementSpan)}encode(e,t,n){return 0}}class l extends c{constructor(e,t=0,n){if(!(e instanceof s))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof d||this.layout instanceof f}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}class d extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return i(e).readUIntLE(t,this.span)}encode(e,t,n=0){return i(t).writeUIntLE(e,n,this.span),this.span}}class f extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return i(e).readUIntBE(t,this.span)}encode(e,t,n=0){return i(t).writeUIntBE(e,n,this.span),this.span}}class h extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return i(e).readIntLE(t,this.span)}encode(e,t,n=0){return i(t).writeIntLE(e,n,this.span),this.span}}class p extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return i(e).readIntBE(t,this.span)}encode(e,t,n=0){return i(t).writeIntBE(e,n,this.span),this.span}}const m=Math.pow(2,32);function g(e){const t=Math.floor(e/m);return{hi32:t,lo32:e-t*m}}function y(e,t){return e*m+t}class b extends s{constructor(e){super(8,e)}decode(e,t=0){const n=i(e),r=n.readUInt32LE(t);return y(n.readUInt32LE(t+4),r)}encode(e,t,n=0){const r=g(e),o=i(t);return o.writeUInt32LE(r.lo32,n),o.writeUInt32LE(r.hi32,n+4),8}}class v extends s{constructor(e){super(8,e)}decode(e,t=0){const n=i(e);return y(n.readUInt32BE(t),n.readUInt32BE(t+4))}encode(e,t,n=0){const r=g(e),o=i(t);return o.writeUInt32BE(r.hi32,n),o.writeUInt32BE(r.lo32,n+4),8}}class w extends s{constructor(e){super(8,e)}decode(e,t=0){const n=i(e),r=n.readUInt32LE(t);return y(n.readInt32LE(t+4),r)}encode(e,t,n=0){const r=g(e),o=i(t);return o.writeUInt32LE(r.lo32,n),o.writeInt32LE(r.hi32,n+4),8}}class x extends s{constructor(e){super(8,e)}decode(e,t=0){const n=i(e);return y(n.readInt32BE(t),n.readUInt32BE(t+4))}encode(e,t,n=0){const r=g(e),o=i(t);return o.writeInt32BE(r.hi32,n),o.writeUInt32BE(r.lo32,n+4),8}}class E extends s{constructor(e){super(4,e)}decode(e,t=0){return i(e).readFloatLE(t)}encode(e,t,n=0){return i(t).writeFloatLE(e,n),4}}class _ extends s{constructor(e){super(4,e)}decode(e,t=0){return i(e).readFloatBE(t)}encode(e,t,n=0){return i(t).writeFloatBE(e,n),4}}class k extends s{constructor(e){super(8,e)}decode(e,t=0){return i(e).readDoubleLE(t)}encode(e,t,n=0){return i(t).writeDoubleLE(e,n),8}}class S extends s{constructor(e){super(8,e)}decode(e,t=0){return i(e).readDoubleBE(t)}encode(e,t,n=0){return i(t).writeDoubleBE(e,n),8}}class I extends s{constructor(e,t,n){if(!(e instanceof s))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof c&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let r=-1;!(t instanceof c)&&0<e.span&&(r=t*e.span),super(r,n),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof c&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let o=0;for(;o<r;)n+=this.elementLayout.getSpan(e,t+n),++o}return n}decode(e,t=0){const n=[];let r=0,o=this.count;for(o instanceof c&&(o=o.decode(e,t));r<o;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n=0){const r=this.elementLayout,o=e.reduce(((e,o)=>e+r.encode(o,t,n+e)),0);return this.count instanceof c&&this.count.encode(e.length,t,n),o}}class C extends s{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce(((e,t)=>e&&t instanceof s),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof t&&void 0===n&&(n=t,t=void 0);for(const i of e)if(0>i.span&&void 0===i.property)throw new Error("fields cannot contain unnamed variable-length layout");let r=-1;try{r=e.reduce(((e,t)=>e+t.getSpan()),0)}catch(o){}super(r,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce(((n,r)=>{const o=r.getSpan(e,t);return t+=o,n+o}),0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,t=0){o(e);const n=this.makeDestinationObject();for(const r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return n}encode(e,t,n=0){const r=n;let o=0,i=0;for(const s of this.fields){let r=s.span;if(i=0<r?r:0,void 0!==s.property){const o=e[s.property];void 0!==o&&(i=s.encode(o,t,n),0>r&&(r=s.getSpan(t,n)))}o=n,n+=r}return o+i-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!==typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}class T{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}class A extends T{constructor(e,t){if(!(e instanceof c&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}class P extends s{constructor(e,t,n){let r;if(e instanceof d||e instanceof f)r=new A(new l(e));else if(e instanceof c&&e.isCount())r=new A(e);else{if(!(e instanceof T))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");r=e}if(void 0===t&&(t=null),!(null===t||t instanceof s))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let o=-1;t&&(o=t.span,0<=o&&(e instanceof d||e instanceof f)&&(o+=r.layout.span)),super(o,n),this.discriminator=r,this.usesPrefixDiscriminator=e instanceof d||e instanceof f,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return i(e)},this.configGetSourceVariant=function(e){i=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,t=0){let n;const r=this.discriminator,o=r.decode(e,t),i=this.registry[o];if(void 0===i){const i=this.defaultLayout;let s=0;this.usesPrefixDiscriminator&&(s=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=i.decode(e,t+s)}else n=i.decode(e,t);return n}encode(e,t,n=0){const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(e[r.property],t,n),i+o.encode(e[o.property],t,n+i)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new O(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}class O extends s{constructor(e,t,n,r){if(!(e instanceof P))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof s))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}let o=e.span;0>e.span&&(o=n?n.span:0,0<=o&&e.usesPrefixDiscriminator&&(o+=e.discriminator.layout.span)),super(o,r),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e,t=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let o=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),o+=this.layout.getSpan(t,n+r),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function j(e){return 0>e&&(e+=4294967296),e}class M extends s{constructor(e,t,n){if(!(e instanceof d||e instanceof f))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this._packedSetValue=function(e){return r=j(e),this},this._packedGetValue=function(){return r}}decode(e,t=0){const n=this.makeDestinationObject(),r=this.word.decode(e,t);this._packedSetValue(r);for(const o of this.fields)void 0!==o.property&&(n[o.property]=o.decode(e));return n}encode(e,t,n=0){const r=this.word.decode(t,n);this._packedSetValue(r);for(const o of this.fields)if(void 0!==o.property){const t=e[o.property];void 0!==t&&o.encode(t)}return this.word.encode(this._packedGetValue(),t,n)}addField(e,t){const n=new R(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new B(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}class R{constructor(e,t,n){if(!(e instanceof M))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,o=e.fields.reduce(((e,t)=>e+t.bits),0);if(t+o>r)throw new Error("bits too long for span remainder ("+(r-o)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=o,this.container.msb&&(this.start=r-o-t),this.wordMask=j(this.valueMask<<this.start),this.property=n}decode(e,t){return j(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if("number"!==typeof e||!Number.isInteger(e)||e!==j(e&this.valueMask))throw new TypeError(a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container._packedGetValue(),n=j(e<<this.start);this.container._packedSetValue(j(t&~this.wordMask)|n)}}class B extends R{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"===typeof e&&(e=+e),super.encode(e)}}class N extends s{constructor(e,t){if(!(e instanceof c&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof c||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),i(e).slice(t,t+n)}encode(e,t,n){let r=this.length;if(this.length instanceof c&&(r=e.length),!(e instanceof Uint8Array&&r===e.length))throw new TypeError(a("Blob.encode",this)+" requires (length "+r+") Uint8Array as src");if(n+r>t.length)throw new RangeError("encoding overruns Uint8Array");const o=i(e);return i(t).write(o.toString("hex"),n,r,"hex"),this.length instanceof c&&this.length.encode(r,t,n),r}}class L extends s{constructor(e){super(-1,e)}getSpan(e,t=0){o(e);let n=t;for(;n<e.length&&0!==e[n];)n+=1;return 1+n-t}decode(e,t=0){const n=this.getSpan(e,t);return i(e).slice(t,t+n-1).toString("utf-8")}encode(e,t,n=0){"string"!==typeof e&&(e=String(e));const o=r.Buffer.from(e,"utf8"),s=o.length;if(n+s>t.length)throw new RangeError("encoding overruns Buffer");const a=i(t);return o.copy(a,n),a[n+s]=0,s+1}}class U extends s{constructor(e,t){if("string"===typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return o(e),e.length-t}decode(e,t=0){const n=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<n)throw new RangeError("text length exceeds maxSpan");return i(e).slice(t,t+n).toString("utf-8")}encode(e,t,n=0){"string"!==typeof e&&(e=String(e));const o=r.Buffer.from(e,"utf8"),s=o.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(n+s>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(i(t),n),s}}class D extends s{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}t.cv=(e,t,n)=>new l(e,t,n),t.u8=e=>new d(1,e),t.KB=e=>new d(2,e),t.Jq=e=>new d(4,e),t._O=e=>new b(e),t.gM=e=>new w(e),t.n_=(e,t,n)=>new C(e,t,n),t.A9=(e,t,n)=>new I(e,t,n),t.Ik=(e,t)=>new N(e,t)},14990:function(e,t,n){"use strict";n.r(t),n.d(t,{Account:function(){return qn},AddressLookupTableAccount:function(){return no},AddressLookupTableInstruction:function(){return es},AddressLookupTableProgram:function(){return ts},Authorized:function(){return fs},BLOCKHASH_CACHE_TIMEOUT_MS:function(){return co},BPF_LOADER_DEPRECATED_PROGRAM_ID:function(){return Zn},BPF_LOADER_PROGRAM_ID:function(){return Hr},BpfLoader:function(){return Wr},COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:function(){return rs},ComputeBudgetInstruction:function(){return ns},ComputeBudgetProgram:function(){return os},Connection:function(){return Yi},Ed25519Program:function(){return ss},Enum:function(){return Nn},EpochSchedule:function(){return Qr},FeeCalculatorLayout:function(){return Rr},Keypair:function(){return Ji},LAMPORTS_PER_SOL:function(){return Bs},LOOKUP_TABLE_INSTRUCTION_LAYOUTS:function(){return Qi},Loader:function(){return Zr},Lockup:function(){return hs},MAX_SEED_LENGTH:function(){return Dn},Message:function(){return ur},MessageAccountKeys:function(){return Yn},MessageV0:function(){return lr},NONCE_ACCOUNT_LENGTH:function(){return Nr},NonceAccount:function(){return Lr},PACKET_DATA_SIZE:function(){return Hn},PUBLIC_KEY_LENGTH:function(){return Fn},PublicKey:function(){return $n},SIGNATURE_LENGTH_IN_BYTES:function(){return Gn},SOLANA_SCHEMA:function(){return Ln},STAKE_CONFIG_ID:function(){return ds},STAKE_INSTRUCTION_LAYOUTS:function(){return ms},SYSTEM_INSTRUCTION_LAYOUTS:function(){return zr},SYSVAR_CLOCK_PUBKEY:function(){return br},SYSVAR_EPOCH_SCHEDULE_PUBKEY:function(){return vr},SYSVAR_INSTRUCTIONS_PUBKEY:function(){return wr},SYSVAR_RECENT_BLOCKHASHES_PUBKEY:function(){return xr},SYSVAR_RENT_PUBKEY:function(){return Er},SYSVAR_REWARDS_PUBKEY:function(){return _r},SYSVAR_SLOT_HASHES_PUBKEY:function(){return kr},SYSVAR_SLOT_HISTORY_PUBKEY:function(){return Sr},SYSVAR_STAKE_HISTORY_PUBKEY:function(){return Ir},Secp256k1Program:function(){return us},SendTransactionError:function(){return Cr},SolanaJSONRPCError:function(){return Ar},SolanaJSONRPCErrorCode:function(){return Tr},StakeAuthorizationLayout:function(){return gs},StakeInstruction:function(){return ps},StakeProgram:function(){return ys},Struct:function(){return Bn},SystemInstruction:function(){return Fr},SystemProgram:function(){return $r},Transaction:function(){return mr},TransactionExpiredBlockheightExceededError:function(){return Kn},TransactionExpiredNonceInvalidError:function(){return Xn},TransactionExpiredTimeoutError:function(){return Vn},TransactionInstruction:function(){return pr},TransactionMessage:function(){return gr},TransactionStatus:function(){return fr},VALIDATOR_INFO_KEY:function(){return _s},VERSION_PREFIX_MASK:function(){return Wn},VOTE_PROGRAM_ID:function(){return Is},ValidatorInfo:function(){return Ss},VersionedMessage:function(){return dr},VersionedTransaction:function(){return yr},VoteAccount:function(){return Ts},VoteAuthorizationLayout:function(){return xs},VoteInit:function(){return bs},VoteInstruction:function(){return vs},VoteProgram:function(){return Es},clusterApiUrl:function(){return Ms},sendAndConfirmRawTransaction:function(){return Rs},sendAndConfirmTransaction:function(){return Pr}});var r={};n.r(r),n.d(r,{abytes:function(){return B},bitGet:function(){return oe},bitLen:function(){return re},bitMask:function(){return se},bitSet:function(){return ie},bytesToHex:function(){return L},bytesToNumberBE:function(){return K},bytesToNumberLE:function(){return V},concatBytes:function(){return ee},createHmacDrbg:function(){return ue},ensureBytes:function(){return Q},equalBytes:function(){return te},hexToBytes:function(){return G},hexToNumber:function(){return D},isBytes:function(){return R},numberToBytesBE:function(){return X},numberToBytesLE:function(){return Y},numberToHexUnpadded:function(){return U},numberToVarBytesBE:function(){return J},utf8ToBytes:function(){return ne},validateObject:function(){return de}});var o=n(48764);function i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function s(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"===typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");i(e.outputLen),i(e.blockLen)}function c(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){s(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const l="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;const d=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),f=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function h(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function p(e){return"string"===typeof e&&(e=h(e)),s(e),e}function m(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];s(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}class g{clone(){return this._cloneInto()}}function y(e){const t=t=>e().update(p(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function b(e=32){if(l&&"function"===typeof l.getRandomValues)return l.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const v=(e,t,n)=>e&t^e&n^t&n;class w extends g{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=d(this.buffer)}update(e){c(this);const{view:t,buffer:n,blockLen:r}=this,o=(e=p(e)).length;for(let i=0;i<o;){const s=Math.min(r-this.pos,o-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=d(e);for(;r<=o-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){c(this),u(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;t[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let c=i;c<r;c++)t[c]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const s=d(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c<l;c++)s.setUint32(4*c,f[c],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}}const x=BigInt(2**32-1),E=BigInt(32);function _(e,t=!1){return t?{h:Number(e&x),l:Number(e>>E&x)}:{h:0|Number(e>>E&x),l:0|Number(e&x)}}var k={fromBig:_,split:function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=_(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]},toBig:(e,t)=>BigInt(e>>>0)<<E|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,n)=>e<<n|t>>>32-n,rotlSL:(e,t,n)=>t<<n|e>>>32-n,rotlBH:(e,t,n)=>t<<n-32|e>>>64-n,rotlBL:(e,t,n)=>e<<n-32|t>>>64-n,add:function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)};const[S,I]=(()=>k.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),C=new Uint32Array(80),T=new Uint32Array(80);class A extends w{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:o,Cl:i,Dh:s,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:h,Hh:p,Hl:m}=this;return[e,t,n,r,o,i,s,a,c,u,l,d,f,h,p,m]}set(e,t,n,r,o,i,s,a,c,u,l,d,f,h,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|o,this.Cl=0|i,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let b=0;b<16;b++,t+=4)C[b]=e.getUint32(t),T[b]=e.getUint32(t+=4);for(let b=16;b<80;b++){const e=0|C[b-15],t=0|T[b-15],n=k.rotrSH(e,t,1)^k.rotrSH(e,t,8)^k.shrSH(e,t,7),r=k.rotrSL(e,t,1)^k.rotrSL(e,t,8)^k.shrSL(e,t,7),o=0|C[b-2],i=0|T[b-2],s=k.rotrSH(o,i,19)^k.rotrBH(o,i,61)^k.shrSH(o,i,6),a=k.rotrSL(o,i,19)^k.rotrBL(o,i,61)^k.shrSL(o,i,6),c=k.add4L(r,a,T[b-7],T[b-16]),u=k.add4H(c,n,s,C[b-7],C[b-16]);C[b]=0|u,T[b]=0|c}let{Ah:n,Al:r,Bh:o,Bl:i,Ch:s,Cl:a,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:h,Gh:p,Gl:m,Hh:g,Hl:y}=this;for(let b=0;b<80;b++){const e=k.rotrSH(l,d,14)^k.rotrSH(l,d,18)^k.rotrBH(l,d,41),t=k.rotrSL(l,d,14)^k.rotrSL(l,d,18)^k.rotrBL(l,d,41),v=l&f^~l&p,w=d&h^~d&m,x=k.add5L(y,t,w,I[b],T[b]),E=k.add5H(x,g,e,v,S[b],C[b]),_=0|x,A=k.rotrSH(n,r,28)^k.rotrBH(n,r,34)^k.rotrBH(n,r,39),P=k.rotrSL(n,r,28)^k.rotrBL(n,r,34)^k.rotrBL(n,r,39),O=n&o^n&s^o&s,j=r&i^r&a^i&a;g=0|p,y=0|m,p=0|f,m=0|h,f=0|l,h=0|d,({h:l,l:d}=k.add(0|c,0|u,0|E,0|_)),c=0|s,u=0|a,s=0|o,a=0|i,o=0|n,i=0|r;const M=k.add3L(_,P,j);n=k.add3H(M,E,A,O),r=0|M}({h:n,l:r}=k.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:i}=k.add(0|this.Bh,0|this.Bl,0|o,0|i)),({h:s,l:a}=k.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:c,l:u}=k.add(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=k.add(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:h}=k.add(0|this.Fh,0|this.Fl,0|f,0|h)),({h:p,l:m}=k.add(0|this.Gh,0|this.Gl,0|p,0|m)),({h:g,l:y}=k.add(0|this.Hh,0|this.Hl,0|g,0|y)),this.set(n,r,o,i,s,a,c,u,l,d,f,h,p,m,g,y)}roundClean(){C.fill(0),T.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const P=y((()=>new A)),O=BigInt(0),j=BigInt(1),M=BigInt(2);function R(e){return e instanceof Uint8Array||null!=e&&"object"===typeof e&&"Uint8Array"===e.constructor.name}function B(e){if(!R(e))throw new Error("Uint8Array expected")}const N=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function L(e){B(e);let t="";for(let n=0;n<e.length;n++)t+=N[e[n]];return t}function U(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function D(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const F=48,z=57,$=65,q=70,Z=97,H=102;function W(e){return e>=F&&e<=z?e-F:e>=$&&e<=q?e-($-10):e>=Z&&e<=H?e-(Z-10):void 0}function G(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const t=W(e.charCodeAt(i)),n=W(e.charCodeAt(i+1));if(void 0===t||void 0===n){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[o]=16*t+n}return r}function K(e){return D(L(e))}function V(e){return B(e),D(L(Uint8Array.from(e).reverse()))}function X(e,t){return G(e.toString(16).padStart(2*t,"0"))}function Y(e,t){return X(e,t).reverse()}function J(e){return G(U(e))}function Q(e,t,n){let r;if("string"===typeof t)try{r=G(t)}catch(i){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${i}`)}else{if(!R(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const o=r.length;if("number"===typeof n&&o!==n)throw new Error(`${e} expected ${n} bytes, got ${o}`);return r}function ee(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];B(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}function te(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}function ne(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function re(e){let t;for(t=0;e>O;e>>=j,t+=1);return t}function oe(e,t){return e>>BigInt(t)&j}function ie(e,t,n){return e|(n?j:O)<<BigInt(t)}const se=e=>(M<<BigInt(e-1))-j,ae=e=>new Uint8Array(e),ce=e=>Uint8Array.from(e);function ue(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=ae(e),o=ae(e),i=0;const s=()=>{r.fill(1),o.fill(0),i=0},a=(...e)=>n(o,r,...e),c=(e=ae())=>{o=a(ce([0]),e),r=a(),0!==e.length&&(o=a(ce([1]),e),r=a())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return ee(...n)};return(e,t)=>{let n;for(s(),c(e);!(n=t(u()));)c();return s(),n}}const le={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,stringOrUint8Array:e=>"string"===typeof e||R(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function de(e,t,n={}){const r=(t,n,r)=>{const o=le[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const i=e[t];if((!r||void 0!==i)&&!o(i,e))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${n}`)};for(const[o,i]of Object.entries(t))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return e}const fe=BigInt(0),he=BigInt(1),pe=BigInt(2),me=BigInt(3),ge=BigInt(4),ye=BigInt(5),be=BigInt(8);BigInt(9),BigInt(16);function ve(e,t){const n=e%t;return n>=fe?n:t+n}function we(e,t,n){if(n<=fe||t<fe)throw new Error("Expected power/modulo > 0");if(n===he)return fe;let r=he;for(;t>fe;)t&he&&(r=r*e%n),e=e*e%n,t>>=he;return r}function xe(e,t,n){let r=e;for(;t-- >fe;)r*=r,r%=n;return r}function Ee(e,t){if(e===fe||t<=fe)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=ve(e,t),r=t,o=fe,i=he,s=he,a=fe;for(;n!==fe;){const e=r/n,t=r%n,c=o-s*e,u=i-a*e;r=n,n=t,o=s,i=a,s=c,a=u}if(r!==he)throw new Error("invert: does not exist");return ve(o,t)}function _e(e){if(e%ge===me){const t=(e+he)/ge;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%be===ye){const t=(e-ye)/be;return function(e,n){const r=e.mul(n,pe),o=e.pow(r,t),i=e.mul(n,o),s=e.mul(e.mul(i,pe),o),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),n))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-he)/pe;let n,r,o;for(n=e-he,r=0;n%pe===fe;n/=pe,r++);for(o=pe;o<e&&we(o,t,e)!==e-he;o++);if(1===r){const t=(e+he)/ge;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const i=(n+he)/pe;return function(e,s){if(e.pow(s,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=r,c=e.pow(e.mul(e.ONE,o),n),u=e.pow(s,i),l=e.pow(s,n);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const n=e.pow(c,he<<BigInt(a-t-1));c=e.sqr(n),u=e.mul(u,n),l=e.mul(l,c),a=t}return u}}(e)}const ke=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Se(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Ie(e,t,n=!1,r={}){if(e<=fe)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:i}=Se(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=_e(e),a=Object.freeze({ORDER:e,BITS:o,BYTES:i,MASK:se(o),ZERO:fe,ONE:he,create:t=>ve(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return fe<=t&&t<e},is0:e=>e===fe,isOdd:e=>(e&he)===he,neg:t=>ve(-t,e),eql:(e,t)=>e===t,sqr:t=>ve(t*t,e),add:(t,n)=>ve(t+n,e),sub:(t,n)=>ve(t-n,e),mul:(t,n)=>ve(t*n,e),pow:(e,t)=>function(e,t,n){if(n<fe)throw new Error("Expected power > 0");if(n===fe)return e.ONE;if(n===he)return t;let r=e.ONE,o=t;for(;n>fe;)n&he&&(r=e.mul(r,o)),o=e.sqr(o),n>>=he;return r}(a,e,t),div:(t,n)=>ve(t*Ee(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Ee(t,e),sqrt:r.sqrt||(e=>s(a,e)),invertBatch:e=>function(e,t){const n=new Array(t.length),r=t.reduce(((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r))),e.ONE),o=e.inv(r);return t.reduceRight(((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r))),o),n}(a,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?Y(e,i):X(e,i),fromBytes:e=>{if(e.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${e.length}`);return n?V(e):K(e)}});return Object.freeze(a)}function Ce(e){if("bigint"!==typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Te(e){const t=Ce(e);return t+Math.ceil(t/2)}const Ae=BigInt(0),Pe=BigInt(1);function Oe(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,o=t;for(;n>Ae;)n&Pe&&(r=r.add(o)),o=o.double(),n>>=Pe;return r},precomputeWindow(e,t){const{windows:n,windowSize:o}=r(t),i=[];let s=e,a=s;for(let r=0;r<n;r++){a=s,i.push(a);for(let e=1;e<o;e++)a=a.add(s),i.push(a);s=a.double()}return i},wNAF(t,o,i){const{windows:s,windowSize:a}=r(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<s;e++){const t=e*a;let r=Number(i&l);i>>=f,r>a&&(r-=d,i+=Pe);const s=t,h=t+Math.abs(r)-1,p=e%2!==0,m=r<0;0===r?u=u.add(n(p,o[s])):c=c.add(n(m,o[h]))}return{p:c,f:u}},wNAFCached(e,t,n,r){const o=e._WINDOW_SIZE||1;let i=t.get(e);return i||(i=this.precomputeWindow(e,o),1!==o&&t.set(e,r(i))),this.wNAF(o,i,n)}}}function je(e){return de(e.Fp,ke.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),de(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Se(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const Me=BigInt(0),Re=BigInt(1),Be=BigInt(2),Ne=BigInt(8),Le={zip215:!0};function Ue(e){const t=function(e){const t=je(e);return de(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:r,prehash:o,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=Be<<BigInt(8*a)-Re,l=n.create,d=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(r){return{isValid:!1,value:Me}}}),f=t.adjustScalarBytes||(e=>e),h=t.domain||((e,t,n)=>{if(t.length||n)throw new Error("Contexts/pre-hash are not supported");return e}),p=e=>"bigint"===typeof e&&Me<e,m=(e,t)=>p(e)&&p(t)&&e<t,g=e=>e===Me||m(e,u);function y(e,t){if(m(e,t))return e;throw new Error(`Expected valid scalar < ${t}, got ${typeof e} ${e}`)}function b(e){return e===Me?e:y(e,r)}const v=new Map;function w(e){if(!(e instanceof x))throw new Error("ExtendedPoint expected")}class x{constructor(e,t,n,r){if(this.ex=e,this.ey=t,this.ez=n,this.et=r,!g(e))throw new Error("x required");if(!g(t))throw new Error("y required");if(!g(n))throw new Error("z required");if(!g(r))throw new Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof x)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};if(!g(t)||!g(n))throw new Error("invalid affine point");return new x(t,n,Re,l(t*n))}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.ez)));return e.map(((e,n)=>e.toAffine(t[n]))).map(x.fromAffine)}_setWindowSize(e){this._WINDOW_SIZE=e,v.delete(this)}assertValidity(){const{a:e,d:n}=t;if(this.is0())throw new Error("bad point: ZERO");const{ex:r,ey:o,ez:i,et:s}=this,a=l(r*r),c=l(o*o),u=l(i*i),d=l(u*u),f=l(a*e);if(l(u*l(f+c))!==l(d+l(n*l(a*c))))throw new Error("bad point: equation left != right (1)");if(l(r*o)!==l(i*s))throw new Error("bad point: equation left != right (2)")}equals(e){w(e);const{ex:t,ey:n,ez:r}=this,{ex:o,ey:i,ez:s}=e,a=l(t*s),c=l(o*r),u=l(n*s),d=l(i*r);return a===c&&u===d}is0(){return this.equals(x.ZERO)}negate(){return new x(l(-this.ex),this.ey,this.ez,l(-this.et))}double(){const{a:e}=t,{ex:n,ey:r,ez:o}=this,i=l(n*n),s=l(r*r),a=l(Be*l(o*o)),c=l(e*i),u=n+r,d=l(l(u*u)-i-s),f=c+s,h=f-a,p=c-s,m=l(d*h),g=l(f*p),y=l(d*p),b=l(h*f);return new x(m,g,b,y)}add(e){w(e);const{a:n,d:r}=t,{ex:o,ey:i,ez:s,et:a}=this,{ex:c,ey:u,ez:d,et:f}=e;if(n===BigInt(-1)){const e=l((i-o)*(u+c)),t=l((i+o)*(u-c)),n=l(t-e);if(n===Me)return this.double();const r=l(s*Be*f),h=l(a*Be*d),p=h+r,m=t+e,g=h-r,y=l(p*n),b=l(m*g),v=l(p*g),w=l(n*m);return new x(y,b,w,v)}const h=l(o*c),p=l(i*u),m=l(a*r*f),g=l(s*d),y=l((o+i)*(c+u)-h-p),b=g-m,v=g+m,E=l(p-n*h),_=l(y*b),k=l(v*E),S=l(y*E),I=l(b*v);return new x(_,k,I,S)}subtract(e){return this.add(e.negate())}wNAF(e){return k.wNAFCached(this,v,e,x.normalizeZ)}multiply(e){const{p:t,f:n}=this.wNAF(y(e,r));return x.normalizeZ([t,n])[0]}multiplyUnsafe(e){let t=b(e);return t===Me?_:this.equals(_)||t===Re?this:this.equals(E)?this.wNAF(t).p:k.unsafeLadder(this,t)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return k.unsafeLadder(this,r).is0()}toAffine(e){const{ex:t,ey:r,ez:o}=this,i=this.is0();null==e&&(e=i?Ne:n.inv(o));const s=l(t*e),a=l(r*e),c=l(o*e);if(i)return{x:Me,y:Re};if(c!==Re)throw new Error("invZ was invalid");return{x:s,y:a}}clearCofactor(){const{h:e}=t;return e===Re?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){const{d:o,a:i}=t,s=n.BYTES,a=(e=Q("pointHex",e,s)).slice(),c=e[s-1];a[s-1]=-129&c;const f=V(a);f===Me||y(f,r?u:n.ORDER);const h=l(f*f),p=l(h-Re),m=l(o*h-i);let{isValid:g,value:b}=d(p,m);if(!g)throw new Error("Point.fromHex: invalid y coordinate");const v=(b&Re)===Re,w=0!==(128&c);if(!r&&b===Me&&w)throw new Error("Point.fromHex: x=0 and x_0=1");return w!==v&&(b=l(-b)),x.fromAffine({x:b,y:f})}static fromPrivateKey(e){return C(e).point}toRawBytes(){const{x:e,y:t}=this.toAffine(),r=Y(t,n.BYTES);return r[r.length-1]|=e&Re?128:0,r}toHex(){return L(this.toRawBytes())}}x.BASE=new x(t.Gx,t.Gy,Re,l(t.Gx*t.Gy)),x.ZERO=new x(Me,Re,Re,Me);const{BASE:E,ZERO:_}=x,k=Oe(x,8*a);function S(e){return ve(e,r)}function I(e){return S(V(e))}function C(e){const t=a;e=Q("private key",e,t);const n=Q("hashed private key",i(e),2*t),r=f(n.slice(0,t)),o=n.slice(t,2*t),s=I(r),c=E.multiply(s),u=c.toRawBytes();return{head:r,prefix:o,scalar:s,point:c,pointBytes:u}}function T(e=new Uint8Array,...t){const n=ee(...t);return I(i(h(n,Q("context",e),!!o)))}const A=Le;E._setWindowSize(8);return{CURVE:t,getPublicKey:function(e){return C(e).pointBytes},sign:function(e,t,r={}){e=Q("message",e),o&&(e=o(e));const{prefix:i,scalar:s,pointBytes:c}=C(t),u=T(r.context,i,e),l=E.multiply(u).toRawBytes(),d=S(u+T(r.context,l,c,e)*s);return b(d),Q("result",ee(l,Y(d,n.BYTES)),2*a)},verify:function(e,t,r,i=A){const{context:s,zip215:a}=i,c=n.BYTES;e=Q("signature",e,2*c),t=Q("message",t),o&&(t=o(t));const u=V(e.slice(c,2*c));let l,d,f;try{l=x.fromHex(r,a),d=x.fromHex(e.slice(0,c),a),f=E.multiplyUnsafe(u)}catch(p){return!1}if(!a&&l.isSmallOrder())return!1;const h=T(s,d.toRawBytes(),l.toRawBytes(),t);return d.add(l.multiplyUnsafe(h)).subtract(f).clearCofactor().equals(x.ZERO)},ExtendedPoint:x,utils:{getExtendedPublicKey:C,randomPrivateKey:()=>s(n.BYTES),precompute:(e=8,t=x.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}}const De=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Fe=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),ze=(BigInt(0),BigInt(1)),$e=BigInt(2),qe=BigInt(5),Ze=BigInt(10),He=BigInt(20),We=BigInt(40),Ge=BigInt(80);function Ke(e){const t=De,n=e*e%t*e%t,r=xe(n,$e,t)*n%t,o=xe(r,ze,t)*e%t,i=xe(o,qe,t)*o%t,s=xe(i,Ze,t)*i%t,a=xe(s,He,t)*s%t,c=xe(a,We,t)*a%t,u=xe(c,Ge,t)*c%t,l=xe(u,Ge,t)*c%t,d=xe(l,Ze,t)*i%t;return{pow_p_5_8:xe(d,$e,t)*e%t,b2:n}}function Ve(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function Xe(e,t){const n=De,r=ve(t*t*t,n),o=ve(r*r*t,n);let i=ve(e*r*Ke(e*o).pow_p_5_8,n);const s=ve(t*i*i,n),a=i,c=ve(i*Fe,n),u=s===e,l=s===ve(-e,n),d=s===ve(-e*Fe,n);return u&&(i=a),(l||d)&&(i=c),(ve(i,n)&he)===he&&(i=ve(-i,n)),{isValid:u||l,value:i}}const Ye=Ie(De,void 0,!0),Je={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Ye,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:P,randomBytes:b,adjustScalarBytes:Ve,uvRatio:Xe},Qe=Ue(Je);function et(e,t,n){if(t.length>255)throw new Error("Context is too big");return m(h("SigEd25519 no Ed25519 collisions"),new Uint8Array([n?1:0,t.length]),t,e)}const tt=(Ye.ORDER+BigInt(3))/BigInt(8);Ye.pow($e,tt),Ye.sqrt(Ye.neg(Ye.ONE)),Ye.ORDER,BigInt(5),BigInt(8),BigInt(486662);!function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);e.isOdd(n)&&e.neg(n)}(Ye,Ye.neg(BigInt(486664)));BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var nt=n(13550),rt=n.n(nt),ot=n(77191),it=n.n(ot);function st(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function at(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"===typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function ct(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ut(e,t){at(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const lt=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),dt=(e,t)=>e<<32-t|e>>>t,ft=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],ht=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function pt(e){for(let t=0;t<e.length;t++)e[t]=ht(e[t])}function mt(e){return"string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),at(e),e}class gt{clone(){return this._cloneInto()}}function yt(e){const t=t=>e().update(mt(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const bt=(e,t,n)=>e&t^e&n^t&n;class vt extends gt{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=lt(this.buffer)}update(e){ct(this);const{view:t,buffer:n,blockLen:r}=this,o=(e=mt(e)).length;for(let i=0;i<o;){const s=Math.min(r-this.pos,o-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=lt(e);for(;r<=o-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){ct(this),ut(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;t[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let l=i;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const s=lt(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)s.setUint32(4*l,u[l],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}}const wt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),xt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Et=new Uint32Array(64);class _t extends vt{constructor(){super(64,32,8,!1),this.A=0|xt[0],this.B=0|xt[1],this.C=0|xt[2],this.D=0|xt[3],this.E=0|xt[4],this.F=0|xt[5],this.G=0|xt[6],this.H=0|xt[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a}=this;return[e,t,n,r,o,i,s,a]}set(e,t,n,r,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let d=0;d<16;d++,t+=4)Et[d]=e.getUint32(t,!1);for(let d=16;d<64;d++){const e=Et[d-15],t=Et[d-2],n=dt(e,7)^dt(e,18)^e>>>3,r=dt(t,17)^dt(t,19)^t>>>10;Et[d]=r+Et[d-7]+n+Et[d-16]|0}let{A:n,B:r,C:o,D:i,E:s,F:a,G:c,H:u}=this;for(let d=0;d<64;d++){const e=u+(dt(s,6)^dt(s,11)^dt(s,25))+((l=s)&a^~l&c)+wt[d]+Et[d]|0,t=(dt(n,2)^dt(n,13)^dt(n,22))+bt(n,r,o)|0;u=c,c=a,a=s,s=i+e|0,i=o,o=r,r=n,n=e+t|0}var l;n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,o,i,s,a,c,u)}roundClean(){Et.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const kt=yt((()=>new _t));var St=n(25532),It=n(39386),Ct=n(40475),Tt=n(97884),At=n(31198),Pt=n.n(At),Ot=n(31504),jt=n(26731);const Mt=BigInt(2**32-1),Rt=BigInt(32);function Bt(e,t=!1){return t?{h:Number(e&Mt),l:Number(e>>Rt&Mt)}:{h:0|Number(e>>Rt&Mt),l:0|Number(e&Mt)}}function Nt(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=Bt(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]}const Lt=(e,t,n)=>e<<n|t>>>32-n,Ut=(e,t,n)=>t<<n|e>>>32-n,Dt=(e,t,n)=>t<<n-32|e>>>64-n,Ft=(e,t,n)=>e<<n-32|t>>>64-n;const zt=[],$t=[],qt=[],Zt=BigInt(0),Ht=BigInt(1),Wt=BigInt(2),Gt=BigInt(7),Kt=BigInt(256),Vt=BigInt(113);for(let Ns=0,Ls=Ht,Us=1,Ds=0;Ns<24;Ns++){[Us,Ds]=[Ds,(2*Us+3*Ds)%5],zt.push(2*(5*Ds+Us)),$t.push((Ns+1)*(Ns+2)/2%64);let e=Zt;for(let t=0;t<7;t++)Ls=(Ls<<Ht^(Ls>>Gt)*Vt)%Kt,Ls&Wt&&(e^=Ht<<(Ht<<BigInt(t))-Ht);qt.push(e)}const[Xt,Yt]=Nt(qt,!0),Jt=(e,t,n)=>n>32?Dt(e,t,n):Lt(e,t,n),Qt=(e,t,n)=>n>32?Ft(e,t,n):Ut(e,t,n);class en extends gt{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,st(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var i;this.state=new Uint8Array(200),this.state32=(i=this.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4)))}keccak(){ft||pt(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,i=n[o],s=n[o+1],a=Jt(i,s,1)^n[t],c=Qt(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=$t[n],i=Jt(t,o,r),s=Qt(t,o,r),a=zt[n];t=e[a],o=e[a+1],e[a]=i,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=Xt[r],e[1]^=Yt[r]}n.fill(0)}(this.state32,this.rounds),ft||pt(this.state32),this.posOut=0,this.pos=0}update(e){ct(this);const{blockLen:t,state:n}=this,r=(e=mt(e)).length;for(let o=0;o<r;){const i=Math.min(t-this.pos,r-o);for(let t=0;t<i;t++)n[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){ct(this,!1),at(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return st(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ut(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new en(t,n,r,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}const tn=(e,t,n)=>yt((()=>new en(t,e,n))),nn=tn(1,136,32),rn=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),on=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),sn=new Uint32Array(64);class an extends w{constructor(){super(64,32,8,!1),this.A=0|on[0],this.B=0|on[1],this.C=0|on[2],this.D=0|on[3],this.E=0|on[4],this.F=0|on[5],this.G=0|on[6],this.H=0|on[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a}=this;return[e,t,n,r,o,i,s,a]}set(e,t,n,r,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let d=0;d<16;d++,t+=4)sn[d]=e.getUint32(t,!1);for(let d=16;d<64;d++){const e=sn[d-15],t=sn[d-2],n=f(e,7)^f(e,18)^e>>>3,r=f(t,17)^f(t,19)^t>>>10;sn[d]=r+sn[d-7]+n+sn[d-16]|0}let{A:n,B:r,C:o,D:i,E:s,F:a,G:c,H:u}=this;for(let d=0;d<64;d++){const e=u+(f(s,6)^f(s,11)^f(s,25))+((l=s)&a^~l&c)+rn[d]+sn[d]|0,t=(f(n,2)^f(n,13)^f(n,22))+v(n,r,o)|0;u=c,c=a,a=s,s=i+e|0,i=o,o=r,r=n,n=e+t|0}var l;n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,o,i,s,a,c,u)}roundClean(){sn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const cn=y((()=>new an));class un extends g{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,a(e);const n=p(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?e.create().update(n).digest():n);for(let i=0;i<o.length;i++)o[i]^=54;this.iHash.update(o),this.oHash=e.create();for(let i=0;i<o.length;i++)o[i]^=106;this.oHash.update(o),o.fill(0)}update(e){return c(this),this.iHash.update(e),this}digestInto(e){c(this),s(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:o,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=o,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ln=(e,t,n)=>new un(e,t).update(n).digest();ln.create=(e,t)=>new un(e,t);const{bytesToNumberBE:dn,hexToBytes:fn}=r,hn={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=hn;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(128&r[0])throw new t("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:dn(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=hn,n="string"===typeof e?fn(e):e;B(n);let r=n.length;if(r<2||48!=n[0])throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:o,l:i}=hn._parseInt(n.subarray(2)),{d:s,l:a}=hn._parseInt(i);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s:s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),o=t(n(e.r)),i=r.length/2,s=o.length/2,a=n(i),c=n(s);return`30${n(s+i+4)}02${c}${o}02${a}${r}`}},pn=BigInt(0),mn=BigInt(1),gn=(BigInt(2),BigInt(3));BigInt(4);function yn(e){const t=function(e){const t=je(e);de(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{const o=t.toAffine();return ee(Uint8Array.from([4]),n.toBytes(o.x),n.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function i(e){const{a:r,b:o}=t,i=n.sqr(e),s=n.mul(i,e);return n.add(n.add(s,n.mul(e,r)),o)}if(!n.eql(n.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function s(e){return"bigint"===typeof e&&pn<e&&e<t.n}function a(e){if(!s(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:o,n:i}=t;if(n&&"bigint"!==typeof e){if(R(e)&&(e=L(e)),"string"!==typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let s;try{s="bigint"===typeof e?e:K(Q("private key",e,r))}catch(c){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return o&&(s=ve(s,i)),a(s),s}const u=new Map;function l(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const o=e=>n.eql(e,n.ZERO);return o(t)&&o(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(Q("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const o=n.sqr(r),s=i(e);if(!n.eql(o,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){l(e);const{px:t,py:r,pz:o}=this,{px:i,py:s,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(i,o)),u=n.eql(n.mul(r,a),n.mul(s,o));return c&&u}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,o=n.mul(r,gn),{px:i,py:s,pz:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,f=n.mul(i,i),h=n.mul(s,s),p=n.mul(a,a),m=n.mul(i,s);return m=n.add(m,m),l=n.mul(i,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(o,p),u=n.add(c,u),c=n.sub(h,u),u=n.add(h,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(o,l),p=n.mul(e,p),m=n.sub(f,p),m=n.mul(e,m),m=n.add(m,l),l=n.add(f,f),f=n.add(l,f),f=n.add(f,p),f=n.mul(f,m),u=n.add(u,f),p=n.mul(s,a),p=n.add(p,p),f=n.mul(p,m),c=n.sub(c,f),l=n.mul(p,h),l=n.add(l,l),l=n.add(l,l),new d(c,u,l)}add(e){l(e);const{px:r,py:o,pz:i}=this,{px:s,py:a,pz:c}=e;let u=n.ZERO,f=n.ZERO,h=n.ZERO;const p=t.a,m=n.mul(t.b,gn);let g=n.mul(r,s),y=n.mul(o,a),b=n.mul(i,c),v=n.add(r,o),w=n.add(s,a);v=n.mul(v,w),w=n.add(g,y),v=n.sub(v,w),w=n.add(r,i);let x=n.add(s,c);return w=n.mul(w,x),x=n.add(g,b),w=n.sub(w,x),x=n.add(o,i),u=n.add(a,c),x=n.mul(x,u),u=n.add(y,b),x=n.sub(x,u),h=n.mul(p,w),u=n.mul(m,b),h=n.add(u,h),u=n.sub(y,h),h=n.add(y,h),f=n.mul(u,h),y=n.add(g,g),y=n.add(y,g),b=n.mul(p,b),w=n.mul(m,w),y=n.add(y,b),b=n.sub(g,b),b=n.mul(p,b),w=n.add(w,b),g=n.mul(y,w),f=n.add(f,g),g=n.mul(x,w),u=n.mul(v,u),u=n.sub(u,g),g=n.mul(v,y),h=n.mul(x,h),h=n.add(h,g),new d(u,f,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return h.wNAFCached(this,u,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}))}multiplyUnsafe(e){const r=d.ZERO;if(e===pn)return r;if(a(e),e===mn)return this;const{endo:o}=t;if(!o)return h.unsafeLadder(this,e);let{k1neg:i,k1:s,k2neg:c,k2:u}=o.splitScalar(e),l=r,f=r,p=this;for(;s>pn||u>pn;)s&mn&&(l=l.add(p)),u&mn&&(f=f.add(p)),p=p.double(),s>>=mn,u>>=mn;return i&&(l=l.negate()),c&&(f=f.negate()),f=new d(n.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){a(e);let r,o,i=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(i);let{p:u,f:l}=this.wNAF(t),{p:f,f:p}=this.wNAF(c);u=h.constTimeNegate(e,u),f=h.constTimeNegate(a,f),f=new d(n.mul(f.px,s.beta),f.py,f.pz),r=u.add(f),o=l.add(p)}else{const{p:e,f:t}=this.wNAF(i);r=e,o=t}return d.normalizeZ([r,o])[0]}multiplyAndAddUnsafe(e,t,n){const r=d.BASE,o=(e,t)=>t!==pn&&t!==mn&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,n));return i.is0()?void 0:i}toAffine(e){const{px:t,py:r,pz:o}=this,i=this.is0();null==e&&(e=i?n.ONE:n.inv(o));const s=n.mul(t,e),a=n.mul(r,e),c=n.mul(o,e);if(i)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===mn)return!0;if(n)return n(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===mn?this:n?n(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),r(d,this,e)}toHex(e=!0){return L(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,h=Oe(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:s}}function bn(e){const t=function(e){const t=je(e);return de(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,o=n.BYTES+1,i=2*n.BYTES+1;function s(e){return ve(e,r)}function a(e){return Ee(e,r)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=yn({...t,toBytes(e,t,r){const o=t.toAffine(),i=n.toBytes(o.x),s=ee;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,n.toBytes(o.y))},fromBytes(e){const t=e.length,r=e[0],s=e.subarray(1);if(t!==o||2!==r&&3!==r){if(t===i&&4===r){return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${i} uncompressed bytes`)}{const e=K(s);if(!(pn<(a=e)&&a<n.ORDER))throw new Error("Point is not on curve");const t=l(e);let o;try{o=n.sqrt(t)}catch(c){const e=c instanceof Error?": "+c.message:"";throw new Error("Point is not on curve"+e)}return 1===(1&r)!==((o&mn)===mn)&&(o=n.neg(o)),{x:e,y:o}}var a}}),f=e=>L(X(e,t.nByteLength));function h(e){return e>r>>mn}const p=(e,t,n)=>K(e.slice(t,n));class m{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=Q("compactSignature",e,2*n),new m(p(e,0,n),p(e,n,2*n))}static fromDER(e){const{r:t,s:n}=hn.toSig(Q("DER",e));return new m(t,n)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new m(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:o,recovery:i}=this,u=v(Q("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const l=2===i||3===i?r+t.n:r;if(l>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=0===(1&i)?"02":"03",h=c.fromHex(d+f(l)),p=a(l),m=s(-u*p),g=s(o*p),y=c.BASE.multiplyAndAddUnsafe(h,m,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return G(this.toDERHex())}toDERHex(){return hn.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return G(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const g={isValidPrivateKey(e){try{return u(e),!0}catch(t){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=Te(t.n);return function(e,t,n=!1){const r=e.length,o=Ce(t),i=Te(t);if(r<16||r<i||r>1024)throw new Error(`expected ${i}-1024 bytes of input, got ${r}`);const s=ve(n?K(e):V(e),t-he)+he;return n?Y(s,o):X(s,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function y(e){const t=R(e),n="string"===typeof e,r=(t||n)&&e.length;return t?r===o||r===i:n?r===2*o||r===2*i:e instanceof c}const b=t.bits2int||function(e){const n=K(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},v=t.bits2int_modN||function(e){return s(b(e))},w=se(t.nBitLength);function x(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(pn<=e&&e<w))throw new Error(`bigint expected < 2^${t.nBitLength}`);return X(e,t.nByteLength)}function E(e,r,o=_){if(["recovered","canonical"].some((e=>e in o)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:l}=t;let{lowS:f,prehash:p,extraEntropy:g}=o;null==f&&(f=!0),e=Q("msgHash",e),p&&(e=Q("prehashed msgHash",i(e)));const y=v(e),w=u(r),E=[x(w),x(y)];if(null!=g&&!1!==g){const e=!0===g?l(n.BYTES):g;E.push(Q("extraEntropy",e))}const k=ee(...E),S=y;return{seed:k,k2sig:function(e){const t=b(e);if(!d(t))return;const n=a(t),r=c.BASE.multiply(t).toAffine(),o=s(r.x);if(o===pn)return;const i=s(n*s(S+o*w));if(i===pn)return;let u=(r.x===o?0:2)|Number(r.y&mn),l=i;return f&&h(i)&&(l=function(e){return h(e)?s(-e):e}(i),u^=1),new m(o,l,u)}}}const _={lowS:t.lowS,prehash:!1},k={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(u(e)).toRawBytes(n)},sign:function(e,n,r=_){const{seed:o,k2sig:i}=E(e,n,r),s=t;return ue(s.hash.outputLen,s.nByteLength,s.hmac)(o,i)},verify:function(e,n,r,o=k){const i=e;if(n=Q("msgHash",n),r=Q("publicKey",r),"strict"in o)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=o;let d,f;try{if("string"===typeof i||R(i))try{d=m.fromDER(i)}catch(E){if(!(E instanceof hn.Err))throw E;d=m.fromCompact(i)}else{if("object"!==typeof i||"bigint"!==typeof i.r||"bigint"!==typeof i.s)throw new Error("PARSE");{const{r:e,s:t}=i;d=new m(e,t)}}f=c.fromHex(r)}catch(_){if("PARSE"===_.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&d.hasHighS())return!1;l&&(n=t.hash(n));const{r:h,s:p}=d,g=v(n),y=a(p),b=s(g*y),w=s(h*y),x=c.BASE.multiplyAndAddUnsafe(f,b,w)?.toAffine();return!!x&&s(x.x)===h},ProjectivePoint:c,Signature:m,utils:g}}function vn(e){return{hash:e,hmac:(t,...n)=>ln(e,t,m(...n)),randomBytes:b}}const wn=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),xn=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),En=BigInt(1),_n=BigInt(2),kn=(e,t)=>(e+t/_n)/t;function Sn(e){const t=wn,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=xe(l,n,t)*l%t,f=xe(d,n,t)*l%t,h=xe(f,_n,t)*u%t,p=xe(h,o,t)*h%t,m=xe(p,i,t)*p%t,g=xe(m,a,t)*m%t,y=xe(g,c,t)*g%t,b=xe(y,a,t)*m%t,v=xe(b,n,t)*l%t,w=xe(v,s,t)*p%t,x=xe(w,r,t)*u%t,E=xe(x,_n,t);if(!In.eql(In.sqr(E),e))throw new Error("Cannot find square root");return E}const In=Ie(wn,void 0,void 0,{sqrt:Sn}),Cn=function(e,t){const n=t=>bn({...e,...vn(t)});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:In,n:xn,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=xn,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-En*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,s=BigInt("0x100000000000000000000000000000000"),a=kn(i*e,t),c=kn(-r*e,t);let u=ve(e-a*n-c*o,t),l=ve(-a*r-c*i,t);const d=u>s,f=l>s;if(d&&(u=t-u),f&&(l=t-l),u>s||l>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},cn);BigInt(0);Cn.ProjectivePoint;const Tn=Qe.utils.randomPrivateKey,An=()=>{const e=Qe.utils.randomPrivateKey(),t=Pn(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),{publicKey:t,secretKey:n}},Pn=Qe.getPublicKey;function On(e){try{return Qe.ExtendedPoint.fromHex(e),!0}catch{return!1}}const jn=(e,t)=>Qe.sign(e,t.slice(0,32)),Mn=Qe.verify,Rn=e=>o.Buffer.isBuffer(e)?e:e instanceof Uint8Array?o.Buffer.from(e.buffer,e.byteOffset,e.byteLength):o.Buffer.from(e);class Bn{constructor(e){Object.assign(this,e)}encode(){return o.Buffer.from((0,St.serialize)(Ln,this))}static decode(e){return(0,St.deserialize)(Ln,this,e)}static decodeUnchecked(e){return(0,St.deserializeUnchecked)(Ln,this,e)}}class Nn extends Bn{constructor(e){if(super(e),this.enum="",1!==Object.keys(e).length)throw new Error("Enum can only take single value");Object.keys(e).map((e=>{this.enum=e}))}}const Ln=new Map;var Un;const Dn=32,Fn=32;let zn=1;class $n extends Bn{constructor(e){if(super({}),this._bn=void 0,function(e){return void 0!==e._bn}(e))this._bn=e._bn;else{if("string"===typeof e){const t=it().decode(e);if(t.length!=Fn)throw new Error("Invalid public key input");this._bn=new(rt())(t)}else this._bn=new(rt())(e);if(this._bn.byteLength()>Fn)throw new Error("Invalid public key input")}}static unique(){const e=new $n(zn);return zn+=1,new $n(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return it().encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this._bn.toArrayLike(o.Buffer);if(e.length===Fn)return e;const t=o.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=o.Buffer.concat([e.toBuffer(),o.Buffer.from(t),n.toBuffer()]),i=kt(r);return new $n(i)}static createProgramAddressSync(e,t){let n=o.Buffer.alloc(0);e.forEach((function(e){if(e.length>Dn)throw new TypeError("Max seed length exceeded");n=o.Buffer.concat([n,Rn(e)])})),n=o.Buffer.concat([n,t.toBuffer(),o.Buffer.from("ProgramDerivedAddress")]);const r=kt(n);if(On(r))throw new Error("Invalid seeds, address must fall off the curve");return new $n(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const i=e.concat(o.Buffer.from([r]));n=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return On(new $n(e).toBytes())}}Un=$n,$n.default=new Un("11111111111111111111111111111111"),Ln.set($n,{kind:"struct",fields:[["_bn","u256"]]});class qn{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const t=Rn(e);if(64!==e.length)throw new Error("bad secret key size");this._publicKey=t.slice(32,64),this._secretKey=t.slice(0,32)}else this._secretKey=Rn(Tn()),this._publicKey=Rn(Pn(this._secretKey))}get publicKey(){return new $n(this._publicKey)}get secretKey(){return o.Buffer.concat([this._secretKey,this._publicKey],64)}}const Zn=new $n("BPFLoader1111111111111111111111111111111111"),Hn=1232,Wn=127,Gn=64;class Kn extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Kn.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Vn extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Vn.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Xn extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Xn.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Yn{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const t=new Map;this.keySegments().flat().forEach(((e,n)=>{t.set(e.toBase58(),n)}));const n=e=>{const n=t.get(e.toBase58());if(void 0===n)throw new Error("Encountered an unknown instruction account key during compilation");return n};return e.map((e=>({programIdIndex:n(e.programId),accountKeyIndexes:e.keys.map((e=>n(e.pubkey))),data:e.data})))}}const Jn=(e="publicKey")=>It.Ik(32,e),Qn=(e="signature")=>It.Ik(64,e),er=(e="string")=>{const t=It.n_([It.Jq("length"),It.Jq("lengthPadding"),It.Ik(It.cv(It.Jq(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(e,t)=>n(e,t).chars.toString(),i.encode=(e,t,n)=>{const i={chars:o.Buffer.from(e,"utf8")};return r(i,t,n)},i.alloc=e=>It.Jq().span+It.Jq().span+o.Buffer.from(e,"utf8").length,i};function tr(e,t){const n=e=>{if(e.span>=0)return e.span;if("function"===typeof e.alloc)return e.alloc(t[e.property]);if("count"in e&&"elementLayout"in e){const r=t[e.property];if(Array.isArray(r))return r.length*n(e.elementLayout)}else if("fields"in e)return tr({layout:e},t[e.property]);return 0};let r=0;return e.layout.fields.forEach((e=>{r+=n(e)})),r}function nr(e){let t=0,n=0;for(;;){let r=e.shift();if(t|=(127&r)<<7*n,n+=1,0===(128&r))break}return t}function rr(e,t){let n=t;for(;;){let t=127&n;if(n>>=7,0==n){e.push(t);break}t|=128,e.push(t)}}function or(e,t){if(!e)throw new Error(t||"Assertion failed")}class ir{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){const n=new Map,r=e=>{const t=e.toBase58();let r=n.get(t);return void 0===r&&(r={isSigner:!1,isWritable:!1,isInvoked:!1},n.set(t,r)),r},o=r(t);o.isSigner=!0,o.isWritable=!0;for(const i of e){r(i.programId).isInvoked=!0;for(const e of i.keys){const t=r(e.pubkey);t.isSigner||=e.isSigner,t.isWritable||=e.isWritable}}return new ir(t,n)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];or(e.length<=256,"Max static account keys length exceeded");const t=e.filter((([,e])=>e.isSigner&&e.isWritable)),n=e.filter((([,e])=>e.isSigner&&!e.isWritable)),r=e.filter((([,e])=>!e.isSigner&&e.isWritable)),o=e.filter((([,e])=>!e.isSigner&&!e.isWritable)),i={numRequiredSignatures:t.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:o.length};{or(t.length>0,"Expected at least one writable signer key");const[e]=t[0];or(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}return[i,[...t.map((([e])=>new $n(e))),...n.map((([e])=>new $n(e))),...r.map((([e])=>new $n(e))),...o.map((([e])=>new $n(e)))]]}extractTableLookup(e){const[t,n]=this.drainKeysFoundInLookupTable(e.state.addresses,(e=>!e.isSigner&&!e.isInvoked&&e.isWritable)),[r,o]=this.drainKeysFoundInLookupTable(e.state.addresses,(e=>!e.isSigner&&!e.isInvoked&&!e.isWritable));if(0!==t.length||0!==r.length)return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:r},{writable:n,readonly:o}]}drainKeysFoundInLookupTable(e,t){const n=new Array,r=new Array;for(const[o,i]of this.keyMetaMap.entries())if(t(i)){const t=new $n(o),i=e.findIndex((e=>e.equals(t)));i>=0&&(or(i<256,"Max lookup table index exceeded"),n.push(i),r.push(t),this.keyMetaMap.delete(o))}return[n,r]}}const sr="Reached end of buffer unexpectedly";function ar(e){if(0===e.length)throw new Error(sr);return e.shift()}function cr(e,...t){const[n]=t;if(2===t.length?n+(t[1]??0)>e.length:n>=e.length)throw new Error(sr);return e.splice(...t)}class ur{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map((e=>new $n(e))),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach((e=>this.indexToProgramIds.set(e.programIdIndex,this.accountKeys[e.programIdIndex])))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map((e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:it().decode(e.data)})))}get addressTableLookups(){return[]}getAccountKeys(){return new Yn(this.staticAccountKeys)}static compile(e){const t=ir.compile(e.instructions,e.payerKey),[n,r]=t.getMessageComponents(),o=new Yn(r).compileInstructions(e.instructions).map((e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:it().encode(e.data)})));return new ur({header:n,accountKeys:r,recentBlockhash:e.recentBlockhash,instructions:o})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){return e-t<this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts}return e<t-this.header.numReadonlySignedAccounts}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter(((e,t)=>!this.isProgramId(t)))}serialize(){const e=this.accountKeys.length;let t=[];rr(t,e);const n=this.instructions.map((e=>{const{accounts:t,programIdIndex:n}=e,r=Array.from(it().decode(e.data));let i=[];rr(i,t.length);let s=[];return rr(s,r.length),{programIdIndex:n,keyIndicesCount:o.Buffer.from(i),keyIndices:t,dataLength:o.Buffer.from(s),data:r}}));let r=[];rr(r,n.length);let i=o.Buffer.alloc(Hn);o.Buffer.from(r).copy(i);let s=r.length;n.forEach((e=>{const t=It.n_([It.u8("programIdIndex"),It.Ik(e.keyIndicesCount.length,"keyIndicesCount"),It.A9(It.u8("keyIndex"),e.keyIndices.length,"keyIndices"),It.Ik(e.dataLength.length,"dataLength"),It.A9(It.u8("userdatum"),e.data.length,"data")]).encode(e,i,s);s+=t})),i=i.slice(0,s);const a=It.n_([It.Ik(1,"numRequiredSignatures"),It.Ik(1,"numReadonlySignedAccounts"),It.Ik(1,"numReadonlyUnsignedAccounts"),It.Ik(t.length,"keyCount"),It.A9(Jn("key"),e,"keys"),Jn("recentBlockhash")]),c={numRequiredSignatures:o.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:o.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:o.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:o.Buffer.from(t),keys:this.accountKeys.map((e=>Rn(e.toBytes()))),recentBlockhash:it().decode(this.recentBlockhash)};let u=o.Buffer.alloc(2048);const l=a.encode(c,u);return i.copy(u,l),u.slice(0,l+i.length)}static from(e){let t=[...e];const n=ar(t);if(n!==(n&Wn))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const r=ar(t),i=ar(t),s=nr(t);let a=[];for(let f=0;f<s;f++){const e=cr(t,0,Fn);a.push(new $n(o.Buffer.from(e)))}const c=cr(t,0,Fn),u=nr(t);let l=[];for(let f=0;f<u;f++){const e=ar(t),n=cr(t,0,nr(t)),r=cr(t,0,nr(t)),i=it().encode(o.Buffer.from(r));l.push({programIdIndex:e,accounts:n,data:i})}const d={header:{numRequiredSignatures:n,numReadonlySignedAccounts:r,numReadonlyUnsignedAccounts:i},recentBlockhash:it().encode(o.Buffer.from(c)),accountKeys:a,instructions:l};return new ur(d)}}class lr{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(const t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Yn(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures,n=this.staticAccountKeys.length;if(e>=n){return e-n<this.addressTableLookups.reduce(((e,t)=>e+t.writableIndexes.length),0)}if(e>=this.header.numRequiredSignatures){return e-t<n-t-this.header.numReadonlyUnsignedAccounts}return e<t-this.header.numReadonlySignedAccounts}resolveAddressTableLookups(e){const t={writable:[],readonly:[]};for(const n of this.addressTableLookups){const r=e.find((e=>e.key.equals(n.accountKey)));if(!r)throw new Error(`Failed to find address lookup table account for table key ${n.accountKey.toBase58()}`);for(const e of n.writableIndexes){if(!(e<r.state.addresses.length))throw new Error(`Failed to find address for index ${e} in address lookup table ${n.accountKey.toBase58()}`);t.writable.push(r.state.addresses[e])}for(const e of n.readonlyIndexes){if(!(e<r.state.addresses.length))throw new Error(`Failed to find address for index ${e} in address lookup table ${n.accountKey.toBase58()}`);t.readonly.push(r.state.addresses[e])}}return t}static compile(e){const t=ir.compile(e.instructions,e.payerKey),n=new Array,r={writable:new Array,readonly:new Array},o=e.addressLookupTableAccounts||[];for(const c of o){const e=t.extractTableLookup(c);if(void 0!==e){const[t,{writable:o,readonly:i}]=e;n.push(t),r.writable.push(...o),r.readonly.push(...i)}}const[i,s]=t.getMessageComponents(),a=new Yn(s,r).compileInstructions(e.instructions);return new lr({header:i,staticAccountKeys:s,recentBlockhash:e.recentBlockhash,compiledInstructions:a,addressTableLookups:n})}serialize(){const e=Array();rr(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),n=Array();rr(n,this.compiledInstructions.length);const r=this.serializeAddressTableLookups(),o=Array();rr(o,this.addressTableLookups.length);const i=It.n_([It.u8("prefix"),It.n_([It.u8("numRequiredSignatures"),It.u8("numReadonlySignedAccounts"),It.u8("numReadonlyUnsignedAccounts")],"header"),It.Ik(e.length,"staticAccountKeysLength"),It.A9(Jn(),this.staticAccountKeys.length,"staticAccountKeys"),Jn("recentBlockhash"),It.Ik(n.length,"instructionsLength"),It.Ik(t.length,"serializedInstructions"),It.Ik(o.length,"addressTableLookupsLength"),It.Ik(r.length,"serializedAddressTableLookups")]),s=new Uint8Array(Hn),a=i.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map((e=>e.toBytes())),recentBlockhash:it().decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(o),serializedAddressTableLookups:r},s);return s.slice(0,a)}serializeInstructions(){let e=0;const t=new Uint8Array(Hn);for(const n of this.compiledInstructions){const r=Array();rr(r,n.accountKeyIndexes.length);const o=Array();rr(o,n.data.length);e+=It.n_([It.u8("programIdIndex"),It.Ik(r.length,"encodedAccountKeyIndexesLength"),It.A9(It.u8(),n.accountKeyIndexes.length,"accountKeyIndexes"),It.Ik(o.length,"encodedDataLength"),It.Ik(n.data.length,"data")]).encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(r),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(o),data:n.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array(Hn);for(const n of this.addressTableLookups){const r=Array();rr(r,n.writableIndexes.length);const o=Array();rr(o,n.readonlyIndexes.length);e+=It.n_([Jn("accountKey"),It.Ik(r.length,"encodedWritableIndexesLength"),It.A9(It.u8(),n.writableIndexes.length,"writableIndexes"),It.Ik(o.length,"encodedReadonlyIndexesLength"),It.A9(It.u8(),n.readonlyIndexes.length,"readonlyIndexes")]).encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(r),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(o),readonlyIndexes:n.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const n=ar(t),r=n&Wn;or(n!==r,"Expected versioned message but received legacy message");or(0===r,`Expected versioned message with version 0 but found version ${r}`);const o={numRequiredSignatures:ar(t),numReadonlySignedAccounts:ar(t),numReadonlyUnsignedAccounts:ar(t)},i=[],s=nr(t);for(let f=0;f<s;f++)i.push(new $n(cr(t,0,Fn)));const a=it().encode(cr(t,0,Fn)),c=nr(t),u=[];for(let f=0;f<c;f++){const e=ar(t),n=cr(t,0,nr(t)),r=nr(t),o=new Uint8Array(cr(t,0,r));u.push({programIdIndex:e,accountKeyIndexes:n,data:o})}const l=nr(t),d=[];for(let f=0;f<l;f++){const e=new $n(cr(t,0,Fn)),n=cr(t,0,nr(t)),r=cr(t,0,nr(t));d.push({accountKey:e,writableIndexes:n,readonlyIndexes:r})}return new lr({header:o,staticAccountKeys:i,recentBlockhash:a,compiledInstructions:u,addressTableLookups:d})}}const dr={deserializeMessageVersion(e){const t=e[0],n=t&Wn;return n===t?"legacy":n},deserialize:e=>{const t=dr.deserializeMessageVersion(e);if("legacy"===t)return ur.from(e);if(0===t)return lr.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};let fr=function(e){return e[e.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",e[e.PROCESSED=1]="PROCESSED",e[e.TIMED_OUT=2]="TIMED_OUT",e[e.NONCE_INVALID=3]="NONCE_INVALID",e}({});const hr=o.Buffer.alloc(Gn).fill(0);class pr{constructor(e){this.keys=void 0,this.programId=void 0,this.data=o.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map((({pubkey:e,isSigner:t,isWritable:n})=>({pubkey:e.toJSON(),isSigner:t,isWritable:n}))),programId:this.programId.toJSON(),data:[...this.data]}}}class mr{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,e)if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){const{minContextSlot:t,nonceInfo:n}=e;this.minNonceContextSlot=t,this.nonceInfo=n}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:t,lastValidBlockHeight:n}=e;this.recentBlockhash=t,this.lastValidBlockHeight=n}else{const{recentBlockhash:t,nonceInfo:n}=e;n&&(this.nonceInfo=n),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((e=>e.toJSON())),signers:this.signatures.map((({publicKey:e})=>e.toJSON()))}}add(...e){if(0===e.length)throw new Error("No instructions");return e.forEach((e=>{"instructions"in e?this.instructions=this.instructions.concat(e.instructions):"data"in e&&"programId"in e&&"keys"in e?this.instructions.push(e):this.instructions.push(new pr(e))})),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,t,n;if(this.nonceInfo?(e=this.nonceInfo.nonce,t=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw new Error("Transaction recentBlockhash required");if(t.length<1&&console.warn("No instructions provided"),this.feePayer)n=this.feePayer;else{if(!(this.signatures.length>0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");n=this.signatures[0].publicKey}for(let p=0;p<t.length;p++)if(void 0===t[p].programId)throw new Error(`Transaction instruction index ${p} has undefined program id`);const r=[],o=[];t.forEach((e=>{e.keys.forEach((e=>{o.push({...e})}));const t=e.programId.toString();r.includes(t)||r.push(t)})),r.forEach((e=>{o.push({pubkey:new $n(e),isSigner:!1,isWritable:!1})}));const i=[];o.forEach((e=>{const t=e.pubkey.toString(),n=i.findIndex((e=>e.pubkey.toString()===t));n>-1?(i[n].isWritable=i[n].isWritable||e.isWritable,i[n].isSigner=i[n].isSigner||e.isSigner):i.push(e)})),i.sort((function(e,t){if(e.isSigner!==t.isSigner)return e.isSigner?-1:1;if(e.isWritable!==t.isWritable)return e.isWritable?-1:1;return e.pubkey.toBase58().localeCompare(t.pubkey.toBase58(),"en",{localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"})}));const s=i.findIndex((e=>e.pubkey.equals(n)));if(s>-1){const[e]=i.splice(s,1);e.isSigner=!0,e.isWritable=!0,i.unshift(e)}else i.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(const p of this.signatures){const e=i.findIndex((e=>e.pubkey.equals(p.publicKey)));if(!(e>-1))throw new Error(`unknown signer: ${p.publicKey.toString()}`);i[e].isSigner||(i[e].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))}let a=0,c=0,u=0;const l=[],d=[];i.forEach((({pubkey:e,isSigner:t,isWritable:n})=>{t?(l.push(e.toString()),a+=1,n||(c+=1)):(d.push(e.toString()),n||(u+=1))}));const f=l.concat(d),h=t.map((e=>{const{data:t,programId:n}=e;return{programIdIndex:f.indexOf(n.toString()),accounts:e.keys.map((e=>f.indexOf(e.pubkey.toString()))),data:it().encode(t)}}));return h.forEach((e=>{or(e.programIdIndex>=0),e.accounts.forEach((e=>or(e>=0)))})),new ur({header:{numRequiredSignatures:a,numReadonlySignedAccounts:c,numReadonlyUnsignedAccounts:u},accountKeys:f,recentBlockhash:e,instructions:h})}_compile(){const e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length){if(this.signatures.every(((e,n)=>t[n].equals(e.publicKey))))return e}return this.signatures=t.map((e=>({signature:null,publicKey:e}))),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(...e){if(0===e.length)throw new Error("No signers");const t=new Set;this.signatures=e.filter((e=>{const n=e.toString();return!t.has(n)&&(t.add(n),!0)})).map((e=>({signature:null,publicKey:e})))}sign(...e){if(0===e.length)throw new Error("No signers");const t=new Set,n=[];for(const o of e){const e=o.publicKey.toString();t.has(e)||(t.add(e),n.push(o))}this.signatures=n.map((e=>({signature:null,publicKey:e.publicKey})));const r=this._compile();this._partialSign(r,...n)}partialSign(...e){if(0===e.length)throw new Error("No signers");const t=new Set,n=[];for(const o of e){const e=o.publicKey.toString();t.has(e)||(t.add(e),n.push(o))}const r=this._compile();this._partialSign(r,...n)}_partialSign(e,...t){const n=e.serialize();t.forEach((e=>{const t=jn(n,e.secretKey);this._addSignature(e.publicKey,Rn(t))}))}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){or(64===t.length);const n=this.signatures.findIndex((t=>e.equals(t.publicKey)));if(n<0)throw new Error(`unknown signer: ${e.toString()}`);this.signatures[n].signature=o.Buffer.from(t)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){const n={};for(const{signature:r,publicKey:o}of this.signatures)null===r?t&&(n.missing||=[]).push(o):Mn(r,e,o.toBytes())||(n.invalid||=[]).push(o);return n.invalid||n.missing?n:void 0}serialize(e){const{requireAllSignatures:t,verifySignatures:n}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),r=this.serializeMessage();if(n){const e=this._getMessageSignednessErrors(r,t);if(e){let t="Signature verification failed.";throw e.invalid&&(t+=`\nInvalid signature for public key${1===e.invalid.length?"":"(s)"} [\`${e.invalid.map((e=>e.toBase58())).join("`, `")}\`].`),e.missing&&(t+=`\nMissing signature for public key${1===e.missing.length?"":"(s)"} [\`${e.missing.map((e=>e.toBase58())).join("`, `")}\`].`),new Error(t)}}return this._serialize(r)}_serialize(e){const{signatures:t}=this,n=[];rr(n,t.length);const r=n.length+64*t.length+e.length,i=o.Buffer.alloc(r);return or(t.length<256),o.Buffer.from(n).copy(i,0),t.forEach((({signature:e},t)=>{null!==e&&(or(64===e.length,"signature has invalid length"),o.Buffer.from(e).copy(i,n.length+64*t))})),e.copy(i,n.length+64*t.length),or(i.length<=Hn,`Transaction too large: ${i.length} > ${Hn}`),i}get keys(){return or(1===this.instructions.length),this.instructions[0].keys.map((e=>e.pubkey))}get programId(){return or(1===this.instructions.length),this.instructions[0].programId}get data(){return or(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e];const n=nr(t);let r=[];for(let i=0;i<n;i++){const e=cr(t,0,Gn);r.push(it().encode(o.Buffer.from(e)))}return mr.populate(ur.from(t),r)}static populate(e,t=[]){const n=new mr;return n.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(n.feePayer=e.accountKeys[0]),t.forEach(((t,r)=>{const o={signature:t==it().encode(hr)?null:it().decode(t),publicKey:e.accountKeys[r]};n.signatures.push(o)})),e.instructions.forEach((t=>{const r=t.accounts.map((t=>{const r=e.accountKeys[t];return{pubkey:r,isSigner:n.signatures.some((e=>e.publicKey.toString()===r.toString()))||e.isAccountSigner(t),isWritable:e.isAccountWritable(t)}}));n.instructions.push(new pr({keys:r,programId:e.accountKeys[t.programIdIndex],data:it().decode(t.data)}))})),n._message=e,n._json=n.toJSON(),n}}class gr{constructor(e){this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=e.payerKey,this.instructions=e.instructions,this.recentBlockhash=e.recentBlockhash}static decompile(e,t){const{header:n,compiledInstructions:r,recentBlockhash:o}=e,{numRequiredSignatures:i,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:a}=n,c=i-s;or(c>0,"Message header is invalid");const u=e.staticAccountKeys.length-i-a;or(u>=0,"Message header is invalid");const l=e.getAccountKeys(t),d=l.get(0);if(void 0===d)throw new Error("Failed to decompile message because no account keys were found");const f=[];for(const h of r){const e=[];for(const r of h.accountKeyIndexes){const t=l.get(r);if(void 0===t)throw new Error(`Failed to find key for account key index ${r}`);let o;o=r<i?r<c:r<l.staticAccountKeys.length?r-i<u:r-l.staticAccountKeys.length<l.accountKeysFromLookups.writable.length,e.push({pubkey:t,isSigner:r<n.numRequiredSignatures,isWritable:o})}const t=l.get(h.programIdIndex);if(void 0===t)throw new Error(`Failed to find program id for program id index ${h.programIdIndex}`);f.push(new pr({programId:t,data:Rn(h.data),keys:e}))}return new gr({payerKey:d,instructions:f,recentBlockhash:o})}compileToLegacyMessage(){return ur.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return lr.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class yr{get version(){return this.message.version}constructor(e,t){if(this.signatures=void 0,this.message=void 0,void 0!==t)or(t.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=t;else{const t=[];for(let n=0;n<e.header.numRequiredSignatures;n++)t.push(new Uint8Array(Gn));this.signatures=t}this.message=e}serialize(){const e=this.message.serialize(),t=Array();rr(t,this.signatures.length);const n=It.n_([It.Ik(t.length,"encodedSignaturesLength"),It.A9(Qn(),this.signatures.length,"signatures"),It.Ik(e.length,"serializedMessage")]),r=new Uint8Array(2048),o=n.encode({encodedSignaturesLength:new Uint8Array(t),signatures:this.signatures,serializedMessage:e},r);return r.slice(0,o)}static deserialize(e){let t=[...e];const n=[],r=nr(t);for(let i=0;i<r;i++)n.push(new Uint8Array(cr(t,0,Gn)));const o=dr.deserialize(new Uint8Array(t));return new yr(o,n)}sign(e){const t=this.message.serialize(),n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const r of e){const e=n.findIndex((e=>e.equals(r.publicKey)));or(e>=0,`Cannot sign with non signer key ${r.publicKey.toBase58()}`),this.signatures[e]=jn(t,r.secretKey)}}addSignature(e,t){or(64===t.byteLength,"Signature must be 64 bytes long");const n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex((t=>t.equals(e)));or(n>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=t}}const br=new $n("SysvarC1ock11111111111111111111111111111111"),vr=new $n("SysvarEpochSchedu1e111111111111111111111111"),wr=new $n("Sysvar1nstructions1111111111111111111111111"),xr=new $n("SysvarRecentB1ockHashes11111111111111111111"),Er=new $n("SysvarRent111111111111111111111111111111111"),_r=new $n("SysvarRewards111111111111111111111111111111"),kr=new $n("SysvarS1otHashes111111111111111111111111111"),Sr=new $n("SysvarS1otHistory11111111111111111111111111"),Ir=new $n("SysvarStakeHistory1111111111111111111111111");class Cr extends Error{constructor({action:e,signature:t,transactionMessage:n,logs:r}){let o;switch(e){case"send":o=`Transaction ${t} resulted in an error. \n${n}. `+(r?`Logs: \n${JSON.stringify(r.slice(-10),null,2)}. `:"")+"\nCatch the SendTransactionError and call `getLogs()` on it for full details.";break;case"simulate":o=`Simulation failed. \nMessage: ${n}. \n`+(r?`Logs: \n${JSON.stringify(r.slice(-10),null,2)}. `:"")+"\nCatch the SendTransactionError and call `getLogs()` on it for full details.";break;default:o="Unknown action"}super(o),this.signature=void 0,this.transactionMessage=void 0,this.logs=void 0,this.signature=t,this.transactionMessage=n,this.logs=r||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.logs)?this.logs:void 0}}async getLogs(e){return Array.isArray(this.logs)||(this.logs=new Promise(((t,n)=>{e.getTransaction(this.signature).then((e=>{if(e&&e.meta&&e.meta.logMessages){const n=e.meta.logMessages;this.logs=n,t(n)}else n(new Error("Log messages not found"))})).catch(n)}))),await this.logs}}const Tr={JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP:-32001,JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE:-32002,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE:-32003,JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE:-32004,JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY:-32005,JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:-32006,JSON_RPC_SERVER_ERROR_SLOT_SKIPPED:-32007,JSON_RPC_SERVER_ERROR_NO_SNAPSHOT:-32008,JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:-32009,JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:-32010,JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE:-32011,JSON_RPC_SCAN_ERROR:-32012,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH:-32013,JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:-32014,JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:-32015,JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED:-32016};class Ar extends Error{constructor({code:e,message:t,data:n},r){super(null!=r?`${r}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=n,this.name="SolanaJSONRPCError"}}async function Pr(e,t,n,r){const o=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},i=await e.sendTransaction(t,n,o);let s;if(null!=t.recentBlockhash&&null!=t.lastValidBlockHeight)s=(await e.confirmTransaction({abortSignal:r?.abortSignal,signature:i,blockhash:t.recentBlockhash,lastValidBlockHeight:t.lastValidBlockHeight},r&&r.commitment)).value;else if(null!=t.minNonceContextSlot&&null!=t.nonceInfo){const{nonceInstruction:n}=t.nonceInfo,o=n.keys[0].pubkey;s=(await e.confirmTransaction({abortSignal:r?.abortSignal,minContextSlot:t.minNonceContextSlot,nonceAccountPubkey:o,nonceValue:t.nonceInfo.nonce,signature:i},r&&r.commitment)).value}else null!=r?.abortSignal&&console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable."),s=(await e.confirmTransaction(i,r&&r.commitment)).value;if(s.err){if(null!=i)throw new Cr({action:"send",signature:i,transactionMessage:`Status: (${JSON.stringify(s)})`});throw new Error(`Transaction ${i} failed (${JSON.stringify(s)})`)}return i}function Or(e){return new Promise((t=>setTimeout(t,e)))}function jr(e,t){const n=e.layout.span>=0?e.layout.span:tr(e,t),r=o.Buffer.alloc(n),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,r),r}function Mr(e,t){let n;try{n=e.layout.decode(t)}catch(r){throw new Error("invalid instruction; "+r)}if(n.instruction!==e.index)throw new Error(`invalid instruction; instruction index mismatch ${n.instruction} != ${e.index}`);return n}const Rr=It._O("lamportsPerSignature"),Br=It.n_([It.Jq("version"),It.Jq("state"),Jn("authorizedPubkey"),Jn("nonce"),It.n_([Rr],"feeCalculator")]),Nr=Br.span;class Lr{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){const t=Br.decode(Rn(e),0);return new Lr({authorizedPubkey:new $n(t.authorizedPubkey),nonce:new $n(t.nonce).toString(),feeCalculator:t.feeCalculator})}}const Ur=(Dr=8,e=>{const t=(0,It.Ik)(Dr,e),{encode:n,decode:r}=(e=>({decode:e.decode.bind(e),encode:e.encode.bind(e)}))(t),i=t;return i.decode=(e,t)=>{const n=r(e,t);return(0,Ct.oU)(o.Buffer.from(n))},i.encode=(e,t,r)=>{const o=(0,Ct.k$)(e,Dr);return n(o,t,r)},i});var Dr;class Fr{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=It.Jq("instruction").decode(e.data);let n;for(const[r,o]of Object.entries(zr))if(o.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a SystemInstruction");return n}static decodeCreateAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t,space:n,programId:r}=Mr(zr.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:t,space:n,programId:new $n(r)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t}=Mr(zr.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:t}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t,seed:n,programId:r}=Mr(zr.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:t,seed:n,programId:new $n(r)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:t}=Mr(zr.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:t}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:n,space:r,programId:o}=Mr(zr.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new $n(t),seed:n,space:r,programId:new $n(o)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:t}=Mr(zr.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new $n(t)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:n,programId:r}=Mr(zr.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new $n(t),seed:n,programId:new $n(r)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:t,seed:n,lamports:r,space:o,programId:i}=Mr(zr.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new $n(t),seed:n,lamports:r,space:o,programId:new $n(i)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:t}=Mr(zr.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new $n(t)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Mr(zr.AdvanceNonceAccount,e.data),{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static decodeNonceWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Mr(zr.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t}=Mr(zr.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new $n(t)}}static checkProgramId(e){if(!e.equals($r.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const zr=Object.freeze({Create:{index:0,layout:It.n_([It.Jq("instruction"),It.gM("lamports"),It.gM("space"),Jn("programId")])},Assign:{index:1,layout:It.n_([It.Jq("instruction"),Jn("programId")])},Transfer:{index:2,layout:It.n_([It.Jq("instruction"),Ur("lamports")])},CreateWithSeed:{index:3,layout:It.n_([It.Jq("instruction"),Jn("base"),er("seed"),It.gM("lamports"),It.gM("space"),Jn("programId")])},AdvanceNonceAccount:{index:4,layout:It.n_([It.Jq("instruction")])},WithdrawNonceAccount:{index:5,layout:It.n_([It.Jq("instruction"),It.gM("lamports")])},InitializeNonceAccount:{index:6,layout:It.n_([It.Jq("instruction"),Jn("authorized")])},AuthorizeNonceAccount:{index:7,layout:It.n_([It.Jq("instruction"),Jn("authorized")])},Allocate:{index:8,layout:It.n_([It.Jq("instruction"),It.gM("space")])},AllocateWithSeed:{index:9,layout:It.n_([It.Jq("instruction"),Jn("base"),er("seed"),It.gM("space"),Jn("programId")])},AssignWithSeed:{index:10,layout:It.n_([It.Jq("instruction"),Jn("base"),er("seed"),Jn("programId")])},TransferWithSeed:{index:11,layout:It.n_([It.Jq("instruction"),Ur("lamports"),er("seed"),Jn("programId")])},UpgradeNonceAccount:{index:12,layout:It.n_([It.Jq("instruction")])}});class $r{constructor(){}static createAccount(e){const t=jr(zr.Create,{lamports:e.lamports,space:e.space,programId:Rn(e.programId.toBuffer())});return new pr({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:t})}static transfer(e){let t,n;if("basePubkey"in e){t=jr(zr.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:Rn(e.programId.toBuffer())}),n=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{t=jr(zr.Transfer,{lamports:BigInt(e.lamports)}),n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new pr({keys:n,programId:this.programId,data:t})}static assign(e){let t,n;if("basePubkey"in e){t=jr(zr.AssignWithSeed,{base:Rn(e.basePubkey.toBuffer()),seed:e.seed,programId:Rn(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=jr(zr.Assign,{programId:Rn(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new pr({keys:n,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=jr(zr.CreateWithSeed,{base:Rn(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:Rn(e.programId.toBuffer())});let n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey!=e.fromPubkey&&n.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new pr({keys:n,programId:this.programId,data:t})}static createNonceAccount(e){const t=new mr;"basePubkey"in e&&"seed"in e?t.add($r.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:Nr,programId:this.programId})):t.add($r.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:Nr,programId:this.programId}));const n={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(n)),t}static nonceInitialize(e){const t=jr(zr.InitializeNonceAccount,{authorized:Rn(e.authorizedPubkey.toBuffer())}),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:xr,isSigner:!1,isWritable:!1},{pubkey:Er,isSigner:!1,isWritable:!1}],programId:this.programId,data:t};return new pr(n)}static nonceAdvance(e){const t=jr(zr.AdvanceNonceAccount),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:xr,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t};return new pr(n)}static nonceWithdraw(e){const t=jr(zr.WithdrawNonceAccount,{lamports:e.lamports});return new pr({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:xr,isSigner:!1,isWritable:!1},{pubkey:Er,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceAuthorize(e){const t=jr(zr.AuthorizeNonceAccount,{authorized:Rn(e.newAuthorizedPubkey.toBuffer())});return new pr({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static allocate(e){let t,n;if("basePubkey"in e){t=jr(zr.AllocateWithSeed,{base:Rn(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:Rn(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=jr(zr.Allocate,{space:e.space}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new pr({keys:n,programId:this.programId,data:t})}}$r.programId=new $n("11111111111111111111111111111111");const qr=Hn-300;class Zr{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Zr.chunkSize)+1+1)}static async load(e,t,n,r,i){{const o=await e.getMinimumBalanceForRentExemption(i.length),s=await e.getAccountInfo(n.publicKey,"confirmed");let a=null;if(null!==s){if(s.executable)return console.error("Program load failed, account is already executable"),!1;s.data.length!==i.length&&(a=a||new mr,a.add($r.allocate({accountPubkey:n.publicKey,space:i.length}))),s.owner.equals(r)||(a=a||new mr,a.add($r.assign({accountPubkey:n.publicKey,programId:r}))),s.lamports<o&&(a=a||new mr,a.add($r.transfer({fromPubkey:t.publicKey,toPubkey:n.publicKey,lamports:o-s.lamports})))}else a=(new mr).add($r.createAccount({fromPubkey:t.publicKey,newAccountPubkey:n.publicKey,lamports:o>0?o:1,space:i.length,programId:r}));null!==a&&await Pr(e,a,[t,n],{commitment:"confirmed"})}const s=It.n_([It.Jq("instruction"),It.Jq("offset"),It.Jq("bytesLength"),It.Jq("bytesLengthPadding"),It.A9(It.u8("byte"),It.cv(It.Jq(),-8),"bytes")]),a=Zr.chunkSize;let c=0,u=i,l=[];for(;u.length>0;){const i=u.slice(0,a),d=o.Buffer.alloc(a+16);s.encode({instruction:0,offset:c,bytes:i,bytesLength:0,bytesLengthPadding:0},d);const f=(new mr).add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0}],programId:r,data:d});if(l.push(Pr(e,f,[t,n],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")){const e=4;await Or(1e3/e)}c+=a,u=u.slice(a)}await Promise.all(l);{const i=It.n_([It.Jq("instruction")]),s=o.Buffer.alloc(i.span);i.encode({instruction:1},s);const a=(new mr).add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0},{pubkey:Er,isSigner:!1,isWritable:!1}],programId:r,data:s}),c="processed",u=await e.sendTransaction(a,[t,n],{preflightCommitment:c}),{context:l,value:d}=await e.confirmTransaction({signature:u,lastValidBlockHeight:a.lastValidBlockHeight,blockhash:a.recentBlockhash},c);if(d.err)throw new Error(`Transaction ${u} failed (${JSON.stringify(d)})`);for(;;){try{if(await e.getSlot({commitment:c})>l.slot)break}catch{}await new Promise((e=>setTimeout(e,Math.round(200))))}}return!0}}Zr.chunkSize=qr;const Hr=new $n("BPFLoader2111111111111111111111111111111111");class Wr{static getMinNumSignatures(e){return Zr.getMinNumSignatures(e)}static load(e,t,n,r,o){return Zr.load(e,t,n,o,r)}}function Gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kr=Object.prototype.toString,Vr=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function Xr(e,t){var n,r,o,i,s,a,c;if(!0===e)return"true";if(!1===e)return"false";switch(typeof e){case"object":if(null===e)return null;if(e.toJSON&&"function"===typeof e.toJSON)return Xr(e.toJSON(),t);if("[object Array]"===(c=Kr.call(e))){for(o="[",r=e.length-1,n=0;n<r;n++)o+=Xr(e[n],!0)+",";return r>-1&&(o+=Xr(e[n],!0)),o+"]"}if("[object Object]"===c){for(r=(i=Vr(e).sort()).length,o="",n=0;n<r;)void 0!==(a=Xr(e[s=i[n]],!1))&&(o&&(o+=","),o+=JSON.stringify(s)+":"+a),n++;return"{"+o+"}"}return JSON.stringify(e);case"function":case"undefined":return t?null:void 0;case"string":return JSON.stringify(e);default:return isFinite(e)?e:null}}var Yr=Gr((function(e){var t=Xr(e,!1);if(void 0!==t)return""+t}));function Jr(e){let t=0;for(;e>1;)e/=2,t++;return t}class Qr{constructor(e,t,n,r,o){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=n,this.firstNormalEpoch=r,this.firstNormalSlot=o}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=Jr(0===(t=e+32+1)?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,1+(t|=t>>32)))-Jr(32)-1;return[n,e-(this.getSlotsInEpoch(n)-32)]}{const t=e-this.firstNormalSlot,n=Math.floor(t/this.slotsPerEpoch);return[this.firstNormalEpoch+n,t%this.slotsPerEpoch]}var t}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?32*(Math.pow(2,e)-1):(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e<this.firstNormalEpoch?Math.pow(2,e+Jr(32)):this.slotsPerEpoch}}var eo=globalThis.fetch;class to extends Ot.Z{constructor(e,t,n){super((e=>{const n=(0,jt.Z)(e,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...t});return this.underlyingSocket="socket"in n?n.socket:n,n}),e,t,n),this.underlyingSocket=void 0}call(...e){const t=this.underlyingSocket?.readyState;return 1===t?super.call(...e):Promise.reject(new Error("Tried to call a JSON-RPC method `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(...e){const t=this.underlyingSocket?.readyState;return 1===t?super.notify(...e):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}class no{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){const e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){const t=function(e,t){let n;try{n=e.layout.decode(t)}catch(r){throw new Error("invalid instruction; "+r)}if(n.typeIndex!==e.index)throw new Error(`invalid account data; account type mismatch ${n.typeIndex} != ${e.index}`);return n}(ro,e),n=e.length-56;or(n>=0,"lookup table is invalid"),or(n%32===0,"lookup table is invalid");const r=n/32,{addresses:o}=It.n_([It.A9(Jn(),r,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new $n(t.authority[0]):void 0,addresses:o.map((e=>new $n(e)))}}}const ro={index:1,layout:It.n_([It.Jq("typeIndex"),Ur("deactivationSlot"),It._O("lastExtendedSlot"),It.u8("lastExtendedStartIndex"),It.u8(),It.A9(Jn(),It.cv(It.u8(),-1),"authority")])},oo=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;const io=(0,Tt.coerce)((0,Tt.instance)($n),(0,Tt.string)(),(e=>new $n(e))),so=(0,Tt.tuple)([(0,Tt.string)(),(0,Tt.literal)("base64")]),ao=(0,Tt.coerce)((0,Tt.instance)(o.Buffer),so,(e=>o.Buffer.from(e[0],"base64"))),co=3e4;function uo(e){let t,n;if("string"===typeof e)t=e;else if(e){const{commitment:r,...o}=e;t=r,n=o}return{commitment:t,config:n}}function lo(e){return(0,Tt.union)([(0,Tt.type)({jsonrpc:(0,Tt.literal)("2.0"),id:(0,Tt.string)(),result:e}),(0,Tt.type)({jsonrpc:(0,Tt.literal)("2.0"),id:(0,Tt.string)(),error:(0,Tt.type)({code:(0,Tt.unknown)(),message:(0,Tt.string)(),data:(0,Tt.optional)((0,Tt.any)())})})])}const fo=lo((0,Tt.unknown)());function ho(e){return(0,Tt.coerce)(lo(e),fo,(t=>"error"in t?t:{...t,result:(0,Tt.create)(t.result,e)}))}function po(e){return ho((0,Tt.type)({context:(0,Tt.type)({slot:(0,Tt.number)()}),value:e}))}function mo(e){return(0,Tt.type)({context:(0,Tt.type)({slot:(0,Tt.number)()}),value:e})}function go(e,t){return 0===e?new lr({header:t.header,staticAccountKeys:t.accountKeys.map((e=>new $n(e))),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map((e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:it().decode(e.data)}))),addressTableLookups:t.addressTableLookups}):new ur(t)}const yo=(0,Tt.type)({foundation:(0,Tt.number)(),foundationTerm:(0,Tt.number)(),initial:(0,Tt.number)(),taper:(0,Tt.number)(),terminal:(0,Tt.number)()}),bo=ho((0,Tt.array)((0,Tt.nullable)((0,Tt.type)({epoch:(0,Tt.number)(),effectiveSlot:(0,Tt.number)(),amount:(0,Tt.number)(),postBalance:(0,Tt.number)(),commission:(0,Tt.optional)((0,Tt.nullable)((0,Tt.number)()))})))),vo=(0,Tt.array)((0,Tt.type)({slot:(0,Tt.number)(),prioritizationFee:(0,Tt.number)()})),wo=(0,Tt.type)({total:(0,Tt.number)(),validator:(0,Tt.number)(),foundation:(0,Tt.number)(),epoch:(0,Tt.number)()}),xo=(0,Tt.type)({epoch:(0,Tt.number)(),slotIndex:(0,Tt.number)(),slotsInEpoch:(0,Tt.number)(),absoluteSlot:(0,Tt.number)(),blockHeight:(0,Tt.optional)((0,Tt.number)()),transactionCount:(0,Tt.optional)((0,Tt.number)())}),Eo=(0,Tt.type)({slotsPerEpoch:(0,Tt.number)(),leaderScheduleSlotOffset:(0,Tt.number)(),warmup:(0,Tt.boolean)(),firstNormalEpoch:(0,Tt.number)(),firstNormalSlot:(0,Tt.number)()}),_o=(0,Tt.record)((0,Tt.string)(),(0,Tt.array)((0,Tt.number)())),ko=(0,Tt.nullable)((0,Tt.union)([(0,Tt.type)({}),(0,Tt.string)()])),So=(0,Tt.type)({err:ko}),Io=(0,Tt.literal)("receivedSignature"),Co=(0,Tt.type)({"solana-core":(0,Tt.string)(),"feature-set":(0,Tt.optional)((0,Tt.number)())}),To=po((0,Tt.type)({err:(0,Tt.nullable)((0,Tt.union)([(0,Tt.type)({}),(0,Tt.string)()])),logs:(0,Tt.nullable)((0,Tt.array)((0,Tt.string)())),accounts:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)((0,Tt.nullable)((0,Tt.type)({executable:(0,Tt.boolean)(),owner:(0,Tt.string)(),lamports:(0,Tt.number)(),data:(0,Tt.array)((0,Tt.string)()),rentEpoch:(0,Tt.optional)((0,Tt.number)())}))))),unitsConsumed:(0,Tt.optional)((0,Tt.number)()),returnData:(0,Tt.optional)((0,Tt.nullable)((0,Tt.type)({programId:(0,Tt.string)(),data:(0,Tt.tuple)([(0,Tt.string)(),(0,Tt.literal)("base64")])})))})),Ao=po((0,Tt.type)({byIdentity:(0,Tt.record)((0,Tt.string)(),(0,Tt.array)((0,Tt.number)())),range:(0,Tt.type)({firstSlot:(0,Tt.number)(),lastSlot:(0,Tt.number)()})}));const Po=ho(yo),Oo=ho(wo),jo=ho(vo),Mo=ho(xo),Ro=ho(Eo),Bo=ho(_o),No=ho((0,Tt.number)()),Lo=po((0,Tt.type)({total:(0,Tt.number)(),circulating:(0,Tt.number)(),nonCirculating:(0,Tt.number)(),nonCirculatingAccounts:(0,Tt.array)(io)})),Uo=(0,Tt.type)({amount:(0,Tt.string)(),uiAmount:(0,Tt.nullable)((0,Tt.number)()),decimals:(0,Tt.number)(),uiAmountString:(0,Tt.optional)((0,Tt.string)())}),Do=po((0,Tt.array)((0,Tt.type)({address:io,amount:(0,Tt.string)(),uiAmount:(0,Tt.nullable)((0,Tt.number)()),decimals:(0,Tt.number)(),uiAmountString:(0,Tt.optional)((0,Tt.string)())}))),Fo=po((0,Tt.array)((0,Tt.type)({pubkey:io,account:(0,Tt.type)({executable:(0,Tt.boolean)(),owner:io,lamports:(0,Tt.number)(),data:ao,rentEpoch:(0,Tt.number)()})}))),zo=(0,Tt.type)({program:(0,Tt.string)(),parsed:(0,Tt.unknown)(),space:(0,Tt.number)()}),$o=po((0,Tt.array)((0,Tt.type)({pubkey:io,account:(0,Tt.type)({executable:(0,Tt.boolean)(),owner:io,lamports:(0,Tt.number)(),data:zo,rentEpoch:(0,Tt.number)()})}))),qo=po((0,Tt.array)((0,Tt.type)({lamports:(0,Tt.number)(),address:io}))),Zo=(0,Tt.type)({executable:(0,Tt.boolean)(),owner:io,lamports:(0,Tt.number)(),data:ao,rentEpoch:(0,Tt.number)()}),Ho=(0,Tt.type)({pubkey:io,account:Zo}),Wo=(0,Tt.coerce)((0,Tt.union)([(0,Tt.instance)(o.Buffer),zo]),(0,Tt.union)([so,zo]),(e=>Array.isArray(e)?(0,Tt.create)(e,ao):e)),Go=(0,Tt.type)({executable:(0,Tt.boolean)(),owner:io,lamports:(0,Tt.number)(),data:Wo,rentEpoch:(0,Tt.number)()}),Ko=(0,Tt.type)({pubkey:io,account:Go}),Vo=(0,Tt.type)({state:(0,Tt.union)([(0,Tt.literal)("active"),(0,Tt.literal)("inactive"),(0,Tt.literal)("activating"),(0,Tt.literal)("deactivating")]),active:(0,Tt.number)(),inactive:(0,Tt.number)()}),Xo=ho((0,Tt.array)((0,Tt.type)({signature:(0,Tt.string)(),slot:(0,Tt.number)(),err:ko,memo:(0,Tt.nullable)((0,Tt.string)()),blockTime:(0,Tt.optional)((0,Tt.nullable)((0,Tt.number)()))}))),Yo=ho((0,Tt.array)((0,Tt.type)({signature:(0,Tt.string)(),slot:(0,Tt.number)(),err:ko,memo:(0,Tt.nullable)((0,Tt.string)()),blockTime:(0,Tt.optional)((0,Tt.nullable)((0,Tt.number)()))}))),Jo=(0,Tt.type)({subscription:(0,Tt.number)(),result:mo(Zo)}),Qo=(0,Tt.type)({pubkey:io,account:Zo}),ei=(0,Tt.type)({subscription:(0,Tt.number)(),result:mo(Qo)}),ti=(0,Tt.type)({parent:(0,Tt.number)(),slot:(0,Tt.number)(),root:(0,Tt.number)()}),ni=(0,Tt.type)({subscription:(0,Tt.number)(),result:ti}),ri=(0,Tt.union)([(0,Tt.type)({type:(0,Tt.union)([(0,Tt.literal)("firstShredReceived"),(0,Tt.literal)("completed"),(0,Tt.literal)("optimisticConfirmation"),(0,Tt.literal)("root")]),slot:(0,Tt.number)(),timestamp:(0,Tt.number)()}),(0,Tt.type)({type:(0,Tt.literal)("createdBank"),parent:(0,Tt.number)(),slot:(0,Tt.number)(),timestamp:(0,Tt.number)()}),(0,Tt.type)({type:(0,Tt.literal)("frozen"),slot:(0,Tt.number)(),timestamp:(0,Tt.number)(),stats:(0,Tt.type)({numTransactionEntries:(0,Tt.number)(),numSuccessfulTransactions:(0,Tt.number)(),numFailedTransactions:(0,Tt.number)(),maxTransactionsPerEntry:(0,Tt.number)()})}),(0,Tt.type)({type:(0,Tt.literal)("dead"),slot:(0,Tt.number)(),timestamp:(0,Tt.number)(),err:(0,Tt.string)()})]),oi=(0,Tt.type)({subscription:(0,Tt.number)(),result:ri}),ii=(0,Tt.type)({subscription:(0,Tt.number)(),result:mo((0,Tt.union)([So,Io]))}),si=(0,Tt.type)({subscription:(0,Tt.number)(),result:(0,Tt.number)()}),ai=(0,Tt.type)({pubkey:(0,Tt.string)(),gossip:(0,Tt.nullable)((0,Tt.string)()),tpu:(0,Tt.nullable)((0,Tt.string)()),rpc:(0,Tt.nullable)((0,Tt.string)()),version:(0,Tt.nullable)((0,Tt.string)())}),ci=(0,Tt.type)({votePubkey:(0,Tt.string)(),nodePubkey:(0,Tt.string)(),activatedStake:(0,Tt.number)(),epochVoteAccount:(0,Tt.boolean)(),epochCredits:(0,Tt.array)((0,Tt.tuple)([(0,Tt.number)(),(0,Tt.number)(),(0,Tt.number)()])),commission:(0,Tt.number)(),lastVote:(0,Tt.number)(),rootSlot:(0,Tt.nullable)((0,Tt.number)())}),ui=ho((0,Tt.type)({current:(0,Tt.array)(ci),delinquent:(0,Tt.array)(ci)})),li=(0,Tt.union)([(0,Tt.literal)("processed"),(0,Tt.literal)("confirmed"),(0,Tt.literal)("finalized")]),di=(0,Tt.type)({slot:(0,Tt.number)(),confirmations:(0,Tt.nullable)((0,Tt.number)()),err:ko,confirmationStatus:(0,Tt.optional)(li)}),fi=po((0,Tt.array)((0,Tt.nullable)(di))),hi=ho((0,Tt.number)()),pi=(0,Tt.type)({accountKey:io,writableIndexes:(0,Tt.array)((0,Tt.number)()),readonlyIndexes:(0,Tt.array)((0,Tt.number)())}),mi=(0,Tt.type)({signatures:(0,Tt.array)((0,Tt.string)()),message:(0,Tt.type)({accountKeys:(0,Tt.array)((0,Tt.string)()),header:(0,Tt.type)({numRequiredSignatures:(0,Tt.number)(),numReadonlySignedAccounts:(0,Tt.number)(),numReadonlyUnsignedAccounts:(0,Tt.number)()}),instructions:(0,Tt.array)((0,Tt.type)({accounts:(0,Tt.array)((0,Tt.number)()),data:(0,Tt.string)(),programIdIndex:(0,Tt.number)()})),recentBlockhash:(0,Tt.string)(),addressTableLookups:(0,Tt.optional)((0,Tt.array)(pi))})}),gi=(0,Tt.type)({pubkey:io,signer:(0,Tt.boolean)(),writable:(0,Tt.boolean)(),source:(0,Tt.optional)((0,Tt.union)([(0,Tt.literal)("transaction"),(0,Tt.literal)("lookupTable")]))}),yi=(0,Tt.type)({accountKeys:(0,Tt.array)(gi),signatures:(0,Tt.array)((0,Tt.string)())}),bi=(0,Tt.type)({parsed:(0,Tt.unknown)(),program:(0,Tt.string)(),programId:io}),vi=(0,Tt.type)({accounts:(0,Tt.array)(io),data:(0,Tt.string)(),programId:io}),wi=(0,Tt.union)([vi,bi]),xi=(0,Tt.union)([(0,Tt.type)({parsed:(0,Tt.unknown)(),program:(0,Tt.string)(),programId:(0,Tt.string)()}),(0,Tt.type)({accounts:(0,Tt.array)((0,Tt.string)()),data:(0,Tt.string)(),programId:(0,Tt.string)()})]),Ei=(0,Tt.coerce)(wi,xi,(e=>"accounts"in e?(0,Tt.create)(e,vi):(0,Tt.create)(e,bi))),_i=(0,Tt.type)({signatures:(0,Tt.array)((0,Tt.string)()),message:(0,Tt.type)({accountKeys:(0,Tt.array)(gi),instructions:(0,Tt.array)(Ei),recentBlockhash:(0,Tt.string)(),addressTableLookups:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)(pi)))})}),ki=(0,Tt.type)({accountIndex:(0,Tt.number)(),mint:(0,Tt.string)(),owner:(0,Tt.optional)((0,Tt.string)()),uiTokenAmount:Uo}),Si=(0,Tt.type)({writable:(0,Tt.array)(io),readonly:(0,Tt.array)(io)}),Ii=(0,Tt.type)({err:ko,fee:(0,Tt.number)(),innerInstructions:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)((0,Tt.type)({index:(0,Tt.number)(),instructions:(0,Tt.array)((0,Tt.type)({accounts:(0,Tt.array)((0,Tt.number)()),data:(0,Tt.string)(),programIdIndex:(0,Tt.number)()}))})))),preBalances:(0,Tt.array)((0,Tt.number)()),postBalances:(0,Tt.array)((0,Tt.number)()),logMessages:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)((0,Tt.string)()))),preTokenBalances:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)(ki))),postTokenBalances:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)(ki))),loadedAddresses:(0,Tt.optional)(Si),computeUnitsConsumed:(0,Tt.optional)((0,Tt.number)())}),Ci=(0,Tt.type)({err:ko,fee:(0,Tt.number)(),innerInstructions:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)((0,Tt.type)({index:(0,Tt.number)(),instructions:(0,Tt.array)(Ei)})))),preBalances:(0,Tt.array)((0,Tt.number)()),postBalances:(0,Tt.array)((0,Tt.number)()),logMessages:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)((0,Tt.string)()))),preTokenBalances:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)(ki))),postTokenBalances:(0,Tt.optional)((0,Tt.nullable)((0,Tt.array)(ki))),loadedAddresses:(0,Tt.optional)(Si),computeUnitsConsumed:(0,Tt.optional)((0,Tt.number)())}),Ti=(0,Tt.union)([(0,Tt.literal)(0),(0,Tt.literal)("legacy")]),Ai=(0,Tt.type)({pubkey:(0,Tt.string)(),lamports:(0,Tt.number)(),postBalance:(0,Tt.nullable)((0,Tt.number)()),rewardType:(0,Tt.nullable)((0,Tt.string)()),commission:(0,Tt.optional)((0,Tt.nullable)((0,Tt.number)()))}),Pi=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),transactions:(0,Tt.array)((0,Tt.type)({transaction:mi,meta:(0,Tt.nullable)(Ii),version:(0,Tt.optional)(Ti)})),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)()),blockHeight:(0,Tt.nullable)((0,Tt.number)())}))),Oi=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)()),blockHeight:(0,Tt.nullable)((0,Tt.number)())}))),ji=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),transactions:(0,Tt.array)((0,Tt.type)({transaction:yi,meta:(0,Tt.nullable)(Ii),version:(0,Tt.optional)(Ti)})),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)()),blockHeight:(0,Tt.nullable)((0,Tt.number)())}))),Mi=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),transactions:(0,Tt.array)((0,Tt.type)({transaction:_i,meta:(0,Tt.nullable)(Ci),version:(0,Tt.optional)(Ti)})),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)()),blockHeight:(0,Tt.nullable)((0,Tt.number)())}))),Ri=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),transactions:(0,Tt.array)((0,Tt.type)({transaction:yi,meta:(0,Tt.nullable)(Ci),version:(0,Tt.optional)(Ti)})),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)()),blockHeight:(0,Tt.nullable)((0,Tt.number)())}))),Bi=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)()),blockHeight:(0,Tt.nullable)((0,Tt.number)())}))),Ni=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),transactions:(0,Tt.array)((0,Tt.type)({transaction:mi,meta:(0,Tt.nullable)(Ii)})),rewards:(0,Tt.optional)((0,Tt.array)(Ai)),blockTime:(0,Tt.nullable)((0,Tt.number)())}))),Li=ho((0,Tt.nullable)((0,Tt.type)({blockhash:(0,Tt.string)(),previousBlockhash:(0,Tt.string)(),parentSlot:(0,Tt.number)(),signatures:(0,Tt.array)((0,Tt.string)()),blockTime:(0,Tt.nullable)((0,Tt.number)())}))),Ui=ho((0,Tt.nullable)((0,Tt.type)({slot:(0,Tt.number)(),meta:(0,Tt.nullable)(Ii),blockTime:(0,Tt.optional)((0,Tt.nullable)((0,Tt.number)())),transaction:mi,version:(0,Tt.optional)(Ti)}))),Di=ho((0,Tt.nullable)((0,Tt.type)({slot:(0,Tt.number)(),transaction:_i,meta:(0,Tt.nullable)(Ci),blockTime:(0,Tt.optional)((0,Tt.nullable)((0,Tt.number)())),version:(0,Tt.optional)(Ti)}))),Fi=po((0,Tt.type)({blockhash:(0,Tt.string)(),feeCalculator:(0,Tt.type)({lamportsPerSignature:(0,Tt.number)()})})),zi=po((0,Tt.type)({blockhash:(0,Tt.string)(),lastValidBlockHeight:(0,Tt.number)()})),$i=po((0,Tt.boolean)()),qi=(0,Tt.type)({slot:(0,Tt.number)(),numTransactions:(0,Tt.number)(),numSlots:(0,Tt.number)(),samplePeriodSecs:(0,Tt.number)()}),Zi=ho((0,Tt.array)(qi)),Hi=po((0,Tt.nullable)((0,Tt.type)({feeCalculator:(0,Tt.type)({lamportsPerSignature:(0,Tt.number)()})}))),Wi=ho((0,Tt.string)()),Gi=ho((0,Tt.string)()),Ki=(0,Tt.type)({err:ko,logs:(0,Tt.array)((0,Tt.string)()),signature:(0,Tt.string)()}),Vi=(0,Tt.type)({result:mo(Ki),subscription:(0,Tt.number)()}),Xi={"solana-client":"js/0.0.0-development"};class Yi{constructor(e,t){let n,r,o,i,s,a;this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{const e={};return async t=>{const{commitment:n,config:r}=uo(t),o=this._buildArgs([],n,void 0,r),i=Yr(o);return e[i]=e[i]??(async()=>{try{const t=await this._rpcRequest("getBlockHeight",o),n=(0,Tt.create)(t,ho((0,Tt.number)()));if("error"in n)throw new Ar(n.error,"failed to get block height information");return n.result}finally{delete e[i]}})(),await e[i]}})(),t&&"string"===typeof t?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,n=t.wsEndpoint,r=t.httpHeaders,o=t.fetch,i=t.fetchMiddleware,s=t.disableRetryOnRateLimit,a=t.httpAgent),this._rpcEndpoint=function(e){if(!1===/^https?:/.test(e))throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return e}(e),this._rpcWsEndpoint=n||function(e){const t=e.match(oo);if(null==t)throw TypeError(`Failed to validate endpoint URL \`${e}\``);const[n,r,o,i]=t,s=e.startsWith("https:")?"wss:":"ws:",a=null==o?null:parseInt(o.slice(1),10);return`${s}//${r}${null==a?"":`:${a+1}`}${i}`}(e),this._rpcClient=function(e,t,n,r,o,i){const s=n||eo;let a;return null!=i&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments."),r&&(a=async(e,t)=>{const n=await new Promise(((n,o)=>{try{r(e,t,((e,t)=>n([e,t])))}catch(i){o(i)}}));return await s(...n)}),new(Pt())((async(n,r)=>{const i={method:"POST",body:n,agent:void 0,headers:Object.assign({"Content-Type":"application/json"},t||{},Xi)};try{let t,n=5,c=500;for(;t=a?await a(e,i):await s(e,i),429===t.status&&!0!==o&&(n-=1,0!==n);)console.error(`Server responded with ${t.status} ${t.statusText}.  Retrying after ${c}ms delay...`),await Or(c),c*=2;const u=await t.text();t.ok?r(null,u):r(new Error(`${t.status} ${t.statusText}: ${u}`))}catch(c){c instanceof Error&&r(c)}}),{})}(e,r,o,i,s,a),this._rpcRequest=function(e){return(t,n)=>new Promise(((r,o)=>{e.request(t,n,((e,t)=>{e?o(e):r(t)}))}))}(this._rpcClient),this._rpcBatchRequest=function(e){return t=>new Promise(((n,r)=>{0===t.length&&n([]);const o=t.map((t=>e.request(t.methodName,t.args)));e.request(o,((e,t)=>{e?r(e):n(t)}))}))}(this._rpcClient),this._rpcWebSocket=new to(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgs([e.toBase58()],n,void 0,r),i=await this._rpcRequest("getBalance",o),s=(0,Tt.create)(i,po((0,Tt.number)()));if("error"in s)throw new Ar(s.error,`failed to get balance for ${e.toBase58()}`);return s.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then((e=>e.value)).catch((t=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+t)}))}async getBlockTime(e){const t=await this._rpcRequest("getBlockTime",[e]),n=(0,Tt.create)(t,ho((0,Tt.nullable)((0,Tt.number)())));if("error"in n)throw new Ar(n.error,`failed to get block time for slot ${e}`);return n.result}async getMinimumLedgerSlot(){const e=await this._rpcRequest("minimumLedgerSlot",[]),t=(0,Tt.create)(e,ho((0,Tt.number)()));if("error"in t)throw new Ar(t.error,"failed to get minimum ledger slot");return t.result}async getFirstAvailableBlock(){const e=await this._rpcRequest("getFirstAvailableBlock",[]),t=(0,Tt.create)(e,No);if("error"in t)throw new Ar(t.error,"failed to get first available block");return t.result}async getSupply(e){let t={};t="string"===typeof e?{commitment:e}:e?{...e,commitment:e&&e.commitment||this.commitment}:{commitment:this.commitment};const n=await this._rpcRequest("getSupply",[t]),r=(0,Tt.create)(n,Lo);if("error"in r)throw new Ar(r.error,"failed to get supply");return r.result}async getTokenSupply(e,t){const n=this._buildArgs([e.toBase58()],t),r=await this._rpcRequest("getTokenSupply",n),o=(0,Tt.create)(r,po(Uo));if("error"in o)throw new Ar(o.error,"failed to get token supply");return o.result}async getTokenAccountBalance(e,t){const n=this._buildArgs([e.toBase58()],t),r=await this._rpcRequest("getTokenAccountBalance",n),o=(0,Tt.create)(r,po(Uo));if("error"in o)throw new Ar(o.error,"failed to get token account balance");return o.result}async getTokenAccountsByOwner(e,t,n){const{commitment:r,config:o}=uo(n);let i=[e.toBase58()];"mint"in t?i.push({mint:t.mint.toBase58()}):i.push({programId:t.programId.toBase58()});const s=this._buildArgs(i,r,"base64",o),a=await this._rpcRequest("getTokenAccountsByOwner",s),c=(0,Tt.create)(a,Fo);if("error"in c)throw new Ar(c.error,`failed to get token accounts owned by account ${e.toBase58()}`);return c.result}async getParsedTokenAccountsByOwner(e,t,n){let r=[e.toBase58()];"mint"in t?r.push({mint:t.mint.toBase58()}):r.push({programId:t.programId.toBase58()});const o=this._buildArgs(r,n,"jsonParsed"),i=await this._rpcRequest("getTokenAccountsByOwner",o),s=(0,Tt.create)(i,$o);if("error"in s)throw new Ar(s.error,`failed to get token accounts owned by account ${e.toBase58()}`);return s.result}async getLargestAccounts(e){const t={...e,commitment:e&&e.commitment||this.commitment},n=t.filter||t.commitment?[t]:[],r=await this._rpcRequest("getLargestAccounts",n),o=(0,Tt.create)(r,qo);if("error"in o)throw new Ar(o.error,"failed to get largest accounts");return o.result}async getTokenLargestAccounts(e,t){const n=this._buildArgs([e.toBase58()],t),r=await this._rpcRequest("getTokenLargestAccounts",n),o=(0,Tt.create)(r,Do);if("error"in o)throw new Ar(o.error,"failed to get token largest accounts");return o.result}async getAccountInfoAndContext(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgs([e.toBase58()],n,"base64",r),i=await this._rpcRequest("getAccountInfo",o),s=(0,Tt.create)(i,po((0,Tt.nullable)(Zo)));if("error"in s)throw new Ar(s.error,`failed to get info about account ${e.toBase58()}`);return s.result}async getParsedAccountInfo(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgs([e.toBase58()],n,"jsonParsed",r),i=await this._rpcRequest("getAccountInfo",o),s=(0,Tt.create)(i,po((0,Tt.nullable)(Go)));if("error"in s)throw new Ar(s.error,`failed to get info about account ${e.toBase58()}`);return s.result}async getAccountInfo(e,t){try{return(await this.getAccountInfoAndContext(e,t)).value}catch(n){throw new Error("failed to get info about account "+e.toBase58()+": "+n)}}async getMultipleParsedAccounts(e,t){const{commitment:n,config:r}=uo(t),o=e.map((e=>e.toBase58())),i=this._buildArgs([o],n,"jsonParsed",r),s=await this._rpcRequest("getMultipleAccounts",i),a=(0,Tt.create)(s,po((0,Tt.array)((0,Tt.nullable)(Go))));if("error"in a)throw new Ar(a.error,`failed to get info for accounts ${o}`);return a.result}async getMultipleAccountsInfoAndContext(e,t){const{commitment:n,config:r}=uo(t),o=e.map((e=>e.toBase58())),i=this._buildArgs([o],n,"base64",r),s=await this._rpcRequest("getMultipleAccounts",i),a=(0,Tt.create)(s,po((0,Tt.array)((0,Tt.nullable)(Zo))));if("error"in a)throw new Ar(a.error,`failed to get info for accounts ${o}`);return a.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,n){const{commitment:r,config:o}=uo(t),i=this._buildArgs([e.toBase58()],r,void 0,{...o,epoch:null!=n?n:o?.epoch}),s=await this._rpcRequest("getStakeActivation",i),a=(0,Tt.create)(s,ho(Vo));if("error"in a)throw new Ar(a.error,`failed to get Stake Activation ${e.toBase58()}`);return a.result}async getProgramAccounts(e,t){const{commitment:n,config:r}=uo(t),{encoding:o,...i}=r||{},s=this._buildArgs([e.toBase58()],n,o||"base64",i),a=await this._rpcRequest("getProgramAccounts",s),c=(0,Tt.array)(Ho),u=!0===i.withContext?(0,Tt.create)(a,po(c)):(0,Tt.create)(a,ho(c));if("error"in u)throw new Ar(u.error,`failed to get accounts owned by program ${e.toBase58()}`);return u.result}async getParsedProgramAccounts(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgs([e.toBase58()],n,"jsonParsed",r),i=await this._rpcRequest("getProgramAccounts",o),s=(0,Tt.create)(i,ho((0,Tt.array)(Ko)));if("error"in s)throw new Ar(s.error,`failed to get accounts owned by program ${e.toBase58()}`);return s.result}async confirmTransaction(e,t){let n,r;if("string"==typeof e)n=e;else{const t=e;if(t.abortSignal?.aborted)return Promise.reject(t.abortSignal.reason);n=t.signature}try{r=it().decode(n)}catch(o){throw new Error("signature must be base58 encoded: "+n)}return or(64===r.length,"signature has invalid length"),"string"===typeof e?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:t||this.commitment,signature:n}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:t||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise(((t,n)=>{null!=e&&(e.aborted?n(e.reason):e.addEventListener("abort",(()=>{n(e.reason)})))}))}getTransactionConfirmationPromise({commitment:e,signature:t}){let n,r,o=!1;return{abortConfirmation:()=>{r&&(r(),r=void 0),null!=n&&(this.removeSignatureListener(n),n=void 0)},confirmationPromise:new Promise(((i,s)=>{try{n=this.onSignature(t,((e,t)=>{n=void 0;const r={context:t,value:e};i({__type:fr.PROCESSED,response:r})}),e);const a=new Promise((e=>{null==n?e():r=this._onSubscriptionStateChange(n,(t=>{"subscribed"===t&&e()}))}));(async()=>{if(await a,o)return;const n=await this.getSignatureStatus(t);if(o)return;if(null==n)return;const{context:r,value:c}=n;if(null!=c)if(c?.err)s(c.err);else{switch(e){case"confirmed":case"single":case"singleGossip":if("processed"===c.confirmationStatus)return;break;case"finalized":case"max":case"root":if("processed"===c.confirmationStatus||"confirmed"===c.confirmationStatus)return}o=!0,i({__type:fr.PROCESSED,response:{context:r,value:c}})}})()}catch(a){s(a)}}))}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:t,lastValidBlockHeight:n,signature:r}}){let o=!1;const i=new Promise((t=>{const r=async()=>{try{return await this.getBlockHeight(e)}catch(t){return-1}};(async()=>{let e=await r();if(!o){for(;e<=n;){if(await Or(1e3),o)return;if(e=await r(),o)return}t({__type:fr.BLOCKHEIGHT_EXCEEDED})}})()})),{abortConfirmation:s,confirmationPromise:a}=this.getTransactionConfirmationPromise({commitment:e,signature:r}),c=this.getCancellationPromise(t);let u;try{const e=await Promise.race([c,a,i]);if(e.__type!==fr.PROCESSED)throw new Kn(r);u=e.response}finally{o=!0,s()}return u}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:t,minContextSlot:n,nonceAccountPubkey:r,nonceValue:o,signature:i}}){let s=!1;const a=new Promise((t=>{let i=o,a=null;const c=async()=>{try{const{context:t,value:o}=await this.getNonceAndContext(r,{commitment:e,minContextSlot:n});return a=t.slot,o?.nonce}catch(t){return i}};(async()=>{if(i=await c(),!s)for(;;){if(o!==i)return void t({__type:fr.NONCE_INVALID,slotInWhichNonceDidAdvance:a});if(await Or(2e3),s)return;if(i=await c(),s)return}})()})),{abortConfirmation:c,confirmationPromise:u}=this.getTransactionConfirmationPromise({commitment:e,signature:i}),l=this.getCancellationPromise(t);let d;try{const t=await Promise.race([l,u,a]);if(t.__type===fr.PROCESSED)d=t.response;else{let r;for(;;){const e=await this.getSignatureStatus(i);if(null==e)break;if(!(e.context.slot<(t.slotInWhichNonceDidAdvance??n))){r=e;break}await Or(400)}if(!r?.value)throw new Xn(i);{const t=e||"finalized",{confirmationStatus:n}=r.value;switch(t){case"processed":case"recent":if("processed"!==n&&"confirmed"!==n&&"finalized"!==n)throw new Xn(i);break;case"confirmed":case"single":case"singleGossip":if("confirmed"!==n&&"finalized"!==n)throw new Xn(i);break;case"finalized":case"max":case"root":if("finalized"!==n)throw new Xn(i)}d={context:r.context,value:{err:r.value.err}}}}}finally{s=!0,c()}return d}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:t}){let n;const r=new Promise((t=>{let r=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":r=this._confirmTransactionInitialTimeout||3e4}n=setTimeout((()=>t({__type:fr.TIMED_OUT,timeoutMs:r})),r)})),{abortConfirmation:o,confirmationPromise:i}=this.getTransactionConfirmationPromise({commitment:e,signature:t});let s;try{const e=await Promise.race([i,r]);if(e.__type!==fr.PROCESSED)throw new Vn(t,e.timeoutMs/1e3);s=e.response}finally{clearTimeout(n),o()}return s}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),t=(0,Tt.create)(e,ho((0,Tt.array)(ai)));if("error"in t)throw new Ar(t.error,"failed to get cluster nodes");return t.result}async getVoteAccounts(e){const t=this._buildArgs([],e),n=await this._rpcRequest("getVoteAccounts",t),r=(0,Tt.create)(n,ui);if("error"in r)throw new Ar(r.error,"failed to get vote accounts");return r.result}async getSlot(e){const{commitment:t,config:n}=uo(e),r=this._buildArgs([],t,void 0,n),o=await this._rpcRequest("getSlot",r),i=(0,Tt.create)(o,ho((0,Tt.number)()));if("error"in i)throw new Ar(i.error,"failed to get slot");return i.result}async getSlotLeader(e){const{commitment:t,config:n}=uo(e),r=this._buildArgs([],t,void 0,n),o=await this._rpcRequest("getSlotLeader",r),i=(0,Tt.create)(o,ho((0,Tt.string)()));if("error"in i)throw new Ar(i.error,"failed to get slot leader");return i.result}async getSlotLeaders(e,t){const n=[e,t],r=await this._rpcRequest("getSlotLeaders",n),o=(0,Tt.create)(r,ho((0,Tt.array)(io)));if("error"in o)throw new Ar(o.error,"failed to get slot leaders");return o.result}async getSignatureStatus(e,t){const{context:n,value:r}=await this.getSignatureStatuses([e],t);or(1===r.length);return{context:n,value:r[0]}}async getSignatureStatuses(e,t){const n=[e];t&&n.push(t);const r=await this._rpcRequest("getSignatureStatuses",n),o=(0,Tt.create)(r,fi);if("error"in o)throw new Ar(o.error,"failed to get signature status");return o.result}async getTransactionCount(e){const{commitment:t,config:n}=uo(e),r=this._buildArgs([],t,void 0,n),o=await this._rpcRequest("getTransactionCount",r),i=(0,Tt.create)(o,ho((0,Tt.number)()));if("error"in i)throw new Ar(i.error,"failed to get transaction count");return i.result}async getTotalSupply(e){return(await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(e){const t=this._buildArgs([],e),n=await this._rpcRequest("getInflationGovernor",t),r=(0,Tt.create)(n,Po);if("error"in r)throw new Ar(r.error,"failed to get inflation");return r.result}async getInflationReward(e,t,n){const{commitment:r,config:o}=uo(n),i=this._buildArgs([e.map((e=>e.toBase58()))],r,void 0,{...o,epoch:null!=t?t:o?.epoch}),s=await this._rpcRequest("getInflationReward",i),a=(0,Tt.create)(s,bo);if("error"in a)throw new Ar(a.error,"failed to get inflation reward");return a.result}async getInflationRate(){const e=await this._rpcRequest("getInflationRate",[]),t=(0,Tt.create)(e,Oo);if("error"in t)throw new Ar(t.error,"failed to get inflation rate");return t.result}async getEpochInfo(e){const{commitment:t,config:n}=uo(e),r=this._buildArgs([],t,void 0,n),o=await this._rpcRequest("getEpochInfo",r),i=(0,Tt.create)(o,Mo);if("error"in i)throw new Ar(i.error,"failed to get epoch info");return i.result}async getEpochSchedule(){const e=await this._rpcRequest("getEpochSchedule",[]),t=(0,Tt.create)(e,Ro);if("error"in t)throw new Ar(t.error,"failed to get epoch schedule");const n=t.result;return new Qr(n.slotsPerEpoch,n.leaderScheduleSlotOffset,n.warmup,n.firstNormalEpoch,n.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),t=(0,Tt.create)(e,Bo);if("error"in t)throw new Ar(t.error,"failed to get leader schedule");return t.result}async getMinimumBalanceForRentExemption(e,t){const n=this._buildArgs([e],t),r=await this._rpcRequest("getMinimumBalanceForRentExemption",n),o=(0,Tt.create)(r,hi);return"error"in o?(console.warn("Unable to fetch minimum balance for rent exemption"),0):o.result}async getRecentBlockhashAndContext(e){const t=this._buildArgs([],e),n=await this._rpcRequest("getRecentBlockhash",t),r=(0,Tt.create)(n,Fi);if("error"in r)throw new Ar(r.error,"failed to get recent blockhash");return r.result}async getRecentPerformanceSamples(e){const t=await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),n=(0,Tt.create)(t,Zi);if("error"in n)throw new Ar(n.error,"failed to get recent performance samples");return n.result}async getFeeCalculatorForBlockhash(e,t){const n=this._buildArgs([e],t),r=await this._rpcRequest("getFeeCalculatorForBlockhash",n),o=(0,Tt.create)(r,Hi);if("error"in o)throw new Ar(o.error,"failed to get fee calculator");const{context:i,value:s}=o.result;return{context:i,value:null!==s?s.feeCalculator:null}}async getFeeForMessage(e,t){const n=Rn(e.serialize()).toString("base64"),r=this._buildArgs([n],t),o=await this._rpcRequest("getFeeForMessage",r),i=(0,Tt.create)(o,po((0,Tt.nullable)((0,Tt.number)())));if("error"in i)throw new Ar(i.error,"failed to get fee for message");if(null===i.result)throw new Error("invalid blockhash");return i.result}async getRecentPrioritizationFees(e){const t=e?.lockedWritableAccounts?.map((e=>e.toBase58())),n=t?.length?[t]:[],r=await this._rpcRequest("getRecentPrioritizationFees",n),o=(0,Tt.create)(r,jo);if("error"in o)throw new Ar(o.error,"failed to get recent prioritization fees");return o.result}async getRecentBlockhash(e){try{return(await this.getRecentBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhashAndContext(e){const{commitment:t,config:n}=uo(e),r=this._buildArgs([],t,void 0,n),o=await this._rpcRequest("getLatestBlockhash",r),i=(0,Tt.create)(o,zi);if("error"in i)throw new Ar(i.error,"failed to get latest blockhash");return i.result}async isBlockhashValid(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgs([e],n,void 0,r),i=await this._rpcRequest("isBlockhashValid",o),s=(0,Tt.create)(i,$i);if("error"in s)throw new Ar(s.error,"failed to determine if the blockhash `"+e+"`is valid");return s.result}async getVersion(){const e=await this._rpcRequest("getVersion",[]),t=(0,Tt.create)(e,ho(Co));if("error"in t)throw new Ar(t.error,"failed to get version");return t.result}async getGenesisHash(){const e=await this._rpcRequest("getGenesisHash",[]),t=(0,Tt.create)(e,ho((0,Tt.string)()));if("error"in t)throw new Ar(t.error,"failed to get genesis hash");return t.result}async getBlock(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgsAtLeastConfirmed([e],n,void 0,r),i=await this._rpcRequest("getBlock",o);try{switch(r?.transactionDetails){case"accounts":{const e=(0,Tt.create)(i,ji);if("error"in e)throw e.error;return e.result}case"none":{const e=(0,Tt.create)(i,Oi);if("error"in e)throw e.error;return e.result}default:{const e=(0,Tt.create)(i,Pi);if("error"in e)throw e.error;const{result:t}=e;return t?{...t,transactions:t.transactions.map((({transaction:e,meta:t,version:n})=>({meta:t,transaction:{...e,message:go(n,e.message)},version:n})))}:null}}}catch(s){throw new Ar(s,"failed to get confirmed block")}}async getParsedBlock(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),i=await this._rpcRequest("getBlock",o);try{switch(r?.transactionDetails){case"accounts":{const e=(0,Tt.create)(i,Ri);if("error"in e)throw e.error;return e.result}case"none":{const e=(0,Tt.create)(i,Bi);if("error"in e)throw e.error;return e.result}default:{const e=(0,Tt.create)(i,Mi);if("error"in e)throw e.error;return e.result}}}catch(s){throw new Ar(s,"failed to get block")}}async getBlockProduction(e){let t,n;if("string"===typeof e)n=e;else if(e){const{commitment:r,...o}=e;n=r,t=o}const r=this._buildArgs([],n,"base64",t),o=await this._rpcRequest("getBlockProduction",r),i=(0,Tt.create)(o,Ao);if("error"in i)throw new Ar(i.error,"failed to get block production information");return i.result}async getTransaction(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgsAtLeastConfirmed([e],n,void 0,r),i=await this._rpcRequest("getTransaction",o),s=(0,Tt.create)(i,Ui);if("error"in s)throw new Ar(s.error,"failed to get transaction");const a=s.result;return a?{...a,transaction:{...a.transaction,message:go(a.version,a.transaction.message)}}:a}async getParsedTransaction(e,t){const{commitment:n,config:r}=uo(t),o=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),i=await this._rpcRequest("getTransaction",o),s=(0,Tt.create)(i,Di);if("error"in s)throw new Ar(s.error,"failed to get transaction");return s.result}async getParsedTransactions(e,t){const{commitment:n,config:r}=uo(t),o=e.map((e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r)})));return(await this._rpcBatchRequest(o)).map((e=>{const t=(0,Tt.create)(e,Di);if("error"in t)throw new Ar(t.error,"failed to get transactions");return t.result}))}async getTransactions(e,t){const{commitment:n,config:r}=uo(t),o=e.map((e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],n,void 0,r)})));return(await this._rpcBatchRequest(o)).map((e=>{const t=(0,Tt.create)(e,Ui);if("error"in t)throw new Ar(t.error,"failed to get transactions");const n=t.result;return n?{...n,transaction:{...n.transaction,message:go(n.version,n.transaction.message)}}:n}))}async getConfirmedBlock(e,t){const n=this._buildArgsAtLeastConfirmed([e],t),r=await this._rpcRequest("getConfirmedBlock",n),o=(0,Tt.create)(r,Ni);if("error"in o)throw new Ar(o.error,"failed to get confirmed block");const i=o.result;if(!i)throw new Error("Confirmed block "+e+" not found");const s={...i,transactions:i.transactions.map((({transaction:e,meta:t})=>{const n=new ur(e.message);return{meta:t,transaction:{...e,message:n}}}))};return{...s,transactions:s.transactions.map((({transaction:e,meta:t})=>({meta:t,transaction:mr.populate(e.message,e.signatures)})))}}async getBlocks(e,t,n){const r=this._buildArgsAtLeastConfirmed(void 0!==t?[e,t]:[e],n),o=await this._rpcRequest("getBlocks",r),i=(0,Tt.create)(o,ho((0,Tt.array)((0,Tt.number)())));if("error"in i)throw new Ar(i.error,"failed to get blocks");return i.result}async getBlockSignatures(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),r=await this._rpcRequest("getBlock",n),o=(0,Tt.create)(r,Li);if("error"in o)throw new Ar(o.error,"failed to get block");const i=o.result;if(!i)throw new Error("Block "+e+" not found");return i}async getConfirmedBlockSignatures(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),r=await this._rpcRequest("getConfirmedBlock",n),o=(0,Tt.create)(r,Li);if("error"in o)throw new Ar(o.error,"failed to get confirmed block");const i=o.result;if(!i)throw new Error("Confirmed block "+e+" not found");return i}async getConfirmedTransaction(e,t){const n=this._buildArgsAtLeastConfirmed([e],t),r=await this._rpcRequest("getConfirmedTransaction",n),o=(0,Tt.create)(r,Ui);if("error"in o)throw new Ar(o.error,"failed to get transaction");const i=o.result;if(!i)return i;const s=new ur(i.transaction.message),a=i.transaction.signatures;return{...i,transaction:mr.populate(s,a)}}async getParsedConfirmedTransaction(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),r=await this._rpcRequest("getConfirmedTransaction",n),o=(0,Tt.create)(r,Di);if("error"in o)throw new Ar(o.error,"failed to get confirmed transaction");return o.result}async getParsedConfirmedTransactions(e,t){const n=e.map((e=>({methodName:"getConfirmedTransaction",args:this._buildArgsAtLeastConfirmed([e],t,"jsonParsed")})));return(await this._rpcBatchRequest(n)).map((e=>{const t=(0,Tt.create)(e,Di);if("error"in t)throw new Ar(t.error,"failed to get confirmed transactions");return t.result}))}async getConfirmedSignaturesForAddress(e,t,n){let r={},o=await this.getFirstAvailableBlock();for(;!("until"in r)&&!(--t<=0||t<o);)try{const e=await this.getConfirmedBlockSignatures(t,"finalized");e.signatures.length>0&&(r.until=e.signatures[e.signatures.length-1].toString())}catch(s){if(s instanceof Error&&s.message.includes("skipped"))continue;throw s}let i=await this.getSlot("finalized");for(;!("before"in r)&&!(++n>i);)try{const e=await this.getConfirmedBlockSignatures(n);e.signatures.length>0&&(r.before=e.signatures[e.signatures.length-1].toString())}catch(s){if(s instanceof Error&&s.message.includes("skipped"))continue;throw s}return(await this.getConfirmedSignaturesForAddress2(e,r)).map((e=>e.signature))}async getConfirmedSignaturesForAddress2(e,t,n){const r=this._buildArgsAtLeastConfirmed([e.toBase58()],n,void 0,t),o=await this._rpcRequest("getConfirmedSignaturesForAddress2",r),i=(0,Tt.create)(o,Xo);if("error"in i)throw new Ar(i.error,"failed to get confirmed signatures for address");return i.result}async getSignaturesForAddress(e,t,n){const r=this._buildArgsAtLeastConfirmed([e.toBase58()],n,void 0,t),o=await this._rpcRequest("getSignaturesForAddress",r),i=(0,Tt.create)(o,Yo);if("error"in i)throw new Ar(i.error,"failed to get signatures for address");return i.result}async getAddressLookupTable(e,t){const{context:n,value:r}=await this.getAccountInfoAndContext(e,t);let o=null;return null!==r&&(o=new no({key:e,state:no.deserialize(r.data)})),{context:n,value:o}}async getNonceAndContext(e,t){const{context:n,value:r}=await this.getAccountInfoAndContext(e,t);let o=null;return null!==r&&(o=Lr.fromAccountData(r.data)),{context:n,value:o}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then((e=>e.value)).catch((t=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+t)}))}async requestAirdrop(e,t){const n=await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),r=(0,Tt.create)(n,Wi);if("error"in r)throw new Ar(r.error,`airdrop to ${e.toBase58()} failed`);return r.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await Or(100);const e=Date.now()-this._blockhashInfo.lastFetch>=co;if(null!==this._blockhashInfo.latestBlockhash&&!e)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),t=this._blockhashInfo.latestBlockhash,n=t?t.blockhash:null;for(let r=0;r<50;r++){const e=await this.getLatestBlockhash("finalized");if(n!==e.blockhash)return this._blockhashInfo={latestBlockhash:e,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e;await Or(200)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:t,config:n}=uo(e),r=this._buildArgs([],t,"base64",n),o=await this._rpcRequest("getStakeMinimumDelegation",r),i=(0,Tt.create)(o,po((0,Tt.number)()));if("error"in i)throw new Ar(i.error,"failed to get stake minimum delegation");return i.result}async simulateTransaction(e,t,n){if("message"in e){const r=e.serialize(),i=o.Buffer.from(r).toString("base64");if(Array.isArray(t)||void 0!==n)throw new Error("Invalid arguments");const s=t||{};s.encoding="base64","commitment"in s||(s.commitment=this.commitment);const a=[i,s],c=await this._rpcRequest("simulateTransaction",a),u=(0,Tt.create)(c,To);if("error"in u)throw new Error("failed to simulate transaction: "+u.error.message);return u.result}let r;if(e instanceof mr){let t=e;r=new mr,r.feePayer=t.feePayer,r.instructions=e.instructions,r.nonceInfo=t.nonceInfo,r.signatures=t.signatures}else r=mr.populate(e),r._message=r._json=void 0;if(void 0!==t&&!Array.isArray(t))throw new Error("Invalid arguments");const i=t;if(r.nonceInfo&&i)r.sign(...i);else{let e=this._disableBlockhashCaching;for(;;){const t=await this._blockhashWithExpiryBlockHeight(e);if(r.lastValidBlockHeight=t.lastValidBlockHeight,r.recentBlockhash=t.blockhash,!i)break;if(r.sign(...i),!r.signature)throw new Error("!signature");const n=r.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(n)&&!this._blockhashInfo.transactionSignatures.includes(n)){this._blockhashInfo.simulatedSignatures.push(n);break}e=!0}}const s=r._compile(),a=s.serialize(),c=r._serialize(a).toString("base64"),u={encoding:"base64",commitment:this.commitment};if(n){const e=(Array.isArray(n)?n:s.nonProgramIds()).map((e=>e.toBase58()));u.accounts={encoding:"base64",addresses:e}}i&&(u.sigVerify=!0);const l=[c,u],d=await this._rpcRequest("simulateTransaction",l),f=(0,Tt.create)(d,To);if("error"in f){let e;if("data"in f.error&&(e=f.error.data.logs,e&&Array.isArray(e))){const t="\n    ",n=t+e.join(t);console.error(f.error.message,n)}throw new Cr({action:"simulate",signature:"",transactionMessage:f.error.message,logs:e})}return f.result}async sendTransaction(e,t,n){if("version"in e){if(t&&Array.isArray(t))throw new Error("Invalid arguments");const n=e.serialize();return await this.sendRawTransaction(n,t)}if(void 0===t||!Array.isArray(t))throw new Error("Invalid arguments");const r=t;if(e.nonceInfo)e.sign(...r);else{let t=this._disableBlockhashCaching;for(;;){const n=await this._blockhashWithExpiryBlockHeight(t);if(e.lastValidBlockHeight=n.lastValidBlockHeight,e.recentBlockhash=n.blockhash,e.sign(...r),!e.signature)throw new Error("!signature");const o=e.signature.toString("base64");if(!this._blockhashInfo.transactionSignatures.includes(o)){this._blockhashInfo.transactionSignatures.push(o);break}t=!0}}const o=e.serialize();return await this.sendRawTransaction(o,n)}async sendRawTransaction(e,t){const n=Rn(e).toString("base64");return await this.sendEncodedTransaction(n,t)}async sendEncodedTransaction(e,t){const n={encoding:"base64"},r=t&&t.skipPreflight,o=!0===r?"processed":t&&t.preflightCommitment||this.commitment;t&&null!=t.maxRetries&&(n.maxRetries=t.maxRetries),t&&null!=t.minContextSlot&&(n.minContextSlot=t.minContextSlot),r&&(n.skipPreflight=r),o&&(n.preflightCommitment=o);const i=[e,n],s=await this._rpcRequest("sendTransaction",i),a=(0,Tt.create)(s,Gi);if("error"in a){let e;throw"data"in a.error&&(e=a.error.data.logs),new Cr({action:r?"send":"simulate",signature:"",transactionMessage:a.error.message,logs:e})}return a.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval((()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()}),5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3!==e?(this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach((([e,t])=>{this._setSubscription(e,{...t,state:"pending"})}))):this._updateSubscriptions()}_setSubscription(e,t){const n=this._subscriptionsByHash[e]?.state;if(this._subscriptionsByHash[e]=t,n!==t.state){const n=this._subscriptionStateChangeCallbacksByHash[e];n&&n.forEach((e=>{try{e(t.state)}catch{}}))}}_onSubscriptionStateChange(e,t){const n=this._subscriptionHashByClientSubscriptionId[e];if(null==n)return()=>{};const r=this._subscriptionStateChangeCallbacksByHash[n]||=new Set;return r.add(t),()=>{r.delete(t),0===r.size&&delete this._subscriptionStateChangeCallbacksByHash[n]}}async _updateSubscriptions(){if(0===Object.keys(this._subscriptionsByHash).length)return void(this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout((()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(e){e instanceof Error&&console.log(`Error when closing socket connection: ${e.message}`)}}),500)));if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected)return void this._rpcWebSocket.connect();const e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map((async e=>{const n=this._subscriptionsByHash[e];if(void 0!==n)switch(n.state){case"pending":case"unsubscribed":if(0===n.callbacks.size)return delete this._subscriptionsByHash[e],"unsubscribed"===n.state&&delete this._subscriptionCallbacksByServerSubscriptionId[n.serverSubscriptionId],void(await this._updateSubscriptions());await(async()=>{const{args:r,method:o}=n;try{this._setSubscription(e,{...n,state:"subscribing"});const t=await this._rpcWebSocket.call(o,r);this._setSubscription(e,{...n,serverSubscriptionId:t,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[t]=n.callbacks,await this._updateSubscriptions()}catch(i){if(i instanceof Error&&console.error(`${o} error for argument`,r,i.message),!t())return;this._setSubscription(e,{...n,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":0===n.callbacks.size&&await(async()=>{const{serverSubscriptionId:r,unsubscribeMethod:o}=n;if(this._subscriptionsAutoDisposedByRpc.has(r))this._subscriptionsAutoDisposedByRpc.delete(r);else{this._setSubscription(e,{...n,state:"unsubscribing"}),this._setSubscription(e,{...n,state:"unsubscribing"});try{await this._rpcWebSocket.call(o,[r])}catch(i){if(i instanceof Error&&console.error(`${o} error:`,i.message),!t())return;return this._setSubscription(e,{...n,state:"subscribed"}),void(await this._updateSubscriptions())}}this._setSubscription(e,{...n,state:"unsubscribed"}),await this._updateSubscriptions()})()}})))}_handleServerNotification(e,t){const n=this._subscriptionCallbacksByServerSubscriptionId[e];void 0!==n&&n.forEach((e=>{try{e(...t)}catch(n){console.error(n)}}))}_wsOnAccountNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,Jo);this._handleServerNotification(n,[t.value,t.context])}_makeSubscription(e,t){const n=this._nextClientSubscriptionId++,r=Yr([e.method,t]),o=this._subscriptionsByHash[r];return void 0===o?this._subscriptionsByHash[r]={...e,args:t,callbacks:new Set([e.callback]),state:"pending"}:o.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[n]=r,this._subscriptionDisposeFunctionsByClientSubscriptionId[n]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[n],delete this._subscriptionHashByClientSubscriptionId[n];const t=this._subscriptionsByHash[r];or(void 0!==t,`Could not find a \`Subscription\` when tearing down client subscription #${n}`),t.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),n}onAccountChange(e,t,n){const r=this._buildArgs([e.toBase58()],n||this._commitment||"finalized","base64");return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},r)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,ei);this._handleServerNotification(n,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,n,r){const o=this._buildArgs([e.toBase58()],n||this._commitment||"finalized","base64",r?{filters:r}:void 0);return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},o)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,n){const r=this._buildArgs(["object"===typeof e?{mentions:[e.toString()]}:e],n||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},r)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,Vi);this._handleServerNotification(n,[t.value,t.context])}_wsOnSlotNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,ni);this._handleServerNotification(n,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,oi);this._handleServerNotification(n,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){const n=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];n?await n():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${t}' events could not be found.`)}_buildArgs(e,t,n,r){const o=t||this._commitment;if(o||n||r){let t={};n&&(t.encoding=n),o&&(t.commitment=o),r&&(t=Object.assign(t,r)),e.push(t)}return e}_buildArgsAtLeastConfirmed(e,t,n,r){const o=t||this._commitment;if(o&&!["confirmed","finalized"].includes(o))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,n,r)}_wsOnSignatureNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,ii);"receivedSignature"!==t.value&&this._subscriptionsAutoDisposedByRpc.add(n),this._handleServerNotification(n,"receivedSignature"===t.value?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,n){const r=this._buildArgs([e],n||this._commitment||"finalized"),o=this._makeSubscription({callback:(e,n)=>{if("status"===e.type){t(e.result,n);try{this.removeSignatureListener(o)}catch(r){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},r);return o}onSignatureWithOptions(e,t,n){const{commitment:r,...o}={...n,commitment:n&&n.commitment||this._commitment||"finalized"},i=this._buildArgs([e],r,void 0,o),s=this._makeSubscription({callback:(e,n)=>{t(e,n);try{this.removeSignatureListener(s)}catch(r){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},i);return s}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:t,subscription:n}=(0,Tt.create)(e,si);this._handleServerNotification(n,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class Ji{constructor(e){this._keypair=void 0,this._keypair=e??An()}static generate(){return new Ji(An())}static fromSecretKey(e,t){if(64!==e.byteLength)throw new Error("bad secret key size");const n=e.slice(32,64);if(!t||!t.skipValidation){const t=e.slice(0,32),r=Pn(t);for(let e=0;e<32;e++)if(n[e]!==r[e])throw new Error("provided secretKey is invalid")}return new Ji({publicKey:n,secretKey:e})}static fromSeed(e){const t=Pn(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),new Ji({publicKey:t,secretKey:n})}get publicKey(){return new $n(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const Qi=Object.freeze({CreateLookupTable:{index:0,layout:It.n_([It.Jq("instruction"),Ur("recentSlot"),It.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:It.n_([It.Jq("instruction")])},ExtendLookupTable:{index:2,layout:It.n_([It.Jq("instruction"),Ur(),It.A9(Jn(),It.cv(It.Jq(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:It.n_([It.Jq("instruction")])},CloseLookupTable:{index:4,layout:It.n_([It.Jq("instruction")])}});class es{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=It.Jq("instruction").decode(e.data);let n;for(const[r,o]of Object.entries(Qi))if(o.index==t){n=r;break}if(!n)throw new Error("Invalid Instruction. Should be a LookupTable Instruction");return n}static decodeCreateLookupTable(e){this.checkProgramId(e.programId),this.checkKeysLength(e.keys,4);const{recentSlot:t}=Mr(Qi.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(t)}}static decodeExtendLookupTable(e){if(this.checkProgramId(e.programId),e.keys.length<2)throw new Error(`invalid instruction; found ${e.keys.length} keys, expected at least 2`);const{addresses:t}=Mr(Qi.ExtendLookupTable,e.data);return{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,payer:e.keys.length>2?e.keys[2].pubkey:void 0,addresses:t.map((e=>new $n(e)))}}static decodeCloseLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,3),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,recipient:e.keys[2].pubkey}}static decodeFreezeLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static decodeDeactivateLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(ts.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}class ts{constructor(){}static createLookupTable(e){const[t,n]=$n.findProgramAddressSync([e.authority.toBuffer(),(0,Ct.k$)(BigInt(e.recentSlot),8)],this.programId),r=jr(Qi.CreateLookupTable,{recentSlot:BigInt(e.recentSlot),bumpSeed:n}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:$r.programId,isSigner:!1,isWritable:!1}];return[new pr({programId:this.programId,keys:o,data:r}),t]}static freezeLookupTable(e){const t=jr(Qi.FreezeLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new pr({programId:this.programId,keys:n,data:t})}static extendLookupTable(e){const t=jr(Qi.ExtendLookupTable,{addresses:e.addresses.map((e=>e.toBytes()))}),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return e.payer&&n.push({pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:$r.programId,isSigner:!1,isWritable:!1}),new pr({programId:this.programId,keys:n,data:t})}static deactivateLookupTable(e){const t=jr(Qi.DeactivateLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new pr({programId:this.programId,keys:n,data:t})}static closeLookupTable(e){const t=jr(Qi.CloseLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new pr({programId:this.programId,keys:n,data:t})}}ts.programId=new $n("AddressLookupTab1e1111111111111111111111111");class ns{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=It.u8("instruction").decode(e.data);let n;for(const[r,o]of Object.entries(rs))if(o.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a ComputeBudgetInstruction");return n}static decodeRequestUnits(e){this.checkProgramId(e.programId);const{units:t,additionalFee:n}=Mr(rs.RequestUnits,e.data);return{units:t,additionalFee:n}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:t}=Mr(rs.RequestHeapFrame,e.data);return{bytes:t}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:t}=Mr(rs.SetComputeUnitLimit,e.data);return{units:t}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:t}=Mr(rs.SetComputeUnitPrice,e.data);return{microLamports:t}}static checkProgramId(e){if(!e.equals(os.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const rs=Object.freeze({RequestUnits:{index:0,layout:It.n_([It.u8("instruction"),It.Jq("units"),It.Jq("additionalFee")])},RequestHeapFrame:{index:1,layout:It.n_([It.u8("instruction"),It.Jq("bytes")])},SetComputeUnitLimit:{index:2,layout:It.n_([It.u8("instruction"),It.Jq("units")])},SetComputeUnitPrice:{index:3,layout:It.n_([It.u8("instruction"),Ur("microLamports")])}});class os{constructor(){}static requestUnits(e){const t=jr(rs.RequestUnits,e);return new pr({keys:[],programId:this.programId,data:t})}static requestHeapFrame(e){const t=jr(rs.RequestHeapFrame,e);return new pr({keys:[],programId:this.programId,data:t})}static setComputeUnitLimit(e){const t=jr(rs.SetComputeUnitLimit,e);return new pr({keys:[],programId:this.programId,data:t})}static setComputeUnitPrice(e){const t=jr(rs.SetComputeUnitPrice,{microLamports:BigInt(e.microLamports)});return new pr({keys:[],programId:this.programId,data:t})}}os.programId=new $n("ComputeBudget111111111111111111111111111111");const is=It.n_([It.u8("numSignatures"),It.u8("padding"),It.KB("signatureOffset"),It.KB("signatureInstructionIndex"),It.KB("publicKeyOffset"),It.KB("publicKeyInstructionIndex"),It.KB("messageDataOffset"),It.KB("messageDataSize"),It.KB("messageInstructionIndex")]);class ss{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:t,message:n,signature:r,instructionIndex:i}=e;or(32===t.length,`Public Key must be 32 bytes but received ${t.length} bytes`),or(64===r.length,`Signature must be 64 bytes but received ${r.length} bytes`);const s=is.span,a=s+t.length,c=a+r.length,u=o.Buffer.alloc(c+n.length),l=null==i?65535:i;return is.encode({numSignatures:1,padding:0,signatureOffset:a,signatureInstructionIndex:l,publicKeyOffset:s,publicKeyInstructionIndex:l,messageDataOffset:c,messageDataSize:n.length,messageInstructionIndex:l},u),u.fill(t,s),u.fill(r,a),u.fill(n,c),new pr({keys:[],programId:ss.programId,data:u})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:n,instructionIndex:r}=e;or(64===t.length,`Private key must be 64 bytes but received ${t.length} bytes`);try{const e=Ji.fromSecretKey(t),o=e.publicKey.toBytes(),i=jn(n,e.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:n,signature:i,instructionIndex:r})}catch(o){throw new Error(`Error creating instruction; ${o}`)}}}ss.programId=new $n("Ed25519SigVerify111111111111111111111111111");Cn.utils.isValidPrivateKey;const as=Cn.getPublicKey,cs=It.n_([It.u8("numSignatures"),It.KB("signatureOffset"),It.u8("signatureInstructionIndex"),It.KB("ethAddressOffset"),It.u8("ethAddressInstructionIndex"),It.KB("messageDataOffset"),It.KB("messageDataSize"),It.u8("messageInstructionIndex"),It.Ik(20,"ethAddress"),It.Ik(64,"signature"),It.u8("recoveryId")]);class us{constructor(){}static publicKeyToEthAddress(e){or(64===e.length,`Public key must be 64 bytes but received ${e.length} bytes`);try{return o.Buffer.from(nn(Rn(e))).slice(-20)}catch(t){throw new Error(`Error constructing Ethereum address: ${t}`)}}static createInstructionWithPublicKey(e){const{publicKey:t,message:n,signature:r,recoveryId:o,instructionIndex:i}=e;return us.createInstructionWithEthAddress({ethAddress:us.publicKeyToEthAddress(t),message:n,signature:r,recoveryId:o,instructionIndex:i})}static createInstructionWithEthAddress(e){const{ethAddress:t,message:n,signature:r,recoveryId:i,instructionIndex:s=0}=e;let a;a="string"===typeof t?t.startsWith("0x")?o.Buffer.from(t.substr(2),"hex"):o.Buffer.from(t,"hex"):t,or(20===a.length,`Address must be 20 bytes but received ${a.length} bytes`);const c=12+a.length,u=c+r.length+1,l=o.Buffer.alloc(cs.span+n.length);return cs.encode({numSignatures:1,signatureOffset:c,signatureInstructionIndex:s,ethAddressOffset:12,ethAddressInstructionIndex:s,messageDataOffset:u,messageDataSize:n.length,messageInstructionIndex:s,signature:Rn(r),ethAddress:Rn(a),recoveryId:i},l),l.fill(Rn(n),cs.span),new pr({keys:[],programId:us.programId,data:l})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:n,instructionIndex:r}=e;or(32===t.length,`Private key must be 32 bytes but received ${t.length} bytes`);try{const e=Rn(t),i=as(e,!1).slice(1),s=o.Buffer.from(nn(Rn(n))),[a,c]=((e,t)=>{const n=Cn.sign(e,t);return[n.toCompactRawBytes(),n.recovery]})(s,e);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:a,recoveryId:c,instructionIndex:r})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}var ls;us.programId=new $n("KeccakSecp256k11111111111111111111111111111");const ds=new $n("StakeConfig11111111111111111111111111111111");class fs{constructor(e,t){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=t}}class hs{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}ls=hs,hs.default=new ls(0,0,$n.default);class ps{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=It.Jq("instruction").decode(e.data);let n;for(const[r,o]of Object.entries(ms))if(o.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a StakeInstruction");return n}static decodeInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t,lockup:n}=Mr(ms.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new fs(new $n(t.staker),new $n(t.withdrawer)),lockup:new hs(n.unixTimestamp,n.epoch,new $n(n.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),Mr(ms.Delegate,e.data),{stakePubkey:e.keys[0].pubkey,votePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[5].pubkey}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,stakeAuthorizationType:n}=Mr(ms.Authorize,e.data),r={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new $n(t),stakeAuthorizationType:{index:n}};return e.keys.length>3&&(r.custodianPubkey=e.keys[3].pubkey),r}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{newAuthorized:t,stakeAuthorizationType:n,authoritySeed:r,authorityOwner:o}=Mr(ms.AuthorizeWithSeed,e.data),i={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:r,authorityOwner:new $n(o),newAuthorizedPubkey:new $n(t),stakeAuthorizationType:{index:n}};return e.keys.length>3&&(i.custodianPubkey=e.keys[3].pubkey),i}static decodeSplit(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Mr(ms.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Mr(ms.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Mr(ms.Withdraw,e.data),n={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(n.custodianPubkey=e.keys[5].pubkey),n}static decodeDeactivate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Mr(ms.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(ys.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const ms=Object.freeze({Initialize:{index:0,layout:It.n_([It.Jq("instruction"),((e="authorized")=>It.n_([Jn("staker"),Jn("withdrawer")],e))(),((e="lockup")=>It.n_([It.gM("unixTimestamp"),It.gM("epoch"),Jn("custodian")],e))()])},Authorize:{index:1,layout:It.n_([It.Jq("instruction"),Jn("newAuthorized"),It.Jq("stakeAuthorizationType")])},Delegate:{index:2,layout:It.n_([It.Jq("instruction")])},Split:{index:3,layout:It.n_([It.Jq("instruction"),It.gM("lamports")])},Withdraw:{index:4,layout:It.n_([It.Jq("instruction"),It.gM("lamports")])},Deactivate:{index:5,layout:It.n_([It.Jq("instruction")])},Merge:{index:7,layout:It.n_([It.Jq("instruction")])},AuthorizeWithSeed:{index:8,layout:It.n_([It.Jq("instruction"),Jn("newAuthorized"),It.Jq("stakeAuthorizationType"),er("authoritySeed"),Jn("authorityOwner")])}}),gs=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class ys{constructor(){}static initialize(e){const{stakePubkey:t,authorized:n,lockup:r}=e,o=r||hs.default,i=jr(ms.Initialize,{authorized:{staker:Rn(n.staker.toBuffer()),withdrawer:Rn(n.withdrawer.toBuffer())},lockup:{unixTimestamp:o.unixTimestamp,epoch:o.epoch,custodian:Rn(o.custodian.toBuffer())}}),s={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Er,isSigner:!1,isWritable:!1}],programId:this.programId,data:i};return new pr(s)}static createAccountWithSeed(e){const t=new mr;t.add($r.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:n,authorized:r,lockup:o}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:o}))}static createAccount(e){const t=new mr;t.add($r.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:n,authorized:r,lockup:o}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:o}))}static delegate(e){const{stakePubkey:t,authorizedPubkey:n,votePubkey:r}=e,o=jr(ms.Delegate);return(new mr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:ds,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorize(e){const{stakePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,stakeAuthorizationType:o,custodianPubkey:i}=e,s=jr(ms.Authorize,{newAuthorized:Rn(r.toBuffer()),stakeAuthorizationType:o.index}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:br,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return i&&a.push({pubkey:i,isSigner:!0,isWritable:!1}),(new mr).add({keys:a,programId:this.programId,data:s})}static authorizeWithSeed(e){const{stakePubkey:t,authorityBase:n,authoritySeed:r,authorityOwner:o,newAuthorizedPubkey:i,stakeAuthorizationType:s,custodianPubkey:a}=e,c=jr(ms.AuthorizeWithSeed,{newAuthorized:Rn(i.toBuffer()),stakeAuthorizationType:s.index,authoritySeed:r,authorityOwner:Rn(o.toBuffer())}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:br,isSigner:!1,isWritable:!1}];return a&&u.push({pubkey:a,isSigner:!0,isWritable:!1}),(new mr).add({keys:u,programId:this.programId,data:c})}static splitInstruction(e){const{stakePubkey:t,authorizedPubkey:n,splitStakePubkey:r,lamports:o}=e,i=jr(ms.Split,{lamports:o});return new pr({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static split(e,t){const n=new mr;return n.add($r.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space:this.space,programId:this.programId})),n.add(this.splitInstruction(e))}static splitWithSeed(e,t){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:o,basePubkey:i,seed:s,lamports:a}=e,c=new mr;return c.add($r.allocate({accountPubkey:o,basePubkey:i,seed:s,space:this.space,programId:this.programId})),t&&t>0&&c.add($r.transfer({fromPubkey:e.authorizedPubkey,toPubkey:o,lamports:t})),c.add(this.splitInstruction({stakePubkey:n,authorizedPubkey:r,splitStakePubkey:o,lamports:a}))}static merge(e){const{stakePubkey:t,sourceStakePubKey:n,authorizedPubkey:r}=e,o=jr(ms.Merge);return(new mr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static withdraw(e){const{stakePubkey:t,authorizedPubkey:n,toPubkey:r,lamports:o,custodianPubkey:i}=e,s=jr(ms.Withdraw,{lamports:o}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return i&&a.push({pubkey:i,isSigner:!0,isWritable:!1}),(new mr).add({keys:a,programId:this.programId,data:s})}static deactivate(e){const{stakePubkey:t,authorizedPubkey:n}=e,r=jr(ms.Deactivate);return(new mr).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}}ys.programId=new $n("Stake11111111111111111111111111111111111111"),ys.space=200;class bs{constructor(e,t,n,r){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=t,this.authorizedWithdrawer=n,this.commission=r}}class vs{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=It.Jq("instruction").decode(e.data);let n;for(const[r,o]of Object.entries(ws))if(o.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a VoteInstruction");return n}static decodeInitializeAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,4);const{voteInit:t}=Mr(ws.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new bs(new $n(t.nodePubkey),new $n(t.authorizedVoter),new $n(t.authorizedWithdrawer),t.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,voteAuthorizationType:n}=Mr(ws.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new $n(t),voteAuthorizationType:{index:n}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:t,currentAuthorityDerivedKeySeed:n,newAuthorized:r,voteAuthorizationType:o}}=Mr(ws.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new $n(t),currentAuthorityDerivedKeySeed:n,newAuthorizedPubkey:new $n(r),voteAuthorizationType:{index:o},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Mr(ws.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:t,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(Es.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const ws=Object.freeze({InitializeAccount:{index:0,layout:It.n_([It.Jq("instruction"),((e="voteInit")=>It.n_([Jn("nodePubkey"),Jn("authorizedVoter"),Jn("authorizedWithdrawer"),It.u8("commission")],e))()])},Authorize:{index:1,layout:It.n_([It.Jq("instruction"),Jn("newAuthorized"),It.Jq("voteAuthorizationType")])},Withdraw:{index:3,layout:It.n_([It.Jq("instruction"),It.gM("lamports")])},UpdateValidatorIdentity:{index:4,layout:It.n_([It.Jq("instruction")])},AuthorizeWithSeed:{index:10,layout:It.n_([It.Jq("instruction"),((e="voteAuthorizeWithSeedArgs")=>It.n_([It.Jq("voteAuthorizationType"),Jn("currentAuthorityDerivedKeyOwnerPubkey"),er("currentAuthorityDerivedKeySeed"),Jn("newAuthorized")],e))()])}}),xs=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Es{constructor(){}static initializeAccount(e){const{votePubkey:t,nodePubkey:n,voteInit:r}=e,o=jr(ws.InitializeAccount,{voteInit:{nodePubkey:Rn(r.nodePubkey.toBuffer()),authorizedVoter:Rn(r.authorizedVoter.toBuffer()),authorizedWithdrawer:Rn(r.authorizedWithdrawer.toBuffer()),commission:r.commission}}),i={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Er,isSigner:!1,isWritable:!1},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new pr(i)}static createAccount(e){const t=new mr;return t.add($r.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,voteAuthorizationType:o}=e,i=jr(ws.Authorize,{newAuthorized:Rn(r.toBuffer()),voteAuthorizationType:o.index}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new mr).add({keys:s,programId:this.programId,data:i})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:n,currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:o,voteAuthorizationType:i,votePubkey:s}=e,a=jr(ws.AuthorizeWithSeed,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:Rn(n.toBuffer()),currentAuthorityDerivedKeySeed:r,newAuthorized:Rn(o.toBuffer()),voteAuthorizationType:i.index}}),c=[{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:br,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return(new mr).add({keys:c,programId:this.programId,data:a})}static withdraw(e){const{votePubkey:t,authorizedWithdrawerPubkey:n,lamports:r,toPubkey:o}=e,i=jr(ws.Withdraw,{lamports:r}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return(new mr).add({keys:s,programId:this.programId,data:i})}static safeWithdraw(e,t,n){if(e.lamports>t-n)throw new Error("Withdraw will leave vote account with insufficient funds.");return Es.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:t,authorizedWithdrawerPubkey:n,nodePubkey:r}=e,o=jr(ws.UpdateValidatorIdentity),i=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new mr).add({keys:i,programId:this.programId,data:o})}}Es.programId=new $n("Vote111111111111111111111111111111111111111"),Es.space=3762;const _s=new $n("Va1idator1nfo111111111111111111111111111111"),ks=(0,Tt.type)({name:(0,Tt.string)(),website:(0,Tt.optional)((0,Tt.string)()),details:(0,Tt.optional)((0,Tt.string)()),keybaseUsername:(0,Tt.optional)((0,Tt.string)())});class Ss{constructor(e,t){this.key=void 0,this.info=void 0,this.key=e,this.info=t}static fromConfigData(e){let t=[...e];if(2!==nr(t))return null;const n=[];for(let r=0;r<2;r++){const e=new $n(cr(t,0,Fn)),r=1===ar(t);n.push({publicKey:e,isSigner:r})}if(n[0].publicKey.equals(_s)&&n[1].isSigner){const e=er().decode(o.Buffer.from(t)),r=JSON.parse(e);return(0,Tt.assert)(r,ks),new Ss(n[1].publicKey,r)}return null}}const Is=new $n("Vote111111111111111111111111111111111111111"),Cs=It.n_([Jn("nodePubkey"),Jn("authorizedWithdrawer"),It.u8("commission"),It._O(),It.A9(It.n_([It._O("slot"),It.Jq("confirmationCount")]),It.cv(It.Jq(),-8),"votes"),It.u8("rootSlotValid"),It._O("rootSlot"),It._O(),It.A9(It.n_([It._O("epoch"),Jn("authorizedVoter")]),It.cv(It.Jq(),-8),"authorizedVoters"),It.n_([It.A9(It.n_([Jn("authorizedPubkey"),It._O("epochOfLastAuthorizedSwitch"),It._O("targetEpoch")]),32,"buf"),It._O("idx"),It.u8("isEmpty")],"priorVoters"),It._O(),It.A9(It.n_([It._O("epoch"),It._O("credits"),It._O("prevCredits")]),It.cv(It.Jq(),-8),"epochCredits"),It.n_([It._O("slot"),It._O("timestamp")],"lastTimestamp")]);class Ts{constructor(e){this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=e.nodePubkey,this.authorizedWithdrawer=e.authorizedWithdrawer,this.commission=e.commission,this.rootSlot=e.rootSlot,this.votes=e.votes,this.authorizedVoters=e.authorizedVoters,this.priorVoters=e.priorVoters,this.epochCredits=e.epochCredits,this.lastTimestamp=e.lastTimestamp}static fromAccountData(e){const t=Cs.decode(Rn(e),4);let n=t.rootSlot;return t.rootSlotValid||(n=null),new Ts({nodePubkey:new $n(t.nodePubkey),authorizedWithdrawer:new $n(t.authorizedWithdrawer),commission:t.commission,votes:t.votes,rootSlot:n,authorizedVoters:t.authorizedVoters.map(As),priorVoters:Os(t.priorVoters),epochCredits:t.epochCredits,lastTimestamp:t.lastTimestamp})}}function As({authorizedVoter:e,epoch:t}){return{epoch:t,authorizedVoter:new $n(e)}}function Ps({authorizedPubkey:e,epochOfLastAuthorizedSwitch:t,targetEpoch:n}){return{authorizedPubkey:new $n(e),epochOfLastAuthorizedSwitch:t,targetEpoch:n}}function Os({buf:e,idx:t,isEmpty:n}){return n?[]:[...e.slice(t+1).map(Ps),...e.slice(0,t).map(Ps)]}const js={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function Ms(e,t){const n=!1===t?"http":"https";if(!e)return js[n].devnet;const r=js[n][e];if(!r)throw new Error(`Unknown ${n} cluster: ${e}`);return r}async function Rs(e,t,n,r){let o,i;n&&Object.prototype.hasOwnProperty.call(n,"lastValidBlockHeight")||n&&Object.prototype.hasOwnProperty.call(n,"nonceValue")?(o=n,i=r):i=n;const s=i&&{skipPreflight:i.skipPreflight,preflightCommitment:i.preflightCommitment||i.commitment,minContextSlot:i.minContextSlot},a=await e.sendRawTransaction(t,s),c=i&&i.commitment,u=o?e.confirmTransaction(o,c):e.confirmTransaction(a,c),l=(await u).value;if(l.err){if(null!=a)throw new Cr({action:s?.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(l)})`});throw new Error(`Raw transaction ${a} failed (${JSON.stringify(l)})`)}return a}const Bs=1e9},98099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97117);function o(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function i(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function s(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function l(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function d(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function f(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),l(e/4294967296>>>0,t,n),l(e>>>0,t,n+4),t}function h(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),d(e>>>0,t,n),d(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=o,t.writeInt16BE=o,t.writeUint16LE=i,t.writeInt16LE=i,t.readInt32BE=s,t.readUint32BE=a,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=l,t.writeInt32BE=l,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var n=s(e,t),r=s(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var n=c(e,t);return 4294967296*c(e,t+4)+n-4294967296*(n>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var n=u(e,t);return 4294967296*u(e,t+4)+n},t.writeUint64BE=f,t.writeInt64BE=f,t.writeUint64LE=h,t.writeInt64LE=h,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,o=1,i=e/8+n-1;i>=n;i--)r+=t[i]*o,o*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,o=1,i=n;i<n+e/8;i++)r+=t[i]*o,o*=256;return r},t.writeUintBE=function(e,t,n,o){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,s=e/8+o-1;s>=o;s--)n[s]=t/i&255,i*=256;return n},t.writeUintLE=function(e,t,n,o){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,s=o;s<o+e/8;s++)n[s]=t/i&255,i*=256;return n},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},t.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},t.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},t.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t}},25439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(98099),o=n(17309);function i(e,t,n){for(var o=1634760805,i=857760878,s=2036477234,a=1797285236,c=n[3]<<24|n[2]<<16|n[1]<<8|n[0],u=n[7]<<24|n[6]<<16|n[5]<<8|n[4],l=n[11]<<24|n[10]<<16|n[9]<<8|n[8],d=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],p=n[27]<<24|n[26]<<16|n[25]<<8|n[24],m=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],v=t[15]<<24|t[14]<<16|t[13]<<8|t[12],w=o,x=i,E=s,_=a,k=c,S=u,I=l,C=d,T=f,A=h,P=p,O=m,j=g,M=y,R=b,B=v,N=0;N<20;N+=2)k=(k^=T=T+(j=(j^=w=w+k|0)>>>16|j<<16)|0)>>>20|k<<12,S=(S^=A=A+(M=(M^=x=x+S|0)>>>16|M<<16)|0)>>>20|S<<12,I=(I^=P=P+(R=(R^=E=E+I|0)>>>16|R<<16)|0)>>>20|I<<12,C=(C^=O=O+(B=(B^=_=_+C|0)>>>16|B<<16)|0)>>>20|C<<12,I=(I^=P=P+(R=(R^=E=E+I|0)>>>24|R<<8)|0)>>>25|I<<7,C=(C^=O=O+(B=(B^=_=_+C|0)>>>24|B<<8)|0)>>>25|C<<7,S=(S^=A=A+(M=(M^=x=x+S|0)>>>24|M<<8)|0)>>>25|S<<7,k=(k^=T=T+(j=(j^=w=w+k|0)>>>24|j<<8)|0)>>>25|k<<7,S=(S^=P=P+(B=(B^=w=w+S|0)>>>16|B<<16)|0)>>>20|S<<12,I=(I^=O=O+(j=(j^=x=x+I|0)>>>16|j<<16)|0)>>>20|I<<12,C=(C^=T=T+(M=(M^=E=E+C|0)>>>16|M<<16)|0)>>>20|C<<12,k=(k^=A=A+(R=(R^=_=_+k|0)>>>16|R<<16)|0)>>>20|k<<12,C=(C^=T=T+(M=(M^=E=E+C|0)>>>24|M<<8)|0)>>>25|C<<7,k=(k^=A=A+(R=(R^=_=_+k|0)>>>24|R<<8)|0)>>>25|k<<7,I=(I^=O=O+(j=(j^=x=x+I|0)>>>24|j<<8)|0)>>>25|I<<7,S=(S^=P=P+(B=(B^=w=w+S|0)>>>24|B<<8)|0)>>>25|S<<7;r.writeUint32LE(w+o|0,e,0),r.writeUint32LE(x+i|0,e,4),r.writeUint32LE(E+s|0,e,8),r.writeUint32LE(_+a|0,e,12),r.writeUint32LE(k+c|0,e,16),r.writeUint32LE(S+u|0,e,20),r.writeUint32LE(I+l|0,e,24),r.writeUint32LE(C+d|0,e,28),r.writeUint32LE(T+f|0,e,32),r.writeUint32LE(A+h|0,e,36),r.writeUint32LE(P+p|0,e,40),r.writeUint32LE(O+m|0,e,44),r.writeUint32LE(j+g|0,e,48),r.writeUint32LE(M+y|0,e,52),r.writeUint32LE(R+b|0,e,56),r.writeUint32LE(B+v|0,e,60)}function s(e,t,n,r,s){if(void 0===s&&(s=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var c,u;if(0===s){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");u=(c=new Uint8Array(16)).length-t.length,c.set(t,u)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");c=t,u=s}for(var l=new Uint8Array(64),d=0;d<n.length;d+=64){i(l,c,e);for(var f=d;f<d+64&&f<n.length;f++)r[f]=n[f]^l[f-d];a(c,0,u)}return o.wipe(l),0===s&&o.wipe(c),r}function a(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=s,t.stream=function(e,t,n,r){return void 0===r&&(r=0),o.wipe(n),s(e,t,n,n,r)}},15501:function(e,t,n){"use strict";var r=n(25439),o=n(63027),i=n(17309),s=n(98099),a=n(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),u=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);r.stream(this._key,s,a,4);var c,u=t.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return r.streamXOR(this._key,s,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),n),i.wipe(s),c},e.prototype.open=function(e,t,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);r.stream(this._key,s,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,t.subarray(0,t.length-this.tagLength),n),!a.equal(u,t.subarray(t.length-this.tagLength,t.length)))return null;var l,d=t.length-this.tagLength;if(o){if(o.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");l=o}else l=new Uint8Array(d);return r.streamXOR(this._key,s,t.subarray(0,t.length-this.tagLength),l,4),i.wipe(s),l},e.prototype.clean=function(){return i.wipe(this._key),this},e.prototype._authenticate=function(e,t,n,r){var a=new o.Poly1305(t);r&&(a.update(r),r.length%16>0&&a.update(c.subarray(r.length%16))),a.update(n),n.length%16>0&&a.update(c.subarray(n.length%16));var u=new Uint8Array(8);r&&s.writeUint64LE(r.length,u),a.update(u),s.writeUint64LE(n.length,u),a.update(u);for(var l=a.digest(),d=0;d<l.length;d++)e[d]=l[d];a.clean(),i.wipe(l),i.wipe(u)},e}();t.OK=u},4153:function(e,t){"use strict";function n(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,n){return~(e-1)&t|e-1&n},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=n,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==n(e,t)}},79984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},512:function(e,t,n){"use strict";var r=n(25629),o=n(17309),i=function(){function e(e,t,n,o){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=o;var i=r.hmac(this._hash,n,t);this._hmac=new r.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),o.wipe(this._buffer),o.wipe(this._counter),this._bufpos=0},e}();t.t=i},25629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79984),o=n(4153),i=n(17309),s=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var o=0;o<n.length;o++)n[o]^=54;this._inner.update(n);for(o=0;o<n.length;o++)n[o]^=106;this._outer.update(n),r.isSerializableHash(this._inner)&&r.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),i.wipe(n)}return e.prototype.reset=function(){if(!r.isSerializableHash(this._inner)||!r.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){r.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),r.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!r.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!r.isSerializableHash(this._inner)||!r.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!r.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();t.HMAC=s,t.hmac=function(e,t,n){var r=new s(e,t);r.update(n);var o=r.digest();return r.clean(),o},t.equal=o.equal},97117:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},63027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4153),o=n(17309);t.DIGEST_LENGTH=16;var i=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=e[0]|e[1]<<8;this._r[0]=8191&n;var r=e[2]|e[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var o=e[4]|e[5]<<8;this._r[2]=7939&(r>>>10|o<<6);var i=e[6]|e[7]<<8;this._r[3]=8191&(o>>>7|i<<9);var s=e[8]|e[9]<<8;this._r[4]=255&(i>>>4|s<<12),this._r[5]=s>>>1&8190;var a=e[10]|e[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var u=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,o=this._h[0],i=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],m=this._r[1],g=this._r[2],y=this._r[3],b=this._r[4],v=this._r[5],w=this._r[6],x=this._r[7],E=this._r[8],_=this._r[9];n>=16;){var k=e[t+0]|e[t+1]<<8;o+=8191&k;var S=e[t+2]|e[t+3]<<8;i+=8191&(k>>>13|S<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(S>>>10|I<<6);var C=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|C<<9);var T=e[t+8]|e[t+9]<<8;c+=8191&(C>>>4|T<<12),u+=T>>>1&8191;var A=e[t+10]|e[t+11]<<8;l+=8191&(T>>>14|A<<2);var P=e[t+12]|e[t+13]<<8;d+=8191&(A>>>11|P<<5);var O=e[t+14]|e[t+15]<<8,j=0,M=j;M+=o*p,M+=i*(5*_),M+=s*(5*E),M+=a*(5*x),j=(M+=c*(5*w))>>>13,M&=8191,M+=u*(5*v),M+=l*(5*b),M+=d*(5*y),M+=(f+=8191&(P>>>8|O<<8))*(5*g);var R=j+=(M+=(h+=O>>>5|r)*(5*m))>>>13;R+=o*m,R+=i*p,R+=s*(5*_),R+=a*(5*E),j=(R+=c*(5*x))>>>13,R&=8191,R+=u*(5*w),R+=l*(5*v),R+=d*(5*b),R+=f*(5*y),j+=(R+=h*(5*g))>>>13,R&=8191;var B=j;B+=o*g,B+=i*m,B+=s*p,B+=a*(5*_),j=(B+=c*(5*E))>>>13,B&=8191,B+=u*(5*x),B+=l*(5*w),B+=d*(5*v),B+=f*(5*b);var N=j+=(B+=h*(5*y))>>>13;N+=o*y,N+=i*g,N+=s*m,N+=a*p,j=(N+=c*(5*_))>>>13,N&=8191,N+=u*(5*E),N+=l*(5*x),N+=d*(5*w),N+=f*(5*v);var L=j+=(N+=h*(5*b))>>>13;L+=o*b,L+=i*y,L+=s*g,L+=a*m,j=(L+=c*p)>>>13,L&=8191,L+=u*(5*_),L+=l*(5*E),L+=d*(5*x),L+=f*(5*w);var U=j+=(L+=h*(5*v))>>>13;U+=o*v,U+=i*b,U+=s*y,U+=a*g,j=(U+=c*m)>>>13,U&=8191,U+=u*p,U+=l*(5*_),U+=d*(5*E),U+=f*(5*x);var D=j+=(U+=h*(5*w))>>>13;D+=o*w,D+=i*v,D+=s*b,D+=a*y,j=(D+=c*g)>>>13,D&=8191,D+=u*m,D+=l*p,D+=d*(5*_),D+=f*(5*E);var F=j+=(D+=h*(5*x))>>>13;F+=o*x,F+=i*w,F+=s*v,F+=a*b,j=(F+=c*y)>>>13,F&=8191,F+=u*g,F+=l*m,F+=d*p,F+=f*(5*_);var z=j+=(F+=h*(5*E))>>>13;z+=o*E,z+=i*x,z+=s*w,z+=a*v,j=(z+=c*b)>>>13,z&=8191,z+=u*y,z+=l*g,z+=d*m,z+=f*p;var $=j+=(z+=h*(5*_))>>>13;$+=o*_,$+=i*E,$+=s*x,$+=a*w,j=($+=c*v)>>>13,$&=8191,$+=u*b,$+=l*y,$+=d*g,$+=f*m,o=M=8191&(j=(j=((j+=($+=h*p)>>>13)<<2)+j|0)+(M&=8191)|0),i=R+=j>>>=13,s=B&=8191,a=N&=8191,c=L&=8191,u=U&=8191,l=D&=8191,d=F&=8191,f=z&=8191,h=$&=8191,t+=16,n-=16}this._h[0]=o,this._h[1]=i,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=h},e.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,o,i,s=new Uint16Array(10);if(this._leftover){for(i=this._leftover,this._buffer[i++]=1;i<16;i++)this._buffer[i]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,i=2;i<10;i++)this._h[i]+=n,n=this._h[i]>>>13,this._h[i]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this._h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this._h[i]=this._h[i]&r|s[i];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),o=this._h[0]+this._pad[0],this._h[0]=65535&o,i=1;i<8;i++)o=(this._h[i]+this._pad[i]|0)+(o>>>16)|0,this._h[i]=65535&o;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var o=0;o<t;o++)this._buffer[this._leftover+o]=e[n+o];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(o=0;o<r;o++)this._buffer[this._leftover+o]=e[n+o];this._leftover+=r}return this},e.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},e.prototype.clean=function(){return o.wipe(this._buffer),o.wipe(this._r),o.wipe(this._h),o.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();t.Poly1305=i,t.oneTimeAuth=function(e,t){var n=new i(e);n.update(t);var r=n.digest();return n.clean(),r},t.equal=function(e,n){return e.length===t.DIGEST_LENGTH&&n.length===t.DIGEST_LENGTH&&r.equal(e,n)}},31416:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const r=n(46008),o=n(98099),i=n(17309);function s(e,n=t.defaultRandomSource){return n.randomBytes(e)}t.defaultRandomSource=new r.SystemRandomSource,t.randomBytes=s,t.randomUint32=function(e=t.defaultRandomSource){const n=s(4,e),r=(0,o.readUint32LE)(n);return(0,i.wipe)(n),r};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e,n=a,r=t.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let o="";const c=n.length,u=256-256%c;for(;e>0;){const t=s(Math.ceil(256*e/u),r);for(let r=0;r<t.length&&e>0;r++){const i=t[r];i<u&&(o+=n.charAt(i%c),e--)}(0,i.wipe)(t)}return o}t.randomString=c,t.randomStringForEntropy=function(e,n=a,r=t.defaultRandomSource){return c(Math.ceil(e/(Math.log(n.length)/Math.LN2)),n,r)}},75455:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!==typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let n=0;n<t.length;n+=65536)this._crypto.getRandomValues(t.subarray(n,n+Math.min(t.length-n,65536)));return t}}},58871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const r=n(17309);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=n(35883);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let r=0;r<n.length;r++)n[r]=t[r];return(0,r.wipe)(t),n}}},46008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const r=n(75455),o=n(58871);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new o.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},73294:function(e,t,n){"use strict";var r=n(98099),o=n(17309);t.k=32,t.cn=64;var i=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){o.wipe(this._buffer),o.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=a(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,o=t/536870912|0,i=t<<3,s=t%64<56?64:128;this._buffer[n]=128;for(var c=n+1;c<s-8;c++)this._buffer[c]=0;r.writeUint32BE(o,this._buffer,s-8),r.writeUint32BE(i,this._buffer,s-4),a(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)r.writeUint32BE(this._state[c],e,4*c);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){o.wipe(e.state),e.buffer&&o.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=i;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(e,t,n,o,i){for(;i>=64;){for(var a=t[0],c=t[1],u=t[2],l=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=0;m<16;m++){var g=o+4*m;e[m]=r.readUint32BE(n,g)}for(m=16;m<64;m++){var y=e[m-2],b=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,v=((y=e[m-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;e[m]=(b+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){b=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(s[m]+e[m]|0)|0)|0,v=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&u^c&u)|0;p=h,h=f,f=d,d=l+b|0,l=u,u=c,c=a,a=b+v|0}t[0]+=a,t[1]+=c,t[2]+=u,t[3]+=l,t[4]+=d,t[5]+=f,t[6]+=h,t[7]+=p,o+=64,i-=64}return o}t.vp=function(e){var t=new i;t.update(e);var n=t.digest();return t.clean(),n}},17309:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},57664:function(e,t,n){"use strict";t.gi=t.Au=t.KS=t.kz=void 0;const r=n(31416),o=n(17309);function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}t.kz=32,t.KS=32;const s=new Uint8Array(32);s[0]=9;const a=i([56129,1]);function c(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function u(e,t,n){const r=~(n-1);for(let o=0;o<16;o++){const n=r&(e[o]^t[o]);e[o]^=n,t[o]^=n}}function l(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function d(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function f(e,t,n){let r,o,i=0,s=0,a=0,c=0,u=0,l=0,d=0,f=0,h=0,p=0,m=0,g=0,y=0,b=0,v=0,w=0,x=0,E=0,_=0,k=0,S=0,I=0,C=0,T=0,A=0,P=0,O=0,j=0,M=0,R=0,B=0,N=n[0],L=n[1],U=n[2],D=n[3],F=n[4],z=n[5],$=n[6],q=n[7],Z=n[8],H=n[9],W=n[10],G=n[11],K=n[12],V=n[13],X=n[14],Y=n[15];r=t[0],i+=r*N,s+=r*L,a+=r*U,c+=r*D,u+=r*F,l+=r*z,d+=r*$,f+=r*q,h+=r*Z,p+=r*H,m+=r*W,g+=r*G,y+=r*K,b+=r*V,v+=r*X,w+=r*Y,r=t[1],s+=r*N,a+=r*L,c+=r*U,u+=r*D,l+=r*F,d+=r*z,f+=r*$,h+=r*q,p+=r*Z,m+=r*H,g+=r*W,y+=r*G,b+=r*K,v+=r*V,w+=r*X,x+=r*Y,r=t[2],a+=r*N,c+=r*L,u+=r*U,l+=r*D,d+=r*F,f+=r*z,h+=r*$,p+=r*q,m+=r*Z,g+=r*H,y+=r*W,b+=r*G,v+=r*K,w+=r*V,x+=r*X,E+=r*Y,r=t[3],c+=r*N,u+=r*L,l+=r*U,d+=r*D,f+=r*F,h+=r*z,p+=r*$,m+=r*q,g+=r*Z,y+=r*H,b+=r*W,v+=r*G,w+=r*K,x+=r*V,E+=r*X,_+=r*Y,r=t[4],u+=r*N,l+=r*L,d+=r*U,f+=r*D,h+=r*F,p+=r*z,m+=r*$,g+=r*q,y+=r*Z,b+=r*H,v+=r*W,w+=r*G,x+=r*K,E+=r*V,_+=r*X,k+=r*Y,r=t[5],l+=r*N,d+=r*L,f+=r*U,h+=r*D,p+=r*F,m+=r*z,g+=r*$,y+=r*q,b+=r*Z,v+=r*H,w+=r*W,x+=r*G,E+=r*K,_+=r*V,k+=r*X,S+=r*Y,r=t[6],d+=r*N,f+=r*L,h+=r*U,p+=r*D,m+=r*F,g+=r*z,y+=r*$,b+=r*q,v+=r*Z,w+=r*H,x+=r*W,E+=r*G,_+=r*K,k+=r*V,S+=r*X,I+=r*Y,r=t[7],f+=r*N,h+=r*L,p+=r*U,m+=r*D,g+=r*F,y+=r*z,b+=r*$,v+=r*q,w+=r*Z,x+=r*H,E+=r*W,_+=r*G,k+=r*K,S+=r*V,I+=r*X,C+=r*Y,r=t[8],h+=r*N,p+=r*L,m+=r*U,g+=r*D,y+=r*F,b+=r*z,v+=r*$,w+=r*q,x+=r*Z,E+=r*H,_+=r*W,k+=r*G,S+=r*K,I+=r*V,C+=r*X,T+=r*Y,r=t[9],p+=r*N,m+=r*L,g+=r*U,y+=r*D,b+=r*F,v+=r*z,w+=r*$,x+=r*q,E+=r*Z,_+=r*H,k+=r*W,S+=r*G,I+=r*K,C+=r*V,T+=r*X,A+=r*Y,r=t[10],m+=r*N,g+=r*L,y+=r*U,b+=r*D,v+=r*F,w+=r*z,x+=r*$,E+=r*q,_+=r*Z,k+=r*H,S+=r*W,I+=r*G,C+=r*K,T+=r*V,A+=r*X,P+=r*Y,r=t[11],g+=r*N,y+=r*L,b+=r*U,v+=r*D,w+=r*F,x+=r*z,E+=r*$,_+=r*q,k+=r*Z,S+=r*H,I+=r*W,C+=r*G,T+=r*K,A+=r*V,P+=r*X,O+=r*Y,r=t[12],y+=r*N,b+=r*L,v+=r*U,w+=r*D,x+=r*F,E+=r*z,_+=r*$,k+=r*q,S+=r*Z,I+=r*H,C+=r*W,T+=r*G,A+=r*K,P+=r*V,O+=r*X,j+=r*Y,r=t[13],b+=r*N,v+=r*L,w+=r*U,x+=r*D,E+=r*F,_+=r*z,k+=r*$,S+=r*q,I+=r*Z,C+=r*H,T+=r*W,A+=r*G,P+=r*K,O+=r*V,j+=r*X,M+=r*Y,r=t[14],v+=r*N,w+=r*L,x+=r*U,E+=r*D,_+=r*F,k+=r*z,S+=r*$,I+=r*q,C+=r*Z,T+=r*H,A+=r*W,P+=r*G,O+=r*K,j+=r*V,M+=r*X,R+=r*Y,r=t[15],w+=r*N,x+=r*L,E+=r*U,_+=r*D,k+=r*F,S+=r*z,I+=r*$,C+=r*q,T+=r*Z,A+=r*H,P+=r*W,O+=r*G,j+=r*K,M+=r*V,R+=r*X,B+=r*Y,i+=38*x,s+=38*E,a+=38*_,c+=38*k,u+=38*S,l+=38*I,d+=38*C,f+=38*T,h+=38*A,p+=38*P,m+=38*O,g+=38*j,y+=38*M,b+=38*R,v+=38*B,o=1,r=i+o+65535,o=Math.floor(r/65536),i=r-65536*o,r=s+o+65535,o=Math.floor(r/65536),s=r-65536*o,r=a+o+65535,o=Math.floor(r/65536),a=r-65536*o,r=c+o+65535,o=Math.floor(r/65536),c=r-65536*o,r=u+o+65535,o=Math.floor(r/65536),u=r-65536*o,r=l+o+65535,o=Math.floor(r/65536),l=r-65536*o,r=d+o+65535,o=Math.floor(r/65536),d=r-65536*o,r=f+o+65535,o=Math.floor(r/65536),f=r-65536*o,r=h+o+65535,o=Math.floor(r/65536),h=r-65536*o,r=p+o+65535,o=Math.floor(r/65536),p=r-65536*o,r=m+o+65535,o=Math.floor(r/65536),m=r-65536*o,r=g+o+65535,o=Math.floor(r/65536),g=r-65536*o,r=y+o+65535,o=Math.floor(r/65536),y=r-65536*o,r=b+o+65535,o=Math.floor(r/65536),b=r-65536*o,r=v+o+65535,o=Math.floor(r/65536),v=r-65536*o,r=w+o+65535,o=Math.floor(r/65536),w=r-65536*o,i+=o-1+37*(o-1),o=1,r=i+o+65535,o=Math.floor(r/65536),i=r-65536*o,r=s+o+65535,o=Math.floor(r/65536),s=r-65536*o,r=a+o+65535,o=Math.floor(r/65536),a=r-65536*o,r=c+o+65535,o=Math.floor(r/65536),c=r-65536*o,r=u+o+65535,o=Math.floor(r/65536),u=r-65536*o,r=l+o+65535,o=Math.floor(r/65536),l=r-65536*o,r=d+o+65535,o=Math.floor(r/65536),d=r-65536*o,r=f+o+65535,o=Math.floor(r/65536),f=r-65536*o,r=h+o+65535,o=Math.floor(r/65536),h=r-65536*o,r=p+o+65535,o=Math.floor(r/65536),p=r-65536*o,r=m+o+65535,o=Math.floor(r/65536),m=r-65536*o,r=g+o+65535,o=Math.floor(r/65536),g=r-65536*o,r=y+o+65535,o=Math.floor(r/65536),y=r-65536*o,r=b+o+65535,o=Math.floor(r/65536),b=r-65536*o,r=v+o+65535,o=Math.floor(r/65536),v=r-65536*o,r=w+o+65535,o=Math.floor(r/65536),w=r-65536*o,i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function h(e,t){f(e,t,t)}function p(e,t){const n=new Uint8Array(32),r=new Float64Array(80),o=i(),s=i(),p=i(),m=i(),g=i(),y=i();for(let i=0;i<31;i++)n[i]=e[i];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(r,t);for(let i=0;i<16;i++)s[i]=r[i];o[0]=m[0]=1;for(let i=254;i>=0;--i){const e=n[i>>>3]>>>(7&i)&1;u(o,s,e),u(p,m,e),l(g,o,p),d(o,o,p),l(p,s,m),d(s,s,m),h(m,g),h(y,o),f(o,p,o),f(p,s,g),l(g,o,p),d(o,o,p),h(s,o),d(p,m,y),f(o,p,a),l(o,o,m),f(p,p,o),f(o,m,y),f(m,s,r),h(s,g),u(o,s,e),u(p,m,e)}for(let i=0;i<16;i++)r[i+16]=o[i],r[i+32]=p[i],r[i+48]=s[i],r[i+64]=m[i];const b=r.subarray(32),v=r.subarray(16);!function(e,t){const n=i();for(let r=0;r<16;r++)n[r]=t[r];for(let r=253;r>=0;r--)h(n,n),2!==r&&4!==r&&f(n,n,t);for(let r=0;r<16;r++)e[r]=n[r]}(b,b),f(v,v,b);const w=new Uint8Array(32);return function(e,t){const n=i(),r=i();for(let o=0;o<16;o++)r[o]=t[o];c(r),c(r),c(r);for(let o=0;o<2;o++){n[0]=r[0]-65517;for(let t=1;t<15;t++)n[t]=r[t]-65535-(n[t-1]>>16&1),n[t-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,u(r,n,1-e)}for(let o=0;o<16;o++)e[2*o]=255&r[o],e[2*o+1]=r[o]>>8}(w,v),w}function m(e){return p(e,s)}function g(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const n=new Uint8Array(e);return{publicKey:m(n),secretKey:n}}t.Au=function(e){const t=(0,r.randomBytes)(32,e),n=g(t);return(0,o.wipe)(t),n},t.gi=function(e,n,r=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(n.length!==t.kz)throw new Error("X25519: incorrect public key length");const o=p(e,n);if(r){let e=0;for(let t=0;t<o.length;t++)e|=o[t];if(0===e)throw new Error("X25519: invalid shared key")}return o}},69528:function(e,t,n){"use strict";const r=n(70610),o=n(44020),i=n(80500),s=n(92806),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function l(e,t){return t.decode?o(e):e}function d(e){return Array.isArray(e)?e.sort():"object"===typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"===typeof n&&n.includes(e.arrayFormatSeparator),i="string"===typeof n&&!o&&l(n,e).includes(e.arrayFormatSeparator);n=i?l(n,e):n;const s=o||i?n.split(e.arrayFormatSeparator).map((t=>l(t,e))):null===n?n:l(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{const o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!o)return void(r[t]=n?l(n,e):n);const i=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>l(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],i):r[t]=i};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;let[e,s]=i(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:l(s,t),n(l(e,t),s,r)}for(const o of Object.keys(r)){const e=r[o];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=p(e[n],t);else r[o]=p(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=d(n):e[t]=n,e}),Object.create(null))}t.extract=h,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>{return t.skipNull&&(null===(r=e[n])||void 0===r)||t.skipEmptyString&&""===e[n];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[",o,"]"].join("")]:[...n,[u(t,e),"[",u(o,e),"]=",u(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[]"].join("")]:[...n,[u(t,e),"[]=",u(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),":list="].join("")]:[...n,[u(t,e),":list=",u(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[u(n,e),t,u(o,e)].join("")]:[[r,u(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,u(t,e)]:[...n,[u(t,e),"=",u(r,e)].join("")]}}(t),o={};for(const s of Object.keys(e))n(s)||(o[s]=e[s]);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map((n=>{const o=e[n];return void 0===o?"":null===o?u(n,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?u(n,t)+"[]":o.reduce(r(n),[]).join("&"):u(n,t)+"="+u(o,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=i(e,"#");return Object.assign({url:n.split("?")[0]||"",query:m(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=f(e.url).split("?")[0]||"",o=t.extract(e.url),i=t.parse(o,{sort:!1}),s=Object.assign(i,e.query);let c=t.stringify(s,n);c&&(c=`?${c}`);let l=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(l=`#${n[a]?u(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${c}${l}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:i,fragmentIdentifier:c}=t.parseUrl(e,r);return t.stringifyUrl({url:o,query:s(i,n),fragmentIdentifier:c},r)},t.exclude=(e,n,r)=>{const o=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,o,r)}},37968:function(e,t,n){"use strict";n.d(t,{iO:function(){return r}});const r={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}}},36900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(46869),t),r.__exportStar(n(88033),t)},46869:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},88033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},66736:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(44273),t),r.__exportStar(n(47001),t),r.__exportStar(n(52939),t),r.__exportStar(n(36900),t)},52939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(30004).__exportStar(n(88766),t)},88766:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},83207:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const r=n(36900);t.toMiliseconds=function(e){return e*r.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/r.ONE_THOUSAND)}},83873:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},44273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(83873),t),r.__exportStar(n(83207),t)},47001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},30004:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return v},__asyncValues:function(){return x},__await:function(){return b},__awaiter:function(){return l},__classPrivateFieldGet:function(){return S},__classPrivateFieldSet:function(){return I},__createBinding:function(){return f},__decorate:function(){return a},__exportStar:function(){return h},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return k},__importStar:function(){return _},__makeTemplateObject:function(){return E},__metadata:function(){return u},__param:function(){return c},__read:function(){return m},__rest:function(){return s},__spread:function(){return g},__spreadArrays:function(){return y},__values:function(){return p}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(a){i=[6,a],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function f(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(r){l(i[0][3],r)}var n}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},62873:function(e,t){"use strict";function n(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){const t=n(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},65755:function(e,t,n){"use strict";t.D=void 0;const r=n(62873);t.D=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(i){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],o=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(o.length&&o){const e=r.getAttribute("content");if(e)return e}}return""}const o=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const o=n[e],i=o.getAttribute("rel");if(i&&i.toLowerCase().indexOf("icon")>-1){const e=o.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:o}}},58162:function(e,t,n){"use strict";var r=n(89509).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),s=i.charCodeAt(0);if(255!==t[s])throw new TypeError(i+" is ambiguous");t[s]=o}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function d(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);for(var n=0,o=0,i=0;e[n]===c;)o++,n++;for(var s=(e.length-n)*u+1>>>0,l=new Uint8Array(s);e[n];){var d=t[e.charCodeAt(n)];if(255===d)return;for(var f=0,h=s-1;(0!==d||f<i)&&-1!==h;h--,f++)d+=a*l[h]>>>0,l[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");i=f,n++}for(var p=s-i;p!==s&&0===l[p];)p++;var m=r.allocUnsafe(o+(s-p));m.fill(0,0,o);for(var g=o;p!==s;)m[g++]=l[p++];return m}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var n=0,o=0,i=0,s=t.length;i!==s&&0===t[i];)i++,n++;for(var u=(s-i)*l+1>>>0,d=new Uint8Array(u);i!==s;){for(var f=t[i],h=0,p=u-1;(0!==f||h<o)&&-1!==p;p--,h++)f+=256*d[p]>>>0,d[p]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");o=h,i++}for(var m=u-o;m!==u&&0===d[m];)m++;for(var g=c.repeat(n);m<u;++m)g+=e.charAt(d[m]);return g},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),s=i[0],a=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=16383,a=0,c=r-o;a<c;a+=s)i.push(u(e,a,a+s>c?c:a+s));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s<a;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,s=[],a=t;a<r;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},40475:function(e,t,n){"use strict";var r=n(48764).Buffer;t.oU=function(e){{const t=r.from(e);t.reverse();const n=t.toString("hex");return 0===n.length?BigInt(0):BigInt(`0x${n}`)}},t.Q5=function(e){{const t=e.toString("hex");return 0===t.length?BigInt(0):BigInt(`0x${t}`)}},t.k$=function(e,t){{const n=e.toString(16),o=r.from(n.padStart(2*t,"0").slice(0,2*t),"hex");return o.reverse(),o}},t.zP=function(e,t){{const n=e.toString(16);return r.from(n.padStart(2*t,"0").slice(0,2*t),"hex")}}},13550:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(46601).Buffer}catch(T){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,o){for(var i=0,s=0,a=Math.min(e.length,n),c=t;c<a;c++){var u=e.charCodeAt(c)-48;i*=o,s=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s<o,"Invalid character"),i+=s}return i}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,n):(this._parseBase(e,t,o),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=e.length-1,i=0;o>=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<e.length;o+=3)s=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,i=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)o=c(e,t,r)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;else for(r=(e.length-t)%2===0?t+1:t;r<e.length;r+=2)o=c(e,t,r)<<i,this.words[s]|=67108863&o,i>=18?(i-=18,s+=1,this.words[s]|=o>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,s=i%r,a=Math.min(i,i-s)+n,c=0,l=n;l<a;l+=r)c=u(e,l,l+r,t),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var d=1;for(c=u(e,l,e.length,t),l=0;l<s;l++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){l(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(T){i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<o|i)).toString(16);i=a>>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==i||s!==this.length-1?f[6-c.length]+c+n:c+n}for(0!==i&&(n=i.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],l=p[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(l).toString(e);n=(d=d.idivn(l)).isZero()?m+n:f[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],s=o*i,a=67108863&s,c=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(s=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&s}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===i?(n<e.length&&(e[n++]=s>>24&255),r=0,i=0):(r=s>>>24,i+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,o=0,i=0;o<this.length;o++){var s=this.words[o]<<i|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===i?(n>=0&&(e[n--]=s>>24&255),r=0,i=0):(r=s>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i<r.length;i++)t=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<n.length;i++)t=(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)i=(t=(0|n.words[s])-(0|r.words[s])+i)>>26,this.words[s]=67108863&t;for(;0!==i&&s<n.length;s++)i=(t=(0|n.words[s])+i)>>26,this.words[s]=67108863&t;if(0===i&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,o,i,s=e.words,a=t.words,c=n.words,u=0,l=0|s[0],d=8191&l,f=l>>>13,h=0|s[1],p=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,x=v>>>13,E=0|s[4],_=8191&E,k=E>>>13,S=0|s[5],I=8191&S,C=S>>>13,T=0|s[6],A=8191&T,P=T>>>13,O=0|s[7],j=8191&O,M=O>>>13,R=0|s[8],B=8191&R,N=R>>>13,L=0|s[9],U=8191&L,D=L>>>13,F=0|a[0],z=8191&F,$=F>>>13,q=0|a[1],Z=8191&q,H=q>>>13,W=0|a[2],G=8191&W,K=W>>>13,V=0|a[3],X=8191&V,Y=V>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,oe=0|a[6],ie=8191&oe,se=oe>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],de=8191&le,fe=le>>>13,he=0|a[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(d,z))|0)+((8191&(o=(o=Math.imul(d,$))+Math.imul(f,z)|0))<<13)|0;u=((i=Math.imul(f,$))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,z),o=(o=Math.imul(p,$))+Math.imul(m,z)|0,i=Math.imul(m,$);var ye=(u+(r=r+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,H)|0)+Math.imul(f,Z)|0))<<13)|0;u=((i=i+Math.imul(f,H)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),o=(o=Math.imul(y,$))+Math.imul(b,z)|0,i=Math.imul(b,$),r=r+Math.imul(p,Z)|0,o=(o=o+Math.imul(p,H)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,H)|0;var be=(u+(r=r+Math.imul(d,G)|0)|0)+((8191&(o=(o=o+Math.imul(d,K)|0)+Math.imul(f,G)|0))<<13)|0;u=((i=i+Math.imul(f,K)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,z),o=(o=Math.imul(w,$))+Math.imul(x,z)|0,i=Math.imul(x,$),r=r+Math.imul(y,Z)|0,o=(o=o+Math.imul(y,H)|0)+Math.imul(b,Z)|0,i=i+Math.imul(b,H)|0,r=r+Math.imul(p,G)|0,o=(o=o+Math.imul(p,K)|0)+Math.imul(m,G)|0,i=i+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(o=(o=o+Math.imul(d,Y)|0)+Math.imul(f,X)|0))<<13)|0;u=((i=i+Math.imul(f,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,z),o=(o=Math.imul(_,$))+Math.imul(k,z)|0,i=Math.imul(k,$),r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,H)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,H)|0,r=r+Math.imul(y,G)|0,o=(o=o+Math.imul(y,K)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,K)|0,r=r+Math.imul(p,X)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,Y)|0;var we=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;u=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(I,z),o=(o=Math.imul(I,$))+Math.imul(C,z)|0,i=Math.imul(C,$),r=r+Math.imul(_,Z)|0,o=(o=o+Math.imul(_,H)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,H)|0,r=r+Math.imul(w,G)|0,o=(o=o+Math.imul(w,K)|0)+Math.imul(x,G)|0,i=i+Math.imul(x,K)|0,r=r+Math.imul(y,X)|0,o=(o=o+Math.imul(y,Y)|0)+Math.imul(b,X)|0,i=i+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;u=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(A,z),o=(o=Math.imul(A,$))+Math.imul(P,z)|0,i=Math.imul(P,$),r=r+Math.imul(I,Z)|0,o=(o=o+Math.imul(I,H)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,H)|0,r=r+Math.imul(_,G)|0,o=(o=o+Math.imul(_,K)|0)+Math.imul(k,G)|0,i=i+Math.imul(k,K)|0,r=r+Math.imul(w,X)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(x,X)|0,i=i+Math.imul(x,Y)|0,r=r+Math.imul(y,Q)|0,o=(o=o+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,re)|0;var Ee=(u+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,se)|0)+Math.imul(f,ie)|0))<<13)|0;u=((i=i+Math.imul(f,se)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,z),o=(o=Math.imul(j,$))+Math.imul(M,z)|0,i=Math.imul(M,$),r=r+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,H)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,H)|0,r=r+Math.imul(I,G)|0,o=(o=o+Math.imul(I,K)|0)+Math.imul(C,G)|0,i=i+Math.imul(C,K)|0,r=r+Math.imul(_,X)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(k,X)|0,i=i+Math.imul(k,Y)|0,r=r+Math.imul(w,Q)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,o=(o=o+Math.imul(y,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,se)|0;var _e=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(o=(o=o+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((i=i+Math.imul(f,ue)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(B,z),o=(o=Math.imul(B,$))+Math.imul(N,z)|0,i=Math.imul(N,$),r=r+Math.imul(j,Z)|0,o=(o=o+Math.imul(j,H)|0)+Math.imul(M,Z)|0,i=i+Math.imul(M,H)|0,r=r+Math.imul(A,G)|0,o=(o=o+Math.imul(A,K)|0)+Math.imul(P,G)|0,i=i+Math.imul(P,K)|0,r=r+Math.imul(I,X)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(C,X)|0,i=i+Math.imul(C,Y)|0,r=r+Math.imul(_,Q)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(x,ne)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(y,ie)|0,o=(o=o+Math.imul(y,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0,r=r+Math.imul(p,ce)|0,o=(o=o+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,i=i+Math.imul(m,ue)|0;var ke=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(U,z),o=(o=Math.imul(U,$))+Math.imul(D,z)|0,i=Math.imul(D,$),r=r+Math.imul(B,Z)|0,o=(o=o+Math.imul(B,H)|0)+Math.imul(N,Z)|0,i=i+Math.imul(N,H)|0,r=r+Math.imul(j,G)|0,o=(o=o+Math.imul(j,K)|0)+Math.imul(M,G)|0,i=i+Math.imul(M,K)|0,r=r+Math.imul(A,X)|0,o=(o=o+Math.imul(A,Y)|0)+Math.imul(P,X)|0,i=i+Math.imul(P,Y)|0,r=r+Math.imul(I,Q)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(C,Q)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,re)|0)+Math.imul(k,ne)|0,i=i+Math.imul(k,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,se)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,se)|0,r=r+Math.imul(y,ce)|0,o=(o=o+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,fe)|0;var Se=(u+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;u=((i=i+Math.imul(f,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(U,Z),o=(o=Math.imul(U,H))+Math.imul(D,Z)|0,i=Math.imul(D,H),r=r+Math.imul(B,G)|0,o=(o=o+Math.imul(B,K)|0)+Math.imul(N,G)|0,i=i+Math.imul(N,K)|0,r=r+Math.imul(j,X)|0,o=(o=o+Math.imul(j,Y)|0)+Math.imul(M,X)|0,i=i+Math.imul(M,Y)|0,r=r+Math.imul(A,Q)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,r=r+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,re)|0)+Math.imul(C,ne)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(_,ie)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,se)|0,r=r+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(y,de)|0,o=(o=o+Math.imul(y,fe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,fe)|0;var Ie=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(U,G),o=(o=Math.imul(U,K))+Math.imul(D,G)|0,i=Math.imul(D,K),r=r+Math.imul(B,X)|0,o=(o=o+Math.imul(B,Y)|0)+Math.imul(N,X)|0,i=i+Math.imul(N,Y)|0,r=r+Math.imul(j,Q)|0,o=(o=o+Math.imul(j,ee)|0)+Math.imul(M,Q)|0,i=i+Math.imul(M,ee)|0,r=r+Math.imul(A,ne)|0,o=(o=o+Math.imul(A,re)|0)+Math.imul(P,ne)|0,i=i+Math.imul(P,re)|0,r=r+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,se)|0,r=r+Math.imul(_,ce)|0,o=(o=o+Math.imul(_,ue)|0)+Math.imul(k,ce)|0,i=i+Math.imul(k,ue)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,fe)|0;var Ce=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(o=(o=o+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;u=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,X),o=(o=Math.imul(U,Y))+Math.imul(D,X)|0,i=Math.imul(D,Y),r=r+Math.imul(B,Q)|0,o=(o=o+Math.imul(B,ee)|0)+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,r=r+Math.imul(j,ne)|0,o=(o=o+Math.imul(j,re)|0)+Math.imul(M,ne)|0,i=i+Math.imul(M,re)|0,r=r+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,se)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,se)|0,r=r+Math.imul(I,ce)|0,o=(o=o+Math.imul(I,ue)|0)+Math.imul(C,ce)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(_,de)|0,o=(o=o+Math.imul(_,fe)|0)+Math.imul(k,de)|0,i=i+Math.imul(k,fe)|0;var Te=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((i=i+Math.imul(x,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(U,Q),o=(o=Math.imul(U,ee))+Math.imul(D,Q)|0,i=Math.imul(D,ee),r=r+Math.imul(B,ne)|0,o=(o=o+Math.imul(B,re)|0)+Math.imul(N,ne)|0,i=i+Math.imul(N,re)|0,r=r+Math.imul(j,ie)|0,o=(o=o+Math.imul(j,se)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,se)|0,r=r+Math.imul(A,ce)|0,o=(o=o+Math.imul(A,ue)|0)+Math.imul(P,ce)|0,i=i+Math.imul(P,ue)|0,r=r+Math.imul(I,de)|0,o=(o=o+Math.imul(I,fe)|0)+Math.imul(C,de)|0,i=i+Math.imul(C,fe)|0;var Ae=(u+(r=r+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,me)|0)+Math.imul(k,pe)|0))<<13)|0;u=((i=i+Math.imul(k,me)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(U,ne),o=(o=Math.imul(U,re))+Math.imul(D,ne)|0,i=Math.imul(D,re),r=r+Math.imul(B,ie)|0,o=(o=o+Math.imul(B,se)|0)+Math.imul(N,ie)|0,i=i+Math.imul(N,se)|0,r=r+Math.imul(j,ce)|0,o=(o=o+Math.imul(j,ue)|0)+Math.imul(M,ce)|0,i=i+Math.imul(M,ue)|0,r=r+Math.imul(A,de)|0,o=(o=o+Math.imul(A,fe)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,fe)|0;var Pe=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,me)|0)+Math.imul(C,pe)|0))<<13)|0;u=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(U,ie),o=(o=Math.imul(U,se))+Math.imul(D,ie)|0,i=Math.imul(D,se),r=r+Math.imul(B,ce)|0,o=(o=o+Math.imul(B,ue)|0)+Math.imul(N,ce)|0,i=i+Math.imul(N,ue)|0,r=r+Math.imul(j,de)|0,o=(o=o+Math.imul(j,fe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,fe)|0;var Oe=(u+(r=r+Math.imul(A,pe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(P,pe)|0))<<13)|0;u=((i=i+Math.imul(P,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,ce),o=(o=Math.imul(U,ue))+Math.imul(D,ce)|0,i=Math.imul(D,ue),r=r+Math.imul(B,de)|0,o=(o=o+Math.imul(B,fe)|0)+Math.imul(N,de)|0,i=i+Math.imul(N,fe)|0;var je=(u+(r=r+Math.imul(j,pe)|0)|0)+((8191&(o=(o=o+Math.imul(j,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((i=i+Math.imul(M,me)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(U,de),o=(o=Math.imul(U,fe))+Math.imul(D,de)|0,i=Math.imul(D,fe);var Me=(u+(r=r+Math.imul(B,pe)|0)|0)+((8191&(o=(o=o+Math.imul(B,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((i=i+Math.imul(N,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863;var Re=(u+(r=Math.imul(U,pe))|0)+((8191&(o=(o=Math.imul(U,me))+Math.imul(D,pe)|0))<<13)|0;return u=((i=Math.imul(D,me))+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=Ee,c[7]=_e,c[8]=ke,c[9]=Se,c[10]=Ie,c[11]=Ce,c[12]=Te,c[13]=Ae,c[14]=Pe,c[15]=Oe,c[16]=je,c[17]=Me,c[18]=Re,0!==u&&(c[19]=u,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var s=o;o=0;for(var a=67108863&r,c=Math.min(i,t.length-1),u=Math.max(0,i-e.length+1);u<=c;u++){var l=i-u,d=(0|e.words[l])*(0|t.words[u]),f=67108863&d;a=67108863&(f=f+a|0),o+=(s=(s=s+(d/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[i]=a,r=s,s=o}return 0!==r?n.words[i]=r:n.length--,n._strip()}function b(e,t,n){return y(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},v.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,o=0;o<t;o++)r|=(1&e)<<t-o-1,e>>=1;return r},v.prototype.permute=function(e,t,n,r,o,i){for(var s=0;s<i;s++)r[s]=t[e[s]],o[s]=n[e[s]]},v.prototype.transform=function(e,t,n,r,o,i){this.permute(i,e,t,n,r,o);for(var s=1;s<o;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),l=0;l<o;l+=a)for(var d=c,f=u,h=0;h<s;h++){var p=n[l+h],m=r[l+h],g=n[l+h+s],y=r[l+h+s],b=d*g-f*y;y=d*y+f*g,g=b,n[l+h]=p+g,r[l+h]=m+y,n[l+h+s]=p-g,r[l+h+s]=m-y,h!==a&&(b=c*d-u*f,f=c*f+u*d,d=b)}},v.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,o=0;for(n=n/2|0;n;n>>>=1)o++;return 1<<o+1+r},v.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var o=e[r];e[r]=e[n-r-1],e[n-r-1]=o,o=t[r],t[r]=-t[n-r-1],t[n-r-1]=-o}},v.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var o=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&o,n=o<67108864?0:o/67108864|0}return e},v.prototype.convert13b=function(e,t,n,o){for(var i=0,s=0;s<t;s++)i+=0|e[s],n[2*s]=8191&i,i>>>=13,n[2*s+1]=8191&i,i>>>=13;for(s=2*t;s<o;++s)n[s]=0;r(0===i),r(0===(-8192&i))},v.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},v.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),i=this.stub(r),s=new Array(r),a=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,i,a,c,r,o),this.transform(u,i,l,d,r,o);for(var h=0;h<r;h++){var p=a[h]*l[h]-c[h]*d[h];c[h]=a[h]*d[h]+c[h]*l[h],a[h]=p}return this.conjugate(a,c,r),this.transform(a,c,f,i,r,o),this.conjugate(f,i,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),b(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"===typeof e),r(e<67108864);for(var n=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,s=(67108863&i)+(67108863&n);n>>=26,n+=i/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){r("number"===typeof e&&e>=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&i,c=(0|this.words[t])-a<<n;this.words[t]=c|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var o;r("number"===typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,c=n;if(o-=s,o=Math.max(0,o),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=o);u--){var d=0|this.words[u];this.words[u]=l<<26-i|d>>>i,l=d&a}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<<t;return!(this.length<=n)&&!!(this.words[n]&o)},i.prototype.imaskn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"===typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var o,i,s=e.length+n;this._expand(s);var a=0;for(o=0;o<e.length;o++){i=(0|this.words[o+n])+a;var c=(0|e.words[o])*t;a=((i-=67108863&c)>>26)-(c/67108864|0),this.words[o+n]=67108863&i}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this._strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!==(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,c=r.length-o.length;if("mod"!==t){(a=new i(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var l=r.clone()._ishlnsubmul(o,1,c);0===l.negative&&(r=l,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=f)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(l),s.isub(d)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(l),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(c)):(n.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var d=0,f=1;0===(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,o=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a}return 0!==i&&(this.words[s]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){r<o?t=-1:r>o&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new I(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},o(E,x),E.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o<r;o++)t.words[o]=e.words[o];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&n,o=10;o<e.length;o++){var s=0|e.words[o];e.words[o-10]=(s&n)<<4|i>>>22,i=s}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},o(_,x),o(k,x),o(S,x),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,o=67108863&r;r>>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return w[e]=t,t},I.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},I.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new i(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(y),d=y.redSqr(),h=h.redMul(d),p=g}return f},I.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},I.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==s?(s<<=1,s|=d,(4===++a||0===r&&0===l)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}c=26}return o},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},o(C,I),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},25532:function(e,t,n){"use strict";var r=n(48764).Buffer,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;const u=c(n(13550)),l=c(n(77191)),d=a(n(21127)),f=new("function"!==typeof TextDecoder?d.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"===typeof e&&(e=r.from(e,"utf8")),l.default.encode(r.from(e))},t.baseDecode=function(e){return r.from(l.default.decode(e))};const h=1024;class p extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=p;class m{constructor(){this.buf=r.alloc(h),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=r.concat([this.buf,r.alloc(h)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(r.from(new u.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(r.from(new u.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(r.from(new u.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(r.from(new u.default(e).toArray("le",64)))}writeBuffer(e){this.buf=r.concat([r.from(this.buf.subarray(0,this.length)),e,r.alloc(h)]),this.length+=e.length}writeString(e){this.maybeResize();const t=r.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(r.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function g(e,t,n){const r=n.value;n.value=function(...e){try{return r.apply(this,e)}catch(t){if(t instanceof RangeError){const e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new p("Reached the end of buffer when deserializing")}throw t}}}t.BinaryWriter=m;class y{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new u.default(e,"le")}readU128(){const e=this.readBuffer(16);return new u.default(e,"le")}readU256(){const e=this.readBuffer(32);return new u.default(e,"le")}readU512(){const e=this.readBuffer(64);return new u.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new p(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return f.decode(t)}catch(n){throw new p(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let r=0;r<t;++r)n.push(e());return n}}function b(e){return e.charAt(0).toUpperCase()+e.slice(1)}function v(e,t,n,r,o){try{if("string"===typeof r)o[`write${b(r)}`](n);else if(r instanceof Array)if("number"===typeof r[0]){if(n.length!==r[0])throw new p(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);o.writeFixedArray(n)}else if(2===r.length&&"number"===typeof r[1]){if(n.length!==r[1])throw new p(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let t=0;t<r[1];t++)v(e,null,n[t],r[0],o)}else o.writeArray(n,(n=>{v(e,t,n,r[0],o)}));else if(void 0!==r.kind)switch(r.kind){case"option":null===n||void 0===n?o.writeU8(0):(o.writeU8(1),v(e,t,n,r.type,o));break;case"map":o.writeU32(n.size),n.forEach(((n,i)=>{v(e,t,i,r.key,o),v(e,t,n,r.value,o)}));break;default:throw new p(`FieldType ${r} unrecognized`)}else w(e,n,o)}catch(i){throw i instanceof p&&i.addToFieldPath(t),i}}function w(e,t,n){if("function"===typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new p(`Class ${t.constructor.name} is missing in schema`);if("struct"===r.kind)r.fields.map((([r,o])=>{v(e,r,t[r],o,n)}));else{if("enum"!==r.kind)throw new p(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`);{const o=t[r.field];for(let i=0;i<r.values.length;++i){const[s,a]=r.values[i];if(s===o){n.writeU8(i),v(e,s,t[s],a,n);break}}}}}function x(e,t,n,r){try{if("string"===typeof n)return r[`read${b(n)}`]();if(n instanceof Array){if("number"===typeof n[0])return r.readFixedArray(n[0]);if("number"===typeof n[1]){const t=[];for(let o=0;o<n[1];o++)t.push(x(e,null,n[0],r));return t}return r.readArray((()=>x(e,t,n[0],r)))}if("option"===n.kind){return r.readU8()?x(e,t,n.type,r):void 0}if("map"===n.kind){let o=new Map;const i=r.readU32();for(let s=0;s<i;s++){const i=x(e,t,n.key,r),s=x(e,t,n.value,r);o.set(i,s)}return o}return E(e,n,r)}catch(o){throw o instanceof p&&o.addToFieldPath(t),o}}function E(e,t,n){if("function"===typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new p(`Class ${t.name} is missing in schema`);if("struct"===r.kind){const r={};for(const[o,i]of e.get(t).fields)r[o]=x(e,o,i,n);return new t(r)}if("enum"===r.kind){const o=n.readU8();if(o>=r.values.length)throw new p(`Enum index: ${o} is out of range`);const[i,s]=r.values[o];return new t({[i]:x(e,i,s,n)})}throw new p(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`)}s([g],y.prototype,"readU8",null),s([g],y.prototype,"readU16",null),s([g],y.prototype,"readU32",null),s([g],y.prototype,"readU64",null),s([g],y.prototype,"readU128",null),s([g],y.prototype,"readU256",null),s([g],y.prototype,"readU512",null),s([g],y.prototype,"readString",null),s([g],y.prototype,"readFixedArray",null),s([g],y.prototype,"readArray",null),t.BinaryReader=y,t.serialize=function(e,t,n=m){const r=new n;return w(e,t,r),r.toArray()},t.deserialize=function(e,t,n,r=y){const o=new r(n),i=E(e,t,o);if(o.offset<n.length)throw new p(`Unexpected ${n.length-o.offset} bytes after deserialized data`);return i},t.deserializeUnchecked=function(e,t,n,r=y){return E(e,t,new r(n))}},77191:function(e,t,n){var r=n(58162);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},20698:function(e,t,n){"use strict";var r=n(48764).Buffer;class o{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}decode(e,t){throw new Error("Layout is abstract")}encode(e,t,n){throw new Error("Layout is abstract")}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function i(e,t){return t.property?e+"["+t.property+"]":e}t.Layout=o,t.nameWithProperty=i,t.bindConstructorLayout=function(e,t){if("function"!==typeof e)throw new TypeError("Class must be constructor");if(e.hasOwnProperty("layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof o))throw new TypeError("layout must be a Layout");if(t.hasOwnProperty("boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value:function(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:function(e,n){return t.decode(e,n)},writable:!0})};class s extends o{isCount(){throw new Error("ExternalLayout is abstract")}}class a extends s{constructor(e,t){if(void 0===e&&(e=1),!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t){void 0===t&&(t=0);const n=e.length-t;return Math.floor(n/this.elementSpan)}encode(e,t,n){return 0}}class c extends s{constructor(e,t,n){if(!(e instanceof o))throw new TypeError("layout must be a Layout");if(void 0===t)t=0;else if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof u||this.layout instanceof l}decode(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}encode(e,t,n){return void 0===n&&(n=0),this.layout.encode(e,t,n+this.offset)}}class u extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeUIntLE(e,n,this.span),this.span}}class l extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeUIntBE(e,n,this.span),this.span}}class d extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readIntLE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeIntLE(e,n,this.span),this.span}}class f extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readIntBE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeIntBE(e,n,this.span),this.span}}const h=Math.pow(2,32);function p(e){const t=Math.floor(e/h);return{hi32:t,lo32:e-t*h}}function m(e,t){return e*h+t}class g extends o{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);const n=e.readUInt32LE(t);return m(e.readUInt32LE(t+4),n)}encode(e,t,n){void 0===n&&(n=0);const r=p(e);return t.writeUInt32LE(r.lo32,n),t.writeUInt32LE(r.hi32,n+4),8}}class y extends o{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);return m(e.readUInt32BE(t),e.readUInt32BE(t+4))}encode(e,t,n){void 0===n&&(n=0);const r=p(e);return t.writeUInt32BE(r.hi32,n),t.writeUInt32BE(r.lo32,n+4),8}}class b extends o{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);const n=e.readUInt32LE(t);return m(e.readInt32LE(t+4),n)}encode(e,t,n){void 0===n&&(n=0);const r=p(e);return t.writeUInt32LE(r.lo32,n),t.writeInt32LE(r.hi32,n+4),8}}class v extends o{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);return m(e.readInt32BE(t),e.readUInt32BE(t+4))}encode(e,t,n){void 0===n&&(n=0);const r=p(e);return t.writeInt32BE(r.hi32,n),t.writeUInt32BE(r.lo32,n+4),8}}class w extends o{constructor(e){super(4,e)}decode(e,t){return void 0===t&&(t=0),e.readFloatLE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeFloatLE(e,n),4}}class x extends o{constructor(e){super(4,e)}decode(e,t){return void 0===t&&(t=0),e.readFloatBE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeFloatBE(e,n),4}}class E extends o{constructor(e){super(8,e)}decode(e,t){return void 0===t&&(t=0),e.readDoubleLE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeDoubleLE(e,n),8}}class _ extends o{constructor(e){super(8,e)}decode(e,t){return void 0===t&&(t=0),e.readDoubleBE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeDoubleBE(e,n),8}}class k extends o{constructor(e,t,n){if(!(e instanceof o))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof s&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let r=-1;!(t instanceof s)&&0<e.span&&(r=t*e.span),super(r,n),this.elementLayout=e,this.count=t}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0,r=this.count;if(r instanceof s&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let o=0;for(;o<r;)n+=this.elementLayout.getSpan(e,t+n),++o}return n}decode(e,t){void 0===t&&(t=0);const n=[];let r=0,o=this.count;for(o instanceof s&&(o=o.decode(e,t));r<o;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n){void 0===n&&(n=0);const r=this.elementLayout,o=e.reduce(((e,o)=>e+r.encode(o,t,n+e)),0);return this.count instanceof s&&this.count.encode(e.length,t,n),o}}class S extends o{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce(((e,t)=>e&&t instanceof o),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof t&&void 0===n&&(n=t,t=void 0);for(const o of e)if(0>o.span&&void 0===o.property)throw new Error("fields cannot contain unnamed variable-length layout");let r=-1;try{r=e.reduce(((e,t)=>e+t.getSpan()),0)}catch(i){}super(r,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0;try{n=this.fields.reduce(((n,r)=>{const o=r.getSpan(e,t);return t+=o,n+o}),0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,t){void 0===t&&(t=0);const n=this.makeDestinationObject();for(const r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return n}encode(e,t,n){void 0===n&&(n=0);const r=n;let o=0,i=0;for(const s of this.fields){let r=s.span;if(i=0<r?r:0,void 0!==s.property){const o=e[s.property];void 0!==o&&(i=s.encode(o,t,n),0>r&&(r=s.getSpan(t,n)))}o=n,n+=r}return o+i-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!==typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}class I{constructor(e){this.property=e}decode(){throw new Error("UnionDiscriminator is abstract")}encode(){throw new Error("UnionDiscriminator is abstract")}}class C extends I{constructor(e,t){if(!(e instanceof s&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}class T extends o{constructor(e,t,n){const r=e instanceof u||e instanceof l;if(r)e=new C(new c(e));else if(e instanceof s&&e.isCount())e=new C(e);else if(!(e instanceof I))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===t&&(t=null),!(null===t||t instanceof o))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let i=-1;t&&(i=t.span,0<=i&&r&&(i+=e.layout.span)),super(i,n),this.discriminator=e,this.usesPrefixDiscriminator=r,this.defaultLayout=t,this.registry={};let a=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return a(e)},this.configGetSourceVariant=function(e){a=e.bind(this)}}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(e.hasOwnProperty(n.property))return n}throw new Error("unable to infer src variant")}decode(e,t){let n;void 0===t&&(t=0);const r=this.discriminator,o=r.decode(e,t);let i=this.registry[o];if(void 0===i){let s=0;i=this.defaultLayout,this.usesPrefixDiscriminator&&(s=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=this.defaultLayout.decode(e,t+s)}else n=i.decode(e,t);return n}encode(e,t,n){void 0===n&&(n=0);const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(e[r.property],t,n),i+o.encode(e[o.property],t,n+i)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new A(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t){let n=e;return r.isBuffer(e)&&(void 0===t&&(t=0),n=this.discriminator.decode(e,t)),this.registry[n]}}class A extends o{constructor(e,t,n,r){if(!(e instanceof T))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof o))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}let i=e.span;0>e.span&&(i=n?n.span:0,0<=i&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span)),super(i,r),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(e,t+n)}decode(e,t){const n=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n){void 0===n&&(n=0);let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let o=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),o+=this.layout.getSpan(t,n+r),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function P(e){return 0>e&&(e+=4294967296),e}class O extends o{constructor(e,t,n){if(!(e instanceof u||e instanceof l))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof t&&void 0===n&&(n=t,t=void 0),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this._packedSetValue=function(e){return r=P(e),this},this._packedGetValue=function(){return r}}decode(e,t){const n=this.makeDestinationObject();void 0===t&&(t=0);const r=this.word.decode(e,t);this._packedSetValue(r);for(const o of this.fields)void 0!==o.property&&(n[o.property]=o.decode(r));return n}encode(e,t,n){void 0===n&&(n=0);const r=this.word.decode(t,n);this._packedSetValue(r);for(const o of this.fields)if(void 0!==o.property){const t=e[o.property];void 0!==t&&o.encode(t)}return this.word.encode(this._packedGetValue(),t,n)}addField(e,t){const n=new j(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new M(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}class j{constructor(e,t,n){if(!(e instanceof O))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,o=e.fields.reduce(((e,t)=>e+t.bits),0);if(t+o>r)throw new Error("bits too long for span remainder ("+(r-o)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=o,this.container.msb&&(this.start=r-o-t),this.wordMask=P(this.valueMask<<this.start),this.property=n}decode(){return P(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if(!Number.isInteger(e)||e!==P(e&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container._packedGetValue(),n=P(e<<this.start);this.container._packedSetValue(P(t&~this.wordMask)|n)}}class M extends j{constructor(e,t){super(e,1,t)}decode(e,t){return!!j.prototype.decode.call(this,e,t)}encode(e){return"boolean"===typeof e&&(e=+e),j.prototype.encode.call(this,e)}}class R extends o{constructor(e,t){if(!(e instanceof s&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof s||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t){void 0===t&&(t=0);let n=this.span;return 0>n&&(n=this.length.decode(e,t)),e.slice(t,t+n)}encode(e,t,n){let o=this.length;if(this.length instanceof s&&(o=e.length),!r.isBuffer(e)||o!==e.length)throw new TypeError(i("Blob.encode",this)+" requires (length "+o+") Buffer as src");if(n+o>t.length)throw new RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),n,o,"hex"),this.length instanceof s&&this.length.encode(o,t,n),o}}class B extends o{constructor(e){super(-1,e)}getSpan(e,t){if(!r.isBuffer(e))throw new TypeError("b must be a Buffer");void 0===t&&(t=0);let n=t;for(;n<e.length&&0!==e[n];)n+=1;return 1+n-t}decode(e,t,n){void 0===t&&(t=0);let r=this.getSpan(e,t);return e.slice(t,t+r-1).toString("utf-8")}encode(e,t,n){void 0===n&&(n=0),"string"!==typeof e&&(e=e.toString());const o=new r(e,"utf8"),i=o.length;if(n+i>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(t,n),t[n+i]=0,i+1}}class N extends o{constructor(e,t){if("string"===typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t){if(!r.isBuffer(e))throw new TypeError("b must be a Buffer");return void 0===t&&(t=0),e.length-t}decode(e,t,n){void 0===t&&(t=0);let r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return e.slice(t,t+r).toString("utf-8")}encode(e,t,n){void 0===n&&(n=0),"string"!==typeof e&&(e=e.toString());const o=new r(e,"utf8"),i=o.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(n+i>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(t,n),i}}class L extends o{constructor(e,t){super(0,t),this.value=e}decode(e,t,n){return this.value}encode(e,t,n){return 0}}t.ExternalLayout=s,t.GreedyCount=a,t.OffsetLayout=c,t.UInt=u,t.UIntBE=l,t.Int=d,t.IntBE=f,t.Float=w,t.FloatBE=x,t.Double=E,t.DoubleBE=_,t.Sequence=k,t.Structure=S,t.UnionDiscriminator=I,t.UnionLayoutDiscriminator=C,t.Union=T,t.VariantLayout=A,t.BitStructure=O,t.BitField=j,t.Boolean=M,t.Blob=R,t.CString=B,t.UTF8=N,t.Constant=L,t.greedy=(e,t)=>new a(e,t),t.offset=(e,t,n)=>new c(e,t,n),t.u8=e=>new u(1,e),t.u16=e=>new u(2,e),t.u24=e=>new u(3,e),t.u32=e=>new u(4,e),t.u40=e=>new u(5,e),t.u48=e=>new u(6,e),t.nu64=e=>new g(e),t.u16be=e=>new l(2,e),t.u24be=e=>new l(3,e),t.u32be=e=>new l(4,e),t.u40be=e=>new l(5,e),t.u48be=e=>new l(6,e),t.nu64be=e=>new y(e),t.s8=e=>new d(1,e),t.s16=e=>new d(2,e),t.s24=e=>new d(3,e),t.s32=e=>new d(4,e),t.s40=e=>new d(5,e),t.s48=e=>new d(6,e),t.ns64=e=>new b(e),t.s16be=e=>new f(2,e),t.s24be=e=>new f(3,e),t.s32be=e=>new f(4,e),t.s40be=e=>new f(5,e),t.s48be=e=>new f(6,e),t.ns64be=e=>new v(e),t.f32=e=>new w(e),t.f32be=e=>new x(e),t.f64=e=>new E(e),t.f64be=e=>new _(e),t.struct=(e,t,n)=>new S(e,t,n),t.bits=(e,t,n)=>new O(e,t,n),t.seq=(e,t,n)=>new k(e,t,n),t.union=(e,t,n)=>new T(e,t,n),t.unionLayoutDiscriminator=(e,t)=>new C(e,t),t.blob=(e,t)=>new R(e,t),t.cstr=e=>new B(e),t.utf8=(e,t)=>new N(e,t),t.const=(e,t)=>new L(e,t)},48764:function(e,t,n){"use strict";const r=n(79742),o=n(80645),i="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=a(n);const o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const o=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||X(e.length)?a(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),a(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(o)return r?-1:W(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){let i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let r=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function w(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(X(r))return s;e[n+s]=r}return s}function x(e,t,n,r){return K(W(t,e.length-n),e,n,r)}function E(e,t,n,r){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return K(G(t),e,n,r)}function k(e,t,n,r){return K(function(e,t){let n,r,o;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(o+s<=n){let n,r,a,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128===(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128===(192&n)&&128===(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],a=e[o+3],128===(192&n)&&128===(192&r)&&128===(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=s}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?a(e):void 0!==t?"string"===typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(V(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(V(t,Uint8Array))o+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,o){if(V(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(i,s),u=this.slice(r,o),l=e.slice(t,n);for(let c=0;c<a;++c)if(u[c]!==l[c]){i=u[c],s=l[c];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function A(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function P(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let i=t;i<n;++i)o+=Y[e[i]];return o}function O(e,t,n){const r=e.slice(t,n);let o="";for(let i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function j(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,o){$(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function B(e,t,n,r,o){$(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function N(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,i){return t=+t,n>>>=0,i||N(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return t=+t,n>>>=0,i||N(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Z(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){M(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){M(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let o=0,i=1,s=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let o=n-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const o=r-n;return this===e&&"function"===typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},c.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"===typeof e?e&=255:"boolean"===typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o<n;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=i[o%s]}return this};const D={};function F(e,t,n){D[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function z(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function $(e,t,n,r,o,i){if(e>n||e<t){const r="bigint"===typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Z(t,e.length-(n+1))}(r,o,i)}function q(e,t){if("number"!==typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function Z(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=z(String(n)):"bigint"===typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=z(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function W(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function K(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!==e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function J(e){return"undefined"===typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},86010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}n.r(t),n.d(t,{clsx:function(){return o}}),t.default=o},11227:function(e,t,n){var r=n(34155);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!==typeof r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(82447)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},82447:function(e,t,n){e.exports=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!==typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"===typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"===typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+("undefined"===typeof n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"===typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(57824),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n)||[];return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},o=r.exec(e);o;){try{n[o[0]]=decodeURIComponent(o[0])}catch(t){var s=i(o[0]);s!==o[0]&&(n[o[0]]=s)}o=r.exec(e)}n["%C2"]="\ufffd";for(var a=Object.keys(n),c=0;c<a.length;c++){var u=a[c];e=e.replace(new RegExp(u,"g"),n[u])}return e}(e)}}},65987:function(e){"use strict";var t={single_source_shortest_paths:function(e,n,r){var o={},i={};i[n]=0;var s,a,c,u,l,d,f,h=t.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(c in a=(s=h.pop()).value,u=s.cost,l=e[a]||{})l.hasOwnProperty(c)&&(d=u+l[c],f=i[c],("undefined"===typeof i[c]||f>d)&&(i[c]=d,h.push(c,d),o[c]=a));if("undefined"!==typeof r&&"undefined"===typeof i[r]){var p=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},62378:function(e){"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var o=e.charCodeAt(r);if(o>=55296&&o<=56319&&n>r+1){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(o=1024*(o-55296)+i-56320+65536,r+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},26729:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!==typeof r)throw new TypeError("The listener must be a function");var a=new o(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,s=new Array(i);o<i;o++)s[o]=r[o].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,o,i,s){var a=n?n+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,o),!0;case 5:return l.fn.call(l.context,t,r,o,i),!0;case 6:return l.fn.call(l.context,t,r,o,i,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,o);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||r&&a.context!==r||s(this,i);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||r&&a[c].context!==r)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},17187:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"===typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var o,i,s,u;if(a(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"===typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"===typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"===typeof c)r(c,this,t);else{var u=c.length,l=p(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},92806:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;i<r.length;i++){var s=r[i],a=e[s];(o?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}},33715:function(e,t,n){var r=t;r.utils=n(26436),r.common=n(95772),r.sha=n(89041),r.ripemd=n(12949),r.hmac=n(52344),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},95772:function(e,t,n){"use strict";var r=n(26436),o=n(79746);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},52344:function(e,t,n){"use strict";var r=n(26436),o=n(79746);function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},12949:function(e,t,n){"use strict";var r=n(26436),o=n(95772),i=r.rotl32,s=r.sum32,a=r.sum32_3,c=r.sum32_4,u=o.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function f(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],o=this.h[2],u=this.h[3],l=this.h[4],b=n,v=r,w=o,x=u,E=l,_=0;_<80;_++){var k=s(i(c(n,d(_,r,o,u),e[p[_]+t],f(_)),g[_]),l);n=l,l=u,u=i(o,10),o=r,r=k,k=s(i(c(b,d(79-_,v,w,x),e[m[_]+t],h(_)),y[_]),E),b=E,E=x,x=i(w,10),w=v,v=k}k=a(this.h[1],o,x),this.h[1]=a(this.h[2],u,E),this.h[2]=a(this.h[3],l,b),this.h[3]=a(this.h[4],n,v),this.h[4]=a(this.h[0],r,w),this.h[0]=k},l.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},89041:function(e,t,n){"use strict";t.sha1=n(84761),t.sha224=n(10799),t.sha256=n(89344),t.sha384=n(80772),t.sha512=n(45900)},84761:function(e,t,n){"use strict";var r=n(26436),o=n(95772),i=n(37038),s=r.rotl32,a=r.sum32,c=r.sum32_5,u=i.ft_1,l=o.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],l=this.h[2],f=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=c(s(o,5),u(p,i,l,f),h,n[r],d[p]);h=f,f=l,l=s(i,30),i=o,o=m}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],i),this.h[2]=a(this.h[2],l),this.h[3]=a(this.h[3],f),this.h[4]=a(this.h[4],h)},f.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},10799:function(e,t,n){"use strict";var r=n(26436),o=n(89344);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(i,o),e.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},89344:function(e,t,n){"use strict";var r=n(26436),o=n(95772),i=n(37038),s=n(79746),a=r.sum32,c=r.sum32_4,u=r.sum32_5,l=i.ch32,d=i.maj32,f=i.s0_256,h=i.s1_256,p=i.g0_256,m=i.g1_256,g=o.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],x=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var E=u(x,h(b),l(b,v,w),this.k[r],n[r]),_=a(f(o),d(o,i,g));x=w,w=v,v=b,b=a(y,E),y=g,g=i,i=o,o=a(E,_)}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],i),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],x)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},80772:function(e,t,n){"use strict";var r=n(26436),o=n(45900);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(i,o),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},45900:function(e,t,n){"use strict";var r=n(26436),o=n(95772),i=n(79746),s=r.rotr64_hi,a=r.rotr64_lo,c=r.shr64_hi,u=r.shr64_lo,l=r.sum64,d=r.sum64_hi,f=r.sum64_lo,h=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,y=o.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,n,r,o){var i=e&n^~e&o;return i<0&&(i+=4294967296),i}function x(e,t,n,r,o,i){var s=t&r^~t&i;return s<0&&(s+=4294967296),s}function E(e,t,n,r,o){var i=e&n^e&o^n&o;return i<0&&(i+=4294967296),i}function _(e,t,n,r,o,i){var s=t&r^t&i^r&i;return s<0&&(s+=4294967296),s}function k(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function S(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function I(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function T(e,t){var n=s(e,t,1)^s(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=a(e,t,1)^a(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function P(e,t){var n=s(e,t,19)^s(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}function O(e,t){var n=a(e,t,19)^a(t,e,29)^u(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var o=P(n[r-4],n[r-3]),i=O(n[r-4],n[r-3]),s=n[r-14],a=n[r-13],c=T(n[r-30],n[r-29]),u=A(n[r-30],n[r-29]),l=n[r-32],d=n[r-31];n[r]=h(o,i,s,a,c,u,l,d),n[r+1]=p(o,i,s,a,c,u,l,d)}},v.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],u=this.h[5],h=this.h[6],p=this.h[7],y=this.h[8],b=this.h[9],v=this.h[10],T=this.h[11],A=this.h[12],P=this.h[13],O=this.h[14],j=this.h[15];i(this.k.length===n.length);for(var M=0;M<n.length;M+=2){var R=O,B=j,N=I(y,b),L=C(y,b),U=w(y,b,v,T,A),D=x(y,b,v,T,A,P),F=this.k[M],z=this.k[M+1],$=n[M],q=n[M+1],Z=m(R,B,N,L,U,D,F,z,$,q),H=g(R,B,N,L,U,D,F,z,$,q);R=k(r,o),B=S(r,o),N=E(r,o,s,a,c),L=_(r,o,s,a,c,u);var W=d(R,B,N,L),G=f(R,B,N,L);O=A,j=P,A=v,P=T,v=y,T=b,y=d(h,p,Z,H),b=f(p,p,Z,H),h=c,p=u,c=s,u=a,s=r,a=o,r=d(Z,H,W,G),o=f(Z,H,W,G)}l(this.h,0,r,o),l(this.h,2,s,a),l(this.h,4,c,u),l(this.h,6,h,p),l(this.h,8,y,b),l(this.h,10,v,T),l(this.h,12,A,P),l(this.h,14,O,j)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},37038:function(e,t,n){"use strict";var r=n(26436).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?s(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},26436:function(e,t,n){"use strict";var r=n(79746),o=n(35717);function i(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):i(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=s(o)),n+=c(o.toString(16))}return n},t.zero2=a,t.zero8=c,t.join32=function(e,t,n,o){var i=n-t;r(i%4===0);for(var s=new Array(i/4),a=0,c=t;a<s.length;a++,c+=4){var u;u="big"===o?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],s[a]=u>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,s=(i<r?1:0)+n+o;e[t]=s>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,s,a){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+i>>>0)<i?1:0,e+n+o+s+(c+=(u=u+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,s,a){return t+r+i+a>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,s,a,c,u){var l=0,d=t;return l+=(d=d+r>>>0)<t?1:0,l+=(d=d+i>>>0)<i?1:0,l+=(d=d+a>>>0)<a?1:0,e+n+o+s+c+(l+=(d=d+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,s,a,c,u){return t+r+i+a+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},8679:function(e,t,n){"use strict";var r=n(59864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var u=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var s=l(n);d&&(s=s.concat(d(n)));for(var a=c(t),m=c(n),g=0;g<s.length;++g){var y=s[g];if(!i[y]&&(!r||!r[y])&&(!m||!m[y])&&(!a||!a[y])){var b=f(n,y);try{u(t,y,b)}catch(v){}}}}return t}},80645:function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?o-1:0,f=n?-1:1,h=e[t+d];for(d+=f,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+d],d+=f,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),i-=u}return(h?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,l=(1<<u)-1,d=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[n+h]=255&a,h+=p,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[n+h]=255&s,h+=p,s/=256,u-=8);e[n+h-p]|=128*m}},35717:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},31198:function(e,t,n){"use strict";const r=n(74880).v4,o=n(17741),i=function(e,t){if(!(this instanceof i))return new i(e,t);t||(t={}),this.options={reviver:"undefined"!==typeof t.reviver?t.reviver:null,replacer:"undefined"!==typeof t.replacer?t.replacer:null,generator:"undefined"!==typeof t.generator?t.generator:function(){return r()},version:"undefined"!==typeof t.version?t.version:2,notificationIdNull:"boolean"===typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=i,i.prototype.request=function(e,t,n,r){const i=this;let s=null;const a=Array.isArray(e)&&"function"===typeof t;if(1===this.options.version&&a)throw new TypeError("JSON-RPC 1.0 does not support batching");if(a||!a&&e&&"object"===typeof e&&"function"===typeof t)r=t,s=e;else{"function"===typeof n&&(r=n,n=void 0);const i="function"===typeof r;try{s=o(e,t,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(i)return r(u);throw u}if(!i)return s}let c;try{c=JSON.stringify(s,this.options.replacer)}catch(u){return r(u)}return this.callServer(c,(function(e,t){i._parseResponse(e,t,r)})),s},i.prototype._parseResponse=function(e,t,n){if(e)return void n(e);if(!t)return n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(e){return n(e)}if(3===n.length){if(Array.isArray(r)){const e=function(e){return"undefined"!==typeof e.error},t=function(t){return!e(t)};return n(null,r.filter(e),r.filter(t))}return n(null,r.error,r.result)}n(null,r)}},17741:function(e,t,n){"use strict";const r=n(74880).v4;e.exports=function(e,t,n,o){if("string"!==typeof e)throw new TypeError(e+" must be a string");const i="number"===typeof(o=o||{}).version?o.version:2;if(1!==i&&2!==i)throw new TypeError(i+" must be 1 or 2");const s={method:e};if(2===i&&(s.jsonrpc="2.0"),t){if("object"!==typeof t&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");s.params=t}if("undefined"===typeof n){const e="function"===typeof o.generator?o.generator:function(){return r()};s.id=e(s,o)}else 2===i&&null===n?o.notificationIdNull&&(s.id=null):s.id=n;return s}},91094:function(e,t,n){var r,o=n(34155);!function(){"use strict";var i="input is invalid type",s="object"===typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"===typeof o&&o.versions&&o.versions.node?a=n.g:c&&(a=self);var u=!a.JS_SHA3_NO_COMMON_JS&&e.exports,l=n.amdO,d=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],y=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,n){return function(r){return new B(e,t,e).update(r)[n]()}},x=function(e,t,n){return function(r,o){return new B(e,t,o).update(r)[n]()}},E=function(e,t,n){return function(t,r,o,i){return C["cshake"+e].update(t,r,o,i)[n]()}},_=function(e,t,n){return function(t,r,o,i){return C["kmac"+e].update(t,r,o,i)[n]()}},k=function(e,t,n,r){for(var o=0;o<b.length;++o){var i=b[o];e[i]=t(n,r,i)}return e},S=function(e,t){var n=w(e,t,"hex");return n.create=function(){return new B(e,t,e)},n.update=function(e){return n.create().update(e)},k(n,w,e,t)},I=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(e,t){var n=x(e,t,"hex");return n.create=function(n){return new B(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},k(n,x,e,t)}},{name:"cshake",padding:h,bits:y,createMethod:function(e,t){var n=v[e],r=E(e,0,"hex");return r.create=function(r,o,i){return o||i?new B(e,t,r).bytepad([o,i],n):C["shake"+e].create(r)},r.update=function(e,t,n,o){return r.create(t,n,o).update(e)},k(r,E,e,t)}},{name:"kmac",padding:h,bits:y,createMethod:function(e,t){var n=v[e],r=_(e,0,"hex");return r.create=function(r,o,i){return new N(e,t,o).bytepad(["KMAC",i],n).bytepad([r],n)},r.update=function(e,t,n,o){return r.create(e,n,o).update(t)},k(r,_,e,t)}}],C={},T=[],A=0;A<I.length;++A)for(var P=I[A],O=P.bits,j=0;j<O.length;++j){var M=P.name+"_"+O[j];if(T.push(M),C[M]=P.createMethod(O[j],P.padding),"sha3"!==P.name){var R=P.name+O[j];T.push(R),C[R]=C[M]}}function B(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function N(e,t,n){B.call(this,e,t,n)}B.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(i);if(null===e)throw new Error(i);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var r,o,s=this.blocks,a=this.byteCount,c=e.length,u=this.blockCount,l=0,f=this.s;l<c;){if(this.reset)for(this.reset=!1,s[0]=this.block,r=1;r<u+1;++r)s[r]=0;if(t)for(r=this.start;l<c&&r<a;++l)s[r>>2]|=e[l]<<p[3&r++];else for(r=this.start;l<c&&r<a;++l)(o=e.charCodeAt(l))<128?s[r>>2]|=o<<p[3&r++]:o<2048?(s[r>>2]|=(192|o>>6)<<p[3&r++],s[r>>2]|=(128|63&o)<<p[3&r++]):o<55296||o>=57344?(s[r>>2]|=(224|o>>12)<<p[3&r++],s[r>>2]|=(128|o>>6&63)<<p[3&r++],s[r>>2]|=(128|63&o)<<p[3&r++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++l)),s[r>>2]|=(240|o>>18)<<p[3&r++],s[r>>2]|=(128|o>>12&63)<<p[3&r++],s[r>>2]|=(128|o>>6&63)<<p[3&r++],s[r>>2]|=(128|63&o)<<p[3&r++]);if(this.lastByteIndex=r,r>=a){for(this.start=r-a,this.block=s[u],r=0;r<u;++r)f[r]^=s[r];L(f),this.reset=!0}else this.start=r}return this},B.prototype.encode=function(e,t){var n=255&e,r=1,o=[n];for(n=255&(e>>=8);n>0;)o.unshift(n),n=255&(e>>=8),++r;return t?o.push(r):o.unshift(r),this.update(o),o.length},B.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(i);if(null===e)throw new Error(i);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var r=0,o=e.length;if(t)r=o;else for(var s=0;s<e.length;++s){var a=e.charCodeAt(s);a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),r+=4)}return r+=this.encode(8*r),this.update(e),r},B.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var o=t-n%t,i=[];return i.length=o,this.update(i),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];L(r)}},B.prototype.toString=B.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,o=this.extraBytes,i=0,s=0,a="";s<r;){for(i=0;i<t&&s<r;++i,++s)e=n[i],a+=f[e>>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];s%t===0&&(L(n),i=0)}return o&&(e=n[i],a+=f[e>>4&15]+f[15&e],o>1&&(a+=f[e>>12&15]+f[e>>8&15]),o>2&&(a+=f[e>>20&15]+f[e>>16&15])),a},B.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;e=o?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s<r;){for(i=0;i<t&&s<r;++i,++s)c[s]=n[i];s%t===0&&L(n)}return o&&(c[i]=n[i],e=e.slice(0,a)),e},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.digest=B.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,c=[];a<o;){for(s=0;s<n&&a<o;++s,++a)e=a<<2,t=r[s],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%n===0&&L(r)}return i&&(e=a<<2,t=r[s],c[e]=255&t,i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c},N.prototype=new B,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var L=function(e){var t,n,r,o,i,s,a,c,u,l,d,f,h,p,g,y,b,v,w,x,E,_,k,S,I,C,T,A,P,O,j,M,R,B,N,L,U,D,F,z,$,q,Z,H,W,G,K,V,X,Y,J,Q,ee,te,ne,re,oe,ie,se,ae,ce,ue,le;for(r=0;r<48;r+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),n=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=o^(c<<1|u>>>31),n=i^(u<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(l<<1|d>>>31),n=a^(d<<1|l>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(f<<1|h>>>31),n=u^(h<<1|f>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=l^(o<<1|i>>>31),n=d^(i<<1|o>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,p=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,K=e[10]<<4|e[11]>>>28,A=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,Z=e[41]<<18|e[40]>>>14,B=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,V=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,j=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,I=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,$=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~y&v,e[1]=g^~b&w,e[10]=S^~C&A,e[11]=I^~T&P,e[20]=B^~L&D,e[21]=N^~U&F,e[30]=H^~G&V,e[31]=W^~K&X,e[40]=te^~re&ie,e[41]=ne^~oe&se,e[2]=y^~v&x,e[3]=b^~w&E,e[12]=C^~A&O,e[13]=T^~P&j,e[22]=L^~D&z,e[23]=U^~F&$,e[32]=G^~V&Y,e[33]=K^~X&J,e[42]=re^~ie&ae,e[43]=oe^~se&ce,e[4]=v^~x&_,e[5]=w^~E&k,e[14]=A^~O&M,e[15]=P^~j&R,e[24]=D^~z&q,e[25]=F^~$&Z,e[34]=V^~Y&Q,e[35]=X^~J&ee,e[44]=ie^~ae&ue,e[45]=se^~ce&le,e[6]=x^~_&p,e[7]=E^~k&g,e[16]=O^~M&S,e[17]=j^~R&I,e[26]=z^~q&B,e[27]=$^~Z&N,e[36]=Y^~Q&H,e[37]=J^~ee&W,e[46]=ae^~ue&te,e[47]=ce^~le&ne,e[8]=_^~p&y,e[9]=k^~g&b,e[18]=M^~S&C,e[19]=R^~I&T,e[28]=q^~B&L,e[29]=Z^~N&U,e[38]=Q^~H&G,e[39]=ee^~W&K,e[48]=ue^~te&re,e[49]=le^~ne&oe,e[0]^=m[r],e[1]^=m[r+1]};if(u)e.exports=C;else{for(A=0;A<T.length;++A)a[T[A]]=C[T[A]];l&&(void 0===(r=function(){return C}.call(t,n,t,e))||(e.exports=r))}}()},55764:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=t.unescape=t.escape=t.pad=void 0;const r=n(79742);function o(e){return`${e}${"=".repeat(4-(e.length%4||4))}`}function i(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function s(e){return o(e).replace(/-/g,"+").replace(/_/g,"/")}t.pad=o,t.escape=i,t.unescape=s,t.encode=function(e){return i((0,r.fromByteArray)((new TextEncoder).encode(e)))},t.decode=function(e){return(new TextDecoder).decode((0,r.toByteArray)(o(s(e))))}},17803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoClients=t.SECP256K1Client=void 0;const r=n(75118);Object.defineProperty(t,"SECP256K1Client",{enumerable:!0,get:function(){return r.SECP256K1Client}});const o={ES256K:r.SECP256K1Client};t.cryptoClients=o},75118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECP256K1Client=void 0;const r=n(79569),o=n(23061),i=n(79656),s=n(90563),a=n(79581),c=n(98089);i.utils.hmacSha256Sync=(e,...t)=>{const n=r.hmac.create(o.sha256,e);return t.forEach((e=>n.update(e))),n.digest()};class u{static derivePublicKey(e,t=!0){return 66===e.length&&(e=e.slice(0,64)),e.length<64&&(e=e.padStart(64,"0")),(0,c.bytesToHex)(i.getPublicKey(e,t))}static signHash(e,t,n="jose"){if(!e||!t)throw new a.MissingParametersError("a signing input hash and private key are all required");const r=i.signSync(e,t.slice(0,64),{der:!0,canonical:!1});if("der"===n)return(0,c.bytesToHex)(r);if("jose"===n)return(0,s.derToJose)(r,"ES256");throw Error("Invalid signature format")}static loadSignature(e){return(0,s.joseToDer)(e,"ES256")}static verifyHash(e,t,n){if(!e||!t||!n)throw new a.MissingParametersError("a signing input hash, der signature, and public key are all required");return i.verify(t,e,n,{strict:!1})}}t.SECP256K1Client=u,u.algorithmName="ES256K"},62674:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hashSha256Async=t.hashSha256=void 0;const o=n(23061);function i(e){return(0,o.sha256)(e)}t.hashSha256=i,t.hashSha256Async=function(e){return r(this,void 0,void 0,(function*(){try{if("undefined"!==typeof crypto&&"undefined"!==typeof crypto.subtle){const t="string"===typeof e?(new TextEncoder).encode(e):e,n=yield crypto.subtle.digest("SHA-256",t);return new Uint8Array(n)}{const t=n(18971);if(!t.createHash)throw new Error("`crypto` module does not contain `createHash`");return Promise.resolve(t.createHash("sha256").update(e).digest())}}catch(t){return console.log(t),console.log('Crypto lib not found. Neither the global `crypto.subtle` Web Crypto API, nor the or the Node.js `require("crypto").createHash` module is available. Falling back to JS implementation.'),Promise.resolve(i(e))}}))}},43891:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeToken=void 0;const r=n(55764);t.decodeToken=function(e){if("string"===typeof e){const t=e.split(".");return{header:JSON.parse(r.decode(t[0])),payload:JSON.parse(r.decode(t[1])),signature:t[2]}}if("object"===typeof e){if("string"!==typeof e.payload)throw new Error("Expected token payload to be a base64 or json string");let t=e.payload;"{"!==e.payload[0]&&(t=r.decode(t));const n=[];return e.header.map((e=>{const t=JSON.parse(r.decode(e));n.push(t)})),{header:n,payload:JSON.parse(t),signature:e.signature}}}},90563:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joseToDer=t.derToJose=void 0;const r=n(79742),o=n(55764);function i(e){return(e/8|0)+(e%8===0?0:1)}const s={ES256:i(256),ES384:i(384),ES512:i(521)};function a(e){const t=s[e];if(t)return t;throw new Error(`Unknown algorithm "${e}"`)}const c=128;function u(e){if(e instanceof Uint8Array)return e;if("string"===typeof e)return(0,r.toByteArray)((0,o.pad)(e));throw new TypeError("ECDSA signature must be a Base64 string or a Uint8Array")}function l(e,t,n){let r=0;for(;t+r<n&&0===e[t+r];)++r;return e[t+r]>=c&&--r,r}t.derToJose=function(e,t){const n=u(e),i=a(t),s=i+1,c=n.length;let l=0;if(48!==n[l++])throw new Error('Could not find expected "seq"');let d=n[l++];if(129===d&&(d=n[l++]),c-l<d)throw new Error(`"seq" specified length of "${d}", only "${c-l}" remaining`);if(2!==n[l++])throw new Error('Could not find expected "int" for "r"');const f=n[l++];if(c-l-2<f)throw new Error(`"r" specified length of "${f}", only "${c-l-2}" available`);if(s<f)throw new Error(`"r" specified length of "${f}", max of "${s}" is acceptable`);const h=l;if(l+=f,2!==n[l++])throw new Error('Could not find expected "int" for "s"');const p=n[l++];if(c-l!==p)throw new Error(`"s" specified length of "${p}", expected "${c-l}"`);if(s<p)throw new Error(`"s" specified length of "${p}", max of "${s}" is acceptable`);const m=l;if(l+=p,l!==c)throw new Error(`Expected to consume entire array, but "${c-l}" bytes remain`);const g=i-f,y=i-p,b=new Uint8Array(g+f+y+p);for(l=0;l<g;++l)b[l]=0;b.set(n.subarray(h+Math.max(-g,0),h+f),l),l=i;for(const r=l;l<r+y;++l)b[l]=0;return b.set(n.subarray(m+Math.max(-y,0),m+p),l),(0,o.escape)((0,r.fromByteArray)(b))},t.joseToDer=function(e,t){e=u(e);const n=a(t),r=e.length;if(r!==2*n)throw new TypeError(`"${t}" signatures must be "${2*n}" bytes, saw "${r}"`);const o=l(e,0,n),i=l(e,n,e.length),s=n-o,d=n-i,f=2+s+1+1+d,h=f<c,p=new Uint8Array((h?2:3)+f);let m=0;return p[m++]=48,h?p[m++]=f:(p[m++]=129,p[m++]=255&f),p[m++]=2,p[m++]=s,o<0?(p[m++]=0,p.set(e.subarray(0,n),m),m+=n):(p.set(e.subarray(o,n),m),m+=n-o),p[m++]=2,p[m++]=d,i<0?(p[m++]=0,p.set(e.subarray(n),m)):p.set(e.subarray(n+i),m),p}},79581:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTokenError=t.MissingParametersError=void 0;class n extends Error{constructor(e){super(),this.name="MissingParametersError",this.message=e||""}}t.MissingParametersError=n;class r extends Error{constructor(e){super(),this.name="InvalidTokenError",this.message=e||""}}t.InvalidTokenError=r},56080:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(42298),t),o(n(93523),t),o(n(43891),t),o(n(79581),t),o(n(17803),t)},42298:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenSigner=t.createUnsecuredToken=void 0;const o=n(55764),i=n(17803),s=n(79581),a=n(62674);function c(e,t){const n=[],r=o.encode(JSON.stringify(t));n.push(r);const i=o.encode(JSON.stringify(e));n.push(i);return n.join(".")}t.createUnsecuredToken=function(e){return c(e,{typ:"JWT",alg:"none"})+"."};t.TokenSigner=class{constructor(e,t){if(!e||!t)throw new s.MissingParametersError("a signing algorithm and private key are required");if("string"!==typeof e)throw new Error("signing algorithm parameter must be a string");if(e=e.toUpperCase(),!i.cryptoClients.hasOwnProperty(e))throw new Error("invalid signing algorithm");this.tokenType="JWT",this.cryptoClient=i.cryptoClients[e],this.rawPrivateKey=t}header(e={}){const t={typ:this.tokenType,alg:this.cryptoClient.algorithmName};return Object.assign({},t,e)}sign(e,t=!1,n={}){const r=this.header(n),o=c(e,r),i=(0,a.hashSha256)(o);return this.createWithSignedHash(e,t,r,o,i)}signAsync(e,t=!1,n={}){return r(this,void 0,void 0,(function*(){const r=this.header(n),o=c(e,r),i=yield(0,a.hashSha256Async)(o);return this.createWithSignedHash(e,t,r,o,i)}))}createWithSignedHash(e,t,n,r,i){const s=this.cryptoClient.signHash(i,this.rawPrivateKey);if(t){return{header:[o.encode(JSON.stringify(n))],payload:JSON.stringify(e),signature:[s]}}return[r,s].join(".")}}},93523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenVerifier=void 0;const r=n(55764),o=n(17803),i=n(79581),s=n(62674);t.TokenVerifier=class{constructor(e,t){if(!e||!t)throw new i.MissingParametersError("a signing algorithm and public key are required");if("string"!==typeof e)throw"signing algorithm parameter must be a string";if(e=e.toUpperCase(),!o.cryptoClients.hasOwnProperty(e))throw"invalid signing algorithm";this.tokenType="JWT",this.cryptoClient=o.cryptoClients[e],this.rawPublicKey=t}verify(e){return"string"===typeof e?this.verifyCompact(e,!1):"object"===typeof e&&this.verifyExpanded(e,!1)}verifyAsync(e){return"string"===typeof e?this.verifyCompact(e,!0):"object"===typeof e?this.verifyExpanded(e,!0):Promise.resolve(!1)}verifyCompact(e,t){const n=e.split("."),r=n[0]+"."+n[1],o=e=>{const t=this.cryptoClient.loadSignature(n[2]);return this.cryptoClient.verifyHash(e,t,this.rawPublicKey)};if(t)return(0,s.hashSha256Async)(r).then((e=>o(e)));{const e=(0,s.hashSha256)(r);return o(e)}}verifyExpanded(e,t){const n=[e.header.join("."),r.encode(e.payload)].join(".");let o=!0;const i=t=>(e.signature.map((e=>{const n=this.cryptoClient.loadSignature(e);this.cryptoClient.verifyHash(t,n,this.rawPublicKey)||(o=!1)})),o);if(t)return(0,s.hashSha256Async)(n).then((e=>i(e)));{const e=(0,s.hashSha256)(n);return i(e)}}}},76427:function(e,t,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Symbol]",s=/^\[object .+?Constructor\]$/,a=/^(?:0|[1-9]\d*)$/,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")();function d(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function f(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!==t)return function(e,t,n,r){var o=e.length,i=n+(r?1:-1);for(;r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,g,n);var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)if(n(t,e[r]))return!0;return!1}function p(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function m(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function g(e){return e!==e}function y(e,t){return e.has(t)}function b(e,t){return function(n){return e(t(n))}}var v=Array.prototype,w=Function.prototype,x=Object.prototype,E=l["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k=w.toString,S=x.hasOwnProperty,I=x.toString,C=RegExp("^"+k.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=l.Symbol,A=b(Object.getPrototypeOf,Object),P=x.propertyIsEnumerable,O=v.splice,j=T?T.isConcatSpreadable:void 0,M=Object.getOwnPropertySymbols,R=Math.max,B=K(l,"Map"),N=K(Object,"create");function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new D;++t<n;)this.add(e[t])}function z(e,t){var n=te(e)||ee(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!S.call(e,i)||o&&("length"==i||J(i,r))||n.push(i);return n}function $(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!==n&&r!==r)return o;return-1}function q(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Y),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?q(a,t-1,n,r,o):m(o,a):r||(o[o.length]=a)}return o}function Z(e){if(!oe(e)||(t=e,_&&_ in t))return!1;var t,n=re(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?C:s;return n.test(function(e){if(null!=e){try{return k.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function H(e){if(!oe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||x;return e===n}(e),n=[];for(var r in e)("constructor"!=r||!t&&S.call(e,r))&&n.push(r);return n}function W(e){return function(e,t,n){var r=t(e);return te(e)?r:m(r,n(e))}(e,se,X)}function G(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function K(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Z(n)?n:void 0}L.prototype.clear=function(){this.__data__=N?N(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(N){var n=t[e];return n===r?void 0:n}return S.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return N?void 0!==t[e]:S.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=N&&void 0===t?r:t,this},U.prototype.clear=function(){this.__data__=[]},U.prototype.delete=function(e){var t=this.__data__,n=$(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},U.prototype.get=function(e){var t=this.__data__,n=$(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return $(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=$(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new L,map:new(B||U),string:new L}},D.prototype.delete=function(e){return G(this,e).delete(e)},D.prototype.get=function(e){return G(this,e).get(e)},D.prototype.has=function(e){return G(this,e).has(e)},D.prototype.set=function(e,t){return G(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var V=M?b(M,Object):le,X=M?function(e){for(var t=[];e;)m(t,V(e)),e=A(e);return t}:le;function Y(e){return te(e)||ee(e)||!!(j&&e&&e[j])}function J(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||a.test(e))&&e>-1&&e%1==0&&e<t}function Q(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ie(e)&&I.call(e)==i}(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function ee(e){return function(e){return ie(e)&&ne(e)}(e)&&S.call(e,"callee")&&(!P.call(e,"callee")||"[object Arguments]"==I.call(e))}var te=Array.isArray;function ne(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!re(e)}function re(e){var t=oe(e)?I.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function oe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ie(e){return!!e&&"object"==typeof e}function se(e){return ne(e)?z(e,!0):H(e)}var ae,ce,ue=(ae=function(e,t){return null==e?{}:(t=p(q(t,1),Q),function(e,t){return function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var s=t[r],a=e[s];n(a,s)&&(i[s]=a)}return i}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var o,i=-1,s=f,a=!0,c=e.length,u=[],l=t.length;if(!c)return u;n&&(t=p(t,(o=n,function(e){return o(e)}))),r?(s=h,a=!1):t.length>=200&&(s=y,a=!1,t=new F(t));e:for(;++i<c;){var d=e[i],m=n?n(d):d;if(d=r||0!==d?d:0,a&&m===m){for(var g=l;g--;)if(t[g]===m)continue e;u.push(d)}else s(t,m,r)||u.push(d)}return u}(W(e),t)))},ce=R(void 0===ce?ae.length-1:ce,0),function(){for(var e=arguments,t=-1,n=R(e.length-ce,0),r=Array(n);++t<n;)r[t]=e[ce+t];t=-1;for(var o=Array(ce+1);++t<ce;)o[t]=e[t];return o[ce]=r,d(ae,this,o)});function le(){return[]}e.exports=ue},79746:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},57824:function(e){var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o,s=365.25*o;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=o)return a(e,i,o,"day");if(i>=r)return a(e,i,r,"hour");if(i>=n)return a(e,i,n,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},2962:function(e,t,n){"use strict";n.d(t,{PB:function(){return f},lX:function(){return d}});var r=n(9008),o=n.n(r),i=n(67294);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var c={templateTitle:"",noindex:!1,nofollow:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},u=function(e,t,n){void 0===t&&(t=[]);var r=void 0===n?{}:n,o=r.defaultWidth,s=r.defaultHeight;return t.reduce((function(t,n,r){return t.push(i.createElement("meta",{key:"og:"+e+":0"+r,property:"og:"+e,content:n.url})),n.alt&&t.push(i.createElement("meta",{key:"og:"+e+":alt0"+r,property:"og:"+e+":alt",content:n.alt})),n.secureUrl&&t.push(i.createElement("meta",{key:"og:"+e+":secure_url0"+r,property:"og:"+e+":secure_url",content:n.secureUrl.toString()})),n.type&&t.push(i.createElement("meta",{key:"og:"+e+":type0"+r,property:"og:"+e+":type",content:n.type.toString()})),n.width?t.push(i.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:n.width.toString()})):o&&t.push(i.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:o.toString()})),n.height?t.push(i.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:n.height.toString()})):s&&t.push(i.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:s.toString()})),t}),[])},l=function(e){var t,n,r,o=[];e.titleTemplate&&(c.templateTitle=e.titleTemplate);var a="";e.title?(a=e.title,c.templateTitle&&(a=c.templateTitle.replace(/%s/g,(function(){return a})))):e.defaultTitle&&(a=e.defaultTitle),a&&o.push(i.createElement("title",{key:"title"},a));var l,d,f=e.noindex||c.noindex||e.dangerouslySetAllPagesToNoIndex,h=e.nofollow||c.nofollow||e.dangerouslySetAllPagesToNoFollow,p="";if(e.robotsProps){var m=e.robotsProps,g=m.nosnippet,y=m.maxSnippet,b=m.maxImagePreview,v=m.maxVideoPreview,w=m.noarchive,x=m.noimageindex,E=m.notranslate,_=m.unavailableAfter;p=(g?",nosnippet":"")+(y?",max-snippet:"+y:"")+(b?",max-image-preview:"+b:"")+(w?",noarchive":"")+(_?",unavailable_after:"+_:"")+(x?",noimageindex":"")+(v?",max-video-preview:"+v:"")+(E?",notranslate":"")}(f||h?(e.dangerouslySetAllPagesToNoIndex&&(c.noindex=!0),e.dangerouslySetAllPagesToNoFollow&&(c.nofollow=!0),o.push(i.createElement("meta",{key:"robots",name:"robots",content:(f?"noindex":"index")+","+(h?"nofollow":"follow")+p}))):o.push(i.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+p})),e.description&&o.push(i.createElement("meta",{key:"description",name:"description",content:e.description})),e.mobileAlternate&&o.push(i.createElement("link",{rel:"alternate",key:"mobileAlternate",media:e.mobileAlternate.media,href:e.mobileAlternate.href})),e.languageAlternates&&e.languageAlternates.length>0&&e.languageAlternates.forEach((function(e){o.push(i.createElement("link",{rel:"alternate",key:"languageAlternate-"+e.hrefLang,hrefLang:e.hrefLang,href:e.href}))})),e.twitter&&(e.twitter.cardType&&o.push(i.createElement("meta",{key:"twitter:card",name:"twitter:card",content:e.twitter.cardType})),e.twitter.site&&o.push(i.createElement("meta",{key:"twitter:site",name:"twitter:site",content:e.twitter.site})),e.twitter.handle&&o.push(i.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:e.twitter.handle}))),e.facebook&&e.facebook.appId&&o.push(i.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:e.facebook.appId})),null!=(t=e.openGraph)&&t.title||a)&&o.push(i.createElement("meta",{key:"og:title",property:"og:title",content:(null==(l=e.openGraph)?void 0:l.title)||a}));(null!=(n=e.openGraph)&&n.description||e.description)&&o.push(i.createElement("meta",{key:"og:description",property:"og:description",content:(null==(d=e.openGraph)?void 0:d.description)||e.description}));if(e.openGraph){if((e.openGraph.url||e.canonical)&&o.push(i.createElement("meta",{key:"og:url",property:"og:url",content:e.openGraph.url||e.canonical})),e.openGraph.type){var k=e.openGraph.type.toLowerCase();o.push(i.createElement("meta",{key:"og:type",property:"og:type",content:k})),"profile"===k&&e.openGraph.profile?(e.openGraph.profile.firstName&&o.push(i.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:e.openGraph.profile.firstName})),e.openGraph.profile.lastName&&o.push(i.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:e.openGraph.profile.lastName})),e.openGraph.profile.username&&o.push(i.createElement("meta",{key:"profile:username",property:"profile:username",content:e.openGraph.profile.username})),e.openGraph.profile.gender&&o.push(i.createElement("meta",{key:"profile:gender",property:"profile:gender",content:e.openGraph.profile.gender}))):"book"===k&&e.openGraph.book?(e.openGraph.book.authors&&e.openGraph.book.authors.length&&e.openGraph.book.authors.forEach((function(e,t){o.push(i.createElement("meta",{key:"book:author:0"+t,property:"book:author",content:e}))})),e.openGraph.book.isbn&&o.push(i.createElement("meta",{key:"book:isbn",property:"book:isbn",content:e.openGraph.book.isbn})),e.openGraph.book.releaseDate&&o.push(i.createElement("meta",{key:"book:release_date",property:"book:release_date",content:e.openGraph.book.releaseDate})),e.openGraph.book.tags&&e.openGraph.book.tags.length&&e.openGraph.book.tags.forEach((function(e,t){o.push(i.createElement("meta",{key:"book:tag:0"+t,property:"book:tag",content:e}))}))):"article"===k&&e.openGraph.article?(e.openGraph.article.publishedTime&&o.push(i.createElement("meta",{key:"article:published_time",property:"article:published_time",content:e.openGraph.article.publishedTime})),e.openGraph.article.modifiedTime&&o.push(i.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:e.openGraph.article.modifiedTime})),e.openGraph.article.expirationTime&&o.push(i.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:e.openGraph.article.expirationTime})),e.openGraph.article.authors&&e.openGraph.article.authors.length&&e.openGraph.article.authors.forEach((function(e,t){o.push(i.createElement("meta",{key:"article:author:0"+t,property:"article:author",content:e}))})),e.openGraph.article.section&&o.push(i.createElement("meta",{key:"article:section",property:"article:section",content:e.openGraph.article.section})),e.openGraph.article.tags&&e.openGraph.article.tags.length&&e.openGraph.article.tags.forEach((function(e,t){o.push(i.createElement("meta",{key:"article:tag:0"+t,property:"article:tag",content:e}))}))):"video.movie"!==k&&"video.episode"!==k&&"video.tv_show"!==k&&"video.other"!==k||!e.openGraph.video||(e.openGraph.video.actors&&e.openGraph.video.actors.length&&e.openGraph.video.actors.forEach((function(e,t){e.profile&&o.push(i.createElement("meta",{key:"video:actor:0"+t,property:"video:actor",content:e.profile})),e.role&&o.push(i.createElement("meta",{key:"video:actor:role:0"+t,property:"video:actor:role",content:e.role}))})),e.openGraph.video.directors&&e.openGraph.video.directors.length&&e.openGraph.video.directors.forEach((function(e,t){o.push(i.createElement("meta",{key:"video:director:0"+t,property:"video:director",content:e}))})),e.openGraph.video.writers&&e.openGraph.video.writers.length&&e.openGraph.video.writers.forEach((function(e,t){o.push(i.createElement("meta",{key:"video:writer:0"+t,property:"video:writer",content:e}))})),e.openGraph.video.duration&&o.push(i.createElement("meta",{key:"video:duration",property:"video:duration",content:e.openGraph.video.duration.toString()})),e.openGraph.video.releaseDate&&o.push(i.createElement("meta",{key:"video:release_date",property:"video:release_date",content:e.openGraph.video.releaseDate})),e.openGraph.video.tags&&e.openGraph.video.tags.length&&e.openGraph.video.tags.forEach((function(e,t){o.push(i.createElement("meta",{key:"video:tag:0"+t,property:"video:tag",content:e}))})),e.openGraph.video.series&&o.push(i.createElement("meta",{key:"video:series",property:"video:series",content:e.openGraph.video.series})))}e.defaultOpenGraphImageWidth&&(c.defaultOpenGraphImageWidth=e.defaultOpenGraphImageWidth),e.defaultOpenGraphImageHeight&&(c.defaultOpenGraphImageHeight=e.defaultOpenGraphImageHeight),e.openGraph.images&&e.openGraph.images.length&&o.push.apply(o,u("image",e.openGraph.images,{defaultWidth:c.defaultOpenGraphImageWidth,defaultHeight:c.defaultOpenGraphImageHeight})),e.defaultOpenGraphVideoWidth&&(c.defaultOpenGraphVideoWidth=e.defaultOpenGraphVideoWidth),e.defaultOpenGraphVideoHeight&&(c.defaultOpenGraphVideoHeight=e.defaultOpenGraphVideoHeight),e.openGraph.videos&&e.openGraph.videos.length&&o.push.apply(o,u("video",e.openGraph.videos,{defaultWidth:c.defaultOpenGraphVideoWidth,defaultHeight:c.defaultOpenGraphVideoHeight})),e.openGraph.locale&&o.push(i.createElement("meta",{key:"og:locale",property:"og:locale",content:e.openGraph.locale})),e.openGraph.site_name&&o.push(i.createElement("meta",{key:"og:site_name",property:"og:site_name",content:e.openGraph.site_name}))}return e.canonical&&o.push(i.createElement("link",{rel:"canonical",href:e.canonical,key:"canonical"})),e.additionalMetaTags&&e.additionalMetaTags.length>0&&e.additionalMetaTags.forEach((function(e){var t,n,r;o.push(i.createElement("meta",s({key:"meta:"+(null!=(t=null!=(n=null!=(r=e.keyOverride)?r:e.name)?n:e.property)?t:e.httpEquiv)},e)))})),null!=(r=e.additionalLinkTags)&&r.length&&e.additionalLinkTags.forEach((function(e){var t;o.push(i.createElement("link",s({key:"link"+(null!=(t=e.keyOverride)?t:e.href)+e.rel},e)))})),o},d=function(e){function t(){return e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.title,n=e.titleTemplate,r=e.defaultTitle,s=e.dangerouslySetAllPagesToNoIndex,a=void 0!==s&&s,c=e.dangerouslySetAllPagesToNoFollow,u=void 0!==c&&c,d=e.description,f=e.canonical,h=e.facebook,p=e.openGraph,m=e.additionalMetaTags,g=e.twitter,y=e.defaultOpenGraphImageWidth,b=e.defaultOpenGraphImageHeight,v=e.defaultOpenGraphVideoWidth,w=e.defaultOpenGraphVideoHeight,x=e.mobileAlternate,E=e.languageAlternates,_=e.additionalLinkTags,k=e.robotsProps;return i.createElement(o(),null,l({title:t,titleTemplate:n,defaultTitle:r,dangerouslySetAllPagesToNoIndex:a,dangerouslySetAllPagesToNoFollow:u,description:d,canonical:f,facebook:h,openGraph:p,additionalMetaTags:m,twitter:g,defaultOpenGraphImageWidth:y,defaultOpenGraphImageHeight:b,defaultOpenGraphVideoWidth:v,defaultOpenGraphVideoHeight:w,mobileAlternate:x,languageAlternates:E,additionalLinkTags:_,robotsProps:k}))},t}(i.Component),f=function(e){function t(){return e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.title,n=e.noindex,r=void 0!==n&&n,s=e.nofollow,a=e.robotsProps,c=e.description,u=e.canonical,d=e.openGraph,f=e.facebook,h=e.twitter,p=e.additionalMetaTags,m=e.titleTemplate,g=e.defaultTitle,y=e.mobileAlternate,b=e.languageAlternates,v=e.additionalLinkTags;return i.createElement(o(),null,l({title:t,noindex:r,nofollow:s,robotsProps:a,description:c,canonical:u,facebook:f,openGraph:d,additionalMetaTags:p,twitter:h,titleTemplate:m,defaultTitle:g,mobileAlternate:y,languageAlternates:b,additionalLinkTags:v}))},t}(i.Component),h=Object.freeze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"});new RegExp("["+Object.keys(h).join("")+"]","g")},11752:function(e,t,n){e.exports=n(7905)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(13992)}])},59566:function(e,t,n){"use strict";n.d(t,{C:function(){return O}});var r=n(85893),o=n(63366),i=n(87462),s=n(67294),a=n(86010),c=n(94780),u=n(36622),l=n(81719),d=n(78884),f=n(51625),h=n(84771),p=n(29630),m=n(1588),g=n(34867);function y(e){return(0,g.Z)("MuiLink",e)}var b=(0,m.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),v=n(54844),w=n(41796);const x={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var E=({theme:e,ownerState:t})=>{const n=(e=>x[e]||e)(t.color),r=(0,v.D)(e,`palette.${n}`,!1)||t.color,o=(0,v.D)(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,w.Fq)(r,.4)};const _=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],k=(0,l.ZP)(p.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${(0,u.Z)(n.underline)}`],"button"===n.component&&t.button]}})((({theme:e,ownerState:t})=>(0,i.Z)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,i.Z)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:E({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${b.focusVisible}`]:{outline:"auto"}})));var S=s.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiLink"}),{className:l,color:p="primary",component:m="a",onBlur:g,onFocus:b,TypographyClasses:v,underline:w="always",variant:E="inherit",sx:S}=n,I=(0,o.Z)(n,_),{isFocusVisibleRef:C,onBlur:T,onFocus:A,ref:P}=(0,f.Z)(),[O,j]=s.useState(!1),M=(0,h.Z)(t,P),R=(0,i.Z)({},n,{color:p,component:m,focusVisible:O,underline:w,variant:E}),B=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${(0,u.Z)(o)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,c.Z)(i,y,t)})(R);return(0,r.jsx)(k,(0,i.Z)({color:p,className:(0,a.default)(B.root,l),classes:v,component:m,onBlur:e=>{T(e),!1===C.current&&j(!1),g&&g(e)},onFocus:e=>{A(e),!0===C.current&&j(!0),b&&b(e)},ref:M,ownerState:R,variant:E,sx:[...Object.keys(x).includes(p)?[]:[{color:p}],...Array.isArray(S)?S:[S]]},I))})),I=n(41664),C=n.n(I);const T=(0,l.ZP)("a")({}),A=s.forwardRef(((e,t)=>{const{to:n,linkAs:o,replace:i,scroll:s,shallow:a,prefetch:c,legacyBehavior:u=!1,locale:l,...d}=e;return(0,r.jsx)(C(),{href:n,prefetch:c,as:o,replace:i,scroll:s,shallow:a,passHref:!0,locale:l,legacyBehavior:u,ref:t,...d})}));A.displayName="NextLinkComposed";const P=s.forwardRef(((e,t)=>{const{as:n,href:o,legacyBehavior:i,linkAs:s,locale:a,noLinkStyle:c,prefetch:u,replace:l,scroll:d,shallow:f,...h}=e;P.displayName="Link";if("string"===typeof o&&(0===o.indexOf("http")||0===o.indexOf("mailto:")))return c?(0,r.jsx)(T,{href:o,ref:t,...h}):(0,r.jsx)(S,{href:o,ref:t,...h});const p={to:o,linkAs:s||n,replace:l,scroll:d,shallow:f,prefetch:u,legacyBehavior:i,locale:a};return c?(0,r.jsx)(A,{ref:t,...p,...h}):(0,r.jsx)(S,{component:A,ref:t,...p,...h})}));var O=P},58928:function(e,t,n){"use strict";n.d(t,{j:function(){return y}});var r=n(85893),o=n(75503),i=n(90813),s=n(44373),a=n(75084),c=n(58402),u=n(23926),l=n(70918),d=n(852),f=n(67294),h=n(90560),p=n(31538),m=n(59566);const g=e=>{let{props:t,item:n,isCurrent:o,onClick:i}=e;var s;return(0,r.jsx)(p.Z,{component:m.C,role:"navigation",href:n.href,target:(null===(s=n.href)||void 0===s?void 0:s.startsWith("http"))?"_blank":void 0,onClick:i,sx:{textTransform:"initial",color:o?t.theme.palette.text.primary:t.theme.palette.text.secondary,fontSize:"13pt",fontWeight:o?"900":"600"},children:n.label})};g.displayName="StyledMenuItem";const y=e=>{const{menuEl:t,setMenuEl:n,...p}=e,m=e.href===e.current,y=Boolean(t)&&(null===t||void 0===t?void 0:t.id.endsWith(e.label)),[b,v]=(0,f.useState)([]);(0,f.useEffect)((()=>{v(e.items)}),[e.items,t]);const w=e=>e=>{n(t?null:e.target)},x=y?"projects_menu_".concat(e.label):void 0;return(0,r.jsxs)(r.Fragment,{children:[!e.label&&(0,r.jsx)(s.Z,{component:"span",orientation:"vertical"}),e.href&&(0,r.jsx)(h.S,{props:p,isCurrent:m}),(null===b||void 0===b?void 0:b.length)>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{...p,id:"projects_menu_".concat(e.label),disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,startIcon:y?(0,r.jsx)(i.Z,{}):(0,r.jsx)(o.Z,{}),onClick:w(e.label),sx:{textTransform:"initial",color:m?e.theme.palette.text.primary:e.theme.palette.text.secondary,fontSize:"13pt",fontWeight:m?"900":"600"},children:e.label}),(0,r.jsx)(c.Z,{open:y,id:x,anchorEl:t,role:void 0,placement:"bottom-start",disablePortal:!0,placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,children:(0,r.jsx)(u.Z,{onClickAway:w(e.label),children:(0,r.jsx)(l.Z,{children:(0,r.jsx)(d.Z,{autoFocusItem:y,id:"composition-menu","aria-labelledby":"composition-button",children:null===b||void 0===b?void 0:b.map((t=>(0,r.jsx)(g,{props:e,item:t,onClick:w(e.label),isCurrent:m},t.label)))})})})})]})]})}},90560:function(e,t,n){"use strict";n.d(t,{S:function(){return s}});var r=n(85893),o=n(75084),i=(n(67294),n(59566));const s=e=>{let{props:t,isCurrent:n}=e;var s;return(0,r.jsx)(o.Z,{...t,LinkComponent:i.C,href:t.href,target:(null===(s=t.href)||void 0===s?void 0:s.startsWith("http"))?"_blank":void 0,role:"navigation",disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,sx:{width:{xs:"100%",lg:"auto"},justifyContent:"start",textTransform:"initial",color:n?t.theme.palette.text.primary:t.theme.palette.text.secondary,fontSize:"13pt",fontWeight:n?"900":"600"},children:t.label})};s.displayName="StyledButton"},33084:function(e,t,n){"use strict";n.d(t,{l:function(){return s}});var r=n(11752),o=n.n(r);const{publicRuntimeConfig:i}=o()(),s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.defaultNetworkId;return[{label:"Home",value:"home",href:"/"},{label:"XEN",value:"xen",items:[{label:"Info",value:"info",href:"/".concat(e)},{label:"Mint",value:"mint",href:"/".concat(e,"/mint")},{label:"Stake",value:"stake",href:"/".concat(e,"/stake")},{label:"XENFT",value:"xenft",href:"/".concat(e,"/xenft/torrent")}]},{label:"X1",value:"x1",items:[{label:"Dashboard",value:"dashboard",href:"/x1/dashboard"},{label:"PrimeGame",value:"prime_game",href:"/x1/primeGame"}]},{label:"BTC",value:"btc",items:[{label:"Ordinals",value:"ords",href:"/btc/ords"},{label:"Knights",value:"knights",href:"/btc/knights"}]},{label:"Solana",value:"sol",items:[{label:"solXEN",value:"solXEN",href:"/sol/solXEN"}]},{label:"Projects",value:"projects",items:[{label:"XHEX",value:"xhex",href:"/".concat(e,"/xhex")},{label:"xETH",value:"xeth",href:"/".concat(e,"/xeth")},{label:"VMPX",value:"vmpx",href:"https://vmpx.io"},{label:"Knights",value:"knights",href:"/".concat(e,"/knights")}]},{label:"Tools",value:"tools",items:[{label:"XENGpt",value:"xengpt",href:"https://xengpt.ai"},{label:"Charts",value:"charts",href:"/".concat(e,"/charts")},{label:"Portfolio",value:"portfolio",href:"/".concat(e,"/portfolio")}]},{label:"Resources",value:"resources",items:[{label:"XEN.pub Analytics",value:"xenpub",href:"https://xen.pub/"},{label:"XEN Turbo Dashboard",value:"xenturbo",href:"https://xenturbo.io/dashboard"},{label:"Community Blog",value:"blog",href:"https://www.xencrypto.io/category/blog/"},{label:"XENFT Marketplace",value:"xenft_marketplace",href:"https://mastodon.dbxen.org/xenfts"},{label:"Official Testnets",value:"testnets",href:"https://testnet.xen.network/"},{label:"Legal",value:"legal",href:"/legal"}]}]}},1757:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});const r=e=>e?e.split(",").length>1?e.split(",").filter((e=>!!e)):e:null;var o;!function(e){e[e.XEN_CLAIM_RANK=0]="XEN_CLAIM_RANK",e[e.XEN_CLAIM_REWARD=1]="XEN_CLAIM_REWARD",e[e.XEM_CLAIM_RANK_BULK=2]="XEM_CLAIM_RANK_BULK",e[e.XEM_CLAIM_REWARD_BULK=3]="XEM_CLAIM_REWARD_BULK",e[e.XEN_TORRENT_MINT=4]="XEN_TORRENT_MINT",e[e.XEN_TORRENT_REDEEM=5]="XEN_TORRENT_REDEEM",e[e.XEN_STAKE_START=6]="XEN_STAKE_START",e[e.XEN_STAKE_END=7]="XEN_STAKE_END",e[e.XEN_BURN=8]="XEN_BURN"}(o||(o={}));const i=(e,t)=>({contractAddress:e.contractAddress[t],minterAddress:e.minterAddress[t],lowBurnMinterAddress:e.lowBurnMinterAddress[t],stakerAddress:e.stakerAddress[t],burnerAddress:e.burnerAddress[t],tickerAddress:e.tickerAddress[t],knightsAddress:e.knightsAddress[t],tokenizerAddress:e.tokenizerAddress[t],varStakerAddress:e.varStakerAddress[t],dbXenAddress:e.dbXenAddress[t],dbXenViewsAddress:e.dbXenViewsAddress[t],dxnTokenAddress:e.dxnTokenAddress[t],xenlonMarsAddress:e.xenlonMarsAddress[t],xlonTokenAddress:e.xlonTokenAddress[t],fenixAddress:e.fenixAddress[t],xEthAddress:e.xEthAddress[t],xHexAddress:e.xHexAddress[t]});t.Z=e=>{let{config:t}=e;return Object.entries((e=>{let{config:t}=e;return{mainnet:{isTestnet:!1,chainId:"0x1",networkId:"mainnet",name:"Ethereum",currencyUnit:"ETH",gasLimit:3e7,safeMaxVMUs:128,wsURL:r(t.wsUrlOverrides.mainnet)||"wss://ethereum-mainnet.infrafc.org",rpcURL:r(t.rpcUrlOverrides.mainnet)||"https://ethereum-mainnet.infrafc.org",wsURLBTest:r(t.wsUrlOverridesBTest.mainnet),rpcURLBTest:r(t.rpcUrlOverridesBTest.mainnet),explorerUrl:"https://etherscan.io/",logoUrl:"/logos/ethereum-logo.png",xenftMessage:t.xenftMessage.mainnet,...i(t,"mainnet")},bsc:{isTestnet:!1,chainId:"0x".concat(56..toString(16)),networkId:"bsc",currencyUnit:"BNB",gasLimit:13e7,safeMaxVMUs:475,name:"BSC",wsURL:r(t.wsUrlOverrides.bsc),rpcURL:r(t.rpcUrlOverrides.bsc)||"https://cosmopolitan-dark-patron.bsc.quiknode.pro/8a6506a7323756d706402c89b29ae340adde9456/",wsURLBTest:r(t.wsUrlOverridesBTest.bsc),rpcURLBTest:r(t.rpcUrlOverridesBTest.bsc),explorerUrl:"https://bscscan.com/",logoUrl:"/logos/bsc-logo.svg",xenftMessage:t.xenftMessage.bsc,...i(t,"bsc")},polygon:{isTestnet:!1,chainId:"0x".concat(137..toString(16)),networkId:"polygon",currencyUnit:"MATIC",gasLimit:29e6,safeMaxVMUs:128,name:"Polygon",wsURL:r(t.wsUrlOverrides.polygon)||"wss://polygon-pos.infrafc.org",rpcURL:r(t.rpcUrlOverrides.polygon)||"https://polygon-pos.infrafc.org",wsURLBTest:r(t.wsUrlOverridesBTest.polygon),rpcURLBTest:r(t.rpcUrlOverridesBTest.polygon),explorerUrl:"https://polygonscan.com/",logoUrl:"/logos/polygon-logo.png",xenftMessage:t.xenftMessage.polygon,...i(t,"polygon")},avalanche:{isTestnet:!1,chainId:"0x".concat(43114..toString(16)),networkId:"avalanche",currencyUnit:"AVAX",name:"Avalanche C",safeMaxVMUs:72,gasLimit:15e6,wsURL:r(t.wsUrlOverrides.avalanche)||"https://avalanche-mainnet.infrafc.org/ext/bc/C/rpc",rpcURL:r(t.rpcUrlOverrides.avalanche)||"https://avalanche-mainnet.infrafc.org/ext/bc/C/rpc",wsURLBTest:r(t.wsUrlOverridesBTest.avalanche),rpcURLBTest:r(t.rpcUrlOverridesBTest.avalanche),explorerUrl:"https://snowtrace.io/",logoUrl:"/logos/avalanche-logo.png",xenftMessage:t.xenftMessage.avalanche,...i(t,"avalanche")},ethpow:{isTestnet:!1,chainId:"0x".concat(10001..toString(16)),networkId:"ethpow",gasLimit:3e7,safeMaxVMUs:128,currencyUnit:"ETHW",name:"Ethereum PoW",wsURL:r(t.wsUrlOverrides.ethpow)||null,rpcURL:r(t.rpcUrlOverrides.ethpow)||"https://mainnet.ethereumpow.org",wsURLBTest:r(t.wsUrlOverridesBTest.ethpow),rpcURLBTest:r(t.rpcUrlOverridesBTest.ethpow),explorerUrl:"https://www.oklink.com/en/ethw/",logoUrl:"/logos/ethpow-logo.png",xenftMessage:t.xenftMessage.ethpow,...i(t,"ethpow")},moonbeam:{isTestnet:!1,chainId:"0x".concat(1284..toString(16)),networkId:"moonbeam",currencyUnit:"GLMR",name:"Moonbeam",gasLimit:129e5,safeMaxVMUs:55,wsURL:r(t.wsUrlOverrides.moonbeam)||"wss://moonbeam.public.blastapi.io",rpcURL:r(t.rpcUrlOverrides.moonbeam)||"https://rpc.ankr.com/moonbeam",wsURLBTest:r(t.wsUrlOverridesBTest.moonbeam),rpcURLBTest:r(t.rpcUrlOverridesBTest.moonbeam),explorerUrl:"https://moonbeam.moonscan.io/",logoUrl:"/logos/moonbeam-logo.png",xenftMessage:t.xenftMessage.moonbeam,...i(t,"moonbeam")},evmos:{isTestnet:!1,chainId:"0x".concat(9001..toString(16)),networkId:"evmos",currencyUnit:"EVMOS",name:"Evmos",gasLimit:4e7,safeMaxVMUs:200,wsURL:r(t.wsUrlOverrides.evmos)||null,rpcURL:r(t.rpcUrlOverrides.evmos)||"https://evmos-evm.publicnode.com",wsURLBTest:r(t.wsUrlOverridesBTest.evmos),rpcURLBTest:r(t.rpcUrlOverridesBTest.evmos),explorerUrl:"https://evm.evmos.org/",logoUrl:"/logos/evmos-logo.png",xenftMessage:t.xenftMessage.evmos,...i(t,"evmos")},fantom:{isTestnet:!1,chainId:"0x".concat(250..toString(16)),networkId:"fantom",currencyUnit:"FTM",name:"Fantom",safeMaxVMUs:45,gasLimit:1e7,wsURL:r(t.wsUrlOverrides.fantom)||null,rpcURL:r(t.rpcUrlOverrides.fantom)||"https://rpc.ankr.com/fantom/",wsURLBTest:r(t.wsUrlOverridesBTest.fantom),rpcURLBTest:r(t.rpcUrlOverridesBTest.fantom),explorerUrl:"https://ftmscan.com/",logoUrl:"/logos/fantom-logo.svg",xenftMessage:t.xenftMessage.fantom,...i(t,"fantom")},dogechain:{isTestnet:!1,chainId:"0x".concat(2e3.toString(16)),networkId:"dogechain",currencyUnit:"DOGE",name:"Dogechain",wsURL:r(t.wsUrlOverrides.dogechain)||null,rpcURL:r(t.rpcUrlOverrides.dogechain)||"https://rpc.dogechain.dog",wsURLBTest:r(t.wsUrlOverridesBTest.dogechain),rpcURLBTest:r(t.rpcUrlOverridesBTest.dogechain),explorerUrl:"https://explorer.dogechain.dog/",logoUrl:"/logos/dogechain-logo.png",xenftMessage:t.xenftMessage.dogechain,...i(t,"dogechain")},okxchain:{isTestnet:!1,chainId:"0x".concat(66..toString(16)),networkId:"okxchain",currencyUnit:"OKT",name:"OKC (OKX Chain)",safeMaxVMUs:200,gasLimit:5e7,wsURL:r(t.wsUrlOverrides.okxchain)||null,rpcURL:r(t.rpcUrlOverrides.okxchain)||"https://exchainrpc.okex.org",wsURLBTest:r(t.wsUrlOverridesBTest.okxchain),rpcURLBTest:r(t.rpcUrlOverridesBTest.okxchain),eventsUrl:null,eventsTrendsUrl:null,explorerUrl:"https://www.oklink.com/en/okc/",logoUrl:"/logos/okx-logo.svg",xenftMessage:t.xenftMessage.okxchain,...i(t,"okxchain")},"pulse-chain":{isTestnet:!1,chainId:"0x171",networkId:"pulse-chain",currencyUnit:"PLS",name:"PulseChain",gasLimit:3e7,gasFactor:1.1,safeMaxVMUs:128,wsURL:r(t.wsUrlOverrides["pulse-chain"]),rpcURL:r(t.rpcUrlOverrides["pulse-chain"])||"https://rpc.pulsechain.com",explorerUrl:"https://scan.pulsechain.com/",logoUrl:"/logos/pulse-chain-logo.png",xenftMessage:t.xenftMessage["pulse-chain"],...i(t,"pulse-chain")},"pulse-chain-og":{isTestnet:!1,chainId:"0x171",networkId:"pulse-chain-og",currencyUnit:"PLS",name:"PulseChain OG",gasLimit:3e7,safeMaxVMUs:128,wsURL:r(t.wsUrlOverrides["pulse-chain-og"]),rpcURL:r(t.rpcUrlOverrides["pulse-chain-og"])||"https://rpc.pulsechain.com",explorerUrl:"https://scan.pulsechain.com/",logoUrl:"/logos/pulse-chain-logo.png",xenftMessage:t.xenftMessage["pulse-chain-og"],...i(t,"pulse-chain-og"),allowedOps:[o.XEN_TORRENT_REDEEM]},optimism:{isTestnet:!1,chainId:"0xa",networkId:"optimism",currencyUnit:"ETH",name:"Optimism",gasLimit:3e7,safeMaxVMUs:128,wsURL:r(t.wsUrlOverrides.optimism),rpcURL:r(t.rpcUrlOverrides.optimism),wsURLBTest:r(t.wsUrlOverridesBTest.optimism),rpcURLBTest:r(t.rpcUrlOverridesBTest.optimism),explorerUrl:"https://optimistic.etherscan.io/",logoUrl:"/logos/optimism-logo.png",xenftMessage:t.xenftMessage.optimism,...i(t,"optimism")},base:{isTestnet:!1,chainId:"0x2105",networkId:"base",currencyUnit:"ETH",name:"Base",gasLimit:3e7,safeMaxVMUs:145,wsURL:r(t.wsUrlOverrides.base),rpcURL:r(t.rpcUrlOverrides.base)||"https://mainnet.base.org",wsURLBTest:r(t.wsUrlOverridesBTest.base),rpcURLBTest:r(t.rpcUrlOverridesBTest.base),explorerUrl:"https://basescan.org/",logoUrl:"/logos/base-logo.svg",xenftMessage:t.xenftMessage.base,...i(t,"base")},sepolia:{isTestnet:!0,gasLimit:3e7,safeMaxVMUs:128,chainId:"0xaa36a7",networkId:"sepolia",name:"Sepolia Testnet",currencyUnit:"SEP",wsURL:r(t.wsUrlOverrides.sepolia),rpcURL:r(t.rpcUrlOverrides.sepolia),explorerUrl:"https://sepolia.etherscan.io/",logoUrl:"/logos/ethereum-logo.png",...i(t,"sepolia")},holesky:{isTestnet:!0,gasLimit:3e7,safeMaxVMUs:128,chainId:"0x4268",networkId:"holesky",name:"Holesky Testnet",currencyUnit:"ETH",wsURL:r(t.wsUrlOverrides.holesky),rpcURL:r(t.rpcUrlOverrides.holesky),explorerUrl:"https://holesky.etherscan.io/",logoUrl:"/logos/ethereum-logo.png",...i(t,"holesky")},"bsc-testnet":{isTestnet:!0,chainId:"0x61",networkId:"bsc-testnet",name:"BSC Testnet",wsURL:r(t.wsUrlOverrides["bsc-testnet"]),rpcURL:r(t.rpcUrlOverrides["bsc-testnet"])||"https://data-seed-prebsc-1-s1.binance.org:8545",explorerUrl:"https://testnet.bscscan.com/",logoUrl:"",xenftMessage:t.xenftMessage["bsc-testnet"],...i(t,"bsc-testnet")},"pulse-testnet":{isTestnet:!0,chainId:"0x171",networkId:"pulse-testnet",currencyUnit:"PLS",name:"PulseChain X",gasLimit:3e7,safeMaxVMUs:128,wsURL:r(t.wsUrlOverrides["pulse-testnet"]),rpcURL:r(t.rpcUrlOverrides["pulse-testnet"])||"https://rpc.pulsechain.com",explorerUrl:"https://scan.pulsechain.com/",logoUrl:"/logos/pulse-chain-logo.png",xenftMessage:t.xenftMessage["pulse-testnet"],...i(t,"pulse-testnet")},mumbai:{isTestnet:!0,gasLimit:2e7,chainId:"0x13881",networkId:"mumbai",name:"Mumbai Testnet",currencyUnit:"MATIC",wsURL:r(t.wsUrlOverrides.mumbai),rpcURL:r(t.rpcUrlOverrides.mumbai),explorerUrl:"https://mumbai.polygonscan.com/",logoUrl:"/logos/polygon-logo.png",xenftMessage:t.xenftMessage.mumbai,...i(t,"mumbai")},moonbase:{isTestnet:!0,chainId:"0x".concat(1287..toString(16)),networkId:"moonbase",name:"Moonbase Alpha",currencyUnit:"DEV",wsURL:r(t.wsUrlOverrides.moonbase)||"wss://wss.api.moonbase.moonbeam.network",rpcURL:r(t.rpcUrlOverrides.moonbase)||"https://rpc.api.moonbase.moonbeam.network",explorerUrl:"https://moonbase.moonscan.io/",logoUrl:"/logos/moonbase-logo.svg",xenftMessage:t.xenftMessage.moonbase,...i(t,"moonbase")},"evmos-testnet":{isTestnet:!0,chainId:"0x".concat(9e3.toString(16)),networkId:"evmos-testnet",name:"Evmos Testnet",currencyUnit:"PHOTON",wsURL:r(t.wsUrlOverrides["evmos-testnet"])||"",rpcURL:r(t.rpcUrlOverrides["evmos-testnet"])||"https://jsonrpc-t.evmos.nodestake.top",explorerUrl:"https://testnet.mintscan.io/evmos-testnet/",logoUrl:"/logos/evmos-logo.png",xenftMessage:t.xenftMessage["evmos-testnet"],...i(t,"evmos-testnet")},"fantom-testnet":{isTestnet:!0,chainId:"0x".concat(4002..toString(16)),networkId:"fantom-testnet",name:"Fantom Testnet",safeMaxVMUs:45,gasLimit:1e7,currencyUnit:"FTM",wsURL:r(t.wsUrlOverrides["fantom-testnet"])||"",rpcURL:r(t.rpcUrlOverrides["fantom-testnet"])||"https://rpc.ankr.com/fantom_testnet",explorerUrl:"https://testnet.ftmscan.com/",logoUrl:"/logos/fantom-logo.svg",xenftMessage:t.xenftMessage["fantom-testnet"],...i(t,"fantom-testnet")},"avalanche-testnet":{isTestnet:!0,chainId:"0x".concat(43113..toString(16)),networkId:"avalanche-testnet",name:"Avalanche Fuji Testnet",safeMaxVMUs:42,gasLimit:8e6,currencyUnit:"AVAX",wsURL:r(t.wsUrlOverrides["avalanche-testnet"])||"",rpcURL:r(t.rpcUrlOverrides["avalanche-testnet"])||"https://rpc.ankr.com/avalanche_fuji",explorerUrl:"https://testnet.snowtrace.io/",logoUrl:"/logos/avalanche-logo.png",xenftMessage:t.xenftMessage["avalanche-testnet"],...i(t,"avalanche-testnet")}}})({config:t})).reduce(((e,n)=>{let[r,o]=n;return o.isTestnet===!!t.isTestnet&&t.supportedChains.includes(o.networkId)&&(e[r]=o),e}),{})}},88416:function(e,t,n){"use strict";n.d(t,{$:function(){return Jt},D:function(){return Qt}});var r={};n.r(r),n.d(r,{hasBrowserEnv:function(){return ye},hasStandardBrowserEnv:function(){return be},hasStandardBrowserWebWorkerEnv:function(){return we}});var o=n(85893),i=n(67294),s=n(91742),a=n(61688),c=n(10046);const u=i.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),l={dedupe:!0};c.$l.defineProperty(c.J$,"defaultValue",{value:c.u_});const d=(0,c.s6)(((e,t,n)=>{const{cache:r,compare:o,suspense:s,fallbackData:d,revalidateOnMount:f,revalidateIfStale:h,refreshInterval:p,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:y}=n,[b,v,w,x]=c.DY.get(r),[E,_]=(0,c.qC)(e),k=(0,i.useRef)(!1),S=(0,i.useRef)(!1),I=(0,i.useRef)(E),C=(0,i.useRef)(t),T=(0,i.useRef)(n),A=()=>T.current,P=()=>A().isVisible()&&A().isOnline(),[O,j,M,R]=(0,c.JN)(r,E),B=(0,i.useRef)({}).current,N=(0,c.o8)(d)?n.fallback[E]:d,L=(e,t)=>{for(const n in B){const r=n;if("data"===r){if(!o(e[r],t[r])){if(!(0,c.o8)(e[r]))return!1;if(!o(W,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},U=(0,i.useMemo)((()=>{const e=!!E&&!!t&&((0,c.o8)(f)?!A().isPaused()&&!s&&(!!(0,c.o8)(h)||h):f),n=t=>{const n=(0,c.PM)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=O(),o=R(),i=n(r),a=r===o?i:n(o);let u=i;return[()=>{const e=n(O());return L(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>a]}),[r,E]),D=(0,a.useSyncExternalStore)((0,i.useCallback)((e=>M(E,((t,n)=>{L(n,t)||e()}))),[r,E]),U[0],U[1]),F=!k.current,z=b[E]&&b[E].length>0,$=D.data,q=(0,c.o8)($)?N:$,Z=D.error,H=(0,i.useRef)(q),W=y?(0,c.o8)($)?H.current:$:q,G=!(z&&!(0,c.o8)(Z))&&(F&&!(0,c.o8)(f)?f:!A().isPaused()&&(s?!(0,c.o8)(q)&&h:(0,c.o8)(q)||h)),K=!!(E&&t&&F&&G),V=(0,c.o8)(D.isValidating)?K:D.isValidating,X=(0,c.o8)(D.isLoading)?K:D.isLoading,Y=(0,i.useCallback)((async e=>{const t=C.current;if(!E||!t||S.current||A().isPaused())return!1;let r,i,s=!0;const a=e||{},u=!w[E]||!a.dedupe,l=()=>c.w6?!S.current&&E===I.current&&k.current:E===I.current,d={isValidating:!1,isLoading:!1},f=()=>{j(d)},h=()=>{const e=w[E];e&&e[1]===i&&delete w[E]},p={isValidating:!0};(0,c.o8)(O().data)&&(p.isLoading=!0);try{if(u&&(j(p),n.loadingTimeout&&(0,c.o8)(O().data)&&setTimeout((()=>{s&&l()&&A().onLoadingSlow(E,n)}),n.loadingTimeout),w[E]=[t(_),(0,c.u3)()]),[r,i]=w[E],r=await r,u&&setTimeout(h,n.dedupingInterval),!w[E]||w[E][1]!==i)return u&&l()&&A().onDiscarded(E),!1;d.error=c.i_;const e=v[E];if(!(0,c.o8)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),u&&l()&&A().onDiscarded(E),!1;const a=O().data;d.data=o(a,r)?a:r,u&&l()&&A().onSuccess(r,E,n)}catch(m){h();const e=A(),{shouldRetryOnError:t}=e;e.isPaused()||(d.error=m,u&&l()&&(e.onError(m,E,e),(!0===t||(0,c.mf)(t)&&t(m))&&(A().revalidateOnFocus&&A().revalidateOnReconnect&&!P()||e.onErrorRetry(m,E,e,(e=>{const t=b[E];t&&t[0]&&t[0](c.sj.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(a.retryCount||0)+1,dedupe:!0}))))}return s=!1,f(),!0}),[E,r]),J=(0,i.useCallback)(((...e)=>(0,c.BN)(r,I.current,...e)),[]);if((0,c.LI)((()=>{C.current=t,T.current=n,(0,c.o8)($)||(H.current=$)})),(0,c.LI)((()=>{if(!E)return;const e=Y.bind(c.i_,l);let t=0;const n=(0,c.ko)(E,b,((n,r={})=>{if(n==c.sj.FOCUS_EVENT){const n=Date.now();A().revalidateOnFocus&&n>t&&P()&&(t=n+A().focusThrottleInterval,e())}else if(n==c.sj.RECONNECT_EVENT)A().revalidateOnReconnect&&P()&&e();else{if(n==c.sj.MUTATE_EVENT)return Y();if(n==c.sj.ERROR_REVALIDATE_EVENT)return Y(r)}}));return S.current=!1,I.current=E,k.current=!0,j({_k:_}),G&&((0,c.o8)(q)||c.W6?e():(0,c.kw)(e)),()=>{S.current=!0,n()}}),[E]),(0,c.LI)((()=>{let e;function t(){const t=(0,c.mf)(p)?p(O().data):p;t&&-1!==e&&(e=setTimeout(n,t))}function n(){O().error||!m&&!A().isVisible()||!g&&!A().isOnline()?t():Y(l).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[p,m,g,E]),(0,i.useDebugValue)(W),s&&(0,c.o8)(q)&&E){if(!c.w6&&c.W6)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,T.current=n,S.current=!1;const e=x[E];if(!(0,c.o8)(e)){const t=J(e);u(t)}if(!(0,c.o8)(Z))throw Z;{const e=Y(l);(0,c.o8)(W)||(e.status="fulfilled",e.value=!0),u(e)}}return{mutate:J,get data(){return B.data=!0,W},get error(){return B.error=!0,Z},get isValidating(){return B.isValidating=!0,V},get isLoading(){return B.isLoading=!0,X}}})),f=e=>(0,c.qC)(e?e(0,null):null)[0],h=Promise.resolve(),p=(0,c.xD)(d,(e=>(t,n,r)=>{const o=(0,i.useRef)(!1),{cache:s,initialSize:u=1,revalidateAll:l=!1,persistSize:d=!1,revalidateFirstPage:p=!0,revalidateOnMount:m=!1,parallel:g=!1}=r,[,,,y]=c.DY.get(c.Fs);let b;try{b=f(t),b&&(b=c.UG+b)}catch(A){}const[v,w,x]=(0,c.JN)(s,b),E=(0,i.useCallback)((()=>(0,c.o8)(v()._l)?u:v()._l),[s,b,u]);(0,a.useSyncExternalStore)((0,i.useCallback)((e=>b?x(b,(()=>{e()})):()=>{}),[s,b]),E,E);const _=(0,i.useCallback)((()=>{const e=v()._l;return(0,c.o8)(e)?u:e}),[b,u]),k=(0,i.useRef)(_());(0,c.LI)((()=>{o.current?b&&w({_l:d?k.current:_()}):o.current=!0}),[b,s]);const S=m&&!o.current,I=e(b,(async e=>{const o=v()._i,i=v()._r;w({_r:c.i_});const a=[],u=_(),[d]=(0,c.JN)(s,e),f=d().data,h=[];let m=null;for(let b=0;b<u;++b){const[e,u]=(0,c.qC)(t(b,g?null:m));if(!e)break;const[d,v]=(0,c.JN)(s,e);let w=d().data;const x=l||o||(0,c.o8)(w)||p&&!b&&!(0,c.o8)(f)||S||f&&!(0,c.o8)(f[b])&&!r.compare(f[b],w);if(n&&("function"===typeof i?i(w,u):x)){const t=async()=>{if(e in y){const t=y[e];delete y[e],w=await t}else w=await n(u);v({data:w,_k:u}),a[b]=w};g?h.push(t):await t()}else a[b]=w;g||(m=w)}return g&&await Promise.all(h.map((e=>e()))),w({_i:c.i_}),a}),r),C=(0,i.useCallback)((function(e,t){const n="boolean"===typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return b?(r&&((0,c.o8)(e)?w({_i:!0,_r:n.revalidate}):w({_i:!1,_r:n.revalidate})),arguments.length?I.mutate(e,{...n,revalidate:r}):I.mutate()):h}),[b,s]),T=(0,i.useCallback)((e=>{if(!b)return h;const[,n]=(0,c.JN)(s,b);let r;if((0,c.mf)(e)?r=e(_()):"number"==typeof e&&(r=e),"number"!=typeof r)return h;n({_l:r}),k.current=r;const o=[],[i]=(0,c.JN)(s,b);let a=null;for(let u=0;u<r;++u){const[e]=(0,c.qC)(t(u,a)),[n]=(0,c.JN)(s,e),r=e?n().data:c.i_;if((0,c.o8)(r))return C(i().data);o.push(r),a=r}return C(o)}),[b,s,C,_]);return{size:_(),setSize:T,mutate:C,get data(){return I.data},get error(){return I.error},get isValidating(){return I.isValidating},get isLoading(){return I.isLoading}}})),m=e=>t=>t>e.length-1?null:e[t];var g=n(17273);function y(e,t){return function(){return e.apply(t,arguments)}}const{toString:b}=Object.prototype,{getPrototypeOf:v}=Object,w=(x=Object.create(null),e=>{const t=b.call(e);return x[t]||(x[t]=t.slice(8,-1).toLowerCase())});var x;const E=e=>(e=e.toLowerCase(),t=>w(t)===e),_=e=>t=>typeof t===e,{isArray:k}=Array,S=_("undefined");const I=E("ArrayBuffer");const C=_("string"),T=_("function"),A=_("number"),P=e=>null!==e&&"object"===typeof e,O=e=>{if("object"!==w(e))return!1;const t=v(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},j=E("Date"),M=E("File"),R=E("Blob"),B=E("FileList"),N=E("URLSearchParams");function L(e,t,{allOwnKeys:n=!1}={}){if(null===e||"undefined"===typeof e)return;let r,o;if("object"!==typeof e&&(e=[e]),k(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function U(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const D="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,F=e=>!S(e)&&e!==D;const z=($="undefined"!==typeof Uint8Array&&v(Uint8Array),e=>$&&e instanceof $);var $;const q=E("HTMLFormElement"),Z=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),H=E("RegExp"),W=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};L(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},G="abcdefghijklmnopqrstuvwxyz",K="0123456789",V={DIGIT:K,ALPHA:G,ALPHA_DIGIT:G+G.toUpperCase()+K};const X=E("AsyncFunction");var Y={isArray:k,isArrayBuffer:I,isBuffer:function(e){return null!==e&&!S(e)&&null!==e.constructor&&!S(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||T(e.append)&&("formdata"===(t=w(e))||"object"===t&&T(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&I(e.buffer),t},isString:C,isNumber:A,isBoolean:e=>!0===e||!1===e,isObject:P,isPlainObject:O,isUndefined:S,isDate:j,isFile:M,isBlob:R,isRegExp:H,isFunction:T,isStream:e=>P(e)&&T(e.pipe),isURLSearchParams:N,isTypedArray:z,isFileList:B,forEach:L,merge:function e(){const{caseless:t}=F(this)&&this||{},n={},r=(r,o)=>{const i=t&&U(n,o)||o;O(n[i])&&O(r)?n[i]=e(n[i],r):O(r)?n[i]=e({},r):k(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&L(arguments[o],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(L(t,((t,r)=>{n&&T(t)?e[r]=y(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&v(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:w,kindOfTest:E,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!A(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:q,hasOwnProperty:Z,hasOwnProp:Z,reduceDescriptors:W,freezeMethods:e=>{W(e,((t,n)=>{if(T(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];T(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return k(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:U,global:D,isContextDefined:F,ALPHABET:V,generateString:(e=16,t=V.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&T(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(P(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=k(e)?[]:{};return L(e,((e,t)=>{const i=n(e,r+1);!S(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:X,isThenable:e=>e&&(P(e)||T(e))&&T(e.then)&&T(e.catch)};function J(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Q=J.prototype,ee={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ee[e]={value:e}})),Object.defineProperties(J,ee),Object.defineProperty(Q,"isAxiosError",{value:!0}),J.from=(e,t,n,r,o,i)=>{const s=Object.create(Q);return Y.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var te=J,ne=n(48764).Buffer;function re(e){return Y.isPlainObject(e)||Y.isArray(e)}function oe(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function ie(e,t,n){return e?e.concat(t).map((function(e,t){return e=oe(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const se=Y.toFlatObject(Y,{},null,(function(e){return/^is[A-Z]/.test(e)}));var ae=function(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Y.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!==typeof Blob&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Y.isDate(e))return e.toISOString();if(!a&&Y.isBlob(e))throw new te("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(e)||Y.isTypedArray(e)?a&&"function"===typeof Blob?new Blob([e]):ne.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"===typeof e)if(Y.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Y.isArray(e)&&function(e){return Y.isArray(e)&&!e.some(re)}(e)||(Y.isFileList(e)||Y.endsWith(n,"[]"))&&(a=Y.toArray(e)))return n=oe(n),a.forEach((function(e,r){!Y.isUndefined(e)&&null!==e&&t.append(!0===s?ie([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!re(e)||(t.append(ie(o,n,i),c(e)),!1)}const l=[],d=Object.assign(se,{defaultVisitor:u,convertValue:c,isVisitable:re});if(!Y.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Y.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Y.forEach(n,(function(n,i){!0===(!(Y.isUndefined(n)||null===n)&&o.call(t,n,Y.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function ce(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ue(e,t){this._pairs=[],e&&ae(e,this,t)}const le=ue.prototype;le.append=function(e,t){this._pairs.push([e,t])},le.toString=function(e){const t=e?function(t){return e.call(this,t,ce)}:ce;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var de=ue;function fe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function he(e,t,n){if(!t)return e;const r=n&&n.encode||fe,o=n&&n.serialize;let i;if(i=o?o(t,n):Y.isURLSearchParams(t)?t.toString():new de(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}var pe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Y.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ge={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:de,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ye="undefined"!==typeof window&&"undefined"!==typeof document,be=(ve="undefined"!==typeof navigator&&navigator.product,ye&&["ReactNative","NativeScript","NS"].indexOf(ve)<0);var ve;const we="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts;var xe={...r,...ge};var Ee=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&Y.isArray(r)?r.length:i,a)return Y.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&Y.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Y.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,((e,r)=>{t(function(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const _e={transitional:me,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Y.isObject(e);o&&Y.isHTMLForm(e)&&(e=new FormData(e));if(Y.isFormData(e))return r?JSON.stringify(Ee(e)):e;if(Y.isArrayBuffer(e)||Y.isBuffer(e)||Y.isStream(e)||Y.isFile(e)||Y.isBlob(e))return e;if(Y.isArrayBufferView(e))return e.buffer;if(Y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ae(e,new xe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return xe.isNode&&Y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Y.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ae(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||_e.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Y.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw te.from(o,te.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],(e=>{_e.headers[e]={}}));var ke=_e;const Se=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Ie=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function Te(e){return!1===e||null==e?e:Y.isArray(e)?e.map(Te):String(e)}function Ae(e,t,n,r,o){return Y.isFunction(r)?r.call(this,t,n):(o&&(t=n),Y.isString(t)?Y.isString(r)?-1!==t.indexOf(r):Y.isRegExp(r)?r.test(t):void 0:void 0)}class Pe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Ce(t);if(!o)throw new Error("header name must be a non-empty string");const i=Y.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Te(e))}const i=(e,t)=>Y.forEach(e,((e,n)=>o(e,n,t)));return Y.isPlainObject(e)||e instanceof this.constructor?i(e,t):Y.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Se[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=Ce(e)){const n=Y.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Y.isFunction(t))return t.call(this,e,n);if(Y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ce(e)){const n=Y.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ae(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Ce(e)){const o=Y.findKey(n,e);!o||t&&!Ae(0,n[o],o,t)||(delete n[o],r=!0)}}return Y.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ae(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Y.forEach(this,((r,o)=>{const i=Y.findKey(n,o);if(i)return t[i]=Te(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Te(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Y.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Y.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ie]=this[Ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ce(e);t[r]||(!function(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Y.isArray(e)?e.forEach(r):r(e),this}}Pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Pe.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Y.freezeMethods(Pe);var Oe=Pe;function je(e,t){const n=this||ke,r=t||n,o=Oe.from(r.headers);let i=r.data;return Y.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function Re(e,t,n){te.call(this,null==e?"canceled":e,te.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Re,te,{__CANCEL__:!0});var Be=Re;var Ne=xe.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];Y.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),Y.isString(r)&&s.push("path="+r),Y.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Ue=xe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Y.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};var De=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}};function Fe(e,t){let n=0;const r=De(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}var ze="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Oe.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(Y.isFormData(r))if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const d=Le(e.baseURL,e.url);function f(){if(!l)return;const r=Oe.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new te("Request failed with status code "+n.status,[te.ERR_BAD_REQUEST,te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),he(d,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(f)},l.onabort=function(){l&&(n(new te("Request aborted",te.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new te("Network Error",te.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||me;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new te(t,r.clarifyTimeoutError?te.ETIMEDOUT:te.ECONNABORTED,e,l)),l=null},xe.hasStandardBrowserEnv&&(c&&Y.isFunction(c)&&(c=c(e)),c||!1!==c&&Ue(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&Ne.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&Y.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),Y.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&l.addEventListener("progress",Fe(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Fe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new Be(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);h&&-1===xe.protocols.indexOf(h)?n(new te("Unsupported protocol "+h+":",te.ERR_BAD_REQUEST,e)):l.send(r||null)}))};const $e={http:null,xhr:ze};Y.forEach($e,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const qe=e=>`- ${e}`,Ze=e=>Y.isFunction(e)||null===e||!1===e;var He=e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Ze(n)&&(r=$e[(t=String(n)).toLowerCase()],void 0===r))throw new te(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(qe).join("\n"):" "+qe(e[0]):"as no adapter specified";throw new te("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function We(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Be(null,e)}function Ge(e){We(e),e.headers=Oe.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return He(e.adapter||ke.adapter)(e).then((function(t){return We(e),t.data=je.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t}),(function(t){return Me(t)||(We(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)}))}const Ke=e=>e instanceof Oe?{...e}:e;function Ve(e,t){t=t||{};const n={};function r(e,t,n){return Y.isPlainObject(e)&&Y.isPlainObject(t)?Y.merge.call({caseless:n},e,t):Y.isPlainObject(t)?Y.merge({},t):Y.isArray(t)?t.slice():t}function o(e,t,n){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!Y.isUndefined(t))return r(void 0,t)}function s(e,t){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Ke(e),Ke(t),!0)};return Y.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);Y.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Xe="1.6.8",Ye={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ye[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Je={};Ye.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new te(r(o," has been removed"+(t?" in "+t:"")),te.ERR_DEPRECATED);return t&&!Je[o]&&(Je[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Qe={assertOptions:function(e,t,n){if("object"!==typeof e)throw new te("options must be an object",te.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new te("option "+i+" must be "+n,te.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new te("Unknown option "+i,te.ERR_BAD_OPTION)}},validators:Ye};const et=Qe.validators;class tt{constructor(e){this.defaults=e,this.interceptors={request:new pe,response:new pe}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Ve(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Qe.assertOptions(n,{silentJSONParsing:et.transitional(et.boolean),forcedJSONParsing:et.transitional(et.boolean),clarifyTimeoutError:et.transitional(et.boolean)},!1),null!=r&&(Y.isFunction(r)?t.paramsSerializer={serialize:r}:Qe.assertOptions(r,{encode:et.function,serialize:et.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Y.merge(o.common,o[t.method]);o&&Y.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Oe.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[Ge.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let f=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{f=e(f)}catch(h){t.call(this,h);break}}try{u=Ge.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return he(Le((e=Ve(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Y.forEach(["delete","get","head","options"],(function(e){tt.prototype[e]=function(t,n){return this.request(Ve(n||{},{method:e,url:t,data:(n||{}).data}))}})),Y.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ve(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}tt.prototype[e]=t(),tt.prototype[e+"Form"]=t(!0)}));var nt=tt;class rt{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Be(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new rt((function(t){e=t}));return{token:t,cancel:e}}}var ot=rt;const it={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(it).forEach((([e,t])=>{it[t]=e}));var st=it;const at=function e(t){const n=new nt(t),r=y(nt.prototype.request,n);return Y.extend(r,nt.prototype,n,{allOwnKeys:!0}),Y.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ve(t,n))},r}(ke);at.Axios=nt,at.CanceledError=Be,at.CancelToken=ot,at.isCancel=Me,at.VERSION=Xe,at.toFormData=ae,at.AxiosError=te,at.Cancel=at.CanceledError,at.all=function(e){return Promise.all(e)},at.spread=function(e){return function(t){return e.apply(null,t)}},at.isAxiosError=function(e){return Y.isObject(e)&&!0===e.isAxiosError},at.mergeConfig=Ve,at.AxiosHeaders=Oe,at.formToJSON=e=>Ee(Y.isHTMLForm(e)?new FormData(e):e),at.getAdapter=He,at.HttpStatusCode=st,at.default=at;var ct=at,ut=(n(76427),n(48764)),lt=function(){return lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lt.apply(this,arguments)},dt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";(()=>{const e=Array(256).fill(-1);for(let t=0;t<dt.length;++t)e[dt.charCodeAt(t)]=t})();var ft,ht,pt,mt=e=>{if(!e||"string"!=typeof e)throw new Error(`Expected base58 string but got \u201c${e}\u201d`);if(e.match(/[IOl0]/gmu))throw new Error(`Invalid base58 character \u201c${e.match(/[IOl0]/gmu)}\u201d`);const t=e.match(/^1+/gmu),n=t?t[0].length:0,r=(e.length-n)*(Math.log(58)/Math.log(256))+1>>>0;return new Uint8Array([...new Uint8Array(n),...e.match(/.{1}/gmu).map((e=>dt.indexOf(e))).reduce(((e,t)=>e.map((e=>{const n=58*e+t;return t=n>>8,n}))),new Uint8Array(r)).reverse().filter((o=!1,e=>o=o||e))]);var o},gt=(ft=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={};for(let d=0;d<32;d++){const e=n.charAt(d);r[e]=d}function o(e){const t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){let t=1;for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=o(t)^r>>5}t=o(t);for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);t=o(t)^31&r}return t}function s(e,t,n,r){let o=0,i=0;const s=(1<<n)-1,a=[];for(let c=0;c<e.length;++c)for(o=o<<t|e[c],i+=t;i>=n;)i-=n,a.push(o>>i&s);if(r)i>0&&a.push(o<<n-i&s);else{if(i>=t)return"Excess padding";if(o<<n-i&s)return"Non-zero padding"}return a}function a(e){return s(e,8,5,!0)}function c(e){const t=s(e,5,8,!1);if(Array.isArray(t))return t}function u(e){const t=s(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function s(e,n){if(n=n||90,e.length<8)return e+" too short";if(e.length>n)return"Exceeds length limit";const s=e.toLowerCase(),a=e.toUpperCase();if(e!==s&&e!==a)return"Mixed-case string "+e;const c=(e=s).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;const u=e.slice(0,c),l=e.slice(c+1);if(l.length<6)return"Data too short";let d=i(u);if("string"==typeof d)return d;const f=[];for(let t=0;t<l.length;++t){const e=l.charAt(t),n=r[e];if(void 0===n)return"Unknown character "+e;d=o(d)^n,t+6>=l.length||f.push(n)}return d!==t?"Invalid checksum for "+e:{prefix:u,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const n=s(e,t);if("object"==typeof n)return n},decode:function(e,t){const n=s(e,t);if("object"==typeof n)return n;throw new Error(n)},encode:function(e,r,s){if(s=s||90,e.length+7+r.length>s)throw new TypeError("Exceeds length limit");let a=i(e=e.toLowerCase());if("string"==typeof a)throw new Error(a);let c=e+"1";for(let t=0;t<r.length;++t){const e=r[t];if(e>>5!=0)throw new Error("Non 5-bit word");a=o(a)^e,c+=n.charAt(e)}for(let t=0;t<6;++t)a=o(a);a^=t;for(let t=0;t<6;++t)c+=n.charAt(a>>5*(5-t)&31);return c},toWords:a,fromWordsUnsafe:c,fromWords:u}}t.bech32=l("bech32"),t.bech32m=l("bech32m")},ft(ht={exports:{}},ht.exports),ht.exports);(pt=gt)&&pt.__esModule&&Object.prototype.hasOwnProperty.call(pt,"default")&&pt.default;var yt=gt.bech32m,bt=gt.bech32;const vt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];class wt{constructor(){this.A=1779033703,this.B=-1150833019,this.C=1013904242,this.D=-1521486534,this.E=1359893119,this.F=-1694144372,this.G=528734635,this.H=1541459225,this._size=0,this._sp=0,(!Et||_t>=8e3)&&(Et=new ArrayBuffer(8e3),_t=0),this._byte=new Uint8Array(Et,_t,80),this._word=new Int32Array(Et,_t,20),_t+=80}update(e){if("string"==typeof e)return this._utf8(e);if(null==e)throw new TypeError("Invalid type: "+typeof e);const t=e.byteOffset,n=e.byteLength;let r=n/64|0,o=0;if(r&&!(3&t)&&!(this._size%64)){const n=new Int32Array(e.buffer,t,16*r);for(;r--;)this._int32(n,o>>2),o+=64;this._size+=o}if(1!==e.BYTES_PER_ELEMENT&&e.buffer){const r=new Uint8Array(e.buffer,t+o,n-o);return this._uint8(r)}return o===n?this:this._uint8(e,o)}_uint8(e,t){const{_byte:n,_word:r}=this,o=e.length;for(t|=0;t<o;){const i=this._size%64;let s=i;for(;t<o&&s<64;)n[s++]=e[t++];s>=64&&this._int32(r),this._size+=s-i}return this}_utf8(e){const{_byte:t,_word:n}=this,r=e.length;let o=this._sp;for(let i=0;i<r;){const s=this._size%64;let a=s;for(;i<r&&a<64;){let n=0|e.charCodeAt(i++);n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<55296||n>57343?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):o?(n=((1023&o)<<10)+(1023&n)+65536,t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n,o=0):o=n}a>=64&&(this._int32(n),n[0]=n[16]),this._size+=a-s}return this._sp=o,this}_int32(e,t){let{A:n,B:r,C:o,D:i,E:s,F:a,G:c,H:u}=this,l=0;for(t|=0;l<16;)xt[l++]=St(e[t++]);for(l=16;l<64;l++)xt[l]=Ot(xt[l-2])+xt[l-7]+Pt(xt[l-15])+xt[l-16]|0;for(l=0;l<64;l++){const e=u+At(s)+It(s,a,c)+vt[l]+xt[l]|0,t=Tt(n)+Ct(n,r,o)|0;u=c,c=a,a=s,s=i+e|0,i=o,o=r,r=n,n=e+t|0}this.A=n+this.A|0,this.B=r+this.B|0,this.C=o+this.C|0,this.D=i+this.D|0,this.E=s+this.E|0,this.F=a+this.F|0,this.G=c+this.G|0,this.H=u+this.H|0}digest(e){const{_byte:t,_word:n}=this;let r=this._size%64|0;for(t[r++]=128;3&r;)t[r++]=0;if(r>>=2,r>14){for(;r<16;)n[r++]=0;r=0,this._int32(n)}for(;r<16;)n[r++]=0;const o=8*this._size,i=(4294967295&o)>>>0,s=(o-i)/4294967296;return s&&(n[14]=St(s)),i&&(n[15]=St(i)),this._int32(n),"hex"===e?this._hex():this._bin()}_hex(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a}=this;return kt(e)+kt(t)+kt(n)+kt(r)+kt(o)+kt(i)+kt(s)+kt(a)}_bin(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a,_byte:c,_word:u}=this;return u[0]=St(e),u[1]=St(t),u[2]=St(n),u[3]=St(r),u[4]=St(o),u[5]=St(i),u[6]=St(s),u[7]=St(a),c.slice(0,32)}}const xt=new Int32Array(64);let Et,_t=0;const kt=e=>(e+4294967296).toString(16).substr(-8),St=254===new Uint8Array(new Uint16Array([65279]).buffer)[0]?e=>e:e=>e<<24&4278190080|e<<8&16711680|e>>8&65280|e>>24&255,It=(e,t,n)=>n^e&(t^n),Ct=(e,t,n)=>e&t|n&(e|t),Tt=e=>(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),At=e=>(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7),Pt=e=>(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,Ot=e=>(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10;var jt,Mt,Rt=function(e){return(new wt).update(e).digest()};!function(e){e.mainnet="mainnet",e.testnet="testnet",e.regtest="regtest"}(jt||(jt={})),function(e){e.p2pkh="p2pkh",e.p2sh="p2sh",e.p2wpkh="p2wpkh",e.p2wsh="p2wsh",e.p2tr="p2tr"}(Mt||(Mt={}));var Bt={0:{type:Mt.p2pkh,network:jt.mainnet},111:{type:Mt.p2pkh,network:jt.testnet},5:{type:Mt.p2sh,network:jt.mainnet},196:{type:Mt.p2sh,network:jt.testnet}},Nt=function(e){var t,n=e.substr(0,2).toLowerCase();if("bc"===n||"tb"===n)return function(e){var t;try{t=e.startsWith("bc1p")||e.startsWith("tb1p")||e.startsWith("bcrt1p")?yt.decode(e):bt.decode(e)}catch(e){throw new Error("Invalid address")}var n={bc:jt.mainnet,tb:jt.testnet,bcrt:jt.regtest}[t.prefix];if(void 0===n)throw new Error("Invalid address");var r=t.words[0];if(r<0||r>16)throw new Error("Invalid address");return{bech32:!0,network:n,address:e,type:20===bt.fromWords(t.words.slice(1)).length?Mt.p2wpkh:1===r?Mt.p2tr:Mt.p2wsh}}(e);try{t=mt(e)}catch(lt){throw new Error("Invalid address")}var r=t.length;if(25!==r)throw new Error("Invalid address");var o=t[0],i=t.slice(r-4,r),s=t.slice(0,r-4),a=Rt(Rt(s)).slice(0,4);if(i.some((function(e,t){return e!==a[t]})))throw new Error("Invalid address");if(!Object.keys(Bt).map(Number).includes(o))throw new Error("Invalid address");return lt(lt({},Bt[o]),{address:e,bech32:!1})},Lt=(n(56080),(e="Mainnet")=>`https://ordinals${"Testnet"===e?"-testnet":""}.xverse.app/v1`),Ut=class{client;constructor(e){this.client=ct.create({baseURL:Lt(e)})}parseError=e=>({code:e.response?.status,message:JSON.stringify(e.response?.data)});estimateMintCost=async e=>{try{return{data:(await this.client.post("/runes/mint/estimate",{...e})).data}}catch(t){const e=t;return{error:this.parseError(e)}}};estimateEtchCost=async e=>{try{return{data:(await this.client.post("/runes/etch/estimate",{...e})).data}}catch(t){const e=t;return{error:this.parseError(e)}}};createMintOrder=async e=>{try{return{data:(await this.client.post("/runes/mint/orders",{...e})).data}}catch(t){const e=t;return{error:this.parseError(e)}}};createEtchOrder=async e=>{try{return{data:(await this.client.post("/runes/etch/orders",{...e})).data}}catch(t){const e=t;return{error:this.parseError(e)}}};executeMint=async(e,t)=>{try{return{data:(await this.client.post(`/runes/mint/orders/${e}/execute`,{fundTransactionId:t})).data}}catch(n){const e=n;return{error:this.parseError(e)}}};executeEtch=async(e,t)=>{try{return{data:(await this.client.post(`/runes/etch/orders/${e}/execute`,{fundTransactionId:t})).data}}catch(n){const e=n;return{error:this.parseError(e)}}};getOrder=async e=>{try{return{data:(await this.client.get(`/orders/${e}`)).data}}catch(t){const e=t;return{error:this.parseError(e)}}};rbfOrder=async e=>{const{orderId:t,newFeeRate:n}=e;try{return{data:(await this.client.post(`/orders/${t}/rbf-estimate`,{newFeeRate:n})).data}}catch(r){const e=r;return{error:this.parseError(e)}}}},Dt=new Ut("Testnet"),Ft=new Ut("Mainnet"),zt=(e="Mainnet")=>"Mainnet"===e?Ft:Dt,$t=class{async mintRunes(e){try{const t={destinationAddress:e.destinationAddress,feeRate:e.feeRate,refundAddress:e.refundAddress,repeats:e.repeats,runeName:e.runeName,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress},n=await new Ut(e.network).createMintOrder(t);if(!n.data)return{status:"error",error:{code:400===n.error.code?-32600:-32603,message:n.error.message}};const r=await this.requestInternal("sendTransfer",{recipients:[{address:n.data.fundAddress,amount:n.data.fundAmount}]});return"success"!==r?.status?{status:"error",error:{code:-32e3,message:"User rejected the payment request"}}:(await new Ut(e.network).executeMint(n.data.orderId,r.result.txid),{status:"success",result:{orderId:n.data.orderId,fundTransactionId:r.result.txid,fundingAddress:n.data.fundAddress}})}catch(t){return{status:"error",error:{code:-32603,message:t.message}}}}async etchRunes(e){const t={destinationAddress:e.destinationAddress,refundAddress:e.refundAddress,feeRate:e.feeRate,runeName:e.runeName,divisibility:e.divisibility,symbol:e.symbol,premine:e.premine,isMintable:e.isMintable,terms:e.terms,inscriptionDetails:e.inscriptionDetails,delegateInscriptionId:e.delegateInscriptionId,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress};try{const n=await new Ut(e.network).createEtchOrder(t);if(!n.data)return{status:"error",error:{code:400===n.error.code?-32600:-32603,message:n.error.message}};const r=await this.requestInternal("sendTransfer",{recipients:[{address:n.data.fundAddress,amount:n.data.fundAmount}]});return"success"!==r?.status?{status:"error",error:{code:-32e3,message:"User rejected the payment request"}}:(await new Ut(e.network).executeEtch(n.data.orderId,r.result.txid),{status:"success",result:{orderId:n.data.orderId,fundTransactionId:r.result.txid,fundingAddress:n.data.fundAddress}})}catch(n){return{status:"error",error:{code:-32603,message:n.message}}}}async estimateMint(e){const t={destinationAddress:e.destinationAddress,feeRate:e.feeRate,repeats:e.repeats,runeName:e.runeName,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress},n=await zt(e.network).estimateMintCost(t);return n.data?{status:"success",result:n.data}:{status:"error",error:{code:400===n.error.code?-32600:-32603,message:n.error.message}}}async estimateEtch(e){const t={destinationAddress:e.destinationAddress,feeRate:e.feeRate,runeName:e.runeName,divisibility:e.divisibility,symbol:e.symbol,premine:e.premine,isMintable:e.isMintable,terms:e.terms,inscriptionDetails:e.inscriptionDetails,delegateInscriptionId:e.delegateInscriptionId,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress},n=await zt(e.network).estimateEtchCost(t);return n.data?{status:"success",result:n.data}:{status:"error",error:{code:400===n.error.code?-32600:-32603,message:n.error.message}}}async getOrder(e){const t=await zt(e.network).getOrder(e.id);return t.data?{status:"success",result:t.data}:{status:"error",error:{code:400===t.error.code||404===t.error.code?-32600:-32603,message:t.error.message}}}async estimateRbfOrder(e){const t={newFeeRate:e.newFeeRate,orderId:e.orderId},n=await zt(e.network).rbfOrder(t);return n.data?{status:"success",result:{fundingAddress:n.data.fundingAddress,rbfCost:n.data.rbfCost}}:{status:"error",error:{code:400===n.error.code||404===n.error.code?-32600:-32603,message:n.error.message}}}async rbfOrder(e){try{const t={newFeeRate:e.newFeeRate,orderId:e.orderId},n=await zt(e.network).rbfOrder(t);if(!n.data)return{status:"error",error:{code:400===n.error.code||404===n.error.code?-32600:-32603,message:n.error.message}};const r=await this.requestInternal("sendTransfer",{recipients:[{address:n.data.fundingAddress,amount:n.data.rbfCost}]});return"success"!==r?.status?{status:"error",error:{code:-32e3,message:"User rejected the payment request"}}:{status:"success",result:{fundingAddress:n.data.fundingAddress,orderId:t.orderId,fundRBFTransactionId:r.result.txid}}}catch(t){return{status:"error",error:{code:-32603,message:t.message}}}}async request(e,t){switch(e){case"runes_mint":return this.mintRunes(t);case"runes_etch":return this.etchRunes(t);case"runes_estimateMint":return this.estimateMint(t);case"runes_estimateEtch":return this.estimateEtch(t);case"runes_getOrder":return this.getOrder(t);case"runes_estimateRbfOrder":return this.estimateRbfOrder(t);case"runes_rbfOrder":return this.rbfOrder(t);default:return this.requestInternal(e,t)}}};function qt(){return window.btc_providers||(window.btc_providers=[]),window.btc_providers}function Zt(e){return e?.split(".").reduce(((e,t)=>e?.[t]),window)}var Ht=async(e,t,n)=>{let r=window.XverseProviders?.BitcoinProvider||window.BitcoinProvider;if(n&&(r=await Zt(n)),!r)throw new Error("no wallet provider was found");if(!e)throw new Error("A wallet method is required");const o=await r.request(e,t);return Wt(o)?{status:"success",result:o.result}:{status:"error",error:o.error}},Wt=e=>Object.hasOwn(e,"result")&&!!e.result,Gt=(e=>(e.Ordinals="ordinals",e.Payment="payment",e.Stacks="stacks",e))(Gt||{});function Kt(e,t){let n=[];for(let r in e){let o=e[r];for(let e of o)n.push({index:e,address:r,sighashTypes:t?[t]:void 0})}return n}var Vt={xverse:{id:"XverseProviders.BitcoinProvider",name:"Xverse",webUrl:"https://www.xverse.app/",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",chromeWebStoreUrl:"https://chromewebstore.google.com/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgdmlld0JveD0iMCAwIDEwMiAxMDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJJY29uX0FydCAoRWRpdCBNZSkiPgo8cmVjdCB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgZmlsbD0iIzE4MTgxOCIvPgo8ZyBpZD0iTG9nby9FbWJsZW0iIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8xMjIzKSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik03NC42NTQyIDczLjg4ODNWNjUuMjMxMkM3NC42NTQyIDY0Ljg4OCA3NC41MTc3IDY0LjU2MDYgNzQuMjc0NSA2NC4zMTc0TDM3LjQzOTcgMjcuNDgyNUMzNy4xOTY1IDI3LjIzOTIgMzYuODY5MSAyNy4xMDI4IDM2LjUyNTggMjcuMTAyOEgyNy44NjlDMjcuNDQxNiAyNy4xMDI4IDI3LjA5MzggMjcuNDUwNiAyNy4wOTM4IDI3Ljg3OFYzNS45MjExQzI3LjA5MzggMzYuMjY0NCAyNy4yMzAyIDM2LjU5MTcgMjcuNDczNCAzNi44MzVMNDAuNjk1MiA1MC4wNTY3QzQwLjk5NzUgNTAuMzU5MSA0MC45OTc1IDUwLjg1MDEgNDAuNjk1MiA1MS4xNTI0TDI3LjMyMTEgNjQuNTI2NUMyNy4xNzU2IDY0LjY3MiAyNy4wOTM4IDY0Ljg2OTggMjcuMDkzOCA2NS4wNzQ0VjczLjg4ODNDMjcuMDkzOCA3NC4zMTUzIDI3LjQ0MTYgNzQuNjYzNSAyNy44NjkgNzQuNjYzNUg0Mi4zMzQyQzQyLjc2MTYgNzQuNjYzNSA0My4xMDk0IDc0LjMxNTMgNDMuMTA5NCA3My44ODgzVjY4LjY5NThDNDMuMTA5NCA2OC40OTEyIDQzLjE5MTIgNjguMjkzNSA0My4zMzY4IDY4LjE0NzlMNTAuNTExNCA2MC45NzMzQzUwLjgxMzggNjAuNjcwOSA1MS4zMDQ4IDYwLjY3MDkgNTEuNjA3MiA2MC45NzMzTDY0LjkxOTggNzQuMjg2MUM2NS4xNjMxIDc0LjUyOTMgNjUuNDkwNCA3NC42NjU4IDY1LjgzMzcgNzQuNjY1OEg3My44NzY3Qzc0LjMwNDIgNzQuNjY1OCA3NC42NTE5IDc0LjMxNzYgNzQuNjUxOSA3My44OTA2TDc0LjY1NDIgNzMuODg4M1oiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGlkPSJWZWN0b3JfMiIgZD0iTTU1LjM1OCAzOC41NjcySDYyLjYwMzFDNjMuMDMyOCAzOC41NjcyIDYzLjM4MjkgMzguOTE3MyA2My4zODI5IDM5LjM0NjlWNDYuNTkyMUM2My4zODI5IDQ3LjI4NzcgNjQuMjI0IDQ3LjYzNTUgNjQuNzE1MSA0Ny4xNDIyTDc0LjY1NDEgMzcuMTg3M0M3NC43OTk0IDM3LjA0MTggNzQuODgxNiAzNi44NDQgNzQuODgxNiAzNi42MzcxVjI3LjkxODlDNzQuODgxNiAyNy40ODkyIDc0LjUzMzQgMjcuMTM5MSA3NC4xMDE3IDI3LjEzOTFMNjUuMjUzOCAyNy4xMjc3QzY1LjA0NyAyNy4xMjc3IDY0Ljg0OTIgMjcuMjA5NiA2NC43MDE0IDI3LjM1NTFMNTQuODA1NiAzNy4yMzVDNTQuMzE0NSAzNy43MjYgNTQuNjYyMyAzOC41NjcyIDU1LjM1NTcgMzguNTY3Mkg1NS4zNThaIiBmaWxsPSIjRUU3QTMwIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMF8xMjIzIj4KPHJlY3Qgd2lkdGg9IjQ3LjgxMjUiIGhlaWdodD0iNDcuODEyNSIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3LjA5MzggMjcuMDkzOCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"},unisat:{id:"unisat",name:"Unisat",webUrl:"https://unisat.io/",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwIiBoZWlnaHQ9IjE4MCIgdmlld0JveD0iMCAwIDE4MCAxODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxODAiIGhlaWdodD0iMTgwIiBmaWxsPSJibGFjayIvPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTAwNTBfNDE3MSkiPgo8cGF0aCBkPSJNMTEzLjY2IDI5LjI4OTdMMTQzLjk3IDU5LjMwOTdDMTQ2LjU1IDYxLjg1OTcgMTQ3LjgyIDY0LjQzOTcgMTQ3Ljc4IDY3LjAzOTdDMTQ3Ljc0IDY5LjYzOTcgMTQ2LjYzIDcyLjAwOTcgMTQ0LjQ2IDc0LjE1OTdDMTQyLjE5IDc2LjQwOTcgMTM5Ljc0IDc3LjU0OTcgMTM3LjEyIDc3LjU5OTdDMTM0LjUgNzcuNjM5NyAxMzEuOSA3Ni4zNzk3IDEyOS4zMiA3My44Mjk3TDk4LjMxOTkgNDMuMTI5N0M5NC43OTk5IDM5LjYzOTcgOTEuMzk5OSAzNy4xNjk3IDg4LjEyOTkgMzUuNzE5N0M4NC44NTk5IDM0LjI2OTcgODEuNDE5OSAzNC4wMzk3IDc3LjgxOTkgMzUuMDM5N0M3NC4yMDk5IDM2LjAyOTcgNzAuMzM5OSAzOC41Nzk3IDY2LjE4OTkgNDIuNjc5N0M2MC40Njk5IDQ4LjM0OTcgNTcuNzM5OSA1My42Njk3IDU4LjAxOTkgNTguNjM5N0M1OC4yOTk5IDYzLjYwOTcgNjEuMTM5OSA2OC43Njk3IDY2LjUyOTkgNzQuMDk5N0w5Ny43Nzk5IDEwNS4wNkMxMDAuMzkgMTA3LjY0IDEwMS42NyAxMTAuMjIgMTAxLjYzIDExMi43OEMxMDEuNTkgMTE1LjM1IDEwMC40NyAxMTcuNzIgOTguMjU5OSAxMTkuOTFDOTYuMDU5OSAxMjIuMDkgOTMuNjI5OSAxMjMuMjMgOTAuOTg5OSAxMjMuMzJDODguMzQ5OSAxMjMuNDEgODUuNzE5OSAxMjIuMTYgODMuMTE5OSAxMTkuNThMNTIuODA5OSA4OS41NTk3QzQ3Ljg3OTkgODQuNjc5NyA0NC4zMTk5IDgwLjA1OTcgNDIuMTI5OSA3NS42OTk3QzM5LjkzOTkgNzEuMzM5NyAzOS4xMTk5IDY2LjQwOTcgMzkuNjg5OSA2MC45MDk3QzQwLjE5OTkgNTYuMTk5NyA0MS43MDk5IDUxLjYzOTcgNDQuMjI5OSA0Ny4yMTk3QzQ2LjczOTkgNDIuNzk5NyA1MC4zMzk5IDM4LjI3OTcgNTUuMDA5OSAzMy42NDk3QzYwLjU2OTkgMjguMTM5NyA2NS44Nzk5IDIzLjkxOTcgNzAuOTM5OSAyMC45Nzk3Qzc1Ljk4OTkgMTguMDM5NyA4MC44Nzk5IDE2LjQwOTcgODUuNTk5OSAxNi4wNjk3QzkwLjMyOTkgMTUuNzI5NyA5NC45ODk5IDE2LjY2OTcgOTkuNTk5OSAxOC44ODk3QzEwNC4yMSAyMS4xMDk3IDEwOC44OSAyNC41Njk3IDExMy42NSAyOS4yODk3SDExMy42NloiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xMDA1MF80MTcxKSIvPgo8cGF0aCBkPSJNNjYuMTA5OSAxNTAuNDJMMzUuODA5OSAxMjAuNEMzMy4yMjk5IDExNy44NCAzMS45NTk5IDExNS4yNyAzMS45OTk5IDExMi42N0MzMi4wMzk5IDExMC4wNyAzMy4xNDk5IDEwNy43IDM1LjMxOTkgMTA1LjU1QzM3LjU4OTkgMTAzLjMgNDAuMDM5OSAxMDIuMTYgNDIuNjU5OSAxMDIuMTFDNDUuMjc5OSAxMDIuMDcgNDcuODc5OSAxMDMuMzIgNTAuNDU5OSAxMDUuODhMODEuNDQ5OSAxMzYuNThDODQuOTc5OSAxNDAuMDcgODguMzY5OSAxNDIuNTQgOTEuNjM5OSAxNDMuOTlDOTQuOTA5OSAxNDUuNDQgOTguMzQ5OSAxNDUuNjYgMTAxLjk2IDE0NC42N0MxMDUuNTcgMTQzLjY4IDEwOS40NCAxNDEuMTMgMTEzLjU5IDEzNy4wMkMxMTkuMzEgMTMxLjM1IDEyMi4wNCAxMjYuMDMgMTIxLjc2IDEyMS4wNkMxMjEuNDggMTE2LjA5IDExOC42NCAxMTAuOTMgMTEzLjI1IDEwNS41OUw5Ni41OTk5IDg5LjI0MDFDOTMuOTg5OSA4Ni42NjAxIDkyLjcwOTkgODQuMDgwMSA5Mi43NDk5IDgxLjUyMDFDOTIuNzg5OSA3OC45NTAxIDkzLjkwOTkgNzYuNTgwMSA5Ni4xMTk5IDc0LjM5MDFDOTguMzE5OSA3Mi4yMTAxIDEwMC43NSA3MS4wNzAxIDEwMy4zOSA3MC45ODAxQzEwNi4wMyA3MC44OTAxIDEwOC42NiA3Mi4xNDAxIDExMS4yNiA3NC43MjAxTDEyNi45NiA5MC4xMzAxQzEzMS44OSA5NS4wMTAxIDEzNS40NSA5OS42MzAxIDEzNy42NCAxMDMuOTlDMTM5LjgzIDEwOC4zNSAxNDAuNjUgMTEzLjI4IDE0MC4wOCAxMTguNzhDMTM5LjU3IDEyMy40OSAxMzguMDYgMTI4LjA1IDEzNS41NCAxMzIuNDdDMTMzLjAzIDEzNi44OSAxMjkuNDMgMTQxLjQxIDEyNC43NiAxNDYuMDRDMTE5LjIgMTUxLjU1IDExMy44OSAxNTUuNzcgMTA4LjgzIDE1OC43MUMxMDMuNzcgMTYxLjY1IDk4Ljg3OTkgMTYzLjI5IDk0LjE0OTkgMTYzLjYzQzg5LjQxOTkgMTYzLjk3IDg0Ljc1OTkgMTYzLjAzIDgwLjE0OTkgMTYwLjgxQzc1LjUzOTkgMTU4LjU5IDcwLjg1OTkgMTU1LjEzIDY2LjA5OTkgMTUwLjQxTDY2LjEwOTkgMTUwLjQyWiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzEwMDUwXzQxNzEpIi8+CjxwYXRoIGQ9Ik04NS4wMDk5IDcyLjk1OTJDOTEuMTU2OCA3Mi45NTkyIDk2LjEzOTkgNjcuOTc2MSA5Ni4xMzk5IDYxLjgyOTJDOTYuMTM5OSA1NS42ODIzIDkxLjE1NjggNTAuNjk5MiA4NS4wMDk5IDUwLjY5OTJDNzguODYzIDUwLjY5OTIgNzMuODc5OSA1NS42ODIzIDczLjg3OTkgNjEuODI5MkM3My44Nzk5IDY3Ljk3NjEgNzguODYzIDcyLjk1OTIgODUuMDA5OSA3Mi45NTkyWiIgZmlsbD0idXJsKCNwYWludDJfcmFkaWFsXzEwMDUwXzQxNzEpIi8+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xMDA1MF80MTcxIiB4MT0iMTM4Ljk4NSIgeTE9IjQ2Ljc3OTUiIHgyPSI0NS4wNTI5IiB5Mj0iODguNTIzMyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMjAxQzFCIi8+CjxzdG9wIG9mZnNldD0iMC4zNiIgc3RvcC1jb2xvcj0iIzc3MzkwRCIvPgo8c3RvcCBvZmZzZXQ9IjAuNjciIHN0b3AtY29sb3I9IiNFQTgxMDEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRjRCODUyIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQxX2xpbmVhcl8xMDA1MF80MTcxIiB4MT0iNDMuMzgxMiIgeTE9IjEzNC4xNjciIHgyPSIxNTIuMjMxIiB5Mj0iMTAxLjc3MSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMUYxRDFDIi8+CjxzdG9wIG9mZnNldD0iMC4zNyIgc3RvcC1jb2xvcj0iIzc3MzkwRCIvPgo8c3RvcCBvZmZzZXQ9IjAuNjciIHN0b3AtY29sb3I9IiNFQTgxMDEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRjRGQjUyIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQyX3JhZGlhbF8xMDA1MF80MTcxIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDg1LjAwOTkgNjEuODM5Mikgc2NhbGUoMTEuMTMpIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y0Qjg1MiIvPgo8c3RvcCBvZmZzZXQ9IjAuMzMiIHN0b3AtY29sb3I9IiNFQTgxMDEiLz4KPHN0b3Agb2Zmc2V0PSIwLjY0IiBzdG9wLWNvbG9yPSIjNzczOTBEIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzIxMUMxRCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEwMDUwXzQxNzEiPgo8cmVjdCB3aWR0aD0iMTE1Ljc3IiBoZWlnaHQ9IjE0Ny43IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzIgMTYpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="}};Vt.xverse.id,Vt.unisat.id;var Xt=n(23148);const Yt={preferredWallet:void 0,available:!1,unisatAvailable:!1,xverseAvailable:!1,connected:!1,balance:null,accounts:null,assets:[],data:[],total:0,requestAccounts:e=>{},setAccounts:()=>{},setConnected:()=>{},fetchNextPage:()=>Promise.resolve(),fetchAllInscriptions:e=>Promise.resolve()},Jt=(0,i.createContext)(Yt),Qt=e=>{let{children:t}=e;const{safeRows:n}=(0,i.useContext)(s.N),[r,a]=(0,g._)("btc-preferred-wallet"),[c,u]=(0,i.useState)(!1),[l,d]=(0,i.useState)(!1),[f,h]=(0,i.useState)(),[y,b]=(0,i.useState)(),[v,w]=(0,i.useState)([]),[x,E]=(0,i.useState)(0),[_,k]=(0,i.useState)(0),[S,I]=(0,i.useState)(!1),{unisat:C}=(()=>{const[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),[o,s]=(0,i.useState)(!1),[a,c]=(0,i.useState)(!1),[u,l]=(0,i.useState)();return(0,i.useEffect)((()=>{let e;return u||Promise.race([new Promise((t=>setTimeout((()=>{e&&clearInterval(e),t(!1)}),1e3))),new Promise((t=>{e=setInterval((()=>{"unisat"in window&&"undefined"!==typeof window.unisat&&(console.log("unisat",window.unisat._state.initialized),window.unisat._state.initialized&&(e&&clearInterval(e),t(window.unisat)))}),200)}))]).then((e=>{e&&l(e)})),()=>{e&&clearInterval(e)}}),[]),{available:e,unisat:u,isConnected:n,isUnlocked:o,initialized:a}})(),{available:T,requestAccounts:A,getAccounts:P}=(()=>{const[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),[o,s]=(0,g._)("xverse-accounts",null);return(0,i.useEffect)((()=>{e||qt().length>0&&Ht("getInfo",null).then((e=>{console.log("getInfo",e),"success"===(null===e||void 0===e?void 0:e.status)&&(t(!0),o&&r(!0))})).catch((e=>{}))}),[e]),{available:e,connected:n,requestAccounts:async()=>{const e=await Ht("getAccounts",{purposes:[Gt.Ordinals,Gt.Payment]});return console.log("getAccounts",e),"success"===(null===e||void 0===e?void 0:e.status)?e.result:[]},getAccounts:async()=>{if(o)return JSON.parse(o);const e=await Ht("getAddresses",{purposes:[Gt.Ordinals,Gt.Payment]});return console.log("getAddresses",e),"success"===(null===e||void 0===e?void 0:e.status)?(s(JSON.stringify(e.result.addresses)),e.result.addresses):[]}}})(),{data:O,setSize:j}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;console.log(e);const{data:n,isLoading:r,error:o,setSize:i}=p(m(e),(e=>fetch(e.content).then((e=>e.json())).then((t=>({...t,id:e.inscriptionId}))).catch((()=>({id:e.inscriptionId,p:"other"})))),{initialSize:t,parallel:!0});return{data:n,isLoading:r,error:o,setSize:i}}(v,n),M=c&&"unisat"===r||T&&"xverse"===r;(0,i.useEffect)((()=>{!c&&C?(u(!0),"unisat"===r&&(console.log("try unisat connection",c,C),C.getAccounts().then((e=>{e&&b(e)})))):"xverse"!==r||S||(I(!0),console.log("try xverse connection",T),P().then((e=>{I(!1),b(e.map((e=>e.address)))})))}),[c,C,T,r]),(0,i.useEffect)((()=>{y&&y[0]&&d(!0)}),[y]),(0,i.useEffect)((()=>{const e=e=>{e.length>0?(b(e),d(!0)):(d(!1),a(void 0))};if(C)return C.on("accountsChanged",e),()=>{C.removeListener("accountsChanged",e)}}),[C]),(0,i.useEffect)((()=>{l&&C&&C.getBalance().then((e=>h(e))).then((()=>C.getInscriptions(_,n))).then((e=>{w(e.list),E(e.total)}))}),[l,C,y]);return(0,i.useEffect)((()=>{j(_+n)}),[null===v||void 0===v?void 0:v.length,_]),(0,o.jsx)(Jt.Provider,{value:{preferredWallet:r,available:M,unisatAvailable:c,xverseAvailable:T,connected:l,balance:f,accounts:y,assets:v,data:O,total:x,requestAccounts:async e=>{if("unisat"===e&&C){const e=await C.requestAccounts();b(e),d(!0)}else if("xverse"===e&&!0===T){const e=await A();b(e.map((e=>e.address))),d(!0)}},setAccounts:b,setConnected:d,fetchNextPage:async e=>{let{page:t}=e;t*n>x||(k(t*n),C.getInscriptions(t*n,n).then((e=>{console.log("fetching next page",t,e.list),w((t=>(0,Xt.Y)([...t,...e.list],"inscriptionId")))})))},fetchAllInscriptions:async e=>{const t=Math.ceil(e/100);for await(const n of Array(t).keys()){const e=await C.getInscriptions(100*n,100);w((t=>(0,Xt.Y)([...t,...e.list],"inscriptionId")))}}},children:t})}},83330:function(e,t,n){"use strict";n.d(t,{l:function(){return fe},x:function(){return he}});var r=n(85893),o=n(16441),i=n(38197),s=n(1581);const a=new s.Yd("strings/5.7.0");var c,u;function l(e,t,n,r,o){if(e===u.BAD_PREFIX||e===u.UNEXPECTED_CONTINUE){let e=0;for(let r=t+1;r<n.length&&n[r]>>6===2;r++)e++;return e}return e===u.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(c||(c={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(u||(u={}));Object.freeze({error:function(e,t,n,r,o){return a.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:l,replace:function(e,t,n,r,o){return e===u.OVERLONG?(r.push(o),0):(r.push(65533),l(e,t,n))}});function d(e,t=c.current){t!=c.current&&(a.checkNormalize(),e=e.normalize(t));let n=[];for(let r=0;r<e.length;r++){const t=e.charCodeAt(r);if(t<128)n.push(t);else if(t<2048)n.push(t>>6|192),n.push(63&t|128);else if(55296==(64512&t)){r++;const o=e.charCodeAt(r);if(r>=e.length||56320!==(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&t)<<10)+(1023&o);n.push(i>>18|240),n.push(i>>12&63|128),n.push(i>>6&63|128),n.push(63&i|128)}else n.push(t>>12|224),n.push(t>>6&63|128),n.push(63&t|128)}return(0,o.lE)(n)}var f=n(18356),h=n(13550),p=n.n(h),m=n(33715),g=n.n(m);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self&&self;function y(e,t,n){return n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&n.path)}},e(n,n.exports),n.exports}var b=v;function v(e,t){if(!e)throw new Error(t||"Assertion failed")}v.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var w=y((function(e,t){var n=t;function r(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!==typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var o=e.charCodeAt(r),i=o>>8,s=255&o;i?n.push(i,s):n.push(s)}return n},n.zero2=r,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}})),x=y((function(e,t){var n=t;n.assert=b,n.toArray=w.toArray,n.zero2=w.zero2,n.toHex=w.toHex,n.encode=w.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var o=1<<t+1,i=e.clone(),s=0;s<r.length;s++){var a,c=i.andln(o-1);i.isOdd()?(a=c>(o>>1)-1?(o>>1)-c:c,i.isubn(a)):a=0,r[s]=a,i.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var s,a,c=e.andln(3)+o&3,u=t.andln(3)+i&3;3===c&&(c=-1),3===u&&(u=-1),s=0===(1&c)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==u?c:-c,n[0].push(s),a=0===(1&u)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?u:-u,n[1].push(a),2*o===s+1&&(o=1-o),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new(p())(e,"hex","le")}})),E=x.getNAF,_=x.getJSF,k=x.assert;function S(e,t){this.type=e,this.p=new(p())(t.p,16),this.red=t.prime?p().red(t.prime):p().mont(this.p),this.zero=new(p())(0).toRed(this.red),this.one=new(p())(1).toRed(this.red),this.two=new(p())(2).toRed(this.red),this.n=t.n&&new(p())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var I=S;function C(e,t){this.curve=e,this.type=t,this.precomputed=null}S.prototype.point=function(){throw new Error("Not implemented")},S.prototype.validate=function(){throw new Error("Not implemented")},S.prototype._fixedNafMul=function(e,t){k(e.precomputed);var n=e._getDoubles(),r=E(t,1,this._bitLength),o=(1<<n.step+1)-(n.step%2===0?2:1);o/=3;var i,s,a=[];for(i=0;i<r.length;i+=n.step){s=0;for(var c=i+n.step-1;c>=i;c--)s=(s<<1)+r[c];a.push(s)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=o;d>0;d--){for(i=0;i<a.length;i++)(s=a[i])===d?l=l.mixedAdd(n.points[i]):s===-d&&(l=l.mixedAdd(n.points[i].neg()));u=u.add(l)}return u.toP()},S.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var o=r.points,i=E(t,n,this._bitLength),s=this.jpoint(null,null,null),a=i.length-1;a>=0;a--){for(var c=0;a>=0&&0===i[a];a--)c++;if(a>=0&&c++,s=s.dblp(c),a<0)break;var u=i[a];k(0!==u),s="affine"===e.type?u>0?s.mixedAdd(o[u-1>>1]):s.mixedAdd(o[-u-1>>1].neg()):u>0?s.add(o[u-1>>1]):s.add(o[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},S.prototype._wnafMulAdd=function(e,t,n,r,o){var i,s,a,c=this._wnafT1,u=this._wnafT2,l=this._wnafT3,d=0;for(i=0;i<r;i++){var f=(a=t[i])._getNAFPoints(e);c[i]=f.wnd,u[i]=f.points}for(i=r-1;i>=1;i-=2){var h=i-1,p=i;if(1===c[h]&&1===c[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=_(n[h],n[p]);for(d=Math.max(y[0].length,d),l[h]=new Array(d),l[p]=new Array(d),s=0;s<d;s++){var b=0|y[0][s],v=0|y[1][s];l[h][s]=g[3*(b+1)+(v+1)],l[p][s]=0,u[h]=m}}else l[h]=E(n[h],c[h],this._bitLength),l[p]=E(n[p],c[p],this._bitLength),d=Math.max(l[h].length,d),d=Math.max(l[p].length,d)}var w=this.jpoint(null,null,null),x=this._wnafT4;for(i=d;i>=0;i--){for(var k=0;i>=0;){var S=!0;for(s=0;s<r;s++)x[s]=0|l[s][i],0!==x[s]&&(S=!1);if(!S)break;k++,i--}if(i>=0&&k++,w=w.dblp(k),i<0)break;for(s=0;s<r;s++){var I=x[s];0!==I&&(I>0?a=u[s][I-1>>1]:I<0&&(a=u[s][-I-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(i=0;i<r;i++)u[i]=null;return o?w:w.toP()},S.BasePoint=C,C.prototype.eq=function(){throw new Error("Not implemented")},C.prototype.validate=function(){return this.curve.validate(this)},S.prototype.decodePoint=function(e,t){e=x.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*n)return 6===e[0]?k(e[e.length-1]%2===0):7===e[0]&&k(e[e.length-1]%2===1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},C.prototype.encodeCompressed=function(e){return this.encode(e,!0)},C.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},C.prototype.encode=function(e,t){return x.encode(this._encode(t),e)},C.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},C.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},C.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)r=r.dbl();n.push(r)}return{step:e,points:n}},C.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),o=1;o<n;o++)t[o]=t[o-1].add(r);return{wnd:e,points:t}},C.prototype._getBeta=function(){return null},C.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t};var T=y((function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),A=x.assert;function P(e){I.call(this,"short",e),this.a=new(p())(e.a,16).toRed(this.red),this.b=new(p())(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}T(P,I);var O=P;function j(e,t,n,r){I.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new(p())(t,16),this.y=new(p())(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function M(e,t,n,r){I.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(p())(0)):(this.x=new(p())(t,16),this.y=new(p())(n,16),this.z=new(p())(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}P.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new(p())(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new(p())(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?n=o[0]:(n=o[1],A(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new(p())(e.a,16),b:new(p())(e.b,16)}})):this._getEndoBasis(n)}}},P.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:p().mont(e),n=new(p())(2).toRed(t).redInvm(),r=n.redNeg(),o=new(p())(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},P.prototype._getEndoBasis=function(e){for(var t,n,r,o,i,s,a,c,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),h=new(p())(1),m=new(p())(0),g=new(p())(0),y=new(p())(1),b=0;0!==d.cmpn(0);){var v=f.div(d);c=f.sub(v.mul(d)),u=g.sub(v.mul(h));var w=y.sub(v.mul(m));if(!r&&c.cmp(l)<0)t=a.neg(),n=h,r=c.neg(),o=u;else if(r&&2===++b)break;a=c,f=d,d=c,g=h,h=u,y=m,m=w}i=c.neg(),s=u;var x=r.sqr().add(o.sqr());return i.sqr().add(s.sqr()).cmp(x)>=0&&(i=t,s=n),r.negative&&(r=r.neg(),o=o.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:r,b:o},{a:i,b:s}]},P.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],o=r.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),s=o.mul(n.a),a=i.mul(r.a),c=o.mul(n.b),u=i.mul(r.b);return{k1:e.sub(s).sub(a),k2:c.add(u).neg()}},P.prototype.pointFromX=function(e,t){(e=new(p())(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(t&&!o||!t&&o)&&(r=r.redNeg()),this.point(e,r)},P.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},P.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var s=this._endoSplit(t[i]),a=e[i],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),r[2*i]=a,r[2*i+1]=c,o[2*i]=s.k1,o[2*i+1]=s.k2}for(var u=this._wnafMulAdd(1,r,o,2*i,n),l=0;l<2*i;l++)r[l]=null,o[l]=null;return u},T(j,I.BasePoint),P.prototype.point=function(e,t,n){return new j(this,e,t,n)},P.prototype.pointFromJSON=function(e,t){return j.fromJSON(this,e,t)},j.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},j.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},j.fromJSON=function(e,t,n){"string"===typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function o(t){return e.point(t[0],t[1],n)}var i=t[2];return r.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[r].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[r].concat(i.naf.points.map(o))}},r},j.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},j.prototype.isInfinity=function(){return this.inf},j.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},j.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),i=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)},j.prototype.getX=function(){return this.x.fromRed()},j.prototype.getY=function(){return this.y.fromRed()},j.prototype.mul=function(e){return e=new(p())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},j.prototype.mulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o):this.curve._wnafMulAdd(1,r,o,2)},j.prototype.jmulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o,!0):this.curve._wnafMulAdd(1,r,o,2,!0)},j.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},j.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},j.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},T(M,I.BasePoint),P.prototype.jpoint=function(e,t,n){return new M(this,e,t,n)},M.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},M.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},M.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),o=e.x.redMul(n),i=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=r.redSub(o),c=i.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),l=u.redMul(a),d=r.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(i.redMul(l)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(f,h,p)},M.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),s=n.redSub(r),a=o.redSub(i);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),d=a.redSqr().redIAdd(u).redISub(l).redISub(l),f=a.redMul(l.redISub(d)).redISub(o.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(d,f,h)},M.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,o=this.curve.tinv,i=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),u=s.redAdd(s);for(t=0;t<e;t++){var l=i.redSqr(),d=u.redSqr(),f=d.redSqr(),h=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),p=i.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=h.redMul(g);y=y.redIAdd(y).redISub(f);var b=u.redMul(a);t+1<e&&(c=c.redMul(f)),i=m,a=b,u=y}return this.curve.jpoint(i,u.redMul(o),a)},M.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},M.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(r).redISub(i);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r),c=a.redSqr().redISub(s).redISub(s),u=i.redIAdd(i);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=a.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(l).redISub(f);h=h.redIAdd(h);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},M.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(r).redISub(i);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var u=i.redIAdd(i);u=(u=u.redIAdd(u)).redIAdd(u),t=a.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),h=this.x.redSub(l).redMul(this.x.redAdd(l));h=h.redAdd(h).redIAdd(h);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},M.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,o=r.redSqr().redSqr(),i=t.redSqr(),s=n.redSqr(),a=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(o)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(s),l=a.redSqr().redISub(u.redAdd(u)),d=u.redISub(l),f=s.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=a.redMul(d).redISub(f),p=n.redAdd(n).redMul(r);return this.curve.jpoint(l,h,p)},M.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),o=e.redAdd(e).redIAdd(e),i=o.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(i)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=o.redIAdd(s).redSqr().redISub(i).redISub(a).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(a).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(a)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=this.z.redAdd(s).redSqr().redISub(n).redISub(a);return this.curve.jpoint(d,f,h)},M.prototype.mul=function(e,t){return e=new(p())(e,t),this.curve._wnafMul(this,e)},M.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),o=n.redMul(e.z);return 0===this.y.redMul(o).redISub(e.y.redMul(r)).cmpn(0)},M.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),o=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},M.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},M.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var R=y((function(e,t){var n=t;n.base=I,n.short=O,n.mont=null,n.edwards=null})),B=y((function(e,t){var n,r=t,o=x.assert;function i(e){"short"===e.type?this.curve=new R.short(e):"edwards"===e.type?this.curve=new R.edwards(e):this.curve=new R.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new i(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:g().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:g().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:g().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:g().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:g().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:g().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:g().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=null.crash()}catch(a){n=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:g().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})}));function N(e){if(!(this instanceof N))return new N(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=w.toArray(e.entropy,e.entropyEnc||"hex"),n=w.toArray(e.nonce,e.nonceEnc||"hex"),r=w.toArray(e.pers,e.persEnc||"hex");b(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var L=N;N.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},N.prototype._hmac=function(){return new(g().hmac)(this.hash,this.K)},N.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},N.prototype.reseed=function(e,t,n,r){"string"!==typeof t&&(r=n,n=t,t=null),e=w.toArray(e,t),n=w.toArray(n,r),b(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},N.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(r=n,n=t,t=null),n&&(n=w.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,e);return this._update(n),this._reseed++,w.encode(i,t)};var U=x.assert;function D(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var F=D;D.fromPublic=function(e,t,n){return t instanceof D?t:new D(e,{pub:t,pubEnc:n})},D.fromPrivate=function(e,t,n){return t instanceof D?t:new D(e,{priv:t,privEnc:n})},D.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},D.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},D.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},D.prototype._importPrivate=function(e,t){this.priv=new(p())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},D.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?U(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||U(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},D.prototype.derive=function(e){return e.validate()||U(e.validate(),"public point not validated"),e.mul(this.priv).getX()},D.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},D.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},D.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var z=x.assert;function $(e,t){if(e instanceof $)return e;this._importDER(e,t)||(z(e.r&&e.s,"Signature without r or s"),this.r=new(p())(e.r,16),this.s=new(p())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var q=$;function Z(){this.place=0}function H(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var o=0,i=0,s=t.place;i<r;i++,s++)o<<=8,o|=e[s],o>>>=0;return!(o<=127)&&(t.place=s,o)}function W(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function G(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}$.prototype._importDER=function(e,t){e=x.toArray(e,t);var n=new Z;if(48!==e[n.place++])return!1;var r=H(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=H(e,n);if(!1===o)return!1;var i=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var s=H(e,n);if(!1===s)return!1;if(e.length!==s+n.place)return!1;var a=e.slice(n.place,s+n.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new(p())(i),this.s=new(p())(a),this.recoveryParam=null,!0},$.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=W(t),n=W(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var r=[2];G(r,t.length),(r=r.concat(t)).push(2),G(r,n.length);var o=r.concat(n),i=[48];return G(i,o.length),i=i.concat(o),x.encode(i,e)};var K=function(){throw new Error("unsupported")},V=x.assert;function X(e){if(!(this instanceof X))return new X(e);"string"===typeof e&&(V(Object.prototype.hasOwnProperty.call(B,e),"Unknown curve "+e),e=B[e]),e instanceof B.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Y=X;X.prototype.keyPair=function(e){return new F(this,e)},X.prototype.keyFromPrivate=function(e,t){return F.fromPrivate(this,e,t)},X.prototype.keyFromPublic=function(e,t){return F.fromPublic(this,e,t)},X.prototype.genKeyPair=function(e){e||(e={});for(var t=new L({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||K(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new(p())(2));;){var o=new(p())(t.generate(n));if(!(o.cmp(r)>0))return o.iaddn(1),this.keyFromPrivate(o)}},X.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},X.prototype.sign=function(e,t,n,r){"object"===typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new(p())(e,16));for(var o=this.n.byteLength(),i=t.getPrivate().toArray("be",o),s=e.toArray("be",o),a=new L({hash:this.hash,entropy:i,nonce:s,pers:r.pers,persEnc:r.persEnc||"utf8"}),c=this.n.sub(new(p())(1)),u=0;;u++){var l=r.k?r.k(u):new(p())(a.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var f=d.getX(),h=f.umod(this.n);if(0!==h.cmpn(0)){var m=l.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==f.cmp(h)?2:0);return r.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new q({r:h,s:m,recoveryParam:g})}}}}}},X.prototype.verify=function(e,t,n,r){e=this._truncateToN(new(p())(e,16)),n=this.keyFromPublic(n,r);var o=(t=new q(t,"hex")).r,i=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var s,a=i.invm(this.n),c=a.mul(e).umod(this.n),u=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,n.getPublic(),u)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,n.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},X.prototype.recoverPubKey=function(e,t,n,r){V((3&n)===n,"The recovery param is more than two bits"),t=new q(t,r);var o=this.n,i=new(p())(e),s=t.r,a=t.s,c=1&n,u=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=t.r.invm(o),d=o.sub(i).mul(l).umod(o),f=a.mul(l).umod(o);return this.g.mulAdd(d,s,f)},X.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new q(t,r)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(n))return o}throw new Error("Unable to find valid recovery factor")};var J=y((function(e,t){var n=t;n.version="6.5.4",n.utils=x,n.rand=function(){throw new Error("unsupported")},n.curve=R,n.curves=B,n.ec=Y,n.eddsa=null})).ec;new s.Yd("properties/5.7.0");function Q(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}const ee=new s.Yd("signing-key/5.7.0");let te=null;function ne(){return te||(te=new J("secp256k1")),te}class re{constructor(e){Q(this,"curve","secp256k1"),Q(this,"privateKey",(0,o.Dv)(e)),32!==(0,o.E1)(this.privateKey)&&ee.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=ne().keyFromPrivate((0,o.lE)(this.privateKey));Q(this,"publicKey","0x"+t.getPublic(!1,"hex")),Q(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Q(this,"_isSigningKey",!0)}_addPoint(e){const t=ne().keyFromPublic((0,o.lE)(this.publicKey)),n=ne().keyFromPublic((0,o.lE)(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=ne().keyFromPrivate((0,o.lE)(this.privateKey)),n=(0,o.lE)(e);32!==n.length&&ee.throwArgumentError("bad digest length","digest",e);const r=t.sign(n,{canonical:!0});return(0,o.N)({recoveryParam:r.recoveryParam,r:(0,o.$m)("0x"+r.r.toString(16),32),s:(0,o.$m)("0x"+r.s.toString(16),32)})}computeSharedSecret(e){const t=ne().keyFromPrivate((0,o.lE)(this.privateKey)),n=ne().keyFromPublic((0,o.lE)(oe(e)));return(0,o.$m)("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function oe(e,t){const n=(0,o.lE)(e);if(32===n.length){const e=new re(n);return t?"0x"+ne().keyFromPrivate(n).getPublic(!0,"hex"):e.publicKey}return 33===n.length?t?(0,o.Dv)(n):"0x"+ne().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+ne().keyFromPublic(n).getPublic(!0,"hex"):(0,o.Dv)(n):ee.throwArgumentError("invalid public or private key","key","[REDACTED]")}new s.Yd("transactions/5.7.0");var ie;!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(ie||(ie={}));function se(e,t){return function(e){const t=oe(e);return(0,f.Kn)((0,o.p3)((0,i.w)((0,o.p3)(t,1)),12))}(function(e,t){const n=(0,o.N)(t),r={r:(0,o.lE)(n.r),s:(0,o.lE)(n.s)};return"0x"+ne().recoverPubKey((0,o.lE)(e),r,n.recoveryParam).encode("hex",!1)}((0,o.lE)(e),t))}new s.Yd("wallet/5.7.0");function ae(e,t){return se(function(e){return"string"===typeof e&&(e=d(e)),(0,i.w)((0,o.zo)([d("\x19Ethereum Signed Message:\n"),d(String(e.length)),e]))}(e),t)}var ce=n(67294),ue=n(34789),le=n(11345);const de={},fe=(0,ce.createContext)(de),he=e=>{let{children:t}=e;const{networkId:n}=(0,ce.useContext)(le.x),{address:o}=(0,ue.mA)(),{chain:i}=(0,ue.LN)(),{data:s}=(0,ue.py)({chainId:null===i||void 0===i?void 0:i.id}),[a,c]=(0,ce.useState)(null),u=async()=>{if(!n||!o)return c(null),!1;{const t="".concat(n,"-").concat(o);try{const e=localStorage.getItem(t);return e?await fetch("/terms_short.txt").then((e=>e.ok?e.text():Promise.reject(e.status))).then((t=>ae(t,e))).then((e=>(c(e&&(null===e||void 0===e?void 0:e.toLowerCase())===(null===o||void 0===o?void 0:o.toLowerCase())),e===o))).catch((e=>(c(!1),!1))):(c(!1),!1)}catch(e){return c(!1),!1}}};return(0,ce.useEffect)((()=>{u().then((e=>{}))}),[a,n,o]),(0,r.jsx)(fe.Provider,{value:{verifyTermsAcceptance:u,requestTermsAcceptance:async()=>{if(!n||!o)return!1;{const t="".concat(n,"-").concat(o);try{return await fetch("/terms_short.txt").then((e=>e.ok?e.text():Promise.reject(e.status))).then((e=>s.signMessage({account:o,message:e}))).then((e=>localStorage.setItem(t,e))).then((e=>c(!0))).then((e=>!0)).catch((e=>!1))}catch(e){return!1}}},termsAccepted:a},children:t})}},11345:function(e,t,n){"use strict";n.d(t,{f:function(){return c},x:function(){return a}});var r=n(85893),o=n(11163),i=n(67294);const s={networkId:null,onNetworkMismatch:e=>Promise.resolve(null)},a=(0,i.createContext)(s),c=e=>{let{children:t,networkId:n}=e;const s=(0,o.useRouter)(),[c,u]=(0,i.useState)(s.asPath),[l,d]=(0,i.useState)(n),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";u(e),d(e.split("/")[1])};(0,i.useEffect)((()=>(s.events.on("routeChangeComplete",f),()=>{s.events.off("routeChangeComplete",f)})),[s.events]);return(0,r.jsx)(a.Provider,{value:{networkId:l,onNetworkMismatch:e=>Promise.resolve(e)},children:t})}},75334:function(e,t,n){"use strict";n.d(t,{N$:function(){return u},cJ:function(){return c}});var r=n(85893),o=n(67294);const i=e=>({...e}),s=(e,t)=>{switch(t.type){case"setLoading":return{...e,isLoading:t.payload};case"setProcessing":return{...e,isProcessing:t.payload};case"addAlert":return{...e,alerts:e.alerts.find((e=>e.key===t.payload.key))?e.alerts:[...e.alerts,t.payload]};case"removeAlert":return{...e,alerts:e.alerts.filter((e=>e.key!==t.payload))};case"clearAlerts":return{...e,alerts:[]};case"pushMessage":return{...e,messages:e.messages.find((e=>e.key===t.payload.key))?e.messages:[...e.messages,t.payload]};case"popMessage":return{...e,messages:e.messages.filter((e=>e.key!==t.payload))};default:return e}},a={isLoading:!1,isProcessing:!1,alerts:[],messages:[]},c=(0,o.createContext)({notifications:a,dispatchNotification:e=>{},message:{},setProcessing:e=>{},setLoading:e=>{}}),u=e=>{let{children:t}=e;const[n,u]=(0,o.useReducer)(s,a,i),l={info:e=>u({type:"pushMessage",payload:{severity:"success",text:e,key:e}}),warning:e=>u({type:"pushMessage",payload:{severity:"warning",text:e,key:e}}),alert:e=>u({type:"addAlert",payload:{severity:"warning",text:e,key:e}}),bannerWithAction:(e,t,n,r)=>u({type:"addAlert",payload:{severity:"info",text:e,key:t,action:n,cta:r}}),removeAlert:e=>u({type:"removeAlert",payload:e})};return(0,r.jsx)(c.Provider,{value:{notifications:n,dispatchNotification:u,message:l,setProcessing:e=>u({type:"setProcessing",payload:e}),setLoading:e=>u({type:"setLoading",payload:e})},children:t})}},98695:function(e,t,n){"use strict";n.d(t,{Q:function(){return l},b:function(){return u}});var r=n(85893),o=n(19368),i=n(54306),s=n(14990),a=n(67294);const c={connection:null,provider:null,balance:null,connected:!1,setConnection:()=>{},getBalance:()=>{},fundWallet:()=>{}},u=(0,a.createContext)(c),l=e=>{let{children:t}=e;const{publicKey:n,connected:c,sendTransaction:l}=(0,i.O)(),[d,f]=(0,a.useState)(),[h,p]=(0,a.useState)(null),[m,g]=(0,a.useState)(null);(0,a.useEffect)((()=>{if(c&&!h){"preview.xen.network".includes("localhost")}}),[c,!!h]),(0,a.useEffect)((()=>{if(h&&!m){const e=new o.Y7(h,null,{});g(e)}}),[!!h,!!m]),(0,a.useEffect)((()=>{h&&n&&h.getBalance(n).then((e=>{f(BigInt(e))})).catch((e=>console.error(e)))}),[d,n,!!h]);return(0,r.jsx)(u.Provider,{value:{connection:h,setConnection:p,provider:m,balance:d,getBalance:async e=>"object"===typeof e?h.getBalance(e.publicKey).then((e=>e)):h.getBalance(new s.PublicKey(e)).then((e=>e)),fundWallet:async(e,t,r)=>{if(n&&h){const o=s.SystemProgram.transfer({fromPubkey:n,toPubkey:new s.PublicKey(e),lamports:t||1e3}),i=await h.getLatestBlockhash(),a=new s.Transaction({feePayer:n,recentBlockhash:i.blockhash}).add(o),c=await l(a,h);return h.onSignature(c,r,"confirmed"),c}return null},connected:c},children:t})}},64120:function(e,t,n){"use strict";n.d(t,{Q:function(){return E},X:function(){return _}});var r=n(85893),o=n(11227),i=n(11752),s=n.n(i),a=n(67294);function c(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function u(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}function l(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,c(e,t,"set"),n),n}const d="accounts-".concat(2),f="state-".concat(2),h={ACCOUNTS:d,STATE:f,SYSTEM:"system"};var p=new WeakMap;class m{static getDefaultStore(e,t){return this.store[e]||(this.store[e]=new m({dbName:"".concat(e,"-xen-crypto"),storeName:d,otherStores:[f],index:t})),this.store[e]}ready(){return this._dbp.then((e=>this))}_withIDBStore(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._defaultStoreName;return(t,n)=>this._dbp.then((r=>r?new Promise(((o,i)=>{const s=r.transaction(e,t);s.oncomplete=e=>o(e),s.onabort=()=>i(s.error),s.onerror=()=>i(s.error),n(s.objectStore(e))})):Promise.reject(new Error("no db"))))}get(e){return t=>{let n;return this._withIDBStore(e)("readonly",(e=>{n=e.get(t)})).then((()=>n.result)).catch((e=>Promise.resolve(void 0)))}}set(e){return(t,n)=>{return function(e,t){return t.get?t.get.call(e):t.value}(r=this,c(r,p,"get"))?Promise.resolve(void 0):this._withIDBStore(e)("readwrite",(e=>{e.put(n,t)}));var r}}inc(e){return(t,n)=>{let r=null;return this._withIDBStore(e)("readonly",(e=>{r=e.get(t)})).then((()=>{const o=r.result||0;return this._withIDBStore(e)("readwrite",(e=>e.put(o+n,t)))})).catch((r=>this._withIDBStore(e)("readwrite",(e=>e.put(n,t)))))}}del(e){return t=>{let n;return this._withIDBStore(e)("readwrite",(e=>{n=e.delete(t)})).then((()=>Promise.resolve("undefined"===typeof n.result))).catch((()=>Promise.resolve(void 0)))}}clear(e){return()=>this._withIDBStore(e)("readwrite",(e=>{e.clear()}))}keys(e){return()=>{const t=[];return this._withIDBStore(e)("readonly",(e=>{(e.openKeyCursor||e.openCursor).call(e).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}})).then((()=>t))}}getMany(e){return(t,n)=>{let r=0;const o=[];return this._withIDBStore(e)("readonly",(e=>{const i=e.index("ts");return i.openCursor.call(i,null,"prev").onsuccess=function(e){if(!this.result||r>=t+n)return;const i=e.target.result;r>=t&&o.push(i.value),r++,this.result.continue()}})).then((()=>o))}}constructor({dbName:e="keyval-store",storeName:t="keyval",otherStores:n,index:r}){u(this,p,{writable:!0,value:void 0}),this.dbname=e,this._defaultStoreName=t,this._dbp=new Promise(((o,i)=>{try{const s=indexedDB.open(e,2);s.onerror=()=>i(s.error),s.onsuccess=()=>o(s.result),s.onupgradeneeded=e=>{const o=e.target.result;o.objectStoreNames.contains(t)||o.createObjectStore(t),n&&Array.isArray(n)&&n.forEach((e=>{if(!o.objectStoreNames.contains(e)){const t=o.createObjectStore(e);r&&t.createIndex(r.name,r.keyPath,r.options)}}))}}catch(s){i(s)}})).catch((e=>"InvalidStateError"===e.name?(l(this,p,e),Promise.reject(new Error("no store"))):Promise.reject(e)))}}m.store={};var g=n(1757),y=n(11345);const b=(0,o.debug)("context:storage"),{publicRuntimeConfig:v}=s()(),w=(0,g.Z)({config:v}),x={},E=(0,a.createContext)(x),_=e=>{let{children:t}=e;const{networkId:n}=(0,a.useContext)(y.x),[o]=(0,a.useState)((()=>Object.keys(w).reduce(((e,t)=>(e[t]=m.getDefaultStore(t,null),e)),{}))),[i,s]=(0,a.useState)((()=>Object.keys(w).reduce(((e,t)=>(e[t]=!1,e)),{}))),[c,u]=(0,a.useState)((()=>Object.keys(w).reduce(((e,t)=>(e[t]=[],e)),{}))),{readState:l,writeState:d,addAccount:f,removeAccount:p,hasAccount:g,getAccounts:v}={addAccount:e=>t=>e?e.set(h.ACCOUNTS)(t,Date.now()):Promise.resolve(!1),hasAccount:e=>t=>e?e.get(h.ACCOUNTS)(t):Promise.resolve(!1),removeAccount:e=>t=>e?e.del(h.ACCOUNTS)(t):Promise.resolve(!1),getAccounts:e=>()=>e?e&&e.keys(h.ACCOUNTS)():Promise.resolve(!1),readState:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return()=>e?e.get(h.STATE)(t):Promise.resolve(!1)},writeState:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return n=>e?e.set(h.STATE)(t,n):Promise.resolve(!1)}};(0,a.useEffect)((()=>{for(const[e,t]of Object.entries(o))t.ready().then((t=>s((t=>({...t,[e]:!0}))))).catch((t=>s((n=>({...n,[e]:t})))))}),[]);const x=i[n];(0,a.useEffect)((()=>{!0===x&&v(o[n])().then((e=>u((t=>({...t,[n]:e})))))}),[x,n]);const _=n&&o[n],k=n&&c[n];return(0,r.jsx)(E.Provider,{value:{db:_,dbStatus:i,trackedAccounts:k,tracked:c,getDb:e=>o[e],readState:(e,t)=>()=>!0===i[e||n]?l(o[e||n],t)():Promise.resolve(),writeState:(e,t)=>r=>!0===i[e||n]?d(o[e||n],t)(r):Promise.resolve(),addAccount:(e,t)=>!0===i[t||n]?g(o[t||n])(e).then((r=>{b("add",e,!!r,i),r||f(o[t||n])(e).then((r=>{r&&u((r=>({...r,[t||n]:[...r[t||n],e]})))}))})):Promise.resolve(),hasAccount:(e,t)=>!0===i[t||n]?g(o[t||n])(e):Promise.resolve(),removeAccount:(e,t)=>!0===i[t||n]?g(o[t||n])(e).then((r=>{b("remove",e,!!r,i),r&&p(o[t||n])(e).then((o=>{o&&(b("removed",e,!!r,i),u((r=>({...r,[t||n]:[...r[t||n].filter((t=>t!==e))]}))))}))})):Promise.resolve(),getAccounts:e=>!0===i[e||n]?v(o[e||n])():Promise.resolve()},children:t})}},91742:function(e,t,n){"use strict";n.d(t,{I:function(){return E},N:function(){return x}});var r=n(85893),o=n(74821),i=n(67294),s=n(87462),a=n(44819),c=n(56760);var u="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";var l=function(e){const{children:t,theme:n}=e,o=(0,c.Z)(),l=i.useMemo((()=>{const e=null===o?n:function(e,t){if("function"===typeof t)return t(e);return(0,s.Z)({},e,t)}(o,n);return null!=e&&(e[u]=null!==o),e}),[n,o]);return(0,r.jsx)(a.Z.Provider,{value:l,children:t})},d=n(75260),f=n(96682);const h={};function p(e){const t=(0,f.Z)();return(0,r.jsx)(d.T.Provider,{value:"object"===typeof t?t:h,children:e.children})}var m=function(e){const{children:t,theme:n}=e;return(0,r.jsx)(l,{theme:n,children:(0,r.jsx)(p,{children:t})})},g=n(71387),y=n(80702);const b={palette:{mode:"dark"},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1300}},typography:{fontFamily:["Noto Sans","Arial","sans-serif"].join(","),fontWeightRegular:500,fontSize:16}},v=e=>"light"===e?{components:{MuiPaper:{styleOverrides:{root:{}}},MuiAppBar:{styleOverrides:{colorPrimary:{backgroundColor:"#ededed"}}},MuiCard:{styleOverrides:{boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}}},MuiDataGrid:{styleOverrides:{root:{border:"none",fontFamily:["Courier"]}}}}:{components:{MuiDataGrid:{styleOverrides:{root:{border:"none"}}}}},w={mode:"dark",setMode:e=>{},isLarge:!0,isExtraLarge:!1,safeRows:0},x=(0,i.createContext)(w),E=e=>{let{children:t}=e;const[n,a]=(0,i.useState)("dark"),c={...b,...v("dark")},[u,l]=(0,i.useState)((0,o.Z)(c)),[d,f]=(0,i.useState)(!1),[h,p]=(0,i.useState)(!1),[w,E]=(0,i.useState)(0),_=(e,t)=>()=>{f(e.matches),p(t.matches)},k=e=>()=>{a(e.matches?"dark":"light")},S={...u,palette:{...u.palette,mode:n}};return(0,i.useEffect)((()=>{const e=window.localStorage.getItem("theme");if(e)a(e);else{const e=window.matchMedia("(prefers-color-scheme: dark)");e.onchange=k(e),k(e)()}const t=window.matchMedia("(min-width: 768px) and (orientation: landscape)"),n=window.matchMedia("(min-width: 1280px) and (orientation: landscape)");if(_(t,n)(),t.onchange=_(t,n),0===w){const e=Math.ceil((.6*window.innerHeight-112)/52);E(e)}}),[]),(0,i.useEffect)((()=>{let e={...b,palette:{...b.palette,mode:n},...v(n)};"light"===n&&(e={...e,palette:{...e.palette,background:{default:"light"===n?"#ededed":"#121212"}}});const t=(0,o.Z)(e);l(function(e,t={}){const{breakpoints:n=["sm","md","lg"],disableAlign:r=!1,factor:o=2,variants:i=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,a=(0,s.Z)({},e);a.typography=(0,s.Z)({},a.typography);const c=a.typography,u=(0,y.vs)(c.htmlFontSize),l=n.map((e=>a.breakpoints.values[e]));return i.forEach((e=>{const t=c[e],n=parseFloat(u(t.fontSize,"rem"));if(n<=1)return;const i=n,a=1+(i-1)/o;let{lineHeight:d}=t;if(!(0,y.dA)(d)&&!r)throw new Error((0,g.Z)(6));(0,y.dA)(d)||(d=parseFloat(u(d,"rem"))/parseFloat(n));let f=null;r||(f=e=>(0,y.LV)({size:e,grid:(0,y.vY)({pixels:4,lineHeight:d,htmlFontSize:c.htmlFontSize})})),c[e]=(0,s.Z)({},t,(0,y.ze)({cssProperty:"fontSize",min:a,max:i,unit:"rem",breakpoints:l,transform:f}))})),a}(t))}),[n]),(0,r.jsx)(x.Provider,{value:{mode:n,setMode:a,isLarge:d,isExtraLarge:h,safeRows:w},children:(0,r.jsx)(m,{theme:S,children:t})})}},13033:function(e,t,n){"use strict";n.d(t,{b:function(){return h},f:function(){return p}});var r=n(85893),o=n(11752),i=n.n(o),s=n(67294),a=n(34789),c=n(1757);const{publicRuntimeConfig:u}=i()(),l=(0,c.Z)({config:u}),d=u.xenCryptoABI,f={global:{},user:{},isFetching:!1,refetchUserBalance:()=>{},refetchUserMint:()=>{},refetchUserStake:()=>{}},h=(0,s.createContext)(f),p=e=>{let{children:t}=e;const[n,o]=(0,s.useState)({}),[i,c]=(0,s.useState)({}),{chain:u}=(0,a.LN)(),{address:f}=(0,a.mA)(),p=e=>{var t;return{address:null===(t=Object.values(l).find((t=>Number(null===t||void 0===t?void 0:t.chainId)===(null===e||void 0===e?void 0:e.id))))||void 0===t?void 0:t.contractAddress,abi:d}},{isFetching:m}=(0,a.Dm)({contracts:[{...p(u),functionName:"genesisTs",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"getCurrentMaxTerm",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"getCurrentAMP",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"getCurrentEAAR",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"getCurrentAPY",chainId:null===u||void 0===u?void 0:u.id}],onSuccess:e=>{const[{result:t},{result:n},{result:r},{result:i},{result:s}]=e;o((e=>({...e,[null===u||void 0===u?void 0:u.id]:{...null===e||void 0===e?void 0:e[null===u||void 0===u?void 0:u.id],genesisTs:t,currentMaxTerm:n,currentAMP:r,currentEAA:i,currentAPY:s}})))}});(0,a.Dm)({contracts:[{...p(u),functionName:"globalRank",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"totalSupply",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"activeMinters",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"activeStakes",chainId:null===u||void 0===u?void 0:u.id},{...p(u),functionName:"totalXenStaked",chainId:null===u||void 0===u?void 0:u.id}],onSuccess:e=>{const[{result:t},{result:n},{result:r},{result:i},{result:s}]=e;o((e=>({...e,[null===u||void 0===u?void 0:u.id]:{...null===e||void 0===e?void 0:e[null===u||void 0===u?void 0:u.id],globalRank:t,totalSupply:n,activeMinters:r,activeStakes:i,totalXenStaked:s}})))}});const{refetch:g}=(0,a.do)({...p(u),functionName:"balanceOf",args:[f],account:f,chainId:null===u||void 0===u?void 0:u.id,onSuccess:e=>{c((t=>{var n;return{...t,[null===u||void 0===u?void 0:u.id]:{...null===t||void 0===t?void 0:t[null===u||void 0===u?void 0:u.id],[f]:{...null===t||void 0===t||null===(n=t[null===u||void 0===u?void 0:u.id])||void 0===n?void 0:n[f],balance:e}}}}))}}),{refetch:y}=(0,a.do)({...p(u),functionName:"getUserMint",account:f,chainId:null===u||void 0===u?void 0:u.id,onSuccess:e=>{c((t=>{var n;return{...t,[null===u||void 0===u?void 0:u.id]:{...null===t||void 0===t?void 0:t[null===u||void 0===u?void 0:u.id],[f]:{...null===t||void 0===t||null===(n=t[null===u||void 0===u?void 0:u.id])||void 0===n?void 0:n[f],mintInfo:e}}}}))}}),{refetch:b}=(0,a.do)({...p(u),functionName:"getUserStake",account:f,chainId:null===u||void 0===u?void 0:u.id,onSuccess:e=>{c((t=>{var n;return{...t,[null===u||void 0===u?void 0:u.id]:{...null===t||void 0===t?void 0:t[null===u||void 0===u?void 0:u.id],[f]:{...null===t||void 0===t||null===(n=t[null===u||void 0===u?void 0:u.id])||void 0===n?void 0:n[f],stakeInfo:e}}}}))}});return(0,r.jsx)(h.Provider,{value:{global:n,user:i,isFetching:m,refetchUserBalance:g,refetchUserMint:y,refetchUserStake:b},children:t})}},17273:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var r=n(67294);function o(e,t){const[n,o]=(0,r.useState)((()=>localStorage.getItem(e)||t));return[n,t=>{o(t),void 0===t?localStorage.removeItem(e):localStorage.setItem(e,t)}]}},92845:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(85893),o=n(50594),i=n(19604),s=n(9144),a=n(75084),c=n(80562),u=n(87462),l=n(63366),d=n(67294),f=n(86010),h=n(94780),p=n(81719),m=n(78884),g=n(29630),y=n(1588),b=n(34867);function v(e){return(0,b.Z)("MuiAlertTitle",e)}(0,y.Z)("MuiAlertTitle",["root"]);const w=["className"],x=(0,p.ZP)(g.Z,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2})));var E=d.forwardRef((function(e,t){const n=(0,m.Z)({props:e,name:"MuiAlertTitle"}),{className:o}=n,i=(0,l.Z)(n,w),s=n,a=(e=>{const{classes:t}=e;return(0,h.Z)({root:["root"]},v,t)})(s);return(0,r.jsx)(x,(0,u.Z)({gutterBottom:!0,component:"div",ownerState:s,ref:t,className:(0,f.default)(a.root,o)},i))})),_=n(75334);const k=e=>{let{alert:t,onActionClick:n,removeAlert:u}=e;return(0,r.jsx)(i.Z,{variant:"filled",severity:t.severity,sx:{backgroundColor:e=>"light"===e.palette.mode?"#A9A9A9":"#808080",color:e=>e.palette.getContrastText("light"===e.palette.mode?"#A9A9A9":"#808080"),display:"flex",alignItems:"center"},action:(0,r.jsxs)(s.Z,{direction:"row",children:[t.action&&(0,r.jsx)(a.Z,{variant:"contained",disableElevation:!0,disableRipple:!0,sx:{backgroundColor:e=>"light"===e.palette.mode?e.palette.grey.A700:e.palette.grey.A200,margin:0},size:"small",onClick:n(t.key,t.action),children:t.cta||"Proceed"}),(0,r.jsx)(c.Z,{onClick:u(t),children:(0,r.jsx)(o.Z,{})})]}),onClose:u(t),children:(0,r.jsx)(E,{sx:{margin:0},children:t.text})})};var S=()=>{const{notifications:e,dispatchNotification:t}=(0,d.useContext)(_.cJ),n=(e,n)=>()=>{n().then((()=>{t({type:"removeAlert",payload:e})}))},o=e=>()=>{e&&t({type:"removeAlert",payload:e.key})};return(0,r.jsx)(s.Z,{direction:"column",spacing:0,children:e.alerts.map((e=>(0,r.jsx)(k,{alert:e,onActionClick:n,removeAlert:o},e.key)))})}},63179:function(e,t,n){"use strict";n.d(t,{Z:function(){return ne}});var r=n(85893),o=n(40793),i=n(99879),s=n(57289),a=n(23508),c=n(326),u=n(62097),l=n(61953),d=n(85050),f=n(20784),h=n(80562),p=n(19117),m=n(31538),g=n(44373),y=n(74065),b=n(29618),v=n(47028),w=n(9144),x=n(72389),E=n(29630),_=n(11752),k=n.n(_),S=n(11163),I=n(67294),C=n(34789),T=n(58928),A=n(90560),P=n(75084),O=n(13379),j=n(29620),M=n(77745),R=n(95398),B=n(85214),N=n(18746),L=n(95309),U=n(61702),D=n(29894),F=n(76779);var z=e=>{let{open:t,close:n,onSelect:o,items:i}=e;return(0,r.jsxs)(j.Z,{open:t,maxWidth:"xs",fullWidth:!0,keepMounted:!0,children:[(0,r.jsx)(M.Z,{children:"Select BTC wallet"}),(0,r.jsx)(R.Z,{children:(0,r.jsx)(B.Z,{children:i.map((e=>(0,r.jsx)(N.ZP,{disablePadding:!0,children:(0,r.jsxs)(L.Z,{onClick:o(e.id),children:[(0,r.jsx)(U.Z,{primary:e.name}),(0,r.jsx)(D.Z,{children:e.available?(0,r.jsx)(O.Z,{fontSize:"small"}):(0,r.jsx)(l.Z,{children:"Install"})})]})},"".concat(e.id,"-").concat(e.available))))})}),(0,r.jsx)(F.Z,{children:(0,r.jsx)(P.Z,{onClick:n,children:"Close"})})]})},$=n(88416),q=n(17273);var Z=()=>{const{available:e,unisatAvailable:t,xverseAvailable:n,connected:o,requestAccounts:i,accounts:s}=(0,I.useContext)($.$),[a,c]=(0,I.useState)("Connect"),[u,l]=(0,q._)("btc-preferred-wallet"),[d,f]=(0,I.useState)(!1),h=[{id:"unisat",name:"UniSat",available:t},{id:"xverse",name:"XVerse",available:n}];return(0,I.useEffect)((()=>{e?!o||s&&!s[0]?c("Connect"):s&&s[0]?c("".concat(s[0].slice(0,4),"...").concat(s[0].slice(-4))):c("..."):c("Connect Wallet")}),[e,o,u,JSON.stringify(s)]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{items:h,open:d,close:()=>f(!1),onSelect:e=>()=>{f(!1),"unisat"===e?t?i(e).then((()=>l(e))).catch((e=>console.error(e))):window.open("https://unisat.io","_blank"):"xverse"===e&&(n?i(e).then((()=>l(e))).catch((e=>console.error(e))):window.open("https://www.xverse.app","_blank"))}}),(0,r.jsx)(P.Z,{sx:{textTransform:"unset",ml:2,borderRadius:25},variant:e&&o?"outlined":"contained",onClick:()=>{e?e&&!o&&u&&i(u).catch((e=>console.error(e))):f(!0)},children:a})]})},H=n(33084),W=n(1757),G=n(91742),K=n(92845);const{publicRuntimeConfig:V}=k()(),X=(0,W.Z)({config:V});var Y=()=>{var e;const t=(0,u.Z)(),{mode:n,setMode:o}=(0,I.useContext)(G.N),_=(0,S.useRouter)(),[k,P]=(0,I.useState)(null),[O,j]=(0,I.useState)(null),[M,R]=(0,I.useState)(""),{chain:B}=(0,C.LN)(),{balance:N}=(0,I.useContext)($.$),L=null===(e=Object.values(X).find((e=>Number(null===e||void 0===e?void 0:e.chainId)===Number(null===B||void 0===B?void 0:B.id))))||void 0===e?void 0:e.networkId,U=null===N||void 0===N?void 0:N.confirmed,D=Boolean(k),F=e=>()=>{P(null),e&&(e.startsWith("/")?_.replace(e).then((()=>{})):e.startsWith("http")&&window.open(e,"_blank"))};return(0,r.jsx)(l.Z,{sx:{flexGrow:1},children:(0,r.jsxs)(d.Z,{position:"fixed",elevation:0,children:[(0,r.jsx)(K.Z,{}),(0,r.jsxs)(f.Z,{sx:{},children:[(0,r.jsx)(h.Z,{sx:{display:{xs:"inline-flex",lg:"none"}},"aria-controls":D?"navigation-menu":void 0,"aria-haspopup":"true","aria-expanded":D?"true":void 0,onClick:e=>{P(e.currentTarget)},children:(0,r.jsx)(c.Z,{})}),(0,r.jsx)(p.Z,{open:D,role:"navigation",anchorEl:k,id:"navigation-menu",sx:{"& .MuiMenu-paper":{width:"200px"}},onClose:F(null),onClick:F(null),children:(0,H.l)(L).filter((e=>e.href||e.items)).map((e=>{return e.href?(0,r.jsx)(m.Z,{selected:_.asPath===e.href,onClick:F(e.href),children:e.label},e.value):(0,r.jsxs)("div",{children:[(0,r.jsx)(g.Z,{}),(0,r.jsxs)(y.Z,{expanded:M===e.value,disableGutters:!0,elevation:0,onChange:(o=e.value,(e,t)=>{e.stopPropagation(),R(t&&o)}),sx:{padding:0,border:0,borderBottom:0,backgroundColor:"transparent","&:before":{display:"none"}},children:[(0,r.jsx)(b.Z,{expandIcon:(0,r.jsx)(a.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",sx:{padding:"0 auto 0 0"},children:(0,r.jsx)(m.Z,{disableGutters:!0,component:"span",sx:{width:"100%","&:hover":{backgroundColor:"transparent"}},children:e.label},e.value)}),(0,r.jsx)(v.Z,{children:e.items.map((e=>(0,r.jsx)(A.S,{props:{...e,theme:t,mode:n},isCurrent:!1},e.label)))})]},"acc-".concat(e.value))]},e.value);var o}))}),(0,r.jsx)(w.Z,{direction:"row",sx:{flexGrow:1},children:(0,r.jsx)(l.Z,{role:"navigation",sx:{display:{xs:"none",lg:"block"}},children:(0,H.l)(L).map((e=>(0,r.jsx)(T.j,{theme:t,label:e.label,value:e.value,href:e.href,items:e.items,menuEl:O,setMenuEl:j,current:_.asPath},e.value)))})}),(0,r.jsx)(x.Z,{title:"Toggle light/dark mode",children:(0,r.jsx)(h.Z,{sx:{ml:1},onClick:()=>{o("dark"===n?"light":"dark"),window.localStorage.setItem("theme","dark"===n?"light":"dark")},color:"inherit",children:"dark"===n?(0,r.jsx)(s.Z,{}):(0,r.jsx)(i.Z,{sx:{color:"black"}})})}),(0,r.jsxs)(E.Z,{variant:"body2",sx:{ml:1},children:[(null===U||void 0===U?void 0:U.toLocaleString())||"..."," SAT"]}),(0,r.jsx)(Z,{})]})]})})},J=n(99034),Q=n.n(J),ee=n(32987),te=n(53292);var ne=e=>{let{children:t,tokenAddress:n,contractAddress:i,projectId:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.ZP,{}),(0,r.jsx)(te.Z,{}),(0,r.jsx)(Y,{}),(0,r.jsx)("main",{className:Q().main,style:{minHeight:"90vh"},children:(0,r.jsx)("section",{style:{width:"100%"},children:t})}),(0,r.jsx)(ee.Z,{projectId:s,contractAddress:i,tokenAddress:n})]})}},32987:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(85893),o=n(16829),i=n(58175),s=n(79072),a=n(36336),c=n(9144),u=n(61953),l=n(72389),d=n(29630),f=n(11752),h=n.n(f),p=n(67294),m=n(90843);const g=n.n(m)();var y=n(11345),b=n(91742),v=n(1757),w=n(99034),x=n.n(w);const E=(0,i.Z)((0,r.jsx)("path",{d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6.5 8.778c-.441.196-.916.328-1.414.388.509-.305.898-.787 1.083-1.362-.476.282-1.003.487-1.564.597-.448-.479-1.089-.778-1.796-.778-1.59 0-2.758 1.483-2.399 3.023-2.045-.103-3.86-1.083-5.074-2.572-.645 1.106-.334 2.554.762 3.287-.403-.013-.782-.124-1.114-.308-.027 1.14.791 2.207 1.975 2.445-.346.094-.726.116-1.112.042.313.978 1.224 1.689 2.3 1.709-1.037.812-2.34 1.175-3.647 1.021 1.09.699 2.383 1.106 3.773 1.106 4.572 0 7.154-3.861 6.998-7.324.482-.346.899-.78 1.229-1.274z"}),"twitter"),_=(0,i.Z)((0,r.jsx)("path",{id:"telegram-5",d:"M12,0c-6.627,0 -12,5.373 -12,12c0,6.627 5.373,12 12,12c6.627,0 12,-5.373 12,-12c0,-6.627 -5.373,-12 -12,-12Zm0,2c5.514,0 10,4.486 10,10c0,5.514 -4.486,10 -10,10c-5.514,0 -10,-4.486 -10,-10c0,-5.514 4.486,-10 10,-10Zm2.692,14.889c0.161,0.115 0.368,0.143 0.553,0.073c0.185,-0.07 0.322,-0.228 0.362,-0.42c0.435,-2.042 1.489,-7.211 1.884,-9.068c0.03,-0.14 -0.019,-0.285 -0.129,-0.379c-0.11,-0.093 -0.263,-0.12 -0.399,-0.07c-2.096,0.776 -8.553,3.198 -11.192,4.175c-0.168,0.062 -0.277,0.223 -0.271,0.4c0.006,0.177 0.125,0.33 0.296,0.381c1.184,0.354 2.738,0.847 2.738,0.847c0,0 0.725,2.193 1.104,3.308c0.047,0.139 0.157,0.25 0.301,0.287c0.145,0.038 0.298,-0.001 0.406,-0.103c0.608,-0.574 1.548,-1.461 1.548,-1.461c0,0 1.786,1.309 2.799,2.03Zm-5.505,-4.338l0.84,2.769l0.186,-1.754c0,0 3.243,-2.925 5.092,-4.593c0.055,-0.048 0.062,-0.13 0.017,-0.188c-0.045,-0.057 -0.126,-0.071 -0.188,-0.032c-2.143,1.368 -5.947,3.798 -5.947,3.798Z"}),"telegram"),k=(0,i.Z)((0,r.jsx)("path",{d:"M16.23 7.102c-2.002-.136-6.462-.135-8.461 0-2.165.148-2.419 1.456-2.436 4.898.017 3.436.27 4.75 2.437 4.898 1.999.135 6.459.136 8.461 0 2.165-.148 2.42-1.457 2.437-4.898-.018-3.436-.271-4.75-2.438-4.898zm-6.23 7.12v-4.444l4.778 2.218-4.778 2.226zm2-12.222c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12z"}),"youtube"),S=(0,i.Z)((0,r.jsx)("path",{d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm0 6c-3.313 0-6 2.686-6 6 0 2.651 1.719 4.9 4.104 5.693.3.056.396-.13.396-.289v-1.117c-1.669.363-2.017-.707-2.017-.707-.272-.693-.666-.878-.666-.878-.544-.373.041-.365.041-.365.603.042.92.619.92.619.535.917 1.403.652 1.746.499.054-.388.209-.652.381-.802-1.333-.152-2.733-.667-2.733-2.965 0-.655.234-1.19.618-1.61-.062-.153-.268-.764.058-1.59 0 0 .504-.161 1.65.615.479-.133.992-.199 1.502-.202.51.002 1.023.069 1.503.202 1.146-.776 1.648-.615 1.648-.615.327.826.121 1.437.06 1.588.385.42.617.955.617 1.61 0 2.305-1.404 2.812-2.74 2.96.216.186.412.551.412 1.111v1.646c0 .16.096.347.4.288 2.383-.793 4.1-3.041 4.1-5.691 0-3.314-2.687-6-6-6z"}),"github"),I=(0,i.Z)((0,r.jsx)("path",{d:"M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm0 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm2.784 15.584h-6.804c-.678 0-1.23-.552-1.23-1.236v-8.112c0-.684.552-1.236 1.23-1.236h8.04c.678 0 1.23.552 1.23 1.236v10.764l-1.29-1.14-.726-.672-.768-.714.318 1.11zm-1.08-2.748c1.326-.042 1.836-.912 1.836-.912 0-1.932-.864-3.498-.864-3.498-.864-.648-1.686-.63-1.686-.63l-.084.096c1.02.312 1.494.762 1.494.762-.624-.342-1.236-.51-1.806-.576-.432-.048-.846-.036-1.212.012l-.102.012c-.21.018-.72.096-1.362.378l-.354.174s.498-.474 1.578-.786l-.06-.072s-.822-.018-1.686.63c0 0-.864 1.566-.864 3.498 0 0 .504.87 1.83.912l.402-.498c-.762-.228-1.05-.708-1.05-.708l.168.102.024.018.024.013.006.004.024.013c.15.084.3.15.438.204.246.096.54.192.882.258.45.084.978.114 1.554.006.282-.048.57-.132.87-.258.21-.078.444-.192.69-.354 0 0-.3.492-1.086.714l.396.486zm-2.79-2.802c-.342 0-.612.3-.612.666 0 .366.276.666.612.666.342 0 .612-.3.612-.666.006-.366-.27-.666-.612-.666zm2.19 0c-.342 0-.612.3-.612.666 0 .366.276.666.612.666.342 0 .612-.3.612-.666 0-.366-.27-.666-.612-.666z"}),"discord"),C=(0,i.Z)((0,r.jsx)("path",{d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6 11.889c0-.729-.596-1.323-1.329-1.323-.358 0-.681.143-.92.373-.905-.595-2.13-.975-3.485-1.023l.742-2.334 2.008.471-.003.029c0 .596.487 1.082 1.087 1.082.599 0 1.086-.485 1.086-1.082s-.488-1.082-1.087-1.082c-.46 0-.852.287-1.01.69l-2.164-.507c-.094-.023-.191.032-.22.124l-.827 2.603c-1.419.017-2.705.399-3.65 1.012-.237-.219-.552-.356-.9-.356-.732.001-1.328.594-1.328 1.323 0 .485.267.905.659 1.136-.026.141-.043.283-.043.429-.001 1.955 2.404 3.546 5.359 3.546 2.956 0 5.36-1.591 5.36-3.546 0-.137-.015-.272-.038-.405.416-.224.703-.657.703-1.16zm-8.612.908c0-.434.355-.788.791-.788.436 0 .79.353.79.788 0 .434-.355.787-.79.787-.436.001-.791-.352-.791-.787zm4.53 2.335c-.398.396-1.024.589-1.912.589l-.007-.001-.007.001c-.888 0-1.514-.193-1.912-.589-.073-.072-.073-.19 0-.262.072-.072.191-.072.263 0 .325.323.864.481 1.649.481l.007.001.007-.001c.784 0 1.324-.157 1.649-.481.073-.072.19-.072.263 0 .073.072.073.19 0 .262zm-.094-1.547c-.436 0-.79-.353-.79-.787 0-.434.355-.788.79-.788.436 0 .79.353.79.788 0 .434-.354.787-.79.787z"}),"reddit"),T=(0,i.Z)((0,r.jsx)("path",{d:"M16 0h-14v24h20v-18l-6-6zm0 3l3 3h-3v-3zm-12 19v-20h10v6h6v14h-16z"}),"litepaper"),{publicRuntimeConfig:A}=h()(),P=(0,v.Z)({config:A}),O=(0,o.Z)("a")((e=>{let{theme:t}=e;return{color:t.palette.text.secondary,textDecoration:"none","&:hover":{color:t.palette.text.primary}}}));var j=e=>{let{tokenAddress:t,contractAddress:n,projectId:o="xen"}=e;const{mode:i}=(0,p.useContext)(b.N),{networkId:f}=(0,p.useContext)(y.x),h=g[o],m="dark"===i,v=P[f],w=n&&n.toString().startsWith("0x")?n:"",A=t&&t.toString().startsWith("0x")?t:"",j="string"===typeof w&&(null===v||void 0===v?void 0:v.explorerUrl)&&"".concat(v.explorerUrl,"address/").concat(w),M="string"===typeof A&&(null===v||void 0===v?void 0:v.explorerUrl)&&"".concat(v.explorerUrl,"address/").concat(A),R="xen"===o||"xenft"===o?"XEN: ".concat(((w||"").toString()||"-").slice(0,12)):"".concat(h.name,": ").concat(((w||"").toString()||"-").slice(0,12)),B="".concat(h.tokenSymbol||""," token: ").concat(((A||"").toString()||"-").slice(0,12)),N=!f;return(0,r.jsx)("footer",{className:x().footer,children:(0,r.jsxs)(s.ZP,{container:!0,sx:{alignItems:"center",pt:2},children:[(0,r.jsx)(s.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(a.Z,{children:(0,r.jsxs)(c.Z,{direction:"row",sx:{justifyContent:{xs:"center",md:"right"},alignItems:"center"},children:[(null===h||void 0===h?void 0:h.twitter)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"Twitter",children:(0,r.jsx)("a",{href:h.twitter,rel:"noreferrer",target:"_blank","aria-label":"twitter account",children:(0,r.jsx)(E,{color:m?"disabled":"action"})})})}),(null===h||void 0===h?void 0:h.youtube)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"YouTube",children:(0,r.jsx)("a",{href:h.youtube,rel:"noreferrer",target:"_blank","aria-label":"youtube account",children:(0,r.jsx)(k,{color:m?"disabled":"action"})})})}),(null===h||void 0===h?void 0:h.telegram)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"Telegram",children:(0,r.jsx)("a",{href:h.telegram,rel:"noreferrer",target:"_blank","aria-label":"telegram channel",children:(0,r.jsx)(_,{color:m?"disabled":"action"})})})}),(null===h||void 0===h?void 0:h.github)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"GitHub",children:(0,r.jsx)("a",{href:h.github,rel:"noreferrer",target:"_blank","aria-label":"github account",children:(0,r.jsx)(S,{color:m?"disabled":"action"})})})}),(null===h||void 0===h?void 0:h.discord)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"Discord",children:(0,r.jsx)("a",{href:h.discord,rel:"noreferrer",target:"_blank","aria-label":"discord channel",children:(0,r.jsx)(I,{color:m?"disabled":"action"})})})}),(null===h||void 0===h?void 0:h.reddit)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"Reddit",children:(0,r.jsx)("a",{href:h.reddit,rel:"noreferrer",target:"_blank","aria-label":"reddit account",children:(0,r.jsx)(C,{color:m?"disabled":"action"})})})}),(null===h||void 0===h?void 0:h.whitePaper)&&(0,r.jsx)(u.Z,{sx:{px:1},children:(0,r.jsx)(l.Z,{title:"Lite paper",children:(0,r.jsx)("a",{href:h.whitePaper,rel:"noreferrer",target:"_blank","aria-label":"white paper",children:(0,r.jsx)(T,{color:m?"disabled":"action"})})})})]})})}),(0,r.jsxs)(s.ZP,{item:!0,xs:12,md:6,children:[!N&&(0,r.jsxs)(d.Z,{variant:"body2",sx:{fontSize:14,textAlign:{xs:"center",md:"left"},padding:{xs:"0.5rem",md:0}},children:[w&&(0,r.jsx)(l.Z,{title:"Explore ".concat(h.name," Contract and Transactions"),children:(0,r.jsx)(O,{href:j,target:"_blank",rel:"noreferrer",style:{display:"unset"},children:R})}),A&&(0,r.jsx)(l.Z,{title:"Explore ".concat(h.tokenSymbol," Token and Transactions"),children:(0,r.jsxs)(O,{href:M,target:"_blank",rel:"noreferrer",style:{display:"unset"},children:["\xa0\u2022\xa0",B]})})]}),(0,r.jsxs)(d.Z,{variant:"body2",sx:{fontSize:14,display:{xs:"none",md:"block"}},children:[h.copyright," 2023 by"," ",(0,r.jsx)(O,{style:{display:"unset"},href:h.web,target:"_blank",rel:"noreferrer",children:h.owner||h.name}),". ",h.license,"\xa0\u2022\xa0",(0,r.jsx)(O,{style:{display:"unset"},href:h.termsText,target:"_blank",rel:"noreferrer",children:"Terms Of Use"}),"\xa0\u2022\xa0",(0,r.jsx)(O,{style:{display:"unset"},href:"/legal",target:"_blank",rel:"noreferrer",children:"Legal"})]})]})]})})}},40663:function(e,t,n){"use strict";n.d(t,{Z:function(){return q}});var r=n(85893),o=n(40793),i=n(99034),s=n.n(i),a=n(99879),c=n(57289),u=n(23508),l=n(326),d=n(62097),f=n(61953),h=n(85050),p=n(20784),m=n(80562),g=n(19117),y=n(31538),b=n(44373),v=n(74065),w=n(29618),x=n(47028),E=n(9144),_=n(72389),k=n(71176),S=n(65049),I=n(11752),C=n.n(I),T=n(11163),A=n(67294),P=n(34789),O=n(58928),j=n(90560),M=n(33084),R=n(91742),B=n(13033),N=n(1757),L=n(92845);const{publicRuntimeConfig:U}=C()(),D=(0,N.Z)({config:U});var F=()=>{var e,t,n;const o=(0,d.Z)(),{mode:i,setMode:s}=(0,A.useContext)(R.N),I=(0,T.useRouter)(),[C,N]=(0,A.useState)(null),[F,z]=(0,A.useState)(null),{chain:$}=(0,P.LN)(),{address:q}=(0,P.mA)(),{user:Z}=(0,A.useContext)(B.b),H=null===(e=Object.values(D).find((e=>Number(null===e||void 0===e?void 0:e.chainId)===Number(null===$||void 0===$?void 0:$.id))))||void 0===e?void 0:e.networkId,[W,G]=(0,A.useState)("");(0,A.useEffect)((()=>{const e=(0,S.QC)((e=>{var t;const n=null===(t=Object.values(D).find((t=>{var n;return Number(null===t||void 0===t?void 0:t.chainId)===Number(null===e||void 0===e||null===(n=e.chain)||void 0===n?void 0:n.id)})))||void 0===t?void 0:t.networkId,{networkId:r}=I.query,o=Array.isArray(r)?r[0]:r,i=I.asPath.replace(o,"");if(o){const e="/".concat(n,"/").concat(i);return I.replace(e).then((()=>n))}return Promise.resolve(o)}));return()=>{e()}}),[H]);const K=(null===(t=Z[null===$||void 0===$?void 0:$.id])||void 0===t||null===(n=t[q])||void 0===n?void 0:n.balance)||0n,V=Boolean(C),X=e=>()=>{N(null),e&&(e.startsWith("/")?I.replace(e).then((()=>{})):e.startsWith("http")&&window.open(e,"_blank"))},Y="/"===I.asPath;return(0,r.jsx)(f.Z,{sx:{flexGrow:1},children:(0,r.jsxs)(h.Z,{position:"fixed",elevation:0,children:[(0,r.jsx)(L.Z,{}),(0,r.jsxs)(p.Z,{sx:{},children:[(0,r.jsx)(m.Z,{sx:{display:{xs:"inline-flex",lg:"none"}},"aria-controls":V?"navigation-menu":void 0,"aria-haspopup":"true","aria-expanded":V?"true":void 0,onClick:e=>{N(e.currentTarget)},children:(0,r.jsx)(l.Z,{})}),(0,r.jsx)(g.Z,{open:V,role:"navigation",anchorEl:C,id:"navigation-menu",sx:{"& .MuiMenu-paper":{width:"200px"}},onClose:X(null),onClick:X(null),children:(0,M.l)(H||U.defaultNetworkId).filter((e=>e.href||e.items)).map((e=>{return e.href?(0,r.jsx)(y.Z,{selected:I.asPath===e.href,onClick:X(e.href),children:e.label},e.value):(0,r.jsxs)("div",{children:[(0,r.jsx)(b.Z,{}),(0,r.jsxs)(v.Z,{expanded:W===e.value,disableGutters:!0,elevation:0,onChange:(t=e.value,(e,n)=>{e.stopPropagation(),G(n&&t)}),sx:{padding:0,border:0,borderBottom:0,backgroundColor:"transparent","&:before":{display:"none"}},children:[(0,r.jsx)(w.Z,{expandIcon:(0,r.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",sx:{padding:"0 auto 0 0"},children:(0,r.jsx)(y.Z,{disableGutters:!0,component:"span",sx:{width:"100%","&:hover":{backgroundColor:"transparent"}},children:e.label},e.value)}),(0,r.jsx)(x.Z,{children:e.items.map((e=>(0,r.jsx)(j.S,{props:{...e,theme:o,mode:i},isCurrent:!1},e.label)))})]},"acc-".concat(e.value))]},e.value);var t}))}),(0,r.jsx)(E.Z,{direction:"row",sx:{flexGrow:1},children:(0,r.jsx)(f.Z,{role:"navigation",sx:{display:{xs:"none",lg:"block"}},children:(0,M.l)(H||U.defaultNetworkId).map((e=>(0,r.jsx)(O.j,{theme:o,label:e.label,value:e.value,href:e.href,items:e.items,menuEl:F,setMenuEl:z,current:I.asPath},e.value)))})}),(0,r.jsx)(_.Z,{title:"Toggle light/dark mode",children:(0,r.jsx)(m.Z,{sx:{ml:1},onClick:()=>{s("dark"===i?"light":"dark"),window.localStorage.setItem("theme","dark"===i?"light":"dark")},color:"inherit",children:"dark"===i?(0,r.jsx)(c.Z,{}):(0,r.jsx)(a.Z,{sx:{color:"black"}})})}),!Y&&(0,r.jsxs)(f.Z,{sx:{mx:2,color:o.palette.text.primary,display:{xs:"none",xl:"block"}},children:["XEN: ",(K/BigInt("1000000000000000000")).toLocaleString()]}),(0,r.jsx)(k.NL,{})]})]})})},z=n(32987),$=n(53292);var q=e=>{let{children:t,tokenAddress:n,contractAddress:i,projectId:a}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.ZP,{}),(0,r.jsx)($.Z,{}),(0,r.jsx)(F,{}),(0,r.jsx)("main",{className:s().main,style:{minHeight:"90vh"},children:(0,r.jsx)("section",{style:{width:"100%"},children:t})}),(0,r.jsx)(z.Z,{projectId:a,contractAddress:i,tokenAddress:n})]})}},53292:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(85893),o=n(63366),i=n(87462),s=n(67294),a=n(86010),c=n(94780),u=n(23926),l=n(81719),d=n(62097),f=n(78884),h=n(26432),p=n(36622),m=n(61760),g=n(41796),y=n(70918),b=n(1588),v=n(34867);function w(e){return(0,v.Z)("MuiSnackbarContent",e)}(0,b.Z)("MuiSnackbarContent",["root","message","action"]);const x=["action","className","message","role"],E=(0,l.ZP)(y.Z,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{const t="light"===e.palette.mode?.8:.98,n=(0,g._4)(e.palette.background.default,t);return(0,i.Z)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),_=(0,l.ZP)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),k=(0,l.ZP)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8});var S=s.forwardRef((function(e,t){const n=(0,f.Z)({props:e,name:"MuiSnackbarContent"}),{action:s,className:u,message:l,role:d="alert"}=n,h=(0,o.Z)(n,x),p=n,m=(e=>{const{classes:t}=e;return(0,c.Z)({root:["root"],action:["action"],message:["message"]},w,t)})(p);return(0,r.jsxs)(E,(0,i.Z)({role:d,square:!0,elevation:6,className:(0,a.default)(m.root,u),ownerState:p,ref:t},h,{children:[(0,r.jsx)(_,{className:m.message,ownerState:p,children:l}),s?(0,r.jsx)(k,{className:m.action,ownerState:p,children:s}):null]}))}));function I(e){return(0,v.Z)("MuiSnackbar",e)}(0,b.Z)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const C=["onEnter","onExited"],T=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],A=(0,l.ZP)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${(0,p.Z)(n.anchorOrigin.vertical)}${(0,p.Z)(n.anchorOrigin.horizontal)}`]]}})((({theme:e,ownerState:t})=>(0,i.Z)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,i.Z)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})})));var P=s.forwardRef((function(e,t){const n=(0,f.Z)({props:e,name:"MuiSnackbar"}),l=(0,d.Z)(),g={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{action:y,anchorOrigin:{vertical:b,horizontal:v}={vertical:"bottom",horizontal:"left"},autoHideDuration:w=null,children:x,className:E,ClickAwayListenerProps:_,ContentProps:k,disableWindowBlurListener:P=!1,message:O,onBlur:j,onClose:M,onFocus:R,onMouseEnter:B,onMouseLeave:N,open:L,resumeHideDuration:U,TransitionComponent:D=m.Z,transitionDuration:F=g,TransitionProps:{onEnter:z,onExited:$}={}}=n,q=(0,o.Z)(n.TransitionProps,C),Z=(0,o.Z)(n,T),H=(0,i.Z)({},n,{anchorOrigin:{vertical:b,horizontal:v}}),W=(e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${(0,p.Z)(n.vertical)}${(0,p.Z)(n.horizontal)}`]};return(0,c.Z)(r,I,t)})(H),G=s.useRef(),[K,V]=s.useState(!0),X=(0,h.Z)(((...e)=>{M&&M(...e)})),Y=(0,h.Z)((e=>{M&&null!=e&&(clearTimeout(G.current),G.current=setTimeout((()=>{X(null,"timeout")}),e))}));s.useEffect((()=>(L&&Y(w),()=>{clearTimeout(G.current)})),[L,w,Y]);const J=()=>{clearTimeout(G.current)},Q=s.useCallback((()=>{null!=w&&Y(null!=U?U:.5*w)}),[w,U,Y]);return s.useEffect((()=>{if(!P&&L)return window.addEventListener("focus",Q),window.addEventListener("blur",J),()=>{window.removeEventListener("focus",Q),window.removeEventListener("blur",J)}}),[P,Q,L]),s.useEffect((()=>{if(L)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||M&&M(e,"escapeKeyDown")}}),[K,L,M]),!L&&K?null:(0,r.jsx)(u.Z,(0,i.Z)({onClickAway:e=>{M&&M(e,"clickaway")}},_,{children:(0,r.jsx)(A,(0,i.Z)({className:(0,a.default)(W.root,E),onBlur:e=>{j&&j(e),Q()},onFocus:e=>{R&&R(e),J()},onMouseEnter:e=>{B&&B(e),J()},onMouseLeave:e=>{N&&N(e),Q()},ownerState:H,ref:t,role:"presentation"},Z,{children:(0,r.jsx)(D,(0,i.Z)({appear:!0,in:L,timeout:F,direction:"top"===b?"down":"up",onEnter:(e,t)=>{V(!1),z&&z(e,t)},onExited:e=>{V(!0),$&&$(e)}},q,{children:x||(0,r.jsx)(S,(0,i.Z)({message:O,action:y},k))}))}))}))})),O=n(19604),j=n(75334);var M=()=>{const{notifications:e,dispatchNotification:t}=(0,s.useContext)(j.cJ),n=e.messages[0];return(0,r.jsx)(P,{open:!!n,autoHideDuration:3e3,anchorOrigin:{vertical:"bottom",horizontal:"center"},onClose:(o=n,()=>{o&&t({type:"popMessage",payload:o.key})}),children:(0,r.jsx)(O.Z,{variant:"filled",severity:null===n||void 0===n?void 0:n.severity,children:null===n||void 0===n?void 0:n.text},null===n||void 0===n?void 0:n.key)});var o}},76909:function(e,t,n){"use strict";n.d(t,{Z:function(){return U}});var r=n(85893),o=n(40793),i=n(99879),s=n(57289),a=n(23508),c=n(326),u=n(62097),l=n(61953),d=n(85050),f=n(20784),h=n(80562),p=n(19117),m=n(31538),g=n(44373),y=n(74065),b=n(29618),v=n(47028),w=n(9144),x=n(72389),E=n(29630),_=n(5152),k=n.n(_),S=n(11163),I=n(67294),C=n(58928),T=n(90560),A=n(33084),P=n(98695),O=n(91742),j=n(92845);var M=()=>{const e=(0,u.Z)(),{mode:t,setMode:o}=(0,I.useContext)(O.N),_=(0,S.useRouter)(),[M,R]=(0,I.useState)(null),[B,N]=(0,I.useState)(null),[L,U]=(0,I.useState)(""),{balance:D}=(0,I.useContext)(P.b),F=k()((async()=>(await n.e(9920).then(n.bind(n,49920))).WalletMultiButton),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),z=Number(D||0n)/1e9,$=Boolean(M),q=e=>()=>{R(null),e&&(e.startsWith("/")?_.replace(e).then((()=>{})):e.startsWith("http")&&window.open(e,"_blank"))};return(0,r.jsx)(l.Z,{sx:{flexGrow:1},children:(0,r.jsxs)(d.Z,{position:"fixed",elevation:0,children:[(0,r.jsx)(j.Z,{}),(0,r.jsxs)(f.Z,{sx:{},children:[(0,r.jsx)(h.Z,{sx:{display:{xs:"inline-flex",lg:"none"}},"aria-controls":$?"navigation-menu":void 0,"aria-haspopup":"true","aria-expanded":$?"true":void 0,onClick:e=>{R(e.currentTarget)},children:(0,r.jsx)(c.Z,{})}),(0,r.jsx)(p.Z,{open:$,role:"navigation",anchorEl:M,id:"navigation-menu",sx:{"& .MuiMenu-paper":{width:"200px"}},onClose:q(null),onClick:q(null),children:(0,A.l)("sol").filter((e=>e.href||e.items)).map((n=>{return n.href?(0,r.jsx)(m.Z,{selected:_.asPath===n.href,onClick:q(n.href),children:n.label},n.value):(0,r.jsxs)("div",{children:[(0,r.jsx)(g.Z,{}),(0,r.jsxs)(y.Z,{expanded:L===n.value,disableGutters:!0,elevation:0,onChange:(o=n.value,(e,t)=>{e.stopPropagation(),U(t&&o)}),sx:{padding:0,border:0,borderBottom:0,backgroundColor:"transparent","&:before":{display:"none"}},children:[(0,r.jsx)(b.Z,{expandIcon:(0,r.jsx)(a.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",sx:{padding:"0 auto 0 0"},children:(0,r.jsx)(m.Z,{disableGutters:!0,component:"span",sx:{width:"100%","&:hover":{backgroundColor:"transparent"}},children:n.label},n.value)}),(0,r.jsx)(v.Z,{children:n.items.map((n=>(0,r.jsx)(T.S,{props:{...n,theme:e,mode:t},isCurrent:!1},n.label)))})]},"acc-".concat(n.value))]},n.value);var o}))}),(0,r.jsx)(w.Z,{direction:"row",sx:{flexGrow:1},children:(0,r.jsx)(l.Z,{role:"navigation",sx:{display:{xs:"none",lg:"block"}},children:(0,A.l)("sol").map((t=>(0,r.jsx)(C.j,{theme:e,label:t.label,value:t.value,href:t.href,items:t.items,menuEl:B,setMenuEl:N,current:_.asPath},t.value)))})}),(0,r.jsx)(x.Z,{title:"Toggle light/dark mode",children:(0,r.jsx)(h.Z,{sx:{ml:1},onClick:()=>{o("dark"===t?"light":"dark"),window.localStorage.setItem("theme","dark"===t?"light":"dark")},color:"inherit",children:"dark"===t?(0,r.jsx)(s.Z,{}):(0,r.jsx)(i.Z,{sx:{color:"black"}})})}),(0,r.jsxs)(E.Z,{variant:"body2",component:"span",sx:{mx:1,fontWeight:"bold"},children:[(null===z||void 0===z?void 0:z.toLocaleString())||"..."," SOL"]}),(0,r.jsx)(F,{style:{height:"36px"}})]})]})})},R=n(99034),B=n.n(R),N=n(32987),L=n(53292);var U=e=>{let{children:t,tokenAddress:n,contractAddress:i,projectId:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.ZP,{}),(0,r.jsx)(L.Z,{}),(0,r.jsx)(M,{}),(0,r.jsx)("main",{className:B().main,style:{minHeight:"90vh"},children:(0,r.jsx)("section",{style:{width:"100%"},children:t})}),(0,r.jsx)(N.Z,{projectId:s,contractAddress:i,tokenAddress:n})]})}},38179:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});const r="production"},72281:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});const r=!1},70556:function(e,t,n){"use strict";n.d(t,{RP:function(){return l},cc:function(){return u},fH:function(){return c}});var r=n(90021),o=n(37884),i=n(25120),s=n(22135),a=n(72281);function c(){return(0,r.YO)("globalEventProcessors",(()=>[]))}function u(e){c().push(e)}function l(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new o.cW(((o,c)=>{const u=e[r];if(null===t||"function"!==typeof u)o(t);else{const d=u({...t},n);a.X&&u.id&&null===d&&i.kg.log('Event processor "'.concat(u.id,'" dropped event')),(0,s.J8)(d)?d.then((t=>l(e,t,n,r+1).then(o))).then(null,c):l(e,d,n,r+1).then(o).then(null,c)}}))}},30128:function(e,t,n){"use strict";n.d(t,{$e:function(){return c},Tb:function(){return i},e:function(){return s},s3:function(){return u},v:function(){return a}});var r=n(33859),o=n(82913);function i(e,t){return(0,r.Gd)().captureException(e,(0,o.U0)(t))}function s(e){(0,r.Gd)().configureScope(e)}function a(e,t){(0,r.Gd)().setContext(e,t)}function c(e){(0,r.Gd)().withScope(e)}function u(){return(0,r.Gd)().getClient()}},33859:function(e,t,n){"use strict";n.d(t,{Gd:function(){return m},cu:function(){return h}});var r=n(78002),o=n(28754),i=n(25120),s=n(90021),a=n(38179),c=n(72281),u=n(19839),l=n(31261);const d=100;class f{isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=u.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:(0,r.DM)(),o=new Error("Sentry syntheticException");return this._withClient(((r,i)=>{r.captureException(e,{originalException:e,syntheticException:o,...t,event_id:n},i)})),n}captureMessage(e,t,n){const o=this._lastEventId=n&&n.event_id?n.event_id:(0,r.DM)(),i=new Error(e);return this._withClient(((r,s)=>{r.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:o},s)})),o}captureEvent(e,t){const n=t&&t.event_id?t.event_id:(0,r.DM)();return e.type||(this._lastEventId=n),this._withClient(((r,o)=>{r.captureEvent(e,{...t,event_id:n},o)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:a=d}=r.getOptions&&r.getOptions()||{};if(a<=0)return;const c={timestamp:(0,o.yW)(),...e},u=s?(0,i.Cf)((()=>s(c,t))):c;null!==u&&(r.emit&&r.emit("beforeAddBreadcrumb",u,t),n.addBreadcrumb(u,a))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=p(this);try{e(this)}finally{p(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return c.X&&i.kg.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(c.X&&!n){this.getClient()?i.kg.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):i.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&(0,l.RJ)(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:o=a.J}=n&&n.getOptions()||{},{userAgent:i}=s.n2.navigator||{},c=(0,l.Hv)({release:r,environment:o,user:t.getUser(),...i&&{userAgent:i},...e}),u=t.getSession&&t.getSession();return u&&"ok"===u.status&&(0,l.CT)(u,{status:"exited"}),this.endSession(),t.setSession(c),c}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const o=h().__SENTRY__;if(o&&o.extensions&&"function"===typeof o.extensions[e])return o.extensions[e].apply(this,n);c.X&&i.kg.warn("Extension method ".concat(e," couldn't be found, doing nothing."))}constructor(e,t=new u.s,n=4){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}}function h(){return s.n2.__SENTRY__=s.n2.__SENTRY__||{extensions:{},hub:void 0},s.n2}function p(e){const t=h(),n=b(t);return v(t,e),n}function m(){const e=h();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return g(e)}function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h();return y(e)&&!b(e).isOlderThan(4)||v(e,new f),b(e)}function y(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function b(e){return(0,s.YO)("hub",(()=>new f),e)}function v(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}},19839:function(e,t,n){"use strict";n.d(t,{s:function(){return c}});var r=n(22135),o=n(28754),i=n(78002),s=n(70556),a=n(31261);class c{static clone(e){const t=new c;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata},t._propagationContext={...e._propagationContext}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&(0,a.CT)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"===typeof e){const t=e(this);return t instanceof c?t:this}return e instanceof c?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):(0,r.PO)(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=u(),this}addBreadcrumb(e,t){const n="number"===typeof t?t:100;if(n<=0)return this;const r={timestamp:(0,o.yW)(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction;if(t){e.sdkProcessingMetadata={dynamicSamplingContext:t.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const n=t.name;n&&(e.tags={transaction:n,...e.tags})}}this._applyFingerprint(e);const r=this._getBreadcrumbs(),o=[...e.breadcrumbs||[],...r];return e.breadcrumbs=o.length>0?o:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},(0,s.RP)([...n||[],...(0,s.fH)(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?(0,i.lE)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=u()}}function u(){return{traceId:(0,i.DM)(),spanId:(0,i.DM)().substring(16)}}},31261:function(e,t,n){"use strict";n.d(t,{CT:function(){return a},Hv:function(){return s},RJ:function(){return c}});var r=n(28754),o=n(78002),i=n(49432);function s(e){const t=(0,r.ph)(),n={sid:(0,o.DM)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return(0,i.Jr)({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&a(n,e),n}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,r.ph)(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:(0,o.DM)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function c(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),a(e,n)}},82913:function(e,t,n){"use strict";n.d(t,{R:function(){return f},U0:function(){return p}});var r=n(78002),o=n(28754),i=n(37884),s=n(35086),a=n(90021),c=n(679),u=n(38179),l=n(70556),d=n(19839);function f(e,t,n,f,p){const{normalizeDepth:m=3,normalizeMaxBreadth:g=1e3}=e,y={...t,event_id:t.event_id||n.event_id||(0,r.DM)(),timestamp:t.timestamp||(0,o.yW)()},b=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:u.J);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==o&&(e.dist=o);e.message&&(e.message=(0,s.$G)(e.message,i));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=(0,s.$G)(a.value,i));const c=e.request;c&&c.url&&(c.url=(0,s.$G)(c.url,i))}(y,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(y,b),void 0===t.type&&function(e,t){const n=a.n2._sentryDebugIds;if(!n)return;let r;const o=h.get(t);o?r=o:(r=new Map,h.set(t,r));const i=Object.keys(n).reduce(((e,o)=>{let i;const s=r.get(o);s?i=s:(i=t(o),r.set(o,i));for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.filename){e[r.filename]=n[o];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=i[e.filename])}))}))}catch(s){}}(y,e.stackParser);let v=f;n.captureContext&&(v=d.s.clone(v).update(n.captureContext)),n.mechanism&&(0,r.EG)(y,n.mechanism);let w=(0,i.WD)(y);const x=p&&p.getEventProcessors?p.getEventProcessors():[];if(v){if(v.getAttachments){const e=[...n.attachments||[],...v.getAttachments()];e.length&&(n.attachments=e)}w=v.applyToEvent(y,n,x)}else w=(0,l.RP)([...x,...(0,l.fH)()],y,n);return w.then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(r){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"===typeof m&&m>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:(0,c.Fv)(e.data,t,n)}})))},...e.user&&{user:(0,c.Fv)(e.user,t,n)},...e.contexts&&{contexts:(0,c.Fv)(e.contexts,t,n)},...e.extra&&{extra:(0,c.Fv)(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=(0,c.Fv)(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>(e.data&&(e.data=(0,c.Fv)(e.data,t,n)),e))));return r}(e,m,g):e)))}const h=new WeakMap;function p(e){if(e)return function(e){return e instanceof d.s||"function"===typeof e}(e)||function(e){return Object.keys(e).some((e=>m.includes(e)))}(e)?{captureContext:e}:e}const m=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},72552:function(e,t,n){"use strict";var r=n(30128);function o(e){if("boolean"===typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=(0,r.s3)(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function i(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const t=e[r];"."===t?e.splice(r,1):".."===t?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const s=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function a(e){const t=e.length>1024?"<truncated>".concat(e.slice(-1024)):e,n=s.exec(t);return n?n.slice(1):[]}function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let r="",o=!1;for(let i=t.length-1;i>=-1&&!o;i--){const e=i>=0?t[i]:"/";e&&(r="".concat(e,"/").concat(r),o="/"===e.charAt(0))}return r=i(r.split("/").filter((e=>!!e)),!o).join("/"),(o?"/":"")+r||"."}function u(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}class l{static __initStatic(){this.id="RewriteFrames"}setupOnce(e,t){}processEvent(e){return this.process(e)}process(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=this._processExceptionsEvent(t)),t}__init(){this._iteratee=e=>{if(!e.filename)return e;const t=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes("\\")&&!e.filename.includes("/"),n=/^\//.test(e.filename);if(t||n){const n=t?e.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):e.filename,r=this._root?function(e,t){e=c(e).slice(1),t=c(t).slice(1);const n=u(e.split("/")),r=u(t.split("/")),o=Math.min(n.length,r.length);let i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}(this._root,n):function(e,t){let n=a(e)[2];return t&&n.slice(-1*t.length)===t&&(n=n.slice(0,n.length-t.length)),n}(n);e.filename="".concat(this._prefix).concat(r)}return e}}_processExceptionsEvent(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map((e=>({...e,...e.stacktrace&&{stacktrace:this._processStacktrace(e.stacktrace)}})))}}}catch(t){return e}}_processStacktrace(e){return{...e,frames:e&&e.frames&&e.frames.map((e=>this._iteratee(e)))}}constructor(e={}){l.prototype.__init.call(this),this.name=l.id,e.root&&(this._root=e.root),this._prefix=e.prefix||"app:///",e.iteratee&&(this._iteratee=e.iteratee)}}l.__initStatic();const d="7.83.0";var f=n(25120),h=n(78002),p=n(35086),m=n(72281);const g=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],y=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/];class b{static __initStatic(){this.id="InboundFilters"}setupOnce(e,t){}processEvent(e,t,n){const r=n.getOptions(),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:g],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:y],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(this._options,r);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(t){}return!1}(e))return m.X&&f.kg.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat((0,h.jH)(e))),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(r){}n&&n.value&&(t.push(n.value),n.type&&t.push("".concat(n.type,": ").concat(n.value)));m.X&&0===t.length&&f.kg.error("Could not extract message for event ".concat((0,h.jH)(e)));return t}(e).some((e=>(0,p.U0)(e,t)))}(e,t.ignoreErrors))return m.X&&f.kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat((0,h.jH)(e))),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&(0,p.U0)(n,t)}(e,t.ignoreTransactions))return m.X&&f.kg.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat((0,h.jH)(e))),!0;if(function(e,t){if(!t||!t.length)return!1;const n=v(e);return!!n&&(0,p.U0)(n,t)}(e,t.denyUrls))return m.X&&f.kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat((0,h.jH)(e),".\nUrl: ").concat(v(e))),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=v(e);return!n||(0,p.U0)(n,t)}(e,t.allowUrls))return m.X&&f.kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat((0,h.jH)(e),".\nUrl: ").concat(v(e))),!0;return!1}(e,o)?null:e}constructor(e={}){this.name=b.id,this._options=e}}function v(e){try{let n;try{n=e.exception.values[0].stacktrace.frames}catch(t){}return n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return m.X&&f.kg.error("Cannot extract url for event ".concat((0,h.jH)(e))),null}}b.__initStatic();var w=n(49432);let x;class E{static __initStatic(){this.id="FunctionToString"}setupOnce(){x=Function.prototype.toString;try{Function.prototype.toString=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=(0,w.HK)(this)||this;return x.apply(r,t)}}catch(e){}}constructor(){this.name=E.id}}E.__initStatic();var _=n(70556),k=n(33859);const S=[];function I(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach((e=>{e.isDefaultInstance=!0})),r=Array.isArray(n)?[...t,...n]:"function"===typeof n?(0,h.lE)(n(t)):t;const o=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(r),i=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return-1}(o,(e=>"Debug"===e.name));if(-1!==i){const[e]=o.splice(i,1);o.push(e)}return o}function C(e,t,n){if(n[t.name]=t,-1===S.indexOf(t.name)&&(t.setupOnce(_.cc,k.Gd),S.push(t.name)),t.setup&&"function"===typeof t.setup&&t.setup(e),e.on&&"function"===typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if(e.addEventProcessor&&"function"===typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}m.X&&f.kg.log("Integration installed: ".concat(t.name))}function T(e,t){!0===t.debug&&(m.X?f.kg.enable():(0,f.Cf)((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));const n=(0,k.Gd)();n.getScope().update(t.initialScope);const r=new e(t);n.bindClient(r)}var A=n(59598),P=n(47708),O=n(90021);const j=(0,O.Rf)();function M(){if(!("fetch"in j))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function R(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const B=(0,O.Rf)();const N={},L={};function U(e,t){N[e]=N[e]||[],N[e].push(t)}function D(e,t){L[e]||(t(),L[e]=!0)}function F(e,t){const n=e&&N[e];if(n)for(const o of n)try{o(t)}catch(r){P.X&&f.kg.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat((0,A.$P)(o),"\nError:"),r)}}const z=O.n2;let $;function q(e){const t="history";U(t,e),D(t,Z)}function Z(){if(!function(){const e=B.chrome,t=e&&e.app&&e.app.runtime,n="history"in B&&!!B.history.pushState&&!!B.history.replaceState;return!t&&n}())return;const e=z.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=n.length>2?n[2]:void 0;if(o){const e=$,t=String(o);$=t;F("history",{from:e,to:t})}return e.apply(this,n)}}z.onpopstate=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=z.location.href,i=$;$=o;const s={from:i,to:o};if(F("history",s),e)try{return e.apply(this,n)}catch(a){}},(0,w.hl)(z.history,"pushState",t),(0,w.hl)(z.history,"replaceState",t)}var H=n(22135),W=n(37884);const G=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function K(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return"".concat(a,"://").concat(c).concat(t&&o?":".concat(o):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r?"".concat(r,"/"):r).concat(s)}function V(e){const t=G.exec(e);if(!t)return void(0,f.Cf)((()=>{console.error("Invalid Sentry Dsn: ".concat(e))}));const[n,r,o="",i,s="",a]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return X({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function X(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Y(e){const t="string"===typeof e?V(e):X(e);if(t&&function(e){if(!P.X)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(f.kg.error("Invalid Sentry Dsn: ".concat(t," missing")),!0)))&&(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?!t||!isNaN(parseInt(t,10))||(f.kg.error("Invalid Sentry Dsn: Invalid port ".concat(t)),!1):(f.kg.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):(f.kg.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1))}(t))return t}var J=n(679);function Q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[e,t]}function ee(e,t){const[n,r]=e;return[n,[...r,t]]}function te(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function ne(e,t){return(t||new TextEncoder).encode(e)}function re(e,t){const[n,r]=e;let o=JSON.stringify(n);function i(e){"string"===typeof o?o="string"===typeof e?o+e:[ne(o,t),e]:o.push("string"===typeof e?ne(e,t):e)}for(const a of r){const[e,t]=a;if(i("\n".concat(JSON.stringify(e),"\n")),"string"===typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch(s){e=JSON.stringify((0,J.Fv)(t))}i(e)}}return"string"===typeof o?o:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(o)}function oe(e,t){const n="string"===typeof e.data?ne(e.data,t):e.data;return[(0,w.Jr)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const ie={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function se(e){return ie[e]}function ae(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ce(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:K(r)},...o&&{trace:(0,w.Jr)({...o})}}}class ue extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function le(e){const t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function de(e){return"".concat(le(e)).concat(e.projectId,"/envelope/")}function fe(e,t){return(0,w._j)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:"".concat(t.name,"/").concat(t.version)}})}var he=n(31261),pe=n(38179);function me(e,t,n){const r=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},s=(0,w.Jr)({environment:r.environment||pe.J,release:r.release,user_segment:i,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",s),s}var ge=n(82913);const ye="Not capturing exception because it's already been captured.";function be(e){return void 0===e.type}function ve(e){return"transaction"===e.type}var we=n(28754);var xe=n(43772);function Ee(e,t){const n=ke(e,t),r={type:t&&t.name,value:Ie(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function _e(e,t){return{exception:{values:[Ee(e,t)]}}}function ke(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(Se.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(o){}return[]}const Se=/Minified React error #\d+;/i;function Ie(e){const t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function Ce(e,t,n,r,o){let i;if((0,H.VW)(t)&&t.error){return _e(e,t.error)}if((0,H.TX)(t)||(0,H.fm)(t)){const o=t;if("stack"in t)i=_e(e,t);else{const t=o.name||((0,H.TX)(o)?"DOMError":"DOMException"),s=o.message?"".concat(t,": ").concat(o.message):t;i=Te(e,s,n,r),(0,h.Db)(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":"".concat(o.code)}),i}if((0,H.VZ)(t))return _e(e,t);if((0,H.PO)(t)||(0,H.cO)(t)){return i=function(e,t,n,r){const o=(0,k.Gd)().getClient(),i=o&&o.getOptions().normalizeDepth,s={exception:{values:[{type:(0,H.cO)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ae(t,{isUnhandledRejection:r})}]},extra:{__serialized__:(0,J.Qy)(t,i)}};if(n){const t=ke(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}(e,t,n,o),(0,h.EG)(i,{synthetic:!0}),i}return i=Te(e,t,n,r),(0,h.Db)(i,"".concat(t),void 0),(0,h.EG)(i,{synthetic:!0}),i}function Te(e,t,n,r){const o={message:t};if(r&&n){const r=ke(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]})}return o}function Ae(e,t){let{isUnhandledRejection:n}=t;const r=(0,w.zf)(e),o=n?"promise rejection":"exception";if((0,H.VW)(e))return"Event `ErrorEvent` captured as ".concat(o," with message `").concat(e.message,"`");if((0,H.cO)(e)){const t=function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(t){}}(e);return"Event `".concat(t,"` (type=").concat(e.type,") captured as ").concat(o)}return"Object captured as ".concat(o," with keys: ").concat(r)}const Pe=O.n2;let Oe=0;function je(){return Oe>0}function Me(){Oe++,setTimeout((()=>{Oe--}))}function Re(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if((0,w.HK)(e))return e}catch(i){return e}const o=function(){const o=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);const r=o.map((e=>Re(e,t)));return e.apply(this,r)}catch(i){throw Me(),(0,r.$e)((e=>{e.addEventProcessor((e=>(t.mechanism&&((0,h.Db)(e,void 0,void 0),(0,h.EG)(e,t.mechanism)),e.extra={...e.extra,arguments:o},e))),(0,r.Tb)(i)})),i}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}catch(s){}(0,w.$Q)(o,e),(0,w.xp)(e,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:()=>e.name})}catch(s){}return o}class Be extends class{captureException(e,t,n){if((0,h.YO)(e))return void(m.X&&f.kg.log(ye));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let o=n&&n.event_id;const i=(0,H.pt)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(i.then((e=>this._captureEvent(e,n,r))).then((e=>{o=e}))),o}captureEvent(e,t,n){if(t&&t.originalException&&(0,h.YO)(t.originalException))return void(m.X&&f.kg.log(ye));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{r=e}))),r}captureSession(e){"string"!==typeof e.release?m.X&&f.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),(0,he.CT)(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):(0,W.WD)(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&C(e,t,n)})),n}(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return m.X&&f.kg.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}addIntegration(e){C(this,e,this._integrations)}sendEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=ae(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=ce(e,o,r,t);return delete e.sdkProcessingMetadata,Q(s,[[{type:i},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])n=ee(n,oe(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const o=ae(n);return Q({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:K(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n="".concat(e,":").concat(t);m.X&&f.kg.log('Adding outcome: "'.concat(n,'"')),this._outcomes[n]=this._outcomes[n]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._hooks[e]&&this._hooks[e].forEach((e=>e(...n)))}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&((0,he.CT)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new W.cW((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n){const r=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),(0,ge.R)(r,e,t,n,this).then((e=>{if(null===e)return e;const{propagationContext:t}=e.sdkProcessingMetadata||{};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:r,spanId:o,parentSpanId:i,dsc:s}=t;e.contexts={trace:{trace_id:r,span_id:o,parent_span_id:i},...e.contexts};const a=s||me(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(m.X){const t=e;"log"===t.logLevel?f.kg.log(t.message):f.kg.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,i=ve(e),s=be(e),a=e.type||"error",c="before send for type `".concat(a,"`");if(s&&"number"===typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),(0,W.$2)(new ue("Discarding event because it's not included in the random sample (sampling rate = ".concat(o,")"),"log"));const u="replay_event"===a?"replay":a;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new ue("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n){const{beforeSend:r,beforeSendTransaction:o}=e;if(be(t)&&r)return r(t,n);if(ve(t)&&o)return o(t,n);return t}(r,n,t);return function(e,t){const n="".concat(t," must return `null` or a valid event.");if((0,H.J8)(e))return e.then((e=>{if(!(0,H.PO)(e)&&null!==e)throw new ue(n);return e}),(e=>{throw new ue("".concat(t," rejected with ").concat(e))}));if(!(0,H.PO)(e)&&null!==e)throw new ue(n);return e}(o,c)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",u,e),new ue("".concat(c," returned `null`, will not send event."),"log");const o=n&&n.getSession();!i&&o&&this._updateSessionFromEvent(o,r);const s=r.transaction_info;if(i&&s&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...s,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof ue)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ue("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(e))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,(e=>{m.X&&f.kg.error("Error while sending event:",e)}));m.X&&f.kg.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Y(e.dsn):m.X&&f.kg.warn("No DSN provided, client will not send events."),this._dsn){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n="string"===typeof t?t:t.tunnel,r="string"!==typeof t&&t._metadata?t._metadata.sdk:void 0;return n||"".concat(de(e),"?").concat(fe(e,r))}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}}{eventFromException(e,t){return function(e,t,n,r){const o=Ce(e,t,n&&n.syntheticException||void 0,r);return(0,h.EG)(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),(0,W.WD)(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const i=r&&r.syntheticException||void 0,s=Te(e,t,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),(0,W.WD)(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return;const t=function(e,t){let{metadata:n,tunnel:r,dsn:o}=t;const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!r&&!!o&&{dsn:K(o)}},s=function(e){return[{type:"user_report"},e]}(e);return Q(i,[s])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return;if(!this._dsn)return;const t=(n=e,Q((r=this._options.tunnel&&K(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||(0,we.yW)(),discarded_events:n}]]));var n,r,o;this._sendEnvelope(t)}constructor(e){const t=Pe.SENTRY_SDK_SOURCE||(0,xe.S)();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"".concat(t,":@sentry/browser"),version:d}],version:d},super(e),e.sendClientReports&&Pe.document&&Pe.document.addEventListener("visibilitychange",(()=>{"hidden"===Pe.document.visibilityState&&this._flushOutcomes()}))}}let Ne=null;function Le(e){const t="error";U(t,e),D(t,Ue)}function Ue(){Ne=O.n2.onerror,O.n2.onerror=function(e,t,n,r,o){const i={column:r,error:o,line:n,msg:e,url:t};return F("error",i),!(!Ne||Ne.__SENTRY_LOADER__)&&Ne.apply(this,arguments)},O.n2.onerror.__SENTRY_INSTRUMENTED__=!0}let De=null;function Fe(e){const t="unhandledrejection";U(t,e),D(t,ze)}function ze(){De=O.n2.onunhandledrejection,O.n2.onunhandledrejection=function(e){const t=e;return F("unhandledrejection",t),!(De&&!De.__SENTRY_LOADER__)||De.apply(this,arguments)},O.n2.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var $e=n(56212);class qe{static __initStatic(){this.id="GlobalHandlers"}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const t in e){const n=this._installFunc[t];n&&e[t]&&(t,n(),this._installFunc[t]=void 0)}}constructor(e){this.name=qe.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:Ze,onunhandledrejection:He}}}function Ze(){Le((e=>{const[t,n,r]=Ge();if(!t.getIntegration(qe))return;const{msg:o,url:i,line:s,column:a,error:c}=e;if(je())return;const u=void 0===c&&(0,H.HD)(o)?function(e,t,n,r){const o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=(0,H.VW)(e)?e.message:e,s="Error";const a=i.match(o);a&&(s=a[1],i=a[2]);return We({exception:{values:[{type:s,value:i}]}},t,n,r)}(o,i,s,a):We(Ce(n,c||o,void 0,r,!1),i,s,a);u.level="error",t.captureEvent(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}function He(){Fe((e=>{const[t,n,r]=Ge();if(!t.getIntegration(qe))return;if(je())return!0;const o=function(e){if((0,H.pt)(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(n){}return e}(e),i=(0,H.pt)(o)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(o))}]}}:Ce(n,o,void 0,r,!0);i.level="error",t.captureEvent(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function We(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=(0,H.HD)(t)&&t.length>0?t:(0,$e.l4)();return 0===c.length&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function Ge(){const e=(0,k.Gd)(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}qe.__initStatic();const Ke=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Ve{static __initStatic(){this.id="TryCatch"}setupOnce(){this._options.setTimeout&&(0,w.hl)(Pe,"setTimeout",Xe),this._options.setInterval&&(0,w.hl)(Pe,"setInterval",Xe),this._options.requestAnimationFrame&&(0,w.hl)(Pe,"requestAnimationFrame",Ye),this._options.XMLHttpRequest&&"XMLHttpRequest"in Pe&&(0,w.hl)(XMLHttpRequest.prototype,"send",Je);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:Ke).forEach(Qe)}}constructor(e){this.name=Ve.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}}function Xe(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=n[0];return n[0]=Re(o,{mechanism:{data:{function:(0,A.$P)(e)},handled:!1,type:"instrument"}}),e.apply(this,n)}}function Ye(e){return function(t){return e.apply(this,[Re(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,A.$P)(e)},handled:!1,type:"instrument"}})])}}function Je(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=this,i=["onload","onerror","onprogress","onreadystatechange"];return i.forEach((e=>{e in o&&"function"===typeof o[e]&&(0,w.hl)(o,e,(function(t){const n={mechanism:{data:{function:e,handler:(0,A.$P)(t)},handled:!1,type:"instrument"}},r=(0,w.HK)(t);return r&&(n.mechanism.data.handler=(0,A.$P)(r)),Re(t,n)}))})),e.apply(this,n)}}function Qe(e){const t=Pe,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,w.hl)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"===typeof r.handleEvent&&(r.handleEvent=Re(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,A.$P)(r),target:e},handled:!1,type:"instrument"}}))}catch(i){}return t.apply(this,[n,Re(r,{mechanism:{data:{function:"addEventListener",handler:(0,A.$P)(r),target:e},handled:!1,type:"instrument"}}),o])}})),(0,w.hl)(n,"removeEventListener",(function(e){return function(t,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(i){}return e.call(this,t,o,r)}})))}function et(){"console"in O.n2&&f.RU.forEach((function(e){e in O.n2.console&&(0,w.hl)(O.n2.console,e,(function(t){return f.LD[e]=t,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o={args:n,level:e};F("console",o);const i=f.LD[e];i&&i.apply(O.n2.console,n)}}))}))}Ve.__initStatic();const tt=O.n2;let nt,rt,ot;function it(e){U("dom",e),D("dom",st)}function st(){if(!tt.document)return;const e=F.bind(null,"dom"),t=ut(e,!0);tt.document.addEventListener("click",t,!1),tt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=tt[t]&&tt[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,w.hl)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=i[n]=i[n]||{refCount:0};if(!s.handler){const r=ut(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch(i){}return t.call(this,n,r,o)}})),(0,w.hl)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(o){}return e.call(this,t,n,r)}})))}))}function at(e){if(e.type!==rt)return!1;try{if(!e.target||e.target._sentryId!==ot)return!1}catch(t){}return!0}function ct(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}function ut(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{if(!n||n._sentryCaptured)return;const r=lt(n);if(ct(n.type,r))return;(0,w.xp)(n,"_sentryCaptured",!0),r&&!r._sentryId&&(0,w.xp)(r,"_sentryId",(0,h.DM)());const o="keypress"===n.type?"input":n.type;if(!at(n)){e({event:n,name:o,global:t}),rt=n.type,ot=r?r._sentryId:void 0}clearTimeout(nt),nt=tt.setTimeout((()=>{ot=void 0,rt=void 0}),1e3)}}function lt(e){try{return e.target}catch(t){return null}}const dt=O.n2;function ft(e){U("xhr",e),D("xhr",ht)}function ht(){if(!dt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;(0,w.hl)(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=Date.now(),i=(0,H.HD)(n[0])?n[0].toUpperCase():void 0,s=pt(n[1]);if(!i||!s)return;this.__sentry_xhr_v3__={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const e=this.__sentry_xhr_v3__;if(e&&4===this.readyState){try{e.status_code=this.status}catch(t){}F("xhr",{args:[i,s],endTimestamp:Date.now(),startTimestamp:o,xhr:this})}};return"onreadystatechange"in this&&"function"===typeof this.onreadystatechange?(0,w.hl)(this,"onreadystatechange",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return a(),e.apply(this,n)}})):this.addEventListener("readystatechange",a),(0,w.hl)(this,"setRequestHeader",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const[o,i]=n,s=this.__sentry_xhr_v3__;return s&&(0,H.HD)(o)&&(0,H.HD)(i)&&(s.request_headers[o.toLowerCase()]=i),e.apply(this,n)}})),e.apply(this,n)}})),(0,w.hl)(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=this.__sentry_xhr_v3__;if(!o)return;void 0!==n[0]&&(o.body=n[0]);const i={args:[o.method,o.url],startTimestamp:Date.now(),xhr:this};return F("xhr",i),e.apply(this,n)}}))}function pt(e){if((0,H.HD)(e))return e;try{return e.toString()}catch(t){}}function mt(e){const t="fetch";U(t,e),D(t,gt)}function gt(){(function(){if("string"===typeof EdgeRuntime)return!0;if(!M())return!1;if(R(j.fetch))return!0;let e=!1;const t=j.document;if(t&&"function"===typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=R(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){P.X&&f.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e})()&&(0,w.hl)(O.n2,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const{method:o,url:i}=vt(n),s={args:n,fetchData:{method:o,url:i},startTimestamp:Date.now()};return F("fetch",{...s}),e.apply(O.n2,n).then((e=>(F("fetch",{...s,endTimestamp:Date.now(),response:e}),e)),(e=>{throw F("fetch",{...s,endTimestamp:Date.now(),error:e}),e}))}}))}function yt(e,t){return!!e&&"object"===typeof e&&!!e[t]}function bt(e){return"string"===typeof e?e:e?yt(e,"url")?e.url:e.toString?e.toString():"":""}function vt(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:bt(t),method:yt(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:bt(t),method:yt(t,"method")?String(t.method).toUpperCase():"GET"}}const wt=["fatal","error","warning","log","info","debug"];function xt(e){return"warn"===e?"warning":wt.includes(e)?e:"log"}function Et(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function _t(e){return e.split(/[\?#]/,1)[0]}const kt=1024;class St{static __initStatic(){this.id="Breadcrumbs"}setupOnce(){if(this.options.console&&function(e){const t="console";U(t,e),D(t,et)}(Ct),this.options.dom&&it(function(e){function t(t){let n,r="object"===typeof e?e.serializeAttribute:void 0,o="object"===typeof e&&"number"===typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>kt&&(o=kt),"string"===typeof r&&(r=[r]);try{const e=t.event;n=function(e){return!!e&&!!e.target}(e)?(0,$e.Rt)(e.target,{keyAttrs:r,maxStringLength:o}):(0,$e.Rt)(e,{keyAttrs:r,maxStringLength:o})}catch(i){n="<unknown>"}0!==n.length&&(0,k.Gd)().addBreadcrumb({category:"ui.".concat(t.name),message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&ft(Tt),this.options.fetch&&mt(At),this.options.history&&q(Pt),this.options.sentry){const e=(0,r.s3)();e&&e.on&&e.on("beforeSendEvent",It)}}constructor(e){this.name=St.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}}function It(e){(0,k.Gd)().addBreadcrumb({category:"sentry.".concat("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:(0,h.jH)(e)},{event:e})}function Ct(e){const t={category:"console",data:{arguments:e.args,logger:"console"},level:xt(e.level),message:(0,p.nK)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: ".concat((0,p.nK)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}(0,k.Gd)().addBreadcrumb(t,{input:e.args,level:e.level})}function Tt(e){const{startTimestamp:t,endTimestamp:n}=e,r=e.xhr.__sentry_xhr_v3__;if(!t||!n||!r)return;const{method:o,url:i,status_code:s,body:a}=r,c={method:o,url:i,status_code:s},u={xhr:e.xhr,input:a,startTimestamp:t,endTimestamp:n};(0,k.Gd)().addBreadcrumb({category:"xhr",data:c,type:"http"},u)}function At(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const r=e.fetchData,o={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};(0,k.Gd)().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},o)}else{const r=e.response,o={...e.fetchData,status_code:r&&r.status},i={input:e.args,response:r,startTimestamp:t,endTimestamp:n};(0,k.Gd)().addBreadcrumb({category:"fetch",data:o,type:"http"},i)}}function Pt(e){let t=e.from,n=e.to;const r=Et(Pe.location.href);let o=t?Et(t):void 0;const i=Et(n);o&&o.path||(o=r),r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===o.protocol&&r.host===o.host&&(t=o.relative),(0,k.Gd)().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}function Ot(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if((0,H.V9)(r[o],Error)){jt(s,a);const i=e(t,r[o]),u=c.length;Mt(i,o,u,a),c=Ot(e,t,n,r[o],o,[i,...c],i,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if((0,H.V9)(r,Error)){jt(s,a);const u=e(t,r),l=c.length;Mt(u,"errors[".concat(i,"]"),l,a),c=Ot(e,t,n,r,o,[u,...c],u,l)}})),c}function jt(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function Mt(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Rt(e,t){return e.map((e=>(e.value&&(e.value=(0,p.$G)(e.value,t)),e)))}St.__initStatic();class Bt{static __initStatic(){this.id="LinkedErrors"}setupOnce(){}preprocessEvent(e,t,n){const r=n.getOptions();!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;if(!i.exception||!i.exception.values||!s||!(0,H.V9)(s.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Rt(Ot(e,t,o,s.originalException,r,i.exception.values,a,0),n))}(Ee,r.stackParser,r.maxValueLength,this._key,this._limit,e,t)}constructor(e={}){this.name=Bt.id,this._key=e.key||"cause",this._limit=e.limit||5}}Bt.__initStatic();class Nt{static __initStatic(){this.id="HttpContext"}setupOnce(){}preprocessEvent(e){if(!Pe.navigator&&!Pe.location&&!Pe.document)return;const t=e.request&&e.request.url||Pe.location&&Pe.location.href,{referrer:n}=Pe.document||{},{userAgent:r}=Pe.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}constructor(){this.name=Nt.id}}Nt.__initStatic();class Lt{static __initStatic(){this.id="Dedupe"}setupOnce(e,t){}processEvent(e){if(e.type)return e;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Dt(e,t))return!1;if(!Ut(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Ft(t),r=Ft(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Dt(e,t))return!1;if(!Ut(e,t))return!1;return!0}(e,t))return!0;return!1}(e,this._previousEvent))return null}catch(t){}return this._previousEvent=e}constructor(){this.name=Lt.id}}function Ut(e,t){let n=zt(e),r=zt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const e=r[o],t=n[o];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function Dt(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function Ft(e){return e.exception&&e.exception.values&&e.exception.values[0]}function zt(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}Lt.__initStatic();const $t="?";function qt(e,t,n,r){const o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Zt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ht=/\((\S*)(?::(\d+))(?::(\d+))\)/,Wt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Kt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Vt=[[30,e=>{const t=Zt.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=Ht.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=Yt(t[1]||$t,t[2]);return qt(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=Wt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Gt.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||$t;return[n,e]=Yt(n,e),qt(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=Kt.exec(e);return t?qt(t[2],t[1]||$t,+t[3],t[4]?+t[4]:void 0):void 0}]],Xt=(0,A.pE)(...Vt),Yt=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:$t,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]};function Jt(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return(0,W.$2)(new ue("Not adding Promise because buffer limit was reached."));const o=r();return-1===t.indexOf(o)&&t.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new W.cW(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{(0,W.WD)(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}function Qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();const n=parseInt("".concat(e),10);if(!isNaN(n))return 1e3*n;const r=Date.parse("".concat(e));return isNaN(r)?6e4:r-t}function en(e,t){return e[t]||e.all||0}function tn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return en(e,t)>n}function nn(e,t){let{statusCode:n,headers:r}=t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();const i={...e},s=r&&r["x-sentry-rate-limits"],a=r&&r["retry-after"];if(s)for(const c of s.trim().split(",")){const[e,t]=c.split(":",2),n=parseInt(e,10),r=1e3*(isNaN(n)?60:n);if(t)for(const s of t.split(";"))i[s]=o+r;else i.all=o+r}else a?i.all=o+Qt(a,o):429===n&&(i.all=o+6e4);return i}function rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Jt(e.bufferSize||30),r={};const o=e=>n.drain(e);function i(o){const i=[];if(te(o,((t,n)=>{const o=se(n);if(tn(r,o)){const r=on(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(t)})),0===i.length)return(0,W.WD)();const s=Q(o[0],i),a=t=>{te(s,((n,r)=>{const o=on(n,r);e.recordDroppedEvent(t,se(r),o)}))};return n.add((()=>t({body:re(s,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&m.X&&f.kg.warn("Sentry responded with status code ".concat(e.statusCode," to sent event.")),r=nn(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof ue)return m.X&&f.kg.error("Skipped sending event because buffer is full."),a("queue_overflow"),(0,W.WD)();throw e}))}return i.__sentry__baseTransport__=!0,{send:i,flush:o}}function on(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}let sn;function an(){if(sn)return sn;if(R(Pe.fetch))return sn=Pe.fetch.bind(Pe);const e=Pe.document;let t=Pe.fetch;if(e&&"function"===typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){}return sn=t.bind(Pe)}function cn(){sn=void 0}function un(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:an(),n=0,r=0;function o(o){const i=o.body.length;n+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,s).then((e=>(n-=i,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(a){return cn(),n-=i,r--,(0,W.$2)(a)}}return rn(e,o)}function ln(e){return rn(e,(function(t){return new W.cW(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&o.setRequestHeader(t,e.headers[t]);o.send(t.body)}))}))}const dn=[new b,new E,new Ve,new St,new qe,new Bt,new Lt,new Nt];function fn(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function hn(){if("undefined"===typeof Pe.document)return;const e=(0,k.Gd)();e.captureSession&&(fn(e),q((e=>{let{from:t,to:n}=e;void 0!==t&&t!==n&&fn((0,k.Gd)())})))}function pn(e){const t={_metadata:{},...e};t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:d}],version:d},function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0===e.defaultIntegrations&&(e.defaultIntegrations=dn),void 0===e.release&&("string"===typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),Pe.SENTRY_RELEASE&&Pe.SENTRY_RELEASE.id&&(e.release=Pe.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(0,A.Sq)(e.stackParser||Xt),integrations:I(e),transport:e.transport||(M()?un:ln)};T(Be,t),e.autoSessionTracking&&hn()}(t)}const mn="baggage",gn="sentry-",yn=/^sentry-/;function bn(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,t,n)=>{let[r,o]=t;const i="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o)),s=0===n?i:"".concat(e,",").concat(i);return s.length>8192?(P.X&&f.kg.warn("Not adding key: ".concat(r," with val: ").concat(o," to baggage header due to exceeding baggage size limits.")),e):s}),"")}(Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return r&&(e["".concat(gn).concat(n)]=r),e}),{}))}function vn(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})}const wn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function xn(e,t){const n=function(e){if(!e)return;const t=e.match(wn);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=function(e){if(!(0,H.HD)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>({...e,...vn(t)})),{});else{if(!e)return;t=vn(e)}const n=Object.entries(t).reduce(((e,t)=>{let[n,r]=t;return n.match(yn)&&(e[n.slice(gn.length)]=r),e}),{});return Object.keys(n).length>0?n:void 0}(t),{traceId:o,parentSpanId:i,parentSampled:s}=n||{},a={traceId:o||(0,h.DM)(),spanId:(0,h.DM)().substring(16),sampled:s};return i&&(a.parentSpanId=i),r&&(a.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:a}}function En(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,h.DM)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,h.DM)().substring(16),n=arguments.length>2?arguments[2]:void 0,r="";return void 0!==n&&(r=n?"-1":"-0"),"".concat(e,"-").concat(t).concat(r)}class _n{add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}constructor(e=1e3){this._maxlen=e,this.spans=[]}}class kn{get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){const t=new kn({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,m.X&&t.transaction){const n=e&&e.op||"< unknown op >",r=t.transaction.name||"< unknown name >",o=t.transaction.spanId,i="[Tracing] Starting '".concat(n,"' span on transaction '").concat(r,"' (").concat(o,").");t.transaction.metadata.spanMetadata[t.spanId]={logMessage:i},f.kg.log(i)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);const t=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);return"unknown_error"!==t&&this.setStatus(t),this}setName(e){this.description=e}isSuccess(){return"ok"===this.status}finish(e){if(m.X&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&f.kg.log(e.replace("Starting","Finishing"))}this.endTimestamp="number"===typeof e?e:(0,we.ph)()}toTraceparent(){return En(this.traceId,this.spanId,this.sampled)}toContext(){return(0,w.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return(0,w.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId,origin:this.origin})}toJSON(){return(0,w.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}constructor(e={}){this.traceId=e.traceId||(0,h.DM)(),this.spanId=e.spanId||(0,h.DM)().substring(16),this.startTimestamp=e.startTimestamp||(0,we.ph)(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}}class Sn extends kn{get name(){return this._name}set name(e){this.setName(e)}setName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom";this._name=e,this.metadata.source=t}initSpanRecorder(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;this.spanRecorder||(this.spanRecorder=new _n(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){const t=this._finishTransaction(e);if(t)return this._hub.captureEvent(t)}toContext(){const e=super.toContext();return(0,w.Jr)({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||(0,k.Gd)(),t=e.getClient();if(!t)return{};const n=e.getScope(),r=me(this.traceId,t,n),o=this.metadata.sampleRate;void 0!==o&&(r.sample_rate="".concat(o));const i=this.metadata.source;return i&&"url"!==i&&(r.transaction=this.name),void 0!==this.sampled&&(r.sampled=String(this.sampled)),r}setHub(e){this._hub=e}_finishTransaction(e){if(void 0!==this.endTimestamp)return;this.name||(m.X&&f.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this.sampled)return m.X&&f.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((e=>e!==this&&e.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e)).endTimestamp);const r=this.metadata,o={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(m.X&&f.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),o.measurements=this._measurements),m.X&&f.kg.log("[Tracing] Finishing ".concat(this.op," transaction: ").concat(this.name,".")),o}constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||(0,k.Gd)(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}}const In={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Cn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Tn extends _n{add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"===typeof t?t:(0,we.ph)(),this._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e)}constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}}class An extends Sn{finish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,we.ph)();if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){m.X&&f.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),m.X&&f.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const n=t.startTimestamp<e,r=(this._finalTimeout+this._idleTimeout)/1e3,o=t.endTimestamp-this.startTimestamp<r;if(m.X){const e=JSON.stringify(t,void 0,2);n?o||f.kg.log("[Tracing] discarding Span since it finished after Transaction final timeout",e):f.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",e)}return n&&o})),m.X&&f.kg.log("[Tracing] flushing IdleTransaction")}else m.X&&f.kg.log("[Tracing] No active IdleTransaction");if(this._onScope){const e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new Tn(t,n,this.spanId,e),m.X&&f.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e){let{restartOnChildSpanChange:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{restartOnChildSpanChange:!0};this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Cn[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Cn[1],this.finish(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),m.X&&f.kg.log("[Tracing] pushActivity: ".concat(e)),this.activities[e]=!0,m.X&&f.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(m.X&&f.kg.log("[Tracing] popActivity ".concat(e)),delete this.activities[e],m.X&&f.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=(0,we.ph)();this._idleTimeoutCanceledPermanently?(this._finishReason=Cn[5],this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(m.X&&f.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Cn[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){m.X&&f.kg.log("pinging Heartbeat -> current counter: ".concat(this._heartbeatCounter)),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}constructor(e,t,n=In.idleTimeout,r=In.finalTimeout,o=In.heartbeatInterval,i=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=o,this._onScope=i,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Cn[4],i&&(m.X&&f.kg.log("Setting idle transaction on scope. Span ID: ".concat(this.spanId)),t.configureScope((e=>e.setSpan(this)))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Cn[3],this.finish())}),this._finalTimeout)}}function Pn(e){return(e||(0,k.Gd)()).getScope().getTransaction()}let On=!1;function jn(){const e=Pn();if(e){const t="internal_error";m.X&&f.kg.log("[Tracing] Transaction: ".concat(t," -> Global error occured")),e.setStatus(t)}}function Mn(e,t,n){if(!o(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return"function"===typeof t.tracesSampler?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:"undefined"!==typeof t.tracesSampleRate?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),function(e){if((0,H.i2)(e)||"number"!==typeof e&&"boolean"!==typeof e)return m.X&&f.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(e)," of type ").concat(JSON.stringify(typeof e),".")),!1;if(e<0||e>1)return m.X&&f.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ".concat(e,".")),!1;return!0}(r)?r?(e.sampled=Math.random()<r,e.sampled?(m.X&&f.kg.log("[Tracing] starting ".concat(e.op," transaction - ").concat(e.name)),e):(m.X&&f.kg.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ".concat(Number(r),")")),e)):(m.X&&f.kg.log("[Tracing] Discarding transaction because ".concat("function"===typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),e.sampled=!1,e):(m.X&&f.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Rn(){const e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Bn(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},o=r.instrumenter||"sentry",i=e.instrumenter||"sentry";o!==i&&(m.X&&f.kg.error("A transaction was started with instrumenter=`".concat(i,"`, but the SDK is configured with the `").concat(o,"` instrumenter.\nThe transaction will not be sampled. Please use the ").concat(o," instrumentation to start transactions.")),e.sampled=!1);let s=new Sn(e,this);return s=Mn(s,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),s.sampled&&s.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",s),s}function Nn(e,t,n,r,o,i,s){const a=e.getClient(),c=a&&a.getOptions()||{};let u=new An(t,e,n,r,s,o);return u=Mn(u,c,{parentSampled:t.parentSampled,transactionContext:t,...i}),u.sampled&&u.initSpanRecorder(c._experiments&&c._experiments.maxSpans),a&&a.emit&&a.emit("startTransaction",u),u}function Ln(){const e=(0,k.cu)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Bn),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Rn),On||(On=!0,Le(jn),Fe(jn)))}jn.tag="sentry_tracingErrorCallback";const Un=O.n2;const Dn=(e,t,n)=>{let r,o;return i=>{t.value>=0&&(i||n)&&(o=t.value-(r||0),(o||void 0===r)&&(r=t.value,t.delta=o,e(t)))}},Fn=()=>Un.__WEB_VITALS_POLYFILL__?Un.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=Un.performance.timing,t=Un.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const r in e)"navigationStart"!==r&&"toJSON"!==r&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n})()):Un.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],zn=()=>{const e=Fn();return e&&e.activationStart||0},$n=(e,t)=>{const n=Fn();let r="navigate";return n&&(r=Un.document.prerendering||zn()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:"undefined"===typeof t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},qn=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{t(e.getEntries())}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(r){}},Zn=(e,t)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Un.document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Hn=-1;const Wn=()=>(Hn<0&&(Hn="hidden"!==Un.document.visibilityState||Un.document.prerendering?1/0:0,Zn((e=>{let{timeStamp:t}=e;Hn=t}),!0)),{get firstHiddenTime(){return Hn}}),Gn={},Kn={},Vn={};let Xn,Yn,Jn;function Qn(e){return ir("lcp",e,or,Jn)}function er(e,t){return sr(e,t),Vn[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);qn(e,(t=>{tr(e,{entries:t})}),t)}(e),Vn[e]=!0),ar(e,t)}function tr(e,t){const n=Kn[e];if(n&&n.length)for(const o of n)try{o(t)}catch(r){}}function nr(){(e=>{const t=$n("CLS",0);let n,r=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const i=o[0],s=o[o.length-1];r&&0!==o.length&&e.startTime-s.startTime<1e3&&e.startTime-i.startTime<5e3?(r+=e.value,o.push(e)):(r=e.value,o=[e]),r>t.value&&(t.value=r,t.entries=o,n&&n())}}))},s=qn("layout-shift",i);if(s){n=Dn(e,t);const r=()=>{i(s.takeRecords()),n(!0)};Zn(r)}})((e=>{tr("cls",{metric:e}),Xn=e}))}function rr(){(e=>{const t=Wn(),n=$n("FID");let r;const o=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),r(!0))},i=e=>{e.forEach(o)},s=qn("first-input",i);r=Dn(e,n),s&&Zn((()=>{i(s.takeRecords()),s.disconnect()}),!0)})((e=>{tr("fid",{metric:e}),Yn=e}))}function or(){(e=>{const t=Wn(),n=$n("LCP");let r;const o=e=>{const o=e[e.length-1];if(o){const e=Math.max(o.startTime-zn(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[o],r())}},i=qn("largest-contentful-paint",o);if(i){r=Dn(e,n);const t=()=>{Gn[n.id]||(o(i.takeRecords()),i.disconnect(),Gn[n.id]=!0,r(!0))};["keydown","click"].forEach((e=>{addEventListener(e,t,{once:!0,capture:!0})})),Zn(t,!0)}})((e=>{tr("lcp",{metric:e}),Jn=e}))}function ir(e,t,n,r){return sr(e,t),Vn[e]||(n(),Vn[e]=!0),r&&t({metric:r}),ar(e,t)}function sr(e,t){Kn[e]=Kn[e]||[],Kn[e].push(t)}function ar(e,t){return()=>{const n=Kn[e];if(!n)return;const r=n.indexOf(t);-1!==r&&n.splice(r,1)}}function cr(e){return"number"===typeof e&&isFinite(e)}function ur(e,t){let{startTimestamp:n,...r}=t;return n&&e.startTimestamp>n&&(e.startTimestamp=n),e.startChild({startTimestamp:n,...r})}function lr(e){return e/1e3}function dr(){return Un&&Un.addEventListener&&Un.performance}let fr,hr,pr=0,mr={};function gr(){const e=dr();if(e&&we.Z1){e.mark&&Un.performance.mark("sentry-tracing-init");const t=function(){return e=e=>{let{metric:t}=e;const n=t.entries.pop();if(!n)return;const r=lr(we.Z1),o=lr(n.startTime);mr.fid={value:t.value,unit:"millisecond"},mr["mark.fid"]={value:r+o,unit:"second"}},ir("fid",e,rr,Yn);var e}(),n=function(){return e=e=>{let{metric:t}=e;const n=t.entries.pop();n&&(mr.cls={value:t.value,unit:""},hr=n)},ir("cls",e,nr,Xn);var e}(),r=Qn((e=>{let{metric:t}=e;const n=t.entries.pop();n&&(mr.lcp={value:t.value,unit:"millisecond"},fr=n)}));return()=>{t(),n(),r()}}return()=>{}}function yr(e){const t=dr();if(!t||!Un.performance.getEntries||!we.Z1)return;const n=lr(we.Z1),r=t.getEntries();let o,i;if(r.slice(pr).forEach((t=>{const r=lr(t.startTime),s=lr(t.duration);if(!("navigation"===e.op&&n+r<e.startTimestamp))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((r=>{br(e,t,r,n)})),br(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),br(e,t,"fetch",n,"cache","domainLookupStart"),br(e,t,"domainLookup",n,"DNS"),function(e,t,n){ur(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+lr(t.requestStart),endTimestamp:n+lr(t.responseEnd)}),ur(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+lr(t.responseStart),endTimestamp:n+lr(t.responseEnd)})}(e,t,n)}(e,t,n),o=n+lr(t.responseStart),i=n+lr(t.requestStart);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o){const i=o+n,s=i+r;ur(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i})}(e,t,r,s,n);const o=Wn(),i=t.startTime<o.firstHiddenTime;"first-paint"===t.name&&i&&(mr.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&i&&(mr.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":{const o=t.name.replace(Un.location.origin,"");!function(e,t,n,r,o,i){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const s={};vr(s,t,"transferSize","http.response_transfer_size"),vr(s,t,"encodedBodySize","http.response_content_length"),vr(s,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(s["resource.render_blocking_status"]=t.renderBlockingStatus);const a=i+r;ur(e,{description:n,endTimestamp:a+o,op:t.initiatorType?"resource.".concat(t.initiatorType):"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:a,data:s})}(e,t,o,r,s,n);break}}})),pr=Math.max(r.length-1,0),function(e){const t=Un.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),cr(n.rtt)&&(mr["connection.rtt"]={value:n.rtt,unit:"millisecond"}));cr(t.deviceMemory)&&e.setTag("deviceMemory","".concat(t.deviceMemory," GB"));cr(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===e.op){"number"===typeof o&&(mr.ttfb={value:1e3*(o-e.startTimestamp),unit:"millisecond"},"number"===typeof i&&i<=o&&(mr["ttfb.requestTime"]={value:1e3*(o-i),unit:"millisecond"})),["fcp","fp","lcp"].forEach((t=>{if(!mr[t]||n>=e.startTimestamp)return;const r=mr[t].value,o=n+lr(r),i=Math.abs(1e3*(o-e.startTimestamp));mr[t].value=i}));const t=mr["mark.fid"];t&&mr.fid&&(ur(e,{description:"first input delay",endTimestamp:t.value+lr(mr.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete mr["mark.fid"]),"fcp"in mr||delete mr.cls,Object.keys(mr).forEach((t=>{e.setMeasurement(t,mr[t].value,mr[t].unit)})),function(e){fr&&(fr.element&&e.setTag("lcp.element",(0,$e.Rt)(fr.element)),fr.id&&e.setTag("lcp.id",fr.id),fr.url&&e.setTag("lcp.url",fr.url.trim().slice(0,200)),e.setTag("lcp.size",fr.size));hr&&hr.sources&&hr.sources.forEach(((t,n)=>e.setTag("cls.source.".concat(n+1),(0,$e.Rt)(t.node))))}(e)}fr=void 0,hr=void 0,mr={}}function br(e,t,n,r,o,i){const s=i?t[i]:t["".concat(n,"End")],a=t["".concat(n,"Start")];a&&s&&ur(e,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:r+lr(a),endTimestamp:r+lr(s)})}function vr(e,t,n,r){const o=t[n];void 0!==o&&o<2147483647&&(e[r]=o)}function wr(e,t,n,r,o){const i=o||n.getSpan(),s=i&&i.transaction,{traceId:a,sampled:c,dsc:u}=n.getPropagationContext(),l=i?i.toTraceparent():En(a,void 0,c),d=bn(s?s.getDynamicSamplingContext():u||me(a,t,n)),f="undefined"!==typeof Request&&(0,H.V9)(e,Request)?e.headers:r.headers;if(f){if("undefined"!==typeof Headers&&(0,H.V9)(f,Headers)){const e=new Headers(f);return e.append("sentry-trace",l),d&&e.append(mn,d),e}if(Array.isArray(f)){const e=[...f,["sentry-trace",l]];return d&&e.push([mn,d]),e}{const e="baggage"in f?f.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),d&&t.push(d),{...f,"sentry-trace":l,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":l,baggage:d}}const xr=["localhost",/^\/(?!\/)/],Er={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:xr,tracePropagationTargets:xr};function _r(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:a}={traceFetch:Er.traceFetch,traceXHR:Er.traceXHR,...e},c="function"===typeof s?s:e=>!0,u=e=>function(e,t){return(0,p.U0)(e,t||xr)}(e,r||i),l={};t&&mt((e=>{const t=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"auto.http.browser";if(!o()||!e.fetchData)return;const s=t(e.fetchData.url);if(e.endTimestamp&&s){const t=e.fetchData.__span;if(!t)return;const n=r[t];if(n){if(e.response){n.setHttpStatus(e.response.status);const t=e.response&&e.response.headers&&e.response.headers.get("content-length");if(t){const e=parseInt(t);e>0&&n.setData("http.response_content_length",e)}}else e.error&&n.setStatus("internal_error");n.finish(),delete r[t]}return}const a=(0,k.Gd)(),c=a.getScope(),u=a.getClient(),l=c.getSpan(),{method:d,url:f}=e.fetchData,h=s&&l?l.startChild({data:{url:f,type:"fetch","http.method":d},description:"".concat(d," ").concat(f),op:"http.client",origin:i}):void 0;if(h&&(e.fetchData.__span=h.spanId,r[h.spanId]=h),n(e.fetchData.url)&&u){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=wr(t,u,c,n,h)}return h}(e,c,u,l);a&&t&&kr(t)})),n&&ft((e=>{const t=function(e,t,n,r){const i=e.xhr,s=i&&i.__sentry_xhr_v3__;if(!o()||!i||i.__sentry_own_request__||!s)return;const a=t(s.url);if(e.endTimestamp&&a){const e=i.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==s.status_code&&(t.setHttpStatus(s.status_code),t.finish(),delete r[e]))}const c=(0,k.Gd)(),u=c.getScope(),l=u.getSpan(),d=a&&l?l.startChild({data:{type:"xhr","http.method":s.method,url:s.url},description:"".concat(s.method," ").concat(s.url),op:"http.client",origin:"auto.http.browser"}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanId,r[i.__sentry_xhr_span_id__]=d);if(i.setRequestHeader&&n(s.url))if(d){const e=d&&d.transaction,t=bn(e&&e.getDynamicSamplingContext());Ir(i,d.toTraceparent(),t)}else{const e=c.getClient(),{traceId:t,sampled:n,dsc:r}=u.getPropagationContext();Ir(i,En(t,void 0,n),bn(r||(e?me(t,e,u):void 0)))}return d}(e,c,u,l);a&&t&&kr(t)}))}function kr(e){const t=e.data.url;if(!t)return;const n=er("resource",(r=>{let{entries:o}=r;o.forEach((r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"===typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){(function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}r===e&&(t=r);return{name:t,version:n}}(e.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",t]),!we.Z1)return r;return[...r,["http.request.redirect_start",Sr(e.redirectStart)],["http.request.fetch_start",Sr(e.fetchStart)],["http.request.domain_lookup_start",Sr(e.domainLookupStart)],["http.request.domain_lookup_end",Sr(e.domainLookupEnd)],["http.request.connect_start",Sr(e.connectStart)],["http.request.secure_connection_start",Sr(e.secureConnectionStart)],["http.request.connection_end",Sr(e.connectEnd)],["http.request.request_start",Sr(e.requestStart)],["http.request.response_start",Sr(e.responseStart)],["http.request.response_end",Sr(e.responseEnd)]]})(r).forEach((t=>e.setData(...t))),setTimeout(n)}}))}))}function Sr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return((we.Z1||performance.timeOrigin)+e)/1e3}function Ir(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(mn,n)}catch(r){}}const Cr={...In,markBackgroundTransactions:!0,routingInstrumentation:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!Un||!Un.location)return;let r,o=Un.location.href;t&&(r=e({name:Un.location.pathname,startTimestamp:we.Z1?we.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&q((t=>{let{to:n,from:i}=t;void 0===i&&o&&-1!==o.indexOf(n)?o=void 0:i!==n&&(o=void 0,r&&r.finish(),r=e({name:Un.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...Er};class Tr{setupOnce(e,t){this._getCurrentHub=t;const n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:i,startTransactionOnPageLoad:s,markBackgroundTransactions:a,traceFetch:c,traceXHR:u,shouldCreateSpanForRequest:l,enableHTTPTimings:d,_experiments:f}=this.options,h=r&&r.tracePropagationTargets,p=h||this.options.tracePropagationTargets;o((e=>{const n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n}),s,i),a&&Un&&Un.document&&Un.document.addEventListener("visibilitychange",(()=>{const e=Pn();if(Un.document.hidden&&e){const t="cancelled";e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}})),f.enableInteractions&&this._registerInteractionListener(),_r({traceFetch:c,traceXHR:u,tracePropagationTargets:p,shouldCreateSpanForRequest:l,enableHTTPTimings:d})}_createRouteTransaction(e){if(!this._getCurrentHub)return;const t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:o,heartbeatInterval:i}=this.options,s="pageload"===e.op,a=s?Ar("sentry-trace"):"",c=s?Ar("baggage"):"",{traceparentData:u,dynamicSamplingContext:l,propagationContext:d}=xn(a,c),f={...e,...u,metadata:{...e.metadata,dynamicSamplingContext:u&&!l?{}:l},trimEnd:!0},h="function"===typeof n?n(f):f,p=void 0===h?{...f,sampled:!1}:h;p.metadata=p.name!==f.name?{...p.metadata,source:"custom"}:p.metadata,this._latestRouteName=p.name,this._latestRouteSource=p.metadata&&p.metadata.source,p.sampled;const{location:m}=Un,g=Nn(t,p,r,o,!0,{location:m},i),y=t.getScope();return s&&u?y.setPropagationContext(d):y.setPropagationContext({traceId:g.traceId,spanId:g.spanId,parentSpanId:g.parentSpanId,sampled:g.sampled}),g.registerBeforeFinishCallback((e=>{this._collectWebVitals(),yr(e)})),g}_registerInteractionListener(){let e;const t=()=>{const{idleTimeout:t,finalTimeout:n,heartbeatInterval:r}=this.options,o="ui.action.click",i=Pn();if(i&&i.op&&["navigation","pageload"].includes(i.op))return;if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub)return;if(!this._latestRouteName)return;const s=this._getCurrentHub(),{location:a}=Un,c={name:this._latestRouteName,op:o,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Nn(s,c,t,n,!0,{location:a},r)};["click"].forEach((e=>{addEventListener(e,t,{once:!1,capture:!0})}))}constructor(e){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,Ln(),this.options={...Cr,...e},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=gr(),this.options.enableLongTask&&er("longtask",(e=>{let{entries:t}=e;for(const n of t){const e=Pn();if(!e)return;const t=lr(we.Z1+n.startTime),r=lr(n.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:t,endTimestamp:t+r})}})),this.options._experiments.enableInteractions&&er("event",(e=>{let{entries:t}=e;for(const n of t){const e=Pn();if(!e)return;if("click"===n.name){const t=lr(we.Z1+n.startTime),r=lr(n.duration);e.startChild({description:(0,$e.Rt)(n.target),op:"ui.interaction.".concat(n.name),origin:"auto.ui.browser.metrics",startTimestamp:t,endTimestamp:t+r})}}}))}}function Ar(e){const t=(0,$e.qT)("meta[name=".concat(e,"]"));return t?t.getAttribute("content"):void 0}function Pr(e,t,n){const r=t.match(/([a-z_]+)\.(.*)/i);if(null===r)e[t]=n;else{Pr(e[r[1]],r[2],n)}}function Or(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Array.isArray(t)?jr(e,t,n):Mr(e,t,n)}function jr(e,t,n){const r=t.find((t=>t.name===e.name));if(r){for(const[e,t]of Object.entries(n))Pr(r,e,t);return t}return[...t,e]}function Mr(e,t,n){return r=>{const o=t(r);if(e.allowExclusionByUser){if(!o.find((t=>t.name===e.name)))return o}return jr(e,o,n)}}var Rr=n(34155);function Br(e){const t=e?"production":Rr.env.VERCEL_ENV;return t?"vercel-".concat(t):void 0}const Nr={"routing.instrumentation":"next-app-router"};function Lr(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Pe.location.pathname;n&&(t=e({name:o,op:"pageload",origin:"auto.pageload.nextjs.app_router_instrumentation",tags:Nr,startTimestamp:we.Z1?we.Z1/1e3:void 0,metadata:{source:"url"}})),r&&mt((n=>{if(void 0!==n.endTimestamp)return;if("GET"!==n.fetchData.method)return;const r=Ur(n.args);if(null===r)return;const i=r.targetPathname,s={...Nr,from:o};o=i,t&&t.finish(),e({name:i,op:"navigation",origin:"auto.navigation.nextjs.app_router_instrumentation",tags:s,metadata:{source:"url"}})}))}function Ur(e){if(!e[0]||"object"!==typeof e[0]||void 0===e[0].searchParams)return null;if(!e[1]||"object"!==typeof e[1]||!("headers"in e[1]))return null;try{const t=e[0],n=e[1].headers;return"1"!==n.RSC||"1"===n["Next-Router-Prefetch"]?null:{targetPathname:t.pathname}}catch(t){return null}}var Dr=n(11163),Fr=n.n(Dr);const zr=Pe;function $r(){let e;const t=zr.document.getElementById("__NEXT_DATA__");if(t&&t.innerHTML)try{e=JSON.parse(t.innerHTML)}catch(s){}if(!e)return{};const n={},{page:r,query:o,props:i}=e;return n.route=r,n.params=o,i&&i.pageProps&&(n.sentryTrace=i.pageProps._sentryTraceData,n.baggage=i.pageProps._sentryBaggage),n}const qr={"routing.instrumentation":"next-pages-router"};let Zr,Hr;const Wr=(0,r.s3)();function Gr(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{route:r,params:o,sentryTrace:i,baggage:s}=$r(),{traceparentData:a,dynamicSamplingContext:c,propagationContext:u}=xn(i,s);if((0,k.Gd)().getScope().setPropagationContext(u),Hr=r||zr.location.pathname,t){const t=r?"route":"url";Zr=e({name:Hr,op:"pageload",origin:"auto.pageload.nextjs.pages_router_instrumentation",tags:qr,startTimestamp:we.Z1?we.Z1/1e3:void 0,...o&&Wr&&Wr.getOptions().sendDefaultPii&&{data:o},...a,metadata:{source:t,dynamicSamplingContext:a&&!c?{}:c}})}n&&Fr().events.on("routeChangeStart",(t=>{const n=_t(t),r=Kr(n);let o,i;r?(o=r,i="route"):(o=n,i="url");const s={...qr,from:Hr};Hr=o,Zr&&Zr.finish();const a=e({name:o,op:"navigation",origin:"auto.navigation.nextjs.pages_router_instrumentation",tags:s,metadata:{source:i}});if(a){const e=a.startChild({op:"ui.nextjs.route-change",origin:"auto.ui.nextjs.pages_router_instrumentation",description:"Next.js Route Change"}),t=()=>{e.finish(),Fr().events.off("routeChangeComplete",t)};Fr().events.on("routeChangeComplete",t)}}))}function Kr(e){const t=(zr.__BUILD_MANIFEST||{}).sortedPages;if(t)return t.find((t=>{const n=function(e){const t=e.split("/");let n="";t[t.length-1].match(/^\[\[\.\.\..+\]\]$/)&&(t.pop(),n="(?:/(.+?))?");const r=t.map((e=>e.replace(/^\[\.\.\..+\]$/,"(.+?)").replace(/^\[.*\]$/,"([^/]+?)"))).join("/");return new RegExp("^".concat(r).concat(n,"(?:/)?$"))}(t);return e.match(n)}))}function Vr(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=!Pe.document.getElementById("__NEXT_DATA__");r?Lr(e,t,n):Gr(e,t,n)}const Xr=n.g;const Yr=n.g;function Jr(e,t){const n=t.getClient(),r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,r)||function(e,t){if(!t)return!1;return Qr(e)===Qr(t)}(e,o)}function Qr(e){return"/"===e[e.length-1]?e.slice(0,-1):e}var eo=n(70704);function to(){return!(0,eo.KV)()||void 0!==O.n2.process&&"renderer"===O.n2.process.type}const no=O.n2,ro="sentryReplaySession",oo="Unable to send Replay",io=15e4,so=5e3,ao=2e7,co=36e5;var uo;function lo(e){const t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function fo(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ho(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,po).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(n){return null}var t}function po(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=ho(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(uo||(uo={}));class mo{getId(e){var t;if(!e)return-1;const n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function go(e){let{maskInputOptions:t,tagName:n,type:r}=e;return"OPTION"===n&&(n="SELECT"),Boolean(t[n.toLowerCase()]||r&&t[r]||"password"===r||"INPUT"===n&&!r&&t.text)}function yo(e){let{isMasked:t,element:n,value:r,maskInputFn:o}=e,i=r||"";return t?(o&&(i=o(i,n)),"*".repeat(i.length)):i}function bo(e){return e.toLowerCase()}function vo(e){return e.toUpperCase()}const wo="__rrweb_original__";function xo(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?bo(t):null}function Eo(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let _o=1;const ko=new RegExp("[^a-z0-9-_:]");function So(){return _o++}let Io,Co;const To=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ao=/^(?:[a-z+]+:)?\/\//i,Po=/^www\..*/i,Oo=/^(data:)([^,]*),(.*)/i;function jo(e,t){return(e||"").replace(To,((e,n,r,o,i,s)=>{const a=r||i||s,c=n||o||"";if(!a)return e;if(Ao.test(a)||Po.test(a))return"url(".concat(c).concat(a).concat(c,")");if(Oo.test(a))return"url(".concat(c).concat(a).concat(c,")");if("/"===a[0])return"url(".concat(c).concat(function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a).concat(c,")");const u=t.split("/"),l=a.split("/");u.pop();for(const t of l)"."!==t&&(".."===t?u.pop():u.push(t));return"url(".concat(c).concat(u.join("/")).concat(c,")")}))}const Mo=/^[^ \t\n\r\u000c]+/,Ro=/^[, \t\n\r\u000c]+/;function Bo(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function No(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Lo(){const e=document.createElement("a");return e.href="",e.href}function Uo(e,t,n,r,o,i){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Bo(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Ro),!(n>=t.length);){let i=r(Mo);if(","===i.slice(-1))i=Bo(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=Bo(e,i);let s=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(s=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?jo(r,Lo()):"object"===t&&"data"===n?Bo(e,r):"function"===typeof i?i(n,r,o):r:Bo(e,r):r}function Do(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Fo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Fo(e.parentNode,t,n,r+1):-1}function zo(e,t){return n=>{const r=n;if(null===r)return!1;if(e)if("string"===typeof e){if(r.matches(".".concat(e)))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}}function $o(e,t,n,r,o,i){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===s)return!1;let a=-1,c=-1;if(i){if(c=Fo(s,zo(r,o)),c<0)return!0;a=Fo(s,zo(t,n),c>=0?c:1/0)}else{if(a=Fo(s,zo(t,n)),a<0)return!1;c=Fo(s,zo(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!i}catch(s){}return!!i}function qo(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:x=!1}=t,E=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:uo.Document,childNodes:[],compatMode:e.compatMode}:{type:uo.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:uo.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m,maskAllText:g,maskTextClass:y,unmaskTextClass:b,maskTextSelector:v,unmaskTextSelector:w}=t,x=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"===typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(o){}return!1}(e,r,o,i),E=function(e){if(e instanceof HTMLFormElement)return"form";const t=bo(e.tagName);return ko.test(t)?"div":t}(e);let _={};const k=e.attributes.length;for(let C=0;C<k;C++){const t=e.attributes[C];Do(E,t.name,t.value)||(_[t.name]=Uo(n,E,bo(t.name),t.value,e,c))}if("link"===E&&s){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=ho(t)),r&&(delete _.rel,delete _.href,_._cssText=jo(r,t.href))}if("style"===E&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ho(e.sheet);t&&(_._cssText=jo(t,Lo()))}if("input"===E||"textarea"===E||"select"===E||"option"===E){const t=e,n=xo(t),r=Eo(t,vo(E),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=$o(t,y,v,b,w,go({type:n,tagName:vo(E),maskInputOptions:a}));_.value=yo({isMasked:e,element:t,value:r,maskInputFn:u})}o&&(_.checked=o)}"option"===E&&(e.selected&&!a.select?_.selected=!0:delete _.selected);if("canvas"===E&&f)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData,i=wo in o?o.__rrweb_original__:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(_.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(l.type,l.quality)&&(_.rr_dataURL=t)}if("img"===E&&d){Io||(Io=n.createElement("canvas"),Co=Io.getContext("2d"));const t=e,r=t.crossOrigin;t.crossOrigin="anonymous";const o=()=>{t.removeEventListener("load",o);try{Io.width=t.naturalWidth,Io.height=t.naturalHeight,Co.drawImage(t,0,0),_.rr_dataURL=Io.toDataURL(l.type,l.quality)}catch(e){console.warn("Cannot inline img src=".concat(t.currentSrc,"! Error: ").concat(e))}r?_.crossOrigin=r:t.removeAttribute("crossorigin")};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}"audio"!==E&&"video"!==E||(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime);p||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop));if(x){const{width:t,height:n}=e.getBoundingClientRect();_={class:_.class,rr_width:"".concat(t,"px"),rr_height:"".concat(n,"px")}}"iframe"!==E||h(_.src)||(e.contentDocument||(_.rr_src=_.src),delete _.src);let S;try{customElements.get(E)&&(S=!0)}catch(I){}return{type:uo.Element,tagName:E,attributes:_,childNodes:[],isSVG:No(e)||void 0,needBlock:x,rootId:m,isCustom:S}}(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:p,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:x,rootId:E,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return function(e,t){var n;const{maskAllText:r,maskTextClass:o,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:a,maskTextFn:c,maskInputOptions:u,maskInputFn:l,rootId:d}=t,f=e.parentNode&&e.parentNode.tagName;let h=e.textContent;const p="STYLE"===f||void 0,m="SCRIPT"===f||void 0,g="TEXTAREA"===f||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(h=ho(e.parentNode.sheet))}catch(b){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(b),e)}h=jo(h,Lo())}m&&(h="SCRIPT_PLACEHOLDER");const y=$o(e,o,s,i,a,r);p||m||g||!h||!y||(h=c?c(h):h.replace(/[\S]/g,"*"));g&&h&&(u.textarea||y)&&(h=l?l(h,e.parentNode):h.replace(/[\S]/g,"*"));if("OPTION"===f&&h){h=yo({isMasked:$o(e,o,s,i,a,go({type:null,tagName:f,maskInputOptions:u})),element:e,value:h,maskInputFn:l})}return{type:uo.Text,textContent:h||"",isStyle:p,rootId:d}}(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:g,rootId:E});case e.CDATA_SECTION_NODE:return{type:uo.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:uo.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function Zo(e){return void 0===e||null===e?"":e.toLowerCase()}function Ho(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v={},inlineImages:w=!1,recordCanvas:x=!1,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:C=(()=>!1),newlyAddedElement:T=!1}=t;let{preserveWhiteSpace:A=!0}=t;const P=qo(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:w,recordCanvas:x,keepIframeSrcFn:C,newlyAddedElement:T});if(!P)return console.warn(e,"not serialized"),null;let O;O=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===uo.Comment)return!0;if(e.type===uo.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Zo(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Zo(e.attributes.name)||"icon"===Zo(e.attributes.rel)||"apple-touch-icon"===Zo(e.attributes.rel)||"shortcut icon"===Zo(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Zo(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Zo(e.attributes.property).match(/^(og|twitter|fb):/)||Zo(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Zo(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Zo(e.attributes.name)||"googlebot"===Zo(e.attributes.name)||"bingbot"===Zo(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Zo(e.attributes.name)||"generator"===Zo(e.attributes.name)||"framework"===Zo(e.attributes.name)||"publisher"===Zo(e.attributes.name)||"progid"===Zo(e.attributes.name)||Zo(e.attributes.property).match(/^article:/)||Zo(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Zo(e.attributes.name)||"yandex-verification"===Zo(e.attributes.name)||"csrf-token"===Zo(e.attributes.name)||"p:domain_verify"===Zo(e.attributes.name)||"verify-v1"===Zo(e.attributes.name)||"verification"===Zo(e.attributes.name)||"shopify-checkout-api-token"===Zo(e.attributes.name)))return!0}}return!1}(P,b)&&(A||P.type!==uo.Text||P.isStyle||P.textContent.replace(/^\s+|\s+$/gm,"").length)?So():-2;const j=Object.assign(P,{id:O});if(r.add(e,j),-2===O)return null;E&&E(e);let M=!f;if(j.type===uo.Element){M=M&&!j.needBlock,delete j.needBlock;const t=e.shadowRoot;t&&fo(t)&&(j.isShadowHost=!0)}if((j.type===uo.Document||j.type===uo.Element)&&M){b.headWhitespace&&j.type===uo.Element&&"head"===j.tagName&&(A=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:x,preserveWhiteSpace:A,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:C};for(const n of Array.from(e.childNodes)){const e=Ho(n,t);e&&j.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Ho(n,t);r&&(fo(e.shadowRoot)&&(r.isShadow=!0),j.childNodes.push(r))}}return e.parentNode&&lo(e.parentNode)&&fo(e.parentNode)&&(j.isShadow=!0),j.type===uo.Element&&"iframe"===j.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(a){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&_){const n=Ho(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:x,preserveWhiteSpace:A,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:C});n&&_(e,n)}}),k),j.type===uo.Element&&"link"===j.tagName&&"stylesheet"===j.attributes.rel&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(s){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(e,(()=>{if(S){const t=Ho(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:x,preserveWhiteSpace:A,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:C});t&&S(e,t)}}),I),j}function Wo(e,t){const{mirror:n=new mo,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:b=!1,dataURLOptions:v,preserveWhiteSpace:w,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:I=(()=>!1)}=t||{};return Ho(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,dataURLOptions:v,inlineImages:f,recordCanvas:h,preserveWhiteSpace:w,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:I,newlyAddedElement:!1})}function Go(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ko="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Vo={map:{},getId:()=>(console.error(Ko),-1),getNode:()=>(console.error(Ko),null),removeNodeFromMap(){console.error(Ko)},has:()=>(console.error(Ko),!1),reset(){console.error(Ko)}};function Xo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];const c=Date.now();o||!1!==n.leading||(o=c);const u=t-(c-o),l=this;u<=0||u>t?(r&&(clearTimeout(r),r=null),o=c,e.apply(l,s)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(l,s)}),u))}}function Yo(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Yo(e,t,i||{},!0)}function Jo(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"===typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(r){return()=>{}}}window.Proxy&&window.Reflect&&(Vo=new Proxy(Vo,{get:(e,t,n)=>("map"===t&&console.error(Ko),Reflect.get(e,t,n))}));let Qo=Date.now;function ei(e){var t,n,r,o,i,s;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===a||void 0===a?void 0:a.documentElement.scrollLeft)||(null===(n=null===(t=null===a||void 0===a?void 0:a.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===a||void 0===a?void 0:a.body)||void 0===r?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===a||void 0===a?void 0:a.documentElement.scrollTop)||(null===(i=null===(o=null===a||void 0===a?void 0:a.body)||void 0===o?void 0:o.parentElement)||void 0===i?void 0:i.scrollTop)||(null===(s=null===a||void 0===a?void 0:a.body)||void 0===s?void 0:s.scrollTop)||0}}function ti(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ni(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ri(e,t,n,r,o){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;const s=zo(t,n);if(!o){const e=r&&i.matches(r);return s(i)&&!e}const a=Fo(i,s);let c=-1;return!(a<0)&&(r&&(c=Fo(i,zo(null,r))),a>-1&&c<0||a<c)}function oi(e,t){return-2===t.getId(e)}function ii(e,t){if(lo(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||ii(e.parentNode,t))}function si(e){return Boolean(e.changedTouches)}function ai(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if("NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),!Node.prototype.contains){var t=this;Node.prototype.contains=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let o=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(t===o)return!0}while(o=o&&o.parentNode);return!1}}}function ci(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function ui(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function li(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Qo=()=>(new Date).getTime());class di{getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}}function fi(e){var t,n;let r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function hi(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=fi(n);)n=t;return n}(e);return t.contains(n)}function pi(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||hi(e))}var mi=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(mi||{}),gi=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(gi||{}),yi=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(yi||{}),bi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(bi||{});function vi(e){return"__ln"in e}class wi{get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&vi(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&vi(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}constructor(){this.length=0,this.head=null,this.tail=null}}const xi=(e,t)=>"".concat(e,"@").concat(t);class Ei{init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new wi,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!pi(o))return;const i=lo(o.parentNode)?this.mirror.getId(fi(o)):this.mirror.getId(o.parentNode),s=r(o);if(-1===i||-1===s)return n.addNode(o);const a=Ho(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{ci(e,this.mirror)&&this.iframeManager.addIframe(e),ui(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),li(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:i,nextId:s,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)ki(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of this.addedSet)Ii(this.droppedSet,a)||ki(this.removes,a,this.mirror)?Ii(this.movedSet,a)?o(a):this.droppedSet.add(a):o(a);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const s={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"===typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(oi(e.target,this.mirror))return;let t;try{t=document.implementation.createHTMLDocument()}catch(n){t=this.doc}switch(e.type){case"characterData":{const t=e.target.textContent;ri(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:$o(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){const t=xo(n),r=n.tagName;o=Eo(n,r,t);const i=go({maskInputOptions:this.maskInputOptions,tagName:r,type:t});o=yo({isMasked:$o(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:n,value:o,maskInputFn:this.maskInputFn})}if(ri(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===e.oldValue)return;let i=this.attributes.find((t=>t.node===e.target));if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Do(n.tagName,r)&&(i.attributes[r]=Uo(this.doc,bo(n.tagName),bo(r),o,n,this.maskAttributeFn),"style"===r)){const r=t.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(n.style)){const t=n.style.getPropertyValue(e),o=n.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===o?t:[t,o]:i._unchangedStyles[e]=[t,o]}for(const e of Array.from(r.style))""===n.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(ri(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=lo(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);ri(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||oi(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(_i(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||ii(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[xi(n,r)]?_i(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!lo(e.target)||!fo(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(oi(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[xi(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ri(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),li(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}}function _i(e,t){e.delete(t),t.childNodes.forEach((t=>_i(e,t)))}function ki(e,t,n){return 0!==e.length&&Si(e,t,n)}function Si(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||Si(e,r,n)}function Ii(e,t){return 0!==e.size&&Ci(e,t)}function Ci(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Ci(e,n))}let Ti;function Ai(e){Ti=e}function Pi(){Ti=void 0}const Oi=e=>{if(!Ti)return e;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e(...n)}catch(o){if(Ti&&!0===Ti(o))return()=>{};throw o}}},ji=[];function Mi(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Ri(e,t){var n,r;const o=new Ei;ji.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const s=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");s&&window[s]&&(i=window[s]);const a=new i(Oi((t=>{e.onMutation&&!1===e.onMutation(t)||o.processMutations.bind(o)(t)})));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Bi(e){let{mousemoveCb:t,sampling:n,doc:r,mirror:o}=e;if(!1===n.mousemove)return()=>{};const i="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500;let a,c=[];const u=Xo(Oi((e=>{const n=Date.now()-a;t(c.map((e=>(e.timeOffset-=n,e))),e),c=[],a=null})),s),l=Oi(Xo(Oi((e=>{const t=Mi(e),{clientX:n,clientY:r}=si(e)?e.changedTouches[0]:e;a||(a=Qo()),c.push({x:n,y:r,id:o.getId(t),timeOffset:Qo()-a}),u("undefined"!==typeof DragEvent&&e instanceof DragEvent?gi.Drag:e instanceof MouseEvent?gi.MouseMove:gi.TouchMove)})),i,{trailing:!1})),d=[Go("mousemove",l,r),Go("touchmove",l,r),Go("drag",l,r)];return Oi((()=>{d.forEach((e=>e()))}))}function Ni(e){let{mouseInteractionCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,sampling:a}=e;if(!1===a.mouseInteraction)return()=>{};const c=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[];let l=null;return Object.keys(yi).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==c[e])).forEach((e=>{let a=bo(e);const c=(e=>n=>{const a=Mi(n);if(ri(a,o,i,s,!0))return;let c=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":c=bi.Mouse;break;case"touch":c=bi.Touch;break;case"pen":c=bi.Pen}c===bi.Touch?yi[e]===yi.MouseDown?u="TouchStart":yi[e]===yi.MouseUp&&(u="TouchEnd"):bi.Pen}else si(n)&&(c=bi.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===bi.Touch||u.startsWith("Mouse")&&c===bi.Mouse)&&(c=null)):yi[e]===yi.Click&&(c=l,l=null);const d=si(n)?n.changedTouches[0]:n;if(!d)return;const f=r.getId(a),{clientX:h,clientY:p}=d;Oi(t)(Object.assign({type:yi[u],id:f,x:h,y:p},null!==c&&{pointerType:c}))})(e);if(window.PointerEvent)switch(yi[e]){case yi.MouseDown:case yi.MouseUp:a=a.replace("mouse","pointer");break;case yi.TouchStart:case yi.TouchEnd:return}u.push(Go(a,c,n))})),Oi((()=>{u.forEach((e=>e()))}))}function Li(e){let{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,sampling:a}=e;return Go("scroll",Oi(Xo(Oi((e=>{const a=Mi(e);if(!a||ri(a,o,i,s,!0))return;const c=r.getId(a);if(a===n&&n.defaultView){const e=ei(n.defaultView);t({id:c,x:e.left,y:e.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})})),a.scroll||100)),n)}function Ui(e,t){let{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return Go("resize",Oi(Xo(Oi((()=>{const e=ti(),t=ni();o===e&&i===t||(n({width:Number(t),height:Number(e)}),o=e,i=t)})),200)),r)}const Di=["INPUT","TEXTAREA","SELECT"],Fi=new WeakMap;function zi(e){let{inputCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:c,maskInputOptions:u,maskInputFn:l,sampling:d,userTriggeredOnInput:f,maskTextClass:h,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:g}=e;function y(e){let t=Mi(e);const r=e.isTrusted,d=t&&vo(t.tagName);if("OPTION"===d&&(t=t.parentElement),!t||!d||Di.indexOf(d)<0||ri(t,o,i,s,!0))return;const y=t;if(y.classList.contains(a)||c&&y.matches(c))return;const v=xo(t);let w=Eo(y,d,v),x=!1;const E=go({maskInputOptions:u,tagName:d,type:v}),_=$o(t,h,m,p,g,E);"radio"!==v&&"checkbox"!==v||(x=t.checked),w=yo({isMasked:_,element:t,value:w,maskInputFn:l}),b(t,f?{text:w,isChecked:x,userTriggered:r}:{text:w,isChecked:x});const k=t.name;"radio"===v&&k&&x&&n.querySelectorAll('input[type="radio"][name="'.concat(k,'"]')).forEach((e=>{if(e!==t){const t=yo({isMasked:_,element:e,value:Eo(e,d,v),maskInputFn:l});b(e,f?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}}))}function b(e,n){const o=Fi.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Fi.set(e,n);const o=r.getId(e);Oi(t)(Object.assign(Object.assign({},n),{id:o}))}}const v=("last"===d.input?["change"]:["input","change"]).map((e=>Go(e,Oi(y),n))),w=n.defaultView;if(!w)return()=>{v.forEach((e=>e()))};const x=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),E=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&v.push(...E.map((e=>Yo(e[0],e[1],{set(){Oi(y)({target:this,isTrusted:!1})}},!1,w)))),Oi((()=>{v.forEach((e=>e()))}))}function $i(e){return function(e,t){if(Ji("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Ji("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Ji("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Ji("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function qi(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Zi(e,t){let{styleSheetRuleCb:n,mirror:r,stylesheetManager:o}=e,{win:i}=t;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Oi(((e,t,i)=>{const[s,a]=i,{id:c,styleId:u}=qi(t,r,o.styleMirror);return(c&&-1!==c||u&&-1!==u)&&n({id:c,styleId:u,adds:[{rule:s,index:a}]}),e.apply(t,i)}))});const a=i.CSSStyleSheet.prototype.deleteRule;let c,u;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Oi(((e,t,i)=>{const[s]=i,{id:a,styleId:c}=qi(t,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,removes:[{index:s}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.replace&&(c=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:Oi(((e,t,i)=>{const[s]=i,{id:a,styleId:c}=qi(t,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,replace:s}),e.apply(t,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(u=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Oi(((e,t,i)=>{const[s]=i,{id:a,styleId:c}=qi(t,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,replaceSync:s}),e.apply(t,i)}))}));const l={};Qi("CSSGroupingRule")?l.CSSGroupingRule=i.CSSGroupingRule:(Qi("CSSMediaRule")&&(l.CSSMediaRule=i.CSSMediaRule),Qi("CSSConditionRule")&&(l.CSSConditionRule=i.CSSConditionRule),Qi("CSSSupportsRule")&&(l.CSSSupportsRule=i.CSSSupportsRule));const d={};return Object.entries(l).forEach((e=>{let[t,i]=e;d[t]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Oi(((e,t,i)=>{const[s,a]=i,{id:c,styleId:u}=qi(t.parentStyleSheet,r,o.styleMirror);return(c&&-1!==c||u&&-1!==u)&&n({id:c,styleId:u,adds:[{rule:s,index:[...$i(t),a||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Oi(((e,t,i)=>{const[s]=i,{id:a,styleId:c}=qi(t.parentStyleSheet,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,removes:[{index:[...$i(t),s]}]}),e.apply(t,i)}))})})),Oi((()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,c&&(i.CSSStyleSheet.prototype.replace=c),u&&(i.CSSStyleSheet.prototype.replaceSync=u),Object.entries(l).forEach((e=>{let[t,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}function Hi(e,t){let{mirror:n,stylesheetManager:r}=e;var o,i,s;let a=null;a="#document"===t.nodeName?n.getId(t):n.getId(t.host);const c="#document"===t.nodeName?null===(o=t.defaultView)||void 0===o?void 0:o.Document:null===(s=null===(i=t.ownerDocument)||void 0===i?void 0:i.defaultView)||void 0===s?void 0:s.ShadowRoot,u=(null===c||void 0===c?void 0:c.prototype)?Object.getOwnPropertyDescriptor(null===c||void 0===c?void 0:c.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&c&&u?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var e;return null===(e=u.get)||void 0===e?void 0:e.call(this)},set(e){var t;const n=null===(t=u.set)||void 0===t?void 0:t.call(this,e);if(null!==a&&-1!==a)try{r.adoptStyleSheets(e,a)}catch(o){}return n}}),Oi((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function Wi(e,t){let{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:o,stylesheetManager:i}=e,{win:s}=t;const a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Oi(((e,t,s)=>{var c;const[u,l,d]=s;if(o.has(u))return a.apply(t,[u,l,d]);const{id:f,styleId:h}=qi(null===(c=t.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,i.styleMirror);return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,set:{property:u,value:l,priority:d},index:$i(t.parentRule)}),e.apply(t,s)}))});const c=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:Oi(((e,t,s)=>{var a;const[u]=s;if(o.has(u))return c.apply(t,[u]);const{id:l,styleId:d}=qi(null===(a=t.parentRule)||void 0===a?void 0:a.parentStyleSheet,r,i.styleMirror);return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,remove:{property:u},index:$i(t.parentRule)}),e.apply(t,s)}))}),Oi((()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=c}))}function Gi(e){let{mediaInteractionCb:t,blockClass:n,blockSelector:r,unblockSelector:o,mirror:i,sampling:s,doc:a}=e;const c=Oi((e=>Xo(Oi((s=>{const a=Mi(s);if(!a||ri(a,n,r,o,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;t({type:e,id:i.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})})),s.media||500))),u=[Go("play",c(0),a),Go("pause",c(1),a),Go("seeked",c(2),a),Go("volumechange",c(3),a),Go("ratechange",c(4),a)];return Oi((()=>{u.forEach((e=>e()))}))}function Ki(e){let{fontCb:t,doc:n}=e;const r=n.defaultView;if(!r)return()=>{};const o=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,n){const r=new s(e,t,n);return i.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=Jo(n.fonts,"add",(function(e){return function(n){return setTimeout(Oi((()=>{const e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return o.push((()=>{r.FontFace=s})),o.push(a),Oi((()=>{o.forEach((e=>e()))}))}function Vi(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e;let a=!0;const c=Oi((()=>{const e=t.getSelection();if(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t<u;t++){const s=e.getRangeAt(t),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=s;ri(a,r,o,i,!0)||ri(l,r,o,i,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}s({ranges:c})}));return c(),Go("selectionchange",c)}function Xi(e){let{doc:t,customElementCb:n}=e;const r=t.defaultView;if(!r||!r.customElements)return()=>{};return Jo(r.customElements,"define",(function(e){return function(t,r,o){try{n({define:{name:t}})}catch(i){}return e.apply(this,[t,r,o])}}))}function Yi(e){const t=e.doc.defaultView;if(!t)return()=>{};const n=Ri(e,e.doc),r=Bi(e),o=Ni(e),i=Li(e),s=Ui(e,{win:t}),a=zi(e),c=Gi(e),u=Zi(e,{win:t}),l=Hi(e,e.doc),d=Wi(e,{win:t}),f=e.collectFonts?Ki(e):()=>{},h=Vi(e),p=Xi(e);return Oi((()=>{ji.forEach((e=>e.reset())),n.disconnect(),r(),o(),i(),s(),a(),c(),u(),l(),d(),f(),h(),p()}))}function Ji(e){return"undefined"!==typeof window[e]}function Qi(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class es{getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}}class ts{addIframe(){}addLoadListener(){}attachIframe(){}constructor(){this.crossOriginIframeMirror=new es(So),this.crossOriginIframeRootIdMap=new WeakMap}}class ns{addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case mi.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:mi.IncrementalSnapshot,data:{source:gi.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case mi.Meta:case mi.Load:case mi.DomContentLoaded:return!1;case mi.Plugin:return t;case mi.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case mi.IncrementalSnapshot:switch(t.data.source){case gi.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case gi.Drag:case gi.TouchMove:case gi.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case gi.ViewportResize:return!1;case gi.MediaInteraction:case gi.MouseInteraction:case gi.Scroll:case gi.CanvasMutation:case gi.Input:return this.replaceIds(t.data,e,["id"]),t;case gi.StyleSheetRule:case gi.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case gi.Font:return t;case gi.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case gi.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"===typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===uo.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new es(So),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new es(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}}class rs{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class os{init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!fo(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=Ri(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Li(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Hi({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Jo(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&pi(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}}class is{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}}class ss{attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const o of e){let e;this.styleMirror.has(o)?e=this.styleMirror.getId(o):(e=this.styleMirror.add(o),r.push({styleId:e,rules:Array.from(o.rules||CSSRule,((e,t)=>({rule:po(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new di,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}}class as{periodicallyClear(){requestAnimationFrame((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}}function cs(e){const t=e;return t.timestamp=Qo(),t}let us;const ls=new mo;function ds(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,packFn:x,sampling:E={},dataURLOptions:_={},mousemoveWait:k,recordCanvas:S=!1,recordCrossOriginIframes:I=!1,recordAfter:C=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:A=!1,inlineImages:P=!1,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:j=new Set([]),errorHandler:M,onMutation:R,getCanvasManager:B}=e;Ai(M);const N=!I||window.parent===window;let L=!1;if(!N)try{window.parent.document&&(L=!1)}catch(ee){L=!0}if(N&&!t)throw new Error("emit function is required");void 0!==k&&void 0===E.mousemove&&(E.mousemove=k),ls.reset();const U=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},D=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let F;ai();let z=0;const $=e=>(x&&!L&&(e=x(e)),e),q=(e,o)=>{var i;if(!(null===(i=ji[0])||void 0===i?void 0:i.isFrozen())||e.type===mi.FullSnapshot||e.type===mi.IncrementalSnapshot&&e.data.source===gi.Mutation||ji.forEach((e=>e.unfreeze())),N)null===t||void 0===t||t($(e),o);else if(L){const t={type:"rrweb",event:$(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===mi.FullSnapshot)F=e,z=0;else if(e.type===mi.IncrementalSnapshot){if(e.data.source===gi.Mutation&&e.data.isAttachIframe)return;z++;const t=r&&z>=r,o=n&&e.timestamp-F.timestamp>n;(t||o)&&Q(!0)}},Z=e=>{q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.Mutation},e)}))},H=e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.Scroll},e)})),W=e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.CanvasMutation},e)})),G=e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.AdoptedStyleSheet},e)})),K=new ss({mutationCb:Z,adoptedStyleSheetCb:G}),V="boolean"===typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new ts:new ns({mirror:ls,mutationCb:Z,stylesheetManager:K,recordCrossOriginIframes:I,wrappedEmit:q}),X=new as,Y=B?B({recordCanvas:S,blockClass:o,blockSelector:i,unblockSelector:s,sampling:E.canvas,dataURLOptions:_}):new is,J="boolean"===typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new rs:new os({mutationCb:Z,scrollCb:H,bypassOptions:{onMutation:R,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:U,dataURLOptions:_,maskAttributeFn:b,maskTextFn:w,maskInputFn:v,recordCanvas:S,inlineImages:P,sampling:E,slimDOMOptions:D,iframeManager:V,stylesheetManager:K,canvasManager:Y,keepIframeSrcFn:O,processedNodeManager:X},mirror:ls}),Q=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];q(cs({type:mi.Meta,data:{href:window.location.href,width:ni(),height:ti()}}),e),K.reset(),J.init(),ji.forEach((e=>e.lock()));const t=Wo(document,{mirror:ls,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:U,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,slimDOM:D,dataURLOptions:_,recordCanvas:S,inlineImages:P,onSerialize:e=>{ci(e,ls)&&V.addIframe(e),ui(e,ls)&&K.trackLinkElement(e),li(e)&&J.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");q(cs({type:mi.FullSnapshot,data:{node:t,initialOffset:ei(window)}}),e),ji.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,ls.getId(document))};us=Q;try{const e=[],t=e=>Oi(Yi)({onMutation:R,mutationCb:Z,mousemoveCb:(e,t)=>q(cs({type:mi.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.MouseInteraction},e)})),scrollCb:H,viewportResizeCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.ViewportResize},e)})),inputCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.Input},e)})),mediaInteractionCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.MediaInteraction},e)})),styleSheetRuleCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.StyleSheetRule},e)})),styleDeclarationCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.StyleDeclaration},e)})),canvasMutationCb:W,fontCb:e=>q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.Font},e)})),selectionCb:e=>{q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.Selection},e)}))},customElementCb:e=>{q(cs({type:mi.IncrementalSnapshot,data:Object.assign({source:gi.CustomElement},e)}))},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:U,inlineStylesheet:p,sampling:E,recordCanvas:S,inlineImages:P,userTriggeredOnInput:T,collectFonts:A,doc:e,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,keepIframeSrcFn:O,blockSelector:i,unblockSelector:s,slimDOMOptions:D,dataURLOptions:_,mirror:ls,iframeManager:V,stylesheetManager:K,shadowDomManager:J,processedNodeManager:X,canvasManager:Y,ignoreCSSAttributes:j,plugins:[]},{});V.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(r){console.warn(r)}}));const n=()=>{Q(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Go("DOMContentLoaded",(()=>{q(cs({type:mi.DomContentLoaded,data:{}})),"DOMContentLoaded"===C&&n()}))),e.push(Go("load",(()=>{q(cs({type:mi.Load,data:{}})),"load"===C&&n()}),window))),()=>{e.forEach((e=>e())),X.destroy(),us=void 0,Pi()}}catch(te){console.warn(te)}}ds.mirror=ls,ds.takeFullSnapshot=function(e){if(!us)throw new Error("please take full snapshot after start recording");us(e)};function fs(e){return e>9999999999?e:1e3*e}function hs(e){return e>9999999999?e/1e3:e}function ps(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:mi.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,J.Fv)(t,10,1e3)}}),"console"===t.category))))}function ms(e){return e.closest("button,a")||e}function gs(e){const t=ys(e);return t&&t instanceof Element?ms(t):t}function ys(e){return function(e){return"object"===typeof e&&!!e&&"target"in e}(e)?e.target:e}let bs;function vs(e){return bs||(bs=[],(0,w.hl)(no,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(bs)try{bs.forEach((e=>e()))}catch(o){}return e.apply(no,n)}}))),bs.push(e),()=>{const t=bs?bs.indexOf(e):-1;t>-1&&bs.splice(t,1)}}class ws{addListeners(){const e=vs((()=>{this._lastMutation=Es()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!xs.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!==typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:hs(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastMutation=hs(e)}registerScroll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastScroll=hs(e)}registerClick(e){const t=ms(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=Es();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const n of e){const e=this._clicks.indexOf(n);e>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:s}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:no.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,o)}else if(i>1){const e={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:no.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}constructor(e,t,n=ps){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}}const xs=["A","BUTTON","INPUT"];function Es(){return Date.now()/1e3}function _s(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(n===gi.Mutation&&e.registerMutation(t.timestamp),n===gi.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===gi.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=ds.mirror.getNode(r);o instanceof HTMLElement&&n===yi.Click&&e.registerClick(o)}}catch(n){}}function ks(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Ss;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Ss||(Ss={}));const Is=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function Cs(e){const t={};for(const n in e)if(Is.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const Ts=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?gs(e.event):ys(e.event),n=(0,$e.Rt)(r,{maxStringLength:200})||"<unknown>"}catch(o){n="<unknown>"}return{target:r,message:n}}(e);return ks({category:"ui.".concat(e.name),...As(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,gs(t.event)),ps(e,n)};function As(e,t){const n=ds.mirror.getId(e),r=n&&ds.mirror.getNode(n),o=r&&ds.mirror.getMeta(r),i=o&&function(e){return e.type===Ss.Element}(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((e=>e.type===Ss.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:Cs(i.attributes)}}:{}}}function Ps(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(s)||!i)return null;const a=t||r||o,c=1===i.length;if(!a&&c)return null;const u=(0,$e.Rt)(s,{maxStringLength:200})||"<unknown>",l=As(s,u);return ks({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}(t);n&&ps(e,n)}const Os={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:"".concat(t,".").concat(n),start:Ms(i),end:Ms(o),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,i=Ms(o);return{type:n,name:r,start:i,end:i+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:p,type:m}=e;if(0===o)return null;return{type:"".concat(t,".").concat(m),start:Ms(h),end:Ms(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}};function js(e){return Os[e.entryType]?Os[e.entryType](e):null}function Ms(e){return((we.Z1||no.performance.timeOrigin)+e)/1e3}function Rs(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n(e){let{entries:n}=e;n.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(er(e,n))})),r.push(Qn((t=>{let{metric:n}=t;e.replayPerformanceEntries.push(function(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,o=e.value,i=Ms(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?ds.mirror.getId(r):void 0}}}(n))}))),()=>{r.forEach((e=>e()))}}const Bs=!1;class Ns extends Error{constructor(){super("Event buffer exceeded maximum size of ".concat(ao,"."))}}class Ls{get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>ao)throw new Ns;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?fs(e):null}constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}}class Us{ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(n=>{let{data:r}=n;r.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const i=t=>{let{data:s}=t;const a=s;a.method===e&&a.id===n&&(this._worker.removeEventListener("message",i),a.success?r(a.response):o(new Error("Error in compression worker")))};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}constructor(e){this._worker=e,this._id=0}}class Ds{get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=fs(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>ao?Promise.reject(new Ns):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}constructor(e){this._worker=new Us(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}}class Fs{get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const o of e)n.push(this._compression.addEvent(o));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(r){}}constructor(e){this._fallback=new Ls,this._compression=new Ds(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}}function zs(e){let{useCompression:t,workerUrl:n}=e;if(t&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"===typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;"[Replay] Using compression worker".concat(e?" from ".concat(e):"");const n=new Worker(t);return new Fs(n)}catch(t){}}(n);if(e)return e}return new Ls}function $s(){try{return"sessionStorage"in no&&!!no.sessionStorage}catch(e){return!1}}function qs(e){!function(){if(!$s())return;try{no.sessionStorage.removeItem(ro)}catch(e){}}(),e.session=void 0}function Zs(e){return void 0!==e&&Math.random()<e}function Hs(e){if($s())try{no.sessionStorage.setItem(ro,JSON.stringify(e))}catch(t){}}function Ws(e){const t=Date.now();return{id:e.id||(0,h.DM)(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function Gs(e,t){return Zs(e)?"session":!!t&&"buffer"}function Ks(e){let{sessionSampleRate:t,allowBuffering:n,stickySession:r=!1}=e,{previousSessionId:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Gs(t,n),s=Ws({sampled:i,previousSessionId:o});return r&&Hs(s),s}function Vs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:+new Date;return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Xs(e,t){let{maxReplayDuration:n,sessionIdleExpire:r,targetTime:o=Date.now()}=t;return Vs(e.started,n,o)||Vs(e.lastActivity,r,o)}function Ys(e,t){let{sessionIdleExpire:n,maxReplayDuration:r}=t;return!!Xs(e,{sessionIdleExpire:n,maxReplayDuration:r})&&("buffer"!==e.sampled||0!==e.segmentId)}function Js(e,t){let{traceInternals:n,sessionIdleExpire:r,maxReplayDuration:o,previousSessionId:i}=e;const s=t.stickySession&&function(e){if(!$s())return null;try{const e=no.sessionStorage.getItem(ro);return e?Ws(JSON.parse(e)):null}catch(t){return null}}();return s?Ys(s,{sessionIdleExpire:r,maxReplayDuration:o})?Ks(t,{previousSessionId:s.id}):s:Ks(t,{previousSessionId:i})}function Qs(e,t,n){return!!ta(e,t)&&(ea(e,t,n),!0)}async function ea(e,t,n){if(!e.eventBuffer)return null;try{n&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=function(e,t){try{if("function"===typeof t&&function(e){return e.type===mi.Custom}(e))return t(e)}catch(n){return null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!r)return;return await e.eventBuffer.addEvent(r)}catch(o){const t=o&&o instanceof Ns?"addEventSizeExceeded":"addEvent";await e.stop({reason:t});const n=(0,r.s3)();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function ta(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=fs(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||("[Replay] Skipping event with timestamp ".concat(n," because it is after maxReplayDuration"),e.getOptions()._experiments.traceInternals,!1))}function na(e){return!e.type}function ra(e){return"transaction"===e.type}function oa(e){return"replay_event"===e.type}function ia(e){return"feedback"===e.type}function sa(e){const t=function(){const e=(0,r.s3)();if(!e)return!1;const t=e.getTransport();if(!t)return!1;return t.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!e.isEnabled()||!na(n)&&!ra(n))return;const o=r&&r.statusCode;t&&(!o||o<200||o>=300)||(ra(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"===typeof r&&!r(t))return;setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,n))}}function aa(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function ca(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:mi.Custom,timestamp:1e3*t.timestamp,data:{timestamp:t.timestamp,tag:"breadcrumb",payload:{category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function ua(e,t){return"buffer"===e.recordingMode&&(t.message!==oo&&(!(!t.exception||t.type)&&Zs(e.getOptions().errorSampleRate)))}function la(e,t){return t.map((t=>{let{type:n,start:r,end:o,name:i,data:s}=t;const a=e.throttledAddEvent({type:mi.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return"string"===typeof a?Promise.resolve(null):a}))}function da(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(la(e,[n]),!1))))}}function fa(e,t){e.isEnabled()&&(null!==t&&(Jr(t.name,(0,k.Gd)())||e.addUpdate((()=>(la(e,[t]),!0)))))}function ha(e,t){if(e)try{if("string"===typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=xa(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(n){}}function pa(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ma(e){try{if("string"===typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[xa(e)]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0]}function ga(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function ya(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:(0,w.Jr)({method:i,statusCode:s,request:a,response:c})}}function ba(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function va(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:i}=function(e){if(!e||"string"!==typeof e)return{body:e};const t=e.length>io,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,io);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:"".concat(t,"\u2026"),warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(r){}return{body:e}}(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function wa(e,t){return Object.keys(e).reduce(((n,r)=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=e[r]),n}),{})}function xa(e){return new URLSearchParams(e).toString()}function Ea(e,t){const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:no.document.baseURI;if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(no.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return(0,p.U0)(n,t)}async function _a(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=Ea(s,n.networkDetailAllowUrls)&&!Ea(s,n.networkDetailDenyUrls),f=d?function(e,t,n){let{networkCaptureBodies:r,networkRequestHeaders:o}=e;const i=t?function(e,t){if(1===e.length&&"string"!==typeof e[0])return Ia(e[0],t);if(2===e.length)return Ia(e[1],t);return{}}(t,o):{};if(!r)return va(i,n,void 0);const s=ka(t),[a,c]=ma(s),u=va(i,n,a);if(c)return ga(u,c);return u}(n,t.input,u):ba(u),h=await async function(e,t,n,r){let{networkCaptureBodies:o,textEncoder:i,networkResponseHeaders:s}=t;if(!e&&void 0!==r)return ba(r);const a=n?Sa(n.headers,s):{};if(!n||!o&&void 0!==r)return va(a,r,void 0);const[c,u]=await async function(e){const t=function(e){try{return e.clone()}catch(t){}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(e){return await e.text()})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(n){return[void 0,"BODY_PARSE_ERROR"]}}(n),l=function(e,t){let{networkCaptureBodies:n,textEncoder:r,responseBodySize:o,captureDetails:i,headers:s}=t;try{const t=e&&e.length&&void 0===o?ha(e,r):o;return i?va(s,t,n?e:void 0):ba(t)}catch(a){return va(s,o,void 0)}}(c,{networkCaptureBodies:o,textEncoder:i,responseBodySize:r,captureDetails:e,headers:a});if(u)return ga(l,u);return l}(d,n,t.response,l);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:f,response:h}}(e,t,n),o=ya("resource.fetch",r);fa(n.replay,o)}catch(r){}}function ka(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(2===e.length&&"object"===typeof e[1])return e[1].body}function Sa(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function Ia(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Sa(n,t):Array.isArray(n)?{}:wa(n,t):{}}async function Ca(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!a||!Ea(c,n.networkDetailAllowUrls)||Ea(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:l,request:ba(d),response:ba(f)}}const h=a.__sentry_xhr_v3__,p=h?wa(h.request_headers,n.networkRequestHeaders):{},m=wa(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e}),{})}(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?ma(s):[void 0],[b,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return ma(e.response)}catch(n){t.push(n)}return[void 0]}(a):[void 0],w=va(p,d,g),x=va(m,f,b);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:l,request:y?ga(w,y):w,response:v?ga(x,v):x}}(e,t,n),o=ya("resource.xhr",r);fa(n.replay,o)}catch(r){}}function Ta(e){const t=(0,r.s3)();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(!function(e,t,n){const{xhr:r,input:o}=t;if(!r)return;const i=ha(o,n.textEncoder),s=r.getResponseHeader("content-length")?pa(r.getResponseHeader("content-length")):ha(r.response,n.textEncoder);void 0!==i&&(e.data.request_body_size=i),void 0!==s&&(e.data.response_body_size=s)}(t,n,e),Ca(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t,n){const{input:r,response:o}=t,i=ha(r?ka(r):void 0,n.textEncoder),s=o?pa(o.headers.get("content-length")):void 0;void 0!==i&&(e.data.request_body_size=i),void 0!==s&&(e.data.response_body_size=s)}(t,n,e),_a(t,n,e))}catch(r){}}(c,e,t))):(mt(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:o}=e;if(!n)return null;const{method:i,url:s}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:s,data:{method:i,statusCode:o?o.status:void 0}}}(t);fa(e,n)}}(e)),ft(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,o=r.__sentry_xhr_v3__;if(!t||!n||!o)return null;const{method:i,url:s,status_code:a}=o;return void 0===s?null:{type:"resource.xhr",name:s,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}(t);fa(e,n)}}(e)))}catch(n){}}let Aa=null;const Pa=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(Aa===t||!t)return null;if(Aa=t,!function(e){return!!e.category}(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return ks(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"===typeof e)return e.length>so?(n=!0,"".concat(e.slice(0,so),"\u2026")):e;if("object"===typeof e)try{const t=(0,J.Fv)(e,7);return JSON.stringify(t).length>so?(n=!0,"".concat(JSON.stringify(t,null,2).slice(0,so),"\u2026")):t}catch(t){}return e}));return ks({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return ks(t)}(t);n&&ps(e,n)};function Oa(e){const t=(0,k.Gd)().getScope(),n=(0,r.s3)();t.addScopeListener(Pa(e)),it(Ts(e)),q(da(e)),Ta(e);const o=function(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?sa(e):void 0;return Object.assign(((n,r)=>e.isEnabled()?oa(n)?(delete n.breadcrumbs,n):(na(n)||ra(n)||ia(n))&&e.checkAndHandleExpiredSession()?ia(n)?(e.flush(),n.contexts.feedback.replay_id=e.getSessionId(),ca(e,n),n):aa(n,r)&&!e.getOptions()._experiments.captureExceptions?null:((ua(e,n)||"session"===e.recordingMode)&&(n.tags={...n.tags,replayId:e.getSessionId()}),t&&t(n,{statusCode:200}),n):n:n),{id:"Replay"})}(e,!ja(n));n&&n.addEventProcessor?n.addEventProcessor(o):(0,_.cc)(o),ja(n)&&(n.on("afterSendEvent",sa(e)),n.on("createDsc",(t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}})),n.on("startTransaction",(t=>{e.lastTransaction=t})),n.on("finishTransaction",(t=>{e.lastTransaction=t})),n.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&(e.flush(),t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r))})))}function ja(e){return!(!e||!e.on)}function Ma(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Ra(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return;const o=r||!t;t=!0,e.clickDetector&&_s(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Qs(e,n,o))return!0;if(!o)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;Qs(e,function(e){const t=e.getOptions();return{type:mi.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&("[Replay] Updating session start time to earliest event in buffer to ".concat(new Date(t)),e.getOptions()._experiments.traceInternals,e.session.started=t,e.getOptions().stickySession&&Hs(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}async function Ba(e){let{recordingData:t,replayId:n,segmentId:r,eventContext:o,timestamp:i,session:s}=e;const a=function(e){let t,{recordingData:n,headers:r}=e;const o="".concat(JSON.stringify(r),"\n");if("string"===typeof n)t="".concat(o).concat(n);else{const e=(new TextEncoder).encode(o);t=new Uint8Array(e.length+n.length),t.set(e),t.set(n,e.length)}return t}({recordingData:t,headers:{segment_id:r}}),{urls:c,errorIds:u,traceIds:l,initialTimestamp:d}=o,f=(0,k.Gd)(),h=f.getClient(),p=f.getScope(),m=h&&h.getTransport(),g=h&&h.getDsn();if(!h||!m||!g||!s.sampled)return;const y={type:"replay_event",replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:u,trace_ids:l,urls:c,replay_id:n,segment_id:r,replay_type:s.sampled},b=await async function(e){let{client:t,scope:n,replayId:r,event:o}=e;const i={event_id:r,integrations:"object"!==typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit&&t.emit("preprocessEvent",o,i);const s=await(0,ge.R)(t.getOptions(),o,i,n,t);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}({scope:p,client:h,replayId:n,event:y});if(!b)return void h.recordDroppedEvent("event_processor","replay",y);delete b.sdkProcessingMetadata;const v=function(e,t,n,r){return Q(ce(e,ae(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"===typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(b,a,g,h.getOptions().tunnel);let w;try{w=await m.send(v)}catch(E){const e=new Error(oo);try{e.cause=E}catch(_){}throw e}if(!w)return w;if("number"===typeof w.statusCode&&(w.statusCode<200||w.statusCode>=300))throw new Na(w.statusCode);const x=nn({},w);if(tn(x,"replay"))throw new La(x);return w}class Na extends Error{constructor(e){super("Transport returned status code ".concat(e))}}class La extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function Ua(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{count:0,interval:5e3};const{recordingData:n,options:o}=e;if(n.length)try{return await Ba(e),!0}catch(i){if(i instanceof Na||i instanceof La)throw i;if((0,r.v)("Replays",{_retryCount:t.count}),t.count>=3){const e=new Error("".concat(oo," - max retries exceeded"));try{e.cause=i}catch(s){}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await Ua(e,t),n(!0)}catch(i){r(i)}}),t.interval)}))}}const Da="__THROTTLED",Fa="__SKIPPED";class za{getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session","[Replay] Starting replay in ".concat(this.recordingMode," mode"),this._options._experiments.traceInternals,this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");this._options._experiments.traceInternals;const e=Js({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");this._options._experiments.traceInternals;const e=Js({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=ds({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Ra(this),onMutation:this._onMutationHandler})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop(){let{forceFlush:e=!1,reason:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isEnabled){this._isEnabled=!1;try{"[Replay] Stopping Replay".concat(t?" triggered by ".concat(t):""),this._options._experiments.traceInternals,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,qs(this)}catch(n){this._handleException(n)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),this._options._experiments.traceInternals)}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),this._options._experiments.traceInternals)}async sendBufferedReplayOrFlush(){let{continueRecording:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();this._options._experiments.traceInternals,await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Vs(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e="".concat(no.location.pathname).concat(no.location.hash).concat(no.location.search),t="".concat(no.location.origin).concat(e);this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===Da){const e=ks({category:"replay.throttled"});this.addUpdate((()=>!Qs(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastTransaction||(0,k.Gd)().getScope().getTransaction();if(e&&["route","custom"].includes(e.metadata.source))return e.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=zs({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){Bs}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Js({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Ys(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{no.document.addEventListener("visibilitychange",this._handleVisibilityChange),no.addEventListener("blur",this._handleWindowBlur),no.addEventListener("focus",this._handleWindowFocus),no.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Oa(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=Rs(this)}_removeListeners(){try{no.document.removeEventListener("visibilitychange",this._handleVisibilityChange),no.removeEventListener("blur",this._handleWindowBlur),no.removeEventListener("focus",this._handleWindowFocus),no.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===no.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=ks({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=ks({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Ps(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;Xs(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()&&e&&this._createCustomBreadcrumb(e)}_updateUserActivity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastActivity=e}_updateSessionActivity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:mi.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=(t=this.performanceEntries,t.map(js).filter(Boolean)).concat(this.replayPerformanceEntries);var t;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(la(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e&&(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(e){try{return Promise.all(la(e,[Ma(no.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer&&e===this.getSessionId())))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Ua({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});const e=(0,r.s3)();e&&e.recordDroppedEvent("send_error","replay")}}__init5(){var e=this;this._flush=async function(){let{force:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e._isEnabled&&!t)return;if(!e.checkAndHandleExpiredSession())return;if(!e.session)return;const n=e.session.started,r=Date.now(),o=r-n;e._debouncedFlush.cancel();const i=o<e._options.minReplayDuration,s=o>e._options.maxReplayDuration+5e3;if(i||s)return"[Replay] Session duration (".concat(Math.floor(o/1e3),"s) is too ").concat(i?"short":"long",", not sending replay."),e._options._experiments.traceInternals,void(i&&e._debouncedFlush());const a=e.eventBuffer;if(a&&0===e.session.segmentId&&!a.hasCheckout&&e._options._experiments.traceInternals,!e._flushLock)return e._flushLock=e._runFlush(),await e._flushLock,void(e._flushLock=void 0);try{await e._flushLock}catch(c){}finally{e._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Hs(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=ks({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}constructor({options:e,recordingOptions:t}){za.prototype.__init.call(this),za.prototype.__init2.call(this),za.prototype.__init3.call(this),za.prototype.__init4.call(this),za.prototype.__init5.call(this),za.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,o,i;const s=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function u(){return o&&clearTimeout(o),o=setTimeout(a,t),s&&void 0===i&&(i=setTimeout(a,s)),r}return u.cancel=c,u.flush=function(){return void 0!==o||void 0!==i?a():r},u}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,n){const r=new Map,o=e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))},i=()=>[...r.values()].reduce(((e,t)=>e+t),0);let s=!1;return function(){for(var n=arguments.length,a=new Array(n),c=0;c<n;c++)a[c]=arguments[c];const u=Math.floor(Date.now()/1e3);if(o(u),i()>=t){const e=s;return s=!0,e?Fa:Da}s=!1;const l=r.get(u)||0;return r.set(u,l+1),e(...a)}}(((e,t)=>function(e,t,n){return ta(e,t)?ea(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new ws(this,o))}}function $a(e,t,n,r){const o=[...e,..."string"===typeof r?r.split(","):[],...t];return"undefined"!==typeof n&&("string"===typeof n&&o.push(".".concat(n)),(0,f.Cf)((()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")}))),o.join(",")}const qa='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Za=["content-length","content-type","accept"];let Ha=!1;class Wa{static __initStatic(){this.id="Replay"}get _isInitialized(){return Ha}set _isInitialized(e){Ha=e}setupOnce(){to()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const e=function(e){const t=(0,r.s3)(),n=t&&t.getOptions(),o={sessionSampleRate:0,errorSampleRate:0,...(0,w.Jr)(e)};if(!n)return(0,f.Cf)((()=>{console.warn("SDK client is not available.")})),o;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&(0,f.Cf)((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));"number"===typeof n.replaysSessionSampleRate&&(o.sessionSampleRate=n.replaysSessionSampleRate);"number"===typeof n.replaysOnErrorSampleRate&&(o.errorSampleRate=n.replaysOnErrorSampleRate);return o}(this._initialOptions);this._replay=new za({options:e,recordingOptions:this._recordingOptions})}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:i=!0,workerUrl:s,_experiments:a={},sessionSampleRate:c,errorSampleRate:u,maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:h=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:b=[],networkCaptureBodies:v=!0,networkRequestHeaders:w=[],networkResponseHeaders:x=[],mask:E=[],maskAttributes:_=["title","placeholder"],unmask:k=[],block:S=[],unblock:I=[],ignore:C=[],maskFn:T,beforeAddRecordingEvent:A,beforeErrorSampling:P,blockClass:O,blockSelector:j,maskInputOptions:M,maskTextClass:R,maskTextSelector:B,ignoreClass:N}={}){this.name=Wa.id;const L=function(e){let{mask:t,unmask:n,block:r,unblock:o,ignore:i,blockClass:s,blockSelector:a,maskTextClass:c,maskTextSelector:u,ignoreClass:l}=e;const d={maskTextSelector:$a(t,[".sentry-mask","[data-sentry-mask]"],c,u),unmaskTextSelector:$a(n,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:$a(r,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,a),unblockSelector:$a(o,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:$a(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(d.blockClass=s),c instanceof RegExp&&(d.maskTextClass=c),d}({mask:E,unmask:k,block:S,unblock:I,ignore:C,blockClass:O,blockSelector:j,maskTextClass:R,maskTextSelector:B,ignoreClass:N});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{...M||{},password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>function(e){let{el:t,key:n,maskAttributes:r,maskAllText:o,privacyOptions:i,value:s}=e;return o?i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)?s:r.includes(n)||"value"===n&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:_,maskAllText:l,privacyOptions:L,key:e,value:t,el:n}),...L,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(t){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,co),stickySession:o,sessionSampleRate:c,errorSampleRate:u,useCompression:i,workerUrl:s,blockAllMedia:f,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:h,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:b,networkCaptureBodies:v,networkRequestHeaders:Ga(w),networkResponseHeaders:Ga(x),beforeAddRecordingEvent:A,beforeErrorSampling:P,_experiments:a},"number"===typeof c&&(console.warn("[Replay] You are passing `sessionSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysSessionSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ".concat(c," })")),this._initialOptions.sessionSampleRate=c),"number"===typeof u&&(console.warn("[Replay] You are passing `errorSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysOnErrorSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ".concat(u," })")),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?"".concat(this._recordingOptions.blockSelector,",").concat(qa):qa),this._isInitialized&&to())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}}function Ga(e){return[...Za,...e.map((e=>e.toLowerCase()))]}Wa.__initStatic();var Ka=window;Ka.__sentryRewritesTunnelPath__="/monitoring",Ka.SENTRY_RELEASE={id:"7559edcec41de28704aced9fb1033ec0c741f824"},Ka.__sentryBasePath=void 0,Ka.__rewriteFramesAssetPrefixPath__="",function(e){const t={environment:Br(!0)||"production",...e};!function(e){const t=Xr.__sentryRewritesTunnelPath__;if(t&&e.dsn){const n=V(e.dsn);if(!n)return;const r=n.host.match(/^o(\d+)\.ingest\.sentry\.io$/);if(r){const o=r[1],i="".concat(t,"?o=").concat(o,"&p=").concat(n.projectId);e.tunnel=i}}}(t),function(e,t){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.nextjs",packages:t.map((e=>({name:"".concat("npm:@sentry/").concat(e),version:d}))),version:d}}(t,["nextjs","react"]),function(e){let t=e.integrations||[];const n=Yr.__rewriteFramesAssetPrefixPath__||"",r=new l({iteratee:e=>{try{const{origin:t}=new URL(e.filename);e.filename=function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i((function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return n.call(t,...r)})),t=void 0)}return n}([e,"access",e=>e.filename,"optionalAccess",e=>e.replace,"call",e=>e(t,"app://"),"access",e=>e.replace,"call",e=>e(n,"")])}catch(t){}return e.filename&&e.filename.startsWith("app:///_next")&&(e.filename=decodeURI(e.filename)),e.filename&&e.filename.match(/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/)&&(e.in_app=!1),e}});if(t=Or(r,t),("undefined"===typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&o(e)){t=Or(new Tr({tracingOrigins:[...Er.tracingOrigins,/^(api\/)/],routingInstrumentation:Vr}),t,{"options.routingInstrumentation":Vr})}e.integrations=t}(t),pn(t),(0,r.e)((e=>{e.setTag("runtime","browser");const t=e=>"transaction"===e.type&&"/404"===e.transaction?null:e;t.id="NextClient404Filter",e.addEventProcessor(t)}))}({dsn:"https://1923b01118764684825bc3d70dcdda25@o4505405289201664.ingest.sentry.io/4505405292806144",tracesSampleRate:1,debug:!1,replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,integrations:[new Wa({maskAllText:!0,blockAllMedia:!0})]})},56212:function(e,t,n){"use strict";n.d(t,{Rt:function(){return i},l4:function(){return a},qT:function(){return c}});var r=n(22135);const o=(0,n(90021).Rf)();function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,a=0;const c=" > ",u=c.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<r&&(l=s(n,d),!("html"===l||i>1&&a+o.length*u+l.length>=f));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(c)}catch(n){return"<unknown>"}}function s(e,t){const n=e,o=[];let i,s,a,c,u;if(!n||!n.tagName)return"";o.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{o.push("[".concat(e[0],'="').concat(e[1],'"]'))}));else if(n.id&&o.push("#".concat(n.id)),i=n.className,i&&(0,r.HD)(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)o.push(".".concat(s[u]));const d=["aria-label","type","name","title","alt"];for(u=0;u<d.length;u++)a=d[u],c=n.getAttribute(a),c&&o.push("[".concat(a,'="').concat(c,'"]'));return o.join("")}function a(){try{return o.document.location.href}catch(e){return""}}function c(e){return o.document&&o.document.querySelector?o.document.querySelector(e):null}},47708:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});const r=!1},43772:function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(t,{S:function(){return o},n:function(){return r}})},22135:function(e,t,n){"use strict";n.d(t,{Cy:function(){return g},HD:function(){return u},J8:function(){return m},Kj:function(){return p},PO:function(){return d},TX:function(){return a},V9:function(){return b},VW:function(){return s},VZ:function(){return o},cO:function(){return f},fm:function(){return c},i2:function(){return y},kK:function(){return h},pt:function(){return l},y1:function(){return v}});const r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return b(e,Error)}}function i(e,t){return r.call(e)==="[object ".concat(t,"]")}function s(e){return i(e,"ErrorEvent")}function a(e){return i(e,"DOMError")}function c(e){return i(e,"DOMException")}function u(e){return i(e,"String")}function l(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function d(e){return i(e,"Object")}function f(e){return"undefined"!==typeof Event&&b(e,Event)}function h(e){return"undefined"!==typeof Element&&b(e,Element)}function p(e){return i(e,"RegExp")}function m(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function g(e){return d(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"===typeof e&&e!==e}function b(e,t){try{return e instanceof t}catch(n){return!1}}function v(e){return!("object"!==typeof e||null===e||!e.__isVue&&!e._isVue)}},25120:function(e,t,n){"use strict";n.d(t,{Cf:function(){return c},LD:function(){return a},RU:function(){return s},kg:function(){return u}});var r=n(47708),o=n(90021);const i="Sentry Logger ",s=["debug","info","warn","error","log","assert","trace"],a={};function c(e){if(!("console"in o.n2))return e();const t=o.n2.console,n={},r=Object.keys(a);r.forEach((e=>{const r=a[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const u=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return r.X?s.forEach((n=>{t[n]=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];e&&c((()=>{o.n2.console[n]("".concat(i,"[").concat(n,"]:"),...r)}))}})):s.forEach((e=>{t[e]=()=>{}})),t}()},78002:function(e,t,n){"use strict";n.d(t,{DM:function(){return i},Db:function(){return c},EG:function(){return u},YO:function(){return l},jH:function(){return a},lE:function(){return d}});var r=n(49432),o=n(90021);function i(){const e=o.n2,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(r){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function s(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function a(e){const{message:t,event_id:n}=e;if(t)return t;const r=s(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function c(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function u(e,t){const n=s(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function l(e){if(e&&e.__sentry_captured__)return!0;try{(0,r.xp)(e,"__sentry_captured__",!0)}catch(t){}return!1}function d(e){return Array.isArray(e)?e:[e]}},70704:function(e,t,n){"use strict";n.d(t,{KV:function(){return i},l$:function(){return s}});var r=n(43772);e=n.hmd(e);var o=n(34155);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof o?o:0)}function s(e,t){return e.require(t)}},679:function(e,t,n){"use strict";n.d(t,{Fv:function(){return a},Qy:function(){return c}});var r=n(22135);function o(){const e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++){if(t[e]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}var i=n(49432),s=n(59598);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return u("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400;const r=a(e,t);return d(r)>n?c(e,t-1,n):r}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o();const[c,d]=a;if(null==t||["number","boolean","string"].includes(typeof t)&&!(0,r.i2)(t))return t;const f=l(e,t);if(!f.startsWith("[object "))return f;if(t.__sentry_skip_normalization__)return t;const h="number"===typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===h)return f.replace("object ","");if(c(t))return"[Circular ~]";const p=t;if(p&&"function"===typeof p.toJSON)try{return u("",p.toJSON(),h-1,s,a)}catch(b){}const m=Array.isArray(t)?[]:{};let g=0;const y=(0,i.Sh)(t);for(const r in y){if(!Object.prototype.hasOwnProperty.call(y,r))continue;if(g>=s){m[r]="[MaxProperties ~]";break}const e=y[r];m[r]=u(r,e,h-1,s,a),g++}return d(t),m}function l(e,t){try{if("domain"===e&&t&&"object"===typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!==typeof n.g&&t===n.g)return"[Global]";if(t===window)return"[Window]";if("undefined"!==typeof document&&t===document)return"[Document]";if((0,r.y1)(t))return"[VueViewModel]";if((0,r.Cy)(t))return"[SyntheticEvent]";if("number"===typeof t&&t!==t)return"[NaN]";if("function"===typeof t)return"[Function: ".concat((0,s.$P)(t),"]");if("symbol"===typeof t)return"[".concat(String(t),"]");if("bigint"===typeof t)return"[BigInt: ".concat(String(t),"]");const o=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(o)?"[HTMLElement: ".concat(o,"]"):"[object ".concat(o,"]")}catch(o){return"**non-serializable** (".concat(o,")")}}function d(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}},49432:function(e,t,n){"use strict";n.d(t,{$Q:function(){return l},HK:function(){return d},Jr:function(){return y},Sh:function(){return h},_j:function(){return f},hl:function(){return c},xp:function(){return u},zf:function(){return g}});var r=n(56212),o=n(47708),i=n(22135),s=n(25120),a=n(35086);function c(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"===typeof o&&l(o,r),e[t]=o}function u(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){o.X&&s.kg.log('Failed to add non-enumerable property "'.concat(t,'" to object'),e)}}function l(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}catch(n){}}function d(e){return e.__sentry_original__}function f(e){return Object.keys(e).map((t=>"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t])))).join("&")}function h(e){if((0,i.VZ)(e))return{message:e.message,name:e.name,stack:e.stack,...m(e)};if((0,i.cO)(e)){const t={type:e.type,target:p(e.target),currentTarget:p(e.currentTarget),...m(e)};return"undefined"!==typeof CustomEvent&&(0,i.V9)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function p(e){try{return(0,i.kK)(e)?(0,r.Rt)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function m(e){if("object"===typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const n=Object.keys(h(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return(0,a.$G)(n[0],t);for(let r=n.length;r>0;r--){const e=n.slice(0,r).join(", ");if(!(e.length>t))return r===n.length?e:(0,a.$G)(e,t)}return""}function y(e){return b(e,new Map)}function b(e,t){if((0,i.PO)(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const o of Object.keys(e))"undefined"!==typeof e[o]&&(r[o]=b(e[o],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(b(e,t))})),r}return e}},59598:function(e,t,n){"use strict";n.d(t,{$P:function(){return u},Sq:function(){return s},pE:function(){return i}});const r=/\(error: (.*)\)/,o=/captureMessage|captureException/;function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[],i=e.split("\n");for(let s=t;s<i.length;s++){const e=i[s];if(e.length>1024)continue;const t=r.test(e)?e.replace(r,"$1"):e;if(!t.match(/\S*Error: /)){for(const e of o){const r=e(t);if(r){n.push(r);break}}if(n.length>=50)break}}return a(n)}}function s(e){return Array.isArray(e)?i(...e):e}function a(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),o.test(t[t.length-1].function||"")&&(t.pop(),o.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}const c="<anonymous>";function u(e){try{return e&&"function"===typeof e&&e.name||c}catch(t){return c}}},35086:function(e,t,n){"use strict";n.d(t,{$G:function(){return o},U0:function(){return a},nK:function(){return i}});var r=n(22135);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:"".concat(e.slice(0,t),"...")}function i(e,t){if(!Array.isArray(e))return"";const n=[];for(let i=0;i<e.length;i++){const t=e[i];try{(0,r.y1)(t)?n.push("[VueViewModel]"):n.push(String(t))}catch(o){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!(0,r.HD)(e)&&((0,r.Kj)(t)?t.test(e):!!(0,r.HD)(t)&&(n?e===t:e.includes(t)))}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.some((t=>s(e,t,n)))}},37884:function(e,t,n){"use strict";n.d(t,{$2:function(){return s},WD:function(){return i},cW:function(){return a}});var r,o=n(22135);function i(e){return new a((t=>{t(e)}))}function s(e){return new a(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(r||(r={}));class a{then(e,t){return new a(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(o){r(o)}else n(t)},e=>{if(t)try{n(t(e))}catch(o){r(o)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new a(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===r.PENDING&&((0,o.J8)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)}))}}constructor(e){a.prototype.__init.call(this),a.prototype.__init2.call(this),a.prototype.__init3.call(this),a.prototype.__init4.call(this),this._state=r.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}}},28754:function(e,t,n){"use strict";n.d(t,{Z1:function(){return f},ph:function(){return l},yW:function(){return u}});var r=n(70704),o=n(90021);e=n.hmd(e);const i=(0,o.Rf)(),s={nowSeconds:()=>Date.now()/1e3};const a=(0,r.KV)()?function(){try{return(0,r.l$)(e,"perf_hooks").performance}catch(t){return}}():function(){const{performance:e}=i;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),c=void 0===a?s:{nowSeconds:()=>(a.timeOrigin+a.now())/1e3},u=s.nowSeconds.bind(s),l=c.nowSeconds.bind(c);let d;const f=(()=>{const{performance:e}=i;if(!e||!e.now)return void(d="none");const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=o<t,a=e.timing&&e.timing.navigationStart,c="number"===typeof a?Math.abs(a+n-r):t;return s||c<t?o<=c?(d="timeOrigin",e.timeOrigin):(d="navigationStart",a):(d="dateNow",r)})()},90021:function(e,t,n){"use strict";function r(e){return e&&e.Math==Math?e:void 0}n.d(t,{Rf:function(){return i},YO:function(){return s},n2:function(){return o}});const o="object"==typeof globalThis&&r(globalThis)||r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function i(){return o}function s(e,t,n){const r=n||o,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}},13991:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return c},ACTION_REFRESH:function(){return n},ACTION_NAVIGATE:function(){return r},ACTION_RESTORE:function(){return o},ACTION_SERVER_PATCH:function(){return i},ACTION_PREFETCH:function(){return s},ACTION_FAST_REFRESH:function(){return a}});const n="refresh",r="navigate",o="restore",i="server-patch",s="prefetch",a="fast-refresh";var c;!function(e){e.AUTO="auto",e.FULL="full",e.TEMPORARY="temporary"}(c||(c={})),("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81516:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}});function n(e,t,n,r){return!1}("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});const r=n(38754)._(n(67294)),o=n(14532),i=n(83353),s=n(61410),a=n(79064),c=n(370),u=n(69955),l=n(24224),d=n(80508),f=n(81516),h=n(64266),p=n(13991),m=new Set;function g(e,t,n,r,o,s){if(!s&&!(0,i.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){const o=t+"%"+n+"%"+("undefined"!==typeof r.locale?r.locale:"locale"in e?e.locale:void 0);if(m.has(o))return;m.add(o)}const a=s?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(a).catch((e=>{0}))}function y(e){return"string"===typeof e?e:(0,s.formatUrl)(e)}const b=r.default.forwardRef((function(e,t){let n;const{href:s,as:m,children:b,prefetch:v=null,passHref:w,replace:x,shallow:E,scroll:_,locale:k,onClick:S,onMouseEnter:I,onTouchStart:C,legacyBehavior:T=!1,...A}=e;n=b,!T||"string"!==typeof n&&"number"!==typeof n||(n=r.default.createElement("a",null,n));const P=!1!==v,O=null===v?p.PrefetchKind.AUTO:p.PrefetchKind.FULL,j=r.default.useContext(u.RouterContext),M=r.default.useContext(l.AppRouterContext),R=null!=j?j:M,B=!j;const{href:N,as:L}=r.default.useMemo((()=>{if(!j){const e=y(s);return{href:e,as:m?y(m):e}}const[e,t]=(0,o.resolveHref)(j,s,!0);return{href:e,as:m?(0,o.resolveHref)(j,m):t||e}}),[j,s,m]),U=r.default.useRef(N),D=r.default.useRef(L);let F;T&&(F=r.default.Children.only(n));const z=T?F&&"object"===typeof F&&F.ref:t,[$,q,Z]=(0,d.useIntersection)({rootMargin:"200px"}),H=r.default.useCallback((e=>{D.current===L&&U.current===N||(Z(),D.current=L,U.current=N),$(e),z&&("function"===typeof z?z(e):"object"===typeof z&&(z.current=e))}),[L,z,N,Z,$]);r.default.useEffect((()=>{R&&q&&P&&g(R,N,L,{locale:k},{kind:O},B)}),[L,N,q,k,P,null==j?void 0:j.locale,R,B,O]);const W={ref:H,onClick(e){T||"function"!==typeof S||S(e),T&&F.props&&"function"===typeof F.props.onClick&&F.props.onClick(e),R&&(e.defaultPrevented||function(e,t,n,o,s,a,c,u,l,d){const{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){const t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!l&&!(0,i.isLocalURL)(n)))return;e.preventDefault();const h=()=>{"beforePopState"in t?t[s?"replace":"push"](n,o,{shallow:a,locale:u,scroll:c}):t[s?"replace":"push"](o||n,{forceOptimisticNavigation:!d})};l?r.default.startTransition(h):h()}(e,R,N,L,x,E,_,k,B,P))},onMouseEnter(e){T||"function"!==typeof I||I(e),T&&F.props&&"function"===typeof F.props.onMouseEnter&&F.props.onMouseEnter(e),R&&(!P&&B||g(R,N,L,{locale:k,priority:!0,bypassPrefetchedCheck:!0},{kind:O},B))},onTouchStart(e){T||"function"!==typeof C||C(e),T&&F.props&&"function"===typeof F.props.onTouchStart&&F.props.onTouchStart(e),R&&(!P&&B||g(R,N,L,{locale:k,priority:!0,bypassPrefetchedCheck:!0},{kind:O},B))}};if((0,a.isAbsoluteUrl)(L))W.href=L;else if(!T||w||"a"===F.type&&!("href"in F.props)){const e="undefined"!==typeof k?k:null==j?void 0:j.locale,t=(null==j?void 0:j.isLocaleDomain)&&(0,f.getDomainLocale)(L,e,null==j?void 0:j.locales,null==j?void 0:j.domainLocales);W.href=t||(0,h.addBasePath)((0,c.addLocale)(L,e,null==j?void 0:j.defaultLocale))}return T?r.default.cloneElement(F,W):r.default.createElement("a",{...A,...W},n)}));("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80508:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=n(67294),o=n(10029),i="function"===typeof IntersectionObserver,s=new Map,a=[];function c(e,t,n){const{id:r,observer:o,elements:i}=function(e){const t={root:e.root||null,margin:e.rootMargin||""},n=a.find((e=>e.root===t.root&&e.margin===t.margin));let r;if(n&&(r=s.get(n),r))return r;const o=new Map,i=new IntersectionObserver((e=>{e.forEach((e=>{const t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)}))}),e);return r={id:t,observer:i,elements:o},a.push(t),s.set(t,r),r}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),s.delete(r);const e=a.findIndex((e=>e.root===r.root&&e.margin===r.margin));e>-1&&a.splice(e,1)}}}function u(e){let{rootRef:t,rootMargin:n,disabled:s}=e;const a=s||!i,[u,l]=(0,r.useState)(!1),d=(0,r.useRef)(null),f=(0,r.useCallback)((e=>{d.current=e}),[]);(0,r.useEffect)((()=>{if(i){if(a||u)return;const e=d.current;if(e&&e.tagName){return c(e,(e=>e&&l(e)),{root:null==t?void 0:t.current,rootMargin:n})}}else if(!u){const e=(0,o.requestIdleCallback)((()=>l(!0)));return()=>(0,o.cancelIdleCallback)(e)}}),[a,n,t,u,d.current]);const h=(0,r.useCallback)((()=>{l(!1)}),[]);return[f,u,h]}("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95677:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{noSSR:function(){return s},default:function(){return a}});const r=n(38754),o=(n(67294),r._(n(8976)));function i(e){return{default:(null==e?void 0:e.default)||e}}function s(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let n=o.default,r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"===typeof e?r.loader=e:"object"===typeof e&&(r={...r,...e}),r={...r,...t};const a=r.loader;return r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!==typeof r.ssr||r.ssr?n({...r,loader:()=>null!=a?a().then(i):Promise.resolve(i((()=>null)))}):(delete r.webpack,delete r.modules,s(n,r))}("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return r}});const r=n(38754)._(n(67294)).default.createContext(null)},8976:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});const r=n(38754)._(n(67294)),o=n(92254);const i=[],s=[];let a=!1;function c(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((e=>(n.loading=!1,n.loaded=e,e))).catch((e=>{throw n.loading=!1,n.error=e,e})),n}function u(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),i=null;function c(){if(!i){const t=new l(e,n);i={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return i.promise()}if(!a){const e=n.webpack?n.webpack():n.modules;e&&s.push((t=>{for(const n of e)if(-1!==t.indexOf(n))return c()}))}function u(e,t){!function(){c();const e=r.default.useContext(o.LoadableContext);e&&Array.isArray(n.modules)&&n.modules.forEach((t=>{e(t)}))}();const s=r.default.useSyncExternalStore(i.subscribe,i.getCurrentValue,i.getCurrentValue);return r.default.useImperativeHandle(t,(()=>({retry:i.retry})),[]),r.default.useMemo((()=>{return s.loading||s.error?r.default.createElement(n.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:i.retry}):s.loaded?r.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null;var t}),[e,s])}return u.preload=()=>c(),u.displayName="LoadableComponent",r.default.forwardRef(u)}class l{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:e,_opts:t}=this;e.loading&&("number"===typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout((()=>{this._update({pastDelay:!0})}),t.delay)),"number"===typeof t.timeout&&(this._timeout=setTimeout((()=>{this._update({timedOut:!0})}),t.timeout))),this._res.promise.then((()=>{this._update({}),this._clearTimeouts()})).catch((e=>{this._update({}),this._clearTimeouts()})),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach((e=>e()))}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function d(e){return u(c,e)}function f(e,t){let n=[];for(;e.length;){let r=e.pop();n.push(r(t))}return Promise.all(n).then((()=>{if(e.length)return f(e,t)}))}d.preloadAll=()=>new Promise(((e,t)=>{f(i).then(e,t)})),d.preloadReady=e=>(void 0===e&&(e=[]),new Promise((t=>{const n=()=>(a=!0,t());f(s,e).then(n,n)}))),window.__NEXT_PRELOADREADY=d.preloadReady;const h=d},13992:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ke}});var r=n(85893),o=(n(18619),n(50019),n(71176)),i=n(92219);function s(){return"undefined"!==typeof navigator&&/android/i.test(navigator.userAgent)}function a(){return"undefined"!==typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!==typeof navigator&&(/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)}function c(){return s()||a()}var u=n(15861),l=n(13854);async function d(e,t){const n=await e.getProvider();return"2"===t?new Promise((e=>n.once("display_uri",e))):n.connector.uri}var f=new Map;function h({chains:e,options:t={},projectId:n,version:r="2"}){const o="21fef48091f12692cad574a6f7753643";if("2"===r){if(!n||""===n)throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");"YOUR_PROJECT_ID"!==n&&n!==o||console.warn("Invalid projectId. Please create a unique WalletConnect Cloud projectId for your dApp https://www.rainbowkit.com/docs/installation#configure")}const i={chains:e,options:"1"===r?{qrcode:!1,...t}:{projectId:"YOUR_PROJECT_ID"===n?o:n,showQrModal:!1,...t}},s=JSON.stringify(i),a=f.get(s);return null!=a?a:function(e,t){const n="1"===e?new l.O(t):new u.z(t);return f.set(JSON.stringify(t),n),n}(r,i)}var p=n(25078);function m(e){return!!(null==e?void 0:e.isMetaMask)&&(!(e.isBraveWallet&&!e._events&&!e._state)&&(!e.isApexWallet&&(!e.isAvalanche&&(!e.isBackpack&&(!e.isBifrost&&(!e.isBitKeep&&(!e.isBitski&&(!e.isBlockWallet&&(!e.isCoinbaseWallet&&(!e.isDawn&&(!e.isEnkrypt&&(!e.isExodus&&(!e.isFrame&&(!e.isFrontier&&(!e.isGamestop&&(!e.isHyperPay&&(!e.isImToken&&(!e.isKuCoinWallet&&(!e.isMathWallet&&(!e.isOkxWallet&&!e.isOKExWallet&&(!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&(!e.isOpera&&(!e.isPhantom&&(!e.isPortal&&(!e.isRabby&&(!e.isRainbow&&(!e.isStatus&&(!e.isTalisman&&(!e.isTally&&(!e.isTokenPocket&&(!e.isTokenary&&(!e.isTrust&&!e.isTrustWallet&&(!e.isXDEFI&&(!e.isZeal&&!e.isZerion))))))))))))))))))))))))))))))))))}function g(e){if("undefined"===typeof window||"undefined"===typeof window.ethereum)return;const t=window.ethereum.providers;return t?t.find((t=>t[e])):window.ethereum[e]?window.ethereum:void 0}function y(e){return Boolean(g(e))}function b({chains:e,flag:t,options:n}){return new i._({chains:e,options:{getProvider:()=>function(e){if("undefined"===typeof window||"undefined"===typeof window.ethereum)return;const t=window.ethereum.providers;return g(e)||("undefined"!==typeof t&&t.length>0?t[0]:window.ethereum)}(t),...n}})}var v=n(90935),w=n(16247),x=n(14990),E=n(11227),_=n.n(E),k=n(11752),S=n.n(k),I=n(5152),C=n.n(I),T=n(11163),A=n(2962),P=n(67294),O=n(65049),j=n(34789);var M=n(66403),R=n(86164);const B=(0,R.a)({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),N=(0,R.a)({id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),L=(0,R.a)({id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),U=(0,R.a)({id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),D=(0,R.a)({id:9001,name:"Evmos",network:"evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]},public:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),F=(0,R.a)({id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),z=(0,R.a)({id:2e3,name:"Dogechain",network:"dogechain",nativeCurrency:{decimals:18,name:"Dogechain",symbol:"DC"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]},public:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{etherscan:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog"},default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog"}}}),$=(0,R.a)({id:66,name:"OKC",network:"okc",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]},public:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),q=(0,R.a)({id:369,network:"pulsechain",name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]},public:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.pulsechain.com"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Z=(0,R.a)({id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}});var H=n(95946),W=n(43310),G=n(6073),K=n(30866);const V={block:(0,W.G)({format(e){const t=e.transactions?.map((e=>{if("string"===typeof e)return e;const t=(0,G.Tr)(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,H.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:(0,G.y_)({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,H.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:(0,K.d)({format:e=>({l1GasPrice:e.l1GasPrice?(0,H.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,H.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,H.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},X=(0,R.a)({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:V}),Y=(0,R.a)({id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-mainnet.g.alchemy.com/v2"],webSocket:["wss://base-mainnet.g.alchemy.com/v2"]},infura:{http:["https://base-mainnet.infura.io/v3"],webSocket:["wss://base-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}},{formatters:V}),J=(0,R.a)({id:17e3,network:"holesky",name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77}},testnet:!0}),Q=(0,R.a)({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0}),ee=(0,R.a)({id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/polygon_mumbai"]},public:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),te=(0,R.a)({id:97,name:"Binance Smart Chain Testnet",network:"bsc-testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]},public:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://testnet.bscscan.com"},default:{name:"BscScan",url:"https://testnet.bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),ne=(0,R.a)({id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),re=(0,R.a)({id:1287,name:"Moonbase Alpha",network:"moonbase-alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]},public:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonbase.moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),oe=(0,R.a)({id:9e3,name:"Evmos Testnet",network:"evmos-testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]},public:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),ie=(0,R.a)({id:4002,name:"Fantom Testnet",network:"fantom-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]},public:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://testnet.ftmscan.com"},default:{name:"FTMScan",url:"https://testnet.ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}}}),se=(0,R.a)({id:943,network:"pulsechainV4",name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]},public:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var ae=n(1757);const ce=[M.R,B,N,L,U,D,F,z,$,q,{id:10001,name:"Ethereum PoW",network:"ethpow",nativeCurrency:{decimals:18,name:"ETHW",symbol:"ETHW"},rpcUrls:{public:{http:["https://mainnet.ethereumpow.org"]},default:{http:["https://mainnet.ethereumpow.org"]}},blockExplorers:{etherscan:{name:"EthPoW Explorer",url:"https://www.oklink.com/en/ethw"},default:{name:"EthPoW Explore",url:"https://www.oklink.com/en/ethw"}},contracts:{}},Z,X,Y,J,Q,ee,te,ne,re,oe,ie,se],{publicRuntimeConfig:ue}=S()(),{isTestnet:le}=ue,de=(0,ae.Z)({config:ue}),fe=Object.values(de).filter((e=>!!e.isTestnet===!!le)).map((e=>Number(e.chainId))),he=ce.filter((e=>fe.includes(e.id)));var pe=n(88416),me=n(83330),ge=n(11345),ye=n(75334),be=n(98695),ve=n(64120),we=n(91742),xe=n(72606),Ee="#1A1B1F",_e={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:Ee},orange:{accentColor:"#FF983D",accentColorForeground:Ee},pink:{accentColor:"#FF7AB8",accentColorForeground:Ee},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},ke=_e.blue,Se=({accentColor:e=ke.accentColor,accentColorForeground:t=ke.accentColorForeground,...n}={})=>({...(0,xe.w)(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:Ee,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});Se.accentColors=_e;var Ie=n(34361);const Ce=(0,P.createContext)({}),Te=e=>{let{children:t,chains:n,...i}=e;const{mode:s}=(0,P.useContext)(we.N),a="dark"===s?Se({overlayBlur:"none"}):(0,Ie.W)({overlayBlur:"none"});return(0,r.jsx)(Ce.Provider,{value:{},children:(0,r.jsx)(o.pj,{chains:n,coolMode:!0,theme:a,...i,children:t})})};var Ae=n(13033),Pe=n(63179),Oe=n(76909);const je={defaultTitle:"XEN Crypto",description:"XEN Crypto - Cryptocurrency for the masses",openGraph:{type:"website",title:"XEN Crypto",description:"XEN Crypto - Cryptocurrency for the masses",locale:"en-US",site_name:"XEN Crypto",images:[{url:"https://xen.network/favicon.ico",type:"image/png"}]},twitter:{handle:"@XEN_Crypto",site:"@XEN_Crypto",cardType:"summary"}};var Me=n(40663),Re=n(34155);n(22985);const{publicRuntimeConfig:Be}=S()();_().enable(Be.debug);const Ne=(0,ae.Z)({config:Be}),Le=e=>Object.values(Ne).find((t=>Number(t.chainId)===e)),Ue=he,De=null===Be||void 0===Be?void 0:Be.walletConnectApiKey,{connectors:Fe}=(0,o.wo)({appName:"Xen Network",projectId:De,chains:Ue}),ze=(0,o.a3)([{groupName:"Recommended",wallets:[(({chains:e,...t})=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await n.e(6577).then(n.bind(n,26577))).default,iconBackground:"#fff",hidden:({wallets:e})=>e.some((e=>e.installed&&e.name===e.connector.name&&(e.connector instanceof i._||"coinbase"===e.id))),createConnector:()=>({connector:new i._({chains:e,options:t})})}))({chains:Ue}),(({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...i})=>{var c,u;const l="undefined"!==typeof window&&(null==(c=window.ethereum)?void 0:c.providers),f="undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&((null==(u=window.ethereum.providers)?void 0:u.some(m))||window.ethereum.isMetaMask),g=!f;return{id:"metaMask",name:"MetaMask",iconUrl:async()=>(await n.e(1725).then(n.bind(n,91725))).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:g?void 0:f,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},createConnector:()=>{const n=g?h({projectId:t,chains:e,version:o,options:r}):new p.i({chains:e,options:{getProvider:()=>Array.isArray(l)&&l.find(m)||("undefined"!==typeof window?window.ethereum:void 0),...i}}),c=async()=>{const e=await d(n,o);return s()?e:a()?`metamask://wc?uri=${encodeURIComponent(e)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`};return{connector:n,mobile:{getUri:g?c:void 0},qrCode:g?{getUri:c,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}}}}}})({projectId:De,chains:Ue}),(({chains:e,...t})=>{var r;return{id:"phantom",name:"Phantom",iconUrl:async()=>(await n.e(1790).then(n.bind(n,1790))).default,iconBackground:"#9A8AEE",installed:"undefined"!==typeof window&&!!(null==(r=window.phantom)?void 0:r.ethereum)||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=app.phantom",ios:"https://apps.apple.com/app/phantom-solana-wallet/1598432977",mobile:"https://phantom.app/download",qrCode:"https://phantom.app/download",chrome:"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa",firefox:"https://addons.mozilla.org/firefox/addon/phantom-app/",browserExtension:"https://phantom.app/download"},createConnector:()=>({connector:new i._({chains:e,options:{getProvider:()=>{var e;return"undefined"!==typeof window?null==(e=window.phantom)?void 0:e.ethereum:void 0},...t}}),extension:{instructions:{steps:[{description:"wallet_connectors.phantom.extension.step1.description",step:"install",title:"wallet_connectors.phantom.extension.step1.title"},{description:"wallet_connectors.phantom.extension.step2.description",step:"create",title:"wallet_connectors.phantom.extension.step2.title"},{description:"wallet_connectors.phantom.extension.step3.description",step:"refresh",title:"wallet_connectors.phantom.extension.step3.title"}],learnMoreUrl:"https://help.phantom.app"}}})}})({chains:Ue}),(({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...i})=>{const c=y("isRainbow"),u=!c;return{id:"rainbow",name:"Rainbow",iconUrl:async()=>(await n.e(3356).then(n.bind(n,83356))).default,iconBackground:"#0c2f78",installed:u?void 0:c,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},createConnector:()=>{const n=u?h({projectId:t,chains:e,version:o,options:r}):b({flag:"isRainbow",chains:e,options:i}),c=async()=>{const e=await d(n,o);return s()?e:a()?`rainbow://wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`};return{connector:n,mobile:{getUri:u?c:void 0},qrCode:u?{getUri:c,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0}}}})({projectId:De,chains:Ue}),(({chains:e,options:t,projectId:r,version:o="2"})=>({id:"walletConnect",name:"WalletConnect",iconUrl:async()=>(await n.e(4039).then(n.bind(n,84039))).default,iconBackground:"#3b99fc",createConnector:()=>{const n=a(),i=h("1"===o?{version:"1",chains:e,options:{qrcode:n,...t}}:{version:"2",chains:e,projectId:r,options:{showQrModal:n,...t}}),s=async()=>d(i,o);return{connector:i,...n?{}:{mobile:{getUri:s},qrCode:{getUri:s}}}}}))({projectId:De,chains:Ue}),(({chains:e,...t})=>({id:"rabby",name:"Rabby Wallet",iconUrl:async()=>(await n.e(1464).then(n.bind(n,61464))).default,iconBackground:"#8697FF",installed:"undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&!0===window.ethereum.isRabby,downloadUrls:{chrome:"https://chrome.google.com/webstore/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",browserExtension:"https://rabby.io"},createConnector:()=>({connector:new i._({chains:e,options:t}),extension:{instructions:{learnMoreUrl:"https://rabby.io/",steps:[{description:"wallet_connectors.rabby.extension.step1.description",step:"install",title:"wallet_connectors.rabby.extension.step1.title"},{description:"wallet_connectors.rabby.extension.step2.description",step:"create",title:"wallet_connectors.rabby.extension.step2.title"},{description:"wallet_connectors.rabby.extension.step3.description",step:"refresh",title:"wallet_connectors.rabby.extension.step3.title"}]}}})}))({chains:Ue}),(({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...i})=>{const s=c()?y("isTrust"):y("isTrustWallet"),a=!s;return{id:"trust",name:"Trust Wallet",iconUrl:async()=>(await n.e(5601).then(n.bind(n,45601))).default,installed:s||void 0,iconAccent:"#3375BB",iconBackground:"#fff",downloadUrls:{android:"https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",ios:"https://apps.apple.com/us/app/trust-crypto-bitcoin-wallet/id1288339409",mobile:"https://trustwallet.com/download",qrCode:"https://trustwallet.com/download",chrome:"https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",browserExtension:"https://trustwallet.com/browser-extension"},createConnector:()=>{const n=async()=>await d(s,o),s=a?h({projectId:t,chains:e,version:o,options:r}):c()?b({flag:"isTrust",chains:e,options:i}):b({flag:"isTrustWallet",chains:e,options:i});let u;a&&(u={getUri:n,instructions:{learnMoreUrl:"https://trustwallet.com/",steps:[{description:"wallet_connectors.trust.qr_code.step1.description",step:"install",title:"wallet_connectors.trust.qr_code.step1.title"},{description:"wallet_connectors.trust.qr_code.step2.description",step:"create",title:"wallet_connectors.trust.qr_code.step2.title"},{description:"wallet_connectors.trust.qr_code.step3.description",step:"scan",title:"wallet_connectors.trust.qr_code.step3.title"}]}});return{connector:s,mobile:{getUri:a?async()=>{const e=await d(s,o);return`trust://wc?uri=${encodeURIComponent(e)}`}:void 0},qrCode:u,extension:{instructions:{learnMoreUrl:"https://trustwallet.com/browser-extension",steps:[{description:"wallet_connectors.trust.extension.step1.description",step:"install",title:"wallet_connectors.trust.extension.step1.title"},{description:"wallet_connectors.trust.extension.step2.description",step:"create",title:"wallet_connectors.trust.extension.step2.title"},{description:"wallet_connectors.trust.extension.step3.description",step:"refresh",title:"wallet_connectors.trust.extension.step3.title"}]}}}}}})({projectId:De,chains:Ue}),(({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...a})=>{const c=!("undefined"!==typeof window&&"undefined"!==typeof window.okxwallet);return{id:"okx",name:"OKX Wallet",iconUrl:async()=>(await n.e(3258).then(n.bind(n,33258))).default,iconAccent:"#000",iconBackground:"#000",downloadUrls:{android:"https://play.google.com/store/apps/details?id=com.okinc.okex.gp",ios:"https://itunes.apple.com/app/id1327268470?mt=8",mobile:"https://okx.com/download",qrCode:"https://okx.com/download",chrome:"https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",edge:"https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",firefox:"https://addons.mozilla.org/firefox/addon/okexwallet/",browserExtension:"https://okx.com/download"},createConnector:()=>{const n=c?h({projectId:t,chains:e,version:o,options:r}):new i._({chains:e,options:{getProvider:()=>window.okxwallet,...a}});return{connector:n,mobile:{getUri:c?async()=>{const e=await d(n,o);return s()?e:`okex://main/wc?uri=${encodeURIComponent(e)}`}:void 0},qrCode:c?{getUri:async()=>d(n,o),instructions:{learnMoreUrl:"https://okx.com/web3/",steps:[{description:"wallet_connectors.okx.qr_code.step1.description",step:"install",title:"wallet_connectors.okx.qr_code.step1.title"},{description:"wallet_connectors.okx.qr_code.step2.description",step:"create",title:"wallet_connectors.okx.qr_code.step2.title"},{description:"wallet_connectors.okx.qr_code.step3.description",step:"scan",title:"wallet_connectors.okx.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://okx.com/web3/",steps:[{description:"wallet_connectors.okx.extension.step1.description",step:"install",title:"wallet_connectors.okx.extension.step1.title"},{description:"wallet_connectors.okx.extension.step2.description",step:"create",title:"wallet_connectors.okx.extension.step2.title"},{description:"wallet_connectors.okx.extension.step3.description",step:"refresh",title:"wallet_connectors.okx.extension.step3.title"}]}}}}}})({projectId:De,chains:Ue}),(({appName:e,chains:t,...r})=>({id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",iconUrl:async()=>(await n.e(4412).then(n.bind(n,44412))).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:y("isCoinbaseWallet")||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},createConnector:()=>{const n=a(),o=new v.D({chains:t,options:{appName:e,headlessMode:!0,...r}});return{connector:o,...n?{}:{qrCode:{getUri:async()=>(await o.getProvider()).qrUrl,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"wallet_connectors.coinbase.qr_code.step1.description",step:"install",title:"wallet_connectors.coinbase.qr_code.step1.title"},{description:"wallet_connectors.coinbase.qr_code.step2.description",step:"create",title:"wallet_connectors.coinbase.qr_code.step2.title"},{description:"wallet_connectors.coinbase.qr_code.step3.description",step:"scan",title:"wallet_connectors.coinbase.qr_code.step3.title"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"wallet_connectors.coinbase.extension.step1.description",step:"install",title:"wallet_connectors.coinbase.extension.step1.title"},{description:"wallet_connectors.coinbase.extension.step2.description",step:"create",title:"wallet_connectors.coinbase.extension.step2.title"},{description:"wallet_connectors.coinbase.extension.step3.description",step:"refresh",title:"wallet_connectors.coinbase.extension.step3.title"}]}}}}}}))({appName:"Xen Network",chains:Ue})]}]),$e=[function({rpc:e}){return function(t){const n=e(t);return n&&""!==n.http?{chain:{...t,rpcUrls:{...t.rpcUrls,default:{http:[n.http]}}},rpcUrls:{http:[n.http],webSocket:n.webSocket?[n.webSocket]:void 0}}:null}}({rpc:e=>{var t,n,r,o,i,s;return{http:Array.isArray(null===(t=Le(e.id))||void 0===t?void 0:t.rpcURL)?null===(n=Le(e.id))||void 0===n?void 0:n.rpcURL[0]:null===(r=Le(e.id))||void 0===r?void 0:r.rpcURL,webSocket:Array.isArray(null===(o=Le(e.id))||void 0===o?void 0:o.wsURL)?null===(i=Le(e.id))||void 0===i?void 0:i.wsURL[0]:null===(s=Le(e.id))||void 0===s?void 0:s.wsURL}}}),function({apiKey:e}){return function(t){const n=t.rpcUrls.infura?.http[0],r=t.rpcUrls.infura?.webSocket?.[0];return n?{chain:{...t,rpcUrls:{...t.rpcUrls,default:{http:[`${n}/${e}`]}}},rpcUrls:{http:[`${n}/${e}`],webSocket:[`${r}/${e}`]}}:null}}({apiKey:Be.infuraId})],{publicClient:qe,webSocketPublicClient:Ze}=(0,O.QB)(Ue,$e),He=(0,j._g)({autoConnect:!0,persister:null,connectors:[...ze()],publicClient:qe,webSocketPublicClient:Ze}),We=e=>{let{Component:t,pageProps:o,networkId:i}=e;var s;const a=(0,T.useRouter)(),c=a.asPath.startsWith("/btc"),u=a.asPath.startsWith("/sol"),l=w.Q.Mainnet,d=(0,P.useMemo)((()=>Re.env.SOLANA_RPC_URL||(0,x.clusterApiUrl)(l)),[l]),f=(0,P.useMemo)((()=>[]),[l]);if(t.getLayout)return t.getLayout({Component:t,pageProps:o,networkId:i,query:a.query});if(c)return(0,r.jsx)(pe.D,{children:(0,r.jsx)(Pe.Z,{pageProps:o,networkId:"btc",children:(0,r.jsx)(t,{pageProps:o,networkId:"btc"})})});if(u){const e=C()((async()=>(await n.e(4288).then(n.bind(n,64288))).ConnectionProvider),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),i=C()((async()=>(await n.e(4288).then(n.bind(n,64288))).WalletProvider),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),s=C()((async()=>(await n.e(9920).then(n.bind(n,49920))).WalletModalProvider),{loadableGenerated:{webpack:()=>[null]},ssr:!1});return(0,r.jsx)(e,{endpoint:d,children:(0,r.jsx)(i,{wallets:f,autoConnect:!0,children:(0,r.jsx)(s,{children:(0,r.jsx)(be.Q,{children:(0,r.jsx)(Oe.Z,{pageProps:o,networkId:"sol",children:(0,r.jsx)(t,{pageProps:o,networkId:"sol"})})})})})})}var h;return i?(0,r.jsx)(Me.Z,{projectId:"xen",contractAddress:null===Ne||void 0===Ne||null===(h=Ne[i])||void 0===h?void 0:h.contractAddress,children:(0,r.jsx)(t,{...o,networkId:i})}):(0,r.jsx)(Me.Z,{projectId:"xen",contractAddress:null===Ne||void 0===Ne||null===(s=Ne[i])||void 0===s?void 0:s.contractAddress,children:(0,r.jsx)(t,{...o,networkId:i})})},Ge=e=>{let{Component:t,pageProps:n,networkId:o}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)(A.lX,{...je}),(0,r.jsx)(we.I,{children:(0,r.jsx)(ge.f,{networkId:o,children:(0,r.jsx)(ve.X,{children:(0,r.jsx)(ye.N$,{children:(0,r.jsx)(j.eM,{config:He,children:(0,r.jsx)(Te,{chains:Ue,children:(0,r.jsx)(me.x,{children:(0,r.jsx)(Ae.f,{children:(0,r.jsx)(We,{pageProps:n,Component:t,networkId:o})})})})})})})})})]})};Ge.getInitialProps=async e=>{const{networkId:t}=e.router.query;return{networkId:t}};var Ke=Ge},23148:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},p:function(){return o}});const r=(e,t)=>e.filter(((e,n,r)=>r.findIndex((n=>n[t]===e[t]))===n)),o=e=>e.filter(((e,t,n)=>n.findIndex((t=>t===e))===t))},50019:function(){},22985:function(){},18619:function(){},99034:function(e){e.exports={container:"Home_container__bCOhY",main:"Home_main__nLjiQ",footer:"Home_footer____T7K",title:"Home_title__T09hD",description:"Home_description__41Owk",code:"Home_code__suPER",grid:"Home_grid__GxQ85",card:"Home_card___LpL1",logo:"Home_logo__27_tb","countdown-text":"Home_countdown-text__g4GTm",carousel_custom:"Home_carousel_custom__e8DOw","carousel-image":"Home_carousel-image__K0TXx"}},5152:function(e,t,n){e.exports=n(95677)},9008:function(e,t,n){e.exports=n(42636)},41664:function(e,t,n){e.exports=n(95569)},11163:function(e,t,n){e.exports=n(96885)},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"===typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,c=[],u=!1,l=-1;function d(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=c.length;t;){for(a=c,c=[];++l<t;)a&&a[l].run();l=-1,t=c.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},92592:function(e,t,n){const r=n(47138),o=n(95115),i=n(6907),s=n(93776);function a(e,t,n,i,s){const a=[].slice.call(arguments,1),c=a.length,u="function"===typeof a[c-1];if(!u&&!r())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=i=void 0):2!==c||t.getContext||(i=n,n=t,t=void 0),new Promise((function(r,s){try{const s=o.create(n,i);r(e(s,t,i))}catch(a){s(a)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=n,n=t,t=i=void 0):3===c&&(t.getContext&&"undefined"===typeof s?(s=i,i=void 0):(s=i,i=n,n=t,t=void 0));try{const r=o.create(n,i);s(null,e(r,t,i))}catch(l){s(l)}}t.create=o.create,t.toCanvas=a.bind(null,i.render),t.toDataURL=a.bind(null,i.renderToDataURL),t.toString=a.bind(null,(function(e,t,n){return s.render(e,n)}))},47138:function(e){e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},21845:function(e,t,n){const r=n(10242).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7];for(let r=1;r<t-1;r++)i[r]=i[r-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},8260:function(e,t,n){const r=n(76910),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},97245:function(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1===(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1===(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},73280:function(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},43424:function(e,t,n){const r=n(62378),o=n(76910);function i(e){this.mode=o.BYTE,"string"===typeof e&&(e=r(e)),this.data=new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=i},35393:function(e,t,n){const r=n(64908),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}}},64908:function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},76526:function(e,t,n){const r=n(10242).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},61642:function(e,t,n){const r=n(10242),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},69729:function(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},35442:function(e,t,n){const r=n(76910),o=n(10242);function i(e){this.mode=r.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=i},27126:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,i=10;function s(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(n+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return n*r%2+n*r%3===0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,o=0,i=0,s=null,a=null;for(let c=0;c<t;c++){o=i=0,s=a=null;for(let u=0;u<t;u++){let t=e.get(c,u);t===s?o++:(o>=5&&(r+=n+(o-5)),s=t,o=1),t=e.get(u,c),t===a?i++:(i>=5&&(r+=n+(i-5)),a=t,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){const t=e.get(r,o)+e.get(r,o+1)+e.get(r+1,o)+e.get(r+1,o+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,i=0;for(let o=0;o<t;o++){r=i=0;for(let s=0;s<t;s++)r=r<<1&2047|e.get(o,s),s>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|e.get(s,o),s>=10&&(1488===i||93===i)&&n++}return n*o},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*i},t.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)t.isReserved(o,r)||t.xor(o,r,s(e,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<i&&(i=r,o=s)}return o}},76910:function(e,t,n){const r=n(43114),o=n(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},41085:function(e,t,n){const r=n(76910);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},26143:function(e,t,n){const r=n(69729);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<t.length;i++)n[o+i]^=r.mul(e[o],t[i]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let o=0;o<e;o++)n=t.mul(n,new Uint8Array([1,r.exp(o)]));return n}},95115:function(e,t,n){const r=n(10242),o=n(64908),i=n(97245),s=n(73280),a=n(21845),c=n(76526),u=n(27126),l=n(35393),d=n(52882),f=n(23103),h=n(61642),p=n(76910),m=n(16130);function g(e,t,n){const r=e.size,o=h.getEncodedBits(t,n);let i,s;for(i=0;i<15;i++)s=1===(o>>i&1),i<6?e.set(i,8,s,!0):i<8?e.set(i+1,8,s,!0):e.set(r-15+i,8,s,!0),i<8?e.set(8,r-i-1,s,!0):i<9?e.set(8,15-i-1+1,s,!0):e.set(8,15-i-1,s,!0);e.set(r-8,8,1,!0)}function y(e,t,n){const o=new i;n.forEach((function(t){o.put(t.mode.bit,4),o.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(o)}));const s=8*(r.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const a=(s-o.getLengthInBits())/8;for(let r=0;r<a;r++)o.put(r%2?17:236,8);return function(e,t,n){const o=r.getSymbolTotalCodewords(t),i=l.getTotalCodewordsCount(t,n),s=o-i,a=l.getBlocksCount(t,n),c=a-o%a,u=Math.floor(o/a),f=Math.floor(s/a),h=f+1,p=u-f,m=new d(p);let g=0;const y=new Array(a),b=new Array(a);let v=0;const w=new Uint8Array(e.buffer);for(let r=0;r<a;r++){const e=r<c?f:h;y[r]=w.slice(g,g+e),b[r]=m.encode(y[r]),g+=e,v=Math.max(v,e)}const x=new Uint8Array(o);let E,_,k=0;for(E=0;E<v;E++)for(_=0;_<a;_++)E<y[_].length&&(x[k++]=y[_][E]);for(E=0;E<p;E++)for(_=0;_<a;_++)x[k++]=b[_][E];return x}(o,e,t)}function b(e,t,n,o){let i;if(Array.isArray(e))i=m.fromArray(e);else{if("string"!==typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=m.rawSplit(e);r=f.getBestVersionForData(t,n)}i=m.fromString(e,r||40)}}const l=f.getBestVersionForData(i,n);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else t=l;const d=y(t,n,i),h=r.getSymbolSize(t),p=new s(h);return function(e,t){const n=e.size,r=c.getPositions(t);for(let o=0;o<r.length;o++){const t=r[o][0],i=r[o][1];for(let r=-1;r<=7;r++)if(!(t+r<=-1||n<=t+r))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(r>=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?e.set(t+r,i+o,!0,!0):e.set(t+r,i+o,!1,!0))}}(p,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2===0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(p),function(e,t){const n=a.getPositions(t);for(let r=0;r<n.length;r++){const t=n[r][0],o=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?e.set(t+n,o+r,!0,!0):e.set(t+n,o+r,!1,!0)}}(p,t),g(p,n,0),t>=7&&function(e,t){const n=e.size,r=f.getEncodedBits(t);let o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+n-8-3,s=1===(r>>a&1),e.set(o,i,s,!0),e.set(i,o,s,!0)}(p,t),function(e,t){const n=e.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,a-n)){let r=!1;s<t.length&&(r=1===(t[s]>>>i&1)),e.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(p,d),isNaN(o)&&(o=u.getBestMask(p,g.bind(null,p,n))),u.applyMask(o,p),g(p,n,o),{modules:p,version:t,errorCorrectionLevel:n,maskPattern:o,segments:i}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,i,s=o.M;return"undefined"!==typeof t&&(s=o.from(t.errorCorrectionLevel,o.M),n=f.from(t.version),i=u.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),b(e,n,s,i)}},52882:function(e,t,n){const r=n(26143);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},7007:function(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),s=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},16130:function(e,t,n){const r=n(76910),o=n(41085),i=n(8260),s=n(43424),a=n(35442),c=n(7007),u=n(10242),l=n(65987);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function h(e){const t=f(c.NUMERIC,r.NUMERIC,e),n=f(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let o,i;u.isKanjiModeEnabled()?(o=f(c.BYTE,r.BYTE,e),i=f(c.KANJI,r.KANJI,e)):(o=f(c.BYTE_KANJI,r.BYTE,e),i=[]);return t.concat(n,o,i).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return i.getBitsLength(e);case r.KANJI:return a.getBitsLength(e);case r.BYTE:return s.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||u.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new i(e);case r.KANJI:return new a(e);case r.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"===typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},t.fromString=function(e,n){const o=function(e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return t}(h(e,u.isKanjiModeEnabled())),i=function(e,t){const n={},o={start:{}};let i=["start"];for(let s=0;s<e.length;s++){const a=e[s],c=[];for(let e=0;e<a.length;e++){const u=a[e],l=""+s+e;c.push(l),n[l]={node:u,lastCount:0},o[l]={};for(let e=0;e<i.length;e++){const s=i[e];n[s]&&n[s].node.mode===u.mode?(o[s][l]=p(n[s].lastCount+u.length,u.mode)-p(n[s].lastCount,u.mode),n[s].lastCount+=u.length):(n[s]&&(n[s].lastCount=u.length),o[s][l]=p(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,t))}}i=c}for(let r=0;r<i.length;r++)o[i[r]].end=0;return{map:o,table:n}}(o,n),s=l.find_path(i.map,"start","end"),a=[];for(let t=1;t<s.length-1;t++)a.push(i.table[s[t]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(a))},t.rawSplit=function(e){return t.fromArray(h(e,u.isKanjiModeEnabled()))}},10242:function(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},43114:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},23103:function(e,t,n){const r=n(10242),o=n(35393),i=n(64908),s=n(76910),a=n(43114),c=r.getBCHDigit(7973);function u(e,t){return s.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const r=u(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!a.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=s.BYTE);const i=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===s.MIXED)return i;const c=i-u(n,e);switch(n){case s.NUMERIC:return Math.floor(c/10*3);case s.ALPHANUMERIC:return Math.floor(c/11*2);case s.KANJI:return Math.floor(c/13);case s.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const o=i.from(n,i.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(l(e,r)<=t.getCapacity(r,n,s.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},6907:function(e,t,n){const r=n(89653);t.render=function(e,t,n){let o=n,i=t;"undefined"!==typeof o||t&&t.getContext||(o=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const s=r.getImageWidth(e.modules.size,o),a=i.getContext("2d"),c=a.createImageData(s,s);return r.qrToImageData(c.data,e,o),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(a,i,s),a.putImageData(c,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;"undefined"!==typeof o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}},93776:function(e,t,n){const r=n(89653);function o(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(e,t,n){let r=e+t;return"undefined"!==typeof n&&(r+=" "+n),r}t.render=function(e,t,n){const s=r.getOptions(t),a=e.modules.size,c=e.modules.data,u=a+2*s.margin,l=s.color.light.a?"<path "+o(s.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",d="<path "+o(s.color.dark,"stroke")+' d="'+function(e,t,n){let r="",o=0,s=!1,a=0;for(let c=0;c<e.length;c++){const u=Math.floor(c%t),l=Math.floor(c/t);u||s||(s=!0),e[c]?(a++,c>0&&u>0&&e[c-1]||(r+=s?i("M",u+n,.5+l+n):i("m",o,0),o=0,s=!1),u+1<t&&e[c+1]||(r+=i("h",a),a=0)):o++}return r}(c,a,s.margin)+'"/>',f='viewBox="0 0 '+u+" "+u+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+d+"</svg>\n";return"function"===typeof n&&n(null,h),h}},89653:function(e,t){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,s=t.getScale(o,r),a=Math.floor((o+2*r.margin)*s),c=r.margin*s,u=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),d=r.color.light;if(t>=c&&n>=c&&t<a-c&&n<a-c){d=u[i[Math.floor((t-c)/s)*o+Math.floor((n-c)/s)]?1:0]}e[l++]=d.r,e[l++]=d.g,e[l++]=d.b,e[l]=d.a}}},69921:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case d:case i:case a:case s:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case m:case c:return e;default:return t}}case o:return t}}}function E(e){return x(e)===d}t.AsyncMode=l,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return E(e)||x(e)===l},t.isConcurrentMode=E,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===a||e===s||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=x},59864:function(e,t,n){"use strict";e.exports=n(69921)},98885:function(e,t,n){"use strict";n.d(t,{ZP:function(){return y}});var r=n(63366),o=n(75068),i=n(67294),s=n(73935),a=!1,c=n(220),u=n(59391),l="unmounted",d="exited",f="entering",h="entered",p="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=d,r.appearStatus=f):o=h:o=t.unmountOnExit||t.mountOnEnter?l:d,r.state={status:o},r.nextCallback=null,r}(0,o.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==h&&(t=f):n!==f&&n!==h||(t=p)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===f){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this);n&&(0,u.Q)(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===d&&this.setState({status:l})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[s.findDOMNode(this),r],i=o[0],c=o[1],u=this.getTimeouts(),l=r?u.appear:u.enter;!e&&!n||a?this.safeSetState({status:h},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,c),this.safeSetState({status:f},(function(){t.props.onEntering(i,c),t.onTransitionEnd(l,(function(){t.safeSetState({status:h},(function(){t.props.onEntered(i,c)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s.findDOMNode(this);t&&!a?(this.props.onExit(r),this.safeSetState({status:p},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:d},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:d},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(c.Z.Provider,{value:null},"function"===typeof n?n(e,o):i.cloneElement(i.Children.only(n),o))},t}(i.Component);function g(){}m.contextType=c.Z,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},m.UNMOUNTED=l,m.EXITED=d,m.ENTERING=f,m.ENTERED=h,m.EXITING=p;var y=m},89747:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(63366),o=n(87462);var i=n(75068),s=n(67294),a=n(220);function c(e,t){var n=Object.create(null);return e&&s.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,s.isValidElement)(e)?t(e):e}(e)})),n}function u(e,t,n){return null!=n[t]?n[t]:e.props[t]}function l(e,t,n){var r=c(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var s in e)s in t?i.length&&(o[s]=i,i=[]):i.push(s);var a={};for(var c in t){if(o[c])for(r=0;r<o[c].length;r++){var u=o[c][r];a[o[c][r]]=n(u)}a[c]=n(c)}for(r=0;r<i.length;r++)a[i[r]]=n(i[r]);return a}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if((0,s.isValidElement)(a)){var c=i in t,l=i in r,d=t[i],f=(0,s.isValidElement)(d)&&!d.props.in;!l||c&&!f?l||!c||f?l&&c&&(0,s.isValidElement)(d)&&(o[i]=(0,s.cloneElement)(a,{onExited:n.bind(null,a),in:d.props.in,exit:u(a,"exit",e),enter:u(a,"enter",e)})):o[i]=(0,s.cloneElement)(a,{in:!1}):o[i]=(0,s.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:u(a,"exit",e),enter:u(a,"enter",e)})}})),o}var d=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},f=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}(0,i.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,c(n.children,(function(e){return(0,s.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:u(e,"appear",n),enter:u(e,"enter",n),exit:u(e,"exit",n)})}))):l(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=c(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,o.Z)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=(0,r.Z)(e,["component","childFactory"]),i=this.state.contextValue,c=d(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?s.createElement(a.Z.Provider,{value:i},c):s.createElement(a.Z.Provider,{value:i},s.createElement(t,o,c))},t}(s.Component);f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var h=f},220:function(e,t,n){"use strict";var r=n(67294);t.Z=r.createContext(null)},59391:function(e,t,n){"use strict";n.d(t,{Q:function(){return r}});var r=function(e){return e.scrollTop}},89509:function(e,t,n){var r=n(48764),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},80500:function(e){"use strict";e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},70610:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},70655:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return x},__asyncGenerator:function(){return w},__asyncValues:function(){return E},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return C},__classPrivateFieldIn:function(){return A},__classPrivateFieldSet:function(){return T},__createBinding:function(){return f},__decorate:function(){return a},__exportStar:function(){return h},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return I},__importStar:function(){return S},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return m},__rest:function(){return s},__spread:function(){return g},__spreadArray:function(){return b},__spreadArrays:function(){return y},__values:function(){return p}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(a){i=[6,a],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var f=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function h(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||f(t,e,n)}function p(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}function b(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(r){l(i[0][3],r)}var n}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&f(t,e,n);return k(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function C(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function T(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function A(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}},42238:function(e,t,n){var r;!function(o,i){"use strict";var s="function",a="undefined",c="object",u="string",l="major",d="model",f="name",h="type",p="vendor",m="version",g="architecture",y="console",b="mobile",v="tablet",w="smarttv",x="wearable",E="embedded",_="Amazon",k="Apple",S="ASUS",I="BlackBerry",C="Firefox",T="Google",A="Huawei",P="LG",O="Microsoft",j="Motorola",M="Opera",R="Samsung",B="Sharp",N="Sony",L="Xiaomi",U="Zebra",D="Facebook",F="Chromium OS",z="Mac OS",$=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},q=function(e,t){return typeof e===u&&-1!==Z(t).indexOf(Z(e))},Z=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},W=function(e,t){for(var n,r,o,a,u,l,d=0;d<t.length&&!u;){var f=t[d],h=t[d+1];for(n=r=0;n<f.length&&!u&&f[n];)if(u=f[n++].exec(e))for(o=0;o<h.length;o++)l=u[++r],typeof(a=h[o])===c&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):i:this[a[0]]=l?a[1].call(this,l,a[2]):i:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):i):this[a]=l||i;d+=2}},G=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(q(t[n][r],e))return"?"===n?i:n}else if(q(t[n],e))return"?"===n?i:n;return e},K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},V={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,m],[/opios[\/ ]+([\w\.]+)/i],[m,[f,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[m,[f,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[f,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,m],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[f,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[f,"Smart Lenovo Browser"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure Browser"],m],[/\bfocus\/([\w\.]+)/i],[m,[f,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[m,[f,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[f,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[f,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[m,[f,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 Browser"]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 Browser"],m],[/samsungbrowser\/([\w\.]+)/i],[m,[f,"Samsung Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],m],[/metasr[\/ ]?([\d\.]+)/i],[m,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[f,m],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,D],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[f,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,"Chrome WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[f,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[m,G,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[f,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[f,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,m],[/(cobalt)\/([\w\.]+)/i],[f,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,Z]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",Z]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,Z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[p,R],[h,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[p,R],[h,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[p,k],[h,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[p,k],[h,v]],[/(macintosh);/i],[d,[p,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[p,B],[h,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[p,A],[h,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[p,A],[h,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[p,L],[h,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[p,L],[h,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[p,"OPPO"],[h,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[p,"Vivo"],[h,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[p,"Realme"],[h,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[p,j],[h,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[p,j],[h,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[p,P],[h,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[p,P],[h,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[p,"Lenovo"],[h,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[p,"Nokia"],[h,b]],[/(pixel c)\b/i],[d,[p,T],[h,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[p,T],[h,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[p,N],[h,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[p,N],[h,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[p,"OnePlus"],[h,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[p,_],[h,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[p,_],[h,b]],[/(playbook);[-\w\),; ]+(rim)/i],[d,p,[h,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[p,I],[h,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[p,S],[h,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[p,S],[h,b]],[/(nexus 9)/i],[d,[p,"HTC"],[h,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[d,/_/g," "],[h,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[p,"Acer"],[h,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[p,"Meizu"],[h,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[p,"Ulefone"],[h,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,d,[h,b]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,d,[h,v]],[/(surface duo)/i],[d,[p,O],[h,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[p,"Fairphone"],[h,b]],[/(u304aa)/i],[d,[p,"AT&T"],[h,b]],[/\bsie-(\w*)/i],[d,[p,"Siemens"],[h,b]],[/\b(rct\w+) b/i],[d,[p,"RCA"],[h,v]],[/\b(venue[\d ]{2,7}) b/i],[d,[p,"Dell"],[h,v]],[/\b(q(?:mv|ta)\w+) b/i],[d,[p,"Verizon"],[h,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[p,"Barnes & Noble"],[h,v]],[/\b(tm\d{3}\w+) b/i],[d,[p,"NuVision"],[h,v]],[/\b(k88) b/i],[d,[p,"ZTE"],[h,v]],[/\b(nx\d{3}j) b/i],[d,[p,"ZTE"],[h,b]],[/\b(gen\d{3}) b.+49h/i],[d,[p,"Swiss"],[h,b]],[/\b(zur\d{3}) b/i],[d,[p,"Swiss"],[h,v]],[/\b((zeki)?tb.*\b) b/i],[d,[p,"Zeki"],[h,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],d,[h,v]],[/\b(ns-?\w{0,9}) b/i],[d,[p,"Insignia"],[h,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[p,"NextBook"],[h,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],d,[h,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],d,[h,b]],[/\b(ph-1) /i],[d,[p,"Essential"],[h,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[p,"Envizen"],[h,v]],[/\b(trio[-\w\. ]+) b/i],[d,[p,"MachSpeed"],[h,v]],[/\btu_(1491) b/i],[d,[p,"Rotor"],[h,v]],[/(shield[\w ]+) b/i],[d,[p,"Nvidia"],[h,v]],[/(sprint) (\w+)/i],[p,d,[h,b]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[p,O],[h,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[p,U],[h,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[p,U],[h,b]],[/smart-tv.+(samsung)/i],[p,[h,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[p,R],[h,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,P],[h,w]],[/(apple) ?tv/i],[p,[d,"Apple TV"],[h,w]],[/crkey/i],[[d,"Chromecast"],[p,T],[h,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[p,_],[h,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[p,B],[h,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[p,N],[h,w]],[/(mitv-\w{5}) bui/i],[d,[p,L],[h,w]],[/Hbbtv.*(technisat) (.*);/i],[p,d,[h,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,H],[d,H],[h,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,d,[h,y]],[/droid.+; (shield) bui/i],[d,[p,"Nvidia"],[h,y]],[/(playstation [345portablevi]+)/i],[d,[p,N],[h,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[p,O],[h,y]],[/((pebble))app/i],[p,d,[h,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[p,k],[h,x]],[/droid.+; (glass) \d/i],[d,[p,T],[h,x]],[/droid.+; (wt63?0{2,3})\)/i],[d,[p,U],[h,x]],[/(quest( 2| pro)?)/i],[d,[p,D],[h,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[h,E]],[/(aeobc)\b/i],[d,[p,_],[h,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[h,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[h,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,b]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[f,[m,G,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,G,K],[f,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,z],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,m],[/\(bb(10);/i],[m,[f,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[f,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[f,"Chromecast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,F],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,m],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,m]]},X=function(e,t){if(typeof e===c&&(t=e,e=i),!(this instanceof X))return new X(e,t).getResult();var n=typeof o!==a&&o.navigator?o.navigator:i,r=e||(n&&n.userAgent?n.userAgent:""),l=n&&n.userAgentData?n.userAgentData:i,d=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2===0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(V,t):V,f=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t.name=i,t.version=i,W.call(t,r,d.browser),t.major=typeof(e=t.version)===u?e.replace(/[^\d\.]/g,"").split(".")[0]:i,f&&n&&n.brave&&typeof n.brave.isBrave==s&&(t.name="Brave"),t},this.getCPU=function(){var e={};return e.architecture=i,W.call(e,r,d.cpu),e},this.getDevice=function(){var e={};return e.vendor=i,e.model=i,e.type=i,W.call(e,r,d.device),f&&!e.type&&l&&l.mobile&&(e.type=b),f&&"Macintosh"==e.model&&n&&typeof n.standalone!==a&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e.model="iPad",e.type=v),e},this.getEngine=function(){var e={};return e.name=i,e.version=i,W.call(e,r,d.engine),e},this.getOS=function(){var e={};return e.name=i,e.version=i,W.call(e,r,d.os),f&&!e.name&&l&&"Unknown"!=l.platform&&(e.name=l.platform.replace(/chrome os/i,F).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>500?H(e,500):e,this},this.setUA(r),this};X.VERSION="1.0.37",X.BROWSER=$([f,m,l]),X.CPU=$([g]),X.DEVICE=$([d,p,h,y,b,w,v,x,E]),X.ENGINE=X.OS=$([f,m]),typeof t!==a?(e.exports&&(t=e.exports=X),t.UAParser=X):n.amdO?(r=function(){return X}.call(t,n,t,e))===i||(e.exports=r):typeof o!==a&&(o.UAParser=X);var Y=typeof o!==a&&(o.jQuery||o.Zepto);if(Y&&!Y.ua){var J=new X;Y.ua=J.getResult(),Y.ua.get=function(){return J.getUA()},Y.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"===typeof window?window:this)},53250:function(e,t,n){"use strict";var r=n(67294);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(r){return!0}}var l="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return a((function(){o.value=n,o.getSnapshot=t,u(o)&&l({inst:o})}),[e,n,t]),s((function(){return u(o)&&l({inst:o}),e((function(){u(o)&&l({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},50139:function(e,t,n){"use strict";var r=n(67294),o=n(61688);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},s=o.useSyncExternalStore,a=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u((function(){function e(e){if(!c){if(c=!0,s=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,a=n)}var s,a,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var h=s(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=h}),[h]),l(h),h}},61688:function(e,t,n){"use strict";e.exports=n(53250)},52798:function(e,t,n){"use strict";e.exports=n(50139)},74880:function(e,t,n){"use strict";var r;n.d(t,{v4:function(){return d}});var o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var a=function(e){return"string"===typeof e&&s.test(e)},c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var d=function(e,t,n){var r=(e=e||{}).random||(e.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return l(r)}},32286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const r=n(5281),o=n(74574),i=n(49575);function s(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,o.concatBytes)(...n)),randomBytes:o.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const n=t=>(0,i.weierstrass)({...e,...s(t)});return Object.freeze({...n(t),create:n})}},68886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const r=n(3188),o=n(41830),i=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,o=t;for(;n>i;)n&s&&(r=r.add(o)),o=o.double(),n>>=s;return r},precomputeWindow(e,t){const{windows:n,windowSize:o}=r(t),i=[];let s=e,a=s;for(let r=0;r<n;r++){a=s,i.push(a);for(let e=1;e<o;e++)a=a.add(s),i.push(a);s=a.double()}return i},wNAF(t,o,i){const{windows:a,windowSize:c}=r(t);let u=e.ZERO,l=e.BASE;const d=BigInt(2**t-1),f=2**t,h=BigInt(t);for(let e=0;e<a;e++){const t=e*c;let r=Number(i&d);i>>=h,r>c&&(r-=f,i+=s);const a=t,p=t+Math.abs(r)-1,m=e%2!==0,g=r<0;0===r?l=l.add(n(m,o[a])):u=u.add(n(g,o[p]))}return{p:u,f:l}},wNAFCached(e,t,n,r){const o=e._WINDOW_SIZE||1;let i=t.get(e);return i||(i=this.precomputeWindow(e,o),1!==o&&t.set(e,r(i))),this.wNAF(o,i,n)}}},t.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},11534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const r=n(3188),o=n(41830);const i=o.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function u(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,n,r){c(e),c(t),u(n),t.length>255&&(t=r((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:i,blockLen:l}=r,d=Math.ceil(n/i);if(d>255)throw new Error("Invalid xmd length");const f=(0,o.concatBytes)(t,s(t.length,1)),h=s(0,l),p=s(n,2),m=new Array(d),g=r((0,o.concatBytes)(h,e,p,s(0,1),f));m[0]=r((0,o.concatBytes)(g,s(1,1),f));for(let c=1;c<=d;c++){const e=[a(g,m[c-1]),s(c+1,1),f];m[c]=r((0,o.concatBytes)(...e))}return(0,o.concatBytes)(...m).slice(0,n)}function d(e,t,n,r,i){if(c(e),c(t),u(n),t.length>255){const e=Math.ceil(2*r/8);t=i.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:n}).update(e).update(s(n,2)).update(t).update(s(t.length,1)).digest()}function f(e,t,n){(0,o.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:f,hash:h,expand:p,DST:m}=n;c(e),u(t);const g=function(e){if(e instanceof Uint8Array)return e;if("string"===typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(m),y=s.toString(2).length,b=Math.ceil((y+a)/8),v=t*f*b;let w;if("xmd"===p)w=l(e,g,v,h);else if("xof"===p)w=d(e,g,v,a,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const x=new Array(t);for(let o=0;o<t;o++){const e=new Array(f);for(let t=0;t<f;t++){const n=b*(t+o*f),a=w.subarray(n,n+b);e[t]=(0,r.mod)(i(a),s)}x[o]=e}return x}t.expand_message_xmd=l,t.expand_message_xof=d,t.hash_to_field=f,t.isogenyMap=function(e,t){const n=t.map((e=>Array.from(e).reverse()));return(t,r)=>{const[o,i,s,a]=n.map((n=>n.reduce(((n,r)=>e.add(e.mul(n,t),r)))));return t=e.div(o,i),r=e.mul(r,e.div(s,a)),{x:t,y:r}}},t.createHasher=function(e,t,n){if("function"!==typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,o){const i=f(r,2,{...n,DST:n.DST,...o}),s=e.fromAffine(t(i[0])),a=e.fromAffine(t(i[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,o){const i=f(r,1,{...n,DST:n.encodeDST,...o}),s=e.fromAffine(t(i[0])).clearCofactor();return s.assertValidity(),s}}}},3188:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const r=n(41830),o=BigInt(0),i=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);BigInt(9),BigInt(16);function d(e,t){const n=e%t;return n>=o?n:t+n}function f(e,t,n){if(n<=o||t<o)throw new Error("Expected power/modulo > 0");if(n===i)return o;let r=i;for(;t>o;)t&i&&(r=r*e%n),e=e*e%n,t>>=i;return r}function h(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=d(e,t),r=t,s=o,a=i,c=i,u=o;for(;n!==o;){const e=r/n,t=r%n,o=s-c*e,i=a-u*e;r=n,n=t,s=c,a=u,c=o,u=i}if(r!==i)throw new Error("invert: does not exist");return d(s,t)}function p(e){const t=(e-i)/s;let n,r,a;for(n=e-i,r=0;n%s===o;n/=s,r++);for(a=s;a<e&&f(a,t,e)!==e-i;a++);if(1===r){const t=(e+i)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const u=(n+i)/s;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=r,c=e.pow(e.mul(e.ONE,a),n),l=e.pow(o,u),d=e.pow(o,n);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const n=e.pow(c,i<<BigInt(s-t-1));c=e.sqr(n),l=e.mul(l,n),d=e.mul(d,c),s=t}return l}}function m(e){if(e%c===a){const t=(e+i)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%l===u){const t=(e-u)/l;return function(e,n){const r=e.mul(n,s),o=e.pow(r,t),i=e.mul(n,o),a=e.mul(e.mul(i,s),o),c=e.mul(i,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),n))throw new Error("Cannot find square root");return c}}return p(e)}t.mod=d,t.pow=f,t.pow2=function(e,t,n){let r=e;for(;t-- >o;)r*=r,r%=n;return r},t.invert=h,t.tonelliShanks=p,t.FpSqrt=m;t.isNegativeLE=(e,t)=>(d(e,t)&i)===i;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function y(e,t,n){if(n<o)throw new Error("Expected power > 0");if(n===o)return e.ONE;if(n===i)return t;let r=e.ONE,s=t;for(;n>o;)n&i&&(r=e.mul(r,s)),s=e.sqr(s),n>>=i;return r}function b(e,t){const n=new Array(t.length),r=t.reduce(((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r))),e.ONE),o=e.inv(r);return t.reduceRight(((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r))),o),n}function v(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function w(e){if("bigint"!==typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function x(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=g.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},t.FpPow=y,t.FpInvertBatch=b,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"===typeof n?h(n,e.ORDER):e.inv(n))},t.FpIsSquare=function(e){const t=(e.ORDER-i)/s;return n=>{const r=e.pow(n,t);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},t.nLength=v,t.Field=function(e,t,n=!1,s={}){if(e<=o)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=m(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,r.bitMask)(a),ZERO:o,ONE:i,create:t=>d(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&t<e},is0:e=>e===o,isOdd:e=>(e&i)===i,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>y(l,e,t),div:(t,n)=>d(t*h(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const o=(e=(0,r.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||o<s||o>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-i)+i},t.getFieldBytesLength=w,t.getMinHashLength=x,t.mapHashToField=function(e,t,n=!1){const o=e.length,s=w(t),a=x(t);if(o<16||o<a||o>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${o}`);const c=d(n?(0,r.bytesToNumberBE)(e):(0,r.bytesToNumberLE)(e),t-i)+i;return n?(0,r.numberToBytesLE)(c,s):(0,r.numberToBytesBE)(c,s)}},41830:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const n=BigInt(0),r=BigInt(1),o=BigInt(2),i=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=s[e[n]];return t}function c(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function u(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(t/2);for(let r=0;r<n.length;r++){const t=2*r,o=e.slice(t,t+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");n[r]=i}return n}function d(e,t){return l(e.toString(16).padStart(2*t,"0"))}function f(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let n=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=c,t.hexToNumber=u,t.hexToBytes=l,t.bytesToNumberBE=function(e){return u(a(e))},t.bytesToNumberLE=function(e){if(!i(e))throw new Error("Uint8Array expected");return u(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=d,t.numberToBytesLE=function(e,t){return d(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(c(e))},t.ensureBytes=function(e,t,n){let r;if("string"===typeof t)try{r=l(t)}catch(s){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${s}`)}else{if(!i(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const o=r.length;if("number"===typeof n&&o!==n)throw new Error(`${e} expected ${n} bytes, got ${o}`);return r},t.concatBytes=f,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},t.utf8ToBytes=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>n;e>>=r,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&r};t.bitSet=(e,t,o)=>e|(o?r:n)<<BigInt(t);t.bitMask=e=>(o<<BigInt(e-1))-r;const h=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=h(e),o=h(e),i=0;const s=()=>{r.fill(1),o.fill(0),i=0},a=(...e)=>n(o,r,...e),c=(e=h())=>{o=a(p([0]),e),r=a(),0!==e.length&&(o=a(p([1]),e),r=a())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return f(...n)};return(e,t)=>{let n;for(s(),c(e);!(n=t(u()));)c();return s(),n}};const m={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,stringOrUint8Array:e=>"string"===typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const o=m[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const i=e[t];if((!r||void 0!==i)&&!o(i,e))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${n}`)};for(const[o,i]of Object.entries(t))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return e}},49575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const r=n(3188),o=n(41830),i=n(41830),s=n(68886);const{bytesToNumberBE:a,hexToBytes:c}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:n}=t.DER;if(e.length<2||2!==e[0])throw new n("Invalid signature integer tag");const r=e[1],o=e.subarray(2,r+2);if(!r||o.length!==r)throw new n("Invalid signature integer: wrong length");if(128&o[0])throw new n("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new n("Invalid signature integer: unnecessary leading zero");return{d:a(o),l:e.subarray(r+2)}},toSig(e){const{Err:n}=t.DER,r="string"===typeof e?c(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let o=r.length;if(o<2||48!=r[0])throw new n("Invalid signature tag");if(r[1]!==o-2)throw new n("Invalid signature: incorrect length");const{d:i,l:s}=t.DER._parseInt(r.subarray(2)),{d:a,l:u}=t.DER._parseInt(s);if(u.length)throw new n("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),o=t(n(e.r)),i=r.length/2,s=o.length/2,a=n(i),c=n(s);return`30${n(s+i+4)}02${c}${o}02${a}${r}`}};const u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,a=t.toBytes||((e,t,r)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function d(e){const{a:r,b:o}=t,i=n.sqr(e),s=n.mul(i,e);return n.add(n.add(s,n.mul(e,r)),o)}if(!n.eql(n.sqr(t.Gy),d(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"===typeof e&&u<e&&e<t.n}function p(e){if(!h(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function m(e){const{allowedPrivateKeyLengths:n,nByteLength:s,wrapPrivateKey:a,n:c}=t;if(n&&"bigint"!==typeof e){if(e instanceof Uint8Array&&(e=o.bytesToHex(e)),"string"!==typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let u;try{u="bigint"===typeof e?e:o.bytesToNumberBE((0,i.ensureBytes)("private key",e,s))}catch(l){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(u=r.mod(u,c)),p(u),u}const g=new Map;function y(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}class b{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const o=e=>n.eql(e,n.ZERO);return o(t)&&o(r)?b.ZERO:new b(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(c((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(m(e))}_setWindowSize(e){this._WINDOW_SIZE=e,g.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const o=n.sqr(r),i=d(e);if(!n.eql(o,i))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){y(e);const{px:t,py:r,pz:o}=this,{px:i,py:s,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(i,o)),u=n.eql(n.mul(r,a),n.mul(s,o));return c&&u}negate(){return new b(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,o=n.mul(r,f),{px:i,py:s,pz:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(i,i),h=n.mul(s,s),p=n.mul(a,a),m=n.mul(i,s);return m=n.add(m,m),l=n.mul(i,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(o,p),u=n.add(c,u),c=n.sub(h,u),u=n.add(h,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(o,l),p=n.mul(e,p),m=n.sub(d,p),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,p),d=n.mul(d,m),u=n.add(u,d),p=n.mul(s,a),p=n.add(p,p),d=n.mul(p,m),c=n.sub(c,d),l=n.mul(p,h),l=n.add(l,l),l=n.add(l,l),new b(c,u,l)}add(e){y(e);const{px:r,py:o,pz:i}=this,{px:s,py:a,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const h=t.a,p=n.mul(t.b,f);let m=n.mul(r,s),g=n.mul(o,a),v=n.mul(i,c),w=n.add(r,o),x=n.add(s,a);w=n.mul(w,x),x=n.add(m,g),w=n.sub(w,x),x=n.add(r,i);let E=n.add(s,c);return x=n.mul(x,E),E=n.add(m,v),x=n.sub(x,E),E=n.add(o,i),u=n.add(a,c),E=n.mul(E,u),u=n.add(g,v),E=n.sub(E,u),d=n.mul(h,x),u=n.mul(p,v),d=n.add(u,d),u=n.sub(g,d),d=n.add(g,d),l=n.mul(u,d),g=n.add(m,m),g=n.add(g,m),v=n.mul(h,v),x=n.mul(p,x),g=n.add(g,v),v=n.sub(m,v),v=n.mul(h,v),x=n.add(x,v),m=n.mul(g,x),l=n.add(l,m),m=n.mul(E,x),u=n.mul(w,u),u=n.sub(u,m),m=n.mul(w,g),d=n.mul(E,d),d=n.add(d,m),new b(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,g,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(b.fromAffine)}))}multiplyUnsafe(e){const r=b.ZERO;if(e===u)return r;if(p(e),e===l)return this;const{endo:o}=t;if(!o)return w.unsafeLadder(this,e);let{k1neg:i,k1:s,k2neg:a,k2:c}=o.splitScalar(e),d=r,f=r,h=this;for(;s>u||c>u;)s&l&&(d=d.add(h)),c&l&&(f=f.add(h)),h=h.double(),s>>=l,c>>=l;return i&&(d=d.negate()),a&&(f=f.negate()),f=new b(n.mul(f.px,o.beta),f.py,f.pz),d.add(f)}multiply(e){p(e);let r,o,i=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(i);let{p:u,f:l}=this.wNAF(t),{p:d,f:f}=this.wNAF(c);u=w.constTimeNegate(e,u),d=w.constTimeNegate(a,d),d=new b(n.mul(d.px,s.beta),d.py,d.pz),r=u.add(d),o=l.add(f)}else{const{p:e,f:t}=this.wNAF(i);r=e,o=t}return b.normalizeZ([r,o])[0]}multiplyAndAddUnsafe(e,t,n){const r=b.BASE,o=(e,t)=>t!==u&&t!==l&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,n));return i.is0()?void 0:i}toAffine(e){const{px:t,py:r,pz:o}=this,i=this.is0();null==e&&(e=i?n.ONE:n.inv(o));const s=n.mul(t,e),a=n.mul(r,e),c=n.mul(o,e);if(i)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===l)return!0;if(n)return n(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===l?this:n?n(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,n.ONE),b.ZERO=new b(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:d,isWithinCurveOrder:h}}function m(e,t){const n=e.ORDER;let r=u;for(let f=n-l;f%d===u;f/=d)r+=l;const o=r,i=d<<o-l-l,s=i*d,a=(n-l)/s,c=(a-l)/d,p=s-l,m=i,g=e.pow(t,a),y=e.pow(t,(a+l)/d);let b=(t,n)=>{let r=g,i=e.pow(n,p),s=e.sqr(i);s=e.mul(s,n);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,i),i=e.mul(a,n),s=e.mul(a,t);let u=e.mul(s,i);a=e.pow(u,m);let f=e.eql(a,e.ONE);i=e.mul(s,y),a=e.mul(u,r),s=e.cmov(i,s,f),u=e.cmov(a,u,f);for(let c=o;c>l;c--){let t=c-d;t=d<<t-l;let n=e.pow(u,t);const o=e.eql(n,e.ONE);i=e.mul(s,r),r=e.mul(r,r),n=e.mul(u,r),s=e.cmov(i,s,o),u=e.cmov(n,u,o)}return{isValid:f,value:s}};if(e.ORDER%h===f){const n=(e.ORDER-f)/h,r=e.sqrt(e.neg(t));b=(t,o)=>{let i=e.sqr(o);const s=e.mul(t,o);i=e.mul(i,s);let a=e.pow(i,n);a=e.mul(a,s);const c=e.mul(a,r),u=e.mul(e.sqr(a),o),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return b}t.weierstrassPoints=p,t.weierstrass=function(e){const n=function(e){const t=(0,s.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=n,d=a.BYTES+1,f=2*a.BYTES+1;function h(e){return r.mod(e,c)}function m(e){return r.invert(e,c)}const{ProjectivePoint:g,normPrivateKeyToScalar:y,weierstrassEquation:b,isWithinCurveOrder:v}=p({...n,toBytes(e,t,n){const r=t.toAffine(),i=a.toBytes(r.x),s=o.concatBytes;return n?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==d||2!==n&&3!==n){if(t===f&&4===n){return{x:a.fromBytes(r.subarray(0,a.BYTES)),y:a.fromBytes(r.subarray(a.BYTES,2*a.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${d} compressed bytes or ${f} uncompressed bytes`)}{const e=o.bytesToNumberBE(r);if(!(u<(i=e)&&i<a.ORDER))throw new Error("Point is not on curve");const t=b(e);let s=a.sqrt(t);return 1===(1&n)!==((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var i}}),w=e=>o.bytesToHex(o.numberToBytesBE(e,n.nByteLength));function x(e){return e>c>>l}const E=(e,t,n)=>o.bytesToNumberBE(e.slice(t,n));class _{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const t=n.nByteLength;return e=(0,i.ensureBytes)("compactSignature",e,2*t),new _(E(e,0,t),E(e,t,2*t))}static fromDER(e){const{r:n,s:r}=t.DER.toSig((0,i.ensureBytes)("DER",e));return new _(n,r)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:r,recovery:o}=this,s=C((0,i.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const c=2===o||3===o?t+n.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=0===(1&o)?"02":"03",l=g.fromHex(u+w(c)),d=m(c),f=h(-s*d),p=h(r*d),y=g.BASE.multiplyAndAddUnsafe(l,f,p);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return x(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const k={isValidPrivateKey(e){try{return y(e),!0}catch(t){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const e=r.getMinHashLength(n.n);return r.mapHashToField(n.randomBytes(e),n.n)},precompute:(e=8,t=g.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function S(e){const t=e instanceof Uint8Array,n="string"===typeof e,r=(t||n)&&e.length;return t?r===d||r===f:n?r===2*d||r===2*f:e instanceof g}const I=n.bits2int||function(e){const t=o.bytesToNumberBE(e),r=8*e.length-n.nBitLength;return r>0?t>>BigInt(r):t},C=n.bits2int_modN||function(e){return h(I(e))},T=o.bitMask(n.nBitLength);function A(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(u<=e&&e<T))throw new Error(`bigint expected < 2^${n.nBitLength}`);return o.numberToBytesBE(e,n.nByteLength)}function P(e,t,r=O){if(["recovered","canonical"].some((e=>e in r)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:c}=n;let{lowS:d,prehash:f,extraEntropy:p}=r;null==d&&(d=!0),e=(0,i.ensureBytes)("msgHash",e),f&&(e=(0,i.ensureBytes)("prehashed msgHash",s(e)));const b=C(e),w=y(t),E=[A(w),A(b)];if(null!=p){const e=!0===p?c(a.BYTES):p;E.push((0,i.ensureBytes)("extraEntropy",e))}const k=o.concatBytes(...E),S=b;return{seed:k,k2sig:function(e){const t=I(e);if(!v(t))return;const n=m(t),r=g.BASE.multiply(t).toAffine(),o=h(r.x);if(o===u)return;const i=h(n*h(S+o*w));if(i===u)return;let s=(r.x===o?0:2)|Number(r.y&l),a=i;return d&&x(i)&&(a=function(e){return x(e)?h(-e):e}(i),s^=1),new _(o,a,s)}}}const O={lowS:n.lowS,prehash:!1},j={lowS:n.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:n,getPublicKey:function(e,t=!0){return g.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(S(e))throw new Error("first arg must be private key");if(!S(t))throw new Error("second arg must be public key");return g.fromHex(t).multiply(y(e)).toRawBytes(n)},sign:function(e,t,r=O){const{seed:i,k2sig:s}=P(e,t,r),a=n;return o.createHmacDrbg(a.hash.outputLen,a.nByteLength,a.hmac)(i,s)},verify:function(e,r,o,s=j){const a=e;if(r=(0,i.ensureBytes)("msgHash",r),o=(0,i.ensureBytes)("publicKey",o),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=s;let l,d;try{if("string"===typeof a||a instanceof Uint8Array)try{l=_.fromDER(a)}catch(E){if(!(E instanceof t.DER.Err))throw E;l=_.fromCompact(a)}else{if("object"!==typeof a||"bigint"!==typeof a.r||"bigint"!==typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new _(e,t)}}d=g.fromHex(o)}catch(k){if("PARSE"===k.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&l.hasHighS())return!1;u&&(r=n.hash(r));const{r:f,s:p}=l,y=C(r),b=m(p),v=h(y*b),w=h(f*b),x=g.BASE.multiplyAndAddUnsafe(d,v,w)?.toAffine();return!!x&&h(x.x)===f},ProjectivePoint:g,Signature:_,utils:k}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if(r.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=m(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let o,i,s,a,c,u,l,d;o=e.sqr(r),o=e.mul(o,t.Z),i=e.sqr(o),i=e.add(i,o),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),l=e.mul(o,s);const{isValid:f,value:h}=n(i,u);d=e.mul(o,r),d=e.mul(d,h),l=e.cmov(l,s,f),d=e.cmov(d,h,f);const p=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,p),l=e.div(l,a),{x:l,y:d}}}},20050:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const r=n(81205),o=n(74574),i=n(3188),s=n(49575),a=n(41830),c=n(11534),u=n(32286),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function m(e){const t=l,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,p=(0,i.pow2)(f,n,t)*f%t,m=(0,i.pow2)(p,n,t)*f%t,y=(0,i.pow2)(m,h,t)*d%t,b=(0,i.pow2)(y,o,t)*y%t,v=(0,i.pow2)(b,s,t)*b%t,w=(0,i.pow2)(v,c,t)*v%t,x=(0,i.pow2)(w,u,t)*w%t,E=(0,i.pow2)(x,c,t)*v%t,_=(0,i.pow2)(E,n,t)*f%t,k=(0,i.pow2)(_,a,t)*b%t,S=(0,i.pow2)(k,r,t)*d%t,I=(0,i.pow2)(S,h,t);if(!g.eql(g.sqr(I),e))throw new Error("Cannot find square root");return I}const g=(0,i.Field)(l,void 0,void 0,{sqrt:m});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:g,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,a=BigInt("0x100000000000000000000000000000000"),c=p(s*e,t),u=p(-r*e,t);let l=(0,i.mod)(e-c*n-u*o,t),h=(0,i.mod)(-c*r-u*s,t);const m=l>a,g=h>a;if(m&&(l=t-l),g&&(h=t-h),l>a||h>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:l,k2neg:g,k2:h}}}},r.sha256);const y=BigInt(0),b=e=>"bigint"===typeof e&&y<e&&e<l,v={};function w(e,...t){let n=v[e];if(void 0===n){const t=(0,r.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));n=(0,a.concatBytes)(t,t),v[e]=n}return(0,r.sha256)((0,a.concatBytes)(n,...t))}const x=e=>e.toRawBytes(!0).slice(1),E=e=>(0,a.numberToBytesBE)(e,32),_=e=>(0,i.mod)(e,l),k=e=>(0,i.mod)(e,d),S=t.secp256k1.ProjectivePoint;function I(e){let n=t.secp256k1.utils.normPrivateKeyToScalar(e),r=S.fromPrivateKey(n);return{scalar:r.hasEvenY()?n:k(-n),bytes:x(r)}}function C(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=_(e*e);let n=m(_(t*e+BigInt(7)));n%h!==y&&(n=_(-n));const r=new S(e,n,f);return r.assertValidity(),r}function T(...e){return k((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function A(e){return I(e).bytes}function P(e,t,n=(0,o.randomBytes)(32)){const r=(0,a.ensureBytes)("message",e),{bytes:i,scalar:s}=I(t),c=(0,a.ensureBytes)("auxRand",n,32),u=E(s^(0,a.bytesToNumberBE)(w("BIP0340/aux",c))),l=w("BIP0340/nonce",u,i,r),d=k((0,a.bytesToNumberBE)(l));if(d===y)throw new Error("sign failed: k is zero");const{bytes:f,scalar:h}=I(d),p=T(f,i,r),m=new Uint8Array(64);if(m.set(f,0),m.set(E(k(h+p*s)),32),!O(m,r,i))throw new Error("sign: Invalid signature produced");return m}function O(e,t,n){const r=(0,a.ensureBytes)("signature",e,64),o=(0,a.ensureBytes)("message",t),i=(0,a.ensureBytes)("publicKey",n,32);try{const e=C((0,a.bytesToNumberBE)(i)),t=(0,a.bytesToNumberBE)(r.subarray(0,32));if(!b(t))return!1;const n=(0,a.bytesToNumberBE)(r.subarray(32,64));if(!("bigint"===typeof(l=n)&&y<l&&l<d))return!1;const f=T(E(t),x(e),o),h=(s=e,c=n,u=k(-f),S.BASE.multiplyAndAddUnsafe(s,c,u));return!(!h||!h.hasEvenY()||h.toAffine().x!==t)}catch(f){return!1}var s,c,u,l}t.schnorr={getPublicKey:A,sign:P,verify:O,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:C,pointToBytes:x,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:w,mod:i.mod}};const j=(()=>(0,c.isogenyMap)(g,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),M=(()=>(0,s.mapToCurveSimpleSWU)(g,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:g.create(BigInt("-11"))}))(),R=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:n}=M(g.create(e[0]));return j(t,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:g.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();t.hashToCurve=R.hashToCurve,t.encodeToCurve=R.encodeToCurve},71427:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!==typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=n,t.bool=r,t.bytes=o,t.hash=i,t.exists=s,t.output=a;const c={number:n,bool:r,bytes:o,hash:i,exists:s,output:a};t.default=c},84762:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const r=n(71427),o=n(74574);class i extends o.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){(0,r.exists)(this);const{view:t,buffer:n,blockLen:i}=this,s=(e=(0,o.toBytes)(e)).length;for(let r=0;r<s;){const a=Math.min(i-this.pos,s-r);if(a!==i)n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===i&&(this.process(t,0),this.pos=0);else{const t=(0,o.createView)(e);for(;i<=s-r;r+=i)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.exists)(this),(0,r.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:i,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(n,0),a=0);for(let r=a;r<i;r++)t[r]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,i-8,BigInt(8*this.length),s),this.process(n,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let r=0;r<l;r++)c.setUint32(4*r,d[r],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}}t.SHA2=i},30066:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const n=BigInt(2**32-1),r=BigInt(32);function o(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function i(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:a}=o(e[i],t);[n[i],r[i]]=[s,a]}return[n,r]}t.fromBig=o,t.split=i;const s=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=s;const a=(e,t,n)=>e>>>n;t.shrSH=a;const c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;const u=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=u;const l=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=l;const d=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=d;const f=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=f;const h=(e,t)=>t;t.rotr32H=h;const p=(e,t)=>e;t.rotr32L=p;const m=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=m;const g=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=g;const y=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=y;const b=(e,t,n)=>e<<n-32|t>>>64-n;function v(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}t.rotlBL=b,t.add=v;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=w;const x=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;t.add3H=x;const E=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=E;const _=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0;t.add4H=_;const k=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0);t.add5L=k;const S=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0;t.add5H=S;const I={fromBig:o,split:i,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:d,rotrBL:f,rotr32H:h,rotr32L:p,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:v,add3L:w,add3H:x,add4L:E,add4H:_,add5H:S,add5L:k};t.default=I},922:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(71427),o=n(74574);class i extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(e);const n=(0,o.toBytes)(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let r=0;r<s.length;r++)s[r]^=54;this.iHash.update(s),this.oHash=e.create();for(let r=0;r<s.length;r++)s[r]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,r.exists)(this),this.iHash.update(e),this}digestInto(e){(0,r.exists)(this),(0,r.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:o,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=o,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i;t.hmac=(e,t,n)=>new i(e,t).update(n).digest(),t.hmac.create=(e,t)=>new i(e,t)},81205:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const r=n(84762),o=n(74574),i=(e,t,n)=>e&t^e&n^t&n,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends r.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:a}=this;return[e,t,n,r,o,i,s,a]}set(e,t,n,r,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let o=0;o<16;o++,t+=4)c[o]=e.getUint32(t,!1);for(let i=16;i<64;i++){const e=c[i-15],t=c[i-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,r=(0,o.rotr)(t,17)^(0,o.rotr)(t,19)^t>>>10;c[i]=r+c[i-7]+n+c[i-16]|0}let{A:n,B:r,C:a,D:u,E:l,F:d,G:f,H:h}=this;for(let m=0;m<64;m++){const e=h+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((p=l)&d^~p&f)+s[m]+c[m]|0,t=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+i(n,r,a)|0;h=f,f=d,d=l,l=u+e|0,u=a,a=r,r=n,n=e+t|0}var p;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,r,a,u,l,d,f,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new u)),t.sha224=(0,o.wrapConstructor)((()=>new l))},7217:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const r=n(71427),o=n(30066),i=n(74574),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(7),h=BigInt(256),p=BigInt(113);for(let _=0,k=l,S=1,I=0;_<24;_++){[S,I]=[I,(2*S+3*I)%5],s.push(2*(5*I+S)),a.push((_+1)*(_+2)/2%64);let e=u;for(let t=0;t<7;t++)k=(k<<l^(k>>f)*p)%h,k&d&&(e^=l<<(l<<BigInt(t))-l);c.push(e)}const[m,g]=(0,o.split)(c,!0),y=(e,t,n)=>n>32?(0,o.rotlBH)(e,t,n):(0,o.rotlSH)(e,t,n),b=(e,t,n)=>n>32?(0,o.rotlBL)(e,t,n):(0,o.rotlSL)(e,t,n);function v(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,i=n[o],s=n[o+1],a=y(i,s,1)^n[t],c=b(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=a[n],i=y(t,o,r),c=b(t,o,r),u=s[n];t=e[u],o=e[u+1],e[u]=i,e[u+1]=c}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=m[r],e[1]^=g[r]}n.fill(0)}t.keccakP=v;class w extends i.Hash{constructor(e,t,n,o=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.number)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,r.exists)(this);const{blockLen:t,state:n}=this,o=(e=(0,i.toBytes)(e)).length;for(let r=0;r<o;){const i=Math.min(t-this.pos,o-r);for(let t=0;t<i;t++)n[this.pos++]^=e[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,r.exists)(this,!1),(0,r.bytes)(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new w(t,n,r,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=w;const x=(e,t,n)=>(0,i.wrapConstructor)((()=>new w(t,e,n)));t.sha3_224=x(6,144,28),t.sha3_256=x(6,136,32),t.sha3_384=x(6,104,48),t.sha3_512=x(6,72,64),t.keccak_224=x(1,144,28),t.keccak_256=x(1,136,32),t.keccak_384=x(1,104,48),t.keccak_512=x(1,72,64);const E=(e,t,n)=>(0,i.wrapXOFConstructorWithOpts)(((r={})=>new w(t,e,void 0===r.dkLen?n:r.dkLen,!0)));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},74574:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const r=n(922),o=e=>e instanceof Uint8Array;t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=i[e[n]];return t},t.hexToBytes=function(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(t/2);for(let r=0;r<n.length;r++){const t=2*r,o=e.slice(t,t+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");n[r]=i}return n};function s(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"===typeof e&&(e=s(e)),!o(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.nextTick=async()=>{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let i=0;i<e;i++){r(i);const e=Date.now()-o;e>=0&&e<n||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let n=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(a(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(a(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"===typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},69159:function(){},35883:function(){},46601:function(){},18971:function(){},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},90843:function(e){"use strict";e.exports={xen:{isInternal:!0,name:"XEN Crypto",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",tokenSymbol:"XEN",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-crypto",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",whitePaper:"https://faircrypto.org/xencryptolp.pdf",logoUrl:"/favicon.ico",contracts:["contract"],envPrefix:["CONTRACT_ADDRESS"],termsText:"/terms"},xenft:{isInternal:!0,name:"XENFT",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XENFT",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",whitePaper:"https://faircrypto.org/xenft_litepaper.pdf",logoUrl:"/favicon.ico",contracts:["minter","lowBurnMinter","staker","burner"],envPrefix:["MINTER_ADDRESS","LOW_BURN_MINTER_ADDRESS","STAKER_ADDRESS","BURNER_ADDRESS"],termsText:"/terms"},xenknights:{isInternal:!0,name:"XENKnights",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-Knights",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",logoUrl:"/favicon.ico",contracts:["knights"],envPrefix:["KNIGHTS_ADDRESS"],termsText:"/terms_knights"},ticker:{isInternal:!0,name:"XENTicker",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-Knights",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",logoUrl:"/favicon.ico",contracts:["ticker"],envPrefix:["TICKER_ADDRESS"],termsText:"/terms"},tokenizer:{isInternal:!0,name:"XENTokenizer",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-Knights",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",logoUrl:"/favicon.ico",contracts:["tokenizer"],envPrefix:["TOKENIZER_ADDRESS"],termsText:"/terms"},varstaker:{isInternal:!0,name:"XENVarStaker",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-Knights",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",logoUrl:"/favicon.ico",contracts:["varStaker"],envPrefix:["VARSTAKER_ADDRESS"],termsText:"/terms"},xeth:{isInternal:!0,name:"xETH",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-Knights",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",logoUrl:"/favicon.ico",contracts:["xEth"],envPrefix:["XETH_ADDRESS"],termsText:"/terms"},xhex:{isInternal:!0,name:"XHEX",copyright:"Copyright \xa9",owner:"Fair Crypto Foundation",license:"All Rights Reserved. ",web:"https://faircrypto.org",twitter:"https://twitter.com/XEN_Crypto",telegram:"https://t.me/XENCryptoTalk",youtube:"https://m.youtube.com/channel/UCiw5nyHHt9BPHvoRbcGNehA/playlists",github:"https://github.com/FairCrypto/XEN-Knights",discord:"https://discord.com/invite/rcAhrKWJb6",reddit:"https://www.reddit.com/r/xencrypto/",logoUrl:"/favicon.ico",contracts:["xHex"],envPrefix:["XHEX_ADDRESS"],termsText:"/terms"},dbxen:{name:"DBXen",copyright:"Community Project \xa9",tokenSymbol:"DXN",web:"https://dbxen.org",twitter:"https://twitter.com/DBXen_crypto",github:"https://github.com/deb0x/dbXenBurnerProject",whitePaper:"https://dbxen.gitbook.io/dbxen-litepaper/",telegram:"https://t.me/+_Q3prZI35gJkZmI0",contracts:["dbXen","dbXenViews","dxnToken"],envPrefix:["DBXEN_ADDRESS","DBXEN_VIEWS_ADDRESS","DXN_TOKEN_ADDRESS"],termsText:"/terms_community"},xenlonmars:{name:"Xenlon Mars",copyright:"Community Project \xa9",web:"https://www.xenlonmars.com/",tokenSymbol:"XLON",github:"https://github.com/xenlonmars/xenlonmars",twitter:"https://twitter.com/xenlonmars",contracts:["xenlonMars","xlonToken"],envPrefix:["XENLON_MARS_ADDRESS","XLON_TOKEN_ADDRESS"],termsText:"/terms_community"},fenix:{name:"Fenix",copyright:"Community Project \xa9",web:"https://fenix.fyi",tokenSymbol:"FENIX",logoUrl:"/logos/fenix-logo.svg",twitter:"https://twitter.com/fenix_protocol",telegram:"https://t.me/fenix_protocol",github:"https://github.com/atomizexyz",whitePaper:"http://github.com/atomizexyz/litepaper",contracts:["fenix"],envPrefix:["FENIX_ADDRESS"],termsText:"/terms_community"}}},31504:function(e,t,n){"use strict";var r=n(48764).Buffer;const o=n(26729),i=n(65886);class s extends o.EventEmitter{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(e,t="ws://localhost:8080",{autoconnect:n=!0,reconnect:r=!0,reconnect_interval:o=1e3,max_reconnects:s=5,...a}={},c,u){super(),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=n,this.ready=!1,this.reconnect=r,this.reconnect_timer_id=void 0,this.reconnect_interval=o,this.max_reconnects=s,this.rest_options=a,this.current_reconnects=0,this.generate_request_id=c||(()=>++this.rpc_id),this.dataPack=u||new i.DefaultDataPack,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,n,r){return r||"object"!==typeof n||(r=n,n=null),new Promise(((o,i)=>{if(!this.ready)return i(new Error("socket not ready"));const s=this.generate_request_id(e,t),a={jsonrpc:"2.0",method:e,params:t||void 0,id:s};this.socket.send(this.dataPack.encode(a),r,(e=>{if(e)return i(e);this.queue[s]={promise:[o,i]},n&&(this.queue[s].timeout=setTimeout((()=>{delete this.queue[s],i(new Error("reply timeout"))}),n))}))}))}async login(e){const t=await this.call("rpc.login",e);if(!t)throw new Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise(((n,r)=>{if(!this.ready)return r(new Error("socket not ready"));const o={jsonrpc:"2.0",method:e,params:t};this.socket.send(this.dataPack.encode(o),(e=>{if(e)return r(e);n()}))}))}async subscribe(e){"string"===typeof e&&(e=[e]);const t=await this.call("rpc.on",e);if("string"===typeof e&&"ok"!==t[e])throw new Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"===typeof e&&(e=[e]);const t=await this.call("rpc.off",e);if("string"===typeof e&&"ok"!==t[e])throw new Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",(()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0})),this.socket.addEventListener("message",(({data:e})=>{e instanceof ArrayBuffer&&(e=r.from(e).toString());try{e=this.dataPack.decode(e)}catch(t){return}if(e.notification&&this.listeners(e.notification).length){if(!Object.keys(e.params).length)return this.emit(e.notification);const t=[e.notification];if(e.params.constructor===Object)t.push(e.params);else for(let n=0;n<e.params.length;n++)t.push(e.params[n]);return Promise.resolve().then((()=>{this.emit.apply(this,t)}))}if(!this.queue[e.id])return e.method?Promise.resolve().then((()=>{this.emit(e.method,e?.params)})):void 0;"error"in e==="result"in e&&this.queue[e.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[e.id].timeout&&clearTimeout(this.queue[e.id].timeout),e.error?this.queue[e.id].promise[1](e.error):this.queue[e.id].promise[0](e.result),delete this.queue[e.id]})),this.socket.addEventListener("error",(e=>this.emit("error",e))),this.socket.addEventListener("close",(({code:n,reason:r})=>{this.ready&&setTimeout((()=>this.emit("close",n,r)),0),this.ready=!1,this.socket=void 0,1e3!==n&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)&&(this.reconnect_timer_id=setTimeout((()=>this._connect(e,t)),this.reconnect_interval)))}))}}t.Z=s},26731:function(e,t,n){"use strict";const r=n(26729);class o extends r.EventEmitter{socket;constructor(e,t,n){super(),this.socket=new window.WebSocket(e,n),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,n){const r=n||t;try{this.socket.send(e),r()}catch(o){r(o)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,n){this.socket.addEventListener(e,t,n)}}t.Z=function(e,t){return new o(e,t)}},65886:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createError=t.DefaultDataPack=void 0;const n=new Map([[-32e3,"Event not provided"],[-32600,"Invalid Request"],[-32601,"Method not found"],[-32602,"Invalid params"],[-32603,"Internal error"],[-32604,"Params not found"],[-32605,"Method forbidden"],[-32606,"Event forbidden"],[-32700,"Parse error"]]);t.DefaultDataPack=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},t.createError=function(e,t){const r={code:e,message:n.get(e)||"Internal Server Error"};return t&&(r.data=t),r}},18281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=void 0,t.parseAccount=function(e){return"string"===typeof e?{address:e,type:"json-rpc"}:e}},94873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=void 0;const r=n(3001),o=n(12922);t.publicKeyToAddress=function(e){const t=(0,o.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,r.checksumAddress)(`0x${t}`)}},59442:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAddress=void 0;const r=n(86725),o=n(52366),i=n(71124),s=n(31693),a=n(29957),c=n(62002),u=n(57961),l=n(41177),d=n(75007),f=n(94303),h=n(81746);t.getEnsAddress=async function(e,{blockNumber:t,blockTag:n,coinType:p,name:m,universalResolverAddress:g}){let y=g;if(!y){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");y=(0,s.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const s=(0,i.encodeFunctionData)({abi:r.addressResolverAbi,functionName:"addr",...null!=p?{args:[(0,l.namehash)(m),BigInt(p)]}:{args:[(0,l.namehash)(m)]}}),u=await(0,f.getAction)(e,h.readContract,"readContract")({address:y,abi:r.universalResolverResolveAbi,functionName:"resolve",args:[(0,c.toHex)((0,d.packetToBytes)(m)),s],blockNumber:t,blockTag:n});if("0x"===u[0])return null;const g=(0,o.decodeFunctionResult)({abi:r.addressResolverAbi,args:null!=p?[(0,l.namehash)(m),BigInt(p)]:void 0,functionName:"addr",data:u[0]});return"0x"===g||"0x00"===(0,a.trim)(g)?null:g}catch(b){if((0,u.isNullUniversalResolverError)(b,"resolve"))return null;throw b}}},4418:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAvatar=void 0;const r=n(28871),o=n(94303),i=n(84011);t.getEnsAvatar=async function(e,{blockNumber:t,blockTag:n,gatewayUrls:s,name:a,universalResolverAddress:c}){const u=await(0,o.getAction)(e,i.getEnsText,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:a,universalResolverAddress:c});if(!u)return null;try{return await(0,r.parseAvatarRecord)(e,{record:u,gatewayUrls:s})}catch{return null}}},33352:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsName=void 0;const r=n(86725),o=n(31693),i=n(62002),s=n(57961),a=n(75007),c=n(94303),u=n(81746);t.getEnsName=async function(e,{address:t,blockNumber:n,blockTag:l,universalResolverAddress:d}){let f=d;if(!f){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");f=(0,o.getChainContractAddress)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const h=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const[o,s]=await(0,c.getAction)(e,u.readContract,"readContract")({address:f,abi:r.universalResolverReverseAbi,functionName:"reverse",args:[(0,i.toHex)((0,a.packetToBytes)(h))],blockNumber:n,blockTag:l});return t.toLowerCase()!==s.toLowerCase()?null:o}catch(p){if((0,s.isNullUniversalResolverError)(p,"reverse"))return null;throw p}}},37887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsResolver=void 0;const r=n(31693),o=n(62002),i=n(75007),s=n(94303),a=n(81746);t.getEnsResolver=async function(e,{blockNumber:t,blockTag:n,name:c,universalResolverAddress:u}){let l=u;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=(0,r.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[d]=await(0,s.getAction)(e,a.readContract,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.toHex)((0,i.packetToBytes)(c))],blockNumber:t,blockTag:n});return d}},84011:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsText=void 0;const r=n(86725),o=n(52366),i=n(71124),s=n(31693),a=n(62002),c=n(57961),u=n(41177),l=n(75007),d=n(94303),f=n(81746);t.getEnsText=async function(e,{blockNumber:t,blockTag:n,name:h,key:p,universalResolverAddress:m}){let g=m;if(!g){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");g=(0,s.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const s=await(0,d.getAction)(e,f.readContract,"readContract")({address:g,abi:r.universalResolverResolveAbi,functionName:"resolve",args:[(0,a.toHex)((0,l.packetToBytes)(h)),(0,i.encodeFunctionData)({abi:r.textResolverAbi,functionName:"text",args:[(0,u.namehash)(h),p]})],blockNumber:t,blockTag:n});if("0x"===s[0])return null;const c=(0,o.decodeFunctionResult)({abi:r.textResolverAbi,functionName:"text",data:s[0]});return""===c?null:c}catch(y){if((0,c.isNullUniversalResolverError)(y,"resolve"))return null;throw y}}},8880:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventParameters=t.getFunctionParameters=t.getContract=void 0;const r=n(94303),o=n(62068),i=n(7848),s=n(48177),a=n(81746),c=n(41281),u=n(98877),l=n(9650);function d(e){const t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function f(e,t){let n=!1;Array.isArray(e[0])?n=!0:1===e.length?n=t.inputs.some((e=>e.indexed)):2===e.length&&(n=!0);return{args:n?e[0]:void 0,options:(n?e[1]:e[0])??{}}}t.getContract=function({abi:e,address:t,publicClient:n,walletClient:h}){const p=void 0!==n&&null!==n,m=void 0!==h&&null!==h,g={};let y=!1,b=!1,v=!1;for(const r of e)if("function"===r.type?"view"===r.stateMutability||"pure"===r.stateMutability?y=!0:b=!0:"event"===r.type&&(v=!0),y&&b&&v)break;return p&&(y&&(g.read=new Proxy({},{get:(o,i)=>(...o)=>{const{args:s,options:c}=d(o);return(0,r.getAction)(n,a.readContract,"readContract")({abi:e,address:t,functionName:i,args:s,...c})}})),b&&(g.simulate=new Proxy({},{get:(o,i)=>(...o)=>{const{args:s,options:a}=d(o);return(0,r.getAction)(n,c.simulateContract,"simulateContract")({abi:e,address:t,functionName:i,args:s,...a})}})),v&&(g.createEventFilter=new Proxy({},{get:(i,s)=>(...i)=>{const a=e.find((e=>"event"===e.type&&e.name===s)),{args:c,options:u}=f(i,a);return(0,r.getAction)(n,o.createContractEventFilter,"createContractEventFilter")({abi:e,address:t,eventName:s,args:c,...u})}}),g.getEvents=new Proxy({},{get:(o,i)=>(...o)=>{const a=e.find((e=>"event"===e.type&&e.name===i)),{args:c,options:u}=f(o,a);return(0,r.getAction)(n,s.getContractEvents,"getContractEvents")({abi:e,address:t,eventName:i,args:c,...u})}}),g.watchEvent=new Proxy({},{get:(o,i)=>(...o)=>{const s=e.find((e=>"event"===e.type&&e.name===i)),{args:a,options:c}=f(o,s);return(0,r.getAction)(n,u.watchContractEvent,"watchContractEvent")({abi:e,address:t,eventName:i,args:a,...c})}}))),m&&b&&(g.write=new Proxy({},{get:(n,o)=>(...n)=>{const{args:i,options:s}=d(n);return(0,r.getAction)(h,l.writeContract,"writeContract")({abi:e,address:t,functionName:o,args:i,...s})}})),(p||m)&&b&&(g.estimateGas=new Proxy({},{get:(o,s)=>(...o)=>{const{args:a,options:c}=d(o),u=n??h;return(0,r.getAction)(u,i.estimateContractGas,"estimateContractGas")({abi:e,address:t,functionName:s,args:a,...c,account:c.account??h.account})}})),g.address=t,g.abi=e,g},t.getFunctionParameters=d,t.getEventParameters=f},21739:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRevertErrorData=t.call=void 0;const r=n(18281),o=n(86725),i=n(15251),s=n(24304),a=n(28890),c=n(4924),u=n(52366),l=n(71124),d=n(31693),f=n(62002),h=n(25950),p=n(29824),m=n(14928),g=n(30251),y=n(77365);function b(e){if(!(e instanceof s.BaseError))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}t.call=async function(e,t){const{account:s=e.account,batch:v=Boolean(e.batch?.multicall),blockNumber:w,blockTag:x="latest",accessList:E,data:_,gas:k,gasPrice:S,maxFeePerGas:I,maxPriorityFeePerGas:C,nonce:T,to:A,value:P,...O}=t,j=s?(0,r.parseAccount)(s):void 0;try{(0,y.assertRequest)(t);const n=(w?(0,f.numberToHex)(w):void 0)||x,r=e.chain?.formatters?.transactionRequest?.format,s=(r||m.formatTransactionRequest)({...(0,p.extract)(O,{format:r}),from:j?.address,accessList:E,data:_,gas:k,gasPrice:S,maxFeePerGas:I,maxPriorityFeePerGas:C,nonce:T,to:A,value:P});if(v&&function({request:e}){const{data:t,to:n,...r}=e;return!!t&&(!t.startsWith(i.aggregate3Signature)&&(!!n&&!(Object.values(r).filter((e=>"undefined"!==typeof e)).length>0)))}({request:s}))try{return await async function(e,t){const{batchSize:n=1024,wait:r=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:h,multicallAddress:p,to:m}=t;let y=p;if(!y){if(!e.chain)throw new a.ClientChainNotConfiguredError;y=(0,d.getChainContractAddress)({blockNumber:i,chain:e.chain,contract:"multicall3"})}const b=(i?(0,f.numberToHex)(i):void 0)||s,{schedule:v}=(0,g.createBatchScheduler)({id:`${e.uid}.${b}`,wait:r,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*n},fn:async t=>{const n=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),r=(0,l.encodeFunctionData)({abi:o.multicall3Abi,args:[n],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:r,to:y},b]});return(0,u.decodeFunctionResult)({abi:o.multicall3Abi,args:[n],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:w,success:x}]=await v({data:h,to:m});if(!x)throw new c.RawContractError({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...s,blockNumber:w,blockTag:x})}catch(M){if(!(M instanceof a.ClientChainNotConfiguredError)&&!(M instanceof a.ChainDoesNotSupportContract))throw M}const h=await e.request({method:"eth_call",params:n?[s,n]:[s]});return"0x"===h?{data:void 0}:{data:h}}catch(M){const r=b(M),{offchainLookup:o,offchainLookupSignature:i}=await Promise.resolve().then((()=>n(10062)));if(r?.slice(0,10)===i&&A)return{data:await o(e,{data:r,to:A})};throw(0,h.getCallError)(M,{...t,account:j,chain:e.chain})}},t.getRevertErrorData=b},28061:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBlockFilter=void 0;const r=n(75693);t.createBlockFilter=async function(e){const t=(0,r.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}},62068:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createContractEventFilter=void 0;const r=n(86778),o=n(62002),i=n(75693);t.createContractEventFilter=async function(e,{address:t,abi:n,args:s,eventName:a,fromBlock:c,strict:u,toBlock:l}){const d=(0,i.createFilterRequestScope)(e,{method:"eth_newFilter"}),f=a?(0,r.encodeEventTopics)({abi:n,args:s,eventName:a}):void 0,h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"===typeof l?(0,o.numberToHex)(l):l,topics:f}]});return{abi:n,args:s,eventName:a,id:h,request:d(h),strict:u,type:"event"}}},58473:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEventFilter=void 0;const r=n(86778),o=n(62002),i=n(75693);t.createEventFilter=async function(e,{address:t,args:n,event:s,events:a,fromBlock:c,strict:u,toBlock:l}={}){const d=a??(s?[s]:void 0),f=(0,i.createFilterRequestScope)(e,{method:"eth_newFilter"});let h=[];d&&(h=[d.flatMap((e=>(0,r.encodeEventTopics)({abi:[e],eventName:e.name,args:n})))],s&&(h=h[0]));const p=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"===typeof l?(0,o.numberToHex)(l):l,...h.length?{topics:h}:{}}]});return{abi:d,args:n,eventName:s?s.name:void 0,fromBlock:c,id:p,request:f(p),strict:u,toBlock:l,type:"event"}}},56906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingTransactionFilter=void 0;const r=n(75693);t.createPendingTransactionFilter=async function(e){const t=(0,r.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}},7848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateContractGas=void 0;const r=n(18281),o=n(71124),i=n(30548),s=n(94303),a=n(36392);t.estimateContractGas=async function(e,{abi:t,address:n,args:c,functionName:u,...l}){const d=(0,o.encodeFunctionData)({abi:t,args:c,functionName:u});try{return await(0,s.getAction)(e,a.estimateGas,"estimateGas")({data:d,to:n,...l})}catch(f){const e=l.account?(0,r.parseAccount)(l.account):void 0;throw(0,i.getContractError)(f,{abi:t,address:n,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:u,sender:e?.address})}}},85273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.internal_estimateFeesPerGas=t.estimateFeesPerGas=void 0;const r=n(3242),o=n(94303),i=n(13962),s=n(90455),a=n(64186);async function c(e,t){const{block:n,chain:c=e.chain,request:u,type:l="eip1559"}=t||{},d=await(async()=>"function"===typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:n,client:e,request:u}):c?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new r.BaseFeeScalarError;const f=10**(d.toString().split(".")[1]?.length??0),h=e=>e*BigInt(Math.ceil(d*f))/BigInt(f),p=n||await(0,o.getAction)(e,s.getBlock,"getBlock")({});if("function"===typeof c?.fees?.estimateFeesPerGas)return c.fees.estimateFeesPerGas({block:n,client:e,multiply:h,request:u,type:l});if("eip1559"===l){if("bigint"!==typeof p.baseFeePerGas)throw new r.Eip1559FeesNotSupportedError;const t=u?.maxPriorityFeePerGas?u.maxPriorityFeePerGas:await(0,i.internal_estimateMaxPriorityFeePerGas)(e,{block:p,chain:c,request:u}),n=h(p.baseFeePerGas);return{maxFeePerGas:u?.maxFeePerGas??n+t,maxPriorityFeePerGas:t}}return{gasPrice:u?.gasPrice??h(await(0,o.getAction)(e,a.getGasPrice,"getGasPrice")({}))}}t.estimateFeesPerGas=async function(e,t){return c(e,t)},t.internal_estimateFeesPerGas=c},36392:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=void 0;const r=n(18281),o=n(29723),i=n(62002),s=n(17019),a=n(29824),c=n(14928),u=n(77365),l=n(8969);t.estimateGas=async function(e,t){const n=t.account??e.account;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/public/estimateGas"});const d=(0,r.parseAccount)(n);try{const{accessList:n,blockNumber:r,blockTag:o,data:s,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:g,to:y,value:b,...v}="local"===d.type?await(0,l.prepareTransactionRequest)(e,t):t,w=(r?(0,i.numberToHex)(r):void 0)||o;(0,u.assertRequest)(t);const x=e.chain?.formatters?.transactionRequest?.format,E=(x||c.formatTransactionRequest)({...(0,a.extract)(v,{format:x}),from:d.address,accessList:n,data:s,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:g,to:y,value:b}),_=await e.request({method:"eth_estimateGas",params:w?[E,w]:[E]});return BigInt(_)}catch(f){throw(0,s.getEstimateGasError)(f,{...t,account:d,chain:e.chain})}}},13962:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.internal_estimateMaxPriorityFeePerGas=t.estimateMaxPriorityFeePerGas=void 0;const r=n(3242),o=n(39581),i=n(94303),s=n(90455),a=n(64186);async function c(e,t){const{block:n,chain:c=e.chain,request:u}=t||{};if("function"===typeof c?.fees?.defaultPriorityFee){const t=n||await(0,i.getAction)(e,s.getBlock,"getBlock")({});return c.fees.defaultPriorityFee({block:t,client:e,request:u})}if("undefined"!==typeof c?.fees?.defaultPriorityFee)return c?.fees?.defaultPriorityFee;try{const t=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,o.hexToBigInt)(t)}catch{const[t,o]=await Promise.all([n?Promise.resolve(n):(0,i.getAction)(e,s.getBlock,"getBlock")({}),(0,i.getAction)(e,a.getGasPrice,"getGasPrice")({})]);if("bigint"!==typeof t.baseFeePerGas)throw new r.Eip1559FeesNotSupportedError;const c=o-t.baseFeePerGas;return c<0n?0n:c}}t.estimateMaxPriorityFeePerGas=async function(e,t){return c(e,t)},t.internal_estimateMaxPriorityFeePerGas=c},32572:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=void 0;const r=n(62002);t.getBalance=async function(e,{address:t,blockNumber:n,blockTag:o="latest"}){const i=n?(0,r.numberToHex)(n):void 0,s=await e.request({method:"eth_getBalance",params:[t,i||o]});return BigInt(s)}},90455:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlock=void 0;const r=n(88577),o=n(62002),i=n(49906);t.getBlock=async function(e,{blockHash:t,blockNumber:n,blockTag:s,includeTransactions:a}={}){const c=s??"latest",u=a??!1,l=void 0!==n?(0,o.numberToHex)(n):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[l||c,u]}),!d)throw new r.BlockNotFoundError({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||i.formatBlock)(d)}},20850:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockNumber=t.getBlockNumberCache=void 0;const r=n(70330),o=e=>`blockNumber.${e}`;t.getBlockNumberCache=function(e){return(0,r.getCache)(o(e))},t.getBlockNumber=async function(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){const i=await(0,r.withCache)((()=>e.request({method:"eth_blockNumber"})),{cacheKey:o(e.uid),cacheTime:n??t});return BigInt(i)}},79559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockTransactionCount=void 0;const r=n(39581),o=n(62002);t.getBlockTransactionCount=async function(e,{blockHash:t,blockNumber:n,blockTag:i="latest"}={}){const s=void 0!==n?(0,o.numberToHex)(n):void 0;let a;return a=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||i]}),(0,r.hexToNumber)(a)}},38094:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBytecode=void 0;const r=n(62002);t.getBytecode=async function(e,{address:t,blockNumber:n,blockTag:o="latest"}){const i=void 0!==n?(0,r.numberToHex)(n):void 0,s=await e.request({method:"eth_getCode",params:[t,i||o]});if("0x"!==s)return s}},49988:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=void 0;const r=n(39581);t.getChainId=async function(e){const t=await e.request({method:"eth_chainId"});return(0,r.hexToNumber)(t)}},48177:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractEvents=void 0;const r=n(65775),o=n(94303),i=n(23367);t.getContractEvents=async function(e,{abi:t,address:n,args:s,blockHash:a,eventName:c,fromBlock:u,toBlock:l,strict:d}){const f=c?(0,r.getAbiItem)({abi:t,name:c}):void 0,h=f?void 0:t.filter((e=>"event"===e.type));return(0,o.getAction)(e,i.getLogs,"getLogs")({address:n,args:s,blockHash:a,event:f,events:h,fromBlock:u,toBlock:l,strict:d})}},80748:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeeHistory=void 0;const r=n(62002),o=n(31197);t.getFeeHistory=async function(e,{blockCount:t,blockNumber:n,blockTag:i="latest",rewardPercentiles:s}){const a=n?(0,r.numberToHex)(n):void 0,c=await e.request({method:"eth_feeHistory",params:[(0,r.numberToHex)(t),a||i,s]});return(0,o.formatFeeHistory)(c)}},83117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterChanges=void 0;const r=n(65413),o=n(57573),i=n(47960);t.getFilterChanges=async function(e,{filter:t}){const n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"===typeof e)return e;try{const{eventName:r,args:s}="abi"in t&&t.abi?(0,o.decodeEventLog)({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,i.formatLog)(e,{args:s,eventName:r})}catch(s){let n,o;if(s instanceof r.DecodeLogDataMismatch||s instanceof r.DecodeLogTopicsMismatch){if("strict"in t&&t.strict)return;n=s.abiItem.name,o=s.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,i.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},14176:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterLogs=void 0;const r=n(65413),o=n(57573),i=n(47960);t.getFilterLogs=async function(e,{filter:t}){const n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:r,args:s}="abi"in t&&t.abi?(0,o.decodeEventLog)({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,i.formatLog)(e,{args:s,eventName:r})}catch(s){let n,o;if(s instanceof r.DecodeLogDataMismatch||s instanceof r.DecodeLogTopicsMismatch){if("strict"in t&&t.strict)return;n=s.abiItem.name,o=s.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,i.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},64186:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGasPrice=void 0,t.getGasPrice=async function(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}},23367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLogs=void 0;const r=n(65413),o=n(57573),i=n(86778),s=n(62002),a=n(47960);t.getLogs=async function(e,{address:t,blockHash:n,fromBlock:c,toBlock:u,event:l,events:d,args:f,strict:h}={}){const p=h??!1,m=d??(l?[l]:void 0);let g,y=[];return m&&(y=[m.flatMap((e=>(0,i.encodeEventTopics)({abi:[e],eventName:e.name,args:f})))],l&&(y=y[0])),g=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:y,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:y,fromBlock:"bigint"===typeof c?(0,s.numberToHex)(c):c,toBlock:"bigint"===typeof u?(0,s.numberToHex)(u):u}]}),g.map((e=>{try{const{eventName:t,args:n}=m?(0,o.decodeEventLog)({abi:m,data:e.data,topics:e.topics,strict:p}):{eventName:void 0,args:void 0};return(0,a.formatLog)(e,{args:n,eventName:t})}catch(t){let n,o;if(t instanceof r.DecodeLogDataMismatch||t instanceof r.DecodeLogTopicsMismatch){if(p)return;n=t.abiItem.name,o=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,a.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},76409:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProof=void 0;const r=n(62002),o=n(11360);t.getProof=async function(e,{address:t,blockNumber:n,blockTag:i,storageKeys:s}){const a=i??"latest",c=void 0!==n?(0,r.numberToHex)(n):void 0,u=await e.request({method:"eth_getProof",params:[t,s,c||a]});return(0,o.formatProof)(u)}},47967:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStorageAt=void 0;const r=n(62002);t.getStorageAt=async function(e,{address:t,blockNumber:n,blockTag:o="latest",slot:i}){const s=void 0!==n?(0,r.numberToHex)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,s||o]})}},75590:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransaction=void 0;const r=n(72861),o=n(62002),i=n(64056);t.getTransaction=async function(e,{blockHash:t,blockNumber:n,blockTag:s,hash:a,index:c}){const u=s||"latest",l=void 0!==n?(0,o.numberToHex)(n):void 0;let d=null;if(a?d=await e.request({method:"eth_getTransactionByHash",params:[a]}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,o.numberToHex)(c)]}):(l||u)&&(d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||u,(0,o.numberToHex)(c)]})),!d)throw new r.TransactionNotFoundError({blockHash:t,blockNumber:n,blockTag:u,hash:a,index:c});return(e.chain?.formatters?.transaction?.format||i.formatTransaction)(d)}},22232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionConfirmations=void 0;const r=n(94303),o=n(20850),i=n(75590);t.getTransactionConfirmations=async function(e,{hash:t,transactionReceipt:n}){const[s,a]=await Promise.all([(0,r.getAction)(e,o.getBlockNumber,"getBlockNumber")({}),t?(0,r.getAction)(e,i.getTransaction,"getBlockNumber")({hash:t}):void 0]),c=n?.blockNumber||a?.blockNumber;return c?s-c+1n:0n}},35065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionCount=void 0;const r=n(39581),o=n(62002);t.getTransactionCount=async function(e,{address:t,blockTag:n="latest",blockNumber:i}){const s=await e.request({method:"eth_getTransactionCount",params:[t,i?(0,o.numberToHex)(i):n]});return(0,r.hexToNumber)(s)}},25947:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionReceipt=void 0;const r=n(72861),o=n(37262);t.getTransactionReceipt=async function(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new r.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(n)}},50323:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicall=void 0;const r=n(86725),o=n(65413),i=n(24304),s=n(4924),a=n(52366),c=n(71124),u=n(31693),l=n(30548),d=n(94303),f=n(81746);t.multicall=async function(e,t){const{allowFailure:n=!0,batchSize:h,blockNumber:p,blockTag:m,contracts:g,multicallAddress:y}=t,b=h??("object"===typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024);let v=y;if(!v){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");v=(0,u.getChainContractAddress)({blockNumber:p,chain:e.chain,contract:"multicall3"})}const w=[[]];let x=0,E=0;for(let r=0;r<g.length;r++){const{abi:e,address:t,args:o,functionName:i}=g[r];try{const n=(0,c.encodeFunctionData)({abi:e,args:o,functionName:i});E+=(n.length-2)/2,b>0&&E>b&&w[x].length>0&&(x++,E=(n.length-2)/2,w[x]=[]),w[x]=[...w[x],{allowFailure:!0,callData:n,target:t}]}catch(S){const r=(0,l.getContractError)(S,{abi:e,address:t,args:o,docsPath:"/docs/contract/multicall",functionName:i});if(!n)throw r;w[x]=[...w[x],{allowFailure:!0,callData:"0x",target:t}]}}const _=await Promise.allSettled(w.map((t=>(0,d.getAction)(e,f.readContract,"readContract")({abi:r.multicall3Abi,address:v,args:[t],blockNumber:p,blockTag:m,functionName:"aggregate3"})))),k=[];for(let r=0;r<_.length;r++){const e=_[r];if("rejected"===e.status){if(!n)throw e.reason;for(let t=0;t<w[r].length;t++)k.push({status:"failure",error:e.reason,result:void 0});continue}const t=e.value;for(let i=0;i<t.length;i++){const{returnData:e,success:c}=t[i],{callData:u}=w[r][i],{abi:d,address:f,functionName:h,args:p}=g[k.length];try{if("0x"===u)throw new o.AbiDecodingZeroDataError;if(!c)throw new s.RawContractError({data:e});const t=(0,a.decodeFunctionResult)({abi:d,args:p,data:e,functionName:h});k.push(n?{result:t,status:"success"}:t)}catch(S){const e=(0,l.getContractError)(S,{abi:d,address:f,args:p,docsPath:"/docs/contract/multicall",functionName:h});if(!n)throw e;k.push({error:e,result:void 0,status:"failure"})}}}if(k.length!==g.length)throw new i.BaseError("multicall results mismatch");return k}},81746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readContract=void 0;const r=n(52366),o=n(71124),i=n(30548),s=n(94303),a=n(21739);t.readContract=async function(e,{abi:t,address:n,args:c,functionName:u,...l}){const d=(0,o.encodeFunctionData)({abi:t,args:c,functionName:u});try{const{data:o}=await(0,s.getAction)(e,a.call,"call")({data:d,to:n,...l});return(0,r.decodeFunctionResult)({abi:t,args:c,functionName:u,data:o||"0x"})}catch(f){throw(0,i.getContractError)(f,{abi:t,address:n,args:c,docsPath:"/docs/contract/readContract",functionName:u})}}},41281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simulateContract=void 0;const r=n(18281),o=n(52366),i=n(71124),s=n(30548),a=n(94303),c=n(21739);t.simulateContract=async function(e,{abi:t,address:n,args:u,dataSuffix:l,functionName:d,...f}){const h=f.account?(0,r.parseAccount)(f.account):void 0,p=(0,i.encodeFunctionData)({abi:t,args:u,functionName:d});try{const{data:r}=await(0,a.getAction)(e,c.call,"call")({batch:!1,data:`${p}${l?l.replace("0x",""):""}`,to:n,...f});return{result:(0,o.decodeFunctionResult)({abi:t,args:u,functionName:d,data:r||"0x"}),request:{abi:t,address:n,args:u,dataSuffix:l,functionName:d,...f}}}catch(m){throw(0,s.getContractError)(m,{abi:t,address:n,args:u,docsPath:"/docs/contract/simulateContract",functionName:d,sender:h?.address})}}},48272:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallFilter=void 0,t.uninstallFilter=async function(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}},2418:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=void 0;const r=n(86725),o=n(23871),i=n(4924),s=n(68640),a=n(94303),c=n(17493),u=n(21739);t.verifyHash=async function(e,{address:t,hash:n,signature:l,...d}){const f=(0,c.isHex)(l)?l:(0,c.toHex)(l);try{const{data:i}=await(0,a.getAction)(e,u.call,"call")({data:(0,c.encodeDeployData)({abi:r.universalSignatureValidatorAbi,args:[t,n,f],bytecode:o.universalSignatureValidatorByteCode}),...d});return(0,s.isBytesEqual)(i??"0x0","0x1")}catch(h){if(h instanceof i.CallExecutionError)return!1;throw h}}},28273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=void 0;const r=n(17493),o=n(2418);t.verifyMessage=async function(e,{address:t,message:n,signature:i,...s}){const a=(0,r.hashMessage)(n);return(0,o.verifyHash)(e,{address:t,hash:a,signature:i,...s})}},37644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=void 0;const r=n(90696),o=n(2418);t.verifyTypedData=async function(e,{address:t,signature:n,message:i,primaryType:s,types:a,domain:c,...u}){const l=(0,r.hashTypedData)({message:i,primaryType:s,types:a,domain:c});return(0,o.verifyHash)(e,{address:t,hash:l,signature:n,...u})}},90365:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitForTransactionReceipt=void 0;const r=n(88577),o=n(72861),i=n(94303),s=n(31410),a=n(87593),c=n(29803),u=n(90455),l=n(75590),d=n(25947),f=n(29288);t.waitForTransactionReceipt=async function(e,{confirmations:t=1,hash:n,onReplaced:h,pollingInterval:p=e.pollingInterval,timeout:m}){const g=(0,c.stringify)(["waitForTransactionReceipt",e.uid,n]);let y,b,v,w=!1;return new Promise(((c,x)=>{m&&setTimeout((()=>x(new o.WaitForTransactionReceiptTimeoutError({hash:n}))),m);const E=(0,s.observe)(g,{onReplaced:h,resolve:c,reject:x},(s=>{const c=(0,i.getAction)(e,f.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(f){if(w)return;let h=f;const p=e=>{c(),e(),E()};try{if(v){if(t>1&&(!v.blockNumber||h-v.blockNumber+1n<t))return;return void p((()=>s.resolve(v)))}if(y||(w=!0,await(0,a.withRetry)((async()=>{y=await(0,i.getAction)(e,l.getTransaction,"getTransaction")({hash:n}),y.blockNumber&&(h=y.blockNumber)}),{delay:({count:e})=>200*~~(1<<e),retryCount:6}),w=!1),v=await(0,i.getAction)(e,d.getTransactionReceipt,"getTransactionReceipt")({hash:n}),t>1&&(!v.blockNumber||h-v.blockNumber+1n<t))return;p((()=>s.resolve(v)))}catch(m){if(y&&(m instanceof o.TransactionNotFoundError||m instanceof o.TransactionReceiptNotFoundError))try{b=y,w=!0;const n=await(0,a.withRetry)((()=>(0,i.getAction)(e,u.getBlock,"getBlock")({blockNumber:h,includeTransactions:!0})),{delay:({count:e})=>200*~~(1<<e),retryCount:6,shouldRetry:({error:e})=>e instanceof r.BlockNotFoundError});w=!1;const o=n.transactions.find((({from:e,nonce:t})=>e===b.from&&t===b.nonce));if(!o)return;if(v=await(0,i.getAction)(e,d.getTransactionReceipt,"getTransactionReceipt")({hash:o.hash}),t>1&&(!v.blockNumber||h-v.blockNumber+1n<t))return;let c="replaced";o.to===b.to&&o.value===b.value?c="repriced":o.from===o.to&&0n===o.value&&(c="cancelled"),p((()=>{s.onReplaced?.({reason:c,replacedTransaction:b,transaction:o,transactionReceipt:v}),s.resolve(v)}))}catch(g){p((()=>s.reject(g)))}else p((()=>s.reject(m)))}}})}))}))}},29288:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlockNumber=void 0;const r=n(39581),o=n(94303),i=n(31410),s=n(3312),a=n(29803),c=n(20850);t.watchBlockNumber=function(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:u,onError:l,poll:d,pollingInterval:f=e.pollingInterval}){let h;return("undefined"!==typeof d?d:"webSocket"!==e.transport.type)?(()=>{const r=(0,a.stringify)(["watchBlockNumber",e.uid,t,n,f]);return(0,i.observe)(r,{onBlockNumber:u,onError:l},(r=>(0,s.poll)((async()=>{try{const t=await(0,o.getAction)(e,c.getBlockNumber,"getBlockNumber")({cacheTime:0});if(h){if(t===h)return;if(t-h>1&&n)for(let e=h+1n;e<t;e++)r.onBlockNumber(e,h),h=e}(!h||t>h)&&(r.onBlockNumber(t,h),h=t)}catch(t){r.onError?.(t)}}),{emitOnBegin:t,interval:f})))})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const n=(0,r.hexToBigInt)(e.result?.number);u(n,h),h=n},onError(e){l?.(e)}});n=o,t||n()}catch(o){l?.(o)}})(),n})()}},29930:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlocks=void 0;const r=n(49906),o=n(94303),i=n(31410),s=n(3312),a=n(29803),c=n(90455);t.watchBlocks=function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:u=!1,onBlock:l,onError:d,includeTransactions:f,poll:h,pollingInterval:p=e.pollingInterval}){const m="undefined"!==typeof h?h:"webSocket"!==e.transport.type,g=f??!1;let y;return m?(()=>{const r=(0,a.stringify)(["watchBlocks",e.uid,n,u,g,p]);return(0,i.observe)(r,{onBlock:l,onError:d},(r=>(0,s.poll)((async()=>{try{const i=await(0,o.getAction)(e,c.getBlock,"getBlock")({blockTag:t,includeTransactions:g});if(i.number&&y?.number){if(i.number===y.number)return;if(i.number-y.number>1&&n)for(let t=y?.number+1n;t<i.number;t++){const n=await(0,o.getAction)(e,c.getBlock,"getBlock")({blockNumber:t,includeTransactions:g});r.onBlock(n,y),y=n}}(!y?.number||"pending"===t&&!i?.number||i.number&&i.number>y.number)&&(r.onBlock(i,y),y=i)}catch(i){r.onError?.(i)}}),{emitOnBegin:u,interval:p})))})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(n){if(!t)return;const o=(e.chain?.formatters?.block?.format||r.formatBlock)(n.result);l(o,y),y=o},onError(e){d?.(e)}});n=o,t||n()}catch(o){d?.(o)}})(),n})()}},98877:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchContractEvent=void 0;const r=n(31410),o=n(3312),i=n(29803),s=n(65413),a=n(73812),c=n(57573),u=n(86778),l=n(47960),d=n(94303),f=n(62068),h=n(20850),p=n(48177),m=n(83117),g=n(48272);t.watchContractEvent=function(e,{abi:t,address:n,args:y,batch:b=!0,eventName:v,onError:w,onLogs:x,poll:E,pollingInterval:_=e.pollingInterval,strict:k}){return("undefined"!==typeof E?E:"webSocket"!==e.transport.type)?(()=>{const s=(0,i.stringify)(["watchContractEvent",n,y,b,e.uid,v,_]),c=k??!1;return(0,r.observe)(s,{onLogs:x,onError:w},(r=>{let i,s,u=!1;const l=(0,o.poll)((async()=>{if(u)try{let o;if(s)o=await(0,d.getAction)(e,m.getFilterChanges,"getFilterChanges")({filter:s});else{const r=await(0,d.getAction)(e,h.getBlockNumber,"getBlockNumber")({});o=i&&i!==r?await(0,d.getAction)(e,p.getContractEvents,"getContractEvents")({abi:t,address:n,args:y,eventName:v,fromBlock:i+1n,toBlock:r,strict:c}):[],i=r}if(0===o.length)return;if(b)r.onLogs(o);else for(const e of o)r.onLogs([e])}catch(o){s&&o instanceof a.InvalidInputRpcError&&(u=!1),r.onError?.(o)}else{try{s=await(0,d.getAction)(e,f.createContractEventFilter,"createContractEventFilter")({abi:t,address:n,args:y,eventName:v,strict:c})}catch{}u=!0}}),{emitOnBegin:!0,interval:_});return async()=>{s&&await(0,d.getAction)(e,g.uninstallFilter,"uninstallFilter")({filter:s}),l()}}))})():(()=>{let r=!0,o=()=>r=!1;return(async()=>{try{const i=v?(0,u.encodeEventTopics)({abi:t,eventName:v,args:y}):[],{unsubscribe:a}=await e.transport.subscribe({params:["logs",{address:n,topics:i}],onData(e){if(!r)return;const n=e.result;try{const{eventName:e,args:r}=(0,c.decodeEventLog)({abi:t,data:n.data,topics:n.topics,strict:k}),o=(0,l.formatLog)(n,{args:r,eventName:e});x([o])}catch(o){let e,t;if(o instanceof s.DecodeLogDataMismatch||o instanceof s.DecodeLogTopicsMismatch){if(k)return;e=o.abiItem.name,t=o.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const r=(0,l.formatLog)(n,{args:t?[]:{},eventName:e});x([r])}},onError(e){w?.(e)}});o=a,r||o()}catch(i){w?.(i)}})(),o})()}},74348:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchEvent=void 0;const r=n(31410),o=n(3312),i=n(29803),s=n(65413),a=n(73812),c=n(94303),u=n(17493),l=n(58473),d=n(20850),f=n(83117),h=n(23367),p=n(48272);t.watchEvent=function(e,{address:t,args:n,batch:m=!0,event:g,events:y,onError:b,onLogs:v,poll:w,pollingInterval:x=e.pollingInterval,strict:E}){const _="undefined"!==typeof w?w:"webSocket"!==e.transport.type,k=E??!1;return _?(()=>{const s=(0,i.stringify)(["watchEvent",t,n,m,e.uid,g,x]);return(0,r.observe)(s,{onLogs:v,onError:b},(r=>{let i,s,u=!1;const b=(0,o.poll)((async()=>{if(u)try{let o;if(s)o=await(0,c.getAction)(e,f.getFilterChanges,"getFilterChanges")({filter:s});else{const r=await(0,c.getAction)(e,d.getBlockNumber,"getBlockNumber")({});o=i&&i!==r?await(0,c.getAction)(e,h.getLogs,"getLogs")({address:t,args:n,event:g,events:y,fromBlock:i+1n,toBlock:r}):[],i=r}if(0===o.length)return;if(m)r.onLogs(o);else for(const e of o)r.onLogs([e])}catch(o){s&&o instanceof a.InvalidInputRpcError&&(u=!1),r.onError?.(o)}else{try{s=await(0,c.getAction)(e,l.createEventFilter,"createEventFilter")({address:t,args:n,event:g,events:y,strict:k})}catch{}u=!0}}),{emitOnBegin:!0,interval:x});return async()=>{s&&await(0,c.getAction)(e,p.uninstallFilter,"uninstallFilter")({filter:s}),b()}}))})():(()=>{let r=!0,o=()=>r=!1;return(async()=>{try{const i=y??(g?[g]:void 0);let a=[];i&&(a=[i.flatMap((e=>(0,u.encodeEventTopics)({abi:[e],eventName:e.name,args:n})))],g&&(a=a[0]));const{unsubscribe:c}=await e.transport.subscribe({params:["logs",{address:t,topics:a}],onData(e){if(!r)return;const t=e.result;try{const{eventName:e,args:n}=(0,u.decodeEventLog)({abi:i,data:t.data,topics:t.topics,strict:k}),r=(0,u.formatLog)(t,{args:n,eventName:e});v([r])}catch(n){let e,r;if(n instanceof s.DecodeLogDataMismatch||n instanceof s.DecodeLogTopicsMismatch){if(E)return;e=n.abiItem.name,r=n.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,u.formatLog)(t,{args:r?[]:{},eventName:e});v([o])}},onError(e){b?.(e)}});o=c,r||o()}catch(i){b?.(i)}})(),o})()}},72045:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchPendingTransactions=void 0;const r=n(94303),o=n(31410),i=n(3312),s=n(29803),a=n(56906),c=n(83117),u=n(48272);t.watchPendingTransactions=function(e,{batch:t=!0,onError:n,onTransactions:l,poll:d,pollingInterval:f=e.pollingInterval}){return("undefined"!==typeof d?d:"webSocket"!==e.transport.type)?(()=>{const d=(0,s.stringify)(["watchPendingTransactions",e.uid,t,f]);return(0,o.observe)(d,{onTransactions:l,onError:n},(n=>{let o;const s=(0,i.poll)((async()=>{try{if(!o)try{return void(o=await(0,r.getAction)(e,a.createPendingTransactionFilter,"createPendingTransactionFilter")({}))}catch(i){throw s(),i}const u=await(0,r.getAction)(e,c.getFilterChanges,"getFilterChanges")({filter:o});if(0===u.length)return;if(t)n.onTransactions(u);else for(const e of u)n.onTransactions([e])}catch(i){n.onError?.(i)}}),{emitOnBegin:!0,interval:f});return async()=>{o&&await(0,r.getAction)(e,u.uninstallFilter,"uninstallFilter")({filter:o}),s()}}))})():(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const n=e.result;l([n])},onError(e){n?.(e)}});r=o,t||r()}catch(o){n?.(o)}})(),r})()}},64696:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropTransaction=void 0,t.dropTransaction=async function(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}},59683:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpState=void 0,t.dumpState=async function(e){return e.request({method:`${e.mode}_dumpState`})}},82595:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAutomine=void 0,t.getAutomine=async function(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}},50137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolContent=void 0,t.getTxpoolContent=async function(e){return await e.request({method:"txpool_content"})}},28544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolStatus=void 0;const r=n(39581);t.getTxpoolStatus=async function(e){const{pending:t,queued:n}=await e.request({method:"txpool_status"});return{pending:(0,r.hexToNumber)(t),queued:(0,r.hexToNumber)(n)}}},67578:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.impersonateAccount=void 0,t.impersonateAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}},9575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.increaseTime=void 0;const r=n(62002);t.increaseTime=async function(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[(0,r.numberToHex)(t)]})}},32300:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inspectTxpool=void 0,t.inspectTxpool=async function(e){return await e.request({method:"txpool_inspect"})}},19281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadState=void 0,t.loadState=async function(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}},95210:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mine=void 0;const r=n(62002);t.mine=async function(e,{blocks:t,interval:n}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,r.numberToHex)(t)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,r.numberToHex)(t),(0,r.numberToHex)(n||0)]})}},83011:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlockTimestampInterval=void 0,t.removeBlockTimestampInterval=async function(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}},23628:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reset=void 0,t.reset=async function(e,{blockNumber:t,jsonRpcUrl:n}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:n}}]})}},22033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.revert=void 0,t.revert=async function(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}},65888:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendUnsignedTransaction=void 0;const r=n(29824),o=n(14928);t.sendUnsignedTransaction=async function(e,t){const{accessList:n,data:i,from:s,gas:a,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h,...p}=t,m=e.chain?.formatters?.transactionRequest?.format,g=(m||o.formatTransactionRequest)({...(0,r.extract)(p,{format:m}),accessList:n,data:i,from:s,gas:a,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h});return await e.request({method:"eth_sendUnsignedTransaction",params:[g]})}},2361:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAutomine=void 0,t.setAutomine=async function(e,t){"ganache"===e.mode?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}},49222:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBalance=void 0;const r=n(62002);t.setBalance=async function(e,{address:t,value:n}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[t,(0,r.numberToHex)(n)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,(0,r.numberToHex)(n)]})}},49089:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockGasLimit=void 0;const r=n(62002);t.setBlockGasLimit=async function(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[(0,r.numberToHex)(t)]})}},48494:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTimestampInterval=void 0,t.setBlockTimestampInterval=async function(e,{interval:t}){const n="hardhat"===e.mode?1e3*t:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[n]})}},425:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCode=void 0,t.setCode=async function(e,{address:t,bytecode:n}){await e.request({method:`${e.mode}_setCode`,params:[t,n]})}},7362:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCoinbase=void 0,t.setCoinbase=async function(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}},57471:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setIntervalMining=void 0,t.setIntervalMining=async function(e,{interval:t}){const n="hardhat"===e.mode?1e3*t:t;await e.request({method:"evm_setIntervalMining",params:[n]})}},5857:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLoggingEnabled=void 0,t.setLoggingEnabled=async function(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}},93549:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setMinGasPrice=void 0;const r=n(62002);t.setMinGasPrice=async function(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,r.numberToHex)(t)]})}},55247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockBaseFeePerGas=void 0;const r=n(62002);t.setNextBlockBaseFeePerGas=async function(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,r.numberToHex)(t)]})}},16010:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockTimestamp=void 0;const r=n(62002);t.setNextBlockTimestamp=async function(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,r.numberToHex)(t)]})}},38234:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNonce=void 0;const r=n(62002);t.setNonce=async function(e,{address:t,nonce:n}){await e.request({method:`${e.mode}_setNonce`,params:[t,(0,r.numberToHex)(n)]})}},24777:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setRpcUrl=void 0,t.setRpcUrl=async function(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}},54011:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setStorageAt=void 0;const r=n(62002);t.setStorageAt=async function(e,{address:t,index:n,value:o}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,"number"===typeof n?(0,r.numberToHex)(n):n,o]})}},79487:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.snapshot=void 0,t.snapshot=async function(e){return await e.request({method:"evm_snapshot"})}},77473:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stopImpersonatingAccount=void 0,t.stopImpersonatingAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}},13356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addChain=void 0;const r=n(62002);t.addChain=async function(e,{chain:t}){const{id:n,name:o,nativeCurrency:i,rpcUrls:s,blockExplorers:a}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,r.numberToHex)(n),chainName:o,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:a?Object.values(a).map((({url:e})=>e)):void 0}]})}},60627:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deployContract=void 0;const r=n(1099),o=n(18659);t.deployContract=function(e,{abi:t,args:n,bytecode:i,...s}){const a=(0,r.encodeDeployData)({abi:t,args:n,bytecode:i});return(0,o.sendTransaction)(e,{...s,data:a})}},36790:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddresses=void 0;const r=n(3001);t.getAddresses=async function(e){return"local"===e.account?.type?[e.account.address]:(await e.request({method:"eth_accounts"})).map((e=>(0,r.checksumAddress)(e)))}},16331:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPermissions=void 0,t.getPermissions=async function(e){return await e.request({method:"wallet_getPermissions"})}},8969:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareTransactionRequest=void 0;const r=n(18281),o=n(85273),i=n(36392),s=n(90455),a=n(35065),c=n(29723),u=n(3242),l=n(94303),d=n(77365),f=n(57080);t.prepareTransactionRequest=async function(e,t){const{account:n=e.account,chain:h,gas:p,nonce:m,type:g}=t;if(!n)throw new c.AccountNotFoundError;const y=(0,r.parseAccount)(n),b=await(0,l.getAction)(e,s.getBlock,"getBlock")({blockTag:"latest"}),v={...t,from:y.address};if("undefined"===typeof m&&(v.nonce=await(0,l.getAction)(e,a.getTransactionCount,"getTransactionCount")({address:y.address,blockTag:"pending"})),"undefined"===typeof g)try{v.type=(0,f.getTransactionType)(v)}catch{v.type="bigint"===typeof b.baseFeePerGas?"eip1559":"legacy"}if("eip1559"===v.type){const{maxFeePerGas:n,maxPriorityFeePerGas:r}=await(0,o.internal_estimateFeesPerGas)(e,{block:b,chain:h,request:v});if("undefined"===typeof t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<r)throw new u.MaxFeePerGasTooLowError({maxPriorityFeePerGas:r});v.maxPriorityFeePerGas=r,v.maxFeePerGas=n}else{if("undefined"!==typeof t.maxFeePerGas||"undefined"!==typeof t.maxPriorityFeePerGas)throw new u.Eip1559FeesNotSupportedError;const{gasPrice:n}=await(0,o.internal_estimateFeesPerGas)(e,{block:b,chain:h,request:v,type:"legacy"});v.gasPrice=n}return"undefined"===typeof p&&(v.gas=await(0,l.getAction)(e,i.estimateGas,"estimateGas")({...v,account:{address:y.address,type:"json-rpc"}})),(0,d.assertRequest)(v),v}},56583:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestAddresses=void 0;const r=n(3001);t.requestAddresses=async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,r.getAddress)(e)))}},76022:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestPermissions=void 0,t.requestPermissions=async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}},46832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransaction=void 0,t.sendRawTransaction=async function(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]})}},18659:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransaction=void 0;const r=n(18281),o=n(29723),i=n(81696),s=n(61350),a=n(29824),c=n(14928),u=n(94303),l=n(77365),d=n(49988),f=n(8969),h=n(46832);t.sendTransaction=async function(e,t){const{account:n=e.account,chain:p=e.chain,accessList:m,data:g,gas:y,gasPrice:b,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:x,to:E,value:_,...k}=t;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const S=(0,r.parseAccount)(n);try{let n;if((0,l.assertRequest)(t),null!==p&&(n=await(0,u.getAction)(e,d.getChainId,"getChainId")({}),(0,i.assertCurrentChain)({currentChainId:n,chain:p})),"local"===S.type){const t=await(0,u.getAction)(e,f.prepareTransactionRequest,"prepareTransactionRequest")({account:S,accessList:m,chain:p,data:g,gas:y,gasPrice:b,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:x,to:E,value:_,...k});n||(n=await(0,u.getAction)(e,d.getChainId,"getChainId")({}));const r=p?.serializers?.transaction,o=await S.signTransaction({...t,chainId:n},{serializer:r});return await(0,u.getAction)(e,h.sendRawTransaction,"sendRawTransaction")({serializedTransaction:o})}const r=e.chain?.formatters?.transactionRequest?.format,o=(r||c.formatTransactionRequest)({...(0,a.extract)(k,{format:r}),accessList:m,data:g,from:S.address,gas:y,gasPrice:b,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:x,to:E,value:_});return await e.request({method:"eth_sendTransaction",params:[o]})}catch(I){throw(0,s.getTransactionError)(I,{...t,account:S,chain:t.chain||void 0})}}},36158:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signMessage=void 0;const r=n(18281),o=n(29723),i=n(62002);t.signMessage=async function(e,{account:t=e.account,message:n}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const s=(0,r.parseAccount)(t);if("local"===s.type)return s.signMessage({message:n});const a="string"===typeof n?(0,i.stringToHex)(n):n.raw instanceof Uint8Array?(0,i.toHex)(n.raw):n.raw;return e.request({method:"personal_sign",params:[a,s.address]})}},90402:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signTransaction=void 0;const r=n(18281),o=n(29723),i=n(81696),s=n(14928),a=n(94303),c=n(17493),u=n(77365),l=n(49988);t.signTransaction=async function(e,t){const{account:n=e.account,chain:d=e.chain,...f}=t;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const h=(0,r.parseAccount)(n);(0,u.assertRequest)({account:h,...t});const p=await(0,a.getAction)(e,l.getChainId,"getChainId")({});null!==d&&(0,i.assertCurrentChain)({currentChainId:p,chain:d});const m=(d?.formatters||e.chain?.formatters)?.transactionRequest?.format||s.formatTransactionRequest;return"local"===h.type?h.signTransaction({...f,chainId:p},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...m(f),chainId:(0,c.numberToHex)(p),from:h.address}]})}},4910:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedData=void 0;const r=n(18281),o=n(29723),i=n(34323),s=n(29803),a=n(85024);t.signTypedData=async function(e,{account:t=e.account,domain:n,message:c,primaryType:u,types:l}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const d=(0,r.parseAccount)(t),f={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:n}),...l};if((0,a.validateTypedData)({domain:n,message:c,primaryType:u,types:f}),"local"===d.type)return d.signTypedData({domain:n,primaryType:u,types:f,message:c});const h=(0,s.stringify)({domain:n??{},primaryType:u,types:f,message:c},((e,t)=>(0,i.isHex)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[d.address,h]})}},32672:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchChain=void 0;const r=n(62002);t.switchChain=async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,r.numberToHex)(t)}]})}},85479:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchAsset=void 0,t.watchAsset=async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}},9650:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeContract=void 0;const r=n(71124),o=n(94303),i=n(18659);t.writeContract=async function(e,{abi:t,address:n,args:s,dataSuffix:a,functionName:c,...u}){const l=(0,r.encodeFunctionData)({abi:t,args:s,functionName:c});return await(0,o.getAction)(e,i.sendTransaction,"sendTransaction")({data:`${l}${a?a.replace("0x",""):""}`,to:n,...u})}},74485:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=void 0;const r=n(5203),o=n(18614);t.createClient=function(e){const{batch:t,cacheTime:n=e.pollingInterval??4e3,key:i="base",name:s="Base Client",pollingInterval:a=4e3,type:c="base"}=e,u=e.chain,l=e.account?(0,r.parseAccount)(e.account):void 0,{config:d,request:f,value:h}=e.transport({chain:u,pollingInterval:a}),p={account:l,batch:t,cacheTime:n,chain:u,key:i,name:s,pollingInterval:a,request:f,transport:{...d,...h},type:c,uid:(0,o.uid)()};return Object.assign(p,{extend:function e(t){return n=>{const r=n(t);for(const e in p)delete r[e];const o={...t,...r};return Object.assign(o,{extend:e(o)})}}(p)})}},18579:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPublicClient=void 0;const r=n(74485),o=n(81986);t.createPublicClient=function(e){const{key:t="public",name:n="Public Client"}=e;return(0,r.createClient)({...e,key:t,name:n,type:"publicClient"}).extend(o.publicActions)}},551:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTestClient=void 0;const r=n(74485),o=n(67213);t.createTestClient=function(e){const{key:t="test",name:n="Test Client",mode:i}=e;return(0,r.createClient)({...e,key:t,name:n,type:"testClient"}).extend((e=>({mode:i,...(0,o.testActions)({mode:i})(e)})))}},87410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWalletClient=void 0;const r=n(74485),o=n(87054);t.createWalletClient=function(e){const{key:t="wallet",name:n="Wallet Client",transport:i}=e;return(0,r.createClient)({...e,key:t,name:n,transport:e=>i({...e,retryCount:0}),type:"walletClient"}).extend(o.walletActions)}},81986:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicActions=void 0;const r=n(59442),o=n(4418),i=n(33352),s=n(37887),a=n(84011),c=n(21739),u=n(28061),l=n(62068),d=n(58473),f=n(56906),h=n(7848),p=n(85273),m=n(36392),g=n(13962),y=n(32572),b=n(90455),v=n(20850),w=n(79559),x=n(38094),E=n(49988),_=n(48177),k=n(80748),S=n(83117),I=n(14176),C=n(64186),T=n(23367),A=n(76409),P=n(47967),O=n(75590),j=n(22232),M=n(35065),R=n(25947),B=n(50323),N=n(81746),L=n(41281),U=n(48272),D=n(28273),F=n(37644),z=n(90365),$=n(29288),q=n(29930),Z=n(98877),H=n(74348),W=n(72045),G=n(8969),K=n(46832);t.publicActions=function(e){return{call:t=>(0,c.call)(e,t),createBlockFilter:()=>(0,u.createBlockFilter)(e),createContractEventFilter:t=>(0,l.createContractEventFilter)(e,t),createEventFilter:t=>(0,d.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,f.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,h.estimateContractGas)(e,t),estimateGas:t=>(0,m.estimateGas)(e,t),getBalance:t=>(0,y.getBalance)(e,t),getBlock:t=>(0,b.getBlock)(e,t),getBlockNumber:t=>(0,v.getBlockNumber)(e,t),getBlockTransactionCount:t=>(0,w.getBlockTransactionCount)(e,t),getBytecode:t=>(0,x.getBytecode)(e,t),getChainId:()=>(0,E.getChainId)(e),getContractEvents:t=>(0,_.getContractEvents)(e,t),getEnsAddress:t=>(0,r.getEnsAddress)(e,t),getEnsAvatar:t=>(0,o.getEnsAvatar)(e,t),getEnsName:t=>(0,i.getEnsName)(e,t),getEnsResolver:t=>(0,s.getEnsResolver)(e,t),getEnsText:t=>(0,a.getEnsText)(e,t),getFeeHistory:t=>(0,k.getFeeHistory)(e,t),estimateFeesPerGas:t=>(0,p.estimateFeesPerGas)(e,t),getFilterChanges:t=>(0,S.getFilterChanges)(e,t),getFilterLogs:t=>(0,I.getFilterLogs)(e,t),getGasPrice:()=>(0,C.getGasPrice)(e),getLogs:t=>(0,T.getLogs)(e,t),getProof:t=>(0,A.getProof)(e,t),estimateMaxPriorityFeePerGas:t=>(0,g.estimateMaxPriorityFeePerGas)(e,t),getStorageAt:t=>(0,P.getStorageAt)(e,t),getTransaction:t=>(0,O.getTransaction)(e,t),getTransactionConfirmations:t=>(0,j.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,M.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,R.getTransactionReceipt)(e,t),multicall:t=>(0,B.multicall)(e,t),prepareTransactionRequest:t=>(0,G.prepareTransactionRequest)(e,t),readContract:t=>(0,N.readContract)(e,t),sendRawTransaction:t=>(0,K.sendRawTransaction)(e,t),simulateContract:t=>(0,L.simulateContract)(e,t),verifyMessage:t=>(0,D.verifyMessage)(e,t),verifyTypedData:t=>(0,F.verifyTypedData)(e,t),uninstallFilter:t=>(0,U.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,z.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,q.watchBlocks)(e,t),watchBlockNumber:t=>(0,$.watchBlockNumber)(e,t),watchContractEvent:t=>(0,Z.watchContractEvent)(e,t),watchEvent:t=>(0,H.watchEvent)(e,t),watchPendingTransactions:t=>(0,W.watchPendingTransactions)(e,t)}}},67213:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testActions=void 0;const r=n(64696),o=n(59683),i=n(82595),s=n(50137),a=n(28544),c=n(67578),u=n(9575),l=n(32300),d=n(19281),f=n(95210),h=n(83011),p=n(23628),m=n(22033),g=n(65888),y=n(2361),b=n(49222),v=n(49089),w=n(48494),x=n(425),E=n(7362),_=n(57471),k=n(5857),S=n(93549),I=n(55247),C=n(16010),T=n(38234),A=n(24777),P=n(54011),O=n(79487),j=n(77473);t.testActions=function({mode:e}){return t=>{const n=t.extend((()=>({mode:e})));return{dropTransaction:e=>(0,r.dropTransaction)(n,e),dumpState:()=>(0,o.dumpState)(n),getAutomine:()=>(0,i.getAutomine)(n),getTxpoolContent:()=>(0,s.getTxpoolContent)(n),getTxpoolStatus:()=>(0,a.getTxpoolStatus)(n),impersonateAccount:e=>(0,c.impersonateAccount)(n,e),increaseTime:e=>(0,u.increaseTime)(n,e),inspectTxpool:()=>(0,l.inspectTxpool)(n),loadState:e=>(0,d.loadState)(n,e),mine:e=>(0,f.mine)(n,e),removeBlockTimestampInterval:()=>(0,h.removeBlockTimestampInterval)(n),reset:e=>(0,p.reset)(n,e),revert:e=>(0,m.revert)(n,e),sendUnsignedTransaction:e=>(0,g.sendUnsignedTransaction)(n,e),setAutomine:e=>(0,y.setAutomine)(n,e),setBalance:e=>(0,b.setBalance)(n,e),setBlockGasLimit:e=>(0,v.setBlockGasLimit)(n,e),setBlockTimestampInterval:e=>(0,w.setBlockTimestampInterval)(n,e),setCode:e=>(0,x.setCode)(n,e),setCoinbase:e=>(0,E.setCoinbase)(n,e),setIntervalMining:e=>(0,_.setIntervalMining)(n,e),setLoggingEnabled:e=>(0,k.setLoggingEnabled)(n,e),setMinGasPrice:e=>(0,S.setMinGasPrice)(n,e),setNextBlockBaseFeePerGas:e=>(0,I.setNextBlockBaseFeePerGas)(n,e),setNextBlockTimestamp:e=>(0,C.setNextBlockTimestamp)(n,e),setNonce:e=>(0,T.setNonce)(n,e),setRpcUrl:e=>(0,A.setRpcUrl)(n,e),setStorageAt:e=>(0,P.setStorageAt)(n,e),snapshot:()=>(0,O.snapshot)(n),stopImpersonatingAccount:e=>(0,j.stopImpersonatingAccount)(n,e)}}}},87054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletActions=void 0;const r=n(49988),o=n(13356),i=n(60627),s=n(36790),a=n(16331),c=n(8969),u=n(56583),l=n(76022),d=n(46832),f=n(18659),h=n(36158),p=n(90402),m=n(4910),g=n(32672),y=n(85479),b=n(9650);t.walletActions=function(e){return{addChain:t=>(0,o.addChain)(e,t),deployContract:t=>(0,i.deployContract)(e,t),getAddresses:()=>(0,s.getAddresses)(e),getChainId:()=>(0,r.getChainId)(e),getPermissions:()=>(0,a.getPermissions)(e),prepareTransactionRequest:t=>(0,c.prepareTransactionRequest)(e,t),requestAddresses:()=>(0,u.requestAddresses)(e),requestPermissions:t=>(0,l.requestPermissions)(e,t),sendRawTransaction:t=>(0,d.sendRawTransaction)(e,t),sendTransaction:t=>(0,f.sendTransaction)(e,t),signMessage:t=>(0,h.signMessage)(e,t),signTransaction:t=>(0,p.signTransaction)(e,t),signTypedData:t=>(0,m.signTypedData)(e,t),switchChain:t=>(0,g.switchChain)(e,t),watchAsset:t=>(0,y.watchAsset)(e,t),writeContract:t=>(0,b.writeContract)(e,t)}}},67641:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransport=void 0;const r=n(42768);t.createTransport=function({key:e,name:t,request:n,retryCount:o=3,retryDelay:i=150,timeout:s,type:a},c){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:i,timeout:s,type:a},request:(0,r.buildRequest)(n,{retryCount:o,retryDelay:i}),value:c}}},52883:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.custom=void 0;const r=n(67641);t.custom=function(e,t={}){const{key:n="custom",name:o="Custom Provider",retryDelay:i}=t;return({retryCount:s})=>(0,r.createTransport)({key:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??s,retryDelay:i,type:"custom"})}},35010:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rankTransports=t.fallback=void 0;const r=n(42768),o=n(95501),i=n(67641);function s({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:i=1e3,transports:s,weights:a={}}){const{stability:c=.7,latency:u=.3}=a,l=[],d=async()=>{const a=await Promise.all(s.map((async t=>{const n=t({chain:e,retryCount:0,timeout:i}),r=Date.now();let o,s;try{await n.request({method:"net_listening"}),s=1}catch{s=0}finally{o=Date.now()}return{latency:o-r,success:s}})));l.push(a),l.length>r&&l.shift();const f=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),h=s.map(((e,t)=>{const n=l.map((e=>e[t].latency)),r=1-n.reduce(((e,t)=>e+t),0)/n.length/f,o=l.map((e=>e[t].success)),i=o.reduce(((e,t)=>e+t),0)/o.length;return 0===i?[0,t]:[u*r+c*i,t]})).sort(((e,t)=>t[0]-e[0]));n(h.map((([,e])=>s[e]))),await(0,o.wait)(t),d()};d()}t.fallback=function(e,t={}){const{key:n="fallback",name:o="Fallback",rank:a=!1,retryCount:c,retryDelay:u}=t;return({chain:t,pollingInterval:l=4e3,timeout:d})=>{let f=e,h=()=>{};const p=(0,i.createTransport)({key:n,name:o,async request({method:e,params:n}){const o=async(i=0)=>{const s=f[i]({chain:t,retryCount:0,timeout:d});try{const t=await s.request({method:e,params:n});return h({method:e,params:n,response:t,transport:s,status:"success"}),t}catch(a){if(h({error:a,method:e,params:n,transport:s,status:"error"}),(0,r.isDeterministicError)(a))throw a;if(i===f.length-1)throw a;return o(i+1)}};return o()},retryCount:c,retryDelay:u,type:"fallback"},{onResponse:e=>h=e,transports:f.map((e=>e({chain:t,retryCount:0})))});if(a){const e="object"===typeof a?a:{};s({chain:t,interval:e.interval??l,onTransports:e=>f=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:f,weights:e.weights})}return p}},t.rankTransports=s},69800:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.http=void 0;const r=n(4880),o=n(3927),i=n(30251),s=n(93087),a=n(67641);t.http=function(e,t={}){const{batch:n,fetchOptions:c,key:u="http",name:l="HTTP JSON-RPC",retryDelay:d}=t;return({chain:f,retryCount:h,timeout:p})=>{const{batchSize:m=1e3,wait:g=0}="object"===typeof n?n:{},y=t.retryCount??h,b=p??t.timeout??1e4,v=e||f?.rpcUrls.default.http[0];if(!v)throw new o.UrlRequiredError;return(0,a.createTransport)({key:u,name:l,async request({method:t,params:o}){const a={method:t,params:o},{schedule:u}=(0,i.createBatchScheduler)({id:`${e}`,wait:g,shouldSplitBatch:e=>e.length>m,fn:e=>s.rpc.http(v,{body:e,fetchOptions:c,timeout:b}),sort:(e,t)=>e.id-t.id}),[{error:l,result:d}]=await(async e=>n?u(e):[await s.rpc.http(v,{body:e,fetchOptions:c,timeout:b})])(a);if(l)throw new r.RpcRequestError({body:a,error:l,url:v});return d},retryCount:y,retryDelay:d,timeout:b,type:"http"},{fetchOptions:c,url:e})}}},99102:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.webSocket=void 0;const r=n(4880),o=n(3927),i=n(93087),s=n(67641);t.webSocket=function(e,t={}){const{key:n="webSocket",name:a="WebSocket JSON-RPC",retryDelay:c}=t;return({chain:u,retryCount:l,timeout:d})=>{const f=t.retryCount??l,h=d??t.timeout??1e4,p=e||u?.rpcUrls.default.webSocket?.[0];if(!p)throw new o.UrlRequiredError;return(0,s.createTransport)({key:n,name:a,async request({method:e,params:t}){const n={method:e,params:t},o=await(0,i.getSocket)(p),{error:s,result:a}=await i.rpc.webSocketAsync(o,{body:n,timeout:h});if(s)throw new r.RpcRequestError({body:n,error:s,url:p});return a},retryCount:f,retryDelay:c,timeout:h,type:"webSocket"},{getSocket:()=>(0,i.getSocket)(p),async subscribe({params:e,onData:t,onError:n}){const r=await(0,i.getSocket)(p),{result:o}=await new Promise(((o,s)=>i.rpc.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return s(e.error),void n?.(e.error);"number"!==typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>i.rpc.webSocket(r,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}},86725:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.universalSignatureValidatorAbi=t.smartAccountAbi=t.addressResolverAbi=t.textResolverAbi=t.universalResolverReverseAbi=t.universalResolverResolveAbi=t.multicall3Abi=void 0,t.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}];const n=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}];t.universalResolverResolveAbi=[...n,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],t.universalResolverReverseAbi=[...n,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],t.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],t.smartAccountAbi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],t.universalSignatureValidatorAbi=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},78104:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroAddress=void 0,t.zeroAddress="0x0000000000000000000000000000000000000000"},82357:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroHash=void 0,t.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},15251:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregate3Signature=void 0,t.aggregate3Signature="0x82ad56cb"},23871:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.universalSignatureValidatorByteCode=void 0,t.universalSignatureValidatorByteCode="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},75081:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=void 0,t.maxInt8=2n**(8n-1n)-1n,t.maxInt16=2n**(16n-1n)-1n,t.maxInt24=2n**(24n-1n)-1n,t.maxInt32=2n**(32n-1n)-1n,t.maxInt40=2n**(40n-1n)-1n,t.maxInt48=2n**(48n-1n)-1n,t.maxInt56=2n**(56n-1n)-1n,t.maxInt64=2n**(64n-1n)-1n,t.maxInt72=2n**(72n-1n)-1n,t.maxInt80=2n**(80n-1n)-1n,t.maxInt88=2n**(88n-1n)-1n,t.maxInt96=2n**(96n-1n)-1n,t.maxInt104=2n**(104n-1n)-1n,t.maxInt112=2n**(112n-1n)-1n,t.maxInt120=2n**(120n-1n)-1n,t.maxInt128=2n**(128n-1n)-1n,t.maxInt136=2n**(136n-1n)-1n,t.maxInt144=2n**(144n-1n)-1n,t.maxInt152=2n**(152n-1n)-1n,t.maxInt160=2n**(160n-1n)-1n,t.maxInt168=2n**(168n-1n)-1n,t.maxInt176=2n**(176n-1n)-1n,t.maxInt184=2n**(184n-1n)-1n,t.maxInt192=2n**(192n-1n)-1n,t.maxInt200=2n**(200n-1n)-1n,t.maxInt208=2n**(208n-1n)-1n,t.maxInt216=2n**(216n-1n)-1n,t.maxInt224=2n**(224n-1n)-1n,t.maxInt232=2n**(232n-1n)-1n,t.maxInt240=2n**(240n-1n)-1n,t.maxInt248=2n**(248n-1n)-1n,t.maxInt256=2n**(256n-1n)-1n,t.minInt8=-(2n**(8n-1n)),t.minInt16=-(2n**(16n-1n)),t.minInt24=-(2n**(24n-1n)),t.minInt32=-(2n**(32n-1n)),t.minInt40=-(2n**(40n-1n)),t.minInt48=-(2n**(48n-1n)),t.minInt56=-(2n**(56n-1n)),t.minInt64=-(2n**(64n-1n)),t.minInt72=-(2n**(72n-1n)),t.minInt80=-(2n**(80n-1n)),t.minInt88=-(2n**(88n-1n)),t.minInt96=-(2n**(96n-1n)),t.minInt104=-(2n**(104n-1n)),t.minInt112=-(2n**(112n-1n)),t.minInt120=-(2n**(120n-1n)),t.minInt128=-(2n**(128n-1n)),t.minInt136=-(2n**(136n-1n)),t.minInt144=-(2n**(144n-1n)),t.minInt152=-(2n**(152n-1n)),t.minInt160=-(2n**(160n-1n)),t.minInt168=-(2n**(168n-1n)),t.minInt176=-(2n**(176n-1n)),t.minInt184=-(2n**(184n-1n)),t.minInt192=-(2n**(192n-1n)),t.minInt200=-(2n**(200n-1n)),t.minInt208=-(2n**(208n-1n)),t.minInt216=-(2n**(216n-1n)),t.minInt224=-(2n**(224n-1n)),t.minInt232=-(2n**(232n-1n)),t.minInt240=-(2n**(240n-1n)),t.minInt248=-(2n**(248n-1n)),t.minInt256=-(2n**(256n-1n)),t.maxUint8=2n**8n-1n,t.maxUint16=2n**16n-1n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},55300:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPanic=t.solidityError=t.panicReasons=void 0,t.panicReasons={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},95011:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.presignMessagePrefix=void 0,t.presignMessagePrefix="\x19Ethereum Signed Message:\n"},12966:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.weiUnits=t.gweiUnits=t.etherUnits=void 0,t.etherUnits={gwei:9,wei:18},t.gweiUnits={ether:-9,wei:9},t.weiUnits={ether:-18,gwei:-9}},65413:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiDecodingTypeError=t.InvalidAbiEncodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiItemAmbiguityError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=void 0;const r=n(99636),o=n(61539),i=n(24304);class s extends i.BaseError{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}t.AbiConstructorNotFoundError=s;class a extends i.BaseError{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}t.AbiConstructorParamsNotFoundError=a;class c extends i.BaseError{constructor({data:e,size:t}){super([`Data size of ${t} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join("\n"),{metaMessages:[`Data: ${e} (${t} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeInvalidError"})}}t.AbiDecodingDataSizeInvalidError=c;class u extends i.BaseError{constructor({data:e,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.formatAbiParams)(t,{includeName:!0})})`,`Data:   ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}t.AbiDecodingDataSizeTooSmallError=u;class l extends i.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}t.AbiDecodingZeroDataError=l;class d extends i.BaseError{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}t.AbiEncodingArrayLengthMismatchError=d;class f extends i.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.size)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}t.AbiEncodingBytesSizeMismatchError=f;class h extends i.BaseError{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}t.AbiEncodingLengthMismatchError=h;class p extends i.BaseError{constructor(e,{docsPath:t}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorInputsNotFoundError"})}}t.AbiErrorInputsNotFoundError=p;class m extends i.BaseError{constructor(e,{docsPath:t}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorNotFoundError"})}}t.AbiErrorNotFoundError=m;class g extends i.BaseError{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}t.AbiErrorSignatureNotFoundError=g;class y extends i.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}t.AbiEventSignatureEmptyTopicsError=y;class b extends i.BaseError{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}t.AbiEventSignatureNotFoundError=b;class v extends i.BaseError{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}t.AbiEventNotFoundError=v;class w extends i.BaseError{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}t.AbiFunctionNotFoundError=w;class x extends i.BaseError{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}t.AbiFunctionOutputsNotFoundError=x;class E extends i.BaseError{constructor(e,{docsPath:t}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionSignatureNotFoundError"})}}t.AbiFunctionSignatureNotFoundError=E;class _ extends i.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,r.formatAbiItem)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,r.formatAbiItem)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}t.AbiItemAmbiguityError=_;class k extends i.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}t.BytesSizeMismatchError=k;class S extends i.BaseError{constructor({abiItem:e,data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.formatAbiParams)(n,{includeName:!0})})`,`Data:   ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=o}}t.DecodeLogDataMismatch=S;class I extends i.BaseError{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.formatAbiItem)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}t.DecodeLogTopicsMismatch=I;class C extends i.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}t.InvalidAbiEncodingTypeError=C;class T extends i.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}t.InvalidAbiDecodingTypeError=T;class A extends i.BaseError{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}t.InvalidArrayError=A;class P extends i.BaseError{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}t.InvalidDefinitionTypeError=P;class O extends i.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}t.UnsupportedPackedAbiType=O},29723:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountNotFoundError=void 0;const r=n(24304);class o extends r.BaseError{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}t.AccountNotFoundError=o},77295:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAddressError=void 0;const r=n(24304);class o extends r.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}t.InvalidAddressError=o},24304:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const r=n(34059);class o extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.getVersion)()});const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof o&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return i(this,e)}}function i(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?i(e.cause,t):t?null:e}t.BaseError=o},88577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockNotFoundError=void 0;const r=n(24304);class o extends r.BaseError{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}t.BlockNotFoundError=o},61095:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OffchainLookupSenderMismatchError=t.OffchainLookupResponseMalformedError=t.OffchainLookupError=void 0;const r=n(29803),o=n(24304),i=n(34059);class s extends o.BaseError{constructor({callbackSelector:e,cause:t,data:n,extraData:r,sender:o,urls:s}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&["  Gateway URL(s):",...s.map((e=>`    ${(0,i.getUrl)(e)}`))],`  Sender: ${o}`,`  Data: ${n}`,`  Callback selector: ${e}`,`  Extra data: ${r}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}t.OffchainLookupError=s;class a extends o.BaseError{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,i.getUrl)(t)}`,`Response: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}t.OffchainLookupResponseMalformedError=a;class c extends o.BaseError{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}t.OffchainLookupSenderMismatchError=c},28890:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=void 0;const r=n(24304);class o extends r.BaseError{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}t.ChainDoesNotSupportContract=o;class i extends r.BaseError{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}t.ChainMismatchError=i;class s extends r.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}t.ChainNotFoundError=s;class a extends r.BaseError{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}t.ClientChainNotConfiguredError=a;class c extends r.BaseError{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}t.InvalidChainIdError=c},4924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawContractError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=void 0;const r=n(18281),o=n(55300),i=n(73843),s=n(99636),a=n(37253),c=n(65775),u=n(12183),l=n(60903),d=n(65413),f=n(24304),h=n(72861),p=n(34059);class m extends f.BaseError{constructor(e,{account:t,docsPath:n,chain:o,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:f,to:p,value:m}){const g=t?(0,r.parseAccount)(t):void 0,y=(0,h.prettyPrint)({from:g?.address,to:p,value:"undefined"!==typeof m&&`${(0,u.formatEther)(m)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:"undefined"!==typeof a&&`${(0,l.formatGwei)(a)} gwei`,maxFeePerGas:"undefined"!==typeof c&&`${(0,l.formatGwei)(c)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,l.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",y].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}t.CallExecutionError=m;class g extends f.BaseError{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:i,sender:u}){const l=(0,c.getAbiItem)({abi:t,args:n,name:i}),d=l?(0,a.formatAbiItemWithArgs)({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,s.formatAbiItem)(l,{includeName:!0}):void 0,m=(0,h.prettyPrint)({address:r&&(0,p.getContractAddress)(r),function:f,args:d&&"()"!==d&&`${[...Array(i?.length??0).keys()].map((()=>" ")).join("")}${d}`,sender:u});super(e.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",m].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=i,this.sender=u}}t.ContractFunctionExecutionError=g;class y extends f.BaseError{constructor({abi:e,data:t,functionName:n,message:r}){let c,u,l,f,h;if(t&&"0x"!==t)try{u=(0,i.decodeErrorResult)({abi:e,data:t});const{abiItem:n,errorName:r,args:c}=u;if("Error"===r)f=c[0];else if("Panic"===r){const[e]=c;f=o.panicReasons[e]}else{const e=n?(0,s.formatAbiItem)(n,{includeName:!0}):void 0,t=n&&c?(0,a.formatAbiItemWithArgs)({abiItem:n,args:c,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(r?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(p){c=p}else r&&(f=r);c instanceof d.AbiErrorSignatureNotFoundError&&(h=c.signature,l=[`Unable to decode signature "${h}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${h}.`]),super(f&&"execution reverted"!==f||h?[`The contract function "${n}" reverted with the following ${h?"signature":"reason"}:`,f||h].join("\n"):`The contract function "${n}" reverted.`,{cause:c,metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=f,this.signature=h}}t.ContractFunctionRevertedError=y;class b extends f.BaseError{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}t.ContractFunctionZeroDataError=b;class v extends f.BaseError{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}t.RawContractError=v},87328:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionOutOfBoundsError=t.NegativeOffsetError=void 0;const r=n(24304);class o extends r.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}t.NegativeOffsetError=o;class i extends r.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=i},60771:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=void 0;const r=n(24304);class o extends r.BaseError{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=o;class i extends r.BaseError{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=i},11602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOverflowError=t.OffsetOutOfBoundsError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=t.DataLengthTooShortError=t.DataLengthTooLongError=void 0;const r=n(24304);class o extends r.BaseError{constructor({consumed:e,length:t}){super(`Consumed bytes (${e}) is shorter than data length (${t-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooLongError"})}}t.DataLengthTooLongError=o;class i extends r.BaseError{constructor({length:e,dataLength:t}){super(`Data length (${t-1}) is shorter than consumed bytes length (${e-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooShortError"})}}t.DataLengthTooShortError=i;class s extends r.BaseError{constructor({max:e,min:t,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=s;class a extends r.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=a;class c extends r.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}t.InvalidHexBooleanError=c;class u extends r.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexValueError"})}}t.InvalidHexValueError=u;class l extends r.BaseError{constructor({nextOffset:e,offset:t}){super(`Next offset (${e}) is greater than previous offset + consumed bytes (${t})`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffsetOutOfBoundsError"})}}t.OffsetOutOfBoundsError=l;class d extends r.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}t.SizeOverflowError=d},48710:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarUriResolutionError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarInvalidMetadataError=void 0;const r=n(24304);class o extends r.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}t.EnsAvatarInvalidMetadataError=o;class i extends r.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}t.EnsAvatarInvalidNftUriError=i;class s extends r.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}t.EnsAvatarUriResolutionError=s;class a extends r.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}t.EnsAvatarUnsupportedNamespaceError=a},20028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EstimateGasExecutionError=void 0;const r=n(12183),o=n(60903),i=n(24304),s=n(72861);class a extends i.BaseError{constructor(e,{account:t,docsPath:n,chain:i,data:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=(0,s.prettyPrint)({from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.formatEther)(p)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}t.EstimateGasExecutionError=a},3242:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=void 0;const r=n(60903),o=n(24304);class i extends o.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}t.BaseFeeScalarError=i;class s extends o.BaseError{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}t.Eip1559FeesNotSupportedError=s;class a extends o.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,r.formatGwei)(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}t.MaxFeePerGasTooLowError=a},21631:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterTypeNotSupportedError=void 0;const r=n(24304);class o extends r.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}t.FilterTypeNotSupportedError=o},31027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNodeError=t.TipAboveFeeCapError=t.TransactionTypeNotSupportedError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.NonceMaxValueError=t.NonceTooLowError=t.NonceTooHighError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=void 0;const r=n(60903),o=n(24304);class i extends o.BaseError{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/}),t.ExecutionRevertedError=i;class s extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.formatGwei)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),t.FeeCapTooHighError=s;class a extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.formatGwei)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),t.FeeCapTooLowError=a;class c extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),t.NonceTooHighError=c;class u extends o.BaseError{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),t.NonceTooLowError=u;class l extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),t.NonceMaxValueError=l;class d extends o.BaseError{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),t.InsufficientFundsError=d;class f extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),t.IntrinsicGasTooHighError=f;class h extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),t.IntrinsicGasTooLowError=h;class p extends o.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/}),t.TransactionTypeNotSupportedError=p;class m extends o.BaseError{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.formatGwei)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.formatGwei)(n)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/}),t.TipAboveFeeCapError=m;class g extends o.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}t.UnknownNodeError=g},4880:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=t.RpcRequestError=t.WebSocketRequestError=t.HttpRequestError=void 0;const r=n(29803),o=n(24304),i=n(34059);class s extends o.BaseError{constructor({body:e,details:t,headers:n,status:o,url:s}){super("HTTP request failed.",{details:t,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,i.getUrl)(s)}`,e&&`Request body: ${(0,r.stringify)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=s}}t.HttpRequestError=s;class a extends o.BaseError{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,i.getUrl)(n)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}t.WebSocketRequestError=a;class c extends o.BaseError{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,i.getUrl)(n)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}t.RpcRequestError=c;class u extends o.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,i.getUrl)(t)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}t.TimeoutError=u},73812:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownRpcError=t.SwitchChainError=t.ChainDisconnectedError=t.ProviderDisconnectedError=t.UnsupportedProviderMethodError=t.UnauthorizedProviderError=t.UserRejectedRequestError=t.JsonRpcVersionUnsupportedError=t.LimitExceededRpcError=t.MethodNotSupportedRpcError=t.TransactionRejectedRpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.InvalidParamsRpcError=t.MethodNotFoundRpcError=t.InvalidRequestRpcError=t.ParseRpcError=t.ProviderRpcError=t.RpcError=void 0;const r=n(24304),o=n(4880);class i extends r.BaseError{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof o.RpcRequestError?e.code:t??-1}}t.RpcError=i;class s extends i{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}t.ProviderRpcError=s;class a extends i{constructor(e){super(e,{code:a.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),t.ParseRpcError=a;class c extends i{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),t.InvalidRequestRpcError=c;class u extends i{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),t.MethodNotFoundRpcError=u;class l extends i{constructor(e){super(e,{code:l.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),t.InvalidParamsRpcError=l;class d extends i{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),t.InternalRpcError=d;class f extends i{constructor(e){super(e,{code:f.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),t.InvalidInputRpcError=f;class h extends i{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),t.ResourceNotFoundRpcError=h;class p extends i{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),t.ResourceUnavailableRpcError=p;class m extends i{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),t.TransactionRejectedRpcError=m;class g extends i{constructor(e){super(e,{code:g.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),t.MethodNotSupportedRpcError=g;class y extends i{constructor(e){super(e,{code:y.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),t.LimitExceededRpcError=y;class b extends i{constructor(e){super(e,{code:b.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),t.JsonRpcVersionUnsupportedError=b;class v extends s{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001}),t.UserRejectedRequestError=v;class w extends s{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100}),t.UnauthorizedProviderError=w;class x extends s{constructor(e){super(e,{code:x.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200}),t.UnsupportedProviderMethodError=x;class E extends s{constructor(e){super(e,{code:E.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900}),t.ProviderDisconnectedError=E;class _ extends s{constructor(e){super(e,{code:_.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901}),t.ChainDisconnectedError=_;class k extends s{constructor(e){super(e,{code:k.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902}),t.SwitchChainError=k;t.UnknownRpcError=class extends i{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},72861:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.prettyPrint=void 0;const r=n(12183),o=n(60903),i=n(24304);function s(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>`  ${`${e}:`.padEnd(n+1)}  ${t}`)).join("\n")}t.prettyPrint=s;class a extends i.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}t.FeeConflictError=a;class c extends i.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}t.InvalidLegacyVError=c;class u extends i.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}t.InvalidSerializableTransactionError=u;class l extends i.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}t.InvalidSerializedTransactionTypeError=l;class d extends i.BaseError{constructor({attributes:e,serializedTransaction:t,type:n}){const r=Object.entries(e).map((([e,t])=>"undefined"===typeof t?e:void 0)).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,r.length>0?`Missing Attributes: ${r.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=t,this.type=n}}t.InvalidSerializedTransactionError=d;class f extends i.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}t.InvalidStorageKeySizeError=f;class h extends i.BaseError{constructor(e,{account:t,docsPath:n,chain:i,data:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=s({chain:i&&`${i?.name} (id: ${i?.id})`,from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.formatEther)(p)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}t.TransactionExecutionError=h;class p extends i.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:o}){let i="Transaction";n&&void 0!==o&&(i=`Transaction at block time "${n}" at index "${o}"`),e&&void 0!==o&&(i=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(i=`Transaction at block number "${t}" at index "${o}"`),r&&(i=`Transaction with hash "${r}"`),super(`${i} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}t.TransactionNotFoundError=p;class m extends i.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}t.TransactionReceiptNotFoundError=m;class g extends i.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}t.WaitForTransactionReceiptTimeoutError=g},3927:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRequiredError=void 0;const r=n(24304);class o extends r.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}t.UrlRequiredError=o},34059:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVersion=t.getUrl=t.getContractAddress=void 0;const r=n(47297);t.getContractAddress=e=>e;t.getUrl=e=>e;t.getVersion=()=>`viem@${r.version}`},47297:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.19.12"},15875:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=t.weiUnits=t.gweiUnits=t.etherUnits=t.zeroAddress=t.multicall3Abi=t.webSocket=t.createWalletClient=t.createTransport=t.walletActions=t.testActions=t.publicActions=t.createTestClient=t.createPublicClient=t.http=t.fallback=t.custom=t.createClient=t.getContract=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.UnknownSignatureError=t.UnknownTypeError=t.SolidityProtectedKeywordError=t.InvalidStructSignatureError=t.InvalidSignatureError=t.InvalidParenthesisError=t.InvalidParameterError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.InvalidAbiItemError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=t.CircularReferenceError=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=void 0,t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiEventNotFoundError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingLengthMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=t.presignMessagePrefix=t.zeroHash=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=void 0,t.InvalidHexBooleanError=t.IntegerOutOfRangeError=t.InvalidBytesBooleanError=t.DataLengthTooShortError=t.DataLengthTooLongError=t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=t.UserRejectedRequestError=t.UnsupportedProviderMethodError=t.UnknownRpcError=t.UnauthorizedProviderError=t.TransactionRejectedRpcError=t.SwitchChainError=t.RpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.ProviderRpcError=t.ProviderDisconnectedError=t.ParseRpcError=t.MethodNotSupportedRpcError=t.MethodNotFoundRpcError=t.LimitExceededRpcError=t.JsonRpcVersionUnsupportedError=t.InvalidRequestRpcError=t.InvalidParamsRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.ChainDisconnectedError=t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=t.RawContractError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=t.BlockNotFoundError=t.BaseError=t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiEncodingTypeError=t.InvalidAbiDecodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiFunctionSignatureNotFoundError=void 0,t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeDeployData=t.decodeAbiParameters=t.formatLog=t.formatBlock=t.defineBlock=t.namehash=t.labelhash=t.UrlRequiredError=t.SliceOffsetOutOfBoundsError=t.SizeExceedsPaddingSizeError=t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializedTransactionError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.InvalidAddressError=t.WebSocketRequestError=t.TimeoutError=t.RpcRequestError=t.HttpRequestError=t.FilterTypeNotSupportedError=t.UnknownNodeError=t.TransactionTypeNotSupportedError=t.TipAboveFeeCapError=t.NonceTooLowError=t.NonceTooHighError=t.NonceMaxValueError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=t.EstimateGasExecutionError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarUriResolutionError=t.SizeOverflowError=t.OffsetOutOfBoundsError=t.InvalidHexValueError=void 0,t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.verifyTypedData=t.verifyMessage=t.toRlp=t.hexToRlp=t.bytesToRlp=t.signatureToHex=t.compactSignatureToHex=t.signatureToCompactSignature=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.hexToSignature=t.hexToCompactSignature=t.compactSignatureToSignature=t.hashTypedData=t.hashDomain=t.getTransactionType=t.getSerializedTransactionType=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAbiItem=t.rpcTransactionType=t.formatTransactionRequest=t.defineTransactionRequest=t.formatTransactionReceipt=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=void 0,t.serializeTransaction=t.serializeAccessList=t.parseUnits=t.parseTransaction=t.parseGwei=t.parseEther=t.padHex=t.padBytes=t.pad=t.keccak256=t.isHex=t.isHash=t.isBytes=t.isAddressEqual=t.isAddress=t.hashMessage=t.getFunctionSignature=t.getFunctionSelector=t.getEventSignature=t.getEventSelector=t.getContractError=t.getAddress=t.checksumAddress=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.formatUnits=t.formatGwei=t.formatEther=t.encodePacked=t.getChainContractAddress=t.extractChain=t.defineChain=t.assertCurrentChain=t.concatHex=t.concatBytes=t.concat=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.bytesToBigInt=void 0,t.getTypesForEIP712Domain=t.domainSeparator=t.validateTypedData=t.trim=t.stringify=t.sliceHex=t.sliceBytes=t.slice=t.size=void 0;var r=n(48661);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var o=n(8880);Object.defineProperty(t,"getContract",{enumerable:!0,get:function(){return o.getContract}});var i=n(74485);Object.defineProperty(t,"createClient",{enumerable:!0,get:function(){return i.createClient}});var s=n(52883);Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return s.custom}});var a=n(35010);Object.defineProperty(t,"fallback",{enumerable:!0,get:function(){return a.fallback}});var c=n(69800);Object.defineProperty(t,"http",{enumerable:!0,get:function(){return c.http}});var u=n(18579);Object.defineProperty(t,"createPublicClient",{enumerable:!0,get:function(){return u.createPublicClient}});var l=n(551);Object.defineProperty(t,"createTestClient",{enumerable:!0,get:function(){return l.createTestClient}});var d=n(81986);Object.defineProperty(t,"publicActions",{enumerable:!0,get:function(){return d.publicActions}});var f=n(67213);Object.defineProperty(t,"testActions",{enumerable:!0,get:function(){return f.testActions}});var h=n(87054);Object.defineProperty(t,"walletActions",{enumerable:!0,get:function(){return h.walletActions}});var p=n(67641);Object.defineProperty(t,"createTransport",{enumerable:!0,get:function(){return p.createTransport}});var m=n(87410);Object.defineProperty(t,"createWalletClient",{enumerable:!0,get:function(){return m.createWalletClient}});var g=n(99102);Object.defineProperty(t,"webSocket",{enumerable:!0,get:function(){return g.webSocket}});var y=n(86725);Object.defineProperty(t,"multicall3Abi",{enumerable:!0,get:function(){return y.multicall3Abi}});var b=n(78104);Object.defineProperty(t,"zeroAddress",{enumerable:!0,get:function(){return b.zeroAddress}});var v=n(12966);Object.defineProperty(t,"etherUnits",{enumerable:!0,get:function(){return v.etherUnits}}),Object.defineProperty(t,"gweiUnits",{enumerable:!0,get:function(){return v.gweiUnits}}),Object.defineProperty(t,"weiUnits",{enumerable:!0,get:function(){return v.weiUnits}});var w=n(75081);Object.defineProperty(t,"maxInt8",{enumerable:!0,get:function(){return w.maxInt8}}),Object.defineProperty(t,"maxInt16",{enumerable:!0,get:function(){return w.maxInt16}}),Object.defineProperty(t,"maxInt24",{enumerable:!0,get:function(){return w.maxInt24}}),Object.defineProperty(t,"maxInt32",{enumerable:!0,get:function(){return w.maxInt32}}),Object.defineProperty(t,"maxInt40",{enumerable:!0,get:function(){return w.maxInt40}}),Object.defineProperty(t,"maxInt48",{enumerable:!0,get:function(){return w.maxInt48}}),Object.defineProperty(t,"maxInt56",{enumerable:!0,get:function(){return w.maxInt56}}),Object.defineProperty(t,"maxInt64",{enumerable:!0,get:function(){return w.maxInt64}}),Object.defineProperty(t,"maxInt72",{enumerable:!0,get:function(){return w.maxInt72}}),Object.defineProperty(t,"maxInt80",{enumerable:!0,get:function(){return w.maxInt80}}),Object.defineProperty(t,"maxInt88",{enumerable:!0,get:function(){return w.maxInt88}}),Object.defineProperty(t,"maxInt96",{enumerable:!0,get:function(){return w.maxInt96}}),Object.defineProperty(t,"maxInt104",{enumerable:!0,get:function(){return w.maxInt104}}),Object.defineProperty(t,"maxInt112",{enumerable:!0,get:function(){return w.maxInt112}}),Object.defineProperty(t,"maxInt120",{enumerable:!0,get:function(){return w.maxInt120}}),Object.defineProperty(t,"maxInt128",{enumerable:!0,get:function(){return w.maxInt128}}),Object.defineProperty(t,"maxInt136",{enumerable:!0,get:function(){return w.maxInt136}}),Object.defineProperty(t,"maxInt144",{enumerable:!0,get:function(){return w.maxInt144}}),Object.defineProperty(t,"maxInt152",{enumerable:!0,get:function(){return w.maxInt152}}),Object.defineProperty(t,"maxInt160",{enumerable:!0,get:function(){return w.maxInt160}}),Object.defineProperty(t,"maxInt168",{enumerable:!0,get:function(){return w.maxInt168}}),Object.defineProperty(t,"maxInt176",{enumerable:!0,get:function(){return w.maxInt176}}),Object.defineProperty(t,"maxInt184",{enumerable:!0,get:function(){return w.maxInt184}}),Object.defineProperty(t,"maxInt192",{enumerable:!0,get:function(){return w.maxInt192}}),Object.defineProperty(t,"maxInt200",{enumerable:!0,get:function(){return w.maxInt200}}),Object.defineProperty(t,"maxInt208",{enumerable:!0,get:function(){return w.maxInt208}}),Object.defineProperty(t,"maxInt216",{enumerable:!0,get:function(){return w.maxInt216}}),Object.defineProperty(t,"maxInt224",{enumerable:!0,get:function(){return w.maxInt224}}),Object.defineProperty(t,"maxInt232",{enumerable:!0,get:function(){return w.maxInt232}}),Object.defineProperty(t,"maxInt240",{enumerable:!0,get:function(){return w.maxInt240}}),Object.defineProperty(t,"maxInt248",{enumerable:!0,get:function(){return w.maxInt248}}),Object.defineProperty(t,"maxInt256",{enumerable:!0,get:function(){return w.maxInt256}}),Object.defineProperty(t,"maxUint8",{enumerable:!0,get:function(){return w.maxUint8}}),Object.defineProperty(t,"maxUint16",{enumerable:!0,get:function(){return w.maxUint16}}),Object.defineProperty(t,"maxUint24",{enumerable:!0,get:function(){return w.maxUint24}}),Object.defineProperty(t,"maxUint32",{enumerable:!0,get:function(){return w.maxUint32}}),Object.defineProperty(t,"maxUint40",{enumerable:!0,get:function(){return w.maxUint40}}),Object.defineProperty(t,"maxUint48",{enumerable:!0,get:function(){return w.maxUint48}}),Object.defineProperty(t,"maxUint56",{enumerable:!0,get:function(){return w.maxUint56}}),Object.defineProperty(t,"maxUint64",{enumerable:!0,get:function(){return w.maxUint64}}),Object.defineProperty(t,"maxUint72",{enumerable:!0,get:function(){return w.maxUint72}}),Object.defineProperty(t,"maxUint80",{enumerable:!0,get:function(){return w.maxUint80}}),Object.defineProperty(t,"maxUint88",{enumerable:!0,get:function(){return w.maxUint88}}),Object.defineProperty(t,"maxUint96",{enumerable:!0,get:function(){return w.maxUint96}}),Object.defineProperty(t,"maxUint104",{enumerable:!0,get:function(){return w.maxUint104}}),Object.defineProperty(t,"maxUint112",{enumerable:!0,get:function(){return w.maxUint112}}),Object.defineProperty(t,"maxUint120",{enumerable:!0,get:function(){return w.maxUint120}}),Object.defineProperty(t,"maxUint128",{enumerable:!0,get:function(){return w.maxUint128}}),Object.defineProperty(t,"maxUint136",{enumerable:!0,get:function(){return w.maxUint136}}),Object.defineProperty(t,"maxUint144",{enumerable:!0,get:function(){return w.maxUint144}}),Object.defineProperty(t,"maxUint152",{enumerable:!0,get:function(){return w.maxUint152}}),Object.defineProperty(t,"maxUint160",{enumerable:!0,get:function(){return w.maxUint160}}),Object.defineProperty(t,"maxUint168",{enumerable:!0,get:function(){return w.maxUint168}}),Object.defineProperty(t,"maxUint176",{enumerable:!0,get:function(){return w.maxUint176}}),Object.defineProperty(t,"maxUint184",{enumerable:!0,get:function(){return w.maxUint184}}),Object.defineProperty(t,"maxUint192",{enumerable:!0,get:function(){return w.maxUint192}}),Object.defineProperty(t,"maxUint200",{enumerable:!0,get:function(){return w.maxUint200}}),Object.defineProperty(t,"maxUint208",{enumerable:!0,get:function(){return w.maxUint208}}),Object.defineProperty(t,"maxUint216",{enumerable:!0,get:function(){return w.maxUint216}}),Object.defineProperty(t,"maxUint224",{enumerable:!0,get:function(){return w.maxUint224}}),Object.defineProperty(t,"maxUint232",{enumerable:!0,get:function(){return w.maxUint232}}),Object.defineProperty(t,"maxUint240",{enumerable:!0,get:function(){return w.maxUint240}}),Object.defineProperty(t,"maxUint248",{enumerable:!0,get:function(){return w.maxUint248}}),Object.defineProperty(t,"maxUint256",{enumerable:!0,get:function(){return w.maxUint256}}),Object.defineProperty(t,"minInt8",{enumerable:!0,get:function(){return w.minInt8}}),Object.defineProperty(t,"minInt16",{enumerable:!0,get:function(){return w.minInt16}}),Object.defineProperty(t,"minInt24",{enumerable:!0,get:function(){return w.minInt24}}),Object.defineProperty(t,"minInt32",{enumerable:!0,get:function(){return w.minInt32}}),Object.defineProperty(t,"minInt40",{enumerable:!0,get:function(){return w.minInt40}}),Object.defineProperty(t,"minInt48",{enumerable:!0,get:function(){return w.minInt48}}),Object.defineProperty(t,"minInt56",{enumerable:!0,get:function(){return w.minInt56}}),Object.defineProperty(t,"minInt64",{enumerable:!0,get:function(){return w.minInt64}}),Object.defineProperty(t,"minInt72",{enumerable:!0,get:function(){return w.minInt72}}),Object.defineProperty(t,"minInt80",{enumerable:!0,get:function(){return w.minInt80}}),Object.defineProperty(t,"minInt88",{enumerable:!0,get:function(){return w.minInt88}}),Object.defineProperty(t,"minInt96",{enumerable:!0,get:function(){return w.minInt96}}),Object.defineProperty(t,"minInt104",{enumerable:!0,get:function(){return w.minInt104}}),Object.defineProperty(t,"minInt112",{enumerable:!0,get:function(){return w.minInt112}}),Object.defineProperty(t,"minInt120",{enumerable:!0,get:function(){return w.minInt120}}),Object.defineProperty(t,"minInt128",{enumerable:!0,get:function(){return w.minInt128}}),Object.defineProperty(t,"minInt136",{enumerable:!0,get:function(){return w.minInt136}}),Object.defineProperty(t,"minInt144",{enumerable:!0,get:function(){return w.minInt144}}),Object.defineProperty(t,"minInt152",{enumerable:!0,get:function(){return w.minInt152}}),Object.defineProperty(t,"minInt160",{enumerable:!0,get:function(){return w.minInt160}}),Object.defineProperty(t,"minInt168",{enumerable:!0,get:function(){return w.minInt168}}),Object.defineProperty(t,"minInt176",{enumerable:!0,get:function(){return w.minInt176}}),Object.defineProperty(t,"minInt184",{enumerable:!0,get:function(){return w.minInt184}}),Object.defineProperty(t,"minInt192",{enumerable:!0,get:function(){return w.minInt192}}),Object.defineProperty(t,"minInt200",{enumerable:!0,get:function(){return w.minInt200}}),Object.defineProperty(t,"minInt208",{enumerable:!0,get:function(){return w.minInt208}}),Object.defineProperty(t,"minInt216",{enumerable:!0,get:function(){return w.minInt216}}),Object.defineProperty(t,"minInt224",{enumerable:!0,get:function(){return w.minInt224}}),Object.defineProperty(t,"minInt232",{enumerable:!0,get:function(){return w.minInt232}}),Object.defineProperty(t,"minInt240",{enumerable:!0,get:function(){return w.minInt240}}),Object.defineProperty(t,"minInt248",{enumerable:!0,get:function(){return w.minInt248}}),Object.defineProperty(t,"minInt256",{enumerable:!0,get:function(){return w.minInt256}});var x=n(82357);Object.defineProperty(t,"zeroHash",{enumerable:!0,get:function(){return x.zeroHash}});var E=n(95011);Object.defineProperty(t,"presignMessagePrefix",{enumerable:!0,get:function(){return E.presignMessagePrefix}});var _=n(65413);Object.defineProperty(t,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorNotFoundError}}),Object.defineProperty(t,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorParamsNotFoundError}}),Object.defineProperty(t,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(t,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(t,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return _.AbiDecodingZeroDataError}}),Object.defineProperty(t,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(t,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorInputsNotFoundError}}),Object.defineProperty(t,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorNotFoundError}}),Object.defineProperty(t,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorSignatureNotFoundError}}),Object.defineProperty(t,"AbiEventNotFoundError",{enumerable:!0,get:function(){return _.AbiEventNotFoundError}}),Object.defineProperty(t,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return _.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(t,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiEventSignatureNotFoundError}}),Object.defineProperty(t,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionNotFoundError}}),Object.defineProperty(t,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(t,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(t,"BytesSizeMismatchError",{enumerable:!0,get:function(){return _.BytesSizeMismatchError}}),Object.defineProperty(t,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return _.DecodeLogDataMismatch}}),Object.defineProperty(t,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return _.DecodeLogTopicsMismatch}}),Object.defineProperty(t,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiDecodingTypeError}}),Object.defineProperty(t,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiEncodingTypeError}}),Object.defineProperty(t,"InvalidArrayError",{enumerable:!0,get:function(){return _.InvalidArrayError}}),Object.defineProperty(t,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return _.InvalidDefinitionTypeError}}),Object.defineProperty(t,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return _.UnsupportedPackedAbiType}});var k=n(24304);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return k.BaseError}});var S=n(88577);Object.defineProperty(t,"BlockNotFoundError",{enumerable:!0,get:function(){return S.BlockNotFoundError}});var I=n(4924);Object.defineProperty(t,"CallExecutionError",{enumerable:!0,get:function(){return I.CallExecutionError}}),Object.defineProperty(t,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return I.ContractFunctionExecutionError}}),Object.defineProperty(t,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return I.ContractFunctionRevertedError}}),Object.defineProperty(t,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return I.ContractFunctionZeroDataError}}),Object.defineProperty(t,"RawContractError",{enumerable:!0,get:function(){return I.RawContractError}});var C=n(3242);Object.defineProperty(t,"BaseFeeScalarError",{enumerable:!0,get:function(){return C.BaseFeeScalarError}}),Object.defineProperty(t,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return C.Eip1559FeesNotSupportedError}}),Object.defineProperty(t,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return C.MaxFeePerGasTooLowError}});var T=n(73812);Object.defineProperty(t,"ChainDisconnectedError",{enumerable:!0,get:function(){return T.ChainDisconnectedError}}),Object.defineProperty(t,"InternalRpcError",{enumerable:!0,get:function(){return T.InternalRpcError}}),Object.defineProperty(t,"InvalidInputRpcError",{enumerable:!0,get:function(){return T.InvalidInputRpcError}}),Object.defineProperty(t,"InvalidParamsRpcError",{enumerable:!0,get:function(){return T.InvalidParamsRpcError}}),Object.defineProperty(t,"InvalidRequestRpcError",{enumerable:!0,get:function(){return T.InvalidRequestRpcError}}),Object.defineProperty(t,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return T.JsonRpcVersionUnsupportedError}}),Object.defineProperty(t,"LimitExceededRpcError",{enumerable:!0,get:function(){return T.LimitExceededRpcError}}),Object.defineProperty(t,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return T.MethodNotFoundRpcError}}),Object.defineProperty(t,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return T.MethodNotSupportedRpcError}}),Object.defineProperty(t,"ParseRpcError",{enumerable:!0,get:function(){return T.ParseRpcError}}),Object.defineProperty(t,"ProviderDisconnectedError",{enumerable:!0,get:function(){return T.ProviderDisconnectedError}}),Object.defineProperty(t,"ProviderRpcError",{enumerable:!0,get:function(){return T.ProviderRpcError}}),Object.defineProperty(t,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return T.ResourceNotFoundRpcError}}),Object.defineProperty(t,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return T.ResourceUnavailableRpcError}}),Object.defineProperty(t,"RpcError",{enumerable:!0,get:function(){return T.RpcError}}),Object.defineProperty(t,"SwitchChainError",{enumerable:!0,get:function(){return T.SwitchChainError}}),Object.defineProperty(t,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return T.TransactionRejectedRpcError}}),Object.defineProperty(t,"UnauthorizedProviderError",{enumerable:!0,get:function(){return T.UnauthorizedProviderError}}),Object.defineProperty(t,"UnknownRpcError",{enumerable:!0,get:function(){return T.UnknownRpcError}}),Object.defineProperty(t,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return T.UnsupportedProviderMethodError}}),Object.defineProperty(t,"UserRejectedRequestError",{enumerable:!0,get:function(){return T.UserRejectedRequestError}});var A=n(28890);Object.defineProperty(t,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return A.ChainDoesNotSupportContract}}),Object.defineProperty(t,"ChainMismatchError",{enumerable:!0,get:function(){return A.ChainMismatchError}}),Object.defineProperty(t,"ChainNotFoundError",{enumerable:!0,get:function(){return A.ChainNotFoundError}}),Object.defineProperty(t,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return A.ClientChainNotConfiguredError}}),Object.defineProperty(t,"InvalidChainIdError",{enumerable:!0,get:function(){return A.InvalidChainIdError}});var P=n(11602);Object.defineProperty(t,"DataLengthTooLongError",{enumerable:!0,get:function(){return P.DataLengthTooLongError}}),Object.defineProperty(t,"DataLengthTooShortError",{enumerable:!0,get:function(){return P.DataLengthTooShortError}}),Object.defineProperty(t,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return P.InvalidBytesBooleanError}}),Object.defineProperty(t,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return P.IntegerOutOfRangeError}}),Object.defineProperty(t,"InvalidHexBooleanError",{enumerable:!0,get:function(){return P.InvalidHexBooleanError}}),Object.defineProperty(t,"InvalidHexValueError",{enumerable:!0,get:function(){return P.InvalidHexValueError}}),Object.defineProperty(t,"OffsetOutOfBoundsError",{enumerable:!0,get:function(){return P.OffsetOutOfBoundsError}}),Object.defineProperty(t,"SizeOverflowError",{enumerable:!0,get:function(){return P.SizeOverflowError}});var O=n(48710);Object.defineProperty(t,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return O.EnsAvatarUriResolutionError}}),Object.defineProperty(t,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return O.EnsAvatarInvalidNftUriError}}),Object.defineProperty(t,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return O.EnsAvatarUnsupportedNamespaceError}});var j=n(20028);Object.defineProperty(t,"EstimateGasExecutionError",{enumerable:!0,get:function(){return j.EstimateGasExecutionError}});var M=n(31027);Object.defineProperty(t,"ExecutionRevertedError",{enumerable:!0,get:function(){return M.ExecutionRevertedError}}),Object.defineProperty(t,"FeeCapTooHighError",{enumerable:!0,get:function(){return M.FeeCapTooHighError}}),Object.defineProperty(t,"FeeCapTooLowError",{enumerable:!0,get:function(){return M.FeeCapTooLowError}}),Object.defineProperty(t,"InsufficientFundsError",{enumerable:!0,get:function(){return M.InsufficientFundsError}}),Object.defineProperty(t,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return M.IntrinsicGasTooHighError}}),Object.defineProperty(t,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return M.IntrinsicGasTooLowError}}),Object.defineProperty(t,"NonceMaxValueError",{enumerable:!0,get:function(){return M.NonceMaxValueError}}),Object.defineProperty(t,"NonceTooHighError",{enumerable:!0,get:function(){return M.NonceTooHighError}}),Object.defineProperty(t,"NonceTooLowError",{enumerable:!0,get:function(){return M.NonceTooLowError}}),Object.defineProperty(t,"TipAboveFeeCapError",{enumerable:!0,get:function(){return M.TipAboveFeeCapError}}),Object.defineProperty(t,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return M.TransactionTypeNotSupportedError}}),Object.defineProperty(t,"UnknownNodeError",{enumerable:!0,get:function(){return M.UnknownNodeError}});var R=n(21631);Object.defineProperty(t,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return R.FilterTypeNotSupportedError}});var B=n(4880);Object.defineProperty(t,"HttpRequestError",{enumerable:!0,get:function(){return B.HttpRequestError}}),Object.defineProperty(t,"RpcRequestError",{enumerable:!0,get:function(){return B.RpcRequestError}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return B.TimeoutError}}),Object.defineProperty(t,"WebSocketRequestError",{enumerable:!0,get:function(){return B.WebSocketRequestError}});var N=n(77295);Object.defineProperty(t,"InvalidAddressError",{enumerable:!0,get:function(){return N.InvalidAddressError}});var L=n(72861);Object.defineProperty(t,"FeeConflictError",{enumerable:!0,get:function(){return L.FeeConflictError}}),Object.defineProperty(t,"InvalidLegacyVError",{enumerable:!0,get:function(){return L.InvalidLegacyVError}}),Object.defineProperty(t,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return L.InvalidSerializableTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return L.InvalidSerializedTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return L.InvalidSerializedTransactionTypeError}}),Object.defineProperty(t,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return L.InvalidStorageKeySizeError}}),Object.defineProperty(t,"TransactionExecutionError",{enumerable:!0,get:function(){return L.TransactionExecutionError}}),Object.defineProperty(t,"TransactionNotFoundError",{enumerable:!0,get:function(){return L.TransactionNotFoundError}}),Object.defineProperty(t,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return L.TransactionReceiptNotFoundError}}),Object.defineProperty(t,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return L.WaitForTransactionReceiptTimeoutError}});var U=n(60771);Object.defineProperty(t,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return U.SizeExceedsPaddingSizeError}}),Object.defineProperty(t,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return U.SliceOffsetOutOfBoundsError}});var D=n(3927);Object.defineProperty(t,"UrlRequiredError",{enumerable:!0,get:function(){return D.UrlRequiredError}});var F=n(82955);Object.defineProperty(t,"labelhash",{enumerable:!0,get:function(){return F.labelhash}});var z=n(41177);Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return z.namehash}});var $=n(49906);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return $.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return $.formatBlock}});var q=n(47960);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return q.formatLog}});var Z=n(42716);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return Z.decodeAbiParameters}});var H=n(27906);Object.defineProperty(t,"decodeDeployData",{enumerable:!0,get:function(){return H.decodeDeployData}});var W=n(73843);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return W.decodeErrorResult}});var G=n(57573);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return G.decodeEventLog}});var K=n(59453);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return K.decodeFunctionData}});var V=n(52366);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return V.decodeFunctionResult}});var X=n(79885);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return X.encodeAbiParameters}});var Y=n(1099);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return Y.encodeDeployData}});var J=n(55663);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return J.encodeErrorResult}});var Q=n(86778);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return Q.encodeEventTopics}});var ee=n(71124);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return ee.encodeFunctionData}});var te=n(41325);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return te.encodeFunctionResult}});var ne=n(64056);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return ne.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return ne.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return ne.transactionType}});var re=n(37262);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return re.defineTransactionReceipt}}),Object.defineProperty(t,"formatTransactionReceipt",{enumerable:!0,get:function(){return re.formatTransactionReceipt}});var oe=n(14928);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return oe.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return oe.formatTransactionRequest}}),Object.defineProperty(t,"rpcTransactionType",{enumerable:!0,get:function(){return oe.rpcTransactionType}});var ie=n(65775);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return ie.getAbiItem}});var se=n(37247);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return se.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return se.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return se.getCreateAddress}});var ae=n(8711);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return ae.getSerializedTransactionType}});var ce=n(57080);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return ce.getTransactionType}});var ue=n(90696);Object.defineProperty(t,"hashDomain",{enumerable:!0,get:function(){return ue.hashDomain}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return ue.hashTypedData}});var le=n(63184);Object.defineProperty(t,"compactSignatureToSignature",{enumerable:!0,get:function(){return le.compactSignatureToSignature}});var de=n(86394);Object.defineProperty(t,"hexToCompactSignature",{enumerable:!0,get:function(){return de.hexToCompactSignature}});var fe=n(88312);Object.defineProperty(t,"hexToSignature",{enumerable:!0,get:function(){return fe.hexToSignature}});var he=n(60830);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return he.recoverAddress}});var pe=n(59091);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return pe.recoverMessageAddress}});var me=n(58686);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return me.recoverPublicKey}});var ge=n(34494);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return ge.recoverTypedDataAddress}});var ye=n(32444);Object.defineProperty(t,"signatureToCompactSignature",{enumerable:!0,get:function(){return ye.signatureToCompactSignature}});var be=n(59250);Object.defineProperty(t,"compactSignatureToHex",{enumerable:!0,get:function(){return be.compactSignatureToHex}});var ve=n(20178);Object.defineProperty(t,"signatureToHex",{enumerable:!0,get:function(){return ve.signatureToHex}});var we=n(21944);Object.defineProperty(t,"bytesToRlp",{enumerable:!0,get:function(){return we.bytesToRlp}}),Object.defineProperty(t,"hexToRlp",{enumerable:!0,get:function(){return we.hexToRlp}}),Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return we.toRlp}});var xe=n(88444);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return xe.verifyMessage}});var Ee=n(38032);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return Ee.verifyTypedData}});var _e=n(77365);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return _e.assertRequest}});var ke=n(26121);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ke.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ke.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return ke.assertTransactionLegacy}});var Se=n(10441);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return Se.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return Se.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return Se.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return Se.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return Se.toBytes}});var Ie=n(62002);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return Ie.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return Ie.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return Ie.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return Ie.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return Ie.toHex}});var Ce=n(35250);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return Ce.bytesToBigInt}}),Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return Ce.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return Ce.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return Ce.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return Ce.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return Ce.fromBytes}});var Te=n(10062);Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return Te.ccipFetch}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return Te.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return Te.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return Te.offchainLookupSignature}});var Ae=n(37456);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return Ae.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return Ae.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return Ae.concatHex}});var Pe=n(81696);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return Pe.assertCurrentChain}});var Oe=n(93060);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return Oe.defineChain}});var je=n(36635);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return je.extractChain}});var Me=n(31693);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return Me.getChainContractAddress}});var Re=n(20500);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return Re.encodePacked}});var Be=n(12183);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Be.formatEther}});var Ne=n(60903);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return Ne.formatGwei}});var Le=n(69719);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Le.formatUnits}});var Ue=n(39581);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return Ue.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return Ue.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return Ue.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return Ue.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return Ue.hexToString}});var De=n(14498);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return De.fromRlp}});var Fe=n(3001);Object.defineProperty(t,"checksumAddress",{enumerable:!0,get:function(){return Fe.checksumAddress}}),Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return Fe.getAddress}});var ze=n(30548);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return ze.getContractError}});var $e=n(29796);Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return $e.getEventSelector}});var qe=n(5396);Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return qe.getEventSignature}});var Ze=n(45433);Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return Ze.getFunctionSelector}});var He=n(69682);Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return He.getFunctionSignature}});var We=n(19707);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return We.hashMessage}});var Ge=n(35129);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return Ge.isAddress}});var Ke=n(93127);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return Ke.isAddressEqual}});var Ve=n(76551);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return Ve.isBytes}});var Xe=n(70213);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return Xe.isHash}});var Ye=n(34323);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return Ye.isHex}});var Je=n(12922);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return Je.keccak256}});var Qe=n(38454);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return Qe.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return Qe.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return Qe.padHex}});var et=n(60285);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return et.parseEther}});var tt=n(74448);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return tt.parseGwei}});var nt=n(69531);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return nt.parseTransaction}});var rt=n(39190);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return rt.parseUnits}});var ot=n(37200);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return ot.serializeAccessList}});var it=n(88165);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return it.serializeTransaction}});var st=n(61539);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return st.size}});var at=n(62870);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return at.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return at.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return at.sliceHex}});var ct=n(29803);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return ct.stringify}});var ut=n(29957);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return ut.trim}});var lt=n(85024);Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return lt.validateTypedData}}),Object.defineProperty(t,"domainSeparator",{enumerable:!0,get:function(){return lt.domainSeparator}}),Object.defineProperty(t,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return lt.getTypesForEIP712Domain}})},42716:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAbiParameters=void 0;const r=n(65413),o=n(3001),i=n(61539),s=n(62870),a=n(29957),c=n(39581),u=n(79885);function l({data:e,param:t,position:n}){const i=(0,u.getArrayComponents)(t.type);if(i){const[r,o]=i;return function(e,{param:t,length:n,position:r}){if(!n){const n=(0,c.hexToNumber)((0,s.slice)(e,r,r+32,{strict:!0})),o=(0,c.hexToNumber)((0,s.slice)(e,n,n+32,{strict:!0}));let i=0;const a=[];for(let r=0;r<o;++r){const r=l({data:(0,s.slice)(e,n+32),param:t,position:i});i+=r.consumed,a.push(r.value)}return{value:a,consumed:32}}if(d(t)){const o=!(0,u.getArrayComponents)(t.type)?.[0];let i=0;const a=[];for(let u=0;u<n;++u){const n=(0,c.hexToNumber)((0,s.slice)(e,r,r+32,{strict:!0})),d=l({data:(0,s.slice)(e,n),param:t,position:o?i:32*u});i+=d.consumed,a.push(d.value)}return{value:a,consumed:32}}let o=0;const i=[];for(let s=0;s<n;++s){const n=l({data:e,param:t,position:r+o});o+=n.consumed,i.push(n.value)}return{value:i,consumed:o}}(e,{length:r,param:{...t,type:o},position:n})}if("tuple"===t.type)return function(e,{param:t,position:n}){const r=0===t.components.length||t.components.some((({name:e})=>!e)),o=r?[]:{};let i=0;if(d(t)){const a=(0,c.hexToNumber)((0,s.slice)(e,n,n+32,{strict:!0}));for(let n=0;n<t.components.length;++n){const c=t.components[n],u=l({data:(0,s.slice)(e,a),param:c,position:i});i+=u.consumed,o[r?n:c?.name]=u.value}return{consumed:32,value:o}}for(let s=0;s<t.components.length;++s){const a=t.components[s],c=l({data:e,param:a,position:n+i});i+=c.consumed,o[r?s:a?.name]=c.value}return{consumed:i,value:o}}(e,{param:t,position:n});if("string"===t.type)return function(e,{position:t}){const n=(0,c.hexToNumber)((0,s.slice)(e,t,t+32,{strict:!0})),r=(0,c.hexToNumber)((0,s.slice)(e,n,n+32,{strict:!0}));if(0===r)return{consumed:32,value:""};return{consumed:32,value:(0,c.hexToString)((0,a.trim)((0,s.slice)(e,n+32,n+32+r,{strict:!0})))}}(e,{position:n});if(t.type.startsWith("bytes"))return function(e,{param:t,position:n}){const[r,o]=t.type.split("bytes");if(!o){const t=(0,c.hexToNumber)((0,s.slice)(e,n,n+32,{strict:!0})),r=(0,c.hexToNumber)((0,s.slice)(e,t,t+32,{strict:!0}));if(0===r)return{consumed:32,value:"0x"};return{consumed:32,value:(0,s.slice)(e,t+32,t+32+r,{strict:!0})}}return{consumed:32,value:(0,s.slice)(e,n,n+parseInt(o),{strict:!0})}}(e,{param:t,position:n});const f=(0,s.slice)(e,n,n+32,{strict:!0});if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{param:t}){const n=t.type.startsWith("int");return{consumed:32,value:parseInt(t.type.split("int")[1]||"256")>48?(0,c.hexToBigInt)(e,{signed:n}):(0,c.hexToNumber)(e,{signed:n})}}(f,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,o.checksumAddress)((0,s.slice)(e,-20))}}(f);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.hexToBool)(e)}}(f);throw new r.InvalidAbiDecodingTypeError(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function d(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);const n=(0,u.getArrayComponents)(e.type);return!(!n||!d({...e,type:n[1]}))}t.decodeAbiParameters=function(e,t){if("0x"===t&&e.length>0)throw new r.AbiDecodingZeroDataError;if((0,i.size)(t)&&(0,i.size)(t)<32)throw new r.AbiDecodingDataSizeTooSmallError({data:t,params:e,size:(0,i.size)(t)});return function({data:e,params:t}){const n=[];let o=0;for(let s=0;s<t.length;s++){if(o>=(0,i.size)(e))throw new r.AbiDecodingDataSizeTooSmallError({data:e,params:t,size:(0,i.size)(e)});const a=t[s],{consumed:c,value:u}=l({data:e,param:a,position:o});n.push(u),o+=c}return n}({data:t,params:e})}},27906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeDeployData=void 0;const r=n(65413),o=n(42716),i="/docs/contract/decodeDeployData";t.decodeDeployData=function({abi:e,bytecode:t,data:n}){if(n===t)return{bytecode:t};const s=e.find((e=>"type"in e&&"constructor"===e.type));if(!s)throw new r.AbiConstructorNotFoundError({docsPath:i});if(!("inputs"in s))throw new r.AbiConstructorParamsNotFoundError({docsPath:i});if(!s.inputs||0===s.inputs.length)throw new r.AbiConstructorParamsNotFoundError({docsPath:i});return{args:(0,o.decodeAbiParameters)(s.inputs,`0x${n.replace(t,"")}`),bytecode:t}}},73843:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeErrorResult=void 0;const r=n(55300),o=n(65413),i=n(62870),s=n(45433),a=n(42716),c=n(99636);t.decodeErrorResult=function({abi:e,data:t}){const n=(0,i.slice)(t,0,4);if("0x"===n)throw new o.AbiDecodingZeroDataError;const u=[...e||[],r.solidityError,r.solidityPanic].find((e=>"error"===e.type&&n===(0,s.getFunctionSelector)((0,c.formatAbiItem)(e))));if(!u)throw new o.AbiErrorSignatureNotFoundError(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,a.decodeAbiParameters)(u.inputs,(0,i.slice)(t,4)):void 0,errorName:u.name}}},57573:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeEventLog=void 0;const r=n(65413),o=n(29796),i=n(42716),s=n(99636),a="/docs/contract/decodeEventLog";function c({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;return((0,i.decodeAbiParameters)([e],t)||[])[0]}t.decodeEventLog=function({abi:e,data:t,strict:n,topics:u}){const l=n??!0,[d,...f]=u;if(!d)throw new r.AbiEventSignatureEmptyTopicsError({docsPath:a});const h=e.find((e=>"event"===e.type&&d===(0,o.getEventSelector)((0,s.formatAbiItem)(e))));if(!h||!("name"in h)||"event"!==h.type)throw new r.AbiEventSignatureNotFoundError(d,{docsPath:a});const{name:p,inputs:m}=h,g=m?.some((e=>!("name"in e&&e.name)));let y=g?[]:{};const b=m.filter((e=>"indexed"in e&&e.indexed));for(let o=0;o<b.length;o++){const e=b[o],t=f[o];if(!t)throw new r.DecodeLogTopicsMismatch({abiItem:h,param:e});y[e.name||o]=c({param:e,value:t})}const v=m.filter((e=>!("indexed"in e&&e.indexed)));if(v.length>0)if(t&&"0x"!==t)try{const e=(0,i.decodeAbiParameters)(v,t);if(e)if(g)y=[...y,...e];else for(let t=0;t<v.length;t++)y[v[t].name]=e[t]}catch(w){if(l){if(w instanceof r.AbiDecodingDataSizeTooSmallError)throw new r.DecodeLogDataMismatch({abiItem:h,data:w.data,params:w.params,size:w.size});throw w}}else if(l)throw new r.DecodeLogDataMismatch({abiItem:h,data:"0x",params:v,size:0});return{eventName:p,args:Object.values(y).length>0?y:void 0}}},59453:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionData=void 0;const r=n(65413),o=n(62870),i=n(45433),s=n(42716),a=n(99636);t.decodeFunctionData=function({abi:e,data:t}){const n=(0,o.slice)(t,0,4),c=e.find((e=>"function"===e.type&&n===(0,i.getFunctionSelector)((0,a.formatAbiItem)(e))));if(!c)throw new r.AbiFunctionSignatureNotFoundError(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,s.decodeAbiParameters)(c.inputs,(0,o.slice)(t,4)):void 0}}},52366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionResult=void 0;const r=n(65413),o=n(42716),i=n(65775),s="/docs/contract/decodeFunctionResult";t.decodeFunctionResult=function({abi:e,args:t,functionName:n,data:a}){let c=e[0];if(n&&(c=(0,i.getAbiItem)({abi:e,args:t,name:n}),!c))throw new r.AbiFunctionNotFoundError(n,{docsPath:s});if("function"!==c.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:s});if(!c.outputs)throw new r.AbiFunctionOutputsNotFoundError(c.name,{docsPath:s});const u=(0,o.decodeAbiParameters)(c.outputs,a);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},79885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrayComponents=t.encodeAbiParameters=void 0;const r=n(65413),o=n(77295),i=n(35129),s=n(37456),a=n(38454),c=n(61539),u=n(62870),l=n(62002);function d({param:e,value:t}){const n=h(e.type);if(n){const[o,i]=n;return function(e,{length:t,param:n}){const o=null===t;if(!Array.isArray(e))throw new r.InvalidArrayError(e);if(!o&&e.length!==t)throw new r.AbiEncodingArrayLengthMismatchError({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let i=!1;const a=[];for(let r=0;r<e.length;r++){const t=d({param:n,value:e[r]});t.dynamic&&(i=!0),a.push(t)}if(o||i){const e=f(a);if(o){const t=(0,l.numberToHex)(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?(0,s.concat)([t,e]):t}}if(i)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,s.concat)(a.map((({encoded:e})=>e)))}}(t,{length:o,param:{...e,type:i}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const i=t.components[o],s=d({param:i,value:e[Array.isArray(e)?o:i.name]});r.push(s),s.dynamic&&(n=!0)}return{dynamic:n,encoded:n?f(r):(0,s.concat)(r.map((({encoded:e})=>e)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,i.isAddress)(e))throw new o.InvalidAddressError({address:e});return{dynamic:!1,encoded:(0,a.padHex)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,a.padHex)((0,l.boolToHex)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.numberToHex)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=(0,c.size)(e);if(!n){let t=e;return o%32!==0&&(t=(0,a.padHex)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,s.concat)([(0,a.padHex)((0,l.numberToHex)(o,{size:32})),t])}}if(o!==parseInt(n))throw new r.AbiEncodingBytesSizeMismatchError({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,a.padHex)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,l.stringToHex)(e),n=Math.ceil((0,c.size)(t)/32),r=[];for(let o=0;o<n;o++)r.push((0,a.padHex)((0,u.slice)(t,32*o,32*(o+1)),{dir:"right"}));return{dynamic:!0,encoded:(0,s.concat)([(0,a.padHex)((0,l.numberToHex)((0,c.size)(t),{size:32})),...r])}}(t);throw new r.InvalidAbiEncodingTypeError(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function f(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:n,encoded:r}=e[i];t+=n?32:(0,c.size)(r)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:s,encoded:a}=e[i];s?(n.push((0,l.numberToHex)(t+o,{size:32})),r.push(a),o+=(0,c.size)(a)):n.push(a)}return(0,s.concat)([...n,...r])}function h(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}t.encodeAbiParameters=function(e,t){if(e.length!==t.length)throw new r.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(d({param:e[r],value:t[r]}));return n}({params:e,values:t}),o=f(n);return 0===o.length?"0x":o},t.getArrayComponents=h},1099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeDeployData=void 0;const r=n(65413),o=n(37456),i=n(79885),s="/docs/contract/encodeDeployData";t.encodeDeployData=function({abi:e,args:t,bytecode:n}){if(!t||0===t.length)return n;const a=e.find((e=>"type"in e&&"constructor"===e.type));if(!a)throw new r.AbiConstructorNotFoundError({docsPath:s});if(!("inputs"in a))throw new r.AbiConstructorParamsNotFoundError({docsPath:s});if(!a.inputs||0===a.inputs.length)throw new r.AbiConstructorParamsNotFoundError({docsPath:s});const c=(0,i.encodeAbiParameters)(a.inputs,t);return(0,o.concatHex)([n,c])}},55663:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeErrorResult=void 0;const r=n(65413),o=n(37456),i=n(45433),s=n(79885),a=n(99636),c=n(65775),u="/docs/contract/encodeErrorResult";t.encodeErrorResult=function({abi:e,errorName:t,args:n}){let l=e[0];if(t&&(l=(0,c.getAbiItem)({abi:e,args:n,name:t}),!l))throw new r.AbiErrorNotFoundError(t,{docsPath:u});if("error"!==l.type)throw new r.AbiErrorNotFoundError(void 0,{docsPath:u});const d=(0,a.formatAbiItem)(l),f=(0,i.getFunctionSelector)(d);let h="0x";if(n&&n.length>0){if(!l.inputs)throw new r.AbiErrorInputsNotFoundError(l.name,{docsPath:u});h=(0,s.encodeAbiParameters)(l.inputs,n)}return(0,o.concatHex)([f,h])}},86778:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeEventTopics=void 0;const r=n(65413),o=n(21631),i=n(10441),s=n(29796),a=n(12922),c=n(79885),u=n(99636),l=n(65775);function d({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,a.keccak256)((0,i.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(e.type);return(0,c.encodeAbiParameters)([e],[t])}t.encodeEventTopics=function({abi:e,eventName:t,args:n}){let o=e[0];if(t&&(o=(0,l.getAbiItem)({abi:e,args:n,name:t}),!o))throw new r.AbiEventNotFoundError(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==o.type)throw new r.AbiEventNotFoundError(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=(0,u.formatAbiItem)(o),a=(0,s.getEventSelector)(i);let c=[];if(n&&"inputs"in o){const e=o.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map((e=>n[e.name]))??[]:[];t.length>0&&(c=e?.map(((e,n)=>Array.isArray(t[n])?t[n].map(((r,o)=>d({param:e,value:t[n][o]}))):t[n]?d({param:e,value:t[n]}):null))??[])}return[a,...c]}},71124:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionData=void 0;const r=n(65413),o=n(37456),i=n(45433),s=n(79885),a=n(99636),c=n(65775);t.encodeFunctionData=function({abi:e,args:t,functionName:n}){let u=e[0];if(n&&(u=(0,c.getAbiItem)({abi:e,args:t,name:n}),!u))throw new r.AbiFunctionNotFoundError(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const l=(0,a.formatAbiItem)(u),d=(0,i.getFunctionSelector)(l),f="inputs"in u&&u.inputs?(0,s.encodeAbiParameters)(u.inputs,t??[]):void 0;return(0,o.concatHex)([d,f??"0x"])}},41325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionResult=void 0;const r=n(65413),o=n(79885),i=n(65775);t.encodeFunctionResult=function({abi:e,functionName:t,result:n}){let s=e[0];if(t&&(s=(0,i.getAbiItem)({abi:e,name:t}),!s))throw new r.AbiFunctionNotFoundError(t,{docsPath:"/docs/contract/encodeFunctionResult"});if("function"!==s.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionResult"});if(!s.outputs)throw new r.AbiFunctionOutputsNotFoundError(s.name,{docsPath:"/docs/contract/encodeFunctionResult"});let a=Array.isArray(n)?n:[n];return 0!==s.outputs.length||a[0]||(a=[]),(0,o.encodeAbiParameters)(s.outputs,a)}},20500:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacked=void 0;const r=n(65413),o=n(77295),i=n(35129),s=n(37456),a=n(38454),c=n(62002),u=n(14983);function l(e,t,n=!1){if("address"===e){const e=t;if(!(0,i.isAddress)(e))throw new o.InvalidAddressError({address:e});return(0,a.pad)(e.toLowerCase(),{size:n?32:null})}if("string"===e)return(0,c.stringToHex)(t);if("bytes"===e)return t;if("bool"===e)return(0,a.pad)((0,c.boolToHex)(t),{size:n?32:1});const d=e.match(u.integerRegex);if(d){const[e,r,o="256"]=d,i=parseInt(o)/8;return(0,c.numberToHex)(t,{size:n?32:i,signed:"int"===r})}const f=e.match(u.bytesRegex);if(f){const[e,o]=f;if(parseInt(o)!==(t.length-2)/2)throw new r.BytesSizeMismatchError({expectedSize:parseInt(o),givenSize:(t.length-2)/2});return(0,a.pad)(t,{dir:"right",size:n?32:null})}const h=e.match(u.arrayRegex);if(h&&Array.isArray(t)){const[e,n]=h,r=[];for(let o=0;o<t.length;o++)r.push(l(n,t[o],!0));return 0===r.length?"0x":(0,s.concatHex)(r)}throw new r.UnsupportedPackedAbiType(e)}t.encodePacked=function(e,t){if(e.length!==t.length)throw new r.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r];n.push(l(o,i))}return(0,s.concatHex)(n)}},99636:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParams=t.formatAbiItem=void 0;const r=n(65413);function o(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${o(e.components,{includeName:t})})${e.type.slice("tuple".length)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}t.formatAbiItem=function(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.InvalidDefinitionTypeError(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`},t.formatAbiParams=o},37253:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItemWithArgs=void 0;const r=n(29803);t.formatAbiItemWithArgs=function({abiItem:e,args:t,includeFunctionName:n=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map(((e,n)=>`${o&&e.name?`${e.name}: `:""}${"object"===typeof t[n]?(0,r.stringify)(t[n]):t[n]}`)).join(", ")})`}},65775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAmbiguousTypes=t.isArgOfType=t.getAbiItem=void 0;const r=n(65413),o=n(34323),i=n(29796),s=n(45433),a=n(35129);function c(e,t){const n=typeof e,r=t.type;switch(r){case"address":return(0,a.isAddress)(e);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===r&&"components"in t?Object.values(t.components).every(((t,n)=>c(Object.values(e)[n],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)&&(Array.isArray(e)&&e.every((e=>c(e,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")}))))}}function u(e,t,n){for(const r in e){const o=e[r],i=t[r];if("tuple"===o.type&&"tuple"===i.type&&"components"in o&&"components"in i)return u(o.components,i.components,n[r]);const s=[o.type,i.type];if(!(!s.includes("address")||!s.includes("bytes20"))||(s.includes("address")&&s.includes("string")||!(!s.includes("address")||!s.includes("bytes")))&&(0,a.isAddress)(n[r]))return s}}t.getAbiItem=function({abi:e,args:t=[],name:n}){const a=(0,o.isHex)(n,{strict:!1}),l=e.filter((e=>a?"function"===e.type?(0,s.getFunctionSelector)(e)===n:"event"===e.type&&(0,i.getEventSelector)(e)===n:"name"in e&&e.name===n));if(0===l.length)return;if(1===l.length)return l[0];let d;for(const o of l){if(!("inputs"in o))continue;if(!t||0===t.length){if(!o.inputs||0===o.inputs.length)return o;continue}if(!o.inputs)continue;if(0===o.inputs.length)continue;if(o.inputs.length!==t.length)continue;if(t.every(((e,t)=>{const n="inputs"in o&&o.inputs[t];return!!n&&c(e,n)}))){if(d&&"inputs"in d&&d.inputs){const e=u(o.inputs,d.inputs,t);if(e)throw new r.AbiItemAmbiguityError({abiItem:o,type:e[0]},{abiItem:d,type:e[1]})}d=o}}return d||l[0]},t.isArgOfType=c,t.getAmbiguousTypes=u},5203:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=t.parseAccount=void 0;var r=n(18281);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return r.parseAccount}});var o=n(94873);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return o.publicKeyToAddress}})},3001:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=t.checksumAddress=void 0;const r=n(77295),o=n(10441),i=n(12922),s=n(35129);function a(e,t){const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,i.keccak256)((0,o.stringToBytes)(n),"bytes"),s=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(15&r[o>>1])>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());return`0x${s.join("")}`}t.checksumAddress=a,t.getAddress=function(e,t){if(!(0,s.isAddress)(e))throw new r.InvalidAddressError({address:e});return a(e,t)}},37247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=t.getContractAddress=void 0;const r=n(37456),o=n(76551),i=n(38454),s=n(62870),a=n(10441),c=n(21944),u=n(12922),l=n(3001);function d(e){const t=(0,a.toBytes)((0,l.getAddress)(e.from));let n=(0,a.toBytes)(e.nonce);return 0===n[0]&&(n=new Uint8Array([])),(0,l.getAddress)(`0x${(0,u.keccak256)((0,c.toRlp)([t,n],"bytes")).slice(26)}`)}function f(e){const t=(0,a.toBytes)((0,l.getAddress)(e.from)),n=(0,i.pad)((0,o.isBytes)(e.salt)?e.salt:(0,a.toBytes)(e.salt),{size:32}),c="bytecodeHash"in e?(0,o.isBytes)(e.bytecodeHash)?e.bytecodeHash:(0,a.toBytes)(e.bytecodeHash):(0,u.keccak256)(e.bytecode,"bytes");return(0,l.getAddress)((0,s.slice)((0,u.keccak256)((0,r.concat)([(0,a.toBytes)("0xff"),t,n,c])),12))}t.getContractAddress=function(e){return"CREATE2"===e.opcode?f(e):d(e)},t.getCreateAddress=d,t.getCreate2Address=f},35129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=void 0;const n=/^0x[a-fA-F0-9]{40}$/;t.isAddress=function(e){return n.test(e)}},93127:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressEqual=void 0;const r=n(77295),o=n(35129);t.isAddressEqual=function(e,t){if(!(0,o.isAddress)(e))throw new r.InvalidAddressError({address:e});if(!(0,o.isAddress)(t))throw new r.InvalidAddressError({address:t});return e.toLowerCase()===t.toLowerCase()}},42768:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRequest=t.isDeterministicError=void 0;const r=n(24304),o=n(4880),i=n(73812),s=n(87593);t.isDeterministicError=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof o.HttpRequestError&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status),t.buildRequest=function(e,{retryDelay:n=150,retryCount:a=3}={}){return async c=>(0,s.withRetry)((async()=>{try{return await e(c)}catch(t){const e=t;switch(e.code){case i.ParseRpcError.code:throw new i.ParseRpcError(e);case i.InvalidRequestRpcError.code:throw new i.InvalidRequestRpcError(e);case i.MethodNotFoundRpcError.code:throw new i.MethodNotFoundRpcError(e);case i.InvalidParamsRpcError.code:throw new i.InvalidParamsRpcError(e);case i.InternalRpcError.code:throw new i.InternalRpcError(e);case i.InvalidInputRpcError.code:throw new i.InvalidInputRpcError(e);case i.ResourceNotFoundRpcError.code:throw new i.ResourceNotFoundRpcError(e);case i.ResourceUnavailableRpcError.code:throw new i.ResourceUnavailableRpcError(e);case i.TransactionRejectedRpcError.code:throw new i.TransactionRejectedRpcError(e);case i.MethodNotSupportedRpcError.code:throw new i.MethodNotSupportedRpcError(e);case i.LimitExceededRpcError.code:throw new i.LimitExceededRpcError(e);case i.JsonRpcVersionUnsupportedError.code:throw new i.JsonRpcVersionUnsupportedError(e);case i.UserRejectedRequestError.code:throw new i.UserRejectedRequestError(e);case i.UnauthorizedProviderError.code:throw new i.UnauthorizedProviderError(e);case i.UnsupportedProviderMethodError.code:throw new i.UnsupportedProviderMethodError(e);case i.ProviderDisconnectedError.code:throw new i.ProviderDisconnectedError(e);case i.ChainDisconnectedError.code:throw new i.ChainDisconnectedError(e);case i.SwitchChainError.code:throw new i.SwitchChainError(e);case 5e3:throw new i.UserRejectedRequestError(e);default:if(t instanceof r.BaseError)throw t;throw new i.UnknownRpcError(e)}}}),{delay:({count:e,error:t})=>{if(t&&t instanceof o.HttpRequestError){const e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<<e)*n},retryCount:a,shouldRetry:({error:e})=>!(0,t.isDeterministicError)(e)})}},10062:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ccipFetch=t.offchainLookup=t.offchainLookupAbiItem=t.offchainLookupSignature=void 0;const r=n(21739),o=n(61095),i=n(4880),s=n(73843),a=n(79885),c=n(93127),u=n(37456),l=n(34323),d=n(29803);async function f({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let a=0;a<n.length;a++){const c=n[a],u=c.includes("{data}")?"GET":"POST",f="POST"===u?{data:e,sender:t}:void 0;try{const n=await fetch(c.replace("{sender}",t).replace("{data}",e),{body:JSON.stringify(f),method:u});let s;if(s=n.headers.get("Content-Type")?.startsWith("application/json")?(await n.json()).data:await n.text(),!n.ok){r=new i.HttpRequestError({body:f,details:s?.error?(0,d.stringify)(s.error):n.statusText,headers:n.headers,status:n.status,url:c});continue}if(!(0,l.isHex)(s)){r=new o.OffchainLookupResponseMalformedError({result:s,url:c});continue}return s}catch(s){r=new i.HttpRequestError({body:f,details:s.message,url:c})}}throw r}t.offchainLookupSignature="0x556f1830",t.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]},t.offchainLookup=async function(e,{blockNumber:n,blockTag:i,data:l,to:d}){const{args:h}=(0,s.decodeErrorResult)({data:l,abi:[t.offchainLookupAbiItem]}),[p,m,g,y,b]=h;try{if(!(0,c.isAddressEqual)(d,p))throw new o.OffchainLookupSenderMismatchError({sender:p,to:d});const t=await f({data:g,sender:p,urls:m}),{data:s}=await(0,r.call)(e,{blockNumber:n,blockTag:i,data:(0,u.concat)([y,(0,a.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[t,b])]),to:d});return s}catch(v){throw new o.OffchainLookupError({callbackSelector:y,cause:v,data:l,extraData:b,sender:p,urls:m})}},t.ccipFetch=f},81696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertCurrentChain=void 0;const r=n(28890);t.assertCurrentChain=function({chain:e,currentChainId:t}){if(!e)throw new r.ChainNotFoundError;if(t!==e.id)throw new r.ChainMismatchError({chain:e,currentChainId:t})}},93060:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineChain=void 0,t.defineChain=function(e,t={}){const{fees:n=e.fees,formatters:r=e.formatters,serializers:o=e.serializers}=t;return{...e,fees:n,formatters:r,serializers:o}}},36635:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractChain=void 0,t.extractChain=function({chains:e,id:t}){return e.find((e=>e.id===t))}},31693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainContractAddress=void 0;const r=n(28890);t.getChainContractAddress=function({blockNumber:e,chain:t,contract:n}){const o=t?.contracts?.[n];if(!o)throw new r.ChainDoesNotSupportContract({chain:t,contract:{name:n}});if(e&&o.blockCreated&&o.blockCreated>e)throw new r.ChainDoesNotSupportContract({blockNumber:e,chain:t,contract:{name:n,blockCreated:o.blockCreated}});return o.address}},44328:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractFunctionType=t.extractFunctionParams=t.extractFunctionName=t.extractFunctionParts=void 0;const n=/((function|event)\s)?(.*)(\((.*)\))/;function r(e){const t=e.match(n),r=t?.[2]||void 0,o=t?.[3];return{type:r,name:o,params:t?.[5]||void 0}}t.extractFunctionParts=r,t.extractFunctionName=function(e){return r(e).name},t.extractFunctionParams=function(e){const t=r(e).params?.split(",").map((e=>e.trim().split(" ")));return t?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))},t.extractFunctionType=function(e){return r(e).type}},87006:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCursor=void 0;const r=n(87328),o={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new r.PositionOutOfBoundsError({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new r.NegativeOffsetError({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new r.NegativeOffsetError({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};t.createCursor=function(e){const t=Object.create(o);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}},37456:function(e,t){"use strict";function n(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function r(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.concatHex=t.concatBytes=t.concat=void 0,t.concat=function(e){return"string"===typeof e[0]?r(e):n(e)},t.concatBytes=n,t.concatHex=r},76551:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=void 0,t.isBytes=function(e){return!!e&&("object"===typeof e&&("BYTES_PER_ELEMENT"in e&&(1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name)))}},68640:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytesEqual=void 0;const r=n(41830),o=n(10441),i=n(34323);t.isBytesEqual=function(e,t){const n=(0,i.isHex)(e)?(0,o.toBytes)(e):e,s=(0,i.isHex)(t)?(0,o.toBytes)(t):t;return(0,r.equalBytes)(n,s)}},34323:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=void 0,t.isHex=function(e,{strict:t=!0}={}){return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}},38454:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padBytes=t.padHex=t.pad=void 0;const r=n(60771);function o(e,{dir:t,size:n=32}={}){if(null===n)return e;const o=e.replace("0x","");if(o.length>2*n)throw new r.SizeExceedsPaddingSizeError({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}function i(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.SizeExceedsPaddingSizeError({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let r=0;r<n;r++){const i="right"===t;o[i?r:n-r-1]=e[i?r:e.length-r-1]}return o}t.pad=function(e,{dir:t,size:n=32}={}){return"string"===typeof e?o(e,{dir:t,size:n}):i(e,{dir:t,size:n})},t.padHex=o,t.padBytes=i},61539:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.size=void 0;const r=n(34323);t.size=function(e){return(0,r.isHex)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},62870:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sliceHex=t.sliceBytes=t.slice=void 0;const r=n(60771),o=n(34323),i=n(61539);function s(e,t){if("number"===typeof t&&t>0&&t>(0,i.size)(e)-1)throw new r.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:(0,i.size)(e)})}function a(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,i.size)(e)!==n-t)throw new r.SliceOffsetOutOfBoundsError({offset:n,position:"end",size:(0,i.size)(e)})}function c(e,t,n,{strict:r}={}){s(e,t);const o=e.slice(t,n);return r&&a(o,t,n),o}function u(e,t,n,{strict:r}={}){s(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return r&&a(o,t,n),o}t.slice=function(e,t,n,{strict:r}={}){return(0,o.isHex)(e,{strict:!1})?u(e,t,n,{strict:r}):c(e,t,n,{strict:r})},t.sliceBytes=c,t.sliceHex=u},29957:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trim=void 0,t.trim=function(e,{dir:t="left"}={}){let n="string"===typeof e?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&"0"===n["left"===t?o:n.length-o-1].toString();o++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"===typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}},35250:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigInt=t.fromBytes=void 0;const r=n(11602),o=n(29957),i=n(39581),s=n(62002);function a(e,t={}){"undefined"!==typeof t.size&&(0,i.assertSize)(e,{size:t.size});const n=(0,s.bytesToHex)(e,t);return(0,i.hexToBigInt)(n)}function c(e,t={}){let n=e;if("undefined"!==typeof t.size&&((0,i.assertSize)(n,{size:t.size}),n=(0,o.trim)(n)),n.length>1||n[0]>1)throw new r.InvalidBytesBooleanError(n);return Boolean(n[0])}function u(e,t={}){"undefined"!==typeof t.size&&(0,i.assertSize)(e,{size:t.size});const n=(0,s.bytesToHex)(e,t);return(0,i.hexToNumber)(n)}function l(e,t={}){let n=e;return"undefined"!==typeof t.size&&((0,i.assertSize)(n,{size:t.size}),n=(0,o.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}t.fromBytes=function(e,t){const n="string"===typeof t?{to:t}:t,r=n.to;return"number"===r?u(e,n):"bigint"===r?a(e,n):"boolean"===r?c(e,n):"string"===r?l(e,n):(0,s.bytesToHex)(e,n)},t.bytesToBigInt=a,t.bytesToBool=c,t.bytesToNumber=u,t.bytesToString=l},39581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.assertSize=void 0;const r=n(11602),o=n(61539),i=n(29957),s=n(10441);function a(e,{size:t}){if((0,o.size)(e)>t)throw new r.SizeOverflowError({givenSize:(0,o.size)(e),maxSize:t})}function c(e,t={}){const{signed:n}=t;t.size&&a(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(a(n,{size:t.size}),n=(0,i.trim)(n)),"0x00"===(0,i.trim)(n))return!1;if("0x01"===(0,i.trim)(n))return!0;throw new r.InvalidHexBooleanError(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,s.hexToBytes)(e);return t.size&&(a(n,{size:t.size}),n=(0,i.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}t.assertSize=a,t.fromHex=function(e,t){const n="string"===typeof t?{to:t}:t,r=n.to;return"number"===r?l(e,n):"bigint"===r?c(e,n):"string"===r?d(e,n):"boolean"===r?u(e,n):(0,s.hexToBytes)(e,n)},t.hexToBigInt=c,t.hexToBool=u,t.hexToNumber=l,t.hexToString=d},14498:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rlpToHex=t.rlpToBytes=t.fromRlp=void 0;const r=n(24304),o=n(11602),i=n(87006),s=n(10441),a=n(62002);function c(e,t="hex"){const n=(()=>{if("string"===typeof e){if(e.length>3&&e.length%2!==0)throw new o.InvalidHexValueError(e);return(0,s.hexToBytes)(e)}return e})();return u((0,i.createCursor)(n),t)}function u(e,t="hex"){if(0===e.bytes.length)return"hex"===t?(0,a.bytesToHex)(e.bytes):e.bytes;const n=e.readByte();if(n<128&&e.decrementPosition(1),n<192){const r=l(e,n,128),o=e.readBytes(r);return"hex"===t?(0,a.bytesToHex)(o):o}return function(e,t,n){const r=e.position,o=[];for(;e.position-r<t;)o.push(u(e,n));return o}(e,l(e,n,192),t)}function l(e,t,n){if(128===n&&t<128)return 1;if(t<=n+55)return t-n;if(t===n+55+1)return e.readUint8();if(t===n+55+2)return e.readUint16();if(t===n+55+3)return e.readUint24();if(t===n+55+4)return e.readUint32();throw new r.BaseError("Invalid RLP prefix")}t.fromRlp=c,t.rlpToBytes=function(e,t="bytes"){return c(e,t)},t.rlpToHex=function(e,t="hex"){return c(e,t)}},10441:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.toBytes=void 0;const r=n(24304),o=n(34323),i=n(38454),s=n(39581),a=n(62002),c=new TextEncoder;function u(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),"number"===typeof t.size?((0,s.assertSize)(n,{size:t.size}),(0,i.pad)(n,{size:t.size})):n}t.toBytes=function(e,t={}){return"number"===typeof e||"bigint"===typeof e?b(e,t):"boolean"===typeof e?u(e,t):(0,o.isHex)(e)?y(e,t):v(e,t)},t.boolToBytes=u;const l=48,d=57,f=65,h=70,p=97,m=102;function g(e){return e>=l&&e<=d?e-l:e>=f&&e<=h?e-(f-10):e>=p&&e<=m?e-(p-10):void 0}function y(e,t={}){let n=e;t.size&&((0,s.assertSize)(n,{size:t.size}),n=(0,i.pad)(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const a=o.length/2,c=new Uint8Array(a);for(let i=0,s=0;i<a;i++){const e=g(o.charCodeAt(s++)),t=g(o.charCodeAt(s++));if(void 0===e||void 0===t)throw new r.BaseError(`Invalid byte sequence ("${o[s-2]}${o[s-1]}" in "${o}").`);c[i]=16*e+t}return c}function b(e,t){return y((0,a.numberToHex)(e,t))}function v(e,t={}){const n=c.encode(e);return"number"===typeof t.size?((0,s.assertSize)(n,{size:t.size}),(0,i.pad)(n,{dir:"right",size:t.size})):n}t.hexToBytes=y,t.numberToBytes=b,t.stringToBytes=v},62002:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toHex=void 0;const r=n(11602),o=n(38454),i=n(39581),s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e,t={}){const n=`0x${Number(e)}`;return"number"===typeof t.size?((0,i.assertSize)(n,{size:t.size}),(0,o.pad)(n,{size:t.size})):n}function c(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=s[e[o]];const r=`0x${n}`;return"number"===typeof t.size?((0,i.assertSize)(r,{size:t.size}),(0,o.pad)(r,{dir:"right",size:t.size})):r}function u(e,t={}){const{signed:n,size:i}=t,s=BigInt(e);let a;i?a=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"===typeof e&&(a=BigInt(Number.MAX_SAFE_INTEGER));const c="bigint"===typeof a&&n?-a-1n:0;if(a&&s>a||s<c){const t="bigint"===typeof e?"n":"";throw new r.IntegerOutOfRangeError({max:a?`${a}${t}`:void 0,min:`${c}${t}`,signed:n,size:i,value:`${e}${t}`})}const u=`0x${(n&&s<0?(1n<<BigInt(8*i))+BigInt(s):s).toString(16)}`;return i?(0,o.pad)(u,{size:i}):u}t.toHex=function(e,t={}){return"number"===typeof e||"bigint"===typeof e?u(e,t):"string"===typeof e?d(e,t):"boolean"===typeof e?a(e,t):c(e,t)},t.boolToHex=a,t.bytesToHex=c,t.numberToHex=u;const l=new TextEncoder;function d(e,t={}){return c(l.encode(e),t)}t.stringToHex=d},21944:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToRlp=t.bytesToRlp=t.toRlp=void 0;const r=n(15875),o=n(87006),i=n(10441),s=n(62002);function a(e,t="hex"){const n=c(e),r=(0,o.createCursor)(new Uint8Array(n.length));return n.encode(r),"hex"===t?(0,s.bytesToHex)(r.bytes):r.bytes}function c(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=u(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map((e=>c(e)))):function(e){const t="string"===typeof e?(0,i.hexToBytes)(e):e,n=u(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function u(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new r.BaseError("Length is too large.")}t.toRlp=a,t.bytesToRlp=function(e,t="bytes"){return a(e,t)},t.hexToRlp=function(e,t="hex"){return a(e,t)}},28871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAvatarRecord=void 0;const r=n(86965);t.parseAvatarRecord=async function(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?async function(e,{gatewayUrls:t,record:n}){const o=(0,r.parseNftUri)(n),i=await(0,r.getNftTokenUri)(e,{nft:o}),{uri:s,isOnChain:a,isEncoded:c}=(0,r.resolveAvatarUri)({uri:i,gatewayUrls:t});if(a&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const e=c?atob(s.replace("data:application/json;base64,","")):s,n=JSON.parse(e);return(0,r.parseAvatarUri)({uri:(0,r.getJsonImage)(n),gatewayUrls:t})}let u=o.tokenID;"erc1155"===o.namespace&&(u=u.replace("0x","").padStart(64,"0"));return(0,r.getMetadataAvatarUri)({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,u)})}(e,{gatewayUrls:t,record:n}):(0,r.parseAvatarUri)({uri:n,gatewayUrls:t})}},86965:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNftTokenUri=t.parseNftUri=t.parseAvatarUri=t.getMetadataAvatarUri=t.getJsonImage=t.resolveAvatarUri=t.getGateway=t.isImageUri=void 0;const r=n(81746),o=n(48710),i=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,s=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,a=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,c=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function u(e){try{const t=await fetch(e,{method:"HEAD"});if(200===t.status){return t.headers.get("content-type")?.startsWith("image/")}return!1}catch(t){return("object"!==typeof t||"undefined"===typeof t.response)&&(!!globalThis.hasOwnProperty("Image")&&new Promise((t=>{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e})))}}function l(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d({uri:e,gatewayUrls:t}){const n=a.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=l(t?.ipfs,"https://ipfs.io"),u=l(t?.arweave,"https://arweave.net"),d=e.match(i),{protocol:f,subpath:h,target:p,subtarget:m=""}=d?.groups||{},g="ipns:/"===f||"ipns/"===h,y="ipfs:/"===f||"ipfs/"===h||s.test(e);if(e.startsWith("http")&&!g&&!y){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((g||y)&&p)return{uri:`${r}/${g?"ipns":"ipfs"}/${p}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===f&&p)return{uri:`${u}/${p}${m||""}`,isOnChain:!1,isEncoded:!1};let b=e.replace(c,"");if(b.startsWith("<svg")&&(b=`data:image/svg+xml;base64,${btoa(b)}`),b.startsWith("data:")||b.startsWith("{"))return{uri:b,isOnChain:!0,isEncoded:!1};throw new o.EnsAvatarUriResolutionError({uri:e})}function f(e){if("object"!==typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new o.EnsAvatarInvalidMetadataError({data:e});return e.image||e.image_url||e.image_data}async function h({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=d({uri:t,gatewayUrls:e});if(r)return n;if(await u(n))return n;throw new o.EnsAvatarUriResolutionError({uri:t})}t.isImageUri=u,t.getGateway=l,t.resolveAvatarUri=d,t.getJsonImage=f,t.getMetadataAvatarUri=async function({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then((e=>e.json()));return await h({gatewayUrls:e,uri:f(n)})}catch{throw new o.EnsAvatarUriResolutionError({uri:t})}},t.parseAvatarUri=h,t.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=t.split("/"),[s,a]=n.split(":"),[c,u]=r.split(":");if(!s||"eip155"!==s.toLowerCase())throw new o.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!a)throw new o.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!u)throw new o.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!i)throw new o.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!c)throw new o.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:parseInt(a),namespace:c.toLowerCase(),contractAddress:u,tokenID:i}},t.getNftTokenUri=async function(e,{nft:t}){if("erc721"===t.namespace)return(0,r.readContract)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,r.readContract)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new o.EnsAvatarUnsupportedNamespaceError({namespace:t.namespace})}},14684:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLabelhash=void 0,t.encodeLabelhash=function(e){return`[${e.slice(2)}]`}},91511:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodedLabelToLabelhash=void 0;const r=n(34323);t.encodedLabelToLabelhash=function(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,r.isHex)(t)?t:null}},57961:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNullUniversalResolverError=void 0;const r=n(55300),o=n(24304),i=n(4924);t.isNullUniversalResolverError=function(e,t){if(!(e instanceof o.BaseError))return!1;const n=e.walk((e=>e instanceof i.ContractFunctionRevertedError));return n instanceof i.ContractFunctionRevertedError&&("ResolverNotFound"===n.data?.errorName||("ResolverWildcardNotSupported"===n.data?.errorName||(!!n.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&n.reason===r.panicReasons[50])))}},82955:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.labelhash=void 0;const r=n(10441),o=n(62002),i=n(12922),s=n(91511);t.labelhash=function(e){const t=new Uint8Array(32).fill(0);return e?(0,s.encodedLabelToLabelhash)(e)||(0,i.keccak256)((0,r.stringToBytes)(e)):(0,o.bytesToHex)(t)}},41177:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namehash=void 0;const r=n(37456),o=n(10441),i=n(62002),s=n(12922),a=n(91511);t.namehash=function(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,i.bytesToHex)(t);const n=e.split(".");for(let i=n.length-1;i>=0;i-=1){const e=(0,a.encodedLabelToLabelhash)(n[i]),c=e?(0,o.toBytes)(e):(0,s.keccak256)((0,o.stringToBytes)(n[i]),"bytes");t=(0,s.keccak256)((0,r.concat)([t,c]),"bytes")}return(0,i.bytesToHex)(t)}},75007:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packetToBytes=void 0;const r=n(10441),o=n(14684),i=n(82955);t.packetToBytes=function(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const n=new Uint8Array((0,r.stringToBytes)(t).byteLength+2);let s=0;const a=t.split(".");for(let c=0;c<a.length;c++){let e=(0,r.stringToBytes)(a[c]);e.byteLength>255&&(e=(0,r.stringToBytes)((0,o.encodeLabelhash)((0,i.labelhash)(a[c])))),n[s]=e.length,n.set(e,s+1),s+=e.length+1}return n.byteLength!==s+1?n.slice(0,s+1):n}},25950:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCallError=void 0;const r=n(4924),o=n(31027),i=n(30470);t.getCallError=function(e,{docsPath:t,...n}){const s=(()=>{const t=(0,i.getNodeError)(e,n);return t instanceof o.UnknownNodeError?e:t})();return new r.CallExecutionError(s,{docsPath:t,...n})}},30548:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractError=void 0;const r=n(65413),o=n(24304),i=n(4924),s=n(73812),a=3;t.getContractError=function(e,{abi:t,address:n,args:c,docsPath:u,functionName:l,sender:d}){const{code:f,data:h,message:p,shortMessage:m}=e instanceof i.RawContractError?e:e instanceof o.BaseError?e.walk((e=>"data"in e))||e.walk():{},g=e instanceof r.AbiDecodingZeroDataError?new i.ContractFunctionZeroDataError({functionName:l}):[a,s.InternalRpcError.code].includes(f)&&(h||p||m)?new i.ContractFunctionRevertedError({abi:t,data:"object"===typeof h?h.data:h,functionName:l,message:m??p}):e;return new i.ContractFunctionExecutionError(g,{abi:t,args:c,contractAddress:n,docsPath:u,functionName:l,sender:d})}},17019:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimateGasError=void 0;const r=n(20028),o=n(31027),i=n(30470);t.getEstimateGasError=function(e,{docsPath:t,...n}){const s=(()=>{const t=(0,i.getNodeError)(e,n);return t instanceof o.UnknownNodeError?e:t})();return new r.EstimateGasExecutionError(s,{docsPath:t,...n})}},30470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeError=t.containsNodeError=void 0;const r=n(24304),o=n(31027),i=n(4880),s=n(73812);t.containsNodeError=function(e){return e instanceof s.TransactionRejectedRpcError||e instanceof s.InvalidInputRpcError||e instanceof i.RpcRequestError&&e.code===o.ExecutionRevertedError.code},t.getNodeError=function(e,t){const n=(e.details||"").toLowerCase(),i=e.walk((e=>e.code===o.ExecutionRevertedError.code));return i instanceof r.BaseError?new o.ExecutionRevertedError({cause:e,message:i.details}):o.ExecutionRevertedError.nodeMessage.test(n)?new o.ExecutionRevertedError({cause:e,message:e.details}):o.FeeCapTooHighError.nodeMessage.test(n)?new o.FeeCapTooHighError({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.FeeCapTooLowError.nodeMessage.test(n)?new o.FeeCapTooLowError({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.NonceTooHighError.nodeMessage.test(n)?new o.NonceTooHighError({cause:e,nonce:t?.nonce}):o.NonceTooLowError.nodeMessage.test(n)?new o.NonceTooLowError({cause:e,nonce:t?.nonce}):o.NonceMaxValueError.nodeMessage.test(n)?new o.NonceMaxValueError({cause:e,nonce:t?.nonce}):o.InsufficientFundsError.nodeMessage.test(n)?new o.InsufficientFundsError({cause:e}):o.IntrinsicGasTooHighError.nodeMessage.test(n)?new o.IntrinsicGasTooHighError({cause:e,gas:t?.gas}):o.IntrinsicGasTooLowError.nodeMessage.test(n)?new o.IntrinsicGasTooLowError({cause:e,gas:t?.gas}):o.TransactionTypeNotSupportedError.nodeMessage.test(n)?new o.TransactionTypeNotSupportedError({cause:e}):o.TipAboveFeeCapError.nodeMessage.test(n)?new o.TipAboveFeeCapError({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new o.UnknownNodeError({cause:e})}},61350:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionError=void 0;const r=n(31027),o=n(72861),i=n(30470);t.getTransactionError=function(e,{docsPath:t,...n}){const s=(()=>{const t=(0,i.getNodeError)(e,n);return t instanceof r.UnknownNodeError?e:t})();return new o.TransactionExecutionError(s,{docsPath:t,...n})}},75693:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFilterRequestScope=void 0,t.createFilterRequestScope=function(e,{method:t}){const n={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:r,status:o,transport:i})=>{"success"===o&&t===e&&(n[r]=i.request)})),t=>n[t]||e.request}},49906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineBlock=t.formatBlock=void 0;const r=n(36280),o=n(64056);function i(e){const t=e.transactions?.map((e=>"string"===typeof e?e:(0,o.formatTransaction)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}t.formatBlock=i,t.defineBlock=(0,r.defineFormatter)("block",i)},29824:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extract=void 0,t.extract=function(e,{format:t}){if(!t)return{};const n={};return function t(r){const o=Object.keys(r);for(const i of o)i in e&&(n[i]=e[i]),r[i]&&"object"===typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}},31197:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatFeeHistory=void 0,t.formatFeeHistory=function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}},36280:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineFormatter=void 0,t.defineFormatter=function(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const o=t(e);if(n)for(const t of n)delete o[t];return{...o,...r(e)}},type:e})}},47960:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLog=void 0,t.formatLog=function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}},11360:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatProof=void 0;const r=n(17493);t.formatProof=function(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?(0,r.hexToNumber)(e.nonce):void 0,storageProof:e.storageProof?(t=e.storageProof,t.map((e=>({...e,value:BigInt(e.value)})))):void 0};var t}},64056:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransaction=t.formatTransaction=t.transactionType=void 0;const r=n(39581),o=n(36280);function i(e){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.hexToNumber)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?t.transactionType[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"===typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n}t.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"},t.formatTransaction=i,t.defineTransaction=(0,o.defineFormatter)("transaction",i)},37262:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionReceipt=t.formatTransactionReceipt=void 0;const r=n(39581),o=n(36280),i=n(47960),s=n(64056),a={"0x0":"reverted","0x1":"success"};function c(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,i.formatLog)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.hexToNumber)(e.transactionIndex):null,status:e.status?a[e.status]:null,type:e.type?s.transactionType[e.type]||e.type:null}}t.formatTransactionReceipt=c,t.defineTransactionReceipt=(0,o.defineFormatter)("transactionReceipt",c)},14928:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionRequest=t.formatTransactionRequest=t.rpcTransactionType=void 0;const r=n(62002),o=n(36280);function i(e){return{...e,gas:"undefined"!==typeof e.gas?(0,r.numberToHex)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,r.numberToHex)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,r.numberToHex)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,r.numberToHex)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,r.numberToHex)(e.nonce):void 0,type:"undefined"!==typeof e.type?t.rpcTransactionType[e.type]:void 0,value:"undefined"!==typeof e.value?(0,r.numberToHex)(e.value):void 0}}t.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"},t.formatTransactionRequest=i,t.defineTransactionRequest=(0,o.defineFormatter)("transactionRequest",i)},94303:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAction=void 0,t.getAction=function(e,t,n){return r=>e[t.name||n]?.(r)??t(e,r)}},29796:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventSelector=void 0;const r=n(10441),o=n(5396),i=n(12922);t.getEventSelector=e=>{return t=(0,o.getEventSignature)(e),(0,i.keccak256)((0,r.toBytes)(t));var t}},5396:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventSignature=void 0;const r=n(69682);t.getEventSignature=e=>(0,r.getFunctionSignature)(e)},45433:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionSelector=void 0;const r=n(62870),o=n(10441),i=n(69682),s=n(12922);t.getFunctionSelector=e=>{return(0,r.slice)((t=(0,i.getFunctionSignature)(e),(0,s.keccak256)((0,o.toBytes)(t))),0,4);var t}},69682:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionSignature=void 0;const r=n(48661),o=n(97506);t.getFunctionSignature=e=>{const t="string"===typeof e?e:(0,r.formatAbiItem)(e);return(0,o.normalizeSignature)(t)}},70213:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=void 0;const r=n(34323),o=n(61539);t.isHash=function(e){return(0,r.isHex)(e)&&32===(0,o.size)(e)}},12922:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const r=n(7217),o=n(34323),i=n(10441),s=n(62002);t.keccak256=function(e,t){const n=t||"hex",a=(0,r.keccak_256)((0,o.isHex)(e,{strict:!1})?(0,i.toBytes)(e):e);return"bytes"===n?a:(0,s.toHex)(a)}},97506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=void 0;const r=n(24304);t.normalizeSignature=function(e){let t=!0,n="",o=0,i="",s=!1;for(let r=0;r<e.length;r++){const a=e[r];if(["(",")",","].includes(a)&&(t=!0),"("===a&&o++,")"===a&&o--,t)if(0!==o)" "!==a?(i+=a,n+=a):","!==e[r-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===a&&["event","function",""].includes(i))i="";else if(i+=a,")"===a){s=!0;break}}if(!s)throw new r.BaseError("Unable to normalize signature.");return i}},17493:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=t.extractFunctionParts=t.extractFunctionType=t.extractFunctionParams=t.extractFunctionName=t.isAddressEqual=t.isAddress=t.getAddress=t.getCreate2Address=t.getCreateAddress=t.getContractAddress=t.publicKeyToAddress=t.parseAccount=t.formatAbiParams=t.formatAbiItem=t.formatAbiItemWithArgs=t.encodePacked=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.getAbiItem=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeAbiParameters=t.validateTypedData=t.stringify=t.rpc=t.getSocket=t.integerRegex=t.bytesRegex=t.arrayRegex=t.getChainContractAddress=t.extractChain=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.buildRequest=t.isDeterministicError=void 0,t.getEstimateGasError=t.getContractError=t.getCallError=t.getNodeError=t.containsNodeError=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBigInt=t.hexToBool=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.bytesToBigInt=t.stringToHex=t.numberToHex=t.toHex=t.bytesToHex=t.boolToHex=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.toBytes=t.boolToBytes=t.toRlp=t.extract=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.formatLog=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatBlock=t.defineBlock=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=t.isHex=t.isBytes=t.concatHex=t.concatBytes=void 0,t.parseGwei=t.parseEther=t.parseUnits=t.formatUnits=t.formatGwei=t.formatEther=t.serializeAccessList=t.serializeTransaction=t.prepareTransactionRequest=t.parseTransaction=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.getTransactionType=t.getSerializedTransactionType=t.hashMessage=t.verifyTypedData=t.verifyMessage=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.hashTypedData=t.keccak256=t.isHash=t.getFunctionSelector=t.getEventSelector=t.defineFormatter=t.getTransactionError=void 0;var r=n(42768);Object.defineProperty(t,"isDeterministicError",{enumerable:!0,get:function(){return r.isDeterministicError}}),Object.defineProperty(t,"buildRequest",{enumerable:!0,get:function(){return r.buildRequest}});var o=n(10062);Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return o.ccipFetch}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return o.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return o.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return o.offchainLookupSignature}});var i=n(81696);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return i.assertCurrentChain}});var s=n(93060);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return s.defineChain}});var a=n(36635);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return a.extractChain}});var c=n(31693);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return c.getChainContractAddress}});var u=n(14983);Object.defineProperty(t,"arrayRegex",{enumerable:!0,get:function(){return u.arrayRegex}}),Object.defineProperty(t,"bytesRegex",{enumerable:!0,get:function(){return u.bytesRegex}}),Object.defineProperty(t,"integerRegex",{enumerable:!0,get:function(){return u.integerRegex}});var l=n(93087);Object.defineProperty(t,"getSocket",{enumerable:!0,get:function(){return l.getSocket}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return l.rpc}});var d=n(29803);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}});var f=n(85024);Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return f.validateTypedData}});var h=n(42716);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return h.decodeAbiParameters}});var p=n(73843);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return p.decodeErrorResult}});var m=n(57573);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return m.decodeEventLog}});var g=n(59453);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return g.decodeFunctionData}});var y=n(52366);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return y.decodeFunctionResult}});var b=n(79885);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return b.encodeAbiParameters}});var v=n(1099);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return v.encodeDeployData}});var w=n(55663);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return w.encodeErrorResult}});var x=n(86778);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return x.encodeEventTopics}});var E=n(71124);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return E.encodeFunctionData}});var _=n(41325);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return _.encodeFunctionResult}});var k=n(65775);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return k.getAbiItem}});var S=n(48661);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return S.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return S.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return S.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return S.parseAbiParameters}});var I=n(20500);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return I.encodePacked}});var C=n(37253);Object.defineProperty(t,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return C.formatAbiItemWithArgs}});var T=n(99636);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return T.formatAbiItem}}),Object.defineProperty(t,"formatAbiParams",{enumerable:!0,get:function(){return T.formatAbiParams}});var A=n(18281);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return A.parseAccount}});var P=n(94873);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return P.publicKeyToAddress}});var O=n(37247);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return O.getContractAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return O.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return O.getCreate2Address}});var j=n(3001);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return j.getAddress}});var M=n(35129);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return M.isAddress}});var R=n(93127);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return R.isAddressEqual}});var B=n(44328);Object.defineProperty(t,"extractFunctionName",{enumerable:!0,get:function(){return B.extractFunctionName}}),Object.defineProperty(t,"extractFunctionParams",{enumerable:!0,get:function(){return B.extractFunctionParams}}),Object.defineProperty(t,"extractFunctionType",{enumerable:!0,get:function(){return B.extractFunctionType}}),Object.defineProperty(t,"extractFunctionParts",{enumerable:!0,get:function(){return B.extractFunctionParts}});var N=n(37456);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return N.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return N.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return N.concatHex}});var L=n(76551);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return L.isBytes}});var U=n(34323);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return U.isHex}});var D=n(38454);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return D.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return D.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return D.padHex}});var F=n(61539);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return F.size}});var z=n(62870);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return z.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return z.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return z.sliceHex}});var $=n(29957);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return $.trim}});var q=n(49906);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return q.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return q.formatBlock}});var Z=n(64056);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return Z.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return Z.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return Z.transactionType}});var H=n(47960);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return H.formatLog}});var W=n(37262);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return W.defineTransactionReceipt}});var G=n(14928);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return G.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return G.formatTransactionRequest}});var K=n(29824);Object.defineProperty(t,"extract",{enumerable:!0,get:function(){return K.extract}});var V=n(21944);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return V.toRlp}});var X=n(10441);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return X.boolToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return X.toBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return X.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return X.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return X.stringToBytes}});var Y=n(62002);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return Y.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return Y.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return Y.toHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return Y.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return Y.stringToHex}});var J=n(35250);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return J.bytesToBigInt}}),Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return J.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return J.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return J.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return J.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return J.fromBytes}});var Q=n(39581);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return Q.fromHex}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return Q.hexToBool}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return Q.hexToBigInt}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return Q.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return Q.hexToString}});var ee=n(14498);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return ee.fromRlp}});var te=n(30470);Object.defineProperty(t,"containsNodeError",{enumerable:!0,get:function(){return te.containsNodeError}}),Object.defineProperty(t,"getNodeError",{enumerable:!0,get:function(){return te.getNodeError}});var ne=n(25950);Object.defineProperty(t,"getCallError",{enumerable:!0,get:function(){return ne.getCallError}});var re=n(30548);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return re.getContractError}});var oe=n(17019);Object.defineProperty(t,"getEstimateGasError",{enumerable:!0,get:function(){return oe.getEstimateGasError}});var ie=n(61350);Object.defineProperty(t,"getTransactionError",{enumerable:!0,get:function(){return ie.getTransactionError}});var se=n(36280);Object.defineProperty(t,"defineFormatter",{enumerable:!0,get:function(){return se.defineFormatter}});var ae=n(29796);Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return ae.getEventSelector}});var ce=n(45433);Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return ce.getFunctionSelector}});var ue=n(70213);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return ue.isHash}});var le=n(12922);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return le.keccak256}});var de=n(90696);Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return de.hashTypedData}});var fe=n(60830);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return fe.recoverAddress}});var he=n(59091);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return he.recoverMessageAddress}});var pe=n(58686);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return pe.recoverPublicKey}});var me=n(34494);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return me.recoverTypedDataAddress}});var ge=n(88444);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return ge.verifyMessage}});var ye=n(38032);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return ye.verifyTypedData}});var be=n(19707);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return be.hashMessage}});var ve=n(8711);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return ve.getSerializedTransactionType}});var we=n(57080);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return we.getTransactionType}});var xe=n(77365);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return xe.assertRequest}});var Ee=n(26121);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Ee.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Ee.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return Ee.assertTransactionLegacy}});var _e=n(69531);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return _e.parseTransaction}});var ke=n(8969);Object.defineProperty(t,"prepareTransactionRequest",{enumerable:!0,get:function(){return ke.prepareTransactionRequest}});var Se=n(88165);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Se.serializeTransaction}});var Ie=n(37200);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return Ie.serializeAccessList}});var Ce=n(12183);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Ce.formatEther}});var Te=n(60903);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return Te.formatGwei}});var Ae=n(69719);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Ae.formatUnits}});var Pe=n(39190);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Pe.parseUnits}});var Oe=n(60285);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return Oe.parseEther}});var je=n(74448);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return je.parseGwei}})},31410:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observe=t.cleanupCache=t.listenersCache=void 0,t.listenersCache=new Map,t.cleanupCache=new Map;let n=0;t.observe=function(e,r,o){const i=++n,s=()=>t.listenersCache.get(e)||[],a=()=>{const n=t.cleanupCache.get(e);1===s().length&&n&&n(),(()=>{const n=s();t.listenersCache.set(e,n.filter((e=>e.id!==i)))})()},c=s();if(t.listenersCache.set(e,[...c,{id:i,fns:r}]),c&&c.length>0)return a;const u={};for(const t in r)u[t]=(...e)=>{const n=s();if(0!==n.length)for(const r of n)r.fns[t]?.(...e)};const l=o(u);return"function"===typeof l&&t.cleanupCache.set(e,l),a}},3312:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poll=void 0;const r=n(95501);t.poll=function(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let i=!0;const s=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));const c=await(n?.(a))??o;await(0,r.wait)(c);const u=async()=>{i&&(await e({unpoll:s}),await(0,r.wait)(o),u())};u()})(),s}},30251:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBatchScheduler=void 0;const n=new Map;t.createBatchScheduler=function({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:i}){const s=async()=>{const t=c();a();const n=t.map((({args:e})=>e));0!==n.length&&e(n).then((e=>{i&&Array.isArray(e)&&e.sort(i);for(let n=0;n<t.length;n++){const{pendingPromise:r}=t[n];r.resolve?.([e[n],e])}})).catch((e=>{for(let n=0;n<t.length;n++){const{pendingPromise:r}=t[n];r.reject?.(e)}}))},a=()=>n.delete(t),c=()=>n.get(t)||[],u=e=>n.set(t,[...c(),e]);return{flush:a,async schedule(e){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),i=r?.([...c().map((({args:e})=>e)),e]);i&&s();return c().length>0?(u({args:e,pendingPromise:t}),n):(u({args:e,pendingPromise:t}),setTimeout(s,o),n)}}}},70330:function(e,t){"use strict";function n(e){const n=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),r=n(e,t.promiseCache),o=n(e,t.responseCache);return{clear:()=>{r.clear(),o.clear()},promise:r,response:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.withCache=t.getCache=t.responseCache=t.promiseCache=void 0,t.promiseCache=new Map,t.responseCache=new Map,t.getCache=n,t.withCache=async function(e,{cacheKey:t,cacheTime:r=1/0}){const o=n(t),i=o.response.get();if(i&&r>0){if((new Date).getTime()-i.created.getTime()<r)return i.data}let s=o.promise.get();s||(s=e(),o.promise.set(s));try{const e=await s;return o.response.set({created:new Date,data:e}),e}finally{o.promise.clear()}}},87593:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withRetry=void 0;const r=n(95501);t.withRetry=function(e,{delay:t=100,retryCount:n=2,shouldRetry:o=(()=>!0)}={}){return new Promise(((i,s)=>{const a=async({count:c=0}={})=>{try{const t=await e();i(t)}catch(u){if(c<n&&await o({count:c,error:u}))return(async({error:e})=>{const n="function"===typeof t?t({count:c,error:e}):t;n&&await(0,r.wait)(n),a({count:c+1})})({error:u});s(u)}};a()}))}},76787:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=void 0,t.withTimeout=function(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise(((o,i)=>{(async()=>{let s;try{const a=new AbortController;n>0&&(s=setTimeout((()=>{r?a.abort():i(t)}),n)),o(await e({signal:a?.signal}))}catch(a){"AbortError"===a.name&&i(t),i(a)}finally{clearTimeout(s)}})()}))}},14983:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},93087:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=t.getSocket=t.socketsCache=void 0;const r=n(54943),o=n(4880),i=n(30251),s=n(76787),a=n(29803);let c=0;t.socketsCache=new Map,t.getSocket=async function(e){let n=t.socketsCache.get(e);if(n)return n;const{schedule:o}=(0,i.createBatchScheduler)({id:e,fn:async()=>{const o=new r.WebSocket(e),i=new Map,s=new Map,a=({data:e})=>{const t=JSON.parse(e),n="eth_subscription"===t.method,r=n?t.params.subscription:t.id,o=n?s:i,a=o.get(r);a&&a({data:e}),n||o.delete(r)},c=()=>{t.socketsCache.delete(e),o.removeEventListener("close",c),o.removeEventListener("message",a)};return o.addEventListener("close",c),o.addEventListener("message",a),o.readyState===r.WebSocket.CONNECTING&&await new Promise(((e,t)=>{o&&(o.onopen=e,o.onerror=t)})),n=Object.assign(o,{requests:i,subscriptions:s}),t.socketsCache.set(e,n),[n]}}),[s,[a]]=await o();return a},t.rpc={http:async function(e,{body:t,fetchOptions:n={},timeout:r=1e4}){const{headers:i,method:u,signal:l}=n;try{const d=await(0,s.withTimeout)((async({signal:o})=>await fetch(e,{...n,body:Array.isArray(t)?(0,a.stringify)(t.map((e=>({jsonrpc:"2.0",id:e.id??c++,...e})))):(0,a.stringify)({jsonrpc:"2.0",id:t.id??c++,...t}),headers:{...i,"Content-Type":"application/json"},method:u||"POST",signal:l||(r>0?o:void 0)})),{errorInstance:new o.TimeoutError({body:t,url:e}),timeout:r,signal:!0});let f;if(f=d.headers.get("Content-Type")?.startsWith("application/json")?await d.json():await d.text(),!d.ok)throw new o.HttpRequestError({body:t,details:(0,a.stringify)(f.error)||d.statusText,headers:d.headers,status:d.status,url:e});return f}catch(d){if(d instanceof o.HttpRequestError)throw d;if(d instanceof o.TimeoutError)throw d;throw new o.HttpRequestError({body:t,details:d.message,url:e})}},webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new o.WebSocketRequestError({body:t,url:e.url,details:"Socket is closed."});const r=c++,i=({data:o})=>{const s=JSON.parse(o);"number"===typeof s.id&&r!==s.id||(n?.(s),"eth_subscribe"===t.method&&"string"===typeof s.result&&e.subscriptions.set(s.result,i),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(r,i),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:r})),e},webSocketAsync:async function(e,{body:n,timeout:r=1e4}){return(0,s.withTimeout)((()=>new Promise((r=>t.rpc.webSocket(e,{body:n,onResponse:r})))),{errorInstance:new o.TimeoutError({body:n,url:e.url}),timeout:r})}}},59250:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactSignatureToHex=void 0;const r=n(20050),o=n(39581);t.compactSignatureToHex=function({r:e,yParityAndS:t}){return`0x${new r.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}`}},63184:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactSignatureToSignature=void 0;const r=n(10441),o=n(62002);t.compactSignatureToSignature=function({r:e,yParityAndS:t}){const n=(0,r.hexToBytes)(t),i=128&n[0]?28n:27n,s=n;return 28n===i&&(s[0]&=127),{r:e,s:(0,o.bytesToHex)(s),v:i}}},19707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=void 0;const r=n(95011),o=n(37456),i=n(10441),s=n(12922);t.hashMessage=function(e,t){const n="string"===typeof e?(0,i.stringToBytes)(e):e.raw instanceof Uint8Array?e.raw:(0,i.toBytes)(e.raw),a=(0,i.stringToBytes)(`${r.presignMessagePrefix}${n.length}`);return(0,s.keccak256)((0,o.concat)([a,n]),t)}},90696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashDomain=t.hashTypedData=void 0;const r=n(79885),o=n(37456),i=n(62002),s=n(12922),a=n(85024);function c({domain:e,types:t}){return u({data:e,primaryType:"EIP712Domain",types:t})}function u({data:e,primaryType:t,types:n}){const r=l({data:e,primaryType:t,types:n});return(0,s.keccak256)(r)}function l({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],i=[d({primaryType:t,types:n})];for(const r of n[t]){const[t,s]=h({types:n,name:r.name,type:r.type,value:e[r.name]});o.push(t),i.push(s)}return(0,r.encodeAbiParameters)(o,i)}function d({primaryType:e,types:t}){const n=(0,i.toHex)(function({primaryType:e,types:t}){let n="";const r=f({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const i of o)n+=`${i}(${t[i].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return n}({primaryType:e,types:t}));return(0,s.keccak256)(n)}function f({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||void 0===t[r])return n;n.add(r);for(const o of t[r])f({primaryType:o.type,types:t},n);return n}function h({types:e,name:t,type:n,value:o}){if(void 0!==e[n])return[{type:"bytes32"},(0,s.keccak256)(l({data:o,primaryType:n,types:e}))];if("bytes"===n){return o=`0x${(o.length%2?"0":"")+o.slice(2)}`,[{type:"bytes32"},(0,s.keccak256)(o)]}if("string"===n)return[{type:"bytes32"},(0,s.keccak256)((0,i.toHex)(o))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),a=o.map((n=>h({name:t,type:i,types:e,value:n})));return[{type:"bytes32"},(0,s.keccak256)((0,r.encodeAbiParameters)(a.map((([e])=>e)),a.map((([,e])=>e))))]}return[{type:n},o]}t.hashTypedData=function({domain:e,message:t,primaryType:n,types:r}){const i="undefined"===typeof e?{}:e,l={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:i}),...r};(0,a.validateTypedData)({domain:i,message:t,primaryType:n,types:l});const d=["0x1901"];return i&&d.push(c({domain:i,types:l})),"EIP712Domain"!==n&&d.push(u({data:t,primaryType:n,types:l})),(0,s.keccak256)((0,o.concat)(d))},t.hashDomain=c},86394:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToCompactSignature=void 0;const r=n(20050),o=n(62002);t.hexToCompactSignature=function(e){const{r:t,s:n}=r.secp256k1.Signature.fromCompact(e.slice(2,130));return{r:(0,o.numberToHex)(t,{size:32}),yParityAndS:(0,o.numberToHex)(n,{size:32})}}},88312:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToSignature=void 0;const r=n(20050),o=n(62002);t.hexToSignature=function(e){const{r:t,s:n}=r.secp256k1.Signature.fromCompact(e.slice(2,130)),i=BigInt(`0x${e.slice(130)}`);return{r:(0,o.numberToHex)(t,{size:32}),s:(0,o.numberToHex)(n,{size:32}),v:i}}},60830:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=void 0;const r=n(94873),o=n(58686);t.recoverAddress=async function({hash:e,signature:t}){return(0,r.publicKeyToAddress)(await(0,o.recoverPublicKey)({hash:e,signature:t}))}},59091:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverMessageAddress=void 0;const r=n(19707),o=n(60830);t.recoverMessageAddress=async function({message:e,signature:t}){return(0,o.recoverAddress)({hash:(0,r.hashMessage)(e),signature:t})}},58686:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverPublicKey=void 0;const r=n(34323),o=n(39581),i=n(62002);t.recoverPublicKey=async function({hash:e,signature:t}){const s=(0,r.isHex)(t)?t:(0,i.toHex)(t),a=(0,r.isHex)(e)?e:(0,i.toHex)(e);let c=(0,o.hexToNumber)(`0x${s.slice(130)}`);0!==c&&1!==c||(c+=27);const{secp256k1:u}=await Promise.resolve().then((()=>n(20050)));return`0x${u.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c-27).recoverPublicKey(a.substring(2)).toHex(!1)}`}},34494:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedDataAddress=void 0;const r=n(90696),o=n(60830);t.recoverTypedDataAddress=async function({domain:e,message:t,primaryType:n,signature:i,types:s}){return(0,o.recoverAddress)({hash:(0,r.hashTypedData)({domain:e,message:t,primaryType:n,types:s}),signature:i})}},32444:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToCompactSignature=void 0;const r=n(17493);t.signatureToCompactSignature=function(e){const{r:t,s:n,v:o}=e;let i=n;if(1n===o-27n){const e=(0,r.hexToBytes)(n);e[0]|=128,i=(0,r.bytesToHex)(e)}return{r:t,yParityAndS:i}}},20178:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToHex=void 0;const r=n(20050),o=n(39581),i=n(62002);t.signatureToHex=function({r:e,s:t,v:n}){return`0x${new r.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}${(0,i.toHex)(n).slice(2)}`}},88444:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=void 0;const r=n(3001),o=n(93127),i=n(59091);t.verifyMessage=async function({address:e,message:t,signature:n}){return(0,o.isAddressEqual)((0,r.getAddress)(e),await(0,i.recoverMessageAddress)({message:t,signature:n}))}},38032:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=void 0;const r=n(3001),o=n(93127),i=n(34494);t.verifyTypedData=async function({address:e,domain:t,message:n,primaryType:s,signature:a,types:c}){return(0,o.isAddressEqual)((0,r.getAddress)(e),await(0,i.recoverTypedDataAddress)({domain:t,message:n,primaryType:s,signature:a,types:c}))}},29803:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;t.stringify=(e,t,n)=>JSON.stringify(e,((e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r}),n)},77365:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertRequest=void 0;const r=n(18281),o=n(77295),i=n(31027),s=n(72861),a=n(35129);t.assertRequest=function(e){const{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.parseAccount)(t):void 0;if(d&&!(0,a.isAddress)(d.address))throw new o.InvalidAddressError({address:d.address});if(l&&!(0,a.isAddress)(l))throw new o.InvalidAddressError({address:l});if("undefined"!==typeof n&&("undefined"!==typeof c||"undefined"!==typeof u))throw new s.FeeConflictError;if(c&&c>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:c});if(u&&c&&u>c)throw new i.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:u})}},26121:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=void 0;const r=n(77295),o=n(24304),i=n(28890),s=n(31027),a=n(35129);t.assertTransactionEIP1559=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l}=e;if(t<=0)throw new i.InvalidChainIdError({chainId:t});if(l&&!(0,a.isAddress)(l))throw new r.InvalidAddressError({address:l});if(c)throw new o.BaseError("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(u&&u>2n**256n-1n)throw new s.FeeCapTooHighError({maxFeePerGas:u});if(n&&u&&n>u)throw new s.TipAboveFeeCapError({maxFeePerGas:u,maxPriorityFeePerGas:n})},t.assertTransactionEIP2930=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l}=e;if(t<=0)throw new i.InvalidChainIdError({chainId:t});if(l&&!(0,a.isAddress)(l))throw new r.InvalidAddressError({address:l});if(n||u)throw new o.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(c&&c>2n**256n-1n)throw new s.FeeCapTooHighError({maxFeePerGas:c})},t.assertTransactionLegacy=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l,accessList:d}=e;if(l&&!(0,a.isAddress)(l))throw new r.InvalidAddressError({address:l});if("undefined"!==typeof t&&t<=0)throw new i.InvalidChainIdError({chainId:t});if(n||u)throw new o.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(c&&c>2n**256n-1n)throw new s.FeeCapTooHighError({maxFeePerGas:c});if(d)throw new o.BaseError("`accessList` is not a valid Legacy Transaction attribute.")}},8711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializedTransactionType=void 0;const r=n(72861),o=n(62870),i=n(39581);t.getSerializedTransactionType=function(e){const t=(0,o.sliceHex)(e,0,1);if("0x02"===t)return"eip1559";if("0x01"===t)return"eip2930";if("0x"!==t&&(0,i.hexToNumber)(t)>=192)return"legacy";throw new r.InvalidSerializedTransactionTypeError({serializedType:t})}},57080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionType=void 0;const r=n(72861);t.getTransactionType=function(e){if(e.type)return e.type;if("undefined"!==typeof e.maxFeePerGas||"undefined"!==typeof e.maxPriorityFeePerGas)return"eip1559";if("undefined"!==typeof e.gasPrice)return"undefined"!==typeof e.accessList?"eip2930":"legacy";throw new r.InvalidSerializableTransactionError({transaction:e})}},69531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccessList=t.toTransactionArray=t.parseTransaction=void 0;const r=n(77295),o=n(72861),i=n(35129),s=n(34323),a=n(38454),c=n(29957),u=n(39581),l=n(14498),d=n(70213),f=n(26121),h=n(8711);function p(e){return(0,l.fromRlp)(`0x${e.slice(4)}`,"hex")}function m(e){const t=[];for(let n=0;n<e.length;n++){const[o,s]=e[n];if(!(0,i.isAddress)(o))throw new r.InvalidAddressError({address:o});t.push({address:o,storageKeys:s.map((e=>(0,d.isHash)(e)?e:(0,c.trim)(e)))})}return t}function g(e){const t=e.slice(-3),n="0x"===t[0]||0n===(0,u.hexToBigInt)(t[0])?27n:28n;return{r:(0,a.padHex)(t[1],{size:32}),s:(0,a.padHex)(t[2],{size:32}),v:n,yParity:27n===n?0:1}}t.parseTransaction=function(e){const t=(0,h.getSerializedTransactionType)(e);return"eip1559"===t?function(e){const t=p(e),[n,r,i,a,c,l,d,h,y,b,v,w]=t;if(9!==t.length&&12!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:n,nonce:r,maxPriorityFeePerGas:i,maxFeePerGas:a,gas:c,to:l,value:d,data:h,accessList:y,...t.length>9?{v:b,r:v,s:w}:{}},serializedTransaction:e,type:"eip1559"});const x={chainId:(0,u.hexToNumber)(n),type:"eip1559"};(0,s.isHex)(l)&&"0x"!==l&&(x.to=l);(0,s.isHex)(c)&&"0x"!==c&&(x.gas=(0,u.hexToBigInt)(c));(0,s.isHex)(h)&&"0x"!==h&&(x.data=h);(0,s.isHex)(r)&&"0x"!==r&&(x.nonce=(0,u.hexToNumber)(r));(0,s.isHex)(d)&&"0x"!==d&&(x.value=(0,u.hexToBigInt)(d));(0,s.isHex)(a)&&"0x"!==a&&(x.maxFeePerGas=(0,u.hexToBigInt)(a));(0,s.isHex)(i)&&"0x"!==i&&(x.maxPriorityFeePerGas=(0,u.hexToBigInt)(i));0!==y.length&&"0x"!==y&&(x.accessList=m(y));(0,f.assertTransactionEIP1559)(x);return{...12===t.length?g(t):void 0,...x}}(e):"eip2930"===t?function(e){const t=p(e),[n,r,i,a,c,l,d,h,y,b,v]=t;if(8!==t.length&&11!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:n,nonce:r,gasPrice:i,gas:a,to:c,value:l,data:d,accessList:h,...t.length>8?{v:y,r:b,s:v}:{}},serializedTransaction:e,type:"eip2930"});const w={chainId:(0,u.hexToNumber)(n),type:"eip2930"};(0,s.isHex)(c)&&"0x"!==c&&(w.to=c);(0,s.isHex)(a)&&"0x"!==a&&(w.gas=(0,u.hexToBigInt)(a));(0,s.isHex)(d)&&"0x"!==d&&(w.data=d);(0,s.isHex)(r)&&"0x"!==r&&(w.nonce=(0,u.hexToNumber)(r));(0,s.isHex)(l)&&"0x"!==l&&(w.value=(0,u.hexToBigInt)(l));(0,s.isHex)(i)&&"0x"!==i&&(w.gasPrice=(0,u.hexToBigInt)(i));0!==h.length&&"0x"!==h&&(w.accessList=m(h));(0,f.assertTransactionEIP2930)(w);return{...11===t.length?g(t):void 0,...w}}(e):function(e){const t=(0,l.fromRlp)(e,"hex"),[n,r,i,a,c,d,h,p,m]=t;if(6!==t.length&&9!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{nonce:n,gasPrice:r,gas:i,to:a,value:c,data:d,...t.length>6?{v:h,r:p,s:m}:{}},serializedTransaction:e,type:"legacy"});const g={type:"legacy"};(0,s.isHex)(a)&&"0x"!==a&&(g.to=a);(0,s.isHex)(i)&&"0x"!==i&&(g.gas=(0,u.hexToBigInt)(i));(0,s.isHex)(d)&&"0x"!==d&&(g.data=d);(0,s.isHex)(n)&&"0x"!==n&&(g.nonce=(0,u.hexToNumber)(n));(0,s.isHex)(c)&&"0x"!==c&&(g.value=(0,u.hexToBigInt)(c));(0,s.isHex)(r)&&"0x"!==r&&(g.gasPrice=(0,u.hexToBigInt)(r));if((0,f.assertTransactionLegacy)(g),6===t.length)return g;const y=(0,s.isHex)(h)&&"0x"!==h?(0,u.hexToBigInt)(h):0n;if("0x"===m&&"0x"===p)return y>0&&(g.chainId=Number(y)),g;const b=y,v=Number((b-35n)/2n);if(v>0)g.chainId=v;else if(27n!==b&&28n!==b)throw new o.InvalidLegacyVError({v:b});return g.v=b,g.s=m,g.r=p,g}(e)},t.toTransactionArray=p,t.parseAccessList=m},37200:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAccessList=void 0;const r=n(77295),o=n(72861),i=n(35129);t.serializeAccessList=function(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:s,storageKeys:a}=e[n];for(let e=0;e<a.length;e++)if(a[e].length-2!==64)throw new o.InvalidStorageKeySizeError({storageKey:a[e]});if(!(0,i.isAddress)(s))throw new r.InvalidAddressError({address:s});t.push([s,a])}return t}},88165:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTransaction=void 0;const r=n(72861),o=n(37456),i=n(29957),s=n(62002),a=n(21944),c=n(26121),u=n(57080),l=n(37200);t.serializeTransaction=function(e,t){const n=(0,u.getTransactionType)(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:u,to:d,value:f,maxFeePerGas:h,maxPriorityFeePerGas:p,accessList:m,data:g}=e;(0,c.assertTransactionEIP1559)(e);const y=(0,l.serializeAccessList)(m),b=[(0,s.toHex)(n),u?(0,s.toHex)(u):"0x",p?(0,s.toHex)(p):"0x",h?(0,s.toHex)(h):"0x",r?(0,s.toHex)(r):"0x",d??"0x",f?(0,s.toHex)(f):"0x",g??"0x",y];if(t){const e=0n===t.v?"0x":1n===t.v?(0,s.toHex)(1):27n===t.v?"0x":(0,s.toHex)(1);b.push(e,(0,i.trim)(t.r),(0,i.trim)(t.s))}return(0,o.concatHex)(["0x02",(0,a.toRlp)(b)])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:u,nonce:d,to:f,value:h,accessList:p,gasPrice:m}=e;(0,c.assertTransactionEIP2930)(e);const g=(0,l.serializeAccessList)(p),y=[(0,s.toHex)(n),d?(0,s.toHex)(d):"0x",m?(0,s.toHex)(m):"0x",r?(0,s.toHex)(r):"0x",f??"0x",h?(0,s.toHex)(h):"0x",u??"0x",g];if(t){const e=0n===t.v?"0x":1n===t.v?(0,s.toHex)(1):27n===t.v?"0x":(0,s.toHex)(1);y.push(e,(0,i.trim)(t.r),(0,i.trim)(t.s))}return(0,o.concatHex)(["0x01",(0,a.toRlp)(y)])}(e,t):function(e,t){const{chainId:n=0,gas:o,data:i,nonce:u,to:l,value:d,gasPrice:f}=e;(0,c.assertTransactionLegacy)(e);let h=[u?(0,s.toHex)(u):"0x",f?(0,s.toHex)(f):"0x",o?(0,s.toHex)(o):"0x",l??"0x",d?(0,s.toHex)(d):"0x",i??"0x"];if(t){const e=(()=>{if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);if(t.v>=35n){return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n)}const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new r.InvalidLegacyVError({v:t.v});return e})();h=[...h,(0,s.toHex)(e),t.r,t.s]}else n>0&&(h=[...h,(0,s.toHex)(n),"0x","0x"]);return(0,a.toRlp)(h)}(e,t)}},85024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.domainSeparator=t.getTypesForEIP712Domain=t.validateTypedData=void 0;const r=n(65413),o=n(77295),i=n(35129),s=n(61539),a=n(62002),c=n(14983),u=n(90696);function l({domain:e}){return["string"===typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"===typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}t.validateTypedData=function({domain:e,message:t,primaryType:n,types:u}){const l=u,d=(e,t)=>{for(const n of e){const{name:e,type:u}=n,f=u,h=t[e],p=f.match(c.integerRegex);if(p&&("number"===typeof h||"bigint"===typeof h)){const[e,t,n]=p;(0,a.numberToHex)(h,{signed:"int"===t,size:parseInt(n)/8})}if("address"===f&&"string"===typeof h&&!(0,i.isAddress)(h))throw new o.InvalidAddressError({address:h});const m=f.match(c.bytesRegex);if(m){const[e,t]=m;if(t&&(0,s.size)(h)!==parseInt(t))throw new r.BytesSizeMismatchError({expectedSize:parseInt(t),givenSize:(0,s.size)(h)})}const g=l[f];g&&d(g,h)}};if(l.EIP712Domain&&e&&d(l.EIP712Domain,e),"EIP712Domain"!==n){const e=l[n];d(e,t)}},t.getTypesForEIP712Domain=l,t.domainSeparator=function({domain:e}){return(0,u.hashDomain)({domain:e,types:{EIP712Domain:l({domain:e})}})}},18614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uid=void 0;let n,r=256;t.uid=function(e=11){if(!n||r+e>512){n="",r=0;for(let e=0;e<256;e++)n+=(256+256*Math.random()|0).toString(16).substring(1)}return n.substring(r,r+++e)}},12183:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatEther=void 0;const r=n(12966),o=n(69719);t.formatEther=function(e,t="wei"){return(0,o.formatUnits)(e,r.etherUnits[t])}},60903:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatGwei=void 0;const r=n(12966),o=n(69719);t.formatGwei=function(e,t="wei"){return(0,o.formatUnits)(e,r.gweiUnits[t])}},69719:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnits=void 0,t.formatUnits=function(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}},60285:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=void 0;const r=n(12966),o=n(39190);t.parseEther=function(e,t="wei"){return(0,o.parseUnits)(e,r.etherUnits[t])}},74448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseGwei=void 0;const r=n(12966),o=n(39190);t.parseGwei=function(e,t="wei"){return(0,o.parseUnits)(e,r.gweiUnits[t])}},39190:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnits=void 0,t.parseUnits=function(e,t){let[n,r="0"]=e.split(".");const o=n.startsWith("-");if(o&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,o,i]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],s=Math.round(Number(`${o}.${i}`));r=s>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${s}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${o?"-":""}${n}${r}`)}},95501:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0,t.wait=async function(e){return new Promise((t=>setTimeout(t,e)))}},25611:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const r=n(20691);class o extends Error{constructor(e,t={}){const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof o&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${r.version}`].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=o},2149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;const r=n(25611);class o extends r.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=o;class i extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}t.UnknownTypeError=i;class s extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}t.UnknownSolidityTypeError=s},93669:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;const r=n(25611);class o extends r.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=o;class i extends r.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=i;class s extends r.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=s;class a extends r.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}t.SolidityProtectedKeywordError=a;class c extends r.BaseError{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}t.InvalidModifierError=c;class u extends r.BaseError{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}t.InvalidFunctionModifierError=u;class l extends r.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=l},53584:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;const r=n(25611);class o extends r.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=o;class i extends r.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=i;class s extends r.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}t.InvalidStructSignatureError=s},71808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;const r=n(25611);class o extends r.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}t.InvalidParenthesisError=o},98738:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;const r=n(25611);class o extends r.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}t.CircularReferenceError=o},97601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=void 0;const r=n(30717);t.formatAbi=function(e){const t=[],n=e.length;for(let o=0;o<n;o++){const n=e[o],i=(0,r.formatAbiItem)(n);t.push(i)}return t}},30717:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItem=void 0;const r=n(94359);t.formatAbiItem=function(e){return"function"===e.type?`function ${e.name}(${(0,r.formatAbiParameters)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs.length?` returns (${(0,r.formatAbiParameters)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,r.formatAbiParameters)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,r.formatAbiParameters)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,r.formatAbiParameters)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback()":"receive() external payable"}},17321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameter=void 0;const r=n(11575),o=/^tuple(?<array>(\[(\d*)\])*)$/;t.formatAbiParameter=function e(t){let n=t.type;if(o.test(t.type)&&"components"in t){n="(";const i=t.components.length;for(let r=0;r<i;r++){n+=e(t.components[r]),r<i-1&&(n+=", ")}return n+=`)${(0,r.execTyped)(o,t.type)?.array??""}`,e({...t,type:n})}return"indexed"in t&&t.indexed&&(n=`${n} indexed`),t.name?`${n} ${t.name}`:n}},94359:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameters=void 0;const r=n(17321);t.formatAbiParameters=function(e){let t="";const n=e.length;for(let o=0;o<n;o++){const i=e[o];t+=(0,r.formatAbiParameter)(i),o!==n-1&&(t+=", ")}return t}},76719:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbi=void 0;const r=n(97677),o=n(21518),i=n(30123);t.parseAbi=function(e){const t=(0,o.parseStructs)(e),n=[],s=e.length;for(let o=0;o<s;o++){const s=e[o];(0,r.isStructSignature)(s)||n.push((0,i.parseSignature)(s,t))}return n}},97462:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiItem=void 0;const r=n(48661),o=n(97677),i=n(21518),s=n(30123);t.parseAbiItem=function(e){let t;if("string"===typeof e)t=(0,s.parseSignature)(e);else{const n=(0,i.parseStructs)(e),r=e.length;for(let i=0;i<r;i++){const r=e[i];if(!(0,o.isStructSignature)(r)){t=(0,s.parseSignature)(r,n);break}}}if(!t)throw new r.InvalidAbiItemError({signature:e});return t}},88919:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameter=void 0;const r=n(48661),o=n(97677),i=n(21518),s=n(30123);t.parseAbiParameter=function(e){let t;if("string"===typeof e)t=(0,s.parseAbiParameter)(e,{modifiers:o.modifiers});else{const n=(0,i.parseStructs)(e),r=e.length;for(let i=0;i<r;i++){const r=e[i];if(!(0,o.isStructSignature)(r)){t=(0,s.parseAbiParameter)(r,{modifiers:o.modifiers,structs:n});break}}}if(!t)throw new r.InvalidAbiParameterError({param:e});return t}},56229:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameters=void 0;const r=n(48661),o=n(97677),i=n(21518),s=n(30123),a=n(30123);t.parseAbiParameters=function(e){const t=[];if("string"===typeof e){const n=(0,s.splitParameters)(e),r=n.length;for(let e=0;e<r;e++)t.push((0,a.parseAbiParameter)(n[e],{modifiers:o.modifiers}))}else{const n=(0,i.parseStructs)(e),r=e.length;for(let i=0;i<r;i++){const r=e[i];if((0,o.isStructSignature)(r))continue;const c=(0,s.splitParameters)(r),u=c.length;for(let e=0;e<u;e++)t.push((0,a.parseAbiParameter)(c[e],{modifiers:o.modifiers,structs:n}))}}if(0===t.length)throw new r.InvalidAbiParametersError({params:e});return t}},37879:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parameterCache=t.getParameterCacheKey=void 0,t.getParameterCacheKey=function(e,t){return t?`${t}:${e}`:e},t.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])},97677:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.functionModifiers=t.eventModifiers=t.modifiers=t.isReceiveSignature=t.isFallbackSignature=t.execConstructorSignature=t.isConstructorSignature=t.execStructSignature=t.isStructSignature=t.execFunctionSignature=t.isFunctionSignature=t.execEventSignature=t.isEventSignature=t.execErrorSignature=t.isErrorSignature=void 0;const r=n(11575),o=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;t.isErrorSignature=function(e){return o.test(e)},t.execErrorSignature=function(e){return(0,r.execTyped)(o,e)};const i=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;t.isEventSignature=function(e){return i.test(e)},t.execEventSignature=function(e){return(0,r.execTyped)(i,e)};const s=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;t.isFunctionSignature=function(e){return s.test(e)},t.execFunctionSignature=function(e){return(0,r.execTyped)(s,e)};const a=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;t.isStructSignature=function(e){return a.test(e)},t.execStructSignature=function(e){return(0,r.execTyped)(a,e)};const c=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;t.isConstructorSignature=function(e){return c.test(e)},t.execConstructorSignature=function(e){return(0,r.execTyped)(c,e)};const u=/^fallback\(\)$/;t.isFallbackSignature=function(e){return u.test(e)};const l=/^receive\(\) external payable$/;t.isReceiveSignature=function(e){return l.test(e)},t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},21518:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=void 0;const r=n(11575),o=n(2149),i=n(93669),s=n(53584),a=n(98738),c=n(97677),u=n(30123);t.parseStructs=function(e){const t={},n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!(0,c.isStructSignature)(n))continue;const r=(0,c.execStructSignature)(n);if(!r)throw new s.InvalidSignatureError({signature:n,type:"struct"});const o=r.properties.split(";"),i=[],l=o.length;for(let e=0;e<l;e++){const t=o[e].trim();if(!t)continue;const n=(0,u.parseAbiParameter)(t,{type:"struct"});i.push(n)}if(!i.length)throw new s.InvalidStructSignatureError({signature:n});t[r.name]=i}const r={},o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){const[e,n]=o[s];r[e]=d(n,t)}return r};const l=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(e,t,n=new Set){const s=[],c=e.length;for(let f=0;f<c;f++){const c=e[f];if(r.isTupleRegex.test(c.type))s.push(c);else{const e=(0,r.execTyped)(l,c.type);if(!e?.type)throw new i.InvalidAbiTypeParameterError({abiParameter:c});const{array:f,type:h}=e;if(h in t){if(n.has(h))throw new a.CircularReferenceError({type:h});s.push({...c,type:`tuple${f??""}`,components:d(t[h]??[],t,new Set([...n,h]))})}else{if(!(0,u.isSolidityType)(h))throw new o.UnknownTypeError({type:h});s.push(c)}}}return s}},30123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDataLocation=t.isSolidityKeyword=t.isSolidityType=t.splitParameters=t.parseAbiParameter=t.parseSignature=void 0;const r=n(11575),o=n(2149),i=n(93669),s=n(53584),a=n(71808),c=n(37879),u=n(97677);t.parseSignature=function(e,t={}){if((0,u.isFunctionSignature)(e)){const n=(0,u.execFunctionSignature)(e);if(!n)throw new s.InvalidSignatureError({signature:e,type:"function"});const r=p(n.parameters),o=[],i=r.length;for(let e=0;e<i;e++)o.push(h(r[e],{modifiers:u.functionModifiers,structs:t,type:"function"}));const a=[];if(n.returns){const e=p(n.returns),r=e.length;for(let n=0;n<r;n++)a.push(h(e[n],{modifiers:u.functionModifiers,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:a}}if((0,u.isEventSignature)(e)){const n=(0,u.execEventSignature)(e);if(!n)throw new s.InvalidSignatureError({signature:e,type:"event"});const r=p(n.parameters),o=[],i=r.length;for(let e=0;e<i;e++)o.push(h(r[e],{modifiers:u.eventModifiers,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}if((0,u.isErrorSignature)(e)){const n=(0,u.execErrorSignature)(e);if(!n)throw new s.InvalidSignatureError({signature:e,type:"error"});const r=p(n.parameters),o=[],i=r.length;for(let e=0;e<i;e++)o.push(h(r[e],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}if((0,u.isConstructorSignature)(e)){const n=(0,u.execConstructorSignature)(e);if(!n)throw new s.InvalidSignatureError({signature:e,type:"constructor"});const r=p(n.parameters),o=[],i=r.length;for(let e=0;e<i;e++)o.push(h(r[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}if((0,u.isFallbackSignature)(e))return{type:"fallback"};if((0,u.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new s.UnknownSignatureError({signature:e})};const l=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,d=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,f=/^u?int$/;function h(e,t){const n=(0,c.getParameterCacheKey)(e,t?.type);if(c.parameterCache.has(n))return c.parameterCache.get(n);const s=r.isTupleRegex.test(e),a=(0,r.execTyped)(s?d:l,e);if(!a)throw new i.InvalidParameterError({param:e});if(a.name&&y(a.name))throw new i.SolidityProtectedKeywordError({param:e,name:a.name});const g=a.name?{name:a.name}:{},v="indexed"===a.modifier?{indexed:!0}:{},w=t?.structs??{};let x,E={};if(s){x="tuple";const e=p(a.type),t=[],n=e.length;for(let r=0;r<n;r++)t.push(h(e[r],{structs:w}));E={components:t}}else if(a.type in w)x="tuple",E={components:w[a.type]};else if(f.test(a.type))x=`${a.type}256`;else if(x=a.type,"struct"!==t?.type&&!m(x))throw new o.UnknownSolidityTypeError({type:x});if(a.modifier){if(!t?.modifiers?.has?.(a.modifier))throw new i.InvalidModifierError({param:e,type:t?.type,modifier:a.modifier});if(u.functionModifiers.has(a.modifier)&&!b(x,!!a.array))throw new i.InvalidFunctionModifierError({param:e,type:t?.type,modifier:a.modifier})}const _={type:`${x}${a.array??""}`,...g,...v,...E};return c.parameterCache.set(n,_),_}function p(e,t=[],n="",r=0){if(""===e){if(""===n)return t;if(0!==r)throw new a.InvalidParenthesisError({current:n,depth:r});return t.push(n.trim()),t}const o=e.length;for(let i=0;i<o;i++){const o=e[i],s=e.slice(i+1);switch(o){case",":return 0===r?p(s,[...t,n.trim()]):p(s,t,`${n}${o}`,r);case"(":return p(s,t,`${n}${o}`,r+1);case")":return p(s,t,`${n}${o}`,r-1);default:return p(s,t,`${n}${o}`,r)}}return[]}function m(e){return"address"===e||"bool"===e||"function"===e||"string"===e||r.bytesRegex.test(e)||r.integerRegex.test(e)}t.parseAbiParameter=h,t.splitParameters=p,t.isSolidityType=m;const g=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function y(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||r.bytesRegex.test(e)||r.integerRegex.test(e)||g.test(e)}function b(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}t.isSolidityKeyword=y,t.isValidDataLocation=b},48661:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=t.InvalidParenthesisError=t.UnknownSignatureError=t.InvalidSignatureError=t.InvalidStructSignatureError=t.InvalidAbiParameterError=t.InvalidAbiParametersError=t.InvalidParameterError=t.SolidityProtectedKeywordError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.UnknownSolidityTypeError=t.InvalidAbiItemError=t.UnknownTypeError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.formatAbiParameters=t.formatAbiParameter=t.formatAbiItem=t.formatAbi=t.narrow=t.BaseError=void 0;var r=n(25611);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var o=n(68831);Object.defineProperty(t,"narrow",{enumerable:!0,get:function(){return o.narrow}});var i=n(97601);Object.defineProperty(t,"formatAbi",{enumerable:!0,get:function(){return i.formatAbi}});var s=n(30717);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return s.formatAbiItem}});var a=n(17321);Object.defineProperty(t,"formatAbiParameter",{enumerable:!0,get:function(){return a.formatAbiParameter}});var c=n(94359);Object.defineProperty(t,"formatAbiParameters",{enumerable:!0,get:function(){return c.formatAbiParameters}});var u=n(76719);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return u.parseAbi}});var l=n(97462);Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return l.parseAbiItem}});var d=n(88919);Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var f=n(56229);Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return f.parseAbiParameters}});var h=n(2149);Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return h.UnknownTypeError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return h.InvalidAbiItemError}}),Object.defineProperty(t,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return h.UnknownSolidityTypeError}});var p=n(93669);Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return p.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return p.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return p.InvalidModifierError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return p.SolidityProtectedKeywordError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return p.InvalidParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return p.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return p.InvalidAbiParameterError}});var m=n(53584);Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return m.InvalidStructSignatureError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return m.InvalidSignatureError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return m.UnknownSignatureError}});var g=n(71808);Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return g.InvalidParenthesisError}});var y=n(98738);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return y.CircularReferenceError}})},68831:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.narrow=void 0,t.narrow=function(e){return e}},11575:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTupleRegex=t.integerRegex=t.bytesRegex=t.execTyped=void 0,t.execTyped=function(e,t){return e.exec(t)?.groups},t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,t.isTupleRegex=/^\(.+?\).*?$/},20691:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.9.8"},87462:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{Z:function(){return r}})},75068:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:function(){return o}})},63366:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{Z:function(){return r}})},95016:function(e,t,n){"use strict";n.d(t,{I:function(){return r}});var r='{\n  "connect_wallet": {\n    "label": "Connect Wallet",\n    "wrong_network": {\n      "label": "Wrong network"\n    }\n  },\n\n  "intro": {\n    "title": "What is a Wallet?",\n    "description": "A wallet is used to send, receive, store, and display digital assets. It\'s also a new way to log in, without needing to create new accounts and passwords on every website.",\n    "digital_asset": {\n      "title": "A Home for your Digital Assets",\n      "description": "Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."\n    },\n    "login": {\n      "title": "A New Way to Log In",\n      "description": "Instead of creating new accounts and passwords on every website, just connect your wallet."\n    },\n    "get": {\n      "label": "Get a Wallet"\n    },\n    "learn_more": {\n      "label": "Learn More"\n    }\n  },\n\n  "sign_in": {\n    "label": "Verify your account",\n    "description": "To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account.",\n    "message": {\n      "send": "Sign message",\n      "preparing": "Preparing message...",\n      "cancel": "Cancel",\n      "preparing_error": "Error preparing message, please retry!"\n    },\n    "signature": {\n      "waiting": "Waiting for signature...",\n      "verifying": "Verifying signature...",\n      "signing_error": "Error signing message, please retry!",\n      "verifying_error": "Error verifying signature, please retry!",\n      "oops_error": "Oops, something went wrong!"\n    }\n  },\n\n  "connect": {\n    "label": "Connect",\n    "title": "Connect a Wallet",\n    "new_to_ethereum": {\n      "description": "New to Ethereum wallets?",\n      "learn_more": {\n        "label": "Learn More"\n      }\n    },\n    "learn_more": {\n      "label": "Learn more"\n    },\n    "recent": "Recent",\n    "status": {\n      "opening": "Opening %{wallet}...",\n      "connecting": "Connecting",\n      "connect_mobile": "Continue in %{wallet}",\n      "not_installed": "%{wallet} is not installed",\n      "not_available": "%{wallet} is not available",\n      "confirm": "Confirm connection in the extension",\n      "confirm_mobile": "Accept connection request in the wallet"\n    },\n    "secondary_action": {\n      "get": {\n        "description": "Don\'t have %{wallet}?",\n        "label": "GET"\n      },\n      "install": {\n        "label": "INSTALL"\n      },\n      "retry": {\n        "label": "RETRY"\n      }\n    },\n    "walletconnect": {\n      "description": {\n        "full": "Need the official WalletConnect modal?",\n        "compact": "Need the WalletConnect modal?"\n      },\n      "open": {\n        "label": "OPEN"\n      }\n    }\n  },\n\n  "connect_scan": {\n    "title": "Scan with %{wallet}",\n    "fallback_title": "Scan with your phone"\n  },\n\n  "connector_group": {\n    "recommended": "Recommended",\n    "other": "Other",\n    "popular": "Popular",\n    "more": "More",\n    "others": "Others"\n  },\n\n  "get": {\n    "title": "Get a Wallet",\n    "action": {\n      "label": "GET"\n    },\n    "mobile": {\n      "description": "Mobile Wallet"\n    },\n    "extension": {\n      "description": "Browser Extension"\n    },\n    "mobile_and_extension": {\n      "description": "Mobile Wallet and Extension"\n    },\n    "mobile_and_desktop": {\n      "description": "Mobile and Desktop Wallet"\n    },\n    "looking_for": {\n      "title": "Not what you\'re looking for?",\n      "mobile": {\n        "description": "Select a wallet on the main screen to get started with a different wallet provider."\n      },\n      "desktop": {\n        "compact_description": "Select a wallet on the main screen to get started with a different wallet provider.",\n        "wide_description": "Select a wallet on the left to get started with a different wallet provider."\n      }\n    }\n  },\n\n  "get_options": {\n    "title": "Get started with %{wallet}",\n    "short_title": "Get %{wallet}",\n    "mobile": {\n      "title": "%{wallet} for Mobile",\n      "description": "Use the mobile wallet to explore the world of Ethereum.",\n      "download": {\n        "label": "Get the app"\n      }\n    },\n    "extension": {\n      "title": "%{wallet} for %{browser}",\n      "description": "Access your wallet right from your favorite web browser.",\n      "download": {\n        "label": "Add to %{browser}"\n      }\n    },\n    "desktop": {\n      "title": "%{wallet} for %{platform}",\n      "description": "Access your wallet natively from your powerful desktop.",\n      "download": {\n        "label": "Add to %{platform}"\n      }\n    }\n  },\n\n  "get_mobile": {\n    "title": "Install %{wallet}",\n    "description": "Scan with your phone to download on iOS or Android",\n    "continue": {\n      "label": "Continue"\n    }\n  },\n\n  "get_instructions": {\n    "mobile": {\n      "connect": {\n        "label": "Connect"\n      },\n      "learn_more": {\n        "label": "Learn More"\n      }\n    },\n    "extension": {\n      "refresh": {\n        "label": "Refresh"\n      },\n      "learn_more": {\n        "label": "Learn More"\n      }\n    },\n    "desktop": {\n      "connect": {\n        "label": "Connect"\n      },\n      "learn_more": {\n        "label": "Learn More"\n      }\n    }\n  },\n\n  "chains": {\n    "title": "Switch Networks",\n    "wrong_network": "Wrong network detected, switch or disconnect to continue.",\n    "confirm": "Confirm in Wallet",\n    "switching_not_supported": "Your wallet does not support switching networks from %{appName}. Try switching networks from within your wallet instead.",\n    "switching_not_supported_fallback": "Your wallet does not support switching networks from this app. Try switching networks from within your wallet instead.",\n    "disconnect": "Disconnect",\n    "connected": "Connected"\n  },\n\n  "profile": {\n    "disconnect": {\n      "label": "Disconnect"\n    },\n    "copy_address": {\n      "label": "Copy Address",\n      "copied": "Copied!"\n    },\n    "explorer": {\n      "label": "View more on explorer"\n    },\n    "transactions": {\n      "description": "%{appName} transactions will appear here...",\n      "description_fallback": "Your transactions will appear here...",\n      "recent": {\n        "title": "Recent Transactions"\n      },\n      "clear": {\n        "label": "Clear All"\n      }\n    }\n  },\n\n  "wallet_connectors": {\n    "argent": {\n      "qr_code": {\n        "step1": {\n          "description": "Put Argent on your home screen for faster access to your wallet.",\n          "title": "Open the Argent app"\n        },\n        "step2": {\n          "description": "Create a wallet and username, or import an existing wallet.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the Scan QR button"\n        }\n      }\n    },\n\n    "bifrost": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting Bifrost Wallet on your home screen for quicker access.",\n          "title": "Open the Bifrost Wallet app"\n        },\n        "step2": {\n          "description": "Create or import a wallet using your recovery phrase.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the scan button"\n        }\n      }\n    },\n\n    "bitget": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting Bitget Wallet on your home screen for quicker access.",\n          "title": "Open the Bitget Wallet app"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the scan button"\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Bitget Wallet to your taskbar for quicker access to your wallet.",\n          "title": "Install the Bitget Wallet extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "bitski": {\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Bitski to your taskbar for quicker access to your wallet.",\n          "title": "Install the Bitski extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "coin98": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting Coin98 Wallet on your home screen for faster access to your wallet.",\n          "title": "Open the Coin98 Wallet app"\n        },\n        "step2": {\n          "description": "You can easily backup your wallet using our backup feature on your phone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the WalletConnect button"\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "description": "Click at the top right of your browser and pin Coin98 Wallet for easy access.",\n          "title": "Install the Coin98 Wallet extension"\n        },\n        "step2": {\n          "description": "Create a new wallet or import an existing one.",\n          "title": "Create or Import a wallet"\n        },\n        "step3": {\n          "description": "Once you set up Coin98 Wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "coinbase": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting Coinbase Wallet on your home screen for quicker access.",\n          "title": "Open the Coinbase Wallet app"\n        },\n        "step2": {\n          "description": "You can easily backup your wallet using the cloud backup feature.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the scan button"\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",\n          "title": "Install the Coinbase Wallet extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "core": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting Core on your home screen for faster access to your wallet.",\n          "title": "Open the Core app"\n        },\n        "step2": {\n          "description": "You can easily backup your wallet using our backup feature on your phone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the WalletConnect button"\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Core to your taskbar for quicker access to your wallet.",\n          "title": "Install the Core extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "fox": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting FoxWallet on your home screen for quicker access.",\n          "title": "Open the FoxWallet app"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the scan button"\n        }\n      }\n    },\n\n    "frontier": {\n      "qr_code": {\n        "step1": {\n          "description": "We recommend putting Frontier Wallet on your home screen for quicker access.",\n          "title": "Open the Frontier Wallet app"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet.",\n          "title": "Tap the scan button"\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Frontier Wallet to your taskbar for quicker access to your wallet.",\n          "title": "Install the Frontier Wallet extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "im_token": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the imToken app",\n          "description": "Put imToken app on your home screen for faster access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Tap Scanner Icon in top right corner",\n          "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."\n        }\n      }\n    },\n\n    "metamask": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the MetaMask app",\n          "description": "We recommend putting MetaMask on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "title": "Install the MetaMask extension",\n          "description": "We recommend pinning MetaMask to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "okx": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the OKX Wallet app",\n          "description": "We recommend putting OKX Wallet on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "title": "Install the OKX Wallet extension",\n          "description": "We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "omni": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the Omni app",\n          "description": "Add Omni to your home screen for faster access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Tap the QR icon and scan",\n          "description": "Tap the QR icon on your home screen, scan the code and confirm the prompt to connect."\n        }\n      }\n    },\n\n    "token_pocket": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the TokenPocket app",\n          "description": "We recommend putting TokenPocket on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "title": "Install the TokenPocket extension",\n          "description": "We recommend pinning TokenPocket to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "trust": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the Trust Wallet app",\n          "description": "Put Trust Wallet on your home screen for faster access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Tap WalletConnect in Settings",\n          "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "title": "Install the Trust Wallet extension",\n          "description": "Click at the top right of your browser and pin Trust Wallet for easy access."\n        },\n        "step2": {\n          "title": "Create or Import a wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up Trust Wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "uniswap": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the Uniswap app",\n          "description": "Add Uniswap Wallet to your home screen for faster access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Tap the QR icon and scan",\n          "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."\n        }\n      }\n    },\n\n    "zerion": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the Zerion app",\n          "description": "We recommend putting Zerion on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      },\n\n      "extension": {\n        "step1": {\n          "title": "Install the Zerion extension",\n          "description": "We recommend pinning Zerion to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "rainbow": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the Rainbow app",\n          "description": "We recommend putting Rainbow on your home screen for faster access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "You can easily backup your wallet using our backup feature on your phone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      }\n    },\n\n    "enkrypt": {\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Enkrypt Wallet to your taskbar for quicker access to your wallet.",\n          "title": "Install the Enkrypt Wallet extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "frame": {\n      "extension": {\n        "step1": {\n          "description": "We recommend pinning Frame to your taskbar for quicker access to your wallet.",\n          "title": "Install Frame & the companion extension"\n        },\n        "step2": {\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",\n          "title": "Create or Import a Wallet"\n        },\n        "step3": {\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",\n          "title": "Refresh your browser"\n        }\n      }\n    },\n\n    "one_key": {\n      "extension": {\n        "step1": {\n          "title": "Install the OneKey Wallet extension",\n          "description": "We recommend pinning OneKey Wallet to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "phantom": {\n      "extension": {\n        "step1": {\n          "title": "Install the Phantom extension",\n          "description": "We recommend pinning Phantom to your taskbar for easier access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "rabby": {\n      "extension": {\n        "step1": {\n          "title": "Install the Rabby extension",\n          "description": "We recommend pinning Rabby to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "safeheron": {\n      "extension": {\n        "step1": {\n          "title": "Install the Core extension",\n          "description": "We recommend pinning Safeheron to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "taho": {\n      "extension": {\n        "step1": {\n          "title": "Install the Taho extension",\n          "description": "We recommend pinning Taho to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "talisman": {\n      "extension": {\n        "step1": {\n          "title": "Install the Talisman extension",\n          "description": "We recommend pinning Talisman to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import an Ethereum Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "xdefi": {\n      "extension": {\n        "step1": {\n          "title": "Install the XDEFI Wallet extension",\n          "description": "We recommend pinning XDEFI Wallet to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "zeal": {\n      "extension": {\n        "step1": {\n          "title": "Install the Zeal extension",\n          "description": "We recommend pinning Zeal to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "safepal": {\n      "extension": {\n        "step1": {\n          "title": "Install the SafePal Wallet extension",\n          "description": "Click at the top right of your browser and pin SafePal Wallet for easy access."\n        },\n        "step2": {\n          "title": "Create or Import a wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up SafePal Wallet, click below to refresh the browser and load up the extension."\n        }\n      },\n      "qr_code": {\n        "step1": {\n          "title": "Open the SafePal Wallet app",\n          "description": "Put SafePal Wallet on your home screen for faster access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Create a new wallet or import an existing one."\n        },\n        "step3": {\n          "title": "Tap WalletConnect in Settings",\n          "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."\n        }\n      }\n    },\n\n    "desig": {\n      "extension": {\n        "step1": {\n          "title": "Install the Desig extension",\n          "description": "We recommend pinning Desig to your taskbar for easier access to your wallet."\n        },\n        "step2": {\n          "title": "Create a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      }\n    },\n\n    "subwallet": {\n      "extension": {\n        "step1": {\n          "title": "Install the SubWallet extension",\n          "description": "We recommend pinning SubWallet to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      },\n      "qr_code": {\n        "step1": {\n          "title": "Open the SubWallet app",\n          "description": "We recommend putting SubWallet on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      }\n    },\n\n    "clv": {\n      "extension": {\n        "step1": {\n          "title": "Install the CLV Wallet extension",\n          "description": "We recommend pinning CLV Wallet to your taskbar for quicker access to your wallet."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Refresh your browser",\n          "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."\n        }\n      },\n      "qr_code": {\n        "step1": {\n          "title": "Open the CLV Wallet app",\n          "description": "We recommend putting CLV Wallet on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Create or Import a Wallet",\n          "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."\n        },\n        "step3": {\n          "title": "Tap the scan button",\n          "description": "After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      }\n    },\n\n    "okto": {\n      "qr_code": {\n        "step1": {\n          "title": "Open the Okto app",\n          "description": "Add Okto to your home screen for quick access"\n        },\n        "step2": {\n          "title": "Create an MPC Wallet",\n          "description": "Create an account and generate a wallet"\n        },\n        "step3": {\n          "title": "Tap WalletConnect in Settings",\n          "description": "Tap the Scan QR icon at the top right and confirm the prompt to connect."\n        }\n      }\n    },\n\n    "ledger": {\n      "desktop": {\n        "step1": {\n          "title": "Open the Ledger Live app",\n          "description": "We recommend putting Ledger Live on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Set up your Ledger",\n          "description": "Set up a new Ledger or connect to an existing one."\n        },\n        "step3": {\n          "title": "Connect",\n          "description": "A connection prompt will appear for you to connect your wallet."\n        }\n      },\n      "qr_code": {\n        "step1": {\n          "title": "Open the Ledger Live app",\n          "description": "We recommend putting Ledger Live on your home screen for quicker access."\n        },\n        "step2": {\n          "title": "Set up your Ledger",\n          "description": "You can either sync with the desktop app or connect your Ledger."\n        },\n        "step3": {\n          "title": "Scan the code",\n          "description": "Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet."\n        }\n      }\n    }\n  }\n}\n'},34361:function(e,t,n){"use strict";n.d(t,{W:function(){return s}});var r=n(72606),o={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},i=o.blue,s=({accentColor:e=i.accentColor,accentColorForeground:t=i.accentColorForeground,...n}={})=>({...(0,r.w)(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});s.accentColors=o},72606:function(e,t,n){"use strict";n.d(t,{w:function(){return a}});var r='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',o={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${r}`,system:r},i={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},s={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},a=({borderRadius:e="large",fontStack:t="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:s[n].modalOverlay},fonts:{body:o[t]},radii:{actionButton:i[e].actionButton,connectButton:i[e].connectButton,menuButton:i[e].connectButton,modal:i[e].modal,modalMobile:i[e].modalMobile}})},71176:function(e,t,n){"use strict";n.d(t,{NL:function(){return co},pj:function(){return Un},a3:function(){return uo},wo:function(){return Io}});var r=n(34361),o=n(95016),i=n(67294);var s=function(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e};function a(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");return s((function(e){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:e}}if(Array.isArray(e)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var n={};for(var r in t.responsiveArray)null!=e[r]&&(n[t.responsiveArray[r]]=e[r]);return n}return e}),{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function c(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map((e=>e.styles))),i=Object.keys(o),s=i.filter((e=>"mappings"in o[e])),a=t=>{var n=[],r={},i=d({},t),a=!1;for(var c of s){var u=t[c];if(null!=u){var l=o[c];for(var f of(a=!0,l.mappings))r[f]=u,null==i[f]&&delete i[f]}}var h=a?d(d({},r),i):t,p=function(){var e=h[m],t=o[m];try{if(t.mappings)return"continue";if("string"===typeof e||"number"===typeof e)n.push(t.values[e].defaultClass);else if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r];if(null!=i){var s=t.responsiveArray[r];0,n.push(t.values[i].conditions[s])}}else for(var a in e){var c=e[a];null!=c&&n.push(t.values[c].conditions[a])}}catch(u){throw u}};for(var m in h)p();return e(n.join(" "))};return Object.assign(a,{properties:new Set(i)})},h=e=>e,p=function(){return f(h)(...arguments)},m=n(34789);function g(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=g(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}var y=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=g(e))&&(r&&(r+=" "),r+=t);return r},b=n(66403),v=n(73935),w=n(70655),x="right-scroll-bar-position",E="width-before-scroll-bar";function _(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}var k="undefined"!==typeof window?i.useLayoutEffect:i.useEffect,S=new WeakMap;function I(e,t){var n=function(e,t){var n=(0,i.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t||null,(function(t){return e.forEach((function(e){return _(e,t)}))}));return k((function(){var t=S.get(n);if(t){var r=new Set(t),o=new Set(e),i=n.current;r.forEach((function(e){o.has(e)||_(e,null)})),o.forEach((function(e){r.has(e)||_(e,i)}))}S.set(n,e)}),[e]),n}function C(e){return e}function T(e,t){void 0===t&&(t=C);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(i)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}}}var A=function(e){void 0===e&&(e={});var t=T(null);return t.options=(0,w.__assign)({async:!0,ssr:!1},e),t}(),P=function(){},O=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:P,onWheelCapture:P,onTouchMoveCapture:P}),o=r[0],s=r[1],a=e.forwardProps,c=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,x=(0,w.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,_=I([n,t]),k=(0,w.__assign)((0,w.__assign)({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(E,{sideCar:A,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:v}),a?i.cloneElement(i.Children.only(c),(0,w.__assign)((0,w.__assign)({},k),{ref:_})):i.createElement(b,(0,w.__assign)({},k,{className:u,ref:_}),c))}));O.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},O.classNames={fullWidth:E,zeroRight:x};var j,M=function(e){var t=e.sideCar,n=(0,w.__rest)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,(0,w.__assign)({},n))};M.isSideCarExport=!0;function R(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=j||n.nc;return t&&e.setAttribute("nonce",t),e}var B=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=R())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},N=function(){var e=function(){var e=B();return function(t,n){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},L={left:0,top:0,right:0,gap:0},U=function(e){return parseInt(e||"",10)||0},D=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return L;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[U(n),U(r),U(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},F=N(),z="data-scroll-locked",$=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(a,"px ").concat(r,";\n  }\n  body[").concat(z,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(o,"px;\n    padding-top: ").concat(i,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(x," {\n    right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(E," {\n    margin-right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(x," .").concat(x," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(E," .").concat(E," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(z,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n  }\n")},q=function(){var e=parseInt(document.body.getAttribute(z)||"0",10);return isFinite(e)?e:0},Z=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect((function(){return document.body.setAttribute(z,(q()+1).toString()),function(){var e=q()-1;e<=0?document.body.removeAttribute(z):document.body.setAttribute(z,e.toString())}}),[]);var s=i.useMemo((function(){return D(o)}),[o]);return i.createElement(F,{styles:$(s,!t,o,n?"":"!important")})},H=!1;if("undefined"!==typeof window)try{var W=Object.defineProperty({},"passive",{get:function(){return H=!0,!0}});window.addEventListener("test",W,W),window.removeEventListener("test",W,W)}catch(Co){H=!1}var G=!!H&&{passive:!1},K=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},V=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!==typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),X(e,r)){var o=Y(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},X=function(e,t){return"v"===e?function(e){return K(e,"overflowY")}(t):function(e){return K(e,"overflowX")}(t)},Y=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Q=function(e){return[e.deltaX,e.deltaY]},ee=function(e){return e&&"current"in e?e.current:e},te=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ne=0,re=[];function oe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ie,se=(ie=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(ne++)[0],s=i.useState(N)[0],a=i.useRef(e);i.useEffect((function(){a.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,w.__spreadArray)([e.lockRef.current],(e.shards||[]).map(ee),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=J(e),s=n.current,c="deltaX"in e?e.deltaX:s[0]-i[0],u="deltaY"in e?e.deltaY:s[1]-i[1],l=e.target,d=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=V(d,l);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=V(d,l)),!f)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,l=s>0,d=0,f=0;do{var h=Y(e,a),p=h[0],m=h[1]-h[2]-i*p;(p||m)&&X(e,a)&&(d+=m,f+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(l&&(o&&Math.abs(d)<1||!o&&s>d)||!l&&(o&&Math.abs(f)<1||!o&&-s>f))&&(u=!0),u}(h,t,e,"h"===h?c:u,!0)}),[]),u=i.useCallback((function(e){var n=e;if(re.length&&re[re.length-1]===s){var r="deltaY"in n?Q(n):J(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(a.current.shards||[]).map(ee).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?c(n,i[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=i.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:oe(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=i.useCallback((function(e){n.current=J(e),r.current=void 0}),[]),f=i.useCallback((function(t){l(t.type,Q(t),t.target,c(t,e.lockRef.current))}),[]),h=i.useCallback((function(t){l(t.type,J(t),t.target,c(t,e.lockRef.current))}),[]);i.useEffect((function(){return re.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,G),document.addEventListener("touchmove",u,G),document.addEventListener("touchstart",d,G),function(){re=re.filter((function(e){return e!==s})),document.removeEventListener("wheel",u,G),document.removeEventListener("touchmove",u,G),document.removeEventListener("touchstart",d,G)}}),[]);var p=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(s,{styles:te(o)}):null,p?i.createElement(Z,{gapMode:e.gapMode}):null)},A.useMedium(ie),M),ae=i.forwardRef((function(e,t){return i.createElement(O,(0,w.__assign)({},e,{ref:t,sideCar:se}))}));ae.classNames=O.classNames;var ce=ae;function ue(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r={};for(var o in e){var i=e[o],s=[...n,o];"string"===typeof i||"number"===typeof i||null==i?r[o]=t(i,s):"object"!==typeof i||Array.isArray(i)?console.warn('Skipping invalid key "'.concat(s.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"')):r[o]=le(i,t,s)}return r}function de(e,t){var n={};if("object"===typeof t){var r=e;le(t,((e,t)=>{if(null!=e){var o=function(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}(r,t);n[ue(o)]=String(e)}}))}else{var o=e;for(var i in o){var s=o[i];null!=s&&(n[ue(i)]=s)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map((e=>"".concat(e,":").concat(this[e]))).join(";")},writable:!1}),n}var fe,he,pe=n(42238),me=n(39028),ge=n(92592),ye=n(15861),be=n(92219),ve=n(90935),we=n(25078),xe=n(13854),Ee=n(57858),_e=n(53516),ke=n(75276),Se=n(77777),Ie=n(40936),Ce=n(45775),Te=n(79578),Ae=n(3980),Pe=class extends ke.wR{constructor({chains:e,options:t}){const n={shimDisconnect:!1,...t};super({chains:e,options:n}),this.id="safe",this.name="Safe",this.ready=!("undefined"===typeof window)&&window?.parent!==window,(0,ke.Ko)(this,fe,void 0),(0,ke.Ko)(this,he,void 0),this.shimDisconnectKey=`${this.id}.shimDisconnect`;let r=Ie;"function"!==typeof Ie&&"function"===typeof Ie.default&&(r=Ie.default),(0,ke.qx)(this,he,new r(n))}async connect(){const e=await this.getProvider();if(!e)throw new Ee.N;e.on&&(e.on("accountsChanged",this.onAccountsChanged),e.on("chainChanged",this.onChainChanged),e.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const t=await this.getAccount(),n=await this.getChainId();return this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:t,chain:{id:n,unsupported:this.isChainUnsupported(n)}}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new Ee.N;const t=await e.request({method:"eth_accounts"});return(0,Ce.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new Ee.N;return(0,_e.J)(e.chainId)}async getProvider(){if(!(0,ke.ac)(this,fe)){const e=await(0,ke.ac)(this,he).safe.getInfo();if(!e)throw new Error("Could not load Safe information");(0,ke.qx)(this,fe,new Se.N(e,(0,ke.ac)(this,he)))}return(0,ke.ac)(this,fe)}async getWalletClient({chainId:e}={}){const t=await this.getProvider(),n=await this.getAccount(),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,Te.K)({account:n,chain:r,transport:(0,Ae.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;return!!(await this.getAccount())}catch{return!1}}onAccountsChanged(e){}onChainChanged(e){}onDisconnect(){this.emit("disconnect")}};fe=new WeakMap,he=new WeakMap;var Oe=function(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=a(e);return s((function(e,r){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){if(!t.defaultCondition)throw new Error("No default condition");return r(e,t.defaultCondition)}var o=Array.isArray(e)?n(e):e,i={};for(var s in o)null!=o[s]&&(i[s]=r(o[s],s));return i}),{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),je=a({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Me=p({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),Re={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},Be={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},Ne={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function Le({active:e,hover:t}){return["_12cbo8i3 ju367v8r",t&&Ne[t],Be[e]]}var Ue=(0,i.createContext)(null);function De(){var e;const t=(0,i.useContext)(Ue);return null!=(e=null==t?void 0:t.status)?e:null}function Fe(){const e=De(),{isConnected:t}=(0,m.mA)();return t?e&&("loading"===e||"unauthenticated"===e)?e:"connected":"disconnected"}function ze(){return"undefined"!==typeof navigator&&/android/i.test(navigator.userAgent)}function $e(){return"undefined"!==typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!==typeof navigator&&(/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)}function qe(){return ze()||$e()}var Ze={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},He=i.forwardRef((({as:e="div",className:t,testId:n,...r},o)=>{const s={},a={};for(const i in r)Me.properties.has(i)?s[i]=r[i]:a[i]=r[i];const c=(({reset:e,...t})=>{if(!e)return Me(t);const n=Ze[e],r=Me(t);return y("iekbcc0",n,r)})({reset:"string"===typeof e?e:"div",...s});return i.createElement(e,{className:y(c,t),...a,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})}));He.displayName="Box";var We=new Map,Ge=new Map;async function Ke(e){const t=Ge.get(e);if(t)return t;const n=async()=>e().then((async t=>(We.set(e,t),t))),r=n().catch((t=>n().catch((t=>{Ge.delete(e)}))));return Ge.set(e,r),r}async function Ve(...e){return await Promise.all(e.map((e=>"function"===typeof e?Ke(e):e)))}function Xe(e){const t="function"===typeof e?We.get(e):void 0,n=function(){const[,e]=(0,i.useReducer)((e=>e+1),0);return e}();return(0,i.useEffect)((()=>{"function"!==typeof e||t||Ke(e).then(n)}),[e,t,n]),"function"===typeof e?t:e}function Ye({alt:e,background:t,borderColor:n,borderRadius:r,boxShadow:o,height:s,src:a,width:c,testId:u}){const l=$e(),d=Xe(a),f=d&&/^http/.test(d),[h,p]=(0,i.useReducer)((()=>!0),!1);return i.createElement(He,{"aria-label":e,borderRadius:r,boxShadow:o,height:"string"===typeof s?s:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:"number"===typeof s?s:void 0,width:"number"===typeof c?c:void 0},width:"string"===typeof c?c:void 0,testId:u},i.createElement(He,{...f?{"aria-hidden":!0,as:"img",onLoad:p,src:d}:{backgroundSize:"cover"},height:"full",position:"absolute",...l?{WebkitUserSelect:"none"}:{},style:{touchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...f?{opacity:h?1:0}:{backgroundImage:d?`url(${d})`:void 0,backgroundRepeat:"no-repeat",opacity:d?1:0}},width:"full"}),n?i.createElement(He,{..."object"===typeof n&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var Je=({height:e=21,width:t=21})=>{const n=(e=>(0,i.useMemo)((()=>`${e}_${Math.round(1e9*Math.random())}`),[e]))("spinner");return i.createElement("svg",{className:"_1luule42",fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Loading"),i.createElement("clipPath",{id:n},i.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),i.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},i.createElement("div",{className:"_1luule43"})))},Qe=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],et=[{color:Qe[0],emoji:"\ud83c\udf36"},{color:Qe[1],emoji:"\ud83e\udd11"},{color:Qe[2],emoji:"\ud83d\udc19"},{color:Qe[3],emoji:"\ud83e\uded0"},{color:Qe[4],emoji:"\ud83d\udc33"},{color:Qe[0],emoji:"\ud83e\udd36"},{color:Qe[5],emoji:"\ud83c\udf32"},{color:Qe[6],emoji:"\ud83c\udf1e"},{color:Qe[7],emoji:"\ud83d\udc12"},{color:Qe[8],emoji:"\ud83d\udc35"},{color:Qe[9],emoji:"\ud83e\udd8a"},{color:Qe[10],emoji:"\ud83d\udc3c"},{color:Qe[11],emoji:"\ud83e\udd84"},{color:Qe[12],emoji:"\ud83d\udc37"},{color:Qe[13],emoji:"\ud83d\udc27"},{color:Qe[8],emoji:"\ud83e\udda9"},{color:Qe[14],emoji:"\ud83d\udc7d"},{color:Qe[0],emoji:"\ud83c\udf88"},{color:Qe[8],emoji:"\ud83c\udf49"},{color:Qe[1],emoji:"\ud83c\udf89"},{color:Qe[15],emoji:"\ud83d\udc32"},{color:Qe[16],emoji:"\ud83c\udf0e"},{color:Qe[17],emoji:"\ud83c\udf4a"},{color:Qe[18],emoji:"\ud83d\udc2d"},{color:Qe[19],emoji:"\ud83c\udf63"},{color:Qe[1],emoji:"\ud83d\udc25"},{color:Qe[20],emoji:"\ud83d\udc7e"},{color:Qe[15],emoji:"\ud83e\udd66"},{color:Qe[0],emoji:"\ud83d\udc79"},{color:Qe[17],emoji:"\ud83d\ude40"},{color:Qe[4],emoji:"\u26f1"},{color:Qe[21],emoji:"\u26f5\ufe0f"},{color:Qe[17],emoji:"\ud83e\udd73"},{color:Qe[8],emoji:"\ud83e\udd2f"},{color:Qe[22],emoji:"\ud83e\udd20"}];var tt=({address:e,ensImage:t,size:n})=>{const[r,o]=(0,i.useState)(!1);(0,i.useEffect)((()=>{if(t){const e=new Image;e.src=t,e.onload=()=>o(!0)}}),[t]);const{color:s,emoji:a}=(0,i.useMemo)((()=>function(e){const t="string"===typeof e?e:"",n=Math.abs(function(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}(t.toLowerCase())%et.length);return et[null!=n?n:0]}(e)),[e]);return t?r?i.createElement(He,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${t})`,backgroundPosition:"center",height:n,width:n}}):i.createElement(He,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},i.createElement(Je,null)):i.createElement(He,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!t&&{backgroundColor:s},height:n,width:n}},a)},nt=(0,i.createContext)(tt);function rt({address:e,imageUrl:t,loading:n,size:r}){const o=(0,i.useContext)(nt);return i.createElement(He,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},i.createElement(He,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(.55*r)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},i.createElement(o,{address:e,ensImage:t,size:r})),n&&i.createElement(He,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},i.createElement(Je,{height:"100%",width:"100%"})))}var ot=()=>i.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Dropdown"),i.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),it="en",st="en",at=new class{constructor(e){this.listeners=new Set,this.defaultLocale=it,this.enableFallback=!1,this.locale=st,this.cachedLocales=[],this.translations={};for(const[t,n]of Object.entries(e))this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(n,t)}}missingMessage(e){return`[missing: "${this.locale}.${e}" translation]`}flattenTranslation(e,t){const n={},r=(e,t)=>{for(const o of Object.keys(e)){const i=`${t}.${o}`,s=e[o];"object"===typeof s&&null!==s?r(s,i):n[i]=s}};return r(e,t),n}translateWithReplacements(e,t={}){let n=e;for(const r in t){const e=t[r];n=n.replace(`%{${r}}`,e)}return n}t(e,t){const n=`${this.locale}.${e}`,r=this.translations[n];if(!r){if(this.enableFallback){const n=`${this.defaultLocale}.${e}`,r=this.translations[n];if(r)return this.translateWithReplacements(r,t)}return this.missingMessage(e)}return this.translateWithReplacements(r,t)}isLocaleCached(e){return this.cachedLocales.includes(e)}updateLocale(e){this.locale=e,this.notifyListeners()}setTranslations(e,t){this.isLocaleCached(e)||(this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(t,e)}),this.locale=e,this.notifyListeners()}notifyListeners(){for(const e of this.listeners)e()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}}({en:JSON.parse(o.I),"en-US":JSON.parse(o.I)});at.defaultLocale="en-US",at.locale="en-US",at.enableFallback=!0;async function ct(e){if(at.isLocaleCached(e))return void at.updateLocale(e);const t=await(async e=>{switch(e){case"ar":case"ar-AR":return(await n.e(5953).then(n.bind(n,55953))).default;case"en":case"en-US":default:return(await n.e(4680).then(n.bind(n,64680))).default;case"es":case"es-419":return(await n.e(3437).then(n.bind(n,53437))).default;case"fr":case"fr-FR":return(await n.e(653).then(n.bind(n,80653))).default;case"hi":case"hi-IN":return(await n.e(4963).then(n.bind(n,84963))).default;case"id":case"id-ID":return(await n.e(9813).then(n.bind(n,69813))).default;case"ja":case"ja-JP":return(await n.e(1520).then(n.bind(n,51520))).default;case"ko":case"ko-KR":return(await n.e(2296).then(n.bind(n,62296))).default;case"pt":case"pt-BR":return(await n.e(2755).then(n.bind(n,82755))).default;case"ru":case"ru-RU":return(await n.e(5133).then(n.bind(n,95133))).default;case"th":case"th-TH":return(await n.e(6981).then(n.bind(n,96981))).default;case"tr":case"tr-TR":return(await n.e(6548).then(n.bind(n,36548))).default;case"ua":case"uk-UA":return(await n.e(314).then(n.bind(n,50314))).default;case"zh":case"zh-CN":return(await n.e(1719).then(n.bind(n,51719))).default}})(e);at.setTranslations(e,JSON.parse(t))}var ut=(0,i.createContext)({i18n:at}),lt=({children:e,locale:t})=>{const[n,r]=(0,i.useState)(0),o=(0,i.useMemo)((()=>(()=>{var e;if("undefined"!==typeof window&&"undefined"!==typeof navigator){if(null==(e=navigator.languages)?void 0:e.length)return navigator.languages[0];if(navigator.language)return navigator.language}})()),[]);(0,i.useEffect)((()=>at.onChange((()=>{r((e=>e+1))}))),[]),(0,i.useEffect)((()=>{t&&t!==at.locale?ct(t):!t&&o&&o!==at.locale&&ct(o)}),[t,o]);const s=(0,i.useMemo)((()=>({t:(e,t)=>at.t(e,t),i18n:at})),[n]);return i.createElement(ut.Provider,{value:s},e)};function dt(e){return null!=e}var ft={iconBackground:"#96bedc",iconUrl:async()=>(await n.e(1727).then(n.bind(n,1727))).default},ht={iconBackground:"#e84141",iconUrl:async()=>(await n.e(8905).then(n.bind(n,36237))).default},pt={iconBackground:"#0052ff",iconUrl:async()=>(await n.e(1711).then(n.bind(n,41711))).default},mt={iconBackground:"#ebac0e",iconUrl:async()=>(await n.e(4253).then(n.bind(n,84253))).default},gt={iconBackground:"#002D74",iconUrl:async()=>(await n.e(5939).then(n.bind(n,95939))).default},yt={iconBackground:"#484c50",iconUrl:async()=>(await n.e(5488).then(n.bind(n,85488))).default},bt={iconBackground:"#f9f7ec",iconUrl:async()=>(await n.e(6253).then(n.bind(n,26253))).default},vt={iconBackground:"#ff5a57",iconUrl:async()=>(await n.e(704).then(n.bind(n,60704))).default},wt={iconBackground:"#9f71ec",iconUrl:async()=>(await n.e(8881).then(n.bind(n,48881))).default},xt={iconBackground:"#f9f7ec",iconUrl:async()=>(await n.e(135).then(n.bind(n,70135))).default},Et={iconBackground:"#f9f7ec",iconUrl:async()=>(await n.e(4583).then(n.bind(n,94583))).default},_t={iconBackground:"#000000",iconUrl:async()=>(await n.e(5119).then(n.bind(n,65119))).default},kt={arbitrum:{chainId:42161,name:"Arbitrum",...ft},arbitrumGoerli:{chainId:421613,...ft},arbitrumSepolia:{chainId:421614,...ft},avalanche:{chainId:43114,...ht},avalancheFuji:{chainId:43113,...ht},base:{chainId:8453,name:"Base",...pt},baseGoerli:{chainId:84531,...pt},baseSepolia:{chainId:84532,...pt},bsc:{chainId:56,name:"BSC",...mt},bscTestnet:{chainId:97,...mt},cronos:{chainId:25,...gt},cronosTestnet:{chainId:338,...gt},goerli:{chainId:5,...yt},hardhat:{chainId:31337,...bt},holesky:{chainId:17e3,...yt},kovan:{chainId:42,...yt},localhost:{chainId:1337,...yt},mainnet:{chainId:1,name:"Ethereum",...yt},optimism:{chainId:10,name:"Optimism",...vt},optimismGoerli:{chainId:420,...vt},optimismKovan:{chainId:69,...vt},optimismSepolia:{chainId:11155420,...vt},polygon:{chainId:137,name:"Polygon",...wt},polygonMumbai:{chainId:80001,...wt},rinkeby:{chainId:4,...yt},ropsten:{chainId:3,...yt},sepolia:{chainId:11155111,...yt},xdc:{chainId:50,name:"XinFin",...xt},xdcTestnet:{chainId:51,...xt},zkSync:{chainId:324,name:"zkSync",...Et},zkSyncTestnet:{chainId:280,...Et},zora:{chainId:7777777,name:"Zora",..._t},zoraSepolia:{chainId:999999999,..._t},zoraTestnet:{chainId:999,..._t}},St=Object.fromEntries(Object.values(kt).filter(dt).map((({chainId:e,...t})=>[e,t]))),It=e=>e.map((e=>{var t,n,r,o;const i=null!=(t=St[e.id])?t:{};return{...e,name:null!=(n=i.name)?n:e.name,iconUrl:null!=(r=e.iconUrl)?r:i.iconUrl,iconBackground:null!=(o=e.iconBackground)?o:i.iconBackground}})),Ct=(0,i.createContext)({chains:[]});function Tt({chains:e,children:t,initialChain:n}){return i.createElement(Ct.Provider,{value:(0,i.useMemo)((()=>({chains:It(e),initialChainId:"number"===typeof n?n:null==n?void 0:n.id})),[e,n])},t)}var At=()=>(0,i.useContext)(Ct).chains,Pt=(0,i.createContext)({showBalance:void 0,setShowBalance:()=>{}});function Ot({children:e}){const[t,n]=(0,i.useState)();return i.createElement(Pt.Provider,{value:{showBalance:t,setShowBalance:n}},e)}var jt=()=>(0,i.useContext)(Pt);function Mt(){const[e,t]=(0,i.useState)(!1);return(0,i.useEffect)((()=>(t(!0),()=>{t(!1)})),[]),(0,i.useCallback)((()=>e),[e])}function Rt(){const e=b.R.id,t=(0,m.t_)(),n=Array.isArray(t.chains)?t.chains:[],r=null==n?void 0:n.some((t=>(null==t?void 0:t.id)===e));return{chainId:e,enabled:r}}function Bt(e){const{chainId:t,enabled:n}=Rt(),{data:r}=(0,m.c9)({chainId:t,enabled:n,name:e});return r}function Nt(e){const{chainId:t,enabled:n}=Rt(),{data:r}=(0,m.F6)({address:e,chainId:t,enabled:n});return r}function Lt(){var e;const{chain:t}=(0,m.LN)();return null!=(e=null==t?void 0:t.id)?e:null}var Ut="rk-transactions";function Dt(){return function(e){try{const t=e?JSON.parse(e):{};return"object"===typeof t?t:{}}catch{return{}}}("undefined"!==typeof localStorage?localStorage.getItem(Ut):null)}var Ft,zt=/^0x([A-Fa-f0-9]{64})$/;function $t({provider:e}){let t=Dt(),n=e;const r=new Set,o=new Map;function i(e,n){var r,o;return null!=(o=null==(r=t[e])?void 0:r[n])?o:[]}function s(e,t,n,r){c(e,t,(e=>e.map((e=>e.hash===n?{...e,status:r}:e))))}async function a(e,t){await Promise.all(i(e,t).filter((e=>"pending"===e.status)).map((async r=>{const{confirmations:i,hash:a}=r,c=o.get(a);if(c)return await c;const u=n.waitForTransactionReceipt({confirmations:i,hash:a,timeout:3e5}).then((({status:n})=>{o.delete(a),void 0!==n&&s(e,t,a,0===n||"reverted"===n?"failed":"confirmed")})).catch((()=>{s(e,t,a,"failed")}));return o.set(a,u),await u})))}function c(e,n,o){var i,s;t=Dt(),t[e]=null!=(i=t[e])?i:{};let c=0;const u=o(null!=(s=t[e][n])?s:[]).filter((({status:e})=>"pending"===e||c++<=10));t[e][n]=u.length>0?u:void 0,localStorage.setItem(Ut,JSON.stringify(t)),function(){for(const e of r)e()}(),a(e,n)}return{addTransaction:function(e,t,n){const r=function(e){const t=[];return zt.test(e.hash)||t.push("Invalid transaction hash"),"string"!==typeof e.description&&t.push("Transaction must have a description"),"undefined"!==typeof e.confirmations&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}(n);if(r.length>0)throw new Error(["Unable to add transaction",...r].join("\n"));c(e,t,(e=>[{...n,status:"pending"},...e.filter((({hash:e})=>e!==n.hash))]))},clearTransactions:function(e,t){c(e,t,(()=>[]))},getTransactions:i,onChange:function(e){return r.add(e),()=>{r.delete(e)}},setProvider:function(e){n=e},waitForPendingTransactions:a}}var qt=(0,i.createContext)(null);function Zt({children:e}){const t=(0,m.t_)(),{address:n}=(0,m.mA)(),r=Lt(),[o]=(0,i.useState)((()=>null!=Ft?Ft:Ft=$t({provider:t})));return(0,i.useEffect)((()=>{o.setProvider(t)}),[o,t]),(0,i.useEffect)((()=>{n&&r&&o.waitForPendingTransactions(n,r)}),[o,n,r]),i.createElement(qt.Provider,{value:o},e)}function Ht(){const e=(0,i.useContext)(qt);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function Wt(){const e=Ht(),{address:t}=(0,m.mA)(),n=Lt(),[r,o]=(0,i.useState)((()=>e&&t&&n?e.getTransactions(t,n):[]));return(0,i.useEffect)((()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange((()=>{o(e.getTransactions(t,n))}))}),[e,t,n]),r}var Gt=e=>"function"===typeof e?e():e;function Kt(e,t={}){return Object.entries(function(e,{extends:t}={}){const n={...de(Re,Gt(e))};if(!t)return n;const r=de(Re,Gt(t));return Object.fromEntries(Object.entries(n).filter((([e,t])=>t!==r[e])))}(e,t)).map((([e,t])=>`${e}:${t.replace(/[:;{}</>]/g,"")};`)).join("")}var Vt={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},Xt=(0,i.createContext)(Vt),Yt=(0,i.createContext)(!1);var Jt=()=>{const[e,t]=(0,i.useState)({height:void 0,width:void 0});return(0,i.useEffect)((()=>{const e=function(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout((()=>{n=null,e()}),t)}}((()=>{t({height:window.innerHeight,width:window.innerWidth})}),500);return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e},Qt=(0,i.createContext)({connector:null,setConnector:()=>{}});function en({children:e}){const[t,n]=(0,i.useState)(null);return i.createElement(Qt.Provider,{value:(0,i.useMemo)((()=>({connector:t,setConnector:n})),[t])},e)}var tn="compact",nn="wide",rn=(0,i.createContext)(nn);function on({children:e,modalSize:t}){const{width:n}=Jt(),r=n&&n<768,{connector:o}=(0,i.useContext)(Qt);return i.createElement(rn.Provider,{value:r||o?tn:t},e)}var sn=(0,i.createContext)(!1);function an(){const e=(0,i.useCallback)((()=>{!function({version:e}){localStorage.setItem("rk-version",e)}({version:"1.3.7"})}),[]);(0,i.useEffect)((()=>{e()}),[e])}function cn(){return"undefined"!==typeof navigator&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function un(){var e;if("undefined"===typeof navigator)return"Browser";const t=navigator.userAgent.toLowerCase();return(null==(e=navigator.brave)?void 0:e.isBrave)?"Brave":t.indexOf("edg/")>-1?"Edge":t.indexOf("op")>-1?"Opera":"undefined"!==typeof document&&""!==getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")?"Arc":t.indexOf("chrome")>-1?"Chrome":t.indexOf("firefox")>-1?"Firefox":cn()?"Safari":"Browser"}var ln=(0,pe.UAParser)(),{os:dn}=ln;function fn(){return"Windows"===dn.name?"Windows":"Mac OS"===dn.name?"macOS":["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(dn.name)?"Linux":"Desktop"}var hn=e=>{var t,n,r,o,i,s,a,c,u,l,d,f;const h=un();return null!=(f={Arc:null==(t=null==e?void 0:e.downloadUrls)?void 0:t.chrome,Brave:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.chrome,Chrome:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.chrome,Edge:(null==(o=null==e?void 0:e.downloadUrls)?void 0:o.edge)||(null==(i=null==e?void 0:e.downloadUrls)?void 0:i.chrome),Firefox:null==(s=null==e?void 0:e.downloadUrls)?void 0:s.firefox,Opera:(null==(a=null==e?void 0:e.downloadUrls)?void 0:a.opera)||(null==(c=null==e?void 0:e.downloadUrls)?void 0:c.chrome),Safari:null==(u=null==e?void 0:e.downloadUrls)?void 0:u.safari,Browser:null==(l=null==e?void 0:e.downloadUrls)?void 0:l.browserExtension}[h])?f:null==(d=null==e?void 0:e.downloadUrls)?void 0:d.browserExtension},pn=e=>{var t,n,r,o;return null!=(o=$e()?null==(t=null==e?void 0:e.downloadUrls)?void 0:t.ios:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.android)?o:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.mobile},mn=e=>{var t,n,r,o,i,s;const a=fn();return null!=(s={Windows:null==(t=null==e?void 0:e.downloadUrls)?void 0:t.windows,macOS:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.macos,Linux:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.linux,Desktop:null==(o=null==e?void 0:e.downloadUrls)?void 0:o.desktop}[a])?s:null==(i=null==e?void 0:e.downloadUrls)?void 0:i.desktop},gn="rk-recent";function yn(){return"undefined"!==typeof localStorage?function(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}}(localStorage.getItem(gn)):[]}function bn(e){const t=(n=[e,...yn()],[...new Set(n)]);var n;localStorage.setItem(gn,JSON.stringify(t))}function vn(){var e;const t=At(),n=(0,i.useContext)(Ct).initialChainId,{connectAsync:r,connectors:o}=(0,m.$4)();async function s(e,o){var i,s,a;const c=await o.getChainId(),u=await r({chainId:null!=(a=null!=n?n:null==(i=t.find((({id:e})=>e===c)))?void 0:i.id)?a:null==(s=t[0])?void 0:s.id,connector:o});return u&&bn(e),u}async function a(e,t){try{return await s(e,t)}catch(Co){if(!("UserRejectedRequestError"===Co.name||"Connection request reset. Please try again."===Co.message))throw Co}}const c=function(e){const t=[];for(const n of e)t.push(...n);return t}(o.map((e=>{var t;return null!=(t=e._wallets)?t:[]}))).sort(((e,t)=>e.index-t.index)),u=function(e,t){const n={};for(const r of e){const e=t(r);e&&(n[e]=r)}return n}(c,(e=>e.id)),l=yn().map((e=>u[e])).filter(dt).slice(0,3),d=[...l,...c.filter((e=>!l.includes(e)))],f=[];for(const i of d){if(!i)continue;const t=l.includes(i);f.push({...i,connect:()=>i.connector.showQrModal?a(i.id,i.connector):s(i.id,i.connector),desktopDownloadUrl:mn(i),extensionDownloadUrl:hn(i),groupName:i.groupName,mobileDownloadUrl:pn(i),onConnecting:e=>i.connector.on("message",(({type:t})=>"connecting"===t?e():void 0)),ready:(null==(e=i.installed)||e)&&i.connector.ready,recent:t,showWalletConnectModal:i.walletConnectModalConnector?()=>a(i.id,i.walletConnectModalConnector):void 0})}return f}var wn=async()=>(await n.e(794).then(n.bind(n,20794))).default,xn=()=>i.createElement(Ye,{background:"#d0d5de",borderRadius:"10",height:"48",src:wn,width:"48"}),En=async()=>(await n.e(3200).then(n.bind(n,3200))).default,_n=()=>i.createElement(Ye,{background:"#d0d5de",borderRadius:"10",height:"48",src:En,width:"48"}),kn=i.forwardRef((({as:e="div",children:t,className:n,color:r,display:o,font:s="body",id:a,size:c="16",style:u,tabIndex:l,textAlign:d="inherit",weight:f="regular",testId:h},p)=>i.createElement(He,{as:e,className:n,color:r,display:o,fontFamily:s,fontSize:c,fontWeight:f,id:a,ref:p,style:u,tabIndex:l,textAlign:d,testId:h},t)));kn.displayName="Text";var Sn={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function In({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:s="medium",target:a="_blank",testId:c,type:u="primary"}){const l="primary"===u,d="large"!==s,f=qe(),h=e?"actionButtonSecondaryBackground":l?"accentColor":d?"actionButtonSecondaryBackground":null,{fontSize:p,height:m,paddingX:g,paddingY:y}=Sn[s],b=!f||!d;return i.createElement(He,{...t?e?{}:{as:"a",href:t,rel:o,target:a}:{as:"button",type:"button"},onClick:e?void 0:r,...b?{borderColor:!f||d||l?"actionButtonBorder":"actionButtonBorderMobile",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&Le({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:g,paddingY:y,style:{willChange:"transform"},testId:c,textAlign:"center",transition:"transform",...h?{background:h}:{},...m?{height:m}:{}},i.createElement(kn,{color:e?"modalTextSecondary":l?"accentColorForeground":"accentColor",size:p,weight:"bold"},n))}var Cn=()=>qe()?i.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Close"),i.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):i.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Close"),i.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),Tn=({"aria-label":e="Close",onClose:t})=>{const n=qe();return i.createElement(He,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:Le({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},i.createElement(Cn,null))},An=async()=>(await n.e(2898).then(n.bind(n,92898))).default;function Pn({onClose:e,onCloseModal:t}){const{i18n:n}=(0,i.useContext)(ut),[{status:r,...o},s]=i.useState({status:"idle"}),a=function(){var e;const{adapter:t}=null!=(e=(0,i.useContext)(Ue))?e:{};if(!t)throw new Error("No authentication adapter found");return t}(),c=(0,i.useCallback)((async()=>{try{const e=await a.getNonce();s((t=>({...t,nonce:e})))}catch{s((e=>({...e,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"})))}}),[a,n.t]),u=(0,i.useRef)(!1);i.useEffect((()=>{u.current||(u.current=!0,c())}),[c]);const l=qe(),{address:d}=(0,m.mA)(),{chain:f}=(0,m.LN)(),{signMessageAsync:h}=(0,m.QW)();return i.createElement(He,{position:"relative"},i.createElement(He,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},i.createElement(Tn,{onClose:e})),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:l?"60px":"36px"}},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"6":"4",style:{maxWidth:l?320:280}},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"16"},i.createElement(Ye,{height:40,src:An,width:40}),i.createElement(kn,{color:"modalText",size:l?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"16":"12"},i.createElement(kn,{color:"modalTextSecondary",size:l?"16":"14",textAlign:"center"},n.t("sign_in.description")),"idle"===r&&o.errorMessage?i.createElement(kn,{color:"error",size:l?"16":"14",textAlign:"center",weight:"bold"},o.errorMessage):null)),i.createElement(He,{alignItems:l?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},i.createElement(In,{disabled:!o.nonce||"signing"===r||"verifying"===r,label:o.nonce?"signing"===r?n.t("sign_in.signature.waiting"):"verifying"===r?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:async()=>{try{const r=null==f?void 0:f.id,{nonce:i}=o;if(!d||!r||!i)return;s((e=>({...e,errorMessage:void 0,status:"signing"})));const c=a.createMessage({address:d,chainId:r,nonce:i});let u;try{u=await h({message:a.getMessageBody({message:c})})}catch(e){return e instanceof me.ab?s((e=>({...e,status:"idle"}))):s((e=>({...e,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"})))}s((e=>({...e,status:"verifying"})));try{if(await a.verify({message:c,signature:u}))return void t();throw new Error}catch{return s((e=>({...e,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"})))}}catch{s({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}},size:l?"large":"medium",testId:"auth-message-button"}),l?i.createElement(In,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):i.createElement(He,{as:"button",borderRadius:"full",className:Le({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},i.createElement(kn,{color:"closeButton",size:l?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function On(){const e=At(),t=vn(),n="unauthenticated"===De(),r=(0,i.useCallback)((()=>{Ve(...t.map((e=>e.iconUrl)),...e.map((e=>e.iconUrl)).filter(dt)),qe()||(Ve(wn),Ve(En)),n&&Ve(An)}),[t,e,n]);(0,i.useEffect)((()=>{r()}),[r])}var jn="WALLETCONNECT_DEEPLINK_CHOICE";function Mn(){localStorage.removeItem(jn)}var Rn=(0,i.createContext)(void 0),Bn="data-rk",Nn=e=>({[Bn]:e||""}),Ln=(0,r.W)();function Un({appInfo:e,avatar:t,chains:n,children:r,coolMode:o=!1,id:s,initialChain:a,locale:c,modalSize:u=nn,showRecentTransactions:l=!1,theme:d=Ln}){if(On(),an(),(0,m.mA)({onDisconnect:Mn}),"function"===typeof d)throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const f=(e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[data-rk="${e}"]`:"[data-rk]"})(s),h={...Vt,...e},p=null!=t?t:tt;return i.createElement(Tt,{chains:n,initialChain:a},i.createElement(en,null,i.createElement(lt,{locale:c},i.createElement(Yt.Provider,{value:o},i.createElement(on,{modalSize:u},i.createElement(sn.Provider,{value:l},i.createElement(Zt,null,i.createElement(nt.Provider,{value:p},i.createElement(Xt.Provider,{value:h},i.createElement(Rn.Provider,{value:s},i.createElement(Ot,null,i.createElement(no,null,d?i.createElement("div",{...Nn(s)},i.createElement("style",{dangerouslySetInnerHTML:{__html:[`${f}{${Kt("lightMode"in d?d.lightMode:d)}}`,"darkMode"in d?`@media(prefers-color-scheme:dark){${f}{${Kt(d.darkMode,{extends:d.lightMode})}}}`:null].join("")}}),r):r))))))))))))}var Dn=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");0!==n.length&&n["end"===t?n.length-1:0].focus()};function Fn(e){const t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const e=document.activeElement;return()=>{var t;null==(t=e.focus)||t.call(e)}}),[]),(0,i.useEffect)((()=>{if(t.current){const e=t.current.querySelector("[data-auto-focus]");e?e.focus():t.current.focus()}}),[]),i.createElement(i.Fragment,null,i.createElement("div",{onFocus:(0,i.useCallback)((()=>t.current&&Dn(t.current,"end")),[]),tabIndex:0}),i.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),i.createElement("div",{onFocus:(0,i.useCallback)((()=>t.current&&Dn(t.current,"start")),[]),tabIndex:0}))}var zn=e=>e.stopPropagation();function $n({children:e,onClose:t,open:n,titleId:r}){(0,i.useEffect)((()=>{const e=e=>n&&"Escape"===e.key&&t();return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,t]);const[o,s]=(0,i.useState)(!0);(0,i.useEffect)((()=>{s("hidden"!==getComputedStyle(window.document.body).overflow)}),[]);const a=(0,i.useCallback)((()=>t()),[t]),c=(()=>{const e=(0,i.useContext)(Rn);return Nn(e)})(),u=qe();return i.createElement(i.Fragment,null,n?(0,v.createPortal)(i.createElement(ce,{enabled:o},i.createElement(He,{...c},i.createElement(He,{...c,alignItems:u?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:"_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",onClick:a,position:"fixed",role:"dialog"},i.createElement(Fn,{className:"_9pm4ki5 ju367va ju367v15 ju367v8r",onClick:zn,role:"document"},e)))),document.body):null)}var qn="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",Zn="_1ckjpok6 ju367vq";function Hn({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",paddingBottom:o,wide:s=!1}){const a=qe(),c=(0,i.useContext)(rn)===tn;return i.createElement(He,{marginTop:n},i.createElement(He,{className:[s?a?"_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r":c?"_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r":"_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r":qn,a?Zn:null,a&&e?"_1ckjpok7":null].join(" ")},i.createElement(He,{padding:r,paddingBottom:null!=o?o:r},t)))}var Wn=["k","m","b","t"];function Gn(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function Kn(e){if(e<1)return Gn(e,3);if(e<100)return Gn(e,2);if(e<1e4)return(new Intl.NumberFormat).format(parseFloat(Gn(e,1)));let t=String(e);for(let n=Wn.length-1;n>=0;n--){const r=10**(3*(n+1));if(r<=e){t=Gn(e=10*e/r/10,1)+Wn[n];break}}return t}function Vn(e){return e.length<8?e:`${e.substring(0,4)}\u2026${e.substring(e.length-4)}`}function Xn(e){const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var Yn=()=>i.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Copied"),i.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),Jn=()=>i.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Copy"),i.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),Qn=()=>i.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Disconnect"),i.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));var er=e=>{var t,n;return null==(n=null==(t=null==e?void 0:e.blockExplorers)?void 0:t.default)?void 0:n.url},tr=()=>i.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Link"),i.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),nr=()=>i.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Cancel"),i.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),rr=()=>i.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Success"),i.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"}));function or({tx:e}){const t=qe(),n=(e=>{switch(e){case"pending":default:return Je;case"confirmed":return rr;case"failed":return nr}})(e.status),r="failed"===e.status?"error":"accentColor",{chain:o}=(0,m.LN)(),s="confirmed"===e.status?"Confirmed":"failed"===e.status?"Failed":"Pending",a=er(o);return i.createElement(i.Fragment,null,i.createElement(He,{...a?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:Le({active:"shrink"}),href:`${a}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},i.createElement(He,{color:r},i.createElement(n,null)),i.createElement(He,{display:"flex",flexDirection:"column",gap:t?"3":"1"},i.createElement(He,null,i.createElement(kn,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},null==e?void 0:e.description)),i.createElement(He,null,i.createElement(kn,{color:"pending"===e.status?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},s)))),a&&i.createElement(He,{alignItems:"center",color:"modalTextDim",display:"flex"},i.createElement(tr,null))))}function ir({address:e}){const t=Wt(),n=function(){const e=Ht(),{address:t}=(0,m.mA)(),n=Lt();return(0,i.useCallback)((()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)}),[e,t,n])}(),{chain:r}=(0,m.LN)(),o=er(r),s=t.slice(0,3),a=s.length>0,c=qe(),{appName:u}=(0,i.useContext)(Xt),{i18n:l}=(0,i.useContext)(ut);return i.createElement(i.Fragment,null,i.createElement(He,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:c?"8":"18"},a&&i.createElement(He,{paddingBottom:c?"4":"0",paddingTop:"8",paddingX:c?"12":"6"},i.createElement(He,{display:"flex",justifyContent:"space-between"},i.createElement(kn,{color:"modalTextSecondary",size:c?"16":"14",weight:"semibold"},l.t("profile.transactions.recent.title")),i.createElement(He,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},i.createElement(He,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:Le({active:"shrink"}),onClick:n,paddingX:c?"8":"12",paddingY:c?"4":"5",transition:"default",type:"button"},i.createElement(kn,{color:"modalTextSecondary",size:c?"16":"14",weight:"semibold"},l.t("profile.transactions.clear.label")))))),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},a?s.map((e=>i.createElement(or,{key:e.hash,tx:e}))):i.createElement(i.Fragment,null,i.createElement(He,{padding:c?"12":"8"},i.createElement(kn,{color:"modalTextDim",size:c?"16":"14",weight:c?"medium":"bold"},u?l.t("profile.transactions.description",{appName:u}):l.t("profile.transactions.description_fallback"))),c&&i.createElement(He,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&i.createElement(He,{paddingBottom:"18",paddingX:c?"8":"18"},i.createElement(He,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:Le({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...c?{paddingLeft:"12"}:{}},i.createElement(kn,{color:"modalText",font:"body",size:c?"16":"14",weight:c?"semibold":"bold"},l.t("profile.explorer.label")),i.createElement(tr,null))))}function sr({action:e,icon:t,label:n,testId:r,url:o}){const s=qe();return i.createElement(He,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...s?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:Le({active:"shrinkSm",hover:s?void 0:"grow"}),display:"flex",onClick:e,padding:s?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},i.createElement(He,{color:"modalText",height:"max"},t),i.createElement(He,null,i.createElement(kn,{color:"modalText",size:s?"12":"13",weight:"semibold"},n))))}function ar({address:e,ensAvatar:t,ensName:n,onClose:r,onDisconnect:o}){const s=(0,i.useContext)(sn),{data:a}=(0,m.KQ)({address:e}),[c,u]=(0,i.useState)(!1),l=(0,i.useCallback)((()=>{e&&(navigator.clipboard.writeText(e),u(!0))}),[e]);if((0,i.useEffect)((()=>{if(c){const e=setTimeout((()=>{u(!1)}),1500);return()=>clearTimeout(e)}}),[c]),!e)return null;const d=n?Xn(n):Vn(e),f=null==a?void 0:a.formatted,h=f?Kn(parseFloat(f)):void 0,p="rk_profile_title",g=qe(),{i18n:y}=(0,i.useContext)(ut);return i.createElement(i.Fragment,null,i.createElement(He,{display:"flex",flexDirection:"column"},i.createElement(He,{background:"profileForeground",padding:"16"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:g?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},i.createElement(He,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},i.createElement(Tn,{onClose:r}))," ",i.createElement(He,{marginTop:g?"24":"0"},i.createElement(rt,{address:e,imageUrl:t,size:g?82:74})),i.createElement(He,{display:"flex",flexDirection:"column",gap:g?"4":"0",textAlign:"center"},i.createElement(He,{textAlign:"center"},i.createElement(kn,{as:"h1",color:"modalText",id:p,size:g?"20":"18",weight:"heavy"},d)),a&&i.createElement(He,{textAlign:"center"},i.createElement(kn,{as:"h1",color:"modalTextSecondary",id:p,size:g?"16":"14",weight:"semibold"},h," ",a.symbol)))),i.createElement(He,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},i.createElement(sr,{action:l,icon:c?i.createElement(Yn,null):i.createElement(Jn,null),label:c?y.t("profile.copy_address.copied"):y.t("profile.copy_address.label")}),i.createElement(sr,{action:o,icon:i.createElement(Qn,null),label:y.t("profile.disconnect.label"),testId:"disconnect-button"}))),s&&i.createElement(i.Fragment,null,i.createElement(He,{background:"generalBorder",height:"1",marginTop:"-1"}),i.createElement(He,null,i.createElement(ir,{address:e})))))}function cr({onClose:e,open:t}){const{address:n}=(0,m.mA)(),r=Nt(n),o=Bt(r),{disconnect:s}=(0,m.qL)();if(!n)return null;return i.createElement(i.Fragment,null,n&&i.createElement($n,{onClose:e,open:t,titleId:"rk_account_modal_title"},i.createElement(Hn,{bottomSheetOnMobile:!0,padding:"0"},i.createElement(ar,{address:n,ensAvatar:o,ensName:r,onClose:e,onDisconnect:s}))))}var ur=({size:e})=>i.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Disconnect"),i.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),lr=i.forwardRef((({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},s)=>{const a=qe();return i.createElement(He,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:s,testId:r,type:"button"},i.createElement(He,{borderRadius:"menuButton",className:[a?"v9horb0":void 0,!t&&Le({active:"shrink"})],padding:a?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))}));lr.displayName="MenuButton";function dr({onClose:e,open:t}){var n;const{chain:r}=(0,m.LN)(),{chains:o,pendingChainId:s,reset:a,switchNetwork:c}=(0,m.g0)({onSettled:()=>{a(),e()}}),{i18n:u}=(0,i.useContext)(ut),{disconnect:l}=(0,m.qL)(),d="rk_chain_modal_title",f=qe(),h=null!=(n=null==r?void 0:r.unsupported)&&n,p=f?"36":"28",{appName:g}=(0,i.useContext)(Xt),y=At();return r&&(null==r?void 0:r.id)?i.createElement($n,{onClose:e,open:t,titleId:d},i.createElement(Hn,{bottomSheetOnMobile:!0,paddingBottom:"0"},i.createElement(He,{display:"flex",flexDirection:"column",gap:"14"},i.createElement(He,{display:"flex",flexDirection:"row",justifyContent:"space-between"},f&&i.createElement(He,{width:"30"}),i.createElement(He,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},i.createElement(kn,{as:"h1",color:"modalText",id:d,size:f?"20":"18",weight:"heavy"},u.t("chains.title"))),i.createElement(Tn,{onClose:e})),h&&i.createElement(He,{marginX:"8",textAlign:f?"center":"left"},i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},u.t("chains.wrong_network"))),i.createElement(He,{className:f?"_18dqw9x1":"_18dqw9x0",display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},c?y.map((({iconBackground:e,iconUrl:t,id:n,name:a},l)=>{const d=o.find((e=>e.id===n));if(!d)return null;const h=d.id===(null==r?void 0:r.id),m=!h&&d.id===s;return i.createElement(i.Fragment,{key:d.id},i.createElement(lr,{currentlySelected:h,onClick:h?void 0:()=>c(d.id),testId:`chain-option-${d.id}`},i.createElement(He,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:p},t&&i.createElement(He,{height:"full",marginRight:"8"},i.createElement(Ye,{alt:null!=a?a:d.name,background:e,borderRadius:"full",height:p,src:t,width:p,testId:`chain-option-${d.id}-icon`})),i.createElement("div",null,null!=a?a:d.name)),h&&i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},i.createElement(kn,{color:"accentColorForeground",size:"14",weight:"medium"},u.t("chains.connected")),i.createElement(He,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),m&&i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},i.createElement(kn,{color:"modalText",size:"14",weight:"medium"},u.t("chains.confirm")),i.createElement(He,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),f&&l<y.length-1&&i.createElement(He,{background:"generalBorderDim",height:"1",marginX:"8"}))})):i.createElement(He,{background:"generalBorder",borderRadius:"menuButton",paddingX:"18",paddingY:"12"},i.createElement(kn,{color:"modalText",size:"14",weight:"medium"},g?u.t("chains.switching_not_supported",{appName:g}):u.t("chains.switching_not_supported_fallback"))),h&&i.createElement(i.Fragment,null,i.createElement(He,{background:"generalBorderDim",height:"1",marginX:"8"}),i.createElement(lr,{onClick:()=>l(),testId:"chain-option-disconnect"},i.createElement(He,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:p},i.createElement(He,{alignItems:"center",color:"error",height:p,justifyContent:"center",marginRight:"8"},i.createElement(ur,{size:Number(p)})),i.createElement("div",null,u.t("chains.disconnect"))))))))))):null}var fr="rk-latest-id";function hr(e){localStorage.setItem(fr,e)}var pr=({children:e,href:t})=>i.createElement(He,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),mr=({children:e})=>i.createElement(kn,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function gr({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=(0,i.useContext)(Xt),{i18n:o}=(0,i.useContext)(ut);return i.createElement(i.Fragment,null,i.createElement(He,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},i.createElement(He,{marginBottom:"10"},!e&&i.createElement(kn,{color:"modalText",size:"18",weight:"heavy"},o.t("intro.title"))),i.createElement(He,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},i.createElement(He,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},i.createElement(xn,null)),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},o.t("intro.digital_asset.title")),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.digital_asset.description")))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},i.createElement(He,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},i.createElement(_n,null)),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},o.t("intro.login.title")),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.login.description"))))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},i.createElement(In,{label:o.t("intro.get.label"),onClick:t}),i.createElement(He,{as:"a",className:Le({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},i.createElement(kn,{color:"accentColor",size:"14",weight:"bold"},o.t("intro.learn_more.label")))),n&&!e&&i.createElement(He,{marginBottom:"8",marginTop:"12",textAlign:"center"},i.createElement(n,{Link:pr,Text:mr}))))}var yr=()=>i.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Back"),i.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),br=()=>i.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},i.createElement("title",null,"Info"),i.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),vr=({"aria-label":e="Info",onClick:t})=>{const n=qe();return i.createElement(He,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:Le({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},i.createElement(br,null))},wr=e=>{const t=(0,i.useRef)(null),n=(0,i.useContext)(Yt),r=Xe(e);return(0,i.useEffect)((()=>{if(n&&t.current&&r)return function(e,t){xr++;const n=[15,20,25,35,45],r=35;let o=[],i=!1,s=0,a=0;const c=(()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n})();function u(){const e=n[Math.floor(Math.random()*n.length)],r=10*Math.random(),i=25*Math.random(),u=360*Math.random(),l=35*Math.random()*(Math.random()<=.5?-1:1),d=a-e/2,f=s-e/2,h=Math.random()<=.5?-1:1,p=document.createElement("div");p.innerHTML=`<img src="${t}" width="${e}" height="${e}" style="border-radius: 25%">`,p.setAttribute("style",["position:absolute","will-change:transform",`top:${d}px`,`left:${f}px`,`transform:rotate(${u}deg)`].join(";")),c.appendChild(p),o.push({direction:h,element:p,left:f,size:e,speedHorz:r,speedUp:i,spinSpeed:l,spinVal:u,top:d})}function l(){for(const e of o)e.left=e.left-e.speedHorz*e.direction,e.top=e.top-e.speedUp,e.speedUp=Math.min(e.size,e.speedUp-1),e.spinVal=e.spinVal+e.spinSpeed,e.top>=Math.max(window.innerHeight,document.body.clientHeight)+e.size&&(o=o.filter((t=>t!==e)),e.element.remove()),e.element.setAttribute("style",["position:absolute","will-change:transform",`top:${e.top}px`,`left:${e.left}px`,`transform:rotate(${e.spinVal}deg)`].join(";"))}let d;function f(){i&&o.length<r&&u(),l(),d=requestAnimationFrame(f)}f();const h="ontouchstart"in window||navigator.msMaxTouchPoints,p=h?"touchstart":"mousedown",m=h?"touchend":"mouseup",g=h?"touchmove":"mousemove",y=e=>{var t,n;"touches"in e?(s=null==(t=e.touches)?void 0:t[0].clientX,a=null==(n=e.touches)?void 0:n[0].clientY):(s=e.clientX,a=e.clientY)},b=e=>{y(e),i=!0},v=()=>{i=!1};return e.addEventListener(g,y,{passive:!1}),e.addEventListener(p,b),e.addEventListener(m,v),e.addEventListener("mouseleave",v),()=>{e.removeEventListener(g,y),e.removeEventListener(p,b),e.removeEventListener(m,v),e.removeEventListener("mouseleave",v);const t=setInterval((()=>{d&&0===o.length&&(cancelAnimationFrame(d),clearInterval(t),0===--xr&&c.remove())}),500)}}(t.current,r)}),[n,r]),t},xr=0;var Er=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:s,ready:a,recent:c,testId:u,...l})=>{const d=wr(r),[f,h]=(0,i.useState)(!1),{i18n:p}=(0,i.useContext)(ut);return i.createElement(He,{display:"flex",flexDirection:"column",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),ref:d},i.createElement(He,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:["g5kl0l0",Le({active:"shrink"})],disabled:t,onClick:s,padding:"5",style:{willChange:"transform"},testId:u,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...l},i.createElement(He,{color:t?"accentColorForeground":"modalText",disabled:!a,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},i.createElement(Ye,{background:n,...f?{}:{borderColor:"actionButtonBorder"},borderRadius:"6",height:"28",src:r,width:"28"}),i.createElement(He,null,i.createElement(He,{style:{marginTop:c?-2:void 0}},o),c&&i.createElement(kn,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},p.t("connect.recent")))))))};Er.displayName="ModalSelection";var _r=(e,t=1)=>{let n=e.replace("#","");3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);return t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`},kr=async()=>(await n.e(9600).then(n.bind(n,99600))).default,Sr=()=>i.createElement(Ye,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:kr,width:"48"}),Ir=async()=>(await n.e(8137).then(n.bind(n,68137))).default,Cr=()=>Ve(Ir),Tr=()=>i.createElement(Ye,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Ir,width:"48"}),Ar=async()=>(await n.e(1748).then(n.bind(n,31748))).default,Pr=()=>i.createElement(Ye,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Ar,width:"48"}),Or=async()=>(await n.e(5806).then(n.bind(n,75806))).default,jr=()=>Ve(Or),Mr=()=>i.createElement(Ye,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Or,width:"48"});function Rr({ecl:e="M",logoBackground:t,logoMargin:n=10,logoSize:r=50,logoUrl:o,size:s=200,uri:a}){const c=s-2*parseInt("20",10),u=(0,i.useMemo)((()=>{const t=[],n=((e,t)=>{const n=Array.prototype.slice.call(ge.create(e,{errorCorrectionLevel:t}).modules.data,0),r=Math.sqrt(n.length);return n.reduce(((e,t,n)=>(n%r===0?e.push([t]):e[e.length-1].push(t))&&e),[])})(a,e),o=c/n.length;[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach((({x:e,y:r})=>{const s=(n.length-7)*o*e,a=(n.length-7)*o*r;for(let n=0;n<3;n++)t.push(i.createElement("rect",{fill:n%2!==0?"white":"black",height:o*(7-2*n),key:`${n}-${e}-${r}`,rx:-5*(n-2)+(0===n?2:0),ry:-5*(n-2)+(0===n?2:0),width:o*(7-2*n),x:s+o*n,y:a+o*n}))}));const s=Math.floor((r+25)/o),u=n.length/2-s/2,l=n.length/2+s/2-1;return n.forEach(((e,r)=>{e.forEach(((e,s)=>{n[r][s]&&(r<7&&s<7||r>n.length-8&&s<7||r<7&&s>n.length-8||r>u&&r<l&&s>u&&s<l||t.push(i.createElement("circle",{cx:r*o+o/2,cy:s*o+o/2,fill:"black",key:`circle-${r}-${s}`,r:o/3})))}))})),t}),[e,r,c,a]),l=c/2-r/2,d=r+2*n;return i.createElement(He,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:"_1vwt0cg0",padding:"20",width:"max"},i.createElement(He,{style:{height:c,userSelect:"none",width:c},userSelect:"none"},i.createElement(He,{display:"flex",justifyContent:"center",position:"relative",style:{height:0,top:l,width:c},width:"full"},i.createElement(Ye,{background:t,borderColor:{custom:"rgba(0, 0, 0, 0.06)"},borderRadius:"13",height:r,src:o,width:r})),i.createElement("svg",{height:c,style:{all:"revert"},width:c},i.createElement("title",null,"QR Code"),i.createElement("defs",null,i.createElement("clipPath",{id:"clip-wrapper"},i.createElement("rect",{height:d,width:d})),i.createElement("clipPath",{id:"clip-logo"},i.createElement("rect",{height:r,width:r}))),i.createElement("rect",{fill:"transparent",height:c,width:c}),u)))}var Br=async()=>{switch(un()){case"Arc":return(await n.e(6328).then(n.bind(n,76328))).default;case"Brave":return(await n.e(6551).then(n.bind(n,86551))).default;case"Chrome":return(await n.e(7682).then(n.bind(n,57682))).default;case"Edge":return(await n.e(934).then(n.bind(n,60934))).default;case"Firefox":return(await n.e(9223).then(n.bind(n,99223))).default;case"Opera":return(await n.e(9941).then(n.bind(n,89941))).default;case"Safari":return(await n.e(2604).then(n.bind(n,62604))).default;default:return(await n.e(2746).then(n.bind(n,92746))).default}},Nr=async()=>{switch(fn()){case"Windows":return(await n.e(5710).then(n.bind(n,35710))).default;case"macOS":return(await n.e(8906).then(n.bind(n,8906))).default;default:return(await n.e(8366).then(n.bind(n,78366))).default}};function Lr({getWalletDownload:e,compactModeEnabled:t}){const n=vn().splice(0,5),{i18n:r}=(0,i.useContext)(ut);return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},null==n?void 0:n.filter((e=>{var t;return e.extensionDownloadUrl||e.desktopDownloadUrl||e.qrCode&&(null==(t=e.downloadUrls)?void 0:t.qrCode)})).map((t=>{const{downloadUrls:n,iconBackground:o,iconUrl:s,id:a,name:c,qrCode:u}=t,l=(null==n?void 0:n.qrCode)&&u,d=!!t.extensionDownloadUrl,f=(null==n?void 0:n.qrCode)&&d,h=(null==n?void 0:n.qrCode)&&!!t.desktopDownloadUrl;return i.createElement(He,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:t.id,width:"full"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},i.createElement(Ye,{background:o,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:s,width:"48"}),i.createElement(He,{display:"flex",flexDirection:"column",gap:"2"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},c),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},f?r.t("get.mobile_and_extension.description"):h?r.t("get.mobile_and_desktop.description"):l?r.t("get.mobile.description"):d?r.t("get.extension.description"):null))),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},i.createElement(In,{label:r.t("get.action.label"),onClick:()=>e(a),type:"secondary"})))}))),i.createElement(He,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},r.t("get.looking_for.title")),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},t?r.t("get.looking_for.desktop.compact_description"):r.t("get.looking_for.desktop.wide_description"))))}var Ur="44";function Dr({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:s,wallet:a}){var c;const{downloadUrls:u,iconBackground:l,iconUrl:d,name:f,qrCode:h,ready:p,showWalletConnectModal:m}=a,g=null==(c=a.desktop)?void 0:c.getUri,y=cn(),{i18n:b}=(0,i.useContext)(ut),v=!!a.extensionDownloadUrl,w=(null==u?void 0:u.qrCode)&&v,x=(null==u?void 0:u.qrCode)&&!!a.desktopDownloadUrl,E=h&&o,_=m?{description:t?b.t("connect.walletconnect.description.compact"):b.t("connect.walletconnect.description.full"),label:b.t("connect.walletconnect.open.label"),onClick:()=>{r(),m()}}:E?{description:b.t("connect.secondary_action.get.description",{wallet:f}),label:b.t("connect.secondary_action.get.label"),onClick:()=>e(w||x?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:k}=Jt(),S=k&&k<768;return(0,i.useEffect)((()=>{Ve(Br),Ve(Nr)}),[]),i.createElement(He,{display:"flex",flexDirection:"column",height:"full",width:"full"},E?i.createElement(He,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},i.createElement(Rr,{logoBackground:l,logoSize:t?60:72,logoUrl:d,size:t?318:S?Math.max(280,Math.min(k-308,382)):382,uri:o})):i.createElement(He,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},i.createElement(He,{borderRadius:"10",height:Ur,overflow:"hidden"},i.createElement(Ye,{height:Ur,src:d,width:Ur})),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},i.createElement(kn,{color:"modalText",size:"18",weight:"bold"},p?b.t("connect.status.opening",{wallet:f}):v?b.t("connect.status.not_installed",{wallet:f}):b.t("connect.status.not_available",{wallet:f})),!p&&v?i.createElement(He,{paddingTop:"20"},i.createElement(In,{href:a.extensionDownloadUrl,label:b.t("connect.secondary_action.install.label"),type:"secondary"})):null,p&&!E&&i.createElement(i.Fragment,null,i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},i.createElement(kn,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},b.t("connect.status.confirm"))),i.createElement(He,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?i.createElement(In,{label:b.t("connect.secondary_action.retry.label"),onClick:g?async()=>{const e=await g();window.open(e,y?"_blank":"_self")}:()=>{s(a)}}):i.createElement(He,{color:"modalTextSecondary"},i.createElement(Je,null))))))),i.createElement(He,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},p&&_&&i.createElement(i.Fragment,null,i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},_.description),i.createElement(In,{label:_.label,onClick:_.onClick,type:"secondary"}))))}var Fr=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:s,onAction:a,title:c,url:u,variant:l})=>{const d="browser"===l,f=!d&&n&&((h=n)?[_r(h,.2),_r(h,.14),_r(h,.1)]:null);var h;return i.createElement(He,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:s?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},i.createElement(He,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),d&&i.createElement(He,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},i.createElement(He,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},i.createElement(He,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},i.createElement(Ye,{borderRadius:"full",height:"200",src:o,width:"200"})),i.createElement(He,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},i.createElement(Ye,{borderRadius:"full",height:"200",src:o,width:"200"})))),!d&&f&&i.createElement(He,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},i.createElement(He,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[0]} 0%, ${f[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),i.createElement(He,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),i.createElement(He,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},i.createElement(He,null,i.createElement(Ye,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},c),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},t),i.createElement(He,{marginTop:"14",width:"max"},i.createElement(In,{href:u,label:e,onClick:a,size:"medium"})))))};function zr({changeWalletStep:e,wallet:t}){const n=un(),r=fn(),o="compact"===(0,i.useContext)(rn),{desktop:s,desktopDownloadUrl:a,extension:c,extensionDownloadUrl:u,mobileDownloadUrl:l}=t,{i18n:d}=(0,i.useContext)(ut);return(0,i.useEffect)((()=>{Cr(),jr(),Ve(Ar),Ve(kr)}),[]),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},u&&i.createElement(Fr,{actionLabel:d.t("get_options.extension.download.label",{browser:n}),description:d.t("get_options.extension.description"),iconUrl:Br,isCompact:o,onAction:()=>e((null==c?void 0:c.instructions)?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:d.t("get_options.extension.title",{wallet:t.name,browser:n}),url:u,variant:"browser"}),a&&i.createElement(Fr,{actionLabel:d.t("get_options.desktop.download.label",{platform:r}),description:d.t("get_options.desktop.description"),iconUrl:Nr,isCompact:o,onAction:()=>e((null==s?void 0:s.instructions)?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:d.t("get_options.desktop.title",{wallet:t.name,platform:r}),url:a,variant:"desktop"}),l&&i.createElement(Fr,{actionLabel:d.t("get_options.mobile.download.label",{wallet:t.name}),description:d.t("get_options.mobile.description"),iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:o,onAction:()=>{e("DOWNLOAD")},title:d.t("get_options.mobile.title",{wallet:t.name}),variant:"app"})))}function $r({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t,{i18n:o}=(0,i.useContext)(ut);return(0,i.useEffect)((()=>{Cr(),jr()}),[]),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},i.createElement(He,{style:{maxWidth:220,textAlign:"center"}},i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"semibold"},o.t("get_mobile.description"))),i.createElement(He,{height:"full"},(null==n?void 0:n.qrCode)?i.createElement(Rr,{logoSize:0,size:268,uri:n.qrCode}):null),i.createElement(He,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},i.createElement(In,{label:o.t("get_mobile.continue.label"),onClick:()=>e((null==r?void 0:r.instructions)?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var qr={connect:()=>i.createElement(Sr,null),create:()=>i.createElement(Tr,null),install:e=>i.createElement(Ye,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>i.createElement(Pr,null),scan:()=>i.createElement(Mr,null)};function Zr({connectWallet:e,wallet:t}){var n,r,o,s;const{i18n:a}=(0,i.useContext)(ut);return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},i.createElement(He,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(r=null==(n=null==t?void 0:t.qrCode)?void 0:n.instructions)?void 0:r.steps.map(((e,n)=>{var r;return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},i.createElement(He,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=qr[e.step])?void 0:r.call(qr,t)),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},a.t(e.title)),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t(e.description))))}))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},i.createElement(In,{label:a.t("get_instructions.mobile.connect.label"),onClick:()=>e(t)}),i.createElement(He,{as:"a",className:Le({active:"shrink",hover:"grow"}),display:"block",href:null==(s=null==(o=null==t?void 0:t.qrCode)?void 0:o.instructions)?void 0:s.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},i.createElement(kn,{color:"accentColor",size:"14",weight:"bold"},a.t("get_instructions.mobile.learn_more.label")))))}function Hr({wallet:e}){var t,n,r,o;const{i18n:s}=(0,i.useContext)(ut);return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},i.createElement(He,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(n=null==(t=null==e?void 0:e.extension)?void 0:t.instructions)?void 0:n.steps.map(((t,n)=>{var r;return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},i.createElement(He,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=qr[t.step])?void 0:r.call(qr,e)),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},s.t(t.title)),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},s.t(t.description))))}))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},i.createElement(In,{label:s.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),i.createElement(He,{as:"a",className:Le({active:"shrink",hover:"grow"}),display:"block",href:null==(o=null==(r=null==e?void 0:e.extension)?void 0:r.instructions)?void 0:o.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},i.createElement(kn,{color:"accentColor",size:"14",weight:"bold"},s.t("get_instructions.extension.learn_more.label")))))}function Wr({connectWallet:e,wallet:t}){var n,r,o,s;const{i18n:a}=(0,i.useContext)(ut);return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},i.createElement(He,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(r=null==(n=null==t?void 0:t.desktop)?void 0:n.instructions)?void 0:r.steps.map(((e,n)=>{var r;return i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},i.createElement(He,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=qr[e.step])?void 0:r.call(qr,t)),i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},i.createElement(kn,{color:"modalText",size:"14",weight:"bold"},a.t(e.title)),i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t(e.description))))}))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},i.createElement(In,{label:a.t("get_instructions.desktop.connect.label"),onClick:()=>e(t)}),i.createElement(He,{as:"a",className:Le({active:"shrink",hover:"grow"}),display:"block",href:null==(s=null==(o=null==t?void 0:t.desktop)?void 0:o.instructions)?void 0:s.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},i.createElement(kn,{color:"accentColor",size:"14",weight:"bold"},a.t("get_instructions.desktop.learn_more.label")))))}function Gr({onClose:e}){const t=cn(),[n,r]=(0,i.useState)(),[o,s]=(0,i.useState)(),[a,c]=(0,i.useState)(),u=!!(null==o?void 0:o.qrCode)&&a,[l,d]=(0,i.useState)(!1),f=(0,i.useContext)(rn)===tn,{disclaimer:h}=(0,i.useContext)(Xt),{i18n:p}=(0,i.useContext)(ut),m=(0,i.useRef)(!1),{connector:g}=(0,i.useContext)(Qt),y=vn().filter((e=>e.ready||!!e.extensionDownloadUrl)).sort(((e,t)=>e.groupIndex-t.groupIndex)),b=function(e,t){const n={};for(const r of e){const e=t(r);e&&(n[e]||(n[e]=[]),n[e].push(r))}return n}(y,(e=>e.groupName)),v=["Recommended","Other","Popular","More","Others"];(0,i.useEffect)((()=>{g&&!m.current&&(k("CONNECT"),x(g),m.current=!0)}),[g]);const w=e=>{var n,r,o;if(d(!1),e.ready){null==(r=null==(n=null==e?void 0:e.connect)?void 0:n.call(e))||r.catch((()=>{d(!0)}));const i=null==(o=e.desktop)?void 0:o.getUri;i&&setTimeout((async()=>{const e=await i();window.open(e,t?"_blank":"_self")}),0)}},x=e=>{var t;if(hr(e.id),w(e),r(e.id),e.ready){let n=!1;null==(t=null==e?void 0:e.onConnecting)||t.call(e,(async()=>{var t,r;if(n)return;n=!0;const o=y.find((t=>e.id===t.id)),i=await(null==(t=null==o?void 0:o.qrCode)?void 0:t.getUri());c(i),setTimeout((()=>{s(o),k("CONNECT")}),i?0:50);const a=await(null==o?void 0:o.connector.getProvider()),u=null==(r=null==a?void 0:a.signer)?void 0:r.connection;if((null==u?void 0:u.on)&&(null==u?void 0:u.off)){const t=()=>{n(),x(e)},n=()=>{u.off("close",t),u.off("open",n)};u.on("close",t),u.on("open",n)}}))}else s(e),k((null==e?void 0:e.extensionDownloadUrl)?"DOWNLOAD_OPTIONS":"CONNECT")},E=e=>{var t;r(e);const n=y.find((t=>e===t.id)),o=null==(t=null==n?void 0:n.downloadUrls)?void 0:t.qrCode,i=!!(null==n?void 0:n.desktopDownloadUrl),a=!!(null==n?void 0:n.extensionDownloadUrl);s(n),k(o&&(a||i)?"DOWNLOAD_OPTIONS":o?"DOWNLOAD":i?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},_=()=>{r(void 0),s(void 0),c(void 0)},k=(e,t=!1)=>{t&&"GET"===e&&"GET"===S?_():t||"GET"!==e?t||"CONNECT"!==e||I("CONNECT"):I("GET"),T(e)},[S,I]=(0,i.useState)("NONE"),[C,T]=(0,i.useState)("NONE");let A,P=null,O=null,j=null;(0,i.useEffect)((()=>{d(!1)}),[C,o]);const M=!(!!!(null==o?void 0:o.extensionDownloadUrl)||!(null==o?void 0:o.mobileDownloadUrl));switch(C){case"NONE":P=i.createElement(gr,{getWallet:()=>k("GET")});break;case"LEARN_COMPACT":P=i.createElement(gr,{compactModeEnabled:f,getWallet:()=>k("GET")}),O=p.t("intro.title"),j="NONE";break;case"GET":P=i.createElement(Lr,{getWalletDownload:E,compactModeEnabled:f}),O=p.t("get.title"),j=f?"LEARN_COMPACT":"NONE";break;case"CONNECT":P=o&&i.createElement(Dr,{changeWalletStep:k,compactModeEnabled:f,connectionError:l,onClose:e,qrCodeUri:a,reconnect:w,wallet:o}),O=u&&("WalletConnect"===o.name?p.t("connect_scan.fallback_title"):p.t("connect_scan.title",{wallet:o.name})),j=f?g?null:"NONE":null,A=f?g?()=>{}:_:()=>{};break;case"DOWNLOAD_OPTIONS":P=o&&i.createElement(zr,{changeWalletStep:k,wallet:o}),O=o&&p.t("get_options.short_title",{wallet:o.name}),j=g?"CONNECT":f?"NONE":null;break;case"DOWNLOAD":P=o&&i.createElement($r,{changeWalletStep:k,wallet:o}),O=o&&p.t("get_mobile.title",{wallet:o.name}),j=M?"DOWNLOAD_OPTIONS":S;break;case"INSTRUCTIONS_MOBILE":P=o&&i.createElement(Zr,{connectWallet:x,wallet:o}),O=o&&p.t("get_options.title",{wallet:f&&o.shortName||o.name}),j="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":P=o&&i.createElement(Hr,{wallet:o}),O=o&&p.t("get_options.title",{wallet:f&&o.shortName||o.name}),j="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":P=o&&i.createElement(Wr,{connectWallet:x,wallet:o}),O=o&&p.t("get_options.title",{wallet:f&&o.shortName||o.name}),j="DOWNLOAD_OPTIONS"}return i.createElement(He,{display:"flex",flexDirection:"row",style:{maxHeight:f?468:504}},(!f||"NONE"===C)&&i.createElement(He,{className:f?"_1vwt0cg4":"_1vwt0cg3",display:"flex",flexDirection:"column",marginTop:"16"},i.createElement(He,{display:"flex",justifyContent:"space-between"},f&&h&&i.createElement(He,{marginLeft:"16",width:"28"},i.createElement(vr,{onClick:()=>k("LEARN_COMPACT")})),f&&!h&&i.createElement(He,{marginLeft:"16",width:"28"}),i.createElement(He,{marginLeft:f?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},i.createElement(kn,{as:"h1",color:"modalText",id:"rk_connect_title",size:"18",weight:"heavy",testId:"connect-header-label"},p.t("connect.title"))),f&&i.createElement(He,{marginRight:"16"},i.createElement(Tn,{onClose:e}))),i.createElement(He,{className:"_1vwt0cg2 ju367v7a ju367v7v",paddingBottom:"18"},Object.entries(b).map((([e,t],r)=>t.length>0&&i.createElement(i.Fragment,{key:r},e?i.createElement(He,{marginBottom:"8",marginTop:"16",marginX:"6"},i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"bold"},v.includes(e)?p.t(`connector_group.${e.toLowerCase()}`):e)):null,i.createElement(He,{display:"flex",flexDirection:"column",gap:"4"},t.map((e=>i.createElement(Er,{currentlySelected:e.id===n,iconBackground:e.iconBackground,iconUrl:e.iconUrl,key:e.id,name:e.name,onClick:()=>x(e),ready:e.ready,recent:e.recent,testId:`wallet-option-${e.id}`})))))))),f&&i.createElement(i.Fragment,null,i.createElement(He,{background:"generalBorder",height:"1",marginTop:"-1"}),h?i.createElement(He,{paddingX:"24",paddingY:"16",textAlign:"center"},i.createElement(h,{Link:pr,Text:mr})):i.createElement(He,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},i.createElement(He,{paddingY:"4"},i.createElement(kn,{color:"modalTextSecondary",size:"14",weight:"medium"},p.t("connect.new_to_ethereum.description"))),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},i.createElement(He,{className:Le({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>k("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},i.createElement(kn,{color:"accentColor",size:"14",weight:"bold"},p.t("connect.new_to_ethereum.learn_more.label"))))))),(!f||"NONE"!==C)&&i.createElement(i.Fragment,null,!f&&i.createElement(He,{background:"generalBorder",minWidth:"1",width:"1"}),i.createElement(He,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},i.createElement(He,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},i.createElement(He,{width:"28"},j&&i.createElement(He,{as:"button",className:Le({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{j&&k(j,!0),null==A||A()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},i.createElement(yr,null))),i.createElement(He,{display:"flex",justifyContent:"center",style:{flexGrow:1}},O&&i.createElement(kn,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},O)),i.createElement(Tn,{onClose:e})),i.createElement(He,{display:"flex",flexDirection:"column",style:{minHeight:f?396:432}},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},P)))))}var Kr=({wallet:e})=>i.createElement("svg",{className:"_1am14413",viewBox:"0 0 86 86",width:"86",height:"86"},i.createElement("title",null,"Loading"),i.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${320/3}`,strokeDashoffset:160,className:"_1am14412",style:{stroke:(null==e?void 0:e.iconAccent)||"#0D3887"}}));function Vr({onClose:e,wallet:t,connecting:n}){const{connect:r,connector:o,iconBackground:s,iconUrl:a,id:c,mobile:u,name:l,onConnecting:d,ready:f,shortName:h}=t,p=null==u?void 0:u.getUri,m=wr(a),g=(0,i.useRef)(!1),{i18n:y}=(0,i.useContext)(ut),b=(0,i.useCallback)((async()=>{var t;"walletConnect"===c&&(null==e||e()),null==(t=null==r?void 0:r())||t.catch((()=>{}));let n=!1;null==d||d((async()=>{if(!n&&(n=!0,p)){const e=await p();if("walletConnect"!==o.id&&"walletConnectLegacy"!==o.id||function({mobileUri:e,name:t}){localStorage.setItem(jn,JSON.stringify({href:e.split("?")[0],name:t}))}({mobileUri:e,name:l}),e.startsWith("http")){const t=document.createElement("a");t.href=e,t.target="_blank",t.rel="noreferrer noopener",t.click()}else window.location.href=e}}))}),[o,r,p,d,e,l,c]);return(0,i.useEffect)((()=>{n&&!g.current&&(b(),g.current=!0)}),[n,b]),i.createElement(He,{as:"button",color:f?"modalText":"modalTextSecondary",disabled:!f,fontFamily:"body",key:c,onClick:b,ref:m,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${c}`,type:"button",width:"full"},i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},i.createElement(He,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?i.createElement(Kr,{wallet:t}):null,i.createElement(Ye,{background:s,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:a,width:"60"})),n?null:i.createElement(He,{display:"flex",flexDirection:"column",textAlign:"center"},i.createElement(kn,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},i.createElement(He,{as:"span",position:"relative"},null!=h?h:l,!t.ready&&" (unsupported)")),t.recent&&i.createElement(kn,{color:"accentColor",size:"12",weight:"medium"},y.t("connect.recent")))))}function Xr({onClose:e}){var t;const n=vn(),{disclaimer:r,learnMoreUrl:o}=(0,i.useContext)(Xt);let s=null,a=null,c=!1,u=null;const[l,d]=(0,i.useState)("CONNECT"),{i18n:f}=(0,i.useContext)(ut),h=$e();switch(l){case"CONNECT":s=f.t("connect.title"),c=!0,a=i.createElement(He,null,i.createElement(He,{background:"profileForeground",className:"_1am14410",display:"flex",paddingBottom:"20",paddingTop:"6"},i.createElement(He,{display:"flex",style:{margin:"0 auto"}},n.filter((e=>e.ready)).map((t=>i.createElement(He,{key:t.id,paddingX:"20"},i.createElement(He,{width:"60"},i.createElement(Vr,{onClose:e,wallet:t}))))))),i.createElement(He,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},i.createElement(He,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},i.createElement(kn,{color:"modalText",size:"16",weight:"bold"},f.t("intro.title")),i.createElement(kn,{color:"modalTextSecondary",size:"16"},f.t("intro.description")))),i.createElement(He,{paddingTop:"32",paddingX:"20"},i.createElement(He,{display:"flex",gap:"14",justifyContent:"center"},i.createElement(In,{label:f.t("intro.get.label"),onClick:()=>d("GET"),size:"large",type:"secondary"}),i.createElement(In,{href:o,label:f.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&i.createElement(He,{marginTop:"28",marginX:"32",textAlign:"center"},i.createElement(r,{Link:pr,Text:mr})));break;case"GET":{s=f.t("get.title"),u="CONNECT";const e=null==(t=null==n?void 0:n.filter((e=>{var t,n,r;return(null==(t=e.downloadUrls)?void 0:t.ios)||(null==(n=e.downloadUrls)?void 0:n.android)||(null==(r=e.downloadUrls)?void 0:r.mobile)})))?void 0:t.splice(0,3);a=i.createElement(He,null,i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},e.map(((t,n)=>{const{downloadUrls:r,iconBackground:o,iconUrl:s,name:a}=t;return(null==r?void 0:r.ios)||(null==r?void 0:r.android)||(null==r?void 0:r.mobile)?i.createElement(He,{display:"flex",gap:"16",key:t.id,paddingX:"20",width:"full"},i.createElement(He,{style:{minHeight:48,minWidth:48}},i.createElement(Ye,{background:o,borderColor:"generalBorder",borderRadius:"10",height:"48",src:s,width:"48"})),i.createElement(He,{display:"flex",flexDirection:"column",width:"full"},i.createElement(He,{alignItems:"center",display:"flex",height:"48"},i.createElement(He,{width:"full"},i.createElement(kn,{color:"modalText",size:"18",weight:"bold"},a)),i.createElement(In,{href:(h?null==r?void 0:r.ios:null==r?void 0:r.android)||(null==r?void 0:r.mobile),label:f.t("get.action.label"),size:"small",type:"secondary"})),n<e.length-1&&i.createElement(He,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"}))):null}))),i.createElement(He,{style:{marginBottom:"42px"}}),i.createElement(He,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},i.createElement(He,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},i.createElement(kn,{color:"modalText",size:"16",weight:"bold"},f.t("get.looking_for.title")),i.createElement(kn,{color:"modalTextSecondary",size:"16"},f.t("get.looking_for.mobile.description")))));break}}return i.createElement(He,{display:"flex",flexDirection:"column",paddingBottom:"36"},i.createElement(He,{background:c?"profileForeground":"modalBackground",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},i.createElement(He,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},u&&i.createElement(He,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},i.createElement(He,{alignItems:"center",as:"button",className:Le({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>d(u),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},i.createElement(yr,null))),i.createElement(He,{marginTop:"4",textAlign:"center",width:"full"},i.createElement(kn,{as:"h1",color:"modalText",id:"rk_connect_title",size:"20",weight:"bold"},s)),i.createElement(He,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},i.createElement(He,{style:{marginBottom:-20,marginTop:-20}},i.createElement(Tn,{onClose:e}))))),i.createElement(He,{display:"flex",flexDirection:"column"},a))}var Yr=({onClose:e})=>{const{connector:t}=(0,i.useContext)(Qt),{i18n:n}=(0,i.useContext)(ut),r=(null==t?void 0:t.name)||"";return i.createElement(He,null,i.createElement(He,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},i.createElement(He,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},i.createElement(Tn,{onClose:e})),i.createElement(He,{width:"60"},i.createElement(Vr,{onClose:e,wallet:t,connecting:!0})),i.createElement(He,{marginTop:"20"},i.createElement(kn,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),i.createElement(He,{maxWidth:"full",marginTop:"8"},i.createElement(kn,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function Jr({onClose:e}){const{connector:t}=(0,i.useContext)(Qt);return qe()?t?i.createElement(Yr,{onClose:e}):i.createElement(Xr,{onClose:e}):i.createElement(Gr,{onClose:e})}function Qr({onClose:e,open:t}){const n="rk_connect_title",r=Fe(),{disconnect:o}=(0,m.qL)(),{isConnecting:s}=(0,m.mA)(),a=i.useCallback((()=>{e(),o()}),[e,o]),c=i.useCallback((()=>{s&&o(),e()}),[e,o,s]);return"disconnected"===r?i.createElement($n,{onClose:c,open:t,titleId:n},i.createElement(Hn,{bottomSheetOnMobile:!0,padding:"0",wide:!0},i.createElement(Jr,{onClose:c}))):"unauthenticated"===r?i.createElement($n,{onClose:a,open:t,titleId:n},i.createElement(Hn,{bottomSheetOnMobile:!0,padding:"0"},i.createElement(Pn,{onClose:a,onCloseModal:e}))):null}function eo(){const[e,t]=(0,i.useState)(!1);return{closeModal:(0,i.useCallback)((()=>t(!1)),[]),isModalOpen:e,openModal:(0,i.useCallback)((()=>t(!0)),[])}}var to=(0,i.createContext)({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1});function no({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=eo(),{closeModal:o,isModalOpen:s,openModal:a}=eo(),{closeModal:c,isModalOpen:u,openModal:l}=eo(),d=Fe(),{chain:f}=(0,m.LN)(),h=!(null==f?void 0:f.unsupported);function p({keepConnectModalOpen:e=!1}={}){e||t(),o(),c()}const g="unauthenticated"===De();return(0,m.mA)({onConnect:()=>p({keepConnectModalOpen:g}),onDisconnect:()=>p()}),i.createElement(to.Provider,{value:(0,i.useMemo)((()=>({accountModalOpen:s,chainModalOpen:u,connectModalOpen:n,openAccountModal:h&&"connected"===d?a:void 0,openChainModal:"connected"===d?l:void 0,openConnectModal:"disconnected"===d||"unauthenticated"===d?r:void 0})),[d,h,s,u,n,a,l,r])},e,i.createElement(Qr,{onClose:t,open:n}),i.createElement(cr,{onClose:o,open:s}),i.createElement(dr,{onClose:c,open:u}))}function ro(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=(0,i.useContext)(to);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}function oo(){const{connectModalOpen:e,openConnectModal:t}=(0,i.useContext)(to);return{connectModalOpen:e,openConnectModal:t}}var io=()=>{};function so({children:e}){var t,n,r,o;const s=Mt(),{address:a}=(0,m.mA)(),c=Nt(a),u=Bt(c),l=(()=>{const e=At();return(0,i.useMemo)((()=>{const t={};for(const n of e)t[n.id]=n;return t}),[e])})(),d=null!=(t=De())?t:void 0,{chain:f}=(0,m.LN)(),h=f?l[f.id]:void 0,p=null!=(n=null==h?void 0:h.name)?n:void 0,g=null!=(r=null==h?void 0:h.iconUrl)?r:void 0,y=null!=(o=null==h?void 0:h.iconBackground)?o:void 0,b=Xe(g),v=(0,i.useContext)(sn),w=Wt().some((({status:e})=>"pending"===e))&&v,{showBalance:x}=jt(),E=!x||je(x)[qe()?"smallScreen":"largeScreen"],{data:_}=(0,m.KQ)({address:E?a:void 0}),k=_?`${Kn(parseFloat(_.formatted))} ${_.symbol}`:void 0,{openConnectModal:S}=oo(),{openChainModal:I}=function(){const{chainModalOpen:e,openChainModal:t}=(0,i.useContext)(to);return{chainModalOpen:e,openChainModal:t}}(),{openAccountModal:C}=function(){const{accountModalOpen:e,openAccountModal:t}=(0,i.useContext)(to);return{accountModalOpen:e,openAccountModal:t}}(),{accountModalOpen:T,chainModalOpen:A,connectModalOpen:P}=ro();return i.createElement(i.Fragment,null,e({account:a?{address:a,balanceDecimals:null==_?void 0:_.decimals,balanceFormatted:null==_?void 0:_.formatted,balanceSymbol:null==_?void 0:_.symbol,displayBalance:k,displayName:c?Xn(c):Vn(a),ensAvatar:null!=u?u:void 0,ensName:null!=c?c:void 0,hasPendingTransactions:w}:void 0,accountModalOpen:T,authenticationStatus:d,chain:f?{hasIcon:Boolean(g),iconBackground:y,iconUrl:b,id:f.id,name:null!=p?p:f.name,unsupported:f.unsupported}:void 0,chainModalOpen:A,connectModalOpen:P,mounted:s(),openAccountModal:null!=C?C:io,openChainModal:null!=I?I:io,openConnectModal:null!=S?S:io}))}so.displayName="ConnectButton.Custom";var ao={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function co({accountStatus:e=ao.accountStatus,chainStatus:t=ao.chainStatus,label:n=ao.label,showBalance:r=ao.showBalance}){const o=At(),s=Fe(),{setShowBalance:a}=jt(),[c,u]=(0,i.useState)(!1),{i18n:l}=(0,i.useContext)(ut);return(0,i.useEffect)((()=>{a(r),c||u(!0)}),[r,a]),c?i.createElement(so,null,(({account:a,chain:c,mounted:u,openAccountModal:d,openChainModal:f,openConnectModal:h})=>{var p,m,g;const y=u&&"loading"!==s,b=null!=(p=null==c?void 0:c.unsupported)&&p;return i.createElement(He,{display:"flex",gap:"12",...!y&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},y&&a&&"connected"===s?i.createElement(i.Fragment,null,c&&(o.length>1||b)&&i.createElement(He,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:b?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:Le({active:"shrink",hover:"grow"}),color:b?"connectButtonTextError":"connectButtonText",display:Oe(t,(e=>"none"===e?"none":"flex")),fontFamily:"body",fontWeight:"bold",gap:"6",key:b?"unsupported":"supported",onClick:f,paddingX:"10",paddingY:"8",testId:b?"wrong-network-button":"chain-button",transition:"default",type:"button"},b?i.createElement(He,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},l.t("connect_wallet.wrong_network.label")):i.createElement(He,{alignItems:"center",display:"flex",gap:"6"},c.hasIcon?i.createElement(He,{display:Oe(t,(e=>"full"===e||"icon"===e?"block":"none")),height:"24",width:"24"},i.createElement(Ye,{alt:null!=(m=c.name)?m:"Chain icon",background:c.iconBackground,borderRadius:"full",height:"24",src:c.iconUrl,width:"24"})):null,i.createElement(He,{display:Oe(t,(e=>"icon"!==e||c.iconUrl?"full"===e||"name"===e?"block":"none":"block"))},null!=(g=c.name)?g:c.id)),i.createElement(ot,null)),!b&&i.createElement(He,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:Le({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:d,testId:"account-button",transition:"default",type:"button"},a.displayBalance&&i.createElement(He,{display:Oe(r,(e=>e?"block":"none")),padding:"8",paddingLeft:"12"},a.displayBalance),i.createElement(He,{background:je(r)[qe()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},i.createElement(He,{alignItems:"center",display:"flex",gap:"6",height:"24"},i.createElement(He,{display:Oe(e,(e=>"full"===e||"avatar"===e?"block":"none"))},i.createElement(rt,{address:a.address,imageUrl:a.ensAvatar,loading:a.hasPendingTransactions,size:24})),i.createElement(He,{alignItems:"center",display:"flex",gap:"6"},i.createElement(He,{display:Oe(e,(e=>"full"===e||"address"===e?"block":"none"))},a.displayName),i.createElement(ot,null)))))):i.createElement(He,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:Le({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:h,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},u&&"Connect Wallet"===n?l.t("connect_wallet.label"):n))})):i.createElement(i.Fragment,null)}co.__defaultProps=ao,co.Custom=so;function uo(e){return"groupName"in e[0]?lo(e):lo([{groupName:"",wallets:e}])()}var lo=e=>()=>{let t=-1;const n=[],r=[],o=[],i=[];e.forEach((({groupName:e,wallets:n},i)=>{n.forEach((n=>{if(t++,(null==n?void 0:n.iconAccent)&&(s=null==n?void 0:n.iconAccent,!/^#([0-9a-f]{3}){1,2}$/i.test(s)))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${n.name}`);var s;const a={...n,groupIndex:i,groupName:e,index:t};"function"===typeof n.hidden?o.push(a):r.push(a)}))}));return[...r,...o].forEach((({createConnector:e,groupIndex:t,groupName:r,hidden:o,index:s,...a})=>{if("function"===typeof o){if(o({wallets:[...i.map((({connector:e,id:t,installed:n,name:r})=>({connector:e,id:t,installed:n,name:r})))]}))return}const{connector:c,...u}=(l=e(),Object.fromEntries(Object.entries(l).filter((([e,t])=>void 0!==t))));var l;let d;if("walletConnect"===a.id&&u.qrCode&&!qe()){const{chains:e,options:t}=c;d=new ye.z({chains:e,options:{...t,showQrModal:!0}}),n.push(d)}const f={connector:c,groupIndex:t,groupName:r,index:s,walletConnectModalConnector:d,...a,...u};i.push(f),n.includes(c)||(n.push(c),c._wallets=[]),c._wallets.push(f)})),n},fo=({chains:e,...t})=>{var r;return{id:"brave",name:"Brave Wallet",iconUrl:async()=>(await n.e(6847).then(n.bind(n,86847))).default,iconBackground:"#fff",installed:"undefined"!==typeof window&&!0===(null==(r=window.ethereum)?void 0:r.isBraveWallet),downloadUrls:{},createConnector:()=>({connector:new be._({chains:e,options:t})})}};function ho(e){if("undefined"===typeof window||"undefined"===typeof window.ethereum)return;const t=window.ethereum.providers;return t?t.find((t=>t[e])):window.ethereum[e]?window.ethereum:void 0}function po(e){return Boolean(ho(e))}function mo({chains:e,flag:t,options:n}){return new be._({chains:e,options:{getProvider:()=>function(e){if("undefined"===typeof window||"undefined"===typeof window.ethereum)return;const t=window.ethereum.providers;return ho(e)||("undefined"!==typeof t&&t.length>0?t[0]:window.ethereum)}(t),...n}})}var go=({appName:e,chains:t,...r})=>({id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",iconUrl:async()=>(await n.e(1950).then(n.bind(n,41950))).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:po("isCoinbaseWallet")||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},createConnector:()=>{const n=$e(),o=new ve.D({chains:t,options:{appName:e,headlessMode:!0,...r}});return{connector:o,...n?{}:{qrCode:{getUri:async()=>(await o.getProvider()).qrUrl,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"wallet_connectors.coinbase.qr_code.step1.description",step:"install",title:"wallet_connectors.coinbase.qr_code.step1.title"},{description:"wallet_connectors.coinbase.qr_code.step2.description",step:"create",title:"wallet_connectors.coinbase.qr_code.step2.title"},{description:"wallet_connectors.coinbase.qr_code.step3.description",step:"scan",title:"wallet_connectors.coinbase.qr_code.step3.title"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"wallet_connectors.coinbase.extension.step1.description",step:"install",title:"wallet_connectors.coinbase.extension.step1.title"},{description:"wallet_connectors.coinbase.extension.step2.description",step:"create",title:"wallet_connectors.coinbase.extension.step2.title"},{description:"wallet_connectors.coinbase.extension.step3.description",step:"refresh",title:"wallet_connectors.coinbase.extension.step3.title"}]}}}}}}),yo=({chains:e,...t})=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await n.e(1088).then(n.bind(n,81088))).default,iconBackground:"#fff",hidden:({wallets:e})=>e.some((e=>e.installed&&e.name===e.connector.name&&(e.connector instanceof be._||"coinbase"===e.id))),createConnector:()=>({connector:new be._({chains:e,options:t})})});async function bo(e,t){const n=await e.getProvider();return"2"===t?new Promise((e=>n.once("display_uri",e))):n.connector.uri}var vo=new Map;function wo({chains:e,options:t={},projectId:n,version:r="2"}){const o="21fef48091f12692cad574a6f7753643";if("2"===r){if(!n||""===n)throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");"YOUR_PROJECT_ID"!==n&&n!==o||console.warn("Invalid projectId. Please create a unique WalletConnect Cloud projectId for your dApp https://www.rainbowkit.com/docs/installation#configure")}const i={chains:e,options:"1"===r?{qrcode:!1,...t}:{projectId:"YOUR_PROJECT_ID"===n?o:n,showQrModal:!1,...t}},s=JSON.stringify(i),a=vo.get(s);return null!=a?a:function(e,t){const n="1"===e?new xe.O(t):new ye.z(t);return vo.set(JSON.stringify(t),n),n}(r,i)}function xo(e){return!!(null==e?void 0:e.isMetaMask)&&(!(e.isBraveWallet&&!e._events&&!e._state)&&(!e.isApexWallet&&(!e.isAvalanche&&(!e.isBackpack&&(!e.isBifrost&&(!e.isBitKeep&&(!e.isBitski&&(!e.isBlockWallet&&(!e.isCoinbaseWallet&&(!e.isDawn&&(!e.isEnkrypt&&(!e.isExodus&&(!e.isFrame&&(!e.isFrontier&&(!e.isGamestop&&(!e.isHyperPay&&(!e.isImToken&&(!e.isKuCoinWallet&&(!e.isMathWallet&&(!e.isOkxWallet&&!e.isOKExWallet&&(!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&(!e.isOpera&&(!e.isPhantom&&(!e.isPortal&&(!e.isRabby&&(!e.isRainbow&&(!e.isStatus&&(!e.isTalisman&&(!e.isTally&&(!e.isTokenPocket&&(!e.isTokenary&&(!e.isTrust&&!e.isTrustWallet&&(!e.isXDEFI&&(!e.isZeal&&!e.isZerion))))))))))))))))))))))))))))))))))}var Eo=({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...i})=>{var s,a;const c="undefined"!==typeof window&&(null==(s=window.ethereum)?void 0:s.providers),u="undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&((null==(a=window.ethereum.providers)?void 0:a.some(xo))||window.ethereum.isMetaMask),l=!u;return{id:"metaMask",name:"MetaMask",iconUrl:async()=>(await n.e(4419).then(n.bind(n,84419))).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:l?void 0:u,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},createConnector:()=>{const n=l?wo({projectId:t,chains:e,version:o,options:r}):new we.i({chains:e,options:{getProvider:()=>Array.isArray(c)&&c.find(xo)||("undefined"!==typeof window?window.ethereum:void 0),...i}}),s=async()=>{const e=await bo(n,o);return ze()?e:$e()?`metamask://wc?uri=${encodeURIComponent(e)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`};return{connector:n,mobile:{getUri:l?s:void 0},qrCode:l?{getUri:s,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}}}}}},_o=({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...i})=>{const s=po("isRainbow"),a=!s;return{id:"rainbow",name:"Rainbow",iconUrl:async()=>(await n.e(1608).then(n.bind(n,31608))).default,iconBackground:"#0c2f78",installed:a?void 0:s,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},createConnector:()=>{const n=a?wo({projectId:t,chains:e,version:o,options:r}):mo({flag:"isRainbow",chains:e,options:i}),s=async()=>{const e=await bo(n,o);return ze()?e:$e()?`rainbow://wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`};return{connector:n,mobile:{getUri:a?s:void 0},qrCode:a?{getUri:s,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0}}}},ko=({chains:e,...t})=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await n.e(514).then(n.bind(n,60514))).default,installed:!("undefined"===typeof window)&&(null==window?void 0:window.parent)!==window,downloadUrls:{},createConnector:()=>({connector:new Pe({chains:e,options:t})})}),So=({chains:e,options:t,projectId:r,version:o="2"})=>({id:"walletConnect",name:"WalletConnect",iconUrl:async()=>(await n.e(3525).then(n.bind(n,33525))).default,iconBackground:"#3b99fc",createConnector:()=>{const n=$e(),i=wo("1"===o?{version:"1",chains:e,options:{qrcode:n,...t}}:{version:"2",chains:e,projectId:r,options:{showQrModal:n,...t}}),s=async()=>bo(i,o);return{connector:i,...n?{}:{mobile:{getUri:s},qrCode:{getUri:s}}}}}),Io=({appName:e,chains:t,projectId:n})=>{const r=[{groupName:"Popular",wallets:[yo({chains:t}),ko({chains:t}),_o({chains:t,projectId:n}),go({appName:e,chains:t}),Eo({chains:t,projectId:n}),So({chains:t,projectId:n}),fo({chains:t})]}];return{connectors:uo(r),wallets:r}}},16247:function(e,t,n){"use strict";var r;n.d(t,{Q:function(){return r}}),function(e){e.Mainnet="mainnet-beta",e.Testnet="testnet",e.Devnet="devnet"}(r||(r={}))},54306:function(e,t,n){"use strict";n.d(t,{O:function(){return c},z:function(){return a}});var r=n(67294);const o=[],i={autoConnect:!1,connecting:!1,connected:!1,disconnecting:!1,select(){s("call","select")},connect:()=>Promise.reject(s("call","connect")),disconnect:()=>Promise.reject(s("call","disconnect")),sendTransaction:()=>Promise.reject(s("call","sendTransaction")),signTransaction:()=>Promise.reject(s("call","signTransaction")),signAllTransactions:()=>Promise.reject(s("call","signAllTransactions")),signMessage:()=>Promise.reject(s("call","signMessage")),signIn:()=>Promise.reject(s("call","signIn"))};function s(e,t){const n=new Error(`You have tried to ${e} "${t}" on a WalletContext without providing one. Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.`);return console.error(n),n}Object.defineProperty(i,"wallets",{get:()=>(s("read","wallets"),o)}),Object.defineProperty(i,"wallet",{get:()=>(s("read","wallet"),null)}),Object.defineProperty(i,"publicKey",{get:()=>(s("read","publicKey"),null)});const a=(0,r.createContext)(i);function c(){return(0,r.useContext)(a)}},53516:function(e,t,n){"use strict";function r(e){return"string"===typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"===typeof e?Number(e):e}n.d(t,{J:function(){return r}})},92219:function(e,t,n){"use strict";n.d(t,{_:function(){return f}});var r,o=n(57858),i=n(53516),s=n(75276),a=n(45775),c=n(39028),u=n(79578),l=n(3980),d=n(92106);var f=class extends s.wR{constructor({chains:e,options:t}={}){const n={shimDisconnect:!0,getProvider(){if("undefined"===typeof window)return;const e=window.ethereum;return e?.providers&&e.providers.length>0?e.providers[0]:e},...t};super({chains:e,options:n}),this.id="injected",(0,s.Ko)(this,r,void 0),this.shimDisconnectKey=`${this.id}.shimDisconnect`,this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,a.K)(e[0])})},this.onChainChanged=e=>{const t=(0,i.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=async e=>{if(1013===e.code){if(await this.getProvider()){if(await this.getAccount())return}}this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey)};const o=n.getProvider();if("string"===typeof n.name)this.name=n.name;else if(o){const e=function(e){if(!e)return"Injected";const t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOktoWallet?"Okto Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){const n=new Set;let r=1;for(const i of e.providers){let e=t(i);e||(e=`Unknown Wallet #${r}`,r+=1),n.add(e)}const o=[...n];return o.length?o:o[0]??"Injected"}return t(e)??"Injected"}(o);n.name?this.name=n.name(e):this.name="string"===typeof e?e:e[0]}else this.name="Injected";this.ready=!!o}async connect({chainId:e}={}){try{const t=await this.getProvider();if(!t)throw new o.N;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await t.request({method:"eth_requestAccounts"}),r=(0,a.K)(n[0]);let i=await this.getChainId(),s=this.isChainUnsupported(i);if(e&&i!==e){i=(await this.switchChain(e)).id,s=this.isChainUnsupported(i)}return this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:i,unsupported:s}}}catch(t){if(this.isUserRejectedRequestError(t))throw new c.ab(t);if(-32002===t.code)throw new c.pT(t);throw t}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new o.N;const t=await e.request({method:"eth_accounts"});return(0,a.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new o.N;return e.request({method:"eth_chainId"}).then(i.J)}async getProvider(){const e=this.options.getProvider();return e&&(0,s.qx)(this,r,e),(0,s.ac)(this,r)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,u.K)({account:n,chain:r,transport:(0,l.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!(await this.getProvider()))throw new o.N;return!!(await this.getAccount())}catch{return!1}}async switchChain(e){const t=await this.getProvider();if(!t)throw new o.N;const n=(0,d.eC)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise((t=>this.on("change",(({chain:n})=>{n?.id===e&&t()}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const s=this.chains.find((t=>t.id===e));if(!s)throw new o.B({chainId:e,connectorId:this.id});if(4902===r.code||4902===r?.data?.originalError?.code)try{await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:s.name,nativeCurrency:s.nativeCurrency,rpcUrls:[s.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(s)}]});if(await this.getChainId()!==e)throw new c.ab(new Error("User rejected switch after adding network."));return s}catch(i){throw new c.ab(i)}if(this.isUserRejectedRequestError(r))throw new c.ab(r);throw new c.x3(r)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){const i=await this.getProvider();if(!i)throw new o.N;return i.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}isUserRejectedRequestError(e){return 4001===e.code}};r=new WeakMap},57858:function(e,t,n){"use strict";n.d(t,{B:function(){return r},N:function(){return o}});var r=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),this.name="ChainNotConfiguredForConnectorError"}},o=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}}},75276:function(e,t,n){"use strict";n.d(t,{wR:function(){return d},Ko:function(){return c},ac:function(){return a},U9:function(){return l},qx:function(){return u}});var r=n(26729),o=n(66403);const i=(0,n(86164).a)({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0});var s=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},a=(e,t,n)=>(s(e,t,"read from private field"),n?n.call(e):t.get(e)),c=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},u=(e,t,n,r)=>(s(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),l=(e,t,n)=>(s(e,t,"access private method"),n),d=class extends r{constructor({chains:e=[o.R,i],options:t}){super(),this.chains=e,this.options=t}getBlockExplorerUrls(e){const{default:t,...n}=e.blockExplorers??{};if(t)return[t.url,...Object.values(n).map((e=>e.url))]}isChainUnsupported(e){return!this.chains.some((t=>t.id===e))}setStorage(e){this.storage=e}}},90935:function(e,t,n){"use strict";n.d(t,{D:function(){return h}});var r,o,i=n(57858),s=n(53516),a=n(75276),c=n(45775),u=n(39028),l=n(79578),d=n(3980),f=n(92106),h=class extends a.wR{constructor({chains:e,options:t}){super({chains:e,options:{reloadOnDisconnect:!1,...t}}),this.id="coinbaseWallet",this.name="Coinbase Wallet",this.ready=!0,(0,a.Ko)(this,r,void 0),(0,a.Ko)(this,o,void 0),this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,c.K)(e[0])})},this.onChainChanged=e=>{const t=(0,s.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=()=>{this.emit("disconnect")}}async connect({chainId:e}={}){try{const t=await this.getProvider();t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const n=await t.enable(),r=(0,c.K)(n[0]);let o=await this.getChainId(),i=this.isChainUnsupported(o);if(e&&o!==e){o=(await this.switchChain(e)).id,i=this.isChainUnsupported(o)}return{account:r,chain:{id:o,unsupported:i}}}catch(t){if(/(user closed modal|accounts received is empty)/i.test(t.message))throw new u.ab(t);throw t}}async disconnect(){if(!(0,a.ac)(this,o))return;const e=await this.getProvider();e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),e.disconnect(),e.close()}async getAccount(){const e=await this.getProvider(),t=await e.request({method:"eth_accounts"});return(0,c.K)(t[0])}async getChainId(){const e=await this.getProvider();return(0,s.J)(e.chainId)}async getProvider(){if(!(0,a.ac)(this,o)){let e=(await Promise.all([n.e(5811),n.e(6942)]).then(n.t.bind(n,45811,19))).default;"function"!==typeof e&&"function"===typeof e.default&&(e=e.default),(0,a.qx)(this,r,new e(this.options));const t=(0,a.ac)(this,r).walletExtension?.getChainId(),i=this.chains.find((e=>this.options.chainId?e.id===this.options.chainId:e.id===t))||this.chains[0],s=this.options.chainId||i?.id,c=this.options.jsonRpcUrl||i?.rpcUrls.default.http[0];(0,a.qx)(this,o,(0,a.ac)(this,r).makeWeb3Provider(c,s))}return(0,a.ac)(this,o)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,l.K)({account:n,chain:r,transport:(0,d.P)(t)})}async isAuthorized(){try{return!!(await this.getAccount())}catch{return!1}}async switchChain(e){const t=await this.getProvider(),n=(0,f.eC)(e);try{return await t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const s=this.chains.find((t=>t.id===e));if(!s)throw new i.B({chainId:e,connectorId:this.id});if(4902===r.code)try{return await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:s.name,nativeCurrency:s.nativeCurrency,rpcUrls:[s.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(s)}]}),s}catch(o){throw new u.ab(o)}throw new u.x3(r)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){return(await this.getProvider()).request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}};r=new WeakMap,o=new WeakMap},25078:function(e,t,n){"use strict";n.d(t,{i:function(){return u}});var r,o=n(92219),i=n(57858),s=n(75276),a=n(39028),c=n(45775),u=class extends o._{constructor({chains:e,options:t}={}){const n={name:"MetaMask",shimDisconnect:!0,getProvider(){function e(e){if(!!e?.isMetaMask&&(!e.isBraveWallet||e._events||e._state)&&!e.isApexWallet&&!e.isAvalanche&&!e.isBitKeep&&!e.isBlockWallet&&!e.isCoin98&&!e.isFordefi&&!e.isMathWallet&&!e.isOkxWallet&&!e.isOKExWallet&&!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&!e.isOpera&&!e.isPortal&&!e.isRabby&&!e.isDefiant&&!e.isTokenPocket&&!e.isTokenary&&!e.isZeal&&!e.isZerion)return e}if("undefined"===typeof window)return;const t=window.ethereum;return t?.providers?t.providers.find(e):e(t)},...t};super({chains:e,options:n}),this.id="metaMask",this.shimDisconnectKey=`${this.id}.shimDisconnect`,(0,s.Ko)(this,r,void 0),(0,s.qx)(this,r,n.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:e}={}){try{const n=await this.getProvider();if(!n)throw new i.N;n.on&&(n.on("accountsChanged",this.onAccountsChanged),n.on("chainChanged",this.onChainChanged),n.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if((0,s.ac)(this,r)&&this.options?.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey)){o=await this.getAccount().catch((()=>null));if(!!o)try{await n.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(t){if(this.isUserRejectedRequestError(t))throw new a.ab(t);if(t.code===new a.pT(t).code)throw t}}if(!o){const e=await n.request({method:"eth_requestAccounts"});o=(0,c.K)(e[0])}let u=await this.getChainId(),l=this.isChainUnsupported(u);if(e&&u!==e){u=(await this.switchChain(e)).id,l=this.isChainUnsupported(u)}return this.options?.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:o,chain:{id:u,unsupported:l},provider:n}}catch(t){if(this.isUserRejectedRequestError(t))throw new a.ab(t);if(-32002===t.code)throw new a.pT(t);throw t}}};r=new WeakMap},15861:function(e,t,n){"use strict";n.d(t,{z:function(){return H}});var r=n(75276);n(15501),n(512),n(31416),n(73294),n(57664),n(37466),n(66736),n(62873),n(65755),n(69528),n(37968),n(34155);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function o(e=[],t=[]){return[...new Set([...e,...t])]}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var i=Object.defineProperty,s=Object.defineProperties,a=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&d(e,n,t[n]);if(c)for(var n of c(t))l.call(t,n)&&d(e,n,t[n]);return e},h=(e,t)=>s(e,a(t));function p(e){return e.includes(":")}function m(e){return p(e)?e.split(":")[0]:e}function g(e){var t,n,r;const i={};if(!y(e))return i;for(const[s,a]of Object.entries(e)){const e=p(s)?[s]:a.chains,c=a.methods||[],u=a.events||[],l=m(s);i[l]=h(f({},i[l]),{chains:o(e,null==(t=i[l])?void 0:t.chains),methods:o(c,null==(n=i[l])?void 0:n.methods),events:o(u,null==(r=i[l])?void 0:r.events)})}return i}function y(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}var b,v,w,x,E,_,k,S,I,C,T,A,P,O,j,M,R,B,N,L,U=n(45775),D=n(39028),F=n(79578),z=n(3980),$=n(92106),q="requestedChains",Z="wallet_addEthereumChain",H=class extends r.wR{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),(0,r.Ko)(this,w),(0,r.Ko)(this,E),(0,r.Ko)(this,k),(0,r.Ko)(this,I),(0,r.Ko)(this,T),(0,r.Ko)(this,P),(0,r.Ko)(this,j),(0,r.Ko)(this,R),(0,r.Ko)(this,N),this.id="walletConnect",this.name="WalletConnect",this.ready=!0,(0,r.Ko)(this,b,void 0),(0,r.Ko)(this,v,void 0),this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,U.K)(e[0])})},this.onChainChanged=e=>{const t=Number(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=()=>{(0,r.U9)(this,P,O).call(this,[]),this.emit("disconnect")},this.onDisplayUri=e=>{this.emit("message",{type:"display_uri",data:e})},this.onConnect=()=>{this.emit("connect",{})},(0,r.U9)(this,w,x).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let n=e;if(!n){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;n=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!n)throw new Error("No chains found on connector.");const o=await this.getProvider();(0,r.U9)(this,I,C).call(this);const i=(0,r.U9)(this,k,S).call(this);if(o.session&&i&&await o.disconnect(),!o.session||i){const e=this.chains.filter((e=>e.id!==n)).map((e=>e.id));this.emit("message",{type:"connecting"}),await o.connect({pairingTopic:t,optionalChains:[n,...e]}),(0,r.U9)(this,P,O).call(this,this.chains.map((({id:e})=>e)))}const s=await o.enable(),a=(0,U.K)(s[0]),c=await this.getChainId();return{account:a,chain:{id:c,unsupported:this.isChainUnsupported(c)}}}catch(n){if(/user rejected/i.test(n?.message))throw new D.ab(n);throw n}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(t){if(!/No matching key/i.test(t.message))throw t}finally{(0,r.U9)(this,T,A).call(this),(0,r.U9)(this,P,O).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,U.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return(0,r.ac)(this,b)||await(0,r.U9)(this,w,x).call(this),e&&await this.switchChain(e),(0,r.ac)(this,b)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,F.K)({account:n,chain:r,transport:(0,z.P)(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),n=(0,r.U9)(this,k,S).call(this);if(!e)return!1;if(n&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new D.x3(new Error("chain not found on connector."));try{const n=await this.getProvider(),o=(0,r.U9)(this,R,B).call(this),i=(0,r.U9)(this,N,L).call(this);if(!o.includes(e)&&i.includes(Z)){await n.request({method:Z,params:[{chainId:(0,$.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const o=(0,r.U9)(this,j,M).call(this);o.push(e),(0,r.U9)(this,P,O).call(this,o)}return await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,$.eC)(e)}]}),t}catch(n){if(/user rejected request/i.test("string"===typeof n?n:n?.message))throw new D.ab(n);throw new D.x3(n)}}};b=new WeakMap,v=new WeakMap,w=new WeakSet,x=async function(){return(0,r.ac)(this,v)||"undefined"===typeof window||(0,r.qx)(this,v,(0,r.U9)(this,E,_).call(this)),(0,r.ac)(this,v)},E=new WeakSet,_=async function(){const{EthereumProvider:e}=await Promise.all([n.e(1162),n.e(5330)]).then(n.bind(n,15330)),t=this.chains.map((({id:e})=>e));if(t.length){const{projectId:n,showQrModal:o=!0,qrModalOptions:i,metadata:s,relayUrl:a}=this.options;(0,r.qx)(this,b,await e.init({showQrModal:o,qrModalOptions:i,projectId:n,optionalChains:t,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:s,relayUrl:a}))}},k=new WeakSet,S=function(){if((0,r.U9)(this,N,L).call(this).includes(Z))return!1;if(!this.options.isNewChainsStale)return!1;const e=(0,r.U9)(this,j,M).call(this),t=this.chains.map((({id:e})=>e)),n=(0,r.U9)(this,R,B).call(this);return!(n.length&&!n.some((e=>t.includes(e))))&&!t.every((t=>e.includes(t)))},I=new WeakSet,C=function(){(0,r.ac)(this,b)&&((0,r.U9)(this,T,A).call(this),(0,r.ac)(this,b).on("accountsChanged",this.onAccountsChanged),(0,r.ac)(this,b).on("chainChanged",this.onChainChanged),(0,r.ac)(this,b).on("disconnect",this.onDisconnect),(0,r.ac)(this,b).on("session_delete",this.onDisconnect),(0,r.ac)(this,b).on("display_uri",this.onDisplayUri),(0,r.ac)(this,b).on("connect",this.onConnect))},T=new WeakSet,A=function(){(0,r.ac)(this,b)&&((0,r.ac)(this,b).removeListener("accountsChanged",this.onAccountsChanged),(0,r.ac)(this,b).removeListener("chainChanged",this.onChainChanged),(0,r.ac)(this,b).removeListener("disconnect",this.onDisconnect),(0,r.ac)(this,b).removeListener("session_delete",this.onDisconnect),(0,r.ac)(this,b).removeListener("display_uri",this.onDisplayUri),(0,r.ac)(this,b).removeListener("connect",this.onConnect))},P=new WeakSet,O=function(e){this.storage?.setItem(q,e)},j=new WeakSet,M=function(){return this.storage?.getItem(q)??[]},R=new WeakSet,B=function(){if(!(0,r.ac)(this,b))return[];const e=(0,r.ac)(this,b).session?.namespaces;if(!e)return[];const t=g(e).eip155?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return t??[]},N=new WeakSet,L=function(){if(!(0,r.ac)(this,b))return[];const e=(0,r.ac)(this,b).session?.namespaces;if(!e)return[];const t=g(e).eip155?.methods;return t??[]}},13854:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r,o,i,s=n(53516),a=n(75276),c=n(45775),u=n(39028),l=n(79578),d=n(3980),f=n(92106),h=/(imtoken|metamask|rainbow|trust wallet|uniswap wallet|ledger)/i,p=class extends a.wR{constructor(){super(...arguments),(0,a.Ko)(this,o),this.id="walletConnectLegacy",this.name="WalletConnectLegacy",this.ready=!0,(0,a.Ko)(this,r,void 0),this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,c.K)(e[0])})},this.onChainChanged=e=>{const t=(0,s.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=()=>{this.emit("disconnect")}}async connect({chainId:e}={}){try{let t=e;if(!t){const e=this.storage?.getItem("store"),n=e?.state?.data?.chain?.id;n&&!this.isChainUnsupported(n)&&(t=n)}const n=await this.getProvider({chainId:t,create:!0});n.on("accountsChanged",this.onAccountsChanged),n.on("chainChanged",this.onChainChanged),n.on("disconnect",this.onDisconnect),setTimeout((()=>this.emit("message",{type:"connecting"})),0);const r=await n.enable(),s=(0,c.K)(r[0]),u=await this.getChainId(),l=this.isChainUnsupported(u),d=n.connector?.peerMeta?.name??"";return h.test(d)&&(this.switchChain=(0,a.U9)(this,o,i)),{account:s,chain:{id:u,unsupported:l}}}catch(t){if(/user closed modal/i.test(t.message))throw new u.ab(t);throw t}}async disconnect(){const e=await this.getProvider();await e.disconnect(),e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),"undefined"!==typeof localStorage&&localStorage.removeItem("walletconnect")}async getAccount(){const e=(await this.getProvider()).accounts;return(0,c.K)(e[0])}async getChainId(){const e=await this.getProvider();return(0,s.J)(e.chainId)}async getProvider({chainId:e,create:t}={}){if(!(0,a.ac)(this,r)||e||t){const t=this.options?.infuraId?{}:this.chains.reduce(((e,t)=>({...e,[t.id]:t.rpcUrls.default.http[0]})),{}),o=(await Promise.all([n.e(1162),n.e(7749)]).then(n.bind(n,67749))).default;(0,a.qx)(this,r,new o({...this.options,chainId:e,rpc:{...t,...this.options?.rpc}})),(0,a.ac)(this,r).http=await(0,a.ac)(this,r).setHttpProvider(e)}return(0,a.ac)(this,r)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,l.K)({account:n,chain:r,transport:(0,d.P)(t)})}async isAuthorized(){try{return!!(await this.getAccount())}catch{return!1}}};r=new WeakMap,o=new WeakSet,i=async function(e){const t=await this.getProvider(),n=(0,f.eC)(e);try{return await Promise.race([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise((t=>this.on("change",(({chain:n})=>{n?.id===e&&t(e)}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){if(/user rejected request/i.test("string"===typeof r?r:r?.message))throw new u.ab(r);throw new u.x3(r)}}},65049:function(e,t,n){"use strict";n.d(t,{QB:function(){return pt},$j:function(){return Dt},_g:function(){return Lt},o6:function(){return Pt},vZ:function(){return wt},zP:function(){return Ft},EG:function(){return en},RQ:function(){return ln},w6:function(){return cn},Lk:function(){return un},jS:function(){return dn},D0:function(){return tn},_X:function(){return _t},Hy:function(){return nn},uV:function(){return qt},gY:function(){return kt},xz:function(){return Zt},jr:function(){return Ht},wp:function(){return At},$q:function(){return Vt},a4:function(){return Yt},JH:function(){return Jt},l:function(){return rn},If:function(){return on},Mn:function(){return fn},uH:function(){return sn},QC:function(){return an},pC:function(){return Wt},Tb:function(){return Gt},fq:function(){return Kt},n9:function(){return Qt}});var r=n(92219),o=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},i=(e,t,n)=>(o(e,t,"read from private field"),n?n.call(e):t.get(e)),s=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},a=(e,t,n,r)=>(o(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),c=n(16189),u=n(18011),l=n(95270),d=n(95602),f=n(15215),h=n(16171),p=n(61376);function m(e,{method:t}){const n={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:r,status:o,transport:i})=>{"success"===o&&t===e&&(n[r]=i.request)})),t=>n[t]||e.request}var g=n(57412),y=n(62027);class b extends y.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var v=n(11187),w=n(74059),x=n(88184),E=n(45444),_=n(80522),k=n(40840);function S({abi:e,eventName:t,args:n}){let r=e[0];if(t&&(r=(0,k.mE)({abi:e,args:n,name:t}),!r))throw new g.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==r.type)throw new g.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const o=(0,_.t)(r),i=(0,w.e)(o);let s=[];if(n&&"inputs"in r){const e=r.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map((e=>n[e.name]))??[]:[];t.length>0&&(s=e?.map(((e,n)=>Array.isArray(t[n])?t[n].map(((r,o)=>I({param:e,value:t[n][o]}))):t[n]?I({param:e,value:t[n]}):null))??[])}return[i,...s]}function I({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,x.w)((0,v.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new b(e.type);return(0,E.E)([e],[t])}var C=n(92106);async function T(e,{address:t,abi:n,args:r,eventName:o,fromBlock:i,strict:s,toBlock:a}){const c=m(e,{method:"eth_newFilter"}),u=o?S({abi:n,args:r,eventName:o}):void 0,l=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof i?(0,C.eC)(i):i,toBlock:"bigint"===typeof a?(0,C.eC)(a):a,topics:u}]});return{abi:n,args:r,eventName:o,id:l,request:c(l),strict:s,type:"event"}}async function A(e,{address:t,args:n,event:r,events:o,fromBlock:i,strict:s,toBlock:a}={}){const c=o??(r?[r]:void 0),u=m(e,{method:"eth_newFilter"});let l=[];c&&(l=[c.flatMap((e=>S({abi:[e],eventName:e.name,args:n})))],r&&(l=l[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof i?(0,C.eC)(i):i,toBlock:"bigint"===typeof a?(0,C.eC)(a):a,...l.length?{topics:l}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:i,id:d,request:u(d),strict:s,toBlock:a,type:"event"}}async function P(e){const t=m(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}var O=n(14503),j=n(77799),M=n(72365),R=n(93714),B=n(81841);var N=n(43861),L=n(79379);var U=n(75016);const D=new Map,F=new Map;async function z(e,{cacheKey:t,cacheTime:n=1/0}){const r=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,D),r=t(e,F);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}(t),o=r.response.get();if(o&&n>0){if((new Date).getTime()-o.created.getTime()<n)return o.data}let i=r.promise.get();i||(i=e(),r.promise.set(i));try{const e=await i;return r.response.set({created:new Date,data:e}),e}finally{r.promise.clear()}}const $=e=>`blockNumber.${e}`;async function q(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){const r=await z((()=>e.request({method:"eth_blockNumber"})),{cacheKey:$(e.uid),cacheTime:n??t});return BigInt(r)}var Z=n(95946);var H=n(79524),W=n(34450);const G="/docs/contract/decodeEventLog";function K({abi:e,data:t,strict:n,topics:r}){const o=n??!0,[i,...s]=r;if(!i)throw new g.FM({docsPath:G});const a=e.find((e=>"event"===e.type&&i===(0,w.e)((0,_.t)(e))));if(!a||!("name"in a)||"event"!==a.type)throw new g.lC(i,{docsPath:G});const{name:c,inputs:u}=a,l=u?.some((e=>!("name"in e&&e.name)));let d=l?[]:{};const f=u.filter((e=>"indexed"in e&&e.indexed));for(let m=0;m<f.length;m++){const e=f[m],t=s[m];if(!t)throw new g.Gy({abiItem:a,param:e});d[e.name||m]=V({param:e,value:t})}const h=u.filter((e=>!("indexed"in e&&e.indexed)));if(h.length>0)if(t&&"0x"!==t)try{const e=(0,W.r)(h,t);if(e)if(l)d=[...d,...e];else for(let t=0;t<h.length;t++)d[h[t].name]=e[t]}catch(p){if(o){if(p instanceof g.xB)throw new g.SM({abiItem:a,data:p.data,params:p.params,size:p.size});throw p}}else if(o)throw new g.SM({abiItem:a,data:"0x",params:h,size:0});return{eventName:c,args:Object.values(d).length>0?d:void 0}}function V({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;return((0,W.r)([e],t)||[])[0]}var X=n(53992);async function Y(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:i,events:s,args:a,strict:c}={}){const u=c??!1,l=s??(i?[i]:void 0);let d,f=[];return l&&(f=[l.flatMap((e=>S({abi:[e],eventName:e.name,args:a})))],i&&(f=f[0])),d=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:"bigint"===typeof r?(0,C.eC)(r):r,toBlock:"bigint"===typeof o?(0,C.eC)(o):o}]}),d.map((e=>{try{const{eventName:t,args:n}=l?K({abi:l,data:e.data,topics:e.topics,strict:u}):{eventName:void 0,args:void 0};return(0,X.U)(e,{args:n,eventName:t})}catch(t){let n,r;if(t instanceof g.SM||t instanceof g.Gy){if(u)return;n=t.abiItem.name,r=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,X.U)(e,{args:r?[]:{},eventName:n})}})).filter(Boolean)}async function J(e,{abi:t,address:n,args:r,blockHash:o,eventName:i,fromBlock:s,toBlock:a,strict:c}){const u=i?(0,k.mE)({abi:t,name:i}):void 0,l=u?void 0:t.filter((e=>"event"===e.type));return(0,R.s)(e,Y,"getLogs")({address:n,args:r,blockHash:o,event:u,events:l,fromBlock:s,toBlock:a,strict:c})}async function Q(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const i=n?(0,C.eC)(n):void 0;return function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}(await e.request({method:"eth_feeHistory",params:[(0,C.eC)(t),i||r,o]}))}async function ee(e,{filter:t}){const n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"===typeof e)return e;try{const{eventName:r,args:o}="abi"in t&&t.abi?K({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,X.U)(e,{args:o,eventName:r})}catch(r){let n,o;if(r instanceof g.SM||r instanceof g.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,o=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,X.U)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}var te=n(24453);async function ne(e,{address:t,blockNumber:n,blockTag:r,storageKeys:o}){const i=r??"latest",s=void 0!==n?(0,C.eC)(n):void 0;return function(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?(0,Z.ly)(e.nonce):void 0,storageProof:e.storageProof?(t=e.storageProof,t.map((e=>({...e,value:BigInt(e.value)})))):void 0};var t}(await e.request({method:"eth_getProof",params:[t,o,s||i]}))}var re=n(33639),oe=n(6073);async function ie(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:i}){const s=r||"latest",a=void 0!==n?(0,C.eC)(n):void 0;let c=null;if(o?c=await e.request({method:"eth_getTransactionByHash",params:[o]}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,C.eC)(i)]}):(a||s)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||s,(0,C.eC)(i)]})),!c)throw new re.Bh({blockHash:t,blockNumber:n,blockTag:s,hash:o,index:i});return(e.chain?.formatters?.transaction?.format||oe.Tr)(c)}var se=n(86162),ae=n(30866);async function ce(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new re.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||ae.f)(n)}var ue=n(16693),le=n(97405),de=n(7210),fe=n(47864),he=n(88819);async function pe(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}var me=n(57040);BigInt(0),BigInt(1),BigInt(2);var ge=n(15102);var ye=n(30286);async function be(e,{address:t,hash:n,signature:r,...o}){const i=(0,ge.v)(r)?r:(0,C.NC)(r);try{const{data:r}=await(0,R.s)(e,p.R,"call")({data:(0,ye.w)({abi:ue.$o,args:[t,n,i],bytecode:"0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"}),...o});return s=r??"0x0",a="0x1",function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}((0,ge.v)(s)?(0,v.O0)(s):s,(0,ge.v)(a)?(0,v.O0)(a):a)}catch(c){if(c instanceof le.cg)return!1;throw c}var s,a}async function ve(e,{address:t,message:n,signature:r,...o}){const i=function(e,t){const n="string"===typeof e?(0,v.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,v.O0)(e.raw),r=(0,v.qX)(`\x19Ethereum Signed Message:\n${n.length}`);return(0,x.w)((0,me.zo)([r,n]),t)}(n);return be(e,{address:t,hash:i,signature:r,...o})}var we=n(71352);function xe({domain:e,message:t,primaryType:n,types:r}){const o="undefined"===typeof e?{}:e,i={EIP712Domain:(0,we.cj)({domain:o}),...r};(0,we.iC)({domain:o,message:t,primaryType:n,types:i});const s=["0x1901"];return o&&s.push(function({domain:e,types:t}){return Ee({data:e,primaryType:"EIP712Domain",types:t})}({domain:o,types:i})),"EIP712Domain"!==n&&s.push(Ee({data:t,primaryType:n,types:i})),(0,x.w)((0,me.zo)(s))}function Ee({data:e,primaryType:t,types:n}){const r=_e({data:e,primaryType:t,types:n});return(0,x.w)(r)}function _e({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[ke({primaryType:t,types:n})];for(const i of n[t]){const[t,s]=Ie({types:n,name:i.name,type:i.type,value:e[i.name]});r.push(t),o.push(s)}return(0,E.E)(r,o)}function ke({primaryType:e,types:t}){const n=(0,C.NC)(function({primaryType:e,types:t}){let n="";const r=Se({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const i of o)n+=`${i}(${t[i].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return n}({primaryType:e,types:t}));return(0,x.w)(n)}function Se({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||void 0===t[r])return n;n.add(r);for(const o of t[r])Se({primaryType:o.type,types:t},n);return n}function Ie({types:e,name:t,type:n,value:r}){if(void 0!==e[n])return[{type:"bytes32"},(0,x.w)(_e({data:r,primaryType:n,types:e}))];if("bytes"===n){return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},(0,x.w)(r)]}if("string"===n)return[{type:"bytes32"},(0,x.w)((0,C.NC)(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),i=r.map((n=>Ie({name:t,type:o,types:e,value:n})));return[{type:"bytes32"},(0,x.w)((0,E.E)(i.map((([e])=>e)),i.map((([,e])=>e))))]}return[{type:n},r]}var Ce=n(79814);const Te=new Map,Ae=new Map;let Pe=0;function Oe(e,t,n){const r=++Pe,o=()=>Te.get(e)||[],i=()=>{const t=Ae.get(e);1===o().length&&t&&t(),(()=>{const t=o();Te.set(e,t.filter((e=>e.id!==r)))})()},s=o();if(Te.set(e,[...s,{id:r,fns:t}]),s&&s.length>0)return i;const a={};for(const u in t)a[u]=(...e)=>{const t=o();if(0!==t.length)for(const n of t)n.fns[u]?.(...e)};const c=n(a);return"function"===typeof c&&Ae.set(e,c),i}var je=n(7760),Me=n(96070),Re=n(62914);function Be(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const i=()=>o=!1;return(async()=>{let s;t&&(s=await e({unpoll:i}));const a=await(n?.(s))??r;await(0,Re.D)(a);const c=async()=>{o&&(await e({unpoll:i}),await(0,Re.D)(r),c())};c()})(),i}function Ne(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:i,pollingInterval:s=e.pollingInterval}){let a;return("undefined"!==typeof i?i:"webSocket"!==e.transport.type)?Oe((0,Me.P)(["watchBlockNumber",e.uid,t,n,s]),{onBlockNumber:r,onError:o},(r=>Be((async()=>{try{const t=await(0,R.s)(e,q,"getBlockNumber")({cacheTime:0});if(a){if(t===a)return;if(t-a>1&&n)for(let e=a+1n;e<t;e++)r.onBlockNumber(e,a),a=e}(!a||t>a)&&(r.onBlockNumber(t,a),a=t)}catch(t){r.onError?.(t)}}),{emitOnBegin:t,interval:s}))):(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:i}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const n=(0,Z.y_)(e.result?.number);r(n,a),a=n},onError(e){o?.(e)}});n=i,t||n()}catch(i){o?.(i)}})(),n})()}var Le=n(43310);var Ue=n(39028);var De=n(57331),Fe=n(99238);function ze(e){return{call:t=>(0,p.R)(e,t),createBlockFilter:()=>async function(e){const t=m(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}(e),createContractEventFilter:t=>T(e,t),createEventFilter:t=>A(e,t),createPendingTransactionFilter:()=>P(e),estimateContractGas:t=>async function(e,{abi:t,address:n,args:r,functionName:o,...i}){const s=(0,j.R)({abi:t,args:r,functionName:o});try{return await(0,R.s)(e,B.Q,"estimateGas")({data:s,to:n,...i})}catch(a){const e=i.account?(0,O.T)(i.account):void 0;throw(0,M.S)(a,{abi:t,address:n,args:r,docsPath:"/docs/contract/estimateContractGas",functionName:o,sender:e?.address})}}(e,t),estimateGas:t=>(0,B.Q)(e,t),getBalance:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n?(0,C.eC)(n):void 0,i=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(i)}(e,t),getBlock:t=>(0,U.Q)(e,t),getBlockNumber:t=>q(e,t),getBlockTransactionCount:t=>async function(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=void 0!==n?(0,C.eC)(n):void 0;let i;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]}),(0,Z.ly)(i)}(e,t),getBytecode:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=void 0!==n?(0,C.eC)(n):void 0,i=await e.request({method:"eth_getCode",params:[t,o||r]});if("0x"!==i)return i}(e,t),getChainId:()=>(0,H.L)(e),getContractEvents:t=>J(e,t),getEnsAddress:t=>(0,u.O)(e,t),getEnsAvatar:t=>(0,l.r)(e,t),getEnsName:t=>(0,d.w)(e,t),getEnsResolver:t=>(0,f.S)(e,t),getEnsText:t=>(0,h.g)(e,t),getFeeHistory:t=>Q(e,t),estimateFeesPerGas:t=>(0,N.X)(e,t),getFilterChanges:e=>ee(0,e),getFilterLogs:e=>async function(e,{filter:t}){const n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:r,args:o}="abi"in t&&t.abi?K({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,X.U)(e,{args:o,eventName:r})}catch(r){let n,o;if(r instanceof g.SM||r instanceof g.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,o=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,X.U)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}(0,e),getGasPrice:()=>(0,te.o)(e),getLogs:t=>Y(e,t),getProof:t=>ne(e,t),estimateMaxPriorityFeePerGas:t=>(0,L._)(e,t),getStorageAt:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const i=void 0!==n?(0,C.eC)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,i||r]})}(e,t),getTransaction:t=>ie(e,t),getTransactionConfirmations:t=>async function(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([(0,R.s)(e,q,"getBlockNumber")({}),t?(0,R.s)(e,ie,"getBlockNumber")({hash:t}):void 0]),i=n?.blockNumber||o?.blockNumber;return i?r-i+1n:0n}(e,t),getTransactionCount:t=>(0,se.K)(e,t),getTransactionReceipt:t=>ce(e,t),multicall:t=>async function(e,t){const{allowFailure:n=!0,batchSize:r,blockNumber:o,blockTag:i,contracts:s,multicallAddress:a}=t,c=r??("object"===typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024);let u=a;if(!u){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");u=(0,fe.L)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const l=[[]];let d=0,f=0;for(let g=0;g<s.length;g++){const{abi:e,address:t,args:r,functionName:o}=s[g];try{const n=(0,j.R)({abi:e,args:r,functionName:o});f+=(n.length-2)/2,c>0&&f>c&&l[d].length>0&&(d++,f=(n.length-2)/2,l[d]=[]),l[d]=[...l[d],{allowFailure:!0,callData:n,target:t}]}catch(m){const i=(0,M.S)(m,{abi:e,address:t,args:r,docsPath:"/docs/contract/multicall",functionName:o});if(!n)throw i;l[d]=[...l[d],{allowFailure:!0,callData:"0x",target:t}]}}const h=await Promise.allSettled(l.map((t=>(0,R.s)(e,he.L,"readContract")({abi:ue.F8,address:u,args:[t],blockNumber:o,blockTag:i,functionName:"aggregate3"})))),p=[];for(let y=0;y<h.length;y++){const e=h[y];if("rejected"===e.status){if(!n)throw e.reason;for(let t=0;t<l[y].length;t++)p.push({status:"failure",error:e.reason,result:void 0});continue}const t=e.value;for(let r=0;r<t.length;r++){const{returnData:e,success:o}=t[r],{callData:i}=l[y][r],{abi:a,address:c,functionName:u,args:d}=s[p.length];try{if("0x"===i)throw new g.wb;if(!o)throw new le.VQ({data:e});const t=(0,de.k)({abi:a,args:d,data:e,functionName:u});p.push(n?{result:t,status:"success"}:t)}catch(m){const e=(0,M.S)(m,{abi:a,address:c,args:d,docsPath:"/docs/contract/multicall",functionName:u});if(!n)throw e;p.push({error:e,result:void 0,status:"failure"})}}}if(p.length!==s.length)throw new y.G("multicall results mismatch");return p}(e,t),prepareTransactionRequest:t=>(0,De.Z)(e,t),readContract:t=>(0,he.L)(e,t),sendRawTransaction:t=>(0,Fe.p)(e,t),simulateContract:t=>async function(e,{abi:t,address:n,args:r,dataSuffix:o,functionName:i,...s}){const a=s.account?(0,O.T)(s.account):void 0,c=(0,j.R)({abi:t,args:r,functionName:i});try{const{data:a}=await(0,R.s)(e,p.R,"call")({batch:!1,data:`${c}${o?o.replace("0x",""):""}`,to:n,...s});return{result:(0,de.k)({abi:t,args:r,functionName:i,data:a||"0x"}),request:{abi:t,address:n,args:r,dataSuffix:o,functionName:i,...s}}}catch(u){throw(0,M.S)(u,{abi:t,address:n,args:r,docsPath:"/docs/contract/simulateContract",functionName:i,sender:a?.address})}}(e,t),verifyMessage:t=>ve(e,t),verifyTypedData:t=>async function(e,{address:t,signature:n,message:r,primaryType:o,types:i,domain:s,...a}){return be(e,{address:t,hash:xe({message:r,primaryType:o,types:i,domain:s}),signature:n,...a})}(e,t),uninstallFilter:e=>pe(0,e),waitForTransactionReceipt:t=>async function(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:o=e.pollingInterval,timeout:i}){const s=(0,Me.P)(["waitForTransactionReceipt",e.uid,n]);let a,c,u,l=!1;return new Promise(((d,f)=>{i&&setTimeout((()=>f(new re.mc({hash:n}))),i);const h=Oe(s,{onReplaced:r,resolve:d,reject:f},(r=>{const i=(0,R.s)(e,Ne,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:o,async onBlockNumber(o){if(l)return;let s=o;const d=e=>{i(),e(),h()};try{if(u){if(t>1&&(!u.blockNumber||s-u.blockNumber+1n<t))return;return void d((()=>r.resolve(u)))}if(a||(l=!0,await(0,je.J)((async()=>{a=await(0,R.s)(e,ie,"getTransaction")({hash:n}),a.blockNumber&&(s=a.blockNumber)}),{delay:({count:e})=>200*~~(1<<e),retryCount:6}),l=!1),u=await(0,R.s)(e,ce,"getTransactionReceipt")({hash:n}),t>1&&(!u.blockNumber||s-u.blockNumber+1n<t))return;d((()=>r.resolve(u)))}catch(f){if(a&&(f instanceof re.Bh||f instanceof re.Yb))try{c=a,l=!0;const n=await(0,je.J)((()=>(0,R.s)(e,U.Q,"getBlock")({blockNumber:s,includeTransactions:!0})),{delay:({count:e})=>200*~~(1<<e),retryCount:6,shouldRetry:({error:e})=>e instanceof Ce.f});l=!1;const o=n.transactions.find((({from:e,nonce:t})=>e===c.from&&t===c.nonce));if(!o)return;if(u=await(0,R.s)(e,ce,"getTransactionReceipt")({hash:o.hash}),t>1&&(!u.blockNumber||s-u.blockNumber+1n<t))return;let i="replaced";o.to===c.to&&o.value===c.value?i="repriced":o.from===o.to&&0n===o.value&&(i="cancelled"),d((()=>{r.onReplaced?.({reason:i,replacedTransaction:c,transaction:o,transactionReceipt:u}),r.resolve(u)}))}catch(p){d((()=>r.reject(p)))}else d((()=>r.reject(f)))}}})}))}))}(e,t),watchBlocks:t=>function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){const u="undefined"!==typeof a?a:"webSocket"!==e.transport.type,l=s??!1;let d;return u?Oe((0,Me.P)(["watchBlocks",e.uid,n,r,l,c]),{onBlock:o,onError:i},(o=>Be((async()=>{try{const r=await(0,R.s)(e,U.Q,"getBlock")({blockTag:t,includeTransactions:l});if(r.number&&d?.number){if(r.number===d.number)return;if(r.number-d.number>1&&n)for(let t=d?.number+1n;t<r.number;t++){const n=await(0,R.s)(e,U.Q,"getBlock")({blockNumber:t,includeTransactions:l});o.onBlock(n,d),d=n}}(!d?.number||"pending"===t&&!r?.number||r.number&&r.number>d.number)&&(o.onBlock(r,d),d=r)}catch(r){o.onError?.(r)}}),{emitOnBegin:r,interval:c}))):(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:r}=await e.transport.subscribe({params:["newHeads"],onData(n){if(!t)return;const r=(e.chain?.formatters?.block?.format||Le.Z)(n.result);o(r,d),d=r},onError(e){i?.(e)}});n=r,t||n()}catch(r){i?.(r)}})(),n})()}(e,t),watchBlockNumber:t=>Ne(e,t),watchContractEvent:t=>function(e,{abi:t,address:n,args:r,batch:o=!0,eventName:i,onError:s,onLogs:a,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){return("undefined"!==typeof c?c:"webSocket"!==e.transport.type)?(()=>{const c=(0,Me.P)(["watchContractEvent",n,r,o,e.uid,i,u]),d=l??!1;return Oe(c,{onLogs:a,onError:s},(s=>{let a,c,l=!1;const f=Be((async()=>{if(l)try{let u;if(c)u=await(0,R.s)(e,ee,"getFilterChanges")({filter:c});else{const o=await(0,R.s)(e,q,"getBlockNumber")({});u=a&&a!==o?await(0,R.s)(e,J,"getContractEvents")({abi:t,address:n,args:r,eventName:i,fromBlock:a+1n,toBlock:o,strict:d}):[],a=o}if(0===u.length)return;if(o)s.onLogs(u);else for(const e of u)s.onLogs([e])}catch(u){c&&u instanceof Ue.yR&&(l=!1),s.onError?.(u)}else{try{c=await(0,R.s)(e,T,"createContractEventFilter")({abi:t,address:n,args:r,eventName:i,strict:d})}catch{}l=!0}}),{emitOnBegin:!0,interval:u});return async()=>{c&&await(0,R.s)(e,pe,"uninstallFilter")({filter:c}),f()}}))})():(()=>{let o=!0,c=()=>o=!1;return(async()=>{try{const u=i?S({abi:t,eventName:i,args:r}):[],{unsubscribe:d}=await e.transport.subscribe({params:["logs",{address:n,topics:u}],onData(e){if(!o)return;const n=e.result;try{const{eventName:e,args:r}=K({abi:t,data:n.data,topics:n.topics,strict:l}),o=(0,X.U)(n,{args:r,eventName:e});a([o])}catch(r){let e,t;if(r instanceof g.SM||r instanceof g.Gy){if(l)return;e=r.abiItem.name,t=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,X.U)(n,{args:t?[]:{},eventName:e});a([o])}},onError(e){s?.(e)}});c=d,o||c()}catch(u){s?.(u)}})(),c})()}(e,t),watchEvent:t=>function(e,{address:t,args:n,batch:r=!0,event:o,events:i,onError:s,onLogs:a,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){const d="undefined"!==typeof c?c:"webSocket"!==e.transport.type,f=l??!1;return d?Oe((0,Me.P)(["watchEvent",t,n,r,e.uid,o,u]),{onLogs:a,onError:s},(s=>{let a,c,l=!1;const d=Be((async()=>{if(l)try{let u;if(c)u=await(0,R.s)(e,ee,"getFilterChanges")({filter:c});else{const r=await(0,R.s)(e,q,"getBlockNumber")({});u=a&&a!==r?await(0,R.s)(e,Y,"getLogs")({address:t,args:n,event:o,events:i,fromBlock:a+1n,toBlock:r}):[],a=r}if(0===u.length)return;if(r)s.onLogs(u);else for(const e of u)s.onLogs([e])}catch(u){c&&u instanceof Ue.yR&&(l=!1),s.onError?.(u)}else{try{c=await(0,R.s)(e,A,"createEventFilter")({address:t,args:n,event:o,events:i,strict:f})}catch{}l=!0}}),{emitOnBegin:!0,interval:u});return async()=>{c&&await(0,R.s)(e,pe,"uninstallFilter")({filter:c}),d()}})):(()=>{let r=!0,c=()=>r=!1;return(async()=>{try{const u=i??(o?[o]:void 0);let d=[];u&&(d=[u.flatMap((e=>S({abi:[e],eventName:e.name,args:n})))],o&&(d=d[0]));const{unsubscribe:h}=await e.transport.subscribe({params:["logs",{address:t,topics:d}],onData(e){if(!r)return;const t=e.result;try{const{eventName:e,args:n}=K({abi:u,data:t.data,topics:t.topics,strict:f}),r=(0,X.U)(t,{args:n,eventName:e});a([r])}catch(n){let e,r;if(n instanceof g.SM||n instanceof g.Gy){if(l)return;e=n.abiItem.name,r=n.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,X.U)(t,{args:r?[]:{},eventName:e});a([o])}},onError(e){s?.(e)}});c=h,r||c()}catch(u){s?.(u)}})(),c})()}(e,t),watchPendingTransactions:t=>function(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:i=e.pollingInterval}){return("undefined"!==typeof o?o:"webSocket"!==e.transport.type)?Oe((0,Me.P)(["watchPendingTransactions",e.uid,t,i]),{onTransactions:r,onError:n},(n=>{let r;const o=Be((async()=>{try{if(!r)try{return void(r=await(0,R.s)(e,P,"createPendingTransactionFilter")({}))}catch(i){throw o(),i}const s=await(0,R.s)(e,ee,"getFilterChanges")({filter:r});if(0===s.length)return;if(t)n.onTransactions(s);else for(const e of s)n.onTransactions([e])}catch(i){n.onError?.(i)}}),{emitOnBegin:!0,interval:i});return async()=>{r&&await(0,R.s)(e,pe,"uninstallFilter")({filter:r}),o()}})):(()=>{let t=!0,o=()=>t=!1;return(async()=>{try{const{unsubscribe:i}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const n=e.result;r([n])},onError(e){n?.(e)}});o=i,t||o()}catch(i){n?.(i)}})(),o})()}(e,t)}}function $e(e){const{key:t="public",name:n="Public Client"}=e;return(0,c.e)({...e,key:t,name:n,type:"publicClient"}).extend(ze)}var qe=n(37029),Ze=n(31031);function He(e,t={}){const{key:n="fallback",name:r="Fallback",rank:o=!1,retryCount:i,retryDelay:s}=t;return({chain:t,pollingInterval:a=4e3,timeout:c})=>{let u=e,l=()=>{};const d=(0,Ze.q)({key:n,name:r,async request({method:e,params:n}){const r=async(o=0)=>{const i=u[o]({chain:t,retryCount:0,timeout:c});try{const t=await i.request({method:e,params:n});return l({method:e,params:n,response:t,transport:i,status:"success"}),t}catch(s){if(l({error:s,method:e,params:n,transport:i,status:"error"}),(0,qe.y)(s))throw s;if(o===u.length-1)throw s;return r(o+1)}};return r()},retryCount:i,retryDelay:s,type:"fallback"},{onResponse:e=>l=e,transports:u.map((e=>e({chain:t,retryCount:0})))});if(o){const e="object"===typeof o?o:{};!function({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:o=1e3,transports:i,weights:s={}}){const{stability:a=.7,latency:c=.3}=s,u=[],l=async()=>{const s=await Promise.all(i.map((async t=>{const n=t({chain:e,retryCount:0,timeout:o}),r=Date.now();let i,s;try{await n.request({method:"net_listening"}),s=1}catch{s=0}finally{i=Date.now()}return{latency:i-r,success:s}})));u.push(s),u.length>r&&u.shift();const d=Math.max(...u.map((e=>Math.max(...e.map((({latency:e})=>e)))))),f=i.map(((e,t)=>{const n=u.map((e=>e[t].latency)),r=1-n.reduce(((e,t)=>e+t),0)/n.length/d,o=u.map((e=>e[t].success)),i=o.reduce(((e,t)=>e+t),0)/o.length;return 0===i?[0,t]:[c*r+a*i,t]})).sort(((e,t)=>t[0]-e[0]));n(f.map((([,e])=>i[e]))),await(0,Re.D)(t),l()};l()}({chain:t,interval:e.interval??a,onTransports:e=>u=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:u,weights:e.weights})}return d}}var We=n(78863);class Ge extends y.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Ke=n(32357),Ve=n(54943);function Xe(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise(((o,i)=>{(async()=>{let s;try{const a=new AbortController;n>0&&(s=setTimeout((()=>{r?a.abort():i(t)}),n)),o(await e({signal:a?.signal}))}catch(a){"AbortError"===a.name&&i(t),i(a)}finally{clearTimeout(s)}})()}))}let Ye=0;const Je=new Map;async function Qe(e){let t=Je.get(e);if(t)return t;const{schedule:n}=(0,Ke.S)({id:e,fn:async()=>{const n=new Ve.WebSocket(e),r=new Map,o=new Map,i=({data:e})=>{const t=JSON.parse(e),n="eth_subscription"===t.method,i=n?t.params.subscription:t.id,s=n?o:r,a=s.get(i);a&&a({data:e}),n||s.delete(i)},s=()=>{Je.delete(e),n.removeEventListener("close",s),n.removeEventListener("message",i)};return n.addEventListener("close",s),n.addEventListener("message",i),n.readyState===Ve.WebSocket.CONNECTING&&await new Promise(((e,t)=>{n&&(n.onopen=e,n.onerror=t)})),t=Object.assign(n,{requests:r,subscriptions:o}),Je.set(e,t),[t]}}),[r,[o]]=await n();return o}const et={http:async function(e,{body:t,fetchOptions:n={},timeout:r=1e4}){const{headers:o,method:i,signal:s}=n;try{const a=await Xe((async({signal:a})=>await fetch(e,{...n,body:Array.isArray(t)?(0,Me.P)(t.map((e=>({jsonrpc:"2.0",id:e.id??Ye++,...e})))):(0,Me.P)({jsonrpc:"2.0",id:t.id??Ye++,...t}),headers:{...o,"Content-Type":"application/json"},method:i||"POST",signal:s||(r>0?a:void 0)})),{errorInstance:new We.W5({body:t,url:e}),timeout:r,signal:!0});let c;if(c=a.headers.get("Content-Type")?.startsWith("application/json")?await a.json():await a.text(),!a.ok)throw new We.Gg({body:t,details:(0,Me.P)(c.error)||a.statusText,headers:a.headers,status:a.status,url:e});return c}catch(a){if(a instanceof We.Gg)throw a;if(a instanceof We.W5)throw a;throw new We.Gg({body:t,details:a.message,url:e})}},webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new We.c9({body:t,url:e.url,details:"Socket is closed."});const r=Ye++,o=({data:i})=>{const s=JSON.parse(i);"number"===typeof s.id&&r!==s.id||(n?.(s),"eth_subscribe"===t.method&&"string"===typeof s.result&&e.subscriptions.set(s.result,o),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(r,o),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:r})),e},webSocketAsync:async function(e,{body:t,timeout:n=1e4}){return Xe((()=>new Promise((n=>et.webSocket(e,{body:t,onResponse:n})))),{errorInstance:new We.W5({body:t,url:e.url}),timeout:n})}};var tt=n(57858),nt=n(84192);const rt=e=>(t,n,r)=>{const o=r.subscribe;r.subscribe=(e,t,n)=>{let i=e;if(t){const o=(null==n?void 0:n.equalityFn)||Object.is;let s=e(r.getState());i=n=>{const r=e(n);if(!o(s,r)){const e=s;t(s=r,e)}},(null==n?void 0:n.fireImmediately)&&t(s,s)}return o(i)};return e(t,n,r)};function ot(e,t){let n;try{n=e()}catch(r){return}return{getItem:e=>{var r;const o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}const it=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>it(e)(n),catch(e){return this}}}catch(n){return{then(e){return this},catch:e=>it(e)(n)}}},st=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let u;try{u=i.getStorage()}catch(g){}if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const l=it(i.serialize),d=()=>{const e=i.partialize({...r()});let t;const n=l({state:e,version:i.version}).then((e=>u.setItem(i.name,e))).catch((e=>{t=e}));if(t)throw t;return n},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};const h=e(((...e)=>{n(...e),d()}),r,o);let p;const m=()=>{var e;if(!u)return;s=!1,a.forEach((e=>e(r())));const t=(null==(e=i.onRehydrateStorage)?void 0:e.call(i,r()))||void 0;return it(u.getItem.bind(u))(i.name).then((e=>{if(e)return i.deserialize(e)})).then((e=>{if(e){if("number"!==typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=i.merge(e,null!=(t=r())?t:h),n(p,!0),d()})).then((()=>{null==t||t(p,void 0),s=!0,c.forEach((e=>e(p)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{i={...i,...e},e.getStorage&&(u=e.getStorage())},clearStorage:()=>{null==u||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),p||h})(e,t)):((e,t)=>(n,r,o)=>{let i={storage:ot((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let u=i.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const l=()=>{const e=i.partialize({...r()});return u.setItem(i.name,{state:e,version:i.version})},d=o.setState;o.setState=(e,t)=>{d(e,t),l()};const f=e(((...e)=>{n(...e),l()}),r,o);let h;const p=()=>{var e,t;if(!u)return;s=!1,a.forEach((e=>{var t;return e(null!=(t=r())?t:f)}));const o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=r())?e:f))||void 0;return it(u.getItem.bind(u))(i.name).then((e=>{if(e){if("number"!==typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return h=i.merge(e,null!=(t=r())?t:f),n(h,!0),l()})).then((()=>{null==o||o(h,void 0),h=r(),s=!0,c.forEach((e=>e(h)))})).catch((e=>{null==o||o(void 0,e)}))};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>p(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},i.skipHydration||p(),h||f})(e,t),at=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"===typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!==typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},ct=e=>e?at(e):at;var ut=n(15229),lt=n(61836);function dt(e,t){if(Object.is(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var ft=n(45775),ht=n(21803);function pt(e,t,{batch:n={multicall:{wait:32}},pollingInterval:r=4e3,rank:o,retryCount:i,retryDelay:s,stallTimeout:a}={}){if(!e.length)throw new Error("must have at least one chain");let c=[];const u={},l={};for(const d of e){let e=!1;for(const n of t){const t=n(d);t&&(e=!0,c.some((({id:e})=>e===d.id))||(c=[...c,t.chain]),u[d.id]=[...u[d.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(l[d.id]=[...l[d.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw new Error([`Could not find valid provider configuration for chain "${d.name}".\n`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join("\n"))}return{chains:c,publicClient:({chainId:t})=>{const l=c.find((e=>e.id===t))??e[0],d=u[l.id];if(!d||!d[0])throw new Error(`No providers configured for chain "${l.id}"`);const f=$e({batch:n,chain:l,transport:He(d.map((e=>function(e,t={}){const{batch:n,fetchOptions:r,key:o="http",name:i="HTTP JSON-RPC",retryDelay:s}=t;return({chain:a,retryCount:c,timeout:u})=>{const{batchSize:l=1e3,wait:d=0}="object"===typeof n?n:{},f=t.retryCount??c,h=u??t.timeout??1e4,p=e||a?.rpcUrls.default.http[0];if(!p)throw new Ge;return(0,Ze.q)({key:o,name:i,async request({method:t,params:o}){const i={method:t,params:o},{schedule:s}=(0,Ke.S)({id:`${e}`,wait:d,shouldSplitBatch:e=>e.length>l,fn:e=>et.http(p,{body:e,fetchOptions:r,timeout:h}),sort:(e,t)=>e.id-t.id}),[{error:a,result:c}]=await(async e=>n?s(e):[await et.http(p,{body:e,fetchOptions:r,timeout:h})])(i);if(a)throw new We.bs({body:i,error:a,url:p});return c},retryCount:f,retryDelay:s,timeout:h,type:"http"},{fetchOptions:r,url:e})}}(e,{timeout:a}))),{rank:o,retryCount:i,retryDelay:s}),pollingInterval:r});return Object.assign(f,{chains:c})},webSocketPublicClient:({chainId:t})=>{const u=c.find((e=>e.id===t))??e[0],d=l[u.id];if(!d||!d[0])return;const f=$e({batch:n,chain:u,transport:He(d.map((e=>function(e,t={}){const{key:n="webSocket",name:r="WebSocket JSON-RPC",retryDelay:o}=t;return({chain:i,retryCount:s,timeout:a})=>{const c=t.retryCount??s,u=a??t.timeout??1e4,l=e||i?.rpcUrls.default.webSocket?.[0];if(!l)throw new Ge;return(0,Ze.q)({key:n,name:r,async request({method:e,params:t}){const n={method:e,params:t},r=await Qe(l),{error:o,result:i}=await et.webSocketAsync(r,{body:n,timeout:u});if(o)throw new We.bs({body:n,error:o,url:l});return i},retryCount:c,retryDelay:o,timeout:u,type:"webSocket"},{getSocket:()=>Qe(l),async subscribe({params:e,onData:t,onError:n}){const r=await Qe(l),{result:o}=await new Promise(((o,i)=>et.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return i(e.error),void n?.(e.error);"number"!==typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>et.webSocket(r,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}(e,{timeout:a}))),{rank:o,retryCount:i,retryDelay:s}),pollingInterval:r});return Object.assign(f,{chains:c})}}}var mt=class extends Error{constructor({activeChain:e,targetChain:t}){super(`Chain mismatch: Expected "${t}", received "${e}".`),this.name="ChainMismatchError"}},gt=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},yt=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},bt=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},vt=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function wt(e,t){if(e===t)return!0;if(e&&t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!=t.length)return!1;for(r=n;0!==r--;)if(!wt(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(n&&!wt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}var xt=(e,{find:t,replace:n})=>e&&t(e)?n(e):"object"!==typeof e?e:Array.isArray(e)?e.map((e=>xt(e,{find:t,replace:n}))):e instanceof Object?Object.entries(e).reduce(((e,[r,o])=>({...e,[r]:xt(o,{find:t,replace:n})})),{}):e;function Et(e){const t=JSON.parse(e);return xt(t,{find:e=>"string"===typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))})}function _t(e){return{accessList:e.accessList,account:e.account,blockNumber:e.blockNumber,blockTag:e.blockTag,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}function kt(e){return{accessList:e.accessList,account:e.account,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}function St(e){return"number"===typeof e?e:"wei"===e?0:Math.abs(nt.Bd[e])}function It(e,t){return e.slice(0,t).join(".")||"."}function Ct(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function Tt(e,t,n,r){return JSON.stringify(e,function(e,t){const n="function"===typeof e,r="function"===typeof t,o=[],i=[];return function(s,a){if("object"===typeof a)if(o.length){const e=Ct(o,this);0===e?o[o.length]=this:(o.splice(e),i.splice(e)),i[i.length]=s;const n=Ct(o,a);if(0!==n)return r?t.call(this,s,a,It(i,n)):`[ref=${It(i,n)}]`}else o[0]=a,i[0]=s;return n?e.call(this,s,a):a}}(((e,n)=>{const r="bigint"===typeof n?`#bigint.${n.toString()}`:n;return t?.(e,r)||r}),r),n??void 0)}var At={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function Pt({deserialize:e=Et,key:t="wagmi",serialize:n=Tt,storage:r}){return{...r,getItem:(n,o=null)=>{const i=r.getItem(`${t}.${n}`);try{return i?e(i):o}catch(s){return console.warn(s),o}},setItem:(e,o)=>{if(null===o)r.removeItem(`${t}.${e}`);else try{r.setItem(`${t}.${e}`,n(o))}catch(i){console.error(i)}},removeItem:e=>r.removeItem(`${t}.${e}`)}}var Ot,jt,Mt,Rt,Bt,Nt="store";function Lt(e){const t=new class{constructor({autoConnect:e=!1,connectors:t=[new r._],publicClient:n,storage:i=Pt({storage:"undefined"!==typeof window?window.localStorage:At}),logger:c={warn:console.warn},webSocketPublicClient:u}){s(this,Mt),this.publicClients=new Map,this.webSocketPublicClients=new Map,s(this,Ot,void 0),s(this,jt,void 0),this.args={autoConnect:e,connectors:t,logger:c,publicClient:n,storage:i,webSocketPublicClient:u};let l,d="disconnected";if(e)try{const e=i.getItem(Nt)?.state?.data;d=e?.account?"reconnecting":"connecting",l=e?.chain?.id}catch(g){}const f="function"===typeof t?t():t;var h,p,m;f.forEach((e=>e.setStorage(i))),this.store=ct(rt(st((()=>({connectors:f,publicClient:this.getPublicClient({chainId:l}),status:d,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})})),{name:Nt,storage:i,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}))),this.storage=i,a(this,jt,i?.getItem("wallet")),(h=this,p=Mt,m=Rt,o(h,p,"access private method"),m).call(this),e&&"undefined"!==typeof window&&setTimeout((async()=>await this.autoConnect()),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const t="function"===typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState((e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"})))}async destroy(){this.connector&&await(this.connector.disconnect?.()),a(this,Ot,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(i(this,Ot))return;a(this,Ot,!0),this.setState((e=>({...e,status:e.data?.account?"reconnecting":"connecting"})));const e=i(this,jt)?[...this.connectors].sort((e=>e.id===i(this,jt)?-1:1)):this.connectors;let t=!1;for(const n of e){if(!n.ready||!n.isAuthorized)continue;if(!(await n.isAuthorized()))continue;const e=await n.connect();this.setState((t=>({...t,connector:n,chains:n?.chains,data:e,status:"connected"}))),t=!0;break}return t||this.setState((e=>({...e,data:void 0,status:"disconnected"}))),a(this,Ot,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const t="function"===typeof e?e():e;t.forEach((e=>e.setStorage(this.args.storage))),this.setState((e=>({...e,connectors:t})))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.publicClients.get(e??-1),t)return t;const{publicClient:n}=this.args;return t="function"===typeof n?n({chainId:e}):n,this.publicClients.set(e??-1,t),t}setPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState((e=>({...e,publicClient:this.getPublicClient({chainId:t})})))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.webSocketPublicClients.get(e??-1),t)return t;const{webSocketPublicClient:n}=this.args;return t="function"===typeof n?n({chainId:e}):n,t&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState((e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})})))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}}(e);return Bt=t,t}function Ut(){if(!Bt)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return Bt}async function Dt({chainId:e,connector:t}){const n=Ut(),r=n.connector;if(r&&t.id===r.id)throw new yt;try{n.setState((e=>({...e,status:"connecting"})));const r=await t.connect({chainId:e});return n.setLastUsedConnector(t.id),n.setState((e=>({...e,connector:t,chains:t?.chains,data:r,status:"connected"}))),n.storage.setItem("connected",!0),{...r,connector:t}}catch(o){throw n.setState((e=>({...e,status:e.connector?"connected":"disconnected"}))),o}}async function Ft(){const e=Ut();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}Ot=new WeakMap,jt=new WeakMap,Mt=new WeakSet,Rt=function(){const e=e=>{this.setState((t=>({...t,data:{...t.data,...e}})))},t=()=>{this.clearState()},n=e=>{this.setState((t=>({...t,error:e})))};this.store.subscribe((({connector:e})=>e),((r,o)=>{o?.off?.("change",e),o?.off?.("disconnect",t),o?.off?.("error",n),r&&(r.on?.("change",e),r.on?.("disconnect",t),r.on?.("error",n))}));const{publicClient:r,webSocketPublicClient:o}=this.args;("function"===typeof r||"function"===typeof o)&&this.store.subscribe((({data:e})=>e?.chain?.id),(e=>{this.setState((t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})})))}))};var zt=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],$t=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function qt({chainId:e}={}){const t=Ut();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function Zt({chainId:e}={}){const t=Ut();return await(t.connector?.getWalletClient?.({chainId:e}))||null}function Ht({chainId:e}={}){const t=Ut();return e&&t.getWebSocketPublicClient({chainId:e})||t.webSocketPublicClient}function Wt(e,t){return Ut().subscribe((({publicClient:e})=>e),(async()=>t(qt(e))))}function Gt({chainId:e},t){return Ut().subscribe((({data:e,connector:t})=>({account:e?.account,chainId:e?.chain?.id,connector:t})),(async({chainId:n})=>{if(e&&n&&e!==n)return;const r=await Zt({chainId:e});return Ut().connector?t(r):t(null)}),{equalityFn:dt})}function Kt(e,t){return Ut().subscribe((({webSocketPublicClient:e})=>e),(async()=>t(Ht(e))))}async function Vt({abi:e,address:t,args:n,chainId:r,dataSuffix:o,functionName:i,walletClient:s,...a}){const c=qt({chainId:r}),u=s??await Zt({chainId:r});if(!u)throw new tt.N;r&&hn({chainId:r});const{account:l,accessList:d,blockNumber:f,blockTag:h,gas:p,gasPrice:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:b,value:v}=_t(a),{result:w,request:x}=await c.simulateContract({abi:e,address:t,functionName:i,args:n,account:l||u.account,accessList:d,blockNumber:f,blockTag:h,dataSuffix:o,gas:p,gasPrice:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:b,value:v});return{mode:"prepared",request:{...x,abi:e.filter((e=>"name"in e&&e.name===i)),chainId:r},result:w}}async function Xt({chainId:e,contracts:t,blockNumber:n,blockTag:r,...o}){const i=qt({chainId:e});if(!i.chains)throw new bt;if(e&&i.chain.id!==e)throw new gt({chainId:e});return i.multicall({allowFailure:o.allowFailure??!0,blockNumber:n,blockTag:r,contracts:t})}async function Yt({address:e,account:t,chainId:n,abi:r,args:o,functionName:i,blockNumber:s,blockTag:a}){return qt({chainId:n}).readContract({abi:r,address:e,account:t,functionName:i,args:o,blockNumber:s,blockTag:a})}async function Jt({contracts:e,blockNumber:t,blockTag:n,...r}){const{allowFailure:o=!0}=r;try{const r=qt(),i=e.reduce(((e,t,n)=>{const o=t.chainId??r.chain.id;return{...e,[o]:[...e[o]||[],{contract:t,index:n}]}}),{}),s=()=>Object.entries(i).map((([e,r])=>Xt({allowFailure:o,chainId:parseInt(e),contracts:r.map((({contract:e})=>e)),blockNumber:t,blockTag:n}))),a=(await Promise.all(s())).flat(),c=Object.values(i).flatMap((e=>e.map((({index:e})=>e))));return a.reduce(((e,t,n)=>(e&&(e[c[n]]=t),e)),[])}catch(i){if(i instanceof le.uq)throw i;const r=()=>e.map((e=>Yt({...e,blockNumber:t,blockTag:n})));return o?(await Promise.allSettled(r())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(r())}}async function Qt(e){const t=await Zt({chainId:e.chainId});if(!t)throw new tt.N;let n;if(e.chainId&&hn({chainId:e.chainId}),"prepared"===e.mode)n=e.request;else{const{chainId:t,mode:r,...o}=e;n=(await Vt(o)).request}return{hash:await t.writeContract({...n,chain:e.chainId?{id:e.chainId}:null})}}async function en({address:e,chainId:t,formatUnits:n,token:r}){const o=Ut(),i=qt({chainId:t});if(r){const o=async({abi:o})=>{const i={abi:o,address:r,chainId:t},[s,a,c]=await Jt({allowFailure:!1,contracts:[{...i,functionName:"balanceOf",args:[e]},{...i,functionName:"decimals"},{...i,functionName:"symbol"}]});return{decimals:a,formatted:(0,ut.b)(s??"0",St(n??a)),symbol:c,value:s}};try{return await o({abi:zt})}catch(u){if(u instanceof le.uq){const{symbol:e,...t}=await o({abi:$t});return{symbol:(0,Z.rR)((0,lt.f)(e,{dir:"right"})),...t}}throw u}}const s=[...o.publicClient.chains||[],...o.chains??[]],a=await i.getBalance({address:e}),c=s.find((e=>e.id===i.chain.id));return{decimals:c?.nativeCurrency.decimals??18,formatted:(0,ut.b)(a??"0",St(n??18)),symbol:c?.nativeCurrency.symbol??"ETH",value:a}}function tn(){const{data:e,connector:t,status:n}=Ut();switch(n){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:n};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:n};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:n};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:n}}}function nn(){const e=Ut(),t=e.data?.chain?.id,n=e.chains??[],r=[...e.publicClient?.chains||[],...n].find((e=>e.id===t))??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...r,...e.data?.chain,id:t}:void 0,chains:n}}async function rn(e){const t=await Zt();if(!t)throw new tt.N;return await t.signMessage({message:e.message})}async function on({chainId:e}){const{connector:t}=Ut();if(!t)throw new tt.N;if(!t.switchChain)throw new vt({connector:t});return t.switchChain(e)}function sn(e,{selector:t=(e=>e)}={}){return Ut().subscribe((({data:e,connector:n,status:r})=>t({address:e?.account,connector:n,status:r})),(()=>e(tn())),{equalityFn:dt})}function an(e,{selector:t=(e=>e)}={}){return Ut().subscribe((({data:e,chains:n})=>t({chainId:e?.chain?.id,chains:n})),(()=>e(nn())),{equalityFn:dt})}async function cn({name:e,chainId:t}){const{normalize:r}=await n.e(6512).then(n.bind(n,46512)),o=qt({chainId:t});return await o.getEnsAvatar({name:r(e)})}async function un({address:e,chainId:t}){return qt({chainId:t}).getEnsName({address:(0,ft.K)(e)})}async function ln({chainId:e}={}){const t=qt({chainId:e});return await t.getBlockNumber()}async function dn({chainId:e,formatUnits:t="gwei"}={}){const n=qt({chainId:e}),r=await n.getBlock();let o=null;try{o=await n.getGasPrice()}catch{}let i=null,s=null,a=null;r?.baseFeePerGas&&(i=r.baseFeePerGas,a=function(e,t="wei"){return(0,ht.v)(e,nt.Zn[t])}("1"),s=2n*r.baseFeePerGas+a);const c=St(t);return{lastBaseFeePerGas:i,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,formatted:{gasPrice:o?(0,ut.b)(o,c):null,maxFeePerGas:s?(0,ut.b)(s,c):null,maxPriorityFeePerGas:a?(0,ut.b)(a,c):null}}}async function fn({chainId:e,confirmations:t=1,hash:n,onReplaced:r,timeout:o=0}){const i=qt({chainId:e}),s=await i.waitForTransactionReceipt({hash:n,confirmations:t,onReplaced:r,timeout:o});if("reverted"===s.status){const e=await i.getTransaction({hash:s.transactionHash}),t=await i.call({...e,gasPrice:"eip1559"!==e.type?e.gasPrice:void 0,maxFeePerGas:"eip1559"===e.type?e.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===e.type?e.maxPriorityFeePerGas:void 0}),n=(0,Z.rR)(`0x${t.substring(138)}`);throw new Error(n)}return s}function hn({chainId:e}){const{chain:t,chains:n}=nn(),r=t?.id;if(r&&e!==r)throw new mt({activeChain:n.find((e=>e.id===r))?.name??`Chain ${r}`,targetChain:n.find((t=>t.id===e))?.name??`Chain ${e}`})}},54943:function(e,t,n){"use strict";n.r(t),n.d(t,{WebSocket:function(){return r}});const r=function(){if("undefined"!==typeof WebSocket)return WebSocket;if("undefined"!==typeof global.WebSocket)return global.WebSocket;if("undefined"!==typeof window.WebSocket)return window.WebSocket;if("undefined"!==typeof self.WebSocket)return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}()},91835:function(e,t,n){"use strict";n.d(t,{gh:function(){return Re}});var r={};n.r(r),n.d(r,{identity:function(){return C}});var o={};n.r(o),n.d(o,{base2:function(){return T}});var i={};n.r(i),n.d(i,{base8:function(){return A}});var s={};n.r(s),n.d(s,{base10:function(){return P}});var a={};n.r(a),n.d(a,{base16:function(){return O},base16upper:function(){return j}});var c={};n.r(c),n.d(c,{base32:function(){return M},base32hex:function(){return L},base32hexpad:function(){return D},base32hexpadupper:function(){return F},base32hexupper:function(){return U},base32pad:function(){return B},base32padupper:function(){return N},base32upper:function(){return R},base32z:function(){return z}});var u={};n.r(u),n.d(u,{base36:function(){return $},base36upper:function(){return q}});var l={};n.r(l),n.d(l,{base58btc:function(){return Z},base58flickr:function(){return H}});var d={};n.r(d),n.d(d,{base64:function(){return W},base64pad:function(){return G},base64url:function(){return K},base64urlpad:function(){return V}});var f={};n.r(f),n.d(f,{base256emoji:function(){return Q}});var h={};n.r(h),n.d(h,{sha256:function(){return we},sha512:function(){return xe}});var p={};n.r(p),n.d(p,{identity:function(){return _e}});var m={};n.r(m),n.d(m,{code:function(){return Se},decode:function(){return Ce},encode:function(){return Ie},name:function(){return ke}});var g={};n.r(g),n.d(g,{code:function(){return Oe},decode:function(){return Me},encode:function(){return je},name:function(){return Pe}});var y=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),s=i.charCodeAt(0);if(255!==n[s])throw new TypeError(i+" is ambiguous");n[s]=o}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function d(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,o=0;e[t]===c;)r++,t++;for(var i=(e.length-t)*u+1>>>0,s=new Uint8Array(i);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=i-1;(0!==l||d<o)&&-1!==f;f--,d++)l+=a*s[f]>>>0,s[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=d,t++}if(" "!==e[t]){for(var h=i-o;h!==i&&0===s[h];)h++;for(var p=new Uint8Array(r+(i-h)),m=r;h!==i;)p[m++]=s[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,o=0,i=t.length;o!==i&&0===t[o];)o++,n++;for(var s=(i-o)*l+1>>>0,u=new Uint8Array(s);o!==i;){for(var d=t[o],f=0,h=s-1;(0!==d||f<r)&&-1!==h;h--,f++)d+=256*u[h]>>>0,u[h]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,o++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var m=c.repeat(n);p<s;++p)m+=e.charAt(u[p]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}};new Uint8Array(0);const b=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class v{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class w{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return E(this,e)}}class x{constructor(e){this.decoders=e}or(e){return E(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const E=(e,t)=>new x({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new v(e,t,n),this.decoder=new w(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const k=({name:e,prefix:t,encode:n,decode:r})=>new _(e,t,n,r),S=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:o}=y(n,t);return k({prefix:e,name:t,encode:r,decode:e=>b(o(e))})},I=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>k({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],o=(1<<n)-1;let i="",s=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],s+=8;s>n;)s-=n,i+=t[o&a>>s];if(s&&(i+=t[o&a<<n-s]),r)for(;i.length*n&7;)i+="=";return i})(e,r,n),decode:t=>((e,t,n,r)=>{const o={};for(let l=0;l<t.length;++l)o[t[l]]=l;let i=e.length;for(;"="===e[i-1];)--i;const s=new Uint8Array(i*n/8|0);let a=0,c=0,u=0;for(let l=0;l<i;++l){const t=o[e[l]];if(void 0===t)throw new SyntaxError(`Non-${r} character`);c=c<<n|t,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)}),C=k({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),T=I({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),A=I({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),P=S({prefix:"9",name:"base10",alphabet:"0123456789"}),O=I({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),j=I({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),M=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),R=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),B=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),N=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),L=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),D=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),F=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),z=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),$=S({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),q=S({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Z=S({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),H=S({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),W=I({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),G=I({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),K=I({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),V=I({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),X=Array.from("\ud83d\ude80\ud83e\ude90\u2604\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\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\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\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\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\u2763\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\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\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\u26bd\ud83e\udd19\u2615\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\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\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\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\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\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\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"),Y=X.reduce(((e,t,n)=>(e[n]=t,e)),[]),J=X.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const Q=k({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Y[t]),"")},decode:function(e){const t=[];for(const n of e){const e=J[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var ee=function e(t,n,r){n=n||[];var o=r=r||0;for(;t>=te;)n[r++]=255&t|128,t/=128;for(;-128&t;)n[r++]=255&t|128,t>>>=7;return n[r]=0|t,e.bytes=r-o+1,n},te=Math.pow(2,31);var ne=function e(t,n){var r,o=0,i=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],o+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128);return e.bytes=s-n,o};var re=Math.pow(2,7),oe=Math.pow(2,14),ie=Math.pow(2,21),se=Math.pow(2,28),ae=Math.pow(2,35),ce=Math.pow(2,42),ue=Math.pow(2,49),le=Math.pow(2,56),de=Math.pow(2,63),fe={encode:ee,decode:ne,encodingLength:function(e){return e<re?1:e<oe?2:e<ie?3:e<se?4:e<ae?5:e<ce?6:e<ue?7:e<le?8:e<de?9:10}};const he=(e,t,n=0)=>(fe.encode(e,t,n),t),pe=e=>fe.encodingLength(e),me=(e,t)=>{const n=t.byteLength,r=pe(e),o=r+pe(n),i=new Uint8Array(o+n);return he(e,i,0),he(n,i,r),i.set(t,o),new ge(e,n,t,i)};class ge{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const ye=({name:e,code:t,encode:n})=>new be(e,t,n);class be{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?me(this.code,t):t.then((e=>me(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ve=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),we=ye({name:"sha2-256",code:18,encode:ve("SHA-256")}),xe=ye({name:"sha2-512",code:19,encode:ve("SHA-512")}),Ee=b,_e={code:0,name:"identity",encode:Ee,digest:e=>me(0,Ee(e))},ke="raw",Se=85,Ie=e=>b(e),Ce=e=>b(e),Te=new TextEncoder,Ae=new TextDecoder,Pe="json",Oe=512,je=e=>Te.encode(JSON.stringify(e)),Me=e=>JSON.parse(Ae.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const Re={...r,...o,...i,...s,...a,...c,...u,...l,...d,...f}},97884:function(e,t,n){"use strict";n.r(t),n.d(t,{Struct:function(){return l},StructError:function(){return r},any:function(){return S},array:function(){return I},assert:function(){return d},assign:function(){return g},bigint:function(){return C},boolean:function(){return T},coerce:function(){return X},create:function(){return f},date:function(){return A},defaulted:function(){return Y},define:function(){return y},deprecated:function(){return b},dynamic:function(){return v},empty:function(){return Q},enums:function(){return P},func:function(){return O},instance:function(){return j},integer:function(){return M},intersection:function(){return R},is:function(){return p},lazy:function(){return w},literal:function(){return B},map:function(){return N},mask:function(){return h},max:function(){return te},min:function(){return ne},never:function(){return L},nonempty:function(){return re},nullable:function(){return U},number:function(){return D},object:function(){return F},omit:function(){return x},optional:function(){return z},partial:function(){return E},pattern:function(){return oe},pick:function(){return _},record:function(){return $},refine:function(){return se},regexp:function(){return q},set:function(){return Z},size:function(){return ie},string:function(){return H},struct:function(){return k},trimmed:function(){return J},tuple:function(){return W},type:function(){return G},union:function(){return K},unknown:function(){return V},validate:function(){return m}});class r extends TypeError{constructor(e,t){let n;const{message:r,explanation:o,...i}=e,{path:s}=e,a=0===s.length?r:`At path: ${s.join(".")} -- ${r}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function o(e){return"object"===typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"===typeof e?e.toString():"string"===typeof e?JSON.stringify(e):`${e}`}function a(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"===typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=n,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(r)}\``}=e;return{value:r,type:a,refinement:c,key:o[o.length-1],path:o,branch:i,...e,message:u}}function*c(e,t,n,r){var i;o(i=e)&&"function"===typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,n,r);e&&(yield e)}}function*u(e,t,n={}){const{path:r=[],branch:i=[e],coerce:s=!1,mask:a=!1}=n,c={path:r,branch:i};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const o in e)void 0===t.schema[o]&&delete e[o];let l="valid";for(const o of t.validator(e,c))o.explanation=n.message,l="not_valid",yield[o,void 0];for(let[d,f,h]of t.entries(e,c)){const t=u(f,h,{path:void 0===d?r:[...r,d],branch:void 0===d?i:[...i,f],coerce:s,mask:a,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):s&&(f=n[1],void 0===d?e=f:e instanceof Map?e.set(d,f):e instanceof Set?e.add(f):o(e)&&(void 0!==f||d in e)&&(e[d]=f))}if("not_valid"!==l)for(const o of t.refiner(e,c))o.explanation=n.message,l="not_refined",yield[o,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=n,this.entries=s,this.coercer=i,this.validator=r?(e,t)=>c(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>c(o(e,t),t,this,e):()=>[]}assert(e,t){return d(e,this,t)}create(e,t){return f(e,this,t)}is(e){return p(e,this)}mask(e,t){return h(e,this,t)}validate(e,t={}){return m(e,this,t)}}function d(e,t,n){const r=m(e,t,{message:n});if(r[0])throw r[0]}function f(e,t,n){const r=m(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function h(e,t,n){const r=m(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function p(e,t){return!m(e,t)[0]}function m(e,t,n={}){const o=u(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(o);if(i[0]){return[new r(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function g(...e){const t="type"===e[0].type,n=e.map((e=>e.schema)),r=Object.assign({},...n);return t?G(r):F(r)}function y(e,t){return new l({type:e,schema:null,validator:t})}function b(e,t){return new l({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})}function v(e){return new l({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n),refiner:(t,n)=>e(t,n).refiner(t,n)})}function w(e){let t;return new l({type:"lazy",schema:null,*entries(n,r){t??(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(t??(t=e()),t.validator(n,r)),coercer:(n,r)=>(t??(t=e()),t.coercer(n,r)),refiner:(n,r)=>(t??(t=e()),t.refiner(n,r))})}function x(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];return"type"===e.type?G(r):F(r)}function E(e){const t=e instanceof l,n=t?{...e.schema}:{...e};for(const r in n)n[r]=z(n[r]);return t&&"type"===e.type?G(n):F(n)}function _(e,t){const{schema:n}=e,r={};for(const o of t)r[o]=n[o];return"type"===e.type?G(r):F(r)}function k(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),y(e,t)}function S(){return y("any",(()=>!0))}function I(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function C(){return y("bigint",(e=>"bigint"===typeof e))}function T(){return y("boolean",(e=>"boolean"===typeof e))}function A(){return y("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function P(e){const t={},n=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${n}\`, but received: ${s(t)}`})}function O(){return y("func",(e=>"function"===typeof e||`Expected a function, but received: ${s(e)}`))}function j(e){return y("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function M(){return y("integer",(e=>"number"===typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function R(e){return new l({type:"intersection",schema:null,*entries(t,n){for(const r of e)yield*r.entries(t,n)},*validator(t,n){for(const r of e)yield*r.validator(t,n)},*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})}function B(e){const t=s(e),n=typeof e;return new l({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${s(n)}`})}function N(e,t){return new l({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,o]of n.entries())yield[r,r,e],yield[r,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function L(){return y("never",(()=>!1))}function U(e){return new l({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function D(){return y("number",(e=>"number"===typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function F(e){const t=e?Object.keys(e):[],n=L();return new l({type:"object",schema:e||null,*entries(r){if(e&&o(r)){const o=new Set(Object.keys(r));for(const n of t)o.delete(n),yield[n,r[n],e[n]];for(const e of o)yield[e,r[e],n]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function z(e){return new l({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function $(e,t){return new l({type:"record",schema:null,*entries(n){if(o(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`})}function q(){return y("regexp",(e=>e instanceof RegExp))}function Z(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function H(){return y("string",(e=>"string"===typeof e||`Expected a string, but received: ${s(e)}`))}function W(e){const t=L();return new l({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let o=0;o<r;o++)yield[o,n[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})}function G(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(n){if(o(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function K(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const o=[];for(const t of e){const[...e]=u(n,t,r),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(n)}`,...o]}})}function V(){return y("unknown",(()=>!0))}function X(e,t,n){return new l({...e,coercer:(r,o)=>p(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}function Y(e,t,n={}){return X(e,V(),(e=>{const r="function"===typeof t?t():t;if(void 0===e)return r;if(!n.strict&&i(e)&&i(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))}function J(e){return X(e,H(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const n=ee(t);return 0===n||`Expected an empty ${e.type} but received one with a size of \`${n}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,n={}){const{exclusive:r}=n;return se(e,"max",(n=>r?n<t:n<=t||`Expected a ${e.type} less than ${r?"":"or equal to "}${t} but received \`${n}\``))}function ne(e,t,n={}){const{exclusive:r}=n;return se(e,"min",(n=>r?n>t:n>=t||`Expected a ${e.type} greater than ${r?"":"or equal to "}${t} but received \`${n}\``))}function re(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function oe(e,t){return se(e,"pattern",(n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`))}function ie(e,t,n=t){const r=`Expected a ${e.type}`,o=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return se(e,"size",(e=>{if("number"===typeof e||e instanceof Date)return t<=e&&e<=n||`${r} ${o} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=n||`${r} with a size ${o} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=n||`${r} with a length ${o} but received one with a length of \`${i}\``}}))}function se(e,t,n){return new l({...e,*refiner(r,o){yield*e.refiner(r,o);const i=c(n(r,o),o,e,r);for(const e of i)yield{...e,refinement:t}}})}},10046:function(e,t,n){"use strict";n.d(t,{$l:function(){return s},BN:function(){return B},DY:function(){return h},Fs:function(){return U},J$:function(){return q},JN:function(){return v},LI:function(){return T},PM:function(){return u},UG:function(){return Z},W6:function(){return I},i_:function(){return i},ko:function(){return X},kw:function(){return C},mf:function(){return c},o8:function(){return a},qC:function(){return O},s6:function(){return V},sj:function(){return R},u3:function(){return M},u_:function(){return F},w6:function(){return S},xD:function(){return Y}});var r=n(67294);const o=()=>{},i=o(),s=Object,a=e=>e===i,c=e=>"function"==typeof e,u=(e,t)=>({...e,...t}),l=new WeakMap;let d=0;const f=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(s(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=l.get(e),o)return o;if(o=++d+"~",l.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=f(e[i])+",";l.set(e,o)}if(n==s){o="#";const t=s.keys(e).sort();for(;!a(i=t.pop());)a(e[i])||(o+=i+":"+f(e[i])+",");l.set(e,o)}}return o},h=new WeakMap,p={},m={},g="undefined",y=typeof window!=g,b=typeof document!=g,v=(e,t)=>{const n=h.get(e);return[()=>!a(t)&&e.get(t)||p,r=>{if(!a(t)){const o=e.get(t);t in m||(m[t]=o),n[5](t,u(o,r),o||p)}},n[6],()=>!a(t)&&t in m?m[t]:!a(t)&&e.get(t)||p]};let w=!0;const[x,E]=y&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],_={isOnline:()=>w,isVisible:()=>{const e=b&&document.visibilityState;return a(e)||"hidden"!==e}},k={initFocus:e=>(b&&document.addEventListener("visibilitychange",e),x("focus",e),()=>{b&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{const t=()=>{w=!0,e()},n=()=>{w=!1};return x("online",t),x("offline",n),()=>{E("online",t),E("offline",n)}}},S=!r.useId,I=!y||"Deno"in window,C=e=>y&&typeof window.requestAnimationFrame!=g?window.requestAnimationFrame(e):setTimeout(e,1),T=I?r.useEffect:r.useLayoutEffect,A="undefined"!==typeof navigator&&navigator.connection,P=!I&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),O=e=>{if(c(e))try{e=e()}catch(n){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?f(e):"",t]};let j=0;const M=()=>++j;var R={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function B(...e){const[t,n,r,o]=e,s=u({populateCache:!0,throwOnError:!0},"boolean"===typeof o?{revalidate:o}:o||{});let l=s.populateCache;const d=s.rollbackOnError;let f=s.optimisticData;const p=s.throwOnError;if(c(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(m))}return m(n);async function m(n){const[o]=O(n);if(!o)return;const[u,m]=v(t,o),[g,y,b,w]=h.get(t),x=()=>{const e=g[o];return(c(s.revalidate)?s.revalidate(u().data,n):!1!==s.revalidate)&&(delete b[o],delete w[o],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return x();let E,_=r;const k=M();y[o]=[k,0];const S=!a(f),I=u(),C=I.data,T=I._c,A=a(T)?C:T;if(S&&(f=c(f)?f(A,C):f,m({data:f,_c:A})),c(_))try{_=_(A)}catch(P){E=P}if(_&&c(_.then)){if(_=await _.catch((e=>{E=e})),k!==y[o][0]){if(E)throw E;return _}E&&S&&(e=>"function"===typeof d?d(e):!1!==d)(E)&&(l=!0,m({data:A,_c:i}))}if(l&&!E)if(c(l)){const e=l(_,A);m({data:e,error:i,_c:i})}else m({data:_,error:i,_c:i});if(y[o][1]=M(),Promise.resolve(x()).then((()=>{m({_c:i})})),!E)return _;if(p)throw E}}const N=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},L=(e,t)=>{if(!h.has(e)){const n=u(k,t),r={},s=B.bind(i,e);let a=o;const c={},l=(e,t)=>{const n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},d=(t,n,r)=>{e.set(t,n);const o=c[t];if(o)for(const e of o)e(n,r)},f=()=>{if(!h.has(e)&&(h.set(e,[r,{},{},{},s,d,l]),!I)){const t=n.initFocus(setTimeout.bind(i,N.bind(i,r,0))),o=n.initReconnect(setTimeout.bind(i,N.bind(i,r,1)));a=()=>{t&&t(),o&&o(),h.delete(e)}}};return f(),[e,s,f,a]}return[e,h.get(e)[4]]},[U,D]=L(new Map),F=u({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,n,r,o)=>{const i=n.errorRetryCount,s=o.retryCount,c=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!a(i)&&s>i||setTimeout(r,c,o)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:P?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:P?5e3:3e3,compare:(e,t)=>f(e)==f(t),isPaused:()=>!1,cache:U,mutate:D,fallback:{}},_),z=(e,t)=>{const n=u(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:s}=t;r&&i&&(n.use=r.concat(i)),o&&s&&(n.fallback=u(o,s))}return n},$=(0,r.createContext)({}),q=e=>{const{value:t}=e,n=(0,r.useContext)($),o=c(t),s=(0,r.useMemo)((()=>o?t(n):t),[o,n,t]),a=(0,r.useMemo)((()=>o?s:z(n,s)),[o,n,s]),l=s&&s.provider,d=(0,r.useRef)(i);l&&!d.current&&(d.current=L(l(a.cache||U),s));const f=d.current;return f&&(a.cache=f[0],a.mutate=f[1]),T((()=>{if(f)return f[2]&&f[2](),f[3]}),[]),(0,r.createElement)($.Provider,u(e,{value:a}))},Z="$inf$",H=y&&window.__SWR_DEVTOOLS_USE__,W=H?window.__SWR_DEVTOOLS_USE__:[],G=e=>c(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],K=W.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=O(t),[,,,o]=h.get(U);if(r.startsWith(Z))return n(...e);const i=o[r];return a(i)?n(...e):(delete o[r],i)}),r))),V=e=>function(...t){const n=u(F,(0,r.useContext)($)),[o,i,s]=G(t),a=z(n,s);let c=e;const{use:l}=a,d=(l||[]).concat(K);for(let e=d.length;e--;)c=d[e](c);return c(o,i||a.fetcher||null,a)},X=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Y=(e,t)=>(...n)=>{const[r,o,i]=G(n),s=(i.use||[]).concat(t);return e(r,o,{...i,use:s})};H&&(window.__SWR_DEVTOOLS_REACT__=r)},21127:function(e,t,n){"use strict";function r(e,t,n){return t<=e&&e<=n}function o(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}n.r(t),n.d(t,{TextDecoder:function(){return u},TextEncoder:function(){return l}});function i(e){this.tokens=[].slice.call(e)}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var s=-1;function a(e,t){if(e)throw TypeError("Decoder error");return t||65533}var c="utf-8";function u(e,t){if(!(this instanceof u))return new u(e,t);if((e=void 0!==e?String(e).toLowerCase():c)!==c)throw new Error("Encoding not supported. Only utf-8 is supported");t=o(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():c)!==c)throw new Error("Encoding not supported. Only utf-8 is supported");t=o(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function d(e){var t=e.fatal,n=0,o=0,i=0,c=128,u=191;this.handler=function(e,l){if(-1===l&&0!==i)return i=0,a(t);if(-1===l)return s;if(0===i){if(r(l,0,127))return l;if(r(l,194,223))i=1,n=l-192;else if(r(l,224,239))224===l&&(c=160),237===l&&(u=159),i=2,n=l-224;else{if(!r(l,240,244))return a(t);240===l&&(c=144),244===l&&(u=143),i=3,n=l-240}return n<<=6*i,null}if(!r(l,c,u))return n=i=o=0,c=128,u=191,e.prepend(l),a(t);if(c=128,u=191,n+=l-128<<6*(i-(o+=1)),o!==i)return null;var d=n;return n=i=o=0,d}}function f(e){e.fatal;this.handler=function(e,t){if(-1===t)return s;if(r(t,0,127))return t;var n,o;r(t,128,2047)?(n=1,o=192):r(t,2048,65535)?(n=2,o=224):r(t,65536,1114111)&&(n=3,o=240);for(var i=[(t>>6*n)+o];n>0;){var a=t>>6*(n-1);i.push(128|63&a),n-=1}return i}}u.prototype={decode:function(e,t){var n;n="object"===typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"===typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=o(t),this._streaming||(this._decoder=new d({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var r,a=new i(n),c=[];!a.endOfStream()&&(r=this._decoder.handler(a,a.read()))!==s;)null!==r&&(Array.isArray(r)?c.push.apply(c,r):c.push(r));if(!this._streaming){do{if((r=this._decoder.handler(a,a.read()))===s)break;null!==r&&(Array.isArray(r)?c.push.apply(c,r):c.push(r))}while(!a.endOfStream());this._decoder=null}return c.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===c[0]?(this._BOMseen=!0,c.shift()):this._BOMseen=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(c)}},l.prototype={encode:function(e,t){e=e?String(e):"",t=o(t),this._streaming||(this._encoder=new f(this._options)),this._streaming=Boolean(t.stream);for(var n,r=[],a=new i(function(e){for(var t=String(e),n=t.length,r=0,o=[];r<n;){var i=t.charCodeAt(r);if(i<55296||i>57343)o.push(i);else if(56320<=i&&i<=57343)o.push(65533);else if(55296<=i&&i<=56319)if(r===n-1)o.push(65533);else{var s=e.charCodeAt(r+1);if(56320<=s&&s<=57343){var a=1023&i,c=1023&s;o.push(65536+(a<<10)+c),r+=1}else o.push(65533)}r+=1}return o}(e));!a.endOfStream()&&(n=this._encoder.handler(a,a.read()))!==s;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;(n=this._encoder.handler(a,a.read()))!==s;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}}},53160:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(16867);function o(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?(0,r.P)(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}},20605:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var r=n(53160),o=n(16867);function i(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=(0,r.E)(t);let i=0;for(const r of e)n.set(r,i),i+=r.length;return(0,o.P)(n)}},52217:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var r=n(67645),o=n(16867);function i(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):(0,o.P)(globalThis.Buffer.from(e,"utf-8"))}},37466:function(e,t,n){"use strict";n.d(t,{BB:function(){return i.B},mL:function(){return o.m},zo:function(){return r.z}});var r=n(20605),o=n(52217),i=n(92263)},92263:function(e,t,n){"use strict";n.d(t,{B:function(){return o}});var r=n(67645);function o(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},16867:function(e,t,n){"use strict";function r(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}n.d(t,{P:function(){return r}})},67645:function(e,t,n){"use strict";var r=n(91835),o=n(53160);function i(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const s=i("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),a=i("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{e=e.substring(1);const t=(0,o.E)(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),c={utf8:s,"utf-8":s,hex:r.gh.base16,latin1:a,ascii:a,binary:a,...r.gh};t.Z=c},14503:function(e,t,n){"use strict";function r(e){return"string"===typeof e?{address:e,type:"json-rpc"}:e}n.d(t,{T:function(){return r}})},18011:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r=n(16693),o=n(7210),i=n(77799),s=n(47864),a=n(61836),c=n(92106),u=n(74526),l=n(75719),d=n(72435),f=n(93714),h=n(88819);async function p(e,{blockNumber:t,blockTag:n,coinType:p,name:m,universalResolverAddress:g}){let y=g;if(!y){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");y=(0,s.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const s=(0,i.R)({abi:r.X$,functionName:"addr",...null!=p?{args:[(0,l.V)(m),BigInt(p)]}:{args:[(0,l.V)(m)]}}),u=await(0,f.s)(e,h.L,"readContract")({address:y,abi:r.k3,functionName:"resolve",args:[(0,c.NC)((0,d.T)(m)),s],blockNumber:t,blockTag:n});if("0x"===u[0])return null;const g=(0,o.k)({abi:r.X$,args:null!=p?[(0,l.V)(m),BigInt(p)]:void 0,functionName:"addr",data:u[0]});return"0x"===g||"0x00"===(0,a.f)(g)?null:g}catch(b){if((0,u.c)(b,"resolve"))return null;throw b}}},95270:function(e,t,n){"use strict";n.d(t,{r:function(){return w}});var r=n(88819),o=n(62027);class i extends o.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class s extends o.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class a extends o.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class c extends o.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const u=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,l=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,d=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,f=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function h(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function p({uri:e,gatewayUrls:t}){const n=d.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=h(t?.ipfs,"https://ipfs.io"),o=h(t?.arweave,"https://arweave.net"),i=e.match(u),{protocol:s,subpath:c,target:p,subtarget:m=""}=i?.groups||{},g="ipns:/"===s||"ipns/"===c,y="ipfs:/"===s||"ipfs/"===c||l.test(e);if(e.startsWith("http")&&!g&&!y){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((g||y)&&p)return{uri:`${r}/${g?"ipns":"ipfs"}/${p}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&p)return{uri:`${o}/${p}${m||""}`,isOnChain:!1,isEncoded:!1};let b=e.replace(f,"");if(b.startsWith("<svg")&&(b=`data:image/svg+xml;base64,${btoa(b)}`),b.startsWith("data:")||b.startsWith("{"))return{uri:b,isOnChain:!0,isEncoded:!1};throw new a({uri:e})}function m(e){if("object"!==typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new i({data:e});return e.image||e.image_url||e.image_data}async function g({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=p({uri:t,gatewayUrls:e});if(r)return n;const o=await async function(e){try{const t=await fetch(e,{method:"HEAD"});return 200===t.status&&t.headers.get("content-type")?.startsWith("image/")}catch(t){return("object"!==typeof t||"undefined"===typeof t.response)&&!!globalThis.hasOwnProperty("Image")&&new Promise((t=>{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e}))}}(n);if(o)return n;throw new a({uri:t})}async function y(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?async function(e,{gatewayUrls:t,record:n}){const o=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[i,a]=n.split(":"),[c,u]=r.split(":");if(!i||"eip155"!==i.toLowerCase())throw new s({reason:"Only EIP-155 supported"});if(!a)throw new s({reason:"Chain ID not found"});if(!u)throw new s({reason:"Contract address not found"});if(!o)throw new s({reason:"Token ID not found"});if(!c)throw new s({reason:"ERC namespace not found"});return{chainID:parseInt(a),namespace:c.toLowerCase(),contractAddress:u,tokenID:o}}(n),i=await async function(e,{nft:t}){if("erc721"===t.namespace)return(0,r.L)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,r.L)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new c({namespace:t.namespace})}(e,{nft:o}),{uri:u,isOnChain:l,isEncoded:d}=p({uri:i,gatewayUrls:t});if(l&&(u.includes("data:application/json;base64,")||u.startsWith("{"))){const e=d?atob(u.replace("data:application/json;base64,","")):u;return g({uri:m(JSON.parse(e)),gatewayUrls:t})}let f=o.tokenID;"erc1155"===o.namespace&&(f=f.replace("0x","").padStart(64,"0"));return async function({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then((e=>e.json()));return await g({gatewayUrls:e,uri:m(n)})}catch{throw new a({uri:t})}}({gatewayUrls:t,uri:u.replace(/(?:0x)?{id}/,f)})}(e,{gatewayUrls:t,record:n}):g({uri:n,gatewayUrls:t})}var b=n(93714),v=n(16171);async function w(e,{blockNumber:t,blockTag:n,gatewayUrls:r,name:o,universalResolverAddress:i}){const s=await(0,b.s)(e,v.g,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:i});if(!s)return null;try{return await y(e,{record:s,gatewayUrls:r})}catch{return null}}},95602:function(e,t,n){"use strict";n.d(t,{w:function(){return l}});var r=n(16693),o=n(47864),i=n(92106),s=n(74526),a=n(72435),c=n(93714),u=n(88819);async function l(e,{address:t,blockNumber:n,blockTag:l,universalResolverAddress:d}){let f=d;if(!f){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");f=(0,o.L)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const h=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const[o,s]=await(0,c.s)(e,u.L,"readContract")({address:f,abi:r.du,functionName:"reverse",args:[(0,i.NC)((0,a.T)(h))],blockNumber:n,blockTag:l});return t.toLowerCase()!==s.toLowerCase()?null:o}catch(p){if((0,s.c)(p,"reverse"))return null;throw p}}},15215:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var r=n(47864),o=n(92106),i=n(72435),s=n(93714),a=n(88819);async function c(e,{blockNumber:t,blockTag:n,name:c,universalResolverAddress:u}){let l=u;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=(0,r.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[d]=await(0,s.s)(e,a.L,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.NC)((0,i.T)(c))],blockNumber:t,blockTag:n});return d}},16171:function(e,t,n){"use strict";n.d(t,{g:function(){return h}});var r=n(16693),o=n(7210),i=n(77799),s=n(47864),a=n(92106),c=n(74526),u=n(75719),l=n(72435),d=n(93714),f=n(88819);async function h(e,{blockNumber:t,blockTag:n,name:h,key:p,universalResolverAddress:m}){let g=m;if(!g){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");g=(0,s.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const s=await(0,d.s)(e,f.L,"readContract")({address:g,abi:r.k3,functionName:"resolve",args:[(0,a.NC)((0,l.T)(h)),(0,i.R)({abi:r.nZ,functionName:"text",args:[(0,u.V)(h),p]})],blockNumber:t,blockTag:n});if("0x"===s[0])return null;const c=(0,o.k)({abi:r.nZ,functionName:"text",data:s[0]});return""===c?null:c}catch(y){if((0,c.c)(y,"resolve"))return null;throw y}}},61376:function(e,t,n){"use strict";n.d(t,{R:function(){return v}});var r=n(14503),o=n(16693);const i="0x82ad56cb";var s=n(62027),a=n(80377),c=n(97405),u=n(7210),l=n(77799),d=n(47864),f=n(92106),h=n(26445),p=n(87469);var m=n(61163),g=n(74688),y=n(32357),b=n(47531);async function v(e,t){const{account:v=e.account,batch:w=Boolean(e.batch?.multicall),blockNumber:x,blockTag:E="latest",accessList:_,data:k,gas:S,gasPrice:I,maxFeePerGas:C,maxPriorityFeePerGas:T,nonce:A,to:P,value:O,...j}=t,M=v?(0,r.T)(v):void 0;try{(0,b.F)(t);const n=(x?(0,f.eC)(x):void 0)||E,r=e.chain?.formatters?.transactionRequest?.format,s=(r||g.tG)({...(0,m.K)(j,{format:r}),from:M?.address,accessList:_,data:k,gas:S,gasPrice:I,maxFeePerGas:C,maxPriorityFeePerGas:T,nonce:A,to:P,value:O});if(w&&function({request:e}){const{data:t,to:n,...r}=e;return!!t&&(!t.startsWith(i)&&(!!n&&!(Object.values(r).filter((e=>"undefined"!==typeof e)).length>0)))}({request:s}))try{return await async function(e,t){const{batchSize:n=1024,wait:r=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:h,multicallAddress:p,to:m}=t;let g=p;if(!g){if(!e.chain)throw new a.pZ;g=(0,d.L)({blockNumber:i,chain:e.chain,contract:"multicall3"})}const b=(i?(0,f.eC)(i):void 0)||s,{schedule:v}=(0,y.S)({id:`${e.uid}.${b}`,wait:r,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*n},fn:async t=>{const n=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),r=(0,l.R)({abi:o.F8,args:[n],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:r,to:g},b]});return(0,u.k)({abi:o.F8,args:[n],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:w,success:x}]=await v({data:h,to:m});if(!x)throw new c.VQ({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...s,blockNumber:x,blockTag:E})}catch(R){if(!(R instanceof a.pZ)&&!(R instanceof a.mm))throw R}const h=await e.request({method:"eth_call",params:n?[s,n]:[s]});return"0x"===h?{data:void 0}:{data:h}}catch(R){const r=function(e){if(!(e instanceof s.G))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}(R),{offchainLookup:o,offchainLookupSignature:i}=await n.e(422).then(n.bind(n,10422));if(r?.slice(0,10)===i&&P)return{data:await o(e,{data:r,to:P})};throw function(e,{docsPath:t,...n}){const r=(()=>{const t=(0,p.k)(e,n);return t instanceof h.cj?e:t})();return new c.cg(r,{docsPath:t,...n})}(R,{...t,account:M,chain:e.chain})}}},43861:function(e,t,n){"use strict";n.d(t,{C:function(){return u},X:function(){return c}});var r=n(15371),o=n(93714),i=n(79379),s=n(75016),a=n(24453);async function c(e,t){return u(e,t)}async function u(e,t){const{block:n,chain:c=e.chain,request:u,type:l="eip1559"}=t||{},d=await(async()=>"function"===typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:n,client:e,request:u}):c?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new r.Fz;const f=10**(d.toString().split(".")[1]?.length??0),h=e=>e*BigInt(Math.ceil(d*f))/BigInt(f),p=n||await(0,o.s)(e,s.Q,"getBlock")({});if("function"===typeof c?.fees?.estimateFeesPerGas)return c.fees.estimateFeesPerGas({block:n,client:e,multiply:h,request:u,type:l});if("eip1559"===l){if("bigint"!==typeof p.baseFeePerGas)throw new r.e5;const t=u?.maxPriorityFeePerGas?u.maxPriorityFeePerGas:await(0,i.h)(e,{block:p,chain:c,request:u}),n=h(p.baseFeePerGas);return{maxFeePerGas:u?.maxFeePerGas??n+t,maxPriorityFeePerGas:t}}return{gasPrice:u?.gasPrice??h(await(0,o.s)(e,a.o,"getGasPrice")({}))}}},81841:function(e,t,n){"use strict";n.d(t,{Q:function(){return y}});var r=n(14503),o=n(8998),i=n(92106),s=n(39625),a=n(67795),c=n(62027),u=n(33639);class l extends c.G{constructor(e,{account:t,docsPath:n,chain:r,data:o,gas:i,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=(0,u.xr)({from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,s.d)(p)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:i,gasPrice:"undefined"!==typeof c&&`${(0,a.o)(c)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,a.o)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,a.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}var d=n(26445),f=n(87469);var h=n(61163),p=n(74688),m=n(47531),g=n(57331);async function y(e,t){const n=t.account??e.account;if(!n)throw new o.o({docsPath:"/docs/actions/public/estimateGas"});const s=(0,r.T)(n);try{const{accessList:n,blockNumber:r,blockTag:o,data:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:y,value:b,...v}="local"===s.type?await(0,g.Z)(e,t):t,w=(r?(0,i.eC)(r):void 0)||o;(0,m.F)(t);const x=e.chain?.formatters?.transactionRequest?.format,E=(x||p.tG)({...(0,h.K)(v,{format:x}),from:s.address,accessList:n,data:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:y,value:b}),_=await e.request({method:"eth_estimateGas",params:w?[E,w]:[E]});return BigInt(_)}catch(a){throw function(e,{docsPath:t,...n}){const r=(()=>{const t=(0,f.k)(e,n);return t instanceof d.cj?e:t})();return new l(r,{docsPath:t,...n})}(a,{...t,account:s,chain:e.chain})}}},79379:function(e,t,n){"use strict";n.d(t,{_:function(){return c},h:function(){return u}});var r=n(15371),o=n(95946),i=n(93714),s=n(75016),a=n(24453);async function c(e,t){return u(e,t)}async function u(e,t){const{block:n,chain:c=e.chain,request:u}=t||{};if("function"===typeof c?.fees?.defaultPriorityFee){const t=n||await(0,i.s)(e,s.Q,"getBlock")({});return c.fees.defaultPriorityFee({block:t,client:e,request:u})}if("undefined"!==typeof c?.fees?.defaultPriorityFee)return c?.fees?.defaultPriorityFee;try{const t=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,o.y_)(t)}catch{const[t,o]=await Promise.all([n?Promise.resolve(n):(0,i.s)(e,s.Q,"getBlock")({}),(0,i.s)(e,a.o,"getGasPrice")({})]);if("bigint"!==typeof t.baseFeePerGas)throw new r.e5;const c=o-t.baseFeePerGas;return c<0n?0n:c}}},75016:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(79814),o=n(92106),i=n(43310);async function s(e,{blockHash:t,blockNumber:n,blockTag:s,includeTransactions:a}={}){const c=s??"latest",u=a??!1,l=void 0!==n?(0,o.eC)(n):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[l||c,u]}),!d)throw new r.f({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||i.Z)(d)}},79524:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(95946);async function o(e){const t=await e.request({method:"eth_chainId"});return(0,r.ly)(t)}},24453:function(e,t,n){"use strict";async function r(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}n.d(t,{o:function(){return r}})},86162:function(e,t,n){"use strict";n.d(t,{K:function(){return i}});var r=n(95946),o=n(92106);async function i(e,{address:t,blockTag:n="latest",blockNumber:i}){const s=await e.request({method:"eth_getTransactionCount",params:[t,i?(0,o.eC)(i):n]});return(0,r.ly)(s)}},88819:function(e,t,n){"use strict";n.d(t,{L:function(){return c}});var r=n(7210),o=n(77799),i=n(72365),s=n(93714),a=n(61376);async function c(e,{abi:t,address:n,args:c,functionName:u,...l}){const d=(0,o.R)({abi:t,args:c,functionName:u});try{const{data:o}=await(0,s.s)(e,a.R,"call")({data:d,to:n,...l});return(0,r.k)({abi:t,args:c,functionName:u,data:o||"0x"})}catch(f){throw(0,i.S)(f,{abi:t,address:n,args:c,docsPath:"/docs/contract/readContract",functionName:u})}}},57331:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(14503),o=n(43861),i=n(81841),s=n(75016),a=n(86162),c=n(8998),u=n(15371),l=n(93714),d=n(47531),f=n(33639);async function h(e,t){const{account:n=e.account,chain:h,gas:p,nonce:m,type:g}=t;if(!n)throw new c.o;const y=(0,r.T)(n),b=await(0,l.s)(e,s.Q,"getBlock")({blockTag:"latest"}),v={...t,from:y.address};if("undefined"===typeof m&&(v.nonce=await(0,l.s)(e,a.K,"getTransactionCount")({address:y.address,blockTag:"pending"})),"undefined"===typeof g)try{v.type=function(e){if(e.type)return e.type;if("undefined"!==typeof e.maxFeePerGas||"undefined"!==typeof e.maxPriorityFeePerGas)return"eip1559";if("undefined"!==typeof e.gasPrice)return"undefined"!==typeof e.accessList?"eip2930":"legacy";throw new f.j3({transaction:e})}(v)}catch{v.type="bigint"===typeof b.baseFeePerGas?"eip1559":"legacy"}if("eip1559"===v.type){const{maxFeePerGas:n,maxPriorityFeePerGas:r}=await(0,o.C)(e,{block:b,chain:h,request:v});if("undefined"===typeof t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<r)throw new u.ld({maxPriorityFeePerGas:r});v.maxPriorityFeePerGas=r,v.maxFeePerGas=n}else{if("undefined"!==typeof t.maxFeePerGas||"undefined"!==typeof t.maxPriorityFeePerGas)throw new u.e5;const{gasPrice:n}=await(0,o.C)(e,{block:b,chain:h,request:v,type:"legacy"});v.gasPrice=n}return"undefined"===typeof p&&(v.gas=await(0,l.s)(e,i.Q,"estimateGas")({...v,account:{address:y.address,type:"json-rpc"}})),(0,d.F)(v),v}},99238:function(e,t,n){"use strict";async function r(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]})}n.d(t,{p:function(){return r}})},66403:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});const r=(0,n(86164).a)({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}})},16189:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(14503);let o,i=256;function s(e=11){if(!o||i+e>512){o="",i=0;for(let e=0;e<256;e++)o+=(256+256*Math.random()|0).toString(16).substring(1)}return o.substring(i,i+++e)}function a(e){const{batch:t,cacheTime:n=e.pollingInterval??4e3,key:o="base",name:i="Base Client",pollingInterval:a=4e3,type:c="base"}=e,u=e.chain,l=e.account?(0,r.T)(e.account):void 0,{config:d,request:f,value:h}=e.transport({chain:u,pollingInterval:a}),p={account:l,batch:t,cacheTime:n,chain:u,key:o,name:i,pollingInterval:a,request:f,transport:{...d,...h},type:c,uid:s()};return Object.assign(p,{extend:function e(t){return n=>{const r=n(t);for(const e in p)delete r[e];const o={...t,...r};return Object.assign(o,{extend:e(o)})}}(p)})}},79578:function(e,t,n){"use strict";n.d(t,{K:function(){return C}});var r=n(16189),o=n(79524),i=n(92106);var s=n(30286),a=n(14503),c=n(8998),u=n(80377);function l({chain:e,currentChainId:t}){if(!e)throw new u.Bk;if(t!==e.id)throw new u.Yl({chain:e,currentChainId:t})}var d=n(26445),f=n(33639),h=n(87469);var p=n(61163),m=n(74688),g=n(93714),y=n(47531),b=n(57331),v=n(99238);async function w(e,t){const{account:n=e.account,chain:r=e.chain,accessList:i,data:s,gas:u,gasPrice:w,maxFeePerGas:x,maxPriorityFeePerGas:E,nonce:_,to:k,value:S,...I}=t;if(!n)throw new c.o({docsPath:"/docs/actions/wallet/sendTransaction"});const C=(0,a.T)(n);try{let n;if((0,y.F)(t),null!==r&&(n=await(0,g.s)(e,o.L,"getChainId")({}),l({currentChainId:n,chain:r})),"local"===C.type){const t=await(0,g.s)(e,b.Z,"prepareTransactionRequest")({account:C,accessList:i,chain:r,data:s,gas:u,gasPrice:w,maxFeePerGas:x,maxPriorityFeePerGas:E,nonce:_,to:k,value:S,...I});n||(n=await(0,g.s)(e,o.L,"getChainId")({}));const a=r?.serializers?.transaction,c=await C.signTransaction({...t,chainId:n},{serializer:a});return await(0,g.s)(e,v.p,"sendRawTransaction")({serializedTransaction:c})}const a=e.chain?.formatters?.transactionRequest?.format,c=(a||m.tG)({...(0,p.K)(I,{format:a}),accessList:i,data:s,from:C.address,gas:u,gasPrice:w,maxFeePerGas:x,maxPriorityFeePerGas:E,nonce:_,to:k,value:S});return await e.request({method:"eth_sendTransaction",params:[c]})}catch(T){throw function(e,{docsPath:t,...n}){const r=(()=>{const t=(0,h.k)(e,n);return t instanceof d.cj?e:t})();return new f.mk(r,{docsPath:t,...n})}(T,{...t,account:C,chain:t.chain||void 0})}}var x=n(45775);var E=n(15102),_=n(96070),k=n(71352);var S=n(77799);function I(e){return{addChain:t=>async function(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:s,blockExplorers:a}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,i.eC)(n),chainName:r,nativeCurrency:o,rpcUrls:s.default.http,blockExplorerUrls:a?Object.values(a).map((({url:e})=>e)):void 0}]})}(e,t),deployContract:t=>function(e,{abi:t,args:n,bytecode:r,...o}){return w(e,{...o,data:(0,s.w)({abi:t,args:n,bytecode:r})})}(e,t),getAddresses:()=>async function(e){return"local"===e.account?.type?[e.account.address]:(await e.request({method:"eth_accounts"})).map((e=>(0,x.x)(e)))}(e),getChainId:()=>(0,o.L)(e),getPermissions:()=>async function(e){return await e.request({method:"wallet_getPermissions"})}(e),prepareTransactionRequest:t=>(0,b.Z)(e,t),requestAddresses:()=>async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,x.K)(e)))}(e),requestPermissions:t=>async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}(e,t),sendRawTransaction:t=>(0,v.p)(e,t),sendTransaction:t=>w(e,t),signMessage:t=>async function(e,{account:t=e.account,message:n}){if(!t)throw new c.o({docsPath:"/docs/actions/wallet/signMessage"});const r=(0,a.T)(t);if("local"===r.type)return r.signMessage({message:n});const o="string"===typeof n?(0,i.$G)(n):n.raw instanceof Uint8Array?(0,i.NC)(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]})}(e,t),signTransaction:t=>async function(e,t){const{account:n=e.account,chain:r=e.chain,...s}=t;if(!n)throw new c.o({docsPath:"/docs/actions/wallet/signTransaction"});const u=(0,a.T)(n);(0,y.F)({account:u,...t});const d=await(0,g.s)(e,o.L,"getChainId")({});null!==r&&l({currentChainId:d,chain:r});const f=(r?.formatters||e.chain?.formatters)?.transactionRequest?.format||m.tG;return"local"===u.type?u.signTransaction({...s,chainId:d},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...f(s),chainId:(0,i.eC)(d),from:u.address}]})}(e,t),signTypedData:t=>async function(e,{account:t=e.account,domain:n,message:r,primaryType:o,types:i}){if(!t)throw new c.o({docsPath:"/docs/actions/wallet/signTypedData"});const s=(0,a.T)(t),u={EIP712Domain:(0,k.cj)({domain:n}),...i};if((0,k.iC)({domain:n,message:r,primaryType:o,types:u}),"local"===s.type)return s.signTypedData({domain:n,primaryType:o,types:u,message:r});const l=(0,_.P)({domain:n??{},primaryType:o,types:u,message:r},((e,t)=>(0,E.v)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[s.address,l]})}(e,t),switchChain:t=>async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,i.eC)(t)}]})}(e,t),watchAsset:t=>async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}(e,t),writeContract:t=>async function(e,{abi:t,address:n,args:r,dataSuffix:o,functionName:i,...s}){const a=(0,S.R)({abi:t,args:r,functionName:i});return await(0,g.s)(e,w,"sendTransaction")({data:`${a}${o?o.replace("0x",""):""}`,to:n,...s})}(e,t)}}function C(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return(0,r.e)({...e,key:t,name:n,transport:e=>o({...e,retryCount:0}),type:"walletClient"}).extend(I)}},31031:function(e,t,n){"use strict";n.d(t,{q:function(){return o}});var r=n(37029);function o({key:e,name:t,request:n,retryCount:o=3,retryDelay:i=150,timeout:s,type:a},c){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:i,timeout:s,type:a},request:(0,r.n)(n,{retryCount:o,retryDelay:i}),value:c}}},3980:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(31031);function o(e,t={}){const{key:n="custom",name:o="Custom Provider",retryDelay:i}=t;return({retryCount:s})=>(0,r.q)({key:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??s,retryDelay:i,type:"custom"})}},16693:function(e,t,n){"use strict";n.d(t,{$o:function(){return u},F8:function(){return r},X$:function(){return c},du:function(){return s},k3:function(){return i},nZ:function(){return a}});const r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],o=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],i=[...o,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],s=[...o,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],a=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],u=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},21746:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return o},hZ:function(){return i}});const r={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},o={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},i={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},84192:function(e,t,n){"use strict";n.d(t,{Bd:function(){return i},Zn:function(){return o},ez:function(){return r}});const r={gwei:9,wei:18},o={ether:-9,wei:9},i={ether:-18,gwei:-9}},57412:function(e,t,n){"use strict";n.d(t,{CI:function(){return k},FM:function(){return p},Gy:function(){return E},KY:function(){return w},M4:function(){return d},MX:function(){return b},S4:function(){return v},SM:function(){return x},cO:function(){return a},dh:function(){return _},fM:function(){return s},fs:function(){return f},gr:function(){return l},hn:function(){return S},lC:function(){return m},mv:function(){return g},wM:function(){return I},wb:function(){return u},xB:function(){return c},xL:function(){return y},yP:function(){return h}});var r=n(80522),o=n(39135),i=n(62027);class s extends i.G{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class a extends i.G{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends i.G{constructor({data:e,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data:   ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class u extends i.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class l extends i.G{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class d extends i.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class f extends i.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class h extends i.G{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends i.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class m extends i.G{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class g extends i.G{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class y extends i.G{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class b extends i.G{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends i.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,r.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,r.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class w extends i.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class x extends i.G{constructor({abiItem:e,data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data:   ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=o}}class E extends i.G{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class _ extends i.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class k extends i.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class S extends i.G{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class I extends i.G{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},8998:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var r=n(62027);class o extends r.G{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}},26087:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(62027);class o extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},62027:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(35280);class o extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.bo)()});const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof o&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return i(this,e)}}function i(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?i(e.cause,t):t?null:e}},79814:function(e,t,n){"use strict";n.d(t,{f:function(){return o}});var r=n(62027);class o extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}},80377:function(e,t,n){"use strict";n.d(t,{Bk:function(){return s},Yl:function(){return i},mm:function(){return o},pZ:function(){return a}});var r=n(62027);class o extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class i extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class s extends r.G{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class a extends r.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}},97405:function(e,t,n){"use strict";n.d(t,{cg:function(){return g},uq:function(){return y},Lu:function(){return b},Dk:function(){return v},VQ:function(){return w}});var r=n(14503),o=n(21746),i=n(86899),s=n(80522),a=n(96070);function c({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map(((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"===typeof t[n]?(0,a.P)(t[n]):t[n]}`)).join(", ")})`}var u=n(40840),l=n(39625),d=n(67795),f=n(57412),h=n(62027),p=n(33639),m=n(35280);class g extends h.G{constructor(e,{account:t,docsPath:n,chain:o,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:h,value:m}){const g=t?(0,r.T)(t):void 0,y=(0,p.xr)({from:g?.address,to:h,value:"undefined"!==typeof m&&`${(0,l.d)(m)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:"undefined"!==typeof a&&`${(0,d.o)(a)} gwei`,maxFeePerGas:"undefined"!==typeof c&&`${(0,d.o)(c)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof u&&`${(0,d.o)(u)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",y].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class y extends h.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:i,sender:a}){const l=(0,u.mE)({abi:t,args:n,name:i}),d=l?c({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,s.t)(l,{includeName:!0}):void 0,h=(0,p.xr)({address:r&&(0,m.CR)(r),function:f,args:d&&"()"!==d&&`${[...Array(i?.length??0).keys()].map((()=>" ")).join("")}${d}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",h].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=i,this.sender=a}}class b extends h.G{constructor({abi:e,data:t,functionName:n,message:r}){let a,u,l,d,h;if(t&&"0x"!==t)try{u=(0,i.p)({abi:e,data:t});const{abiItem:n,errorName:r,args:a}=u;if("Error"===r)d=a[0];else if("Panic"===r){const[e]=a;d=o.$[e]}else{const e=n?(0,s.t)(n,{includeName:!0}):void 0,t=n&&a?c({abiItem:n,args:a,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(r?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(p){a=p}else r&&(d=r);a instanceof f.yP&&(h=a.signature,l=[`Unable to decode signature "${h}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${h}.`]),super(d&&"execution reverted"!==d||h?[`The contract function "${n}" reverted with the following ${h?"signature":"reason"}:`,d||h].join("\n"):`The contract function "${n}" reverted.`,{cause:a,metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=d,this.signature=h}}class v extends h.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class w extends h.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},69760:function(e,t,n){"use strict";n.d(t,{$:function(){return i},m:function(){return o}});var r=n(62027);class o extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class i extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},87788:function(e,t,n){"use strict";n.d(t,{Cd:function(){return i},J5:function(){return o},M6:function(){return s}});var r=n(62027);class o extends r.G{constructor({max:e,min:t,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class i extends r.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class s extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},15371:function(e,t,n){"use strict";n.d(t,{Fz:function(){return i},e5:function(){return s},ld:function(){return a}});var r=n(67795),o=n(62027);class i extends o.G{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class s extends o.G{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class a extends o.G{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,r.o)(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}},26445:function(e,t,n){"use strict";n.d(t,{C_:function(){return d},G$:function(){return a},Hh:function(){return s},M_:function(){return i},WF:function(){return f},ZI:function(){return c},cj:function(){return g},cs:function(){return m},dR:function(){return h},pZ:function(){return p},se:function(){return l},vU:function(){return u}});var r=n(67795),o=n(62027);class i extends o.G{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends o.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends o.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends o.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends o.G{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends o.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends o.G{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class f extends o.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends o.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends o.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends o.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends o.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},78863:function(e,t,n){"use strict";n.d(t,{Gg:function(){return s},W5:function(){return u},bs:function(){return c},c9:function(){return a}});var r=n(96070),o=n(62027),i=n(35280);class s extends o.G{constructor({body:e,details:t,headers:n,status:o,url:s}){super("HTTP request failed.",{details:t,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,i.Gr)(s)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=s}}class a extends o.G{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,i.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends o.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,i.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends o.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,i.Gr)(t)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},39028:function(e,t,n){"use strict";n.d(t,{B:function(){return c},GD:function(){return b},I0:function(){return _},KB:function(){return m},LX:function(){return u},Og:function(){return h},PE:function(){return w},Pv:function(){return y},Ts:function(){return x},XS:function(){return d},ab:function(){return v},gS:function(){return g},ir:function(){return S},nY:function(){return l},pT:function(){return p},s7:function(){return a},u5:function(){return E},x3:function(){return k},yR:function(){return f}});var r=n(62027),o=n(78863);class i extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof o.bs?e.code:t??-1}}class s extends i{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class a extends i{constructor(e){super(e,{code:a.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends i{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends i{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends i{constructor(e){super(e,{code:l.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends i{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends i{constructor(e){super(e,{code:f.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class h extends i{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends i{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends i{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends i{constructor(e){super(e,{code:g.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends i{constructor(e){super(e,{code:y.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends i{constructor(e){super(e,{code:b.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends s{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends s{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends s{constructor(e){super(e,{code:x.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class E extends s{constructor(e){super(e,{code:E.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class _ extends s{constructor(e){super(e,{code:_.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class k extends s{constructor(e){super(e,{code:k.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class S extends i{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},33639:function(e,t,n){"use strict";n.d(t,{Bh:function(){return l},Yb:function(){return d},j3:function(){return c},mc:function(){return f},mk:function(){return u},xY:function(){return a},xr:function(){return s}});var r=n(39625),o=n(67795),i=n(62027);function s(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>`  ${`${e}:`.padEnd(n+1)}  ${t}`)).join("\n")}class a extends i.G{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends i.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class u extends i.G{constructor(e,{account:t,docsPath:n,chain:i,data:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=s({chain:i&&`${i?.name} (id: ${i?.id})`,from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.d)(p)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.o)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.o)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class l extends i.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:o}){let i="Transaction";n&&void 0!==o&&(i=`Transaction at block time "${n}" at index "${o}"`),e&&void 0!==o&&(i=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(i=`Transaction at block number "${t}" at index "${o}"`),r&&(i=`Transaction with hash "${r}"`),super(`${i} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class d extends i.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class f extends i.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},35280:function(e,t,n){"use strict";n.d(t,{CR:function(){return r},Gr:function(){return o},bo:function(){return i}});const r=e=>e,o=e=>e,i=()=>"viem@1.19.12"},34450:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(57412),o=n(45775),i=n(39135),s=n(3972),a=n(61836),c=n(95946),u=n(45444);function l(e,t){if("0x"===t&&e.length>0)throw new r.wb;if((0,i.d)(t)&&(0,i.d)(t)<32)throw new r.xB({data:t,params:e,size:(0,i.d)(t)});return function({data:e,params:t}){const n=[];let o=0;for(let s=0;s<t.length;s++){if(o>=(0,i.d)(e))throw new r.xB({data:e,params:t,size:(0,i.d)(e)});const a=t[s],{consumed:c,value:u}=d({data:e,param:a,position:o});n.push(u),o+=c}return n}({data:t,params:e})}function d({data:e,param:t,position:n}){const i=(0,u.S)(t.type);if(i){const[r,o]=i;return function(e,{param:t,length:n,position:r}){if(!n){const n=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0})),o=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0}));let i=0;const a=[];for(let r=0;r<o;++r){const r=d({data:(0,s.tP)(e,n+32),param:t,position:i});i+=r.consumed,a.push(r.value)}return{value:a,consumed:32}}if(f(t)){const o=!(0,u.S)(t.type)?.[0];let i=0;const a=[];for(let u=0;u<n;++u){const n=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0})),l=d({data:(0,s.tP)(e,n),param:t,position:o?i:32*u});i+=l.consumed,a.push(l.value)}return{value:a,consumed:32}}let o=0;const i=[];for(let s=0;s<n;++s){const n=d({data:e,param:t,position:r+o});o+=n.consumed,i.push(n.value)}return{value:i,consumed:o}}(e,{length:r,param:{...t,type:o},position:n})}if("tuple"===t.type)return function(e,{param:t,position:n}){const r=0===t.components.length||t.components.some((({name:e})=>!e)),o=r?[]:{};let i=0;if(f(t)){const a=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0}));for(let n=0;n<t.components.length;++n){const c=t.components[n],u=d({data:(0,s.tP)(e,a),param:c,position:i});i+=u.consumed,o[r?n:c?.name]=u.value}return{consumed:32,value:o}}for(let s=0;s<t.components.length;++s){const a=t.components[s],c=d({data:e,param:a,position:n+i});i+=c.consumed,o[r?s:a?.name]=c.value}return{consumed:i,value:o}}(e,{param:t,position:n});if("string"===t.type)return function(e,{position:t}){const n=(0,c.ly)((0,s.tP)(e,t,t+32,{strict:!0})),r=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0}));if(0===r)return{consumed:32,value:""};return{consumed:32,value:(0,c.rR)((0,a.f)((0,s.tP)(e,n+32,n+32+r,{strict:!0})))}}(e,{position:n});if(t.type.startsWith("bytes"))return function(e,{param:t,position:n}){const[r,o]=t.type.split("bytes");if(!o){const t=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0})),r=(0,c.ly)((0,s.tP)(e,t,t+32,{strict:!0}));if(0===r)return{consumed:32,value:"0x"};return{consumed:32,value:(0,s.tP)(e,t+32,t+32+r,{strict:!0})}}return{consumed:32,value:(0,s.tP)(e,n,n+parseInt(o),{strict:!0})}}(e,{param:t,position:n});const l=(0,s.tP)(e,n,n+32,{strict:!0});if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{param:t}){const n=t.type.startsWith("int");return{consumed:32,value:parseInt(t.type.split("int")[1]||"256")>48?(0,c.y_)(e,{signed:n}):(0,c.ly)(e,{signed:n})}}(l,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,o.x)((0,s.tP)(e,-20))}}(l);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.XA)(e)}}(l);throw new r.CI(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function f(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(f);const n=(0,u.S)(e.type);return!(!n||!f({...e,type:n[1]}))}},86899:function(e,t,n){"use strict";n.d(t,{p:function(){return u}});var r=n(21746),o=n(57412),i=n(3972),s=n(40552),a=n(34450),c=n(80522);function u({abi:e,data:t}){const n=(0,i.tP)(t,0,4);if("0x"===n)throw new o.wb;const u=[...e||[],r.Up,r.hZ].find((e=>"error"===e.type&&n===(0,s.o)((0,c.t)(e))));if(!u)throw new o.yP(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,a.r)(u.inputs,(0,i.tP)(t,4)):void 0,errorName:u.name}}},7210:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(57412),o=n(34450),i=n(40840);const s="/docs/contract/decodeFunctionResult";function a({abi:e,args:t,functionName:n,data:a}){let c=e[0];if(n&&(c=(0,i.mE)({abi:e,args:t,name:n}),!c))throw new r.xL(n,{docsPath:s});if("function"!==c.type)throw new r.xL(void 0,{docsPath:s});if(!c.outputs)throw new r.MX(c.name,{docsPath:s});const u=(0,o.r)(c.outputs,a);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},45444:function(e,t,n){"use strict";n.d(t,{E:function(){return d},S:function(){return p}});var r=n(57412),o=n(26087),i=n(49321),s=n(57040),a=n(61769),c=n(39135),u=n(3972),l=n(92106);function d(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(f({param:e[r],value:t[r]}));return n}({params:e,values:t}),o=h(n);return 0===o.length?"0x":o}function f({param:e,value:t}){const n=p(e.type);if(n){const[o,i]=n;return function(e,{length:t,param:n}){const o=null===t;if(!Array.isArray(e))throw new r.hn(e);if(!o&&e.length!==t)throw new r.gr({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let i=!1;const a=[];for(let r=0;r<e.length;r++){const t=f({param:n,value:e[r]});t.dynamic&&(i=!0),a.push(t)}if(o||i){const e=h(a);if(o){const t=(0,l.eC)(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?(0,s.zo)([t,e]):t}}if(i)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,s.zo)(a.map((({encoded:e})=>e)))}}(t,{length:o,param:{...e,type:i}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const i=t.components[o],s=f({param:i,value:e[Array.isArray(e)?o:i.name]});r.push(s),s.dynamic&&(n=!0)}return{dynamic:n,encoded:n?h(r):(0,s.zo)(r.map((({encoded:e})=>e)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,i.U)(e))throw new o.b({address:e});return{dynamic:!1,encoded:(0,a.gc)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,a.gc)((0,l.C4)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.eC)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=(0,c.d)(e);if(!n){let t=e;return o%32!==0&&(t=(0,a.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,s.zo)([(0,a.gc)((0,l.eC)(o,{size:32})),t])}}if(o!==parseInt(n))throw new r.M4({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,a.gc)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,l.$G)(e),n=Math.ceil((0,c.d)(t)/32),r=[];for(let o=0;o<n;o++)r.push((0,a.gc)((0,u.tP)(t,32*o,32*(o+1)),{dir:"right"}));return{dynamic:!0,encoded:(0,s.zo)([(0,a.gc)((0,l.eC)((0,c.d)(t),{size:32})),...r])}}(t);throw new r.dh(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function h(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:n,encoded:r}=e[i];t+=n?32:(0,c.d)(r)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:s,encoded:a}=e[i];s?(n.push((0,l.eC)(t+o,{size:32})),r.push(a),o+=(0,c.d)(a)):n.push(a)}return(0,s.zo)([...n,...r])}function p(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},30286:function(e,t,n){"use strict";n.d(t,{w:function(){return a}});var r=n(57412),o=n(57040),i=n(45444);const s="/docs/contract/encodeDeployData";function a({abi:e,args:t,bytecode:n}){if(!t||0===t.length)return n;const a=e.find((e=>"type"in e&&"constructor"===e.type));if(!a)throw new r.fM({docsPath:s});if(!("inputs"in a))throw new r.cO({docsPath:s});if(!a.inputs||0===a.inputs.length)throw new r.cO({docsPath:s});const c=(0,i.E)(a.inputs,t);return(0,o.SM)([n,c])}},77799:function(e,t,n){"use strict";n.d(t,{R:function(){return u}});var r=n(57412),o=n(57040),i=n(40552),s=n(45444),a=n(80522),c=n(40840);function u({abi:e,args:t,functionName:n}){let u=e[0];if(n&&(u=(0,c.mE)({abi:e,args:t,name:n}),!u))throw new r.xL(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const l=(0,a.t)(u),d=(0,i.o)(l),f="inputs"in u&&u.inputs?(0,s.E)(u.inputs,t??[]):void 0;return(0,o.SM)([d,f??"0x"])}},80522:function(e,t,n){"use strict";n.d(t,{h:function(){return i},t:function(){return o}});var r=n(57412);function o(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return`${e.name}(${i(e.inputs,{includeName:t})})`}function i(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${i(e.components,{includeName:t})})${e.type.slice("tuple".length)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},40840:function(e,t,n){"use strict";n.d(t,{mE:function(){return c}});var r=n(57412),o=n(15102),i=n(74059),s=n(40552),a=n(49321);function c({abi:e,args:t=[],name:n}){const a=(0,o.v)(n,{strict:!1}),c=e.filter((e=>a?"function"===e.type?(0,s.o)(e)===n:"event"===e.type&&(0,i.e)(e)===n:"name"in e&&e.name===n));if(0===c.length)return;if(1===c.length)return c[0];let d;for(const o of c){if(!("inputs"in o))continue;if(!t||0===t.length){if(!o.inputs||0===o.inputs.length)return o;continue}if(!o.inputs)continue;if(0===o.inputs.length)continue;if(o.inputs.length!==t.length)continue;if(t.every(((e,t)=>{const n="inputs"in o&&o.inputs[t];return!!n&&u(e,n)}))){if(d&&"inputs"in d&&d.inputs){const e=l(o.inputs,d.inputs,t);if(e)throw new r.S4({abiItem:o,type:e[0]},{abiItem:d,type:e[1]})}d=o}}return d||c[0]}function u(e,t){const n=typeof e,r=t.type;switch(r){case"address":return(0,a.U)(e);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===r&&"components"in t?Object.values(t.components).every(((t,n)=>u(Object.values(e)[n],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)&&(Array.isArray(e)&&e.every((e=>u(e,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")}))))}}function l(e,t,n){for(const r in e){const o=e[r],i=t[r];if("tuple"===o.type&&"tuple"===i.type&&"components"in o&&"components"in i)return l(o.components,i.components,n[r]);const s=[o.type,i.type];if(!(!s.includes("address")||!s.includes("bytes20"))||(s.includes("address")&&s.includes("string")||!(!s.includes("address")||!s.includes("bytes")))&&(0,a.U)(n[r]))return s}}},45775:function(e,t,n){"use strict";n.d(t,{K:function(){return c},x:function(){return a}});var r=n(26087),o=n(11187),i=n(88184),s=n(49321);function a(e,t){const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,i.w)((0,o.qX)(n),"bytes"),s=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(15&r[o>>1])>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());return`0x${s.join("")}`}function c(e,t){if(!(0,s.U)(e))throw new r.b({address:e});return a(e,t)}},49321:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});const r=/^0x[a-fA-F0-9]{40}$/;function o(e){return r.test(e)}},37029:function(e,t,n){"use strict";n.d(t,{n:function(){return c},y:function(){return a}});var r=n(62027),o=n(78863),i=n(39028),s=n(7760);const a=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof o.Gg&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status);function c(e,{retryDelay:t=150,retryCount:n=3}={}){return async c=>(0,s.J)((async()=>{try{return await e(c)}catch(t){const e=t;switch(e.code){case i.s7.code:throw new i.s7(e);case i.B.code:throw new i.B(e);case i.LX.code:throw new i.LX(e);case i.nY.code:throw new i.nY(e);case i.XS.code:throw new i.XS(e);case i.yR.code:throw new i.yR(e);case i.Og.code:throw new i.Og(e);case i.pT.code:throw new i.pT(e);case i.KB.code:throw new i.KB(e);case i.gS.code:throw new i.gS(e);case i.Pv.code:throw new i.Pv(e);case i.GD.code:throw new i.GD(e);case i.ab.code:throw new i.ab(e);case i.PE.code:throw new i.PE(e);case i.Ts.code:throw new i.Ts(e);case i.u5.code:throw new i.u5(e);case i.I0.code:throw new i.I0(e);case i.x3.code:throw new i.x3(e);case 5e3:throw new i.ab(e);default:if(t instanceof r.G)throw t;throw new i.ir(e)}}}),{delay:({count:e,error:n})=>{if(n&&n instanceof o.Gg){const e=n?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<<e)*t},retryCount:n,shouldRetry:({error:e})=>!a(e)})}},86164:function(e,t,n){"use strict";function r(e,t={}){const{fees:n=e.fees,formatters:r=e.formatters,serializers:o=e.serializers}=t;return{...e,fees:n,formatters:r,serializers:o}}n.d(t,{a:function(){return r}})},47864:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(80377);function o({blockNumber:e,chain:t,contract:n}){const o=t?.contracts?.[n];if(!o)throw new r.mm({chain:t,contract:{name:n}});if(e&&o.blockCreated&&o.blockCreated>e)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:o.blockCreated}});return o.address}},57040:function(e,t,n){"use strict";function r(e){return"string"===typeof e[0]?o(e):function(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(e)}function o(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}n.d(t,{SM:function(){return o},zo:function(){return r}})},15102:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}n.d(t,{v:function(){return r}})},61769:function(e,t,n){"use strict";n.d(t,{gc:function(){return i},vk:function(){return o}});var r=n(69760);function o(e,{dir:t,size:n=32}={}){return"string"===typeof e?i(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let r=0;r<n;r++){const i="right"===t;o[i?r:n-r-1]=e[i?r:e.length-r-1]}return o}(e,{dir:t,size:n})}function i(e,{dir:t,size:n=32}={}){if(null===n)return e;const o=e.replace("0x","");if(o.length>2*n)throw new r.$({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}},39135:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(15102);function o(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},3972:function(e,t,n){"use strict";n.d(t,{tP:function(){return s}});var r=n(69760),o=n(15102),i=n(39135);function s(e,t,n,{strict:r}={}){return(0,o.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){a(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;r&&c(o,t,n);return o}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){a(e,t);const o=e.slice(t,n);r&&c(o,t,n);return o}(e,t,n,{strict:r})}function a(e,t){if("number"===typeof t&&t>0&&t>(0,i.d)(e)-1)throw new r.m({offset:t,position:"start",size:(0,i.d)(e)})}function c(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,i.d)(e)!==n-t)throw new r.m({offset:n,position:"end",size:(0,i.d)(e)})}},61836:function(e,t,n){"use strict";function r(e,{dir:t="left"}={}){let n="string"===typeof e?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&"0"===n["left"===t?o:n.length-o-1].toString();o++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"===typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}n.d(t,{f:function(){return r}})},95946:function(e,t,n){"use strict";n.d(t,{XA:function(){return u},Yf:function(){return a},ly:function(){return l},rR:function(){return d},y_:function(){return c}});var r=n(87788),o=n(39135),i=n(61836),s=n(11187);function a(e,{size:t}){if((0,o.d)(e)>t)throw new r.M6({givenSize:(0,o.d)(e),maxSize:t})}function c(e,t={}){const{signed:n}=t;t.size&&a(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(a(n,{size:t.size}),n=(0,i.f)(n)),"0x00"===(0,i.f)(n))return!1;if("0x01"===(0,i.f)(n))return!0;throw new r.Cd(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,s.nr)(e);return t.size&&(a(n,{size:t.size}),n=(0,i.f)(n,{dir:"right"})),(new TextDecoder).decode(n)}},11187:function(e,t,n){"use strict";n.d(t,{O0:function(){return u},nr:function(){return y},qX:function(){return b}});var r=n(62027),o=n(15102),i=n(61769),s=n(95946),a=n(92106);const c=new TextEncoder;function u(e,t={}){return"number"===typeof e||"bigint"===typeof e?function(e,t){return y((0,a.eC)(e,t))}(e,t):"boolean"===typeof e?function(e,t={}){const n=new Uint8Array(1);if(n[0]=Number(e),"number"===typeof t.size)return(0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size});return n}(e,t):(0,o.v)(e)?y(e,t):b(e,t)}const l=48,d=57,f=65,h=70,p=97,m=102;function g(e){return e>=l&&e<=d?e-l:e>=f&&e<=h?e-(f-10):e>=p&&e<=m?e-(p-10):void 0}function y(e,t={}){let n=e;t.size&&((0,s.Yf)(n,{size:t.size}),n=(0,i.vk)(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const a=o.length/2,c=new Uint8Array(a);for(let i=0,s=0;i<a;i++){const e=g(o.charCodeAt(s++)),t=g(o.charCodeAt(s++));if(void 0===e||void 0===t)throw new r.G(`Invalid byte sequence ("${o[s-2]}${o[s-1]}" in "${o}").`);c[i]=16*e+t}return c}function b(e,t={}){const n=c.encode(e);return"number"===typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}},92106:function(e,t,n){"use strict";n.d(t,{$G:function(){return f},C4:function(){return c},NC:function(){return a},ci:function(){return u},eC:function(){return l}});var r=n(87788),o=n(61769),i=n(95946);const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e,t={}){return"number"===typeof e||"bigint"===typeof e?l(e,t):"string"===typeof e?f(e,t):"boolean"===typeof e?c(e,t):u(e,t)}function c(e,t={}){const n=`0x${Number(e)}`;return"number"===typeof t.size?((0,i.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}function u(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=s[e[o]];const r=`0x${n}`;return"number"===typeof t.size?((0,i.Yf)(r,{size:t.size}),(0,o.vk)(r,{dir:"right",size:t.size})):r}function l(e,t={}){const{signed:n,size:i}=t,s=BigInt(e);let a;i?a=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"===typeof e&&(a=BigInt(Number.MAX_SAFE_INTEGER));const c="bigint"===typeof a&&n?-a-1n:0;if(a&&s>a||s<c){const t="bigint"===typeof e?"n":"";throw new r.J5({max:a?`${a}${t}`:void 0,min:`${c}${t}`,signed:n,size:i,value:`${e}${t}`})}const u=`0x${(n&&s<0?(1n<<BigInt(8*i))+BigInt(s):s).toString(16)}`;return i?(0,o.vk)(u,{size:i}):u}const d=new TextEncoder;function f(e,t={}){return u(d.encode(e),t)}},11511:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var r=n(15102);function o(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,r.v)(t)?t:null}},74526:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var r=n(21746),o=n(62027),i=n(97405);function s(e,t){if(!(e instanceof o.G))return!1;const n=e.walk((e=>e instanceof i.Lu));return n instanceof i.Lu&&("ResolverNotFound"===n.data?.errorName||("ResolverWildcardNotSupported"===n.data?.errorName||(!!n.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&n.reason===r.$[50])))}},42216:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(11187),o=n(92106),i=n(88184),s=n(11511);function a(e){const t=new Uint8Array(32).fill(0);return e?(0,s.i)(e)||(0,i.w)((0,r.qX)(e)):(0,o.ci)(t)}},75719:function(e,t,n){"use strict";n.d(t,{V:function(){return c}});var r=n(57040),o=n(11187),i=n(92106),s=n(88184),a=n(11511);function c(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,i.ci)(t);const n=e.split(".");for(let i=n.length-1;i>=0;i-=1){const e=(0,a.i)(n[i]),c=e?(0,o.O0)(e):(0,s.w)((0,o.qX)(n[i]),"bytes");t=(0,s.w)((0,r.zo)([t,c]),"bytes")}return(0,i.ci)(t)}},72435:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var r=n(11187);var o=n(42216);function i(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const n=new Uint8Array((0,r.qX)(t).byteLength+2);let i=0;const s=t.split(".");for(let a=0;a<s.length;a++){let e=(0,r.qX)(s[a]);e.byteLength>255&&(e=(0,r.qX)(`[${(0,o.d)(s[a]).slice(2)}]`)),n[i]=e.length,n.set(e,i+1),i+=e.length+1}return n.byteLength!==i+1?n.slice(0,i+1):n}},72365:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var r=n(57412),o=n(62027),i=n(97405),s=n(39028);const a=3;function c(e,{abi:t,address:n,args:c,docsPath:u,functionName:l,sender:d}){const{code:f,data:h,message:p,shortMessage:m}=e instanceof i.VQ?e:e instanceof o.G?e.walk((e=>"data"in e))||e.walk():{},g=e instanceof r.wb?new i.Dk({functionName:l}):[a,s.XS.code].includes(f)&&(h||p||m)?new i.Lu({abi:t,data:"object"===typeof h?h.data:h,functionName:l,message:m??p}):e;return new i.uq(g,{abi:t,args:c,contractAddress:n,docsPath:u,functionName:l,sender:d})}},87469:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(62027),o=n(26445);function i(e,t){const n=(e.details||"").toLowerCase(),i=e.walk((e=>e.code===o.M_.code));return i instanceof r.G?new o.M_({cause:e,message:i.details}):o.M_.nodeMessage.test(n)?new o.M_({cause:e,message:e.details}):o.Hh.nodeMessage.test(n)?new o.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.G$.nodeMessage.test(n)?new o.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.ZI.nodeMessage.test(n)?new o.ZI({cause:e,nonce:t?.nonce}):o.vU.nodeMessage.test(n)?new o.vU({cause:e,nonce:t?.nonce}):o.se.nodeMessage.test(n)?new o.se({cause:e,nonce:t?.nonce}):o.C_.nodeMessage.test(n)?new o.C_({cause:e}):o.WF.nodeMessage.test(n)?new o.WF({cause:e,gas:t?.gas}):o.dR.nodeMessage.test(n)?new o.dR({cause:e,gas:t?.gas}):o.pZ.nodeMessage.test(n)?new o.pZ({cause:e}):o.cs.nodeMessage.test(n)?new o.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new o.cj({cause:e})}},43310:function(e,t,n){"use strict";n.d(t,{G:function(){return s},Z:function(){return i}});var r=n(21366),o=n(6073);function i(e){const t=e.transactions?.map((e=>"string"===typeof e?e:(0,o.Tr)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const s=(0,r.$)("block",i)},61163:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};const n={};return function t(r){const o=Object.keys(r);for(const i of o)i in e&&(n[i]=e[i]),r[i]&&"object"===typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}n.d(t,{K:function(){return r}})},21366:function(e,t,n){"use strict";function r(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const o=t(e);if(n)for(const t of n)delete o[t];return{...o,...r(e)}},type:e})}n.d(t,{$:function(){return r}})},53992:function(e,t,n){"use strict";function r(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}n.d(t,{U:function(){return r}})},6073:function(e,t,n){"use strict";n.d(t,{Tr:function(){return s},c8:function(){return i},y_:function(){return a}});var r=n(95946),o=n(21366);const i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function s(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"===typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const a=(0,o.$)("transaction",s)},30866:function(e,t,n){"use strict";n.d(t,{d:function(){return u},f:function(){return c}});var r=n(95946),o=n(21366),i=n(53992),s=n(6073);const a={"0x0":"reverted","0x1":"success"};function c(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,i.U)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?a[e.status]:null,type:e.type?s.c8[e.type]||e.type:null}}const u=(0,o.$)("transactionReceipt",c)},74688:function(e,t,n){"use strict";n.d(t,{tG:function(){return i}});var r=n(92106);const o={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function i(e){return{...e,gas:"undefined"!==typeof e.gas?(0,r.eC)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,r.eC)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,r.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,r.eC)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,r.eC)(e.nonce):void 0,type:"undefined"!==typeof e.type?o[e.type]:void 0,value:"undefined"!==typeof e.value?(0,r.eC)(e.value):void 0}}},93714:function(e,t,n){"use strict";function r(e,t,n){return r=>e[t.name||n]?.(r)??t(e,r)}n.d(t,{s:function(){return r}})},74059:function(e,t,n){"use strict";n.d(t,{e:function(){return s}});var r=n(11187),o=n(66620);var i=n(88184);const s=e=>{return t=(e=>(0,o.r)(e))(e),(0,i.w)((0,r.O0)(t));var t}},40552:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(3972),o=n(11187),i=n(66620),s=n(88184);const a=e=>{return(0,r.tP)((t=(0,i.r)(e),(0,s.w)((0,o.O0)(t))),0,4);var t}},66620:function(e,t,n){"use strict";n.d(t,{r:function(){return a}});const r=/^tuple(?<array>(\[(\d*)\])*)$/;function o(e){let t=e.type;if(r.test(e.type)&&"components"in e){t="(";const s=e.components.length;for(let n=0;n<s;n++){t+=o(e.components[n]),n<s-1&&(t+=", ")}return t+=`)${(n=r,i=e.type,n.exec(i)?.groups)?.array??""}`,o({...e,type:t})}var n,i;return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function i(e){let t="";const n=e.length;for(let r=0;r<n;r++){t+=o(e[r]),r!==n-1&&(t+=", ")}return t}var s=n(62027);const a=e=>function(e){let t=!0,n="",r=0,o="",i=!1;for(let s=0;s<e.length;s++){const a=e[s];if(["(",")",","].includes(a)&&(t=!0),"("===a&&r++,")"===a&&r--,t)if(0!==r)" "!==a?(o+=a,n+=a):","!==e[s-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===a&&["event","function",""].includes(o))o="";else if(o+=a,")"===a){i=!0;break}}if(!i)throw new s.G("Unable to normalize signature.");return o}((()=>{return"string"===typeof e?e:"function"===(t=e).type?`function ${t.name}(${i(t.inputs)})${t.stateMutability&&"nonpayable"!==t.stateMutability?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${i(t.outputs)})`:""}`:"event"===t.type?`event ${t.name}(${i(t.inputs)})`:"error"===t.type?`error ${t.name}(${i(t.inputs)})`:"constructor"===t.type?`constructor(${i(t.inputs)})${"payable"===t.stateMutability?" payable":""}`:"fallback"===t.type?"fallback()":"receive() external payable";var t})())},88184:function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){o(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}n.d(t,{w:function(){return N}});const a=BigInt(2**32-1),c=BigInt(32);function u(e,t=!1){return t?{h:Number(e&a),l:Number(e>>c&a)}:{h:0|Number(e>>c&a),l:0|Number(e&a)}}function l(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=u(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]}const d=(e,t,n)=>e<<n|t>>>32-n,f=(e,t,n)=>t<<n|e>>>32-n,h=(e,t,n)=>t<<n-32|e>>>64-n,p=(e,t,n)=>e<<n-32|t>>>64-n;const m=e=>e instanceof Uint8Array;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function g(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!m(e))throw new Error("expected Uint8Array, got "+typeof e);return e}const[y,b,v]=[[],[],[]],w=BigInt(0),x=BigInt(1),E=BigInt(2),_=BigInt(7),k=BigInt(256),S=BigInt(113);for(let L=0,U=x,D=1,F=0;L<24;L++){[D,F]=[F,(2*D+3*F)%5],y.push(2*(5*F+D)),b.push((L+1)*(L+2)/2%64);let e=w;for(let t=0;t<7;t++)U=(U<<x^(U>>_)*S)%k,U&E&&(e^=x<<(x<<BigInt(t))-x);v.push(e)}const[I,C]=l(v,!0),T=(e,t,n)=>n>32?h(e,t,n):d(e,t,n),A=(e,t,n)=>n>32?p(e,t,n):f(e,t,n);class P extends class{clone(){return this._cloneInto()}}{constructor(e,t,n,o=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=o,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,i=n[o],s=n[o+1],a=T(i,s,1)^n[t],c=A(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=b[n],i=T(t,o,r),s=A(t,o,r),a=y[n];t=e[a],o=e[a+1],e[a]=i,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=I[r],e[1]^=C[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){i(this);const{blockLen:t,state:n}=this,r=(e=g(e)).length;for(let o=0;o<r;){const i=Math.min(t-this.pos,r-o);for(let t=0;t<i;t++)n[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){i(this,!1),o(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return r(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(s(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new P(t,n,r,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}const O=(e,t,n)=>function(e){const t=t=>e().update(g(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}((()=>new P(t,e,n))),j=O(1,136,32);var M=n(15102),R=n(11187),B=n(92106);function N(e,t){const n=t||"hex",r=j((0,M.v)(e,{strict:!1})?(0,R.O0)(e):e);return"bytes"===n?r:(0,B.NC)(r)}},32357:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});const r=new Map;function o({fn:e,id:t,shouldSplitBatch:n,wait:o=0,sort:i}){const s=async()=>{const t=c();a();const n=t.map((({args:e})=>e));0!==n.length&&e(n).then((e=>{i&&Array.isArray(e)&&e.sort(i);for(let n=0;n<t.length;n++){const{pendingPromise:r}=t[n];r.resolve?.([e[n],e])}})).catch((e=>{for(let n=0;n<t.length;n++){const{pendingPromise:r}=t[n];r.reject?.(e)}}))},a=()=>r.delete(t),c=()=>r.get(t)||[],u=e=>r.set(t,[...c(),e]);return{flush:a,async schedule(e){const t={},r=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),i=n?.([...c().map((({args:e})=>e)),e]);i&&s();return c().length>0?(u({args:e,pendingPromise:t}),r):(u({args:e,pendingPromise:t}),setTimeout(s,o),r)}}}},7760:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r=n(62914);function o(e,{delay:t=100,retryCount:n=2,shouldRetry:o=(()=>!0)}={}){return new Promise(((i,s)=>{const a=async({count:c=0}={})=>{try{const t=await e();i(t)}catch(u){if(c<n&&await o({count:c,error:u}))return(async({error:e})=>{const n="function"===typeof t?t({count:c,error:e}):t;n&&await(0,r.D)(n),a({count:c+1})})({error:u});s(u)}};a()}))}},96070:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r=(e,t,n)=>JSON.stringify(e,((e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r}),n)},47531:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(14503),o=n(26087),i=n(26445),s=n(33639),a=n(49321);function c(e){const{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.T)(t):void 0;if(d&&!(0,a.U)(d.address))throw new o.b({address:d.address});if(l&&!(0,a.U)(l))throw new o.b({address:l});if("undefined"!==typeof n&&("undefined"!==typeof c||"undefined"!==typeof u))throw new s.xY;if(c&&c>2n**256n-1n)throw new i.Hh({maxFeePerGas:c});if(u&&c&&u>c)throw new i.cs({maxFeePerGas:c,maxPriorityFeePerGas:u})}},71352:function(e,t,n){"use strict";n.d(t,{cj:function(){return d},iC:function(){return l}});var r=n(57412),o=n(26087),i=n(49321),s=n(39135),a=n(92106);const c=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,u=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function l({domain:e,message:t,primaryType:n,types:l}){const d=l,f=(e,t)=>{for(const n of e){const{name:e,type:l}=n,h=l,p=t[e],m=h.match(u);if(m&&("number"===typeof p||"bigint"===typeof p)){const[e,t,n]=m;(0,a.eC)(p,{signed:"int"===t,size:parseInt(n)/8})}if("address"===h&&"string"===typeof p&&!(0,i.U)(p))throw new o.b({address:p});const g=h.match(c);if(g){const[e,t]=g;if(t&&(0,s.d)(p)!==parseInt(t))throw new r.KY({expectedSize:parseInt(t),givenSize:(0,s.d)(p)})}const y=d[h];y&&f(y,p)}};if(d.EIP712Domain&&e&&f(d.EIP712Domain,e),"EIP712Domain"!==n){const e=d[n];f(e,t)}}function d({domain:e}){return["string"===typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"===typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},39625:function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(84192),o=n(15229);function i(e,t="wei"){return(0,o.b)(e,r.ez[t])}},67795:function(e,t,n){"use strict";n.d(t,{o:function(){return i}});var r=n(84192),o=n(15229);function i(e,t="wei"){return(0,o.b)(e,r.Zn[t])}},15229:function(e,t,n){"use strict";function r(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}n.d(t,{b:function(){return r}})},21803:function(e,t,n){"use strict";function r(e,t){let[n,r="0"]=e.split(".");const o=n.startsWith("-");if(o&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,o,i]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],s=Math.round(Number(`${o}.${i}`));r=s>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${s}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${o?"-":""}${n}${r}`)}n.d(t,{v:function(){return r}})},62914:function(e,t,n){"use strict";async function r(e){return new Promise((t=>setTimeout(t,e)))}n.d(t,{D:function(){return r}})},34789:function(e,t,n){"use strict";function r({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:s=JSON.parse,retry:a}){if(e){const i=n=>{try{return void e.setItem(t,r(n))}catch(o){return o}};return{persistClient:o((e=>{let t=e,n=i(t),r=0;for(;n&&t;)r++,t=null==a?void 0:a({persistedClient:t,error:n,errorCount:r}),t&&(n=i(t))}),n),restoreClient:()=>{const n=e.getItem(t);if(n)return s(n)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:i,restoreClient:()=>{},removeClient:i}}function o(e,t=100){let n,r=null;return function(...o){n=o,null===r&&(r=setTimeout((()=>{e(...n),r=null}),t))}}function i(){}n.d(t,{eM:function(){return Ce},_g:function(){return ke},Ui:function(){return ft},mA:function(){return Je},KQ:function(){return et},$4:function(){return nt},xD:function(){return dt},do:function(){return ht},Dm:function(){return pt},GG:function(){return gt},qL:function(){return it},c9:function(){return vt},F6:function(){return xt},LK:function(){return Ke},LN:function(){return st},PJ:function(){return yt},t_:function(){return Ue},QW:function(){return ct},g0:function(){return lt},BX:function(){return Et},py:function(){return ze}});const s="undefined"===typeof window||"Deno"in window;function a(){}function c(e){return"number"===typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return k(e)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function d(e,t,n){return k(e)?"function"===typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"===typeof e?{...t,mutationFn:e}:{...e}}function f(e,t,n){return k(e)?[{...t,queryKey:e},n]:[e||{},t]}function h(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(k(s))if(r){if(t.queryHash!==m(s,t.options))return!1}else if(!y(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof a||t.isStale()===a)&&(("undefined"===typeof o||o===t.state.fetchStatus)&&!(i&&!i(t)))}function p(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(k(i)){if(!t.options.mutationKey)return!1;if(n){if(g(t.options.mutationKey)!==g(i))return!1}else if(!y(t.options.mutationKey,i))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||g)(e)}function g(e){return JSON.stringify(e,((e,t)=>E(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function y(e,t){return b(e,t)}function b(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((n=>!b(e[n],t[n]))))}function v(e,t){if(e===t)return e;const n=x(e)&&x(t);if(n||E(e)&&E(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let a=0;for(let c=0;c<i;c++){const r=n?c:o[c];s[r]=v(e[r],t[r]),s[r]===e[r]&&a++}return r===i&&a===r?e:s}return t}function w(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function x(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function E(e){if(!_(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!_(n)&&!!n.hasOwnProperty("isPrototypeOf")}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function k(e){return Array.isArray(e)}function S(e){return new Promise((t=>{setTimeout(t,e)}))}function I(e){S(0).then(e)}function C(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?v(e,t):t}const T=console;const A=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()};const o=r=>{t?e.push(r):I((()=>{n(r)}))},i=()=>{const t=e;e=[],t.length&&I((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||i()}return n},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}();class P{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const O=new class extends P{constructor(){super(),this.setup=e=>{if(!s&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach((({listener:e})=>{e()}))}isFocused(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}};const j=new class extends P{constructor(){super(),this.setup=e=>{if(!s&&window.addEventListener){const t=()=>e();return window.addEventListener("online",t,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach((({listener:e})=>{e()}))}isOnline(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine}};function M(e){return Math.min(1e3*2**e,3e4)}function R(e){return"online"!==(null!=e?e:"online")||j.isOnline()}class B{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function N(e){return e instanceof B}function L(e){let t,n,r,o=!1,i=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),c=()=>!O.isFocused()||"always"!==e.networkMode&&!j.isOnline(),u=r=>{s||(s=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},l=n=>{s||(s=!0,null==e.onError||e.onError(n),null==t||t(),r(n))},d=()=>new Promise((n=>{t=e=>{const t=s||!c();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,s||null==e.onContinue||e.onContinue()})),f=()=>{if(s)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(u).catch((t=>{var n,r;if(s)return;const a=null!=(n=e.retry)?n:3,u=null!=(r=e.retryDelay)?r:M,h="function"===typeof u?u(i,t):u,p=!0===a||"number"===typeof a&&i<a||"function"===typeof a&&a(i,t);!o&&p?(i++,null==e.onFail||e.onFail(i,t),S(h).then((()=>{if(c())return d()})).then((()=>{o?l(t):f()}))):l(t)}))};return R(e.networkMode)?f():d().then(f),{promise:a,cancel:t=>{s||(l(new B(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?a:Promise.resolve(),cancelRetry:()=>{o=!0},continueRetry:()=>{o=!1}}}class U{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),c(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:s?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class D extends U{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||T,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=C(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(a).catch(a):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!u(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);const i=function(){if("function"===typeof AbortController)return new AbortController}(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(i)return this.abortSignalConsumed=!0,i.signal}})};a(s);const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn")};var u;(a(c),null==(n=this.options.behavior)||n.onFetch(c),this.revertState=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=c.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(u=c.fetchOptions)?void 0:u.meta});const l=e=>{var t,n,r,o;(N(e)&&e.silent||this.dispatch({type:"error",error:e}),N(e))||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=L({fn:c.fetchFn,abort:null==i?void 0:i.abort.bind(i),onSuccess:e=>{var t,n,r,o;"undefined"!==typeof e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):l(new Error(this.queryHash+" data is undefined"))},onError:l,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:R(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return N(o)&&o.revert&&this.revertState?{...this.revertState}:{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),A.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}class F extends P{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;const o=t.queryKey,i=null!=(r=t.queryHash)?r:m(o,t);let s=this.get(i);return s||(s=new D({cache:this,logger:e.getLogger(),queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){A.batch((()=>{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=f(e,t);return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((e=>h(n,e)))}findAll(e,t){const[n]=f(e,t);return Object.keys(n).length>0?this.queries.filter((e=>h(n,e))):this.queries}notify(e){A.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}onFocus(){A.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){A.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}class z extends U{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||T,this.observers=[],this.state=e.state||$(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=L({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,o,i,s,a,c,u;if(!t){var l,d,f,h;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(l=(d=this.mutationCache.config).onMutate)?void 0:l.call(d,this.state.variables,this));const e=await(null==(f=(h=this.options).onMutate)?void 0:f.call(h,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const p=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,p,this.state.variables,this.state.context,this)),await(null==(o=(i=this.options).onSuccess)?void 0:o.call(i,p,this.state.variables,this.state.context)),await(null==(s=(a=this.mutationCache.config).onSettled)?void 0:s.call(a,p,null,this.state.variables,this.state.context,this)),await(null==(c=(u=this.options).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(E){try{var p,m,g,y,b,v,w,x;throw await(null==(p=(m=this.mutationCache.config).onError)?void 0:p.call(m,E,this.state.variables,this.state.context,this)),await(null==(g=(y=this.options).onError)?void 0:g.call(y,E,this.state.variables,this.state.context)),await(null==(b=(v=this.mutationCache.config).onSettled)?void 0:b.call(v,void 0,E,this.state.variables,this.state.context,this)),await(null==(w=(x=this.options).onSettled)?void 0:w.call(x,void 0,E,this.state.variables,this.state.context)),E}finally{this.dispatch({type:"error",error:E})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!R(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),A.batch((()=>{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}function $(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class q extends P{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new z({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){A.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((t=>p(e,t)))}findAll(e){return this.mutations.filter((t=>p(e,t)))}notify(e){A.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>e.state.isPaused));return A.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(a)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}function Z(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,s;const a=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,c=null==(r=e.fetchOptions)||null==(o=r.meta)?void 0:o.fetchMore,u=null==c?void 0:c.pageParam,l="forward"===(null==c?void 0:c.direction),d="backward"===(null==c?void 0:c.direction),f=(null==(i=e.state.data)?void 0:i.pages)||[],h=(null==(s=e.state.data)?void 0:s.pageParams)||[];let p=h,m=!1;const g=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),y=(e,t,n,r)=>(p=r?[t,...p]:[...p,t],r?[n,...e]:[...e,n]),b=(t,n,r,o)=>{if(m)return Promise.reject("Cancelled");if("undefined"===typeof r&&!n&&t.length)return Promise.resolve(t);const i={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var s;s=i,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?m=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{m=!0})),e.signal}});const a=g(i);return Promise.resolve(a).then((e=>y(t,r,e,o)))};let v;if(f.length)if(l){const t="undefined"!==typeof u,n=t?u:H(e.options,f);v=b(f,t,n)}else if(d){const t="undefined"!==typeof u,n=t?u:W(e.options,f);v=b(f,t,n,!0)}else{p=[];const t="undefined"===typeof e.options.getNextPageParam;v=!a||!f[0]||a(f[0],0,f)?b([],t,h[0]):Promise.resolve(y([],h[0],f[0]));for(let n=1;n<f.length;n++)v=v.then((r=>{if(!a||!f[n]||a(f[n],n,f)){const o=t?h[n]:H(e.options,r);return b(r,t,o)}return Promise.resolve(y(r,h[n],f[n]))}))}else v=b([]);return v.then((e=>({pages:e,pageParams:p})))}}}}function H(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function W(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function G(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=H(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}function K(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=W(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}class V{constructor(e={}){this.queryCache=e.queryCache||new F,this.mutationCache=e.mutationCache||new q,this.logger=e.logger||T,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=O.subscribe((()=>{O.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=j.subscribe((()=>{j.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=f(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=l(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"===typeof e?e(t):e}(t,null==r?void 0:r.state.data);if("undefined"===typeof o)return;const i=l(e),s=this.defaultQueryOptions(i);return this.queryCache.build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return A.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=f(e,t),r=this.queryCache;A.batch((()=>{r.findAll(n).forEach((e=>{r.remove(e)}))}))}resetQueries(e,t,n){const[r,o]=f(e,t,n),i=this.queryCache,s={type:"active",...r};return A.batch((()=>(i.findAll(r).forEach((e=>{e.reset()})),this.refetchQueries(s,o))))}cancelQueries(e,t,n){const[r,o={}]=f(e,t,n);"undefined"===typeof o.revert&&(o.revert=!0);const i=A.batch((()=>this.queryCache.findAll(r).map((e=>e.cancel(o)))));return Promise.all(i).then(a).catch(a)}invalidateQueries(e,t,n){const[r,o]=f(e,t,n);return A.batch((()=>{var e,t;if(this.queryCache.findAll(r).forEach((e=>{e.invalidate()})),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)}))}refetchQueries(e,t,n){const[r,o]=f(e,t,n),i=A.batch((()=>this.queryCache.findAll(r).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}))));let s=Promise.all(i).then(a);return null!=o&&o.throwOnError||(s=s.catch(a)),s}fetchQuery(e,t,n){const r=l(e,t,n),o=this.defaultQueryOptions(r);"undefined"===typeof o.retry&&(o.retry=!1);const i=this.queryCache.build(this,o);return i.isStaleByTime(o.staleTime)?i.fetch(o):Promise.resolve(i.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(a).catch(a)}fetchInfiniteQuery(e,t,n){const r=l(e,t,n);return r.behavior=Z(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(a).catch(a)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>g(e)===g(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>y(e,t.queryKey)));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>g(e)===g(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>y(e,t.mutationKey)));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=m(t.queryKey,t)),"undefined"===typeof t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),"undefined"===typeof t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}function X(e){return e.state.isPaused}function Y(e){return"success"===e.state.status}function J(e,t={}){const n=[],r=[];if(!1!==t.dehydrateMutations){const r=t.shouldDehydrateMutation||X;e.getMutationCache().getAll().forEach((e=>{r(e)&&n.push(function(e){return{mutationKey:e.options.mutationKey,state:e.state}}(e))}))}if(!1!==t.dehydrateQueries){const n=t.shouldDehydrateQuery||Y;e.getQueryCache().getAll().forEach((e=>{n(e)&&r.push(function(e){return{state:e.state,queryKey:e.queryKey,queryHash:e.queryHash}}(e))}))}return{mutations:n,queries:r}}const Q=["added","removed","updated"];function ee(e){return Q.includes(e)}async function te({queryClient:e,persister:t,buster:n="",dehydrateOptions:r}){const o={buster:n,timestamp:Date.now(),clientState:J(e,r)};await t.persistClient(o)}function ne(e){let t,n=!1;const r=async function({queryClient:e,persister:t,maxAge:n=864e5,buster:r="",hydrateOptions:o}){try{const i=await t.restoreClient();if(i)if(i.timestamp){const s=Date.now()-i.timestamp>n,a=i.buster!==r;s||a?t.removeClient():function(e,t,n){if("object"!==typeof t||null===t)return;const r=e.getMutationCache(),o=e.getQueryCache(),i=t.mutations||[],s=t.queries||[];i.forEach((t=>{var o;r.build(e,{...null==n||null==(o=n.defaultOptions)?void 0:o.mutations,mutationKey:t.mutationKey},t.state)})),s.forEach((t=>{var r;const i=o.get(t.queryHash),s={...t.state,fetchStatus:"idle"};i?i.state.dataUpdatedAt<s.dataUpdatedAt&&i.setState(s):o.build(e,{...null==n||null==(r=n.defaultOptions)?void 0:r.queries,queryKey:t.queryKey,queryHash:t.queryHash},s)}))}(e,i.clientState,o)}else t.removeClient()}catch(i){t.removeClient()}}(e).then((()=>{n||(t=function(e){const t=e.queryClient.getQueryCache().subscribe((t=>{ee(t.type)&&te(e)})),n=e.queryClient.getMutationCache().subscribe((t=>{ee(t.type)&&te(e)}));return()=>{t(),n()}}(e))}));return[()=>{n=!0,null==t||t()},r]}var re=n(65049),oe=n(67294);const ie=oe.createContext(void 0),se=oe.createContext(!1);function ae(e,t){return e||(t&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ie),window.ReactQueryClientContext):ie)}const ce=({context:e}={})=>{const t=oe.useContext(ae(e,oe.useContext(se)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ue=({client:e,children:t,context:n,contextSharing:r=!1})=>{oe.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const o=ae(n,r);return oe.createElement(se.Provider,{value:!n&&r},oe.createElement(o.Provider,{value:e},t))},le=oe.createContext(!1);le.Provider;function de(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const fe=oe.createContext(de());var he=n(61688);class pe extends P{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),me(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ge(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ge(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),w(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&ye(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const i=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&i===this.currentRefetchInterval||this.updateRefetchInterval(i)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach((n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})})),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(a)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),s||this.currentResult.isStale||!c(this.options.staleTime))return;const e=u(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var e;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!s&&!1!==this.options.enabled&&c(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>{(this.options.refetchIntervalInBackground||O.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,r=this.options,o=this.currentResult,i=this.currentResultState,s=this.currentResultOptions,a=e!==n,c=a?e.state:this.currentQueryInitialState,u=a?this.currentResult:this.previousQueryResult,{state:l}=e;let d,{dataUpdatedAt:f,error:h,errorUpdatedAt:p,fetchStatus:m,status:g}=l,y=!1,b=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&me(e,t),s=o&&ye(e,n,t,r);(i||s)&&(m=R(e.options.networkMode)?"fetching":"paused",f||(g="loading")),"isRestoring"===t._optimisticResults&&(m="idle")}if(t.keepPreviousData&&!l.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==g)d=u.data,f=u.dataUpdatedAt,g=u.status,y=!0;else if(t.select&&"undefined"!==typeof l.data)if(o&&l.data===(null==i?void 0:i.data)&&t.select===this.selectFn)d=this.selectResult;else try{this.selectFn=t.select,d=t.select(l.data),d=C(null==o?void 0:o.data,d,t),this.selectResult=d,this.selectError=null}catch(E){0,this.selectError=E}else d=l.data;if("undefined"!==typeof t.placeholderData&&"undefined"===typeof d&&"loading"===g){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==s?void 0:s.placeholderData))e=o.data;else if(e="function"===typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&"undefined"!==typeof e)try{e=t.select(e),this.selectError=null}catch(E){0,this.selectError=E}"undefined"!==typeof e&&(g="success",d=C(null==o?void 0:o.data,e,t),b=!0)}this.selectError&&(h=this.selectError,d=this.selectResult,p=Date.now(),g="error");const v="fetching"===m,w="loading"===g,x="error"===g;return{status:g,fetchStatus:m,isLoading:w,isSuccess:"success"===g,isError:x,isInitialLoading:w&&v,data:d,dataUpdatedAt:f,error:h,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:x&&0===l.dataUpdatedAt,isPaused:"paused"===m,isPlaceholderData:b,isPreviousData:y,isRefetchError:x&&0!==l.dataUpdatedAt,isStale:be(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,w(n,t))return;this.currentResult=n;const r={cache:!0};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;const n=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&n.add("error"),Object.keys(this.currentResult).some((e=>{const r=e;return this.currentResult[r]!==t[r]&&n.has(r)}))})()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||N(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){A.batch((()=>{var t,n,r,o;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(o=this.options).onSettled)||r.call(o,this.currentResult.data,null);else if(e.onError){var i,s,a,c;null==(i=(s=this.options).onError)||i.call(s,this.currentResult.error),null==(a=(c=this.options).onSettled)||a.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)})),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function me(e,t){return function(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&ge(e,t,t.refetchOnMount)}function ge(e,t,n){if(!1!==t.enabled){const r="function"===typeof n?n(e):n;return"always"===r||!1!==r&&be(e,t)}return!1}function ye(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&be(e,n)}function be(e,t){return e.isStaleByTime(t.staleTime)}class ve extends pe{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Z()},t)}getOptimisticResult(e){return e.behavior=Z(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,t){var n,r,o,i,s,a;const{state:c}=e,u=super.createResult(e,t),{isFetching:l,isRefetching:d}=u,f=l&&"forward"===(null==(n=c.fetchMeta)||null==(r=n.fetchMore)?void 0:r.direction),h=l&&"backward"===(null==(o=c.fetchMeta)||null==(i=o.fetchMore)?void 0:i.direction);return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:G(t,null==(s=c.data)?void 0:s.pages),hasPreviousPage:K(t,null==(a=c.data)?void 0:a.pages),isFetchingNextPage:f,isFetchingPreviousPage:h,isRefetching:d&&!f&&!h}}}const we=he.useSyncExternalStore;class xe extends P{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),w(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.currentMutation)||e.removeObserver(this))}onMutationUpdate(e){this.updateResult();const t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:"undefined"!==typeof e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){A.batch((()=>{var t,n,r,o;if(this.mutateOptions&&this.hasListeners())if(e.onSuccess)null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(o=this.mutateOptions).onSettled)||r.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var i,s,a,c;null==(i=(s=this.mutateOptions).onError)||i.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(c=this.mutateOptions).onSettled)||a.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)}))}))}}function Ee(){}var _e=n(52798);function ke({queryClient:e=new V({defaultOptions:{queries:{cacheTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:t=(0,re.o6)({storage:"undefined"!==typeof window&&window.localStorage?window.localStorage:re.wp}),persister:n=("undefined"!==typeof window?r({key:"cache",storage:t,serialize:e=>e,deserialize:e=>e}):void 0),...o}){const i=(0,re._g)({...o,storage:t});return n&&ne({queryClient:e,persister:n,dehydrateOptions:{shouldDehydrateQuery:e=>0!==e.cacheTime&&!1!==e.queryKey[0].persist}}),Object.assign(i,{queryClient:e})}var Se=oe.createContext(void 0),Ie=oe.createContext(void 0);function Ce({children:e,config:t}){return oe.createElement(Se.Provider,{children:oe.createElement(ue,{children:e,client:t.queryClient,context:Ie}),value:t})}function Te(){const e=oe.useContext(Se);if(!e)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join("\n"));return e}var Ae=he.useSyncExternalStore;function Pe(e){return"[object Object]"===Object.prototype.toString.call(e)}function Oe(e,t,n){return r=e,Array.isArray(r)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e;var r}function je(e){return JSON.stringify(e,((e,t)=>function(e){if(!Pe(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!Pe(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):"bigint"===typeof t?t.toString():t))}function Me(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(t.trackedProps.add(r),e[r])})})),n}function Re(e,t){const n=ce({context:e.context}),r=oe.useContext(le),o=oe.useContext(fe),i=n.defaultQueryOptions({...e,queryKeyHashFn:je});i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=A.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=A.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=A.batchCalls(i.onSettled)),i.suspense&&"number"!==typeof i.staleTime&&(i.staleTime=1e3),(i.suspense||i.useErrorBoundary)&&(o.isReset()||(i.retryOnMount=!1));const[s]=oe.useState((()=>new t(n,i))),a=s.getOptimisticResult(i);if(Ae(oe.useCallback((e=>r?()=>{}:s.subscribe(A.batchCalls(e))),[s,r]),(()=>s.getCurrentResult()),(()=>s.getCurrentResult())),oe.useEffect((()=>{o.clearReset()}),[o]),oe.useEffect((()=>{s.setOptions(i,{listeners:!1})}),[i,s]),i.suspense&&a.isLoading&&a.isFetching&&!r)throw s.fetchOptimistic(i).then((({data:e})=>{i.onSuccess?.(e),i.onSettled?.(e,null)})).catch((e=>{o.clearReset(),i.onError?.(e),i.onSettled?.(void 0,e)}));if(a.isError&&!o.isReset()&&!a.isFetching&&(c=i.useErrorBoundary,u=[a.error,s.getCurrentQuery()],"function"===typeof c?c(...u):c))throw a.error;var c,u;const l="loading"===a.status&&"idle"===a.fetchStatus?"idle":a.status,d="idle"===l,f="loading"===l&&"fetching"===a.fetchStatus;return{...a,defaultedOptions:i,isIdle:d,isLoading:f,observer:s,status:l}}function Be(e,t,n){const r=d(e,t,n);return function(e,t,n){const r=d(e,t,n),o=ce({context:r.context}),[i]=oe.useState((()=>new xe(o,r)));oe.useEffect((()=>{i.setOptions(r)}),[i,r]);const s=we(oe.useCallback((e=>i.subscribe(A.batchCalls(e))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),a=oe.useCallback(((e,t)=>{i.mutate(e,t).catch(Ee)}),[i]);if(s.error&&(c=i.options.useErrorBoundary,u=[s.error],"function"===typeof c?c(...u):c))throw s.error;var c,u;return{...s,mutate:a,mutateAsync:s.mutate}}({context:Ie,...r})}function Ne(e,t,n){const r=Oe(e,t,n),o=Re({context:Ie,...r},pe),i={data:o.data,error:o.error,fetchStatus:o.fetchStatus,isError:o.isError,isFetched:o.isFetched,isFetchedAfterMount:o.isFetchedAfterMount,isFetching:o.isFetching,isIdle:o.isIdle,isLoading:o.isLoading,isRefetching:o.isRefetching,isSuccess:o.isSuccess,refetch:o.refetch,status:o.status,internal:{dataUpdatedAt:o.dataUpdatedAt,errorUpdatedAt:o.errorUpdatedAt,failureCount:o.failureCount,isFetchedAfterMount:o.isFetchedAfterMount,isLoadingError:o.isLoadingError,isPaused:o.isPaused,isPlaceholderData:o.isPlaceholderData,isPreviousData:o.isPreviousData,isRefetchError:o.isRefetchError,isStale:o.isStale,remove:o.remove}};return o.defaultedOptions.notifyOnChangeProps?i:Me(i,o.observer)}var Le=()=>ce({context:Ie});function Ue({chainId:e}={}){return(0,_e.useSyncExternalStoreWithSelector)((t=>(0,re.pC)({chainId:e},t)),(()=>(0,re.uV)({chainId:e})),(()=>(0,re.uV)({chainId:e})),(e=>e),((e,t)=>e.uid===t.uid))}function De({chainId:e}){return[{entity:"walletClient",chainId:e,persist:!1}]}function Fe({queryKey:[{chainId:e}]}){return(0,re.xz)({chainId:e})}function ze({chainId:e,suspense:t,onError:n,onSettled:r,onSuccess:o}={}){const{connector:i}=Je(),s=qe({chainId:e}),a=Ne(De({chainId:s}),Fe,{cacheTime:0,enabled:Boolean(i),staleTime:1/0,suspense:t,onError:n,onSettled:r,onSuccess:o}),c=Le();return oe.useEffect((()=>(0,re.Tb)({chainId:s},(e=>{e?c.invalidateQueries(De({chainId:s})):c.removeQueries(De({chainId:s}))}))),[c,s]),a}function $e({chainId:e}={}){return(0,_e.useSyncExternalStoreWithSelector)((t=>(0,re.fq)({chainId:e},t)),(()=>(0,re.jr)({chainId:e})),(()=>(0,re.jr)({chainId:e})),(e=>e),((e,t)=>e?.uid===t?.uid))}function qe({chainId:e}={}){return Ue({chainId:e}).chain.id}function Ze({chainId:e,scopeKey:t}){return[{entity:"blockNumber",chainId:e,scopeKey:t}]}function He({queryKey:[{chainId:e}]}){return(0,re.RQ)({chainId:e})}function We({cacheTime:e=0,chainId:t,enabled:n=!0,scopeKey:r,staleTime:o,suspense:i,watch:s=!1,onBlock:a,onError:c,onSettled:u,onSuccess:l}={}){const d=qe({chainId:t}),f=Ue({chainId:d}),h=$e({chainId:d}),p=Le();return oe.useEffect((()=>{if(!n)return;if(!s&&!a)return;return(h??f).watchBlockNumber({onBlockNumber:e=>{s&&p.setQueryData(Ze({chainId:d,scopeKey:r}),e),a&&a(e)},emitOnBegin:!0})}),[d,r,a,f,p,s,h,n]),Ne(Ze({scopeKey:r,chainId:d}),He,{cacheTime:e,enabled:n,staleTime:o,suspense:i,onError:c,onSettled:u,onSuccess:l})}function Ge({queryKey:[{chainId:e,formatUnits:t}]}){return(0,re.jS)({chainId:e,formatUnits:t})}function Ke({cacheTime:e,chainId:t,enabled:n=!0,formatUnits:r="gwei",scopeKey:o,staleTime:i,suspense:s,watch:a,onError:c,onSettled:u,onSuccess:l}={}){const d=qe({chainId:t}),f=oe.useMemo((()=>function({chainId:e,formatUnits:t,scopeKey:n}){return[{entity:"feeData",chainId:e,formatUnits:t,scopeKey:n}]}({chainId:d,formatUnits:r,scopeKey:o})),[d,r,o]),h=Ne(f,Ge,{cacheTime:e,enabled:n,staleTime:i,suspense:s,onError:c,onSettled:u,onSuccess:l});return Ve({chainId:d,enabled:Boolean(n&&a),queryKey:f}),h}function Ve({chainId:e,enabled:t,queryKey:n}){const r=Le(),o=oe.useCallback((()=>r.invalidateQueries({queryKey:n},{cancelRefetch:!1})),[r,n]);We({chainId:e,enabled:t,onBlock:t?o:void 0,scopeKey:t?void 0:"idle"})}var Xe=e=>"object"===typeof e&&!Array.isArray(e);function Ye(e,t,n=t,r=re.vZ){const o=oe.useRef([]),i=(0,_e.useSyncExternalStoreWithSelector)(e,t,n,(e=>e),((e,t)=>{if(Xe(e)&&Xe(t)&&o.current.length){for(const n of o.current){if(!r(e[n],t[n]))return!1}return!0}return r(e,t)}));if(Xe(i)){const e={...i};return Object.defineProperties(e,Object.entries(e).reduce(((e,[t,n])=>({...e,[t]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(t)||o.current.push(t),n)}})),{})),e}return i}function Je({onConnect:e,onDisconnect:t}={}){const n=Te(),r=Ye(oe.useCallback((e=>(0,re.uH)(e)),[n]),re.D0),o=oe.useRef(),i=o.current;return oe.useEffect((()=>{"connected"!==i?.status&&"connected"===r.status&&e?.({address:r.address,connector:r.connector,isReconnected:"reconnecting"===i?.status||void 0===i?.status}),"connected"===i?.status&&"disconnected"===r.status&&t?.(),o.current=r}),[e,t,i,r]),r}function Qe({queryKey:[{address:e,chainId:t,formatUnits:n,token:r}]}){if(!e)throw new Error("address is required");return(0,re.EG)({address:e,chainId:t,formatUnits:n,token:r})}function et({address:e,cacheTime:t,chainId:n,enabled:r=!0,formatUnits:o,scopeKey:i,staleTime:s,suspense:a,token:c,watch:u,onError:l,onSettled:d,onSuccess:f}={}){const h=qe({chainId:n}),p=oe.useMemo((()=>function({address:e,chainId:t,formatUnits:n,scopeKey:r,token:o}){return[{entity:"balance",address:e,chainId:t,formatUnits:n,scopeKey:r,token:o}]}({address:e,chainId:h,formatUnits:o,scopeKey:i,token:c})),[e,h,o,i,c]),m=Ne(p,Qe,{cacheTime:t,enabled:Boolean(r&&e),staleTime:s,suspense:a,onError:l,onSettled:d,onSuccess:f});return Ve({chainId:h,enabled:Boolean(r&&u&&e),queryKey:p}),m}var tt=e=>{const{connector:t,chainId:n}=e;if(!t)throw new Error("connector is required");return(0,re.$j)({connector:t,chainId:n})};function nt({chainId:e,connector:t,onError:n,onMutate:r,onSettled:o,onSuccess:i}={}){const s=Te(),{data:a,error:c,isError:u,isIdle:l,isLoading:d,isSuccess:f,mutate:h,mutateAsync:p,reset:m,status:g,variables:y}=Be((b={connector:t,chainId:e},[{entity:"connect",...b}]),tt,{onError:n,onMutate:r,onSettled:o,onSuccess:i});var b;const v=oe.useCallback((n=>h({chainId:n?.chainId??e,connector:n?.connector??t})),[e,t,h]),w=oe.useCallback((n=>p({chainId:n?.chainId??e,connector:n?.connector??t})),[e,t,p]);return{connect:v,connectAsync:w,connectors:s.connectors,data:a,error:c,isError:u,isIdle:l,isLoading:d,isSuccess:f,pendingConnector:y?.connector,reset:m,status:g,variables:y}}var rt=[{entity:"disconnect"}],ot=()=>(0,re.zP)();function it({onError:e,onMutate:t,onSettled:n,onSuccess:r}={}){const{error:o,isError:i,isIdle:s,isLoading:a,isSuccess:c,mutate:u,mutateAsync:l,reset:d,status:f}=Be(rt,ot,{...e?{onError(t,n,r){e(t,r)}}:{},onMutate:t,...n?{onSettled(e,t,r,o){n(t,o)}}:{},...r?{onSuccess(e,t,n){r(n)}}:{}});return{disconnect:u,disconnectAsync:l,error:o,isError:i,isIdle:s,isLoading:a,isSuccess:c,reset:d,status:f}}function st(){const e=Te();return Ye((0,oe.useCallback)((e=>(0,re.QC)(e)),[e]),re.Hy)}var at=e=>{const{message:t}=e;if(!t)throw new Error("message is required");return(0,re.l)({message:t})};function ct({message:e,onError:t,onMutate:n,onSettled:r,onSuccess:o}={}){const{data:i,error:s,isError:a,isIdle:c,isLoading:u,isSuccess:l,mutate:d,mutateAsync:f,reset:h,status:p,variables:m}=Be((g={message:e},[{entity:"signMessage",...g}]),at,{onError:t,onMutate:n,onSettled:r,onSuccess:o});var g;const y=oe.useCallback((t=>d(t||{message:e})),[e,d]),b=oe.useCallback((t=>f(t||{message:e})),[e,f]);return{data:i,error:s,isError:a,isIdle:c,isLoading:u,isSuccess:l,reset:h,signMessage:y,signMessageAsync:b,status:p,variables:m}}var ut=e=>{const{chainId:t}=e;if(!t)throw new Error("chainId is required");return(0,re.If)({chainId:t})};function lt({chainId:e,throwForSwitchChainNotSupported:t,onError:n,onMutate:r,onSettled:o,onSuccess:i}={}){const s=Te(),a=function(){const[,e]=oe.useReducer((e=>e+1),0);return e}(),{data:c,error:u,isError:l,isIdle:d,isLoading:f,isSuccess:h,mutate:p,mutateAsync:m,reset:g,status:y,variables:b}=Be((v={chainId:e},[{entity:"switchNetwork",...v}]),ut,{onError:n,onMutate:r,onSettled:o,onSuccess:i});var v;const w=oe.useCallback((t=>p({chainId:t??e})),[e,p]),x=oe.useCallback((t=>m({chainId:t??e})),[e,m]);let E,_;oe.useEffect((()=>s.subscribe((({chains:e,connector:t})=>({chains:e,connector:t})),a)),[s,a]);const k=!!s.connector?.switchChain;return(t||k)&&(E=w,_=x),{chains:s.chains??[],data:c,error:u,isError:l,isIdle:d,isLoading:f,isSuccess:h,pendingChainId:b?.chainId,reset:g,status:y,switchNetwork:E,switchNetworkAsync:_,variables:b}}function dt({allowFailure:e,blockNumber:t,blockTag:n,cacheKey:r,cacheTime:o,contracts:i,enabled:s=!0,getNextPageParam:a,isDataEqual:c,keepPreviousData:u,onError:l,onSettled:d,onSuccess:f,scopeKey:h,select:p,staleTime:m,structuralSharing:g=((e,t)=>(0,re.vZ)(e,t)?e:v(e,t)),suspense:y}){const b=oe.useMemo((()=>function({allowFailure:e,blockNumber:t,blockTag:n,cacheKey:r,scopeKey:o}){return[{entity:"readContractsInfinite",allowFailure:e,blockNumber:t,blockTag:n,cacheKey:r,scopeKey:o}]}({allowFailure:e,blockNumber:t,blockTag:n,cacheKey:r,scopeKey:h})),[e,t,n,r,h]),w=oe.useMemo((()=>Boolean(s&&i)),[i,s]);return function(e,t,n){const r=Oe(e,t,n),o=Re({context:Ie,...r},ve),i={data:o.data,error:o.error,fetchNextPage:o.fetchNextPage,fetchStatus:o.fetchStatus,hasNextPage:o.hasNextPage,isError:o.isError,isFetched:o.isFetched,isFetchedAfterMount:o.isFetchedAfterMount,isFetching:o.isFetching,isFetchingNextPage:o.isFetchingNextPage,isIdle:o.isIdle,isLoading:o.isLoading,isRefetching:o.isRefetching,isSuccess:o.isSuccess,refetch:o.refetch,status:o.status,internal:{dataUpdatedAt:o.dataUpdatedAt,errorUpdatedAt:o.errorUpdatedAt,failureCount:o.failureCount,isFetchedAfterMount:o.isFetchedAfterMount,isLoadingError:o.isLoadingError,isPaused:o.isPaused,isPlaceholderData:o.isPlaceholderData,isPreviousData:o.isPreviousData,isRefetchError:o.isRefetchError,isStale:o.isStale,remove:o.remove}};return o.defaultedOptions.notifyOnChangeProps?i:Me(i,o.observer)}(b,function({contracts:e}){return({queryKey:[{allowFailure:t,blockNumber:n,blockTag:r}],pageParam:o})=>(0,re.JH)({allowFailure:t,blockNumber:n,blockTag:r,contracts:e(o||void 0)})}({contracts:i}),{cacheTime:o,enabled:w,getNextPageParam:a,isDataEqual:c,keepPreviousData:u,select:p,staleTime:m,structuralSharing:g,suspense:y,onError:l,onSettled:d,onSuccess:f})}function ft(e,{perPage:t,start:n,direction:r}){return{contracts:(o=0)=>[...Array(t).keys()].map((e=>"increment"===r?n+e+o*t:n-e-o*t)).filter((e=>e>=0)).flatMap(e),getNextPageParam:(e,n)=>e?.length===t?n.length:void 0}}function ht({abi:e,address:t,account:n,args:r,blockNumber:o,blockTag:i,cacheOnBlock:s=!1,cacheTime:a,chainId:c,enabled:u=!0,functionName:l,isDataEqual:d,keepPreviousData:f,onError:h,onSettled:p,onSuccess:m,scopeKey:g,select:y,staleTime:b,structuralSharing:w=((e,t)=>(0,re.vZ)(e,t)?e:v(e,t)),suspense:x,watch:E}={}){const _=qe({chainId:c}),{data:k}=We({chainId:_,enabled:E||s,scopeKey:E||s?void 0:"idle",watch:E}),S=o??k,I=oe.useMemo((()=>function({account:e,address:t,args:n,blockNumber:r,blockTag:o,chainId:i,functionName:s,scopeKey:a}){return[{entity:"readContract",account:e,address:t,args:n,blockNumber:r,blockTag:o,chainId:i,functionName:s,scopeKey:a}]}({account:n,address:t,args:r,blockNumber:s?S:void 0,blockTag:i,chainId:_,functionName:l,scopeKey:g})),[n,t,r,S,i,s,_,l,g]),C=oe.useMemo((()=>{let n=Boolean(u&&e&&t&&l);return s&&(n=Boolean(n&&S)),n}),[e,t,S,s,u,l]);return Ve({chainId:_,enabled:Boolean(C&&E&&!s),queryKey:I}),Ne(I,function({abi:e}){return async({queryKey:[{account:t,address:n,args:r,blockNumber:o,blockTag:i,chainId:s,functionName:a}]})=>{if(!e)throw new Error("abi is required");if(!n)throw new Error("address is required");return await(0,re.a4)({account:t,address:n,args:r,blockNumber:o,blockTag:i,chainId:s,abi:e,functionName:a})??null}}({abi:e}),{cacheTime:a,enabled:C,isDataEqual:d,keepPreviousData:f,select:y,staleTime:b,structuralSharing:w,suspense:x,onError:h,onSettled:p,onSuccess:m})}function pt({allowFailure:e,blockNumber:t,blockTag:n,cacheOnBlock:r=!1,cacheTime:o,contracts:i,enabled:s=!0,isDataEqual:a,keepPreviousData:c,onError:u,onSettled:l,onSuccess:d,scopeKey:f,select:h,staleTime:p,structuralSharing:m=((e,t)=>(0,re.vZ)(e,t)?e:v(e,t)),suspense:g,watch:y}={}){const b=e??!0,{data:w}=We({enabled:y||r,watch:y}),x=qe(),E=t??w,_=oe.useMemo((()=>function({allowFailure:e,blockNumber:t,blockTag:n,chainId:r,contracts:o,scopeKey:i}){return[{entity:"readContracts",allowFailure:e,blockNumber:t,blockTag:n,chainId:r,scopeKey:i,contracts:(o??[]).map((({address:e,args:t,chainId:n,functionName:r})=>({address:e,args:t,chainId:n,functionName:r})))}]}({allowFailure:b,blockNumber:r?E:void 0,blockTag:n,chainId:x,contracts:i,scopeKey:f})),[b,E,n,r,x,f,i]),k=oe.useMemo((()=>{let e=Boolean(s&&i?.every((e=>e.abi&&e.address&&e.functionName)));return r&&(e=Boolean(e&&E)),e}),[E,r,i,s]);Ve({enabled:Boolean(k&&y&&!r),queryKey:_});return Ne(_,function({abis:e}){return({queryKey:[{allowFailure:t,blockNumber:n,blockTag:r,contracts:o}]})=>{const i=o.map(((t,n)=>({...t,abi:e[n]})));return(0,re.JH)({allowFailure:t,contracts:i,blockNumber:n,blockTag:r})}}({abis:(i??[]).map((({abi:e})=>e))}),{cacheTime:o,enabled:k,isDataEqual:a,keepPreviousData:c,staleTime:p,select:h,structuralSharing:m,suspense:g,onError:u,onSettled:l,onSuccess:d})}function mt(e){if("prepared"===e.mode){if(!e.request)throw new Error("request is required");return(0,re.n9)({mode:"prepared",request:e.request})}if(!e.address)throw new Error("address is required");if(!e.abi)throw new Error("abi is required");if(!e.functionName)throw new Error("functionName is required");return(0,re.n9)({address:e.address,args:e.args,chainId:e.chainId,abi:e.abi,functionName:e.functionName,accessList:e.accessList,account:e.account,dataSuffix:e.dataSuffix,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,value:e.value})}function gt(e){const{address:t,abi:n,args:r,chainId:o,functionName:i,mode:s,request:a,dataSuffix:c}=e,{accessList:u,account:l,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,value:g}=(0,re.gY)(e),{data:y,error:b,isError:v,isIdle:w,isLoading:x,isSuccess:E,mutate:_,mutateAsync:k,reset:S,status:I,variables:C}=Be(function({address:e,abi:t,functionName:n,...r}){const{args:o,accessList:i,account:s,dataSuffix:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,request:h,value:p}=r;return[{entity:"writeContract",address:e,args:o,abi:t,accessList:i,account:s,dataSuffix:a,functionName:n,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,request:h,value:p}]}({address:t,abi:n,functionName:i,chainId:o,mode:s,args:r,accessList:u,account:l,dataSuffix:c,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,request:a,value:g}),mt,{onError:e.onError,onMutate:e.onMutate,onSettled:e.onSettled,onSuccess:e.onSuccess});return{data:y,error:b,isError:v,isIdle:w,isLoading:x,isSuccess:E,reset:S,status:I,variables:C,write:oe.useMemo((()=>{if("prepared"===e.mode){if(!a)return;return()=>_({mode:"prepared",request:e.request,chainId:e.chainId})}return e=>_({address:t,args:r,abi:n,functionName:i,chainId:o,accessList:u,account:l,dataSuffix:c,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,value:g,...e})}),[u,l,n,t,r,o,e.chainId,e.mode,e.request,c,i,d,f,h,p,_,m,a,g]),writeAsync:oe.useMemo((()=>{if("prepared"===e.mode){if(!a)return;return()=>k({mode:"prepared",request:e.request})}return e=>k({address:t,args:r,abi:n,chainId:o,functionName:i,accessList:u,account:l,dataSuffix:c,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,value:g,...e})}),[u,l,n,t,r,o,e.mode,e.request,c,i,d,f,h,p,k,m,a,g])}}function yt({address:e,abi:t,functionName:n,chainId:r,args:o,cacheTime:i,dataSuffix:s,enabled:a=!0,scopeKey:c,staleTime:u,suspense:l,onError:d,onSettled:f,onSuccess:h,...p}={}){const{chain:m}=st(),{data:g}=ze({chainId:r}),{accessList:y,account:b,blockNumber:v,blockTag:w,gas:x,gasPrice:E,maxFeePerGas:_,maxPriorityFeePerGas:k,nonce:S,value:I}=(0,re._X)(p),C=Ne(function({accessList:e,account:t,activeChainId:n,args:r,address:o,blockNumber:i,blockTag:s,chainId:a,dataSuffix:c,functionName:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,scopeKey:m,walletClientAddress:g,value:y}){return[{entity:"prepareContractTransaction",accessList:e,account:t,activeChainId:n,address:o,args:r,blockNumber:i,blockTag:s,chainId:a,dataSuffix:c,functionName:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,scopeKey:m,walletClientAddress:g,value:y}]}({accessList:y,account:b,activeChainId:m?.id,address:e,args:o,blockNumber:v,blockTag:w,chainId:r,dataSuffix:s,functionName:n,gas:x,gasPrice:E,maxFeePerGas:_,maxPriorityFeePerGas:k,nonce:S,scopeKey:c,walletClientAddress:g?.account.address,value:I}),function({abi:e,walletClient:t}){return({queryKey:[{accessList:n,account:r,args:o,address:i,blockNumber:s,blockTag:a,chainId:c,dataSuffix:u,functionName:l,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,value:g}]})=>{if(!e)throw new Error("abi is required");if(!i)throw new Error("address is required");if(!l)throw new Error("functionName is required");return(0,re.$q)({abi:e,accessList:n,account:r,args:o,address:i,blockNumber:s,blockTag:a,chainId:c,dataSuffix:u,functionName:l,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,walletClient:t,value:g})}}({abi:t,walletClient:g}),{cacheTime:i,enabled:Boolean(a&&t&&e&&n&&g),staleTime:u,suspense:l,onError:d,onSettled:f,onSuccess:h});return Object.assign(C,{config:{chainId:r,mode:"prepared",request:void 0,...C.data}})}function bt({queryKey:[{name:e,chainId:t}]}){if(!e)throw new Error("name is required");return(0,re.w6)({name:e,chainId:t})}function vt({cacheTime:e,chainId:t,enabled:n=!0,name:r,scopeKey:o,staleTime:i=864e5,suspense:s,onError:a,onSettled:c,onSuccess:u}={}){const l=qe({chainId:t});return Ne(function({name:e,chainId:t,scopeKey:n}){return[{entity:"ensAvatar",name:e,chainId:t,scopeKey:n}]}({name:r,chainId:l,scopeKey:o}),bt,{cacheTime:e,enabled:Boolean(n&&r&&l),staleTime:i,suspense:s,onError:a,onSettled:c,onSuccess:u})}function wt({queryKey:[{address:e,chainId:t}]}){if(!e)throw new Error("address is required");return(0,re.Lk)({address:e,chainId:t})}function xt({address:e,cacheTime:t,chainId:n,enabled:r=!0,scopeKey:o,staleTime:i=864e5,suspense:s,onError:a,onSettled:c,onSuccess:u}={}){const l=qe({chainId:n});return Ne(function({address:e,chainId:t,scopeKey:n}){return[{entity:"ensName",address:e,chainId:t,scopeKey:n}]}({address:e,chainId:l,scopeKey:o}),wt,{cacheTime:t,enabled:Boolean(r&&e&&l),staleTime:i,suspense:s,onError:a,onSettled:c,onSuccess:u})}function Et({chainId:e,confirmations:t,hash:n,timeout:r,cacheTime:o,enabled:i=!0,scopeKey:s,staleTime:a,suspense:c,onError:u,onReplaced:l,onSettled:d,onSuccess:f}={}){return Ne(function({confirmations:e,chainId:t,hash:n,scopeKey:r,timeout:o}){return[{entity:"waitForTransaction",confirmations:e,chainId:t,hash:n,scopeKey:r,timeout:o}]}({chainId:qe({chainId:e}),confirmations:t,hash:n,scopeKey:s,timeout:r}),function({onReplaced:e}){return({queryKey:[{chainId:t,confirmations:n,hash:r,timeout:o}]})=>{if(!r)throw new Error("hash is required");return(0,re.Mn)({chainId:t,confirmations:n,hash:r,onReplaced:e,timeout:o})}}({onReplaced:l}),{cacheTime:o,enabled:Boolean(i&&n),staleTime:a,suspense:c,onError:u,onSettled:d,onSuccess:f})}},29242:function(e){"use strict";e.exports=JSON.parse('{"name":"@safe-global/safe-apps-sdk","version":"8.1.0","description":"SDK developed to integrate third-party apps with Safe app.","main":"dist/src/index.js","typings":"dist/src/index.d.ts","_files":["dist/**/*","src/**/*","CHANGELOG.md","README.md"],"sideEffects":false,"keywords":["Safe","sdk","apps"],"scripts":{"test":"jest","format-dist":"sed -i \'\' \'s/\\"files\\":/\\"_files\\":/\' dist/package.json","build":"yarn rimraf dist && tsc && yarn format-dist"},"author":"Safe (https://safe.global)","license":"MIT","dependencies":{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3","viem":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/safe-global/safe-apps-sdk.git"},"bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","publishConfig":{"access":"public"}}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],(function(){return t(72552),t(6840),t(96885)}));var n=e.O();_N_E=n}]);