1/*! For license information please see main.25318e63.js.LICENSE.txt */ 2(()=>{var e={10:(e,t,n)=>{"use strict";function r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}n.d(t,{A:()=>r})},350:(e,t,n)=>{const r=n(7969),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let s=n<<10;for(;r.getBCHDigit(s)-i>=0;)s^=1335<<r.getBCHDigit(s)-i;return 21522^(n<<10|s)}},356:(e,t,n)=>{e.exports=n(9645).last},418:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toString=function e(t){if(null==t)return"";if("string"===typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}},504:(e,t,n)=>{!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var a=t(),o=t([1]),l=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function m(e,t,n,r,i){var s,a=0;for(s=0;s<i;s++)a|=e[t+s]^n[r+s];return(1&a-1>>>8)-1}function g(e,t,n,r){return m(e,t,n,r,16)}function y(e,t,n,r){return m(e,t,n,r,32)}function x(e,t,n,r){!function(e,t,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,x=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=s,_=a,j=o,k=l,N=c,S=u,E=d,A=h,C=p,M=f,T=m,P=g,O=y,I=x,L=v,R=b,D=0;D<20;D+=2)w^=(i=(O^=(i=(C^=(i=(N^=(i=w+O|0)<<7|i>>>25)+w|0)<<9|i>>>23)+N|0)<<13|i>>>19)+C|0)<<18|i>>>14,S^=(i=(_^=(i=(I^=(i=(M^=(i=S+_|0)<<7|i>>>25)+S|0)<<9|i>>>23)+M|0)<<13|i>>>19)+I|0)<<18|i>>>14,T^=(i=(E^=(i=(j^=(i=(L^=(i=T+E|0)<<7|i>>>25)+T|0)<<9|i>>>23)+L|0)<<13|i>>>19)+j|0)<<18|i>>>14,R^=(i=(P^=(i=(A^=(i=(k^=(i=R+P|0)<<7|i>>>25)+R|0)<<9|i>>>23)+k|0)<<13|i>>>19)+A|0)<<18|i>>>14,w^=(i=(k^=(i=(j^=(i=(_^=(i=w+k|0)<<7|i>>>25)+w|0)<<9|i>>>23)+_|0)<<13|i>>>19)+j|0)<<18|i>>>14,S^=(i=(N^=(i=(A^=(i=(E^=(i=S+N|0)<<7|i>>>25)+S|0)<<9|i>>>23)+E|0)<<13|i>>>19)+A|0)<<18|i>>>14,T^=(i=(M^=(i=(C^=(i=(P^=(i=T+M|0)<<7|i>>>25)+T|0)<<9|i>>>23)+P|0)<<13|i>>>19)+C|0)<<18|i>>>14,R^=(i=(L^=(i=(I^=(i=(O^=(i=R+L|0)<<7|i>>>25)+R|0)<<9|i>>>23)+O|0)<<13|i>>>19)+I|0)<<18|i>>>14;w=w+s|0,_=_+a|0,j=j+o|0,k=k+l|0,N=N+c|0,S=S+u|0,E=E+d|0,A=A+h|0,C=C+p|0,M=M+f|0,T=T+m|0,P=P+g|0,O=O+y|0,I=I+x|0,L=L+v|0,R=R+b|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=j>>>0&255,e[9]=j>>>8&255,e[10]=j>>>16&255,e[11]=j>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=N>>>0&255,e[17]=N>>>8&255,e[18]=N>>>16&255,e[19]=N>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=E>>>0&255,e[25]=E>>>8&255,e[26]=E>>>16&255,e[27]=E>>>24&255,e[28]=A>>>0&255,e[29]=A>>>8&255,e[30]=A>>>16&255,e[31]=A>>>24&255,e[32]=C>>>0&255,e[33]=C>>>8&255,e[34]=C>>>16&255,e[35]=C>>>24&255,e[36]=M>>>0&255,e[37]=M>>>8&255,e[38]=M>>>16&255,e[39]=M>>>24&255,e[40]=T>>>0&255,e[41]=T>>>8&255,e[42]=T>>>16&255,e[43]=T>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=I>>>0&255,e[53]=I>>>8&255,e[54]=I>>>16&255,e[55]=I>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=R>>>0&255,e[61]=R>>>8&255,e[62]=R>>>16&255,e[63]=R>>>24&255}(e,t,n,r)}function v(e,t,n,r){!function(e,t,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,x=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=0;w<20;w+=2)s^=(i=(y^=(i=(p^=(i=(c^=(i=s+y|0)<<7|i>>>25)+s|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,u^=(i=(a^=(i=(x^=(i=(f^=(i=u+a|0)<<7|i>>>25)+u|0)<<9|i>>>23)+f|0)<<13|i>>>19)+x|0)<<18|i>>>14,m^=(i=(d^=(i=(o^=(i=(v^=(i=m+d|0)<<7|i>>>25)+m|0)<<9|i>>>23)+v|0)<<13|i>>>19)+o|0)<<18|i>>>
vendor: 10,819 bytes, line 2
214,b^=(i=(g^=(i=(h^=(i=(l^=(i=b+g|0)<<7|i>>>25)+b|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,s^=(i=(l^=(i=(o^=(i=(a^=(i=s+l|0)<<7|i>>>25)+s|0)<<9|i>>>23)+a|0)<<13|i>>>19)+o|0)<<18|i>>>14,u^=(i=(c^=(i=(h^=(i=(d^=(i=u+c|0)<<7|i>>>25)+u|0)<<9|i>>>23)+d|0)<<13|i>>>19)+h|0)<<18|i>>>14,m^=(i=(f^=(i=(p^=(i=(g^=(i=m+f|0)<<7|i>>>25)+m|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,b^=(i=(v^=(i=(x^=(i=(y^=(i=b+v|0)<<7|i>>>25)+b|0)<<9|i>>>23)+y|0)<<13|i>>>19)+x|0)<<18|i>>>14;e[0]=s>>>0&255,e[1]=s>>>8&255,e[2]=s>>>16&255,e[3]=s>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=m>>>0&255,e[9]=m>>>8&255,e[10]=m>>>16&255,e[11]=m>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=f>>>0&255,e[29]=f>>>8&255,e[30]=f>>>16&255,e[31]=f>>>24&255}(e,t,n,r)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,n,r,i,s,a){var o,l,c=new Uint8Array(16),u=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=s[l];for(;i>=64;){for(x(u,c,a,b),l=0;l<64;l++)e[t+l]=n[r+l]^u[l];for(o=1,l=8;l<16;l++)o=o+(255&c[l])|0,c[l]=255&o,o>>>=8;i-=64,t+=64,r+=64}if(i>0)for(x(u,c,a,b),l=0;l<i;l++)e[t+l]=n[r+l]^u[l];return 0}function _(e,t,n,r,i){var s,a,o=new Uint8Array(16),l=new Uint8Array(64);for(a=0;a<16;a++)o[a]=0;for(a=0;a<8;a++)o[a]=r[a];for(;n>=64;){for(x(l,o,i,b),a=0;a<64;a++)e[t+a]=l[a];for(s=1,a=8;a<16;a++)s=s+(255&o[a])|0,o[a]=255&s,s>>>=8;n-=64,t+=64}if(n>0)for(x(l,o,i,b),a=0;a<n;a++)e[t+a]=l[a];return 0}function j(e,t,n,r,i){var s=new Uint8Array(32);v(s,r,i,b);for(var a=new Uint8Array(8),o=0;o<8;o++)a[o]=r[o+16];return _(e,t,n,a,s)}function k(e,t,n,r,i,s,a){var o=new Uint8Array(32);v(o,s,a,b);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=s[c+16];return w(e,t,n,r,i,l,o)}var N=function(e){var t,n,r,i,s,a,o,l;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,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),s=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|s<<12),this.r[5]=s>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(s>>>14|a<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|o<<5),l=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|l<<8),this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,n,r,i,s){var a=new N(s);return a.update(n,r,i),a.finish(e,t),0}function E(e,t,n,r,i,s){var a=new Uint8Array(16);return S(a,0,n,r,i,s),g(e,t,a,0)}function A(e,t,n,r,i){var s;if(n<32)return-1;for(k(e,0,t,0,n,r,i),S(e,16,e,32,n-32,e),s=0;s<16;s++)e[s]=0;return 0}function C(e,t,n,r,i){var s,a=new Uint8Array(32);if(n<32)return-1;if(j(a,0,32,r,i),0!==E(t,16,t,32,n-32,a))return-1;for(k(e,0,t,0,n,r,i),s=0;s<32;s++)e[s]=0;return 0}function M(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function T(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function P(e,t,n){for(var r,i=~(n-1),s=0;s<16;s++)r=i&(e[s]^t[s]),e[s]^=r,t[s]^=r}function O(e,n){var r,i,s,a=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(T(o),T(o),T(o),i=0;i<2;i++){for(a[0]=o[0]-65517,r=1;r<15;r++)a[r]=o[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),s=a[15]>>16&1,a[14]&=65535,P(o,a,1-s)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function I(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return O(n,e),O(r,t),y(n,0,r,0)}function L(e){var t=new Uint8Array(32);return O(t,e),1&t[0]}function R(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function F(e,t,n){var r,i,s=0,a=0,o=0,l=0,c=0,u=0,d=0,h=0,p=0,f=0,m=0,g=0,y=0,x=0,v=0,b=0,w=0,_=0,j=0,k=0,N=0,S=0,E=0,A=0,C=0,M=0,T=0,P=0,O=0,I=0,L=0,R=n[0],D=n[1],B=n[2],F=n[3],U=n[4],z=n[5],q=n[6],W=n[7],H=n[8],K=n[9],V=n[10],$=n[11],Y=n[12],G=n[13],J=n[14],Z=n[15];s+=(r=t[0])*R,a+=r*D,o+=r*B,l+=r*F,c+=r*U,u+=r*z,d+=r*q,h+=r*W,p+=r*H,f+=r*K,m+=r*V,g+=r*$,y+=r*Y,x+=r*G,v+=r*J,b+=r*Z,a+=(r=t[1])*R,o+=r*D,l+=r*B,c+=r*F,u+=r*U,d+=r*z,h+=r*q,p+=r*W,f+=r*H,m+=r*K,g+=r*V,y+=r*$,x+=r*Y,v+=r*G,b+=r*J,w+=r*Z,o+=(r=t[2])*R,l+=r*D,c+=r*B,u+=r*F,d+=r*U,h+=r*z,p+=r*q,f+=r*W,m+=r*H,g+=r*K,y+=r*V,x+=r*$,v+=r*Y,b+=r*G,w+=r*J,_+=r*Z,l+=(r=t[3])*R,c+=r*D,u+=r*B,d+=r*F,h+=r*U,p+=r*z,f+=r*q,m+=r*W,g+=r*H,y+=r*K,x+=r*V,v+=r*$,b+=r*Y,w+=r*G,_+=r*J,j+=r*Z,c+=(r=t[4])*R,u+=r*D,d+=r*B,h+=r*F,p+=r*U,f+=r*z,m+=r*q,g+=r*W,y+=r*H,x+=r*K,v+=r*V,b+=r*$,w+=r*Y,_+=r*G,j+=r*J,k+=r*Z,u+=(r=t[5])*R,d+=r*D,h+=r*B,p+=r*F,f+=r*U,m+=r*z,g+=r*q,y+=r*W,x+=r*H,v+=r*K,b+=r*V,w+=r*$,_+=r*Y,j+=r*G,k+=r*J,N+=r*Z,d+=(r=t[6])*R,h+=r*D,p+=r*B,f+=r*F,m+=r*U,g+=r*z,y+=r*q,x+=r*W,v+=r*H,b+=r*K,w+=r*V,_+=r*$,j+=r*Y,k+=r*G,N+=r*J,S+=r*Z,h+=(r=t[7])*R,p+=r*D,f+=r*B,m+=r*F,g+=r*U,y+=r*z,x+=r*q,v+=r*W,b+=r*H,w+=r*K,_+=r*V,j+=r*$,k+=r*Y,N+=r*G,S+=r*J,E+=r*Z,p+=(r=t[8])*R,f+=r*D,m+=r*B,g+=r*F,y+=r*U,x+=r*z,v+=r*q,b+=r*W,w+=r*H,_+=r*K,j+=r*V,k+=r*$,N+=r*Y,S+=r*G,E+=r*J,A+=r*Z,f+=(r=t[9])*R,m+=r*D,g+=r*B,y+=r*F,x+=r*U,v+=r*z,b+=r*q,w+=r*W,_+=r*H,j+=r*K,k+=r*V,N+=r*$,S+=r*Y,E+=r*G,A+=r*J,C+=r*Z,m+=(r=t[10])*R,g+=r*D,y+=r*B,x+=r*F,v+=r*U,b+=r*z,w+=r*q,_+=r*W,j+=r*H,k+=r*K,N+=r*V,S+=r*$,E+=r*Y,A+=r*G,C+=r*J,M+=r*Z,g+=(r=t[11])*R,y+=r*D,x+=r*B,v+=r*F,b+=r*U,w+=r*z,_+=r*q,j+=r*W,k+=r*H,N+=r*K,S+=r*V,E+=r*$,A+=r*Y,C+=r*G,M+=r*J,T+=r*Z,y+=(r=t[12])*R,x+=r*D,v+=r*B,b+=r*F,w+=r*U,_+=r*z,j+=r*q,k+=r*W,N+=r*H,S+=r*K,E+=r*V,A+=r*$,C+=r*Y,M+=r*G,T+=r*J,P+=r*Z,x+=(r=t[13])*R,v+=r*D,b+=r*B,w+=r*F,_+=r*U,j+=r*z,k+=r*q,N+=r*W,S+=r*H,E+=r*K,A+=r*V,C+=r*$,M+=r*Y,T+=r*G,P+=r*J,O+=r*Z,v+=(r=t[14])*R,b+=r*D,w+=r*B,_+=r*F,j+=r*U,k+=r*z,N+=r*q,S+=r*W,E+=r*H,A+=r*K,C+=r*V,M+=r*$,T+=r*Y,P+=r*G,O+=r*J,I+=r*Z,b+=(r=t[15])*R,a+=38*(_+=r*B),o+=38*(j+=r*F),l+=38*(k+=r*U),c+=38*(N+=r*z),u+=38*(S+=r*q),d+=38*(E+=r*W),h+=38*(A+=r*H),p+=38*(C+=r*K),f+=38*(M+=r*V),m+=38*(T+=r*$),g+=38*(P+=r*Y),y+=38*(O+=r*G),x+=38*(I+=r*J),v+=38*(L+=r*Z),s=(r=(s+=38*(w+=r*D))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),x=(r=x+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=(s+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),x=(r=x+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=m,e[11]=g,e[12]=y,e[13]=x,e[14]=v,e[15]=b}function U(e,t){F(e,t,t)}function z(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)U(i,i),2!==r&&4!==r&&F(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function q(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)U(i,i),1!==r&&F(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function W(e,n,r){var i,s,a=new Uint8Array(32),o=new Float64Array(80),c=t(),u=t(),d=t(),h=t(),p=t(),f=t();for(s=0;s<31;s++)a[s]=n[s];for(a[31]=127&n[31]|64,a[0]&=248,R(o,r),s=0;s<16;s++)u[s]=o[s],h[s]=c[s]=d[s]=0;for(c[0]=h[0]=1,s=254;s>=0;--s)P(c,u,i=a[s>>>3]>>>(7&s)&1),P(d,h,i),D(p,c,d),B(c,c,d),D(d,u,h),B(u,u,h),U(h,p),U(f,c),F(c,d,c),F(d,u,p),D(p,c,d),B(c,c,d),U(u,c),B(d,h,f),F(c,d,l),D(c,c,h),F(d,d,c),F(c,h,f),F(h,u,o),U(u,p),P(c,u,i),P(d,h,i);for(s=0;s<16;s++)o[s+16]=c[s],o[s+32]=d[s],o[s+48]=u[s],o[s+64]=h[s];var m=o.subarray(32),g=o.subarray(16);return z(m,m),F(g,g,m),O(e,g),0}function H(e,t){return W(e,t,s)}function K(e,t){return r(t,32),H(e,t)}function V(e,t,n){var r=new Uint8Array(32);return W(r,n,t),v(e,i,r,b)}N.prototype.blocks=function(e,t,n){for(var r,i,s,a,o,l,c,u,d,h,p,f,m,g,y,x,v,b,w,_=this.fin?0:2048,j=this.h[0],k=this.h[1],N=this.h[2],S=this.h[3],E=this.h[4],A=this.h[5],C=this.h[6],M=this.h[7],T=this.h[8],P=this.h[9],O=this.r[0],I=this.r[1],L=this.r[2],R=this.r[3],D=this.r[4],B=this.r[5],F=this.r[6],U=this.r[7],z=this.r[8],q=this.r[9];n>=16;)h=d=0,h+=(j+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*O,h+=(k+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),h+=(N+=8191&(i>>>10|(s=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),h+=(S+=8191&(s>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*U),d=(h+=(E+=8191&(a>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,h&=8191,h+=(A+=o>>>1&8191)*(5*B),h+=(C+=8191&(o>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*D),h+=(M+=8191&(l>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*R),h+=(T+=8191&(c>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),p=d+=(h+=(P+=u>>>5|_)*(5*I))>>>13,p+=j*I,p+=k*O,p+=N*(5*q),p+=S*(5*z),d=(p+=E*(5*U))>>>13,p&=8191,p+=A*(5*F),p+=C*(5*B),p+=M*(5*D),p+=T*(5*R),d+=(p+=P*(5*L))>>>13,p&=8191,f=d,f+=j*L,f+=k*I,f+=N*O,f+=S*(5*q),d=(f+=E*(5*z))>>>13,f&=8191,f+=A*(5*U),f+=C*(5*F),f+=M*(5*B),f+=T*(5*D),m=d+=(f+=P*(5*R))>>>13,m+=j*R,m+=k*L,m+=N*I,m+=S*O,d=(m+=E*(5*q))>>>13,m&=8191,m+=A*(5*z),m+=C*(5*U),m+=M*(5*F),m+=T*(5*B),g=d+=(m+=P*(5*D))>>>13,g+=j*D,g+=k*R,g+=N*L,g+=S*I,d=(g+=E*O)>>>13,g&=8191,g+=A*(5*q),g+=C*(5*z),g+=M*(5*U),g+=T*(5*F),y=d+=(g+=P*(5*B))>>>13,y+=j*B,y+=k*D,y+=N*R,y+=S*L,d=(y+=E*I)>>>13,y&=8191,y+=A*O,y+=C*(5*q),y+=M*(5*z),y+=T*(5*U),x=d+=(y+=P*(5*F))>>>13,x+=j*F,x+=k*B,x+=N*D,x+=S*R,d=(x+=E*L)>>>13,x&=8191,x+=A*I,x+=C*O,x+=M*(5*q),x+=T*(5*z),v=d+=(x+=P*(5*U))>>>
vendor: 12,395 bytes, line 2
213,v+=j*U,v+=k*F,v+=N*B,v+=S*D,d=(v+=E*R)>>>13,v&=8191,v+=A*L,v+=C*I,v+=M*O,v+=T*(5*q),b=d+=(v+=P*(5*z))>>>13,b+=j*z,b+=k*U,b+=N*F,b+=S*B,d=(b+=E*D)>>>13,b&=8191,b+=A*R,b+=C*L,b+=M*I,b+=T*O,w=d+=(b+=P*(5*q))>>>13,w+=j*q,w+=k*z,w+=N*U,w+=S*F,d=(w+=E*B)>>>13,w&=8191,w+=A*D,w+=C*R,w+=M*L,w+=T*I,j=h=8191&(d=(d=((d+=(w+=P*O)>>>13)<<2)+d|0)+(h&=8191)|0),k=p+=d>>>=13,N=f&=8191,S=m&=8191,E=g&=8191,A=y&=8191,C=x&=8191,M=v&=8191,T=b&=8191,P=w&=8191,t+=16,n-=16;this.h[0]=j,this.h[1]=k,this.h[2]=N,this.h[3]=S,this.h[4]=E,this.h[5]=A,this.h[6]=C,this.h[7]=M,this.h[8]=T,this.h[9]=P},N.prototype.finish=function(e,t){var n,r,i,s,a=new Uint16Array(10);if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=n,n=this.h[s]>>>13,this.h[s]&=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,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,s=1;s<10;s++)a[s]=this.h[s]+n,n=a[s]>>>13,a[s]&=8191;for(a[9]-=8192,r=(1^n)-1,s=0;s<10;s++)a[s]&=r;for(r=~r,s=0;s<10;s++)this.h[s]=this.h[s]&r|a[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,s=1;s<8;s++)i=(this.h[s]+this.pad[s]|0)+(i>>>16)|0,this.h[s]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},N.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var $=A,Y=C;var G=[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 J(e,t,n,r){for(var i,s,a,o,l,c,u,d,h,p,f,m,g,y,x,v,b,w,_,j,k,N,S,E,A,C,M=new Int32Array(16),T=new Int32Array(16),P=e[0],O=e[1],I=e[2],L=e[3],R=e[4],D=e[5],B=e[6],F=e[7],U=t[0],z=t[1],q=t[2],W=t[3],H=t[4],K=t[5],V=t[6],$=t[7],Y=0;r>=128;){for(_=0;_<16;_++)j=8*_+Y,M[_]=n[j+0]<<24|n[j+1]<<16|n[j+2]<<8|n[j+3],T[_]=n[j+4]<<24|n[j+5]<<16|n[j+6]<<8|n[j+7];for(_=0;_<80;_++)if(i=P,s=O,a=I,o=L,l=R,c=D,u=B,F,h=U,p=z,f=q,m=W,g=H,y=K,x=V,$,S=65535&(N=$),E=N>>>16,A=65535&(k=F),C=k>>>16,S+=65535&(N=(H>>>14|R<<18)^(H>>>18|R<<14)^(R>>>9|H<<23)),E+=N>>>16,A+=65535&(k=(R>>>14|H<<18)^(R>>>18|H<<14)^(H>>>9|R<<23)),C+=k>>>16,S+=65535&(N=H&K^~H&V),E+=N>>>16,A+=65535&(k=R&D^~R&B),C+=k>>>16,S+=65535&(N=G[2*_+1]),E+=N>>>16,A+=65535&(k=G[2*_]),C+=k>>>16,k=M[_%16],E+=(N=T[_%16])>>>16,A+=65535&k,C+=k>>>16,A+=(E+=(S+=65535&N)>>>16)>>>16,S=65535&(N=w=65535&S|E<<16),E=N>>>16,A=65535&(k=b=65535&A|(C+=A>>>16)<<16),C=k>>>16,S+=65535&(N=(U>>>28|P<<4)^(P>>>2|U<<30)^(P>>>7|U<<25)),E+=N>>>16,A+=65535&(k=(P>>>28|U<<4)^(U>>>2|P<<30)^(U>>>7|P<<25)),C+=k>>>16,E+=(N=U&z^U&q^z&q)>>>16,A+=65535&(k=P&O^P&I^O&I),C+=k>>>16,d=65535&(A+=(E+=(S+=65535&N)>>>16)>>>16)|(C+=A>>>16)<<16,v=65535&S|E<<16,S=65535&(N=m),E=N>>>16,A=65535&(k=o),C=k>>>16,E+=(N=w)>>>16,A+=65535&(k=b),C+=k>>>16,O=i,I=s,L=a,R=o=65535&(A+=(E+=(S+=65535&N)>>>16)>>>16)|(C+=A>>>16)<<16,D=l,B=c,F=u,P=d,z=h,q=p,W=f,H=m=65535&S|E<<16,K=g,V=y,$=x,U=v,_%16===15)for(j=0;j<16;j++)k=M[j],S=65535&(N=T[j]),E=N>>>16,A=65535&k,C=k>>>16,k=M[(j+9)%16],S+=65535&(N=T[(j+9)%16]),E+=N>>>16,A+=65535&k,C+=k>>>16,b=M[(j+1)%16],S+=65535&(N=((w=T[(j+1)%16])>>>1|b<<31)^(w>>>8|b<<24)^(w>>>7|b<<25)),E+=N>>>16,A+=65535&(k=(b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7),C+=k>>>16,b=M[(j+14)%16],E+=(N=((w=T[(j+14)%16])>>>19|b<<13)^(b>>>29|w<<3)^(w>>>6|b<<26))>>>16,A+=65535&(k=(b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6),C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,M[j]=65535&A|C<<16,T[j]=65535&S|E<<16;S=65535&(N=U),E=N>>>16,A=65535&(k=P),C=k>>>16,k=e[0],E+=(N=t[0])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[0]=P=65535&A|C<<16,t[0]=U=65535&S|E<<16,S=65535&(N=z),E=N>>>16,A=65535&(k=O),C=k>>>16,k=e[1],E+=(N=t[1])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[1]=O=65535&A|C<<16,t[1]=z=65535&S|E<<16,S=65535&(N=q),E=N>>>16,A=65535&(k=I),C=k>>>16,k=e[2],E+=(N=t[2])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[2]=I=65535&A|C<<16,t[2]=q=65535&S|E<<16,S=65535&(N=W),E=N>>>16,A=65535&(k=L),C=k>>>16,k=e[3],E+=(N=t[3])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[3]=L=65535&A|C<<16,t[3]=W=65535&S|E<<16,S=65535&(N=H),E=N>>>16,A=65535&(k=R),C=k>>>16,k=e[4],E+=(N=t[4])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[4]=R=65535&A|C<<16,t[4]=H=65535&S|E<<16,S=65535&(N=K),E=N>>>16,A=65535&(k=D),C=k>>>16,k=e[5],E+=(N=t[5])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[5]=D=65535&A|C<<16,t[5]=K=65535&S|E<<16,S=65535&(N=V),E=N>>>16,A=65535&(k=B),C=k>>>16,k=e[6],E+=(N=t[6])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[6]=B=65535&A|C<<16,t[6]=V=65535&S|E<<16,S=65535&(N=$),E=N>>>16,A=65535&(k=F),C=k>>>16,k=e[7],E+=(N=t[7])>>>16,A+=65535&k,C+=k>>>16,C+=(A+=(E+=(S+=65535&N)>>>16)>>>16)>>>16,e[7]=F=65535&A|C<<16,t[7]=$=65535&S|E<<16,Y+=128,r-=128}return r}function Z(e,t,n){var r,i=new Int32Array(8),s=new Int32Array(8),a=new Uint8Array(256),o=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,J(i,s,t,n),n%=128,r=0;r<n;r++)a[r]=t[o-n+r];for(a[n]=128,a[(n=256-128*(n<112?1:0))-9]=0,f(a,n-8,o/536870912|0,o<<3),J(i,s,a,n),r=0;r<8;r++)f(e,8*r,i[r],s[r]);return 0}function Q(e,n){var r=t(),i=t(),s=t(),a=t(),o=t(),l=t(),c=t(),d=t(),h=t();B(r,e[1],e[0]),B(h,n[1],n[0]),F(r,r,h),D(i,e[0],e[1]),D(h,n[0],n[1]),F(i,i,h),F(s,e[3],n[3]),F(s,s,u),F(a,e[2],n[2]),D(a,a,a),B(o,i,r),B(l,a,s),D(c,a,s),D(d,i,r),F(e[0],o,l),F(e[1],d,c),F(e[2],c,l),F(e[3],o,d)}function X(e,t,n){var r;for(r=0;r<4;r++)P(e[r],t[r],n)}function ee(e,n){var r=t(),i=t(),s=t();z(s,n[2]),F(r,n[0],s),F(i,n[1],s),O(e,i),e[31]^=L(r)<<7}function te(e,t,n){var r,i;for(M(e[0],a),M(e[1],o),M(e[2],o),M(e[3],a),i=255;i>=0;--i)X(e,t,r=n[i/8|0]>>(7&i)&1),Q(t,e),Q(e,e),X(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];M(r[0],d),M(r[1],h),M(r[2],o),F(r[3],d,h),te(e,r,n)}function re(e,n,i){var s,a=new Uint8Array(64),o=[t(),t(),t(),t()];for(i||r(n,32),Z(a,n,32),a[0]&=248,a[31]&=127,a[31]|=64,ne(o,a),ee(e,o),s=0;s<32;s++)n[s+32]=e[s];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function se(e,t){var n,r,i,s;for(r=63;r>=32;--r){for(n=0,i=r-32,s=r-12;i<s;++i)t[i]+=n-16*t[r]*ie[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ae(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;se(e,n)}function oe(e,n,r,i){var s,a,o=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),d=[t(),t(),t(),t()];Z(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var h=r+64;for(s=0;s<r;s++)e[64+s]=n[s];for(s=0;s<32;s++)e[32+s]=o[32+s];for(Z(c,e.subarray(32),r+32),ae(c),ne(d,c),ee(e,d),s=32;s<64;s++)e[s]=i[s];for(Z(l,e,r+64),ae(l),s=0;s<64;s++)u[s]=0;for(s=0;s<32;s++)u[s]=c[s];for(s=0;s<32;s++)for(a=0;a<32;a++)u[s+a]+=l[s]*o[a];return se(e.subarray(32),u),h}function le(e,n,r,i){var s,l=new Uint8Array(32),u=new Uint8Array(64),d=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),i=t(),s=t(),l=t(),u=t(),d=t(),h=t();return M(e[2],o),R(e[1],n),U(s,e[1]),F(l,s,c),B(s,s,e[2]),D(l,e[2],l),U(u,l),U(d,u),F(h,d,u),F(r,h,s),F(r,r,l),q(r,r),F(r,r,s),F(r,r,l),F(r,r,l),F(e[0],r,l),U(i,e[0]),F(i,i,l),I(i,s)&&F(e[0],e[0],p),U(i,e[0]),F(i,i,l),I(i,s)?-1:(L(e[0])===n[31]>>7&&B(e[0],a,e[0]),F(e[3],e[0],e[1]),0)}(h,i))return-1;for(s=0;s<r;s++)e[s]=n[s];for(s=0;s<32;s++)e[s+32]=i[s];if(Z(u,e,r),ae(u),te(d,h,u),ne(h,n.subarray(32)),Q(d,h),ee(l,d),r-=64,y(n,0,l,0)){for(s=0;s<r;s++)e[s]=0;return-1}for(s=0;s<r;s++)e[s]=n[s+64];return r}var ce=16,ue=64,de=32,he=64;function pe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function fe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function me(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:k,crypto_stream:j,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:_,crypto_onetimeauth:S,crypto_onetimeauth_verify:E,crypto_verify_16:g,crypto_verify_32:y,crypto_secretbox:A,crypto_secretbox_open:C,crypto_scalarmult:W,crypto_scalarmult_base:H,crypto_box_beforenm:V,crypto_box_afternm:$,crypto_box:function(e,t,n,r,i,s){var a=new Uint8Array(32);return V(a,i,s),$(e,t,n,r,a)},crypto_box_open:function(e,t,n,r,i,s){var a=new Uint8Array(32);return V(a,i,s),Y(e,t,n,r,a)},crypto_box_keypair:K,crypto_hash:Z,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:le,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ce,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:de,crypto_sign_SECRETKEYBYTES:he,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ie,pack25519:O,unpack25519:R,M:F,A:D,S:U,Z:B,pow2523:q,add:Q,set25519:M,modL:se,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){fe(e,t,n),pe(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),s=0;s<e.length;s++)r[s+32]=e[s];return A(i,r,r.length,t,n),i.subarray(ce)},e.secretbox.open=function(e,t,n){fe(e,t,n),pe(n,t);
2for(var r=new Uint8Array(ce+e.length),i=new Uint8Array(r.length),s=0;s<e.length;s++)r[s+ce]=e[s];return r.length<32||0!==C(i,r,r.length,t,n)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=ce,e.scalarMult=function(e,t){if(fe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return W(n,e,t),n},e.scalarMult.base=function(e){if(fe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var s=e.box.before(r,i);return e.secretbox(t,n,s)},e.box.before=function(e,t){fe(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return V(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var s=e.box.before(r,i);return e.secretbox.open(t,n,s)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return K(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(fe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(fe(e,t),t.length!==he)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(fe(e,t),t.length!==de)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=le(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),s=0;s<i.length;s++)i[s]=n[s];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(ue),s=0;s<i.length;s++)i[s]=r[s];return i},e.sign.detached.verify=function(e,t,n){if(fe(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==de)throw new Error("bad public key size");var r,i=new Uint8Array(ue+e.length),s=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)i[r]=t[r];for(r=0;r<e.length;r++)i[r+ue]=e[r];return le(s,i,i.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(de),t=new Uint8Array(he);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(fe(e),e.length!==he)throw new Error("bad secret key size");for(var t=new Uint8Array(de),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(fe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(de),n=new Uint8Array(he),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=de,e.sign.secretKeyLength=he,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){fe(e);var t=new Uint8Array(64);return Z(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return fe(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===m(e,0,t,0,e.length))},e.setPRNG=function(e){r=e},function(){var t="undefined"!==typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG(function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];me(i)})}else(t=n(1281))&&t.randomBytes&&e.setPRNG(function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];me(i)})}()}(e.exports?e.exports:self.nacl=self.nacl||{})},579:(e,t,n)=>{"use strict";e.exports=n(1153)},870:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObject=function(e){return null!==e&&("object"===typeof e||"function"===typeof e)}},887:(e,t,n)=>{var r=n(6993),i=n(1791);e.exports=function(e,t,n,s,a){return new i(r().w(e,t,n,s),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},900:(e,t,n)=>{const r=n(7421);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,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 i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},991:(e,t,n)=>{"use strict";n.d(t,{F:()=>r});const r="solana:signMessage"},1051:(e,t,n)=>{"use strict";n.d(t,{AX:()=>U,P_:()=>F,RZ:()=>L,Rt:()=>H,Wn:()=>R,Xl:()=>D,clearPersistentPhantomSession:()=>I,dj:()=>q,l3:()=>z,persistentPhantomWalletMatches:()=>B});var r=n(504),i=n.n(r),s=n(1666);const a="https://phantom.app/ul/v1",o="/auth/phantom-callback",l="phantom_dl_keypair",c="phantom_dl_intent",u="phantom_dl_session",d="phantom_dl_phantom_pk",h="phantom_dl_return_url",p="phantom_dl_message",f="phantom_dl_anch
2or",m="phantom_dl_started_at",g=6e5,y="phantom_persist_keypair",x="phantom_persist_session",v="phantom_persist_phantom_pk",b="phantom_persist_wallet_pubkey",w="phantom_persist_saved_at",_=2592e6,j="phantom_tx_operation",k="phantom_tx_params",N="phantom_tx_return_url",S="phantom_tx_result_signed",E="phantom_tx_result_error",A="phantom_tx_result_operation";function C(){return"".concat(window.location.origin).concat(o)}function M(e){localStorage.setItem(l,JSON.stringify({publicKey:s.A.encode(e.publicKey),secretKey:s.A.encode(e.secretKey)}))}function T(){const e=localStorage.getItem(l);if(!e)return null;try{const{publicKey:t,secretKey:n}=JSON.parse(e);return{publicKey:s.A.decode(t),secretKey:s.A.decode(n)}}catch(t){return null}}function P(){for(const e of[l,c,u,d,h,p,f,m,"phantom_dl_pubkey"])localStorage.removeItem(e)}function O(){const e=localStorage.getItem(w);if(!e)return null;const t=parseInt(e,10);if(!Number.isFinite(t)||Date.now()-t>_)return null;const n=localStorage.getItem(y),r=localStorage.getItem(x),i=localStorage.getItem(v),a=localStorage.getItem(b);if(!n||!r||!i||!a)return null;try{const{publicKey:e,secretKey:t}=JSON.parse(n);return{keypair:{publicKey:s.A.decode(e),secretKey:s.A.decode(t)},session:r,phantomPk:i,walletPubkey:a}}catch(o){return null}}function I(){for(const e of[y,x,v,b,w])localStorage.removeItem(e)}function L(){const e=localStorage.getItem(m),t=e?Date.now()-parseInt(e,10):null,n=localStorage.getItem(w),r=n?Date.now()-parseInt(n,10):null;return{intent:localStorage.getItem(c)||"(none)",keypair:localStorage.getItem(l)?"present":"(none)",session:localStorage.getItem(u)?"present":"(none)",phantomPk:localStorage.getItem(d)?"present":"(none)",returnUrl:localStorage.getItem(h)||"(none)",startedAt:e||"(none)",ageSec:null!==t?String(Math.round(t/1e3)):"(none)","persist.keypair":localStorage.getItem(y)?"present":"(none)","persist.session":localStorage.getItem(x)?"present":"(none)","persist.phantomPk":localStorage.getItem(v)?"present":"(none)","persist.walletPk":localStorage.getItem(b)?"present":"(none)","persist.ageSec":null!==r?String(Math.round(r/1e3)):"(none)",href:window.location.href.slice(0,200)}}function R(e){const t=O();if(t){P(),M(t.keypair),localStorage.setItem(d,t.phantomPk),localStorage.setItem(u,t.session),localStorage.setItem(h,e.returnUrl),localStorage.setItem(m,String(Date.now())),e.anchor&&localStorage.setItem(f,e.anchor);const n="Sign in to deepnets.ai\nTimestamp: ".concat((new Date).toISOString()),r=(new TextEncoder).encode(n);try{return void U(r,t.walletPubkey)}catch(o){I()}}P();const n=i().box.keyPair();M(n),localStorage.setItem(c,"connect"),localStorage.setItem(h,e.returnUrl),localStorage.setItem(m,String(Date.now())),e.anchor&&localStorage.setItem(f,e.anchor);const r=new URLSearchParams({app_url:window.location.origin,dapp_encryption_public_key:s.A.encode(n.publicKey),redirect_link:C(),cluster:"mainnet-beta"});window.location.href="".concat(a,"/connect?").concat(r)}function D(){return null!==O()}function B(e){const t=O();return!!t&&(!e||t.walletPubkey===e)}function F(e){var t;const n=e.get("errorCode");if(n){const t=e.get("errorMessage")||"Cancelled in Phantom",r=localStorage.getItem(c),i="4001"===n||t.toLowerCase().includes("reject"),s=localStorage.getItem(j),a=localStorage.getItem(N)||void 0;return P(),"sign"!==r&&"send-tx"!==r||i||I(),"send-tx"===r&&s&&W(s,null,i?"Cancelled in Phantom":t),i?{kind:"rejected",txReturnUrl:"send-tx"===r?a:void 0}:{kind:"error",message:t,txReturnUrl:"send-tx"===r?a:void 0}}if(function(){const e=localStorage.getItem(m);if(!e)return!1;const t=parseInt(e,10);return!Number.isFinite(t)||Date.now()-t>g}())return P(),{kind:"idle"};const r=localStorage.getItem(c),a=T();if(!r||!a){return e.has("phantom_encryption_public_key")||e.has("data")?{kind:"error",message:"Lost the Phantom session locally \u2014 please try signing in again."}:{kind:"idle"}}if("connect"===r){const t=e.get("phantom_encryption_public_key"),n=e.get("nonce"),r=e.get("data");if(!t||!n||!r)return{kind:"error",message:"Missing Phantom response fields"};try{const e=s.A.decode(t),l=i().box.before(e,a.secretKey),c=i().box.open.after(s.A.decode(r),s.A.decode(n),l);if(!c)return{kind:"error",message:"Couldn't decrypt Phantom response"};const h=JSON.parse((new TextDecoder).decode(c));return localStorage.setItem(d,t),localStorage.setItem(u,h.session),o={keypair:a,session:h.session,phantomPk:t,walletPubkey:h.public_key},localStorage.setItem(y,JSON.stringify({publicKey:s.A.encode(o.keypair.publicKey),secretKey:s.A.encode(o.keypair.secretKey)})),localStorage.setItem(x,o.session),localStorage.setItem(v,o.phantomPk),localStorage.setItem(b,o.walletPubkey),localStorage.setItem(w,Str
2ing(Date.now())),{kind:"sign-needed",publicKey:h.public_key}}catch(C){return{kind:"error",message:(null===C||void 0===C?void 0:C.message)||"Decryption failed"}}}var o;if("send-tx"===r){var l;const t=localStorage.getItem(d),n=localStorage.getItem(j),r=null!==(l=localStorage.getItem(N))&&void 0!==l?l:window.location.origin,o=e.get("nonce"),c=e.get("data");if(!t||!n||!o||!c)return{kind:"error",message:"Missing Phantom signTransaction response state"};try{const e=s.A.decode(t),l=i().box.before(e,a.secretKey),u=i().box.open.after(s.A.decode(c),s.A.decode(o),l);if(!u)return{kind:"error",message:"Couldn't decrypt signTransaction response"};const d=JSON.parse((new TextDecoder).decode(u));return W(n,d.transaction,null),{kind:"tx-signed",signedTransactionBase58:d.transaction,operation:n,returnUrl:r}}catch(C){return{kind:"error",message:(null===C||void 0===C?void 0:C.message)||"Decryption failed"}}}const f=localStorage.getItem(d),_=localStorage.getItem(p),k=null!==(t=localStorage.getItem(h))&&void 0!==t?t:window.location.origin,S=e.get("nonce"),E=e.get("data");if(!f||!_||!S||!E)return{kind:"error",message:"Missing Phantom signMessage response state"};try{var A;const e=s.A.decode(f),t=i().box.before(e,a.secretKey),n=i().box.open.after(s.A.decode(E),s.A.decode(S),t);
2if(!n)return{kind:"error",message:"Couldn't decrypt signMessage response"};const r=JSON.parse((new TextDecoder).decode(n)),o=Uint8Array.from(atob(_),e=>e.charCodeAt(0)),l=(new TextDecoder).decode(o),c=s.A.decode(r.signature),u=null!==(A=localStorage.getItem("phantom_dl_pubkey"))&&void 0!==A?A:"";return P(),{kind:"login-ready",publicKey:u,message:l,signature:c,returnUrl:k}}catch(C){return{kind:"error",message:(null===C||void 0===C?void 0:C.message)||"Decryption failed"}}}function U(e,t){const n=T(),r=localStorage.getItem(d),o=localStorage.getItem(u);if(!n||!r||!o)throw new Error("Phantom session not initialized \u2014 connect first");localStorage.setItem(c,"sign"),localStorage.setItem(p,btoa(String.fromCharCode(...e))),localStorage.setItem("phantom_dl_pubkey",t);const l=s.A.decode(r),h=i().box.before(l,n.secretKey),f={message:s.A.encode(e),session:o,display:"utf8"},m=i().randomBytes(24),g=i().box.after((new TextEncoder).encode(JSON.stringify(f)),m,h),y=new URLSearchParams({dapp_encryption_public_key:s.A.encode(n.publicKey),nonce:s.A.encode(m),redirect_link:C(),payload:s.A.encode(g)});window.location.href="".concat(a,"/signMessage?").concat(y)}function z(e){const t=O();if(!t)throw new Error("No persistent Phantom session \u2014 sign in first");localStorage.setItem(j,e.operation),localStorage.setItem(k,JSON.stringify(e.params||{})),localStorage.setItem(N,e.returnUrl),P(),M(t.keypair),localStorage.setItem(d,t.phantomPk),localStorage.setItem(u,t.session),localStorage.setItem(c,"send-tx"),localStorage.setItem(h,e.returnUrl),localStorage.setItem(m,String(Date.now()));const n=s.A.decode(t.phantomPk),r=i().box.before(n,t.keypair.secretKey),o={transaction:e.transactionBase58,session:t.session},l=i().randomBytes(24),p=i().box.after((new TextEncoder).encode(JSON.stringify(o)),l,r),f=new URLSearchParams({dapp_encryption_public_key:s.A.encode(t.keypair.publicKey),nonce:s.A.encode(l),redirect_link:C(),payload:s.A.encode(p)});window.location.href="".concat(a,"/signTransaction?").concat(f)}function q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=localStorage.getItem(A);if(!t)return null;if(null!==e&&t!==e)return null;const n=localStorage.getItem(S),r=localStorage.getItem(E);let i={};try{i=JSON.parse(localStorage.getItem(k)||"{}")}catch(s){}for(const a of[j,k,N,S,E,A])localStorage.removeItem(a);return{operation:t,params:i,signedTransactionBase58:n||void 0,error:r||void 0}}function W(e,t,n){localStorage.setItem(A,e),t&&localStorage.setItem(S,t),n&&localStorage.setItem(E,n)}function H(){return localStorage.getItem(A)}},1153:(e,t,n)=>{"use strict";var r=n(5043),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:s,_owner:o.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},1166:(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]]}},1203:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(8420);t.isArrayLike=function(e){return null!=e&&"function"!==typeof e&&r.isLength(e.length)}},1281:()=>{},1293:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(4830);t.debounce=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"!==typeof n&&(n={});const{leading:i=!1,trailing:s=!0,maxWait:a}=n,o=Array(2);let l;i&&(o[0]="leading"),s&&(o[1]="trailing");let c=null;const u=r.debounce(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];l=e.apply(this,n),c=null},t,{edges:o}),d=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null!=a&&(null===c&&(c=Date.now()),Date.now()-c>=a)?(l=e.apply(this,n),c=Date.now(),u.cancel(),u.schedule(),l):(u.apply(this,n),l)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}}
2,1312:(e,t,n)=>{const r=n(1166);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let s=0;s<t.length;s++)n[i+s]^=r.mul(e[i],t[s]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let s=0;s<t.length;s++)n[s]^=r.mul(t[s],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},1444:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(418),i=n(3272);t.toPath=function(e){if(Array.isArray(e))return e.map(i.toKey);if("symbol"===typeof e)return[e];const t=[],n=(e=r.toString(e)).length;if(0===n)return t;let s=0,a="",o="",l=!1;for(46===e.charCodeAt(0)&&(t.push(""),s++);s<n;){const r=e[s];o?"\\"===r&&s+1<n?(s++,a+=e[s]):r===o?o="":a+=r:l?'"'===r||"'"===r?o=r:"]"===r?(l=!1,t.push(a),a=""):a+=r:"["===r?(l=!0,a&&(t.push(a),a="")):"."===r?a&&(t.push(a),a=""):a+=r,s++}return a&&t.push(a),t}},1497:(e,t,n)=>{"use strict";var r=n(3218);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,a){if(a!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i}
2;return n.PropTypes=n,n}},1666:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let o=0;o<t.length;o++)t[o]=255;for(let o=0;o<e.length;o++){const n=e.charAt(o),r=n.charCodeAt(0);if(255!==t[r])throw new TypeError(n+" is ambiguous");t[r]=o}const n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),s=Math.log(256)/Math.log(n);function a(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let s=0,a=0,o=0;for(;e[s]===r;)a++,s++;const l=(e.length-s)*i+1>>>0,c=new Uint8Array(l);for(;s<e.length;){const r=e.charCodeAt(s);if(r>255)return;let i=t[r];if(255===i)return;let a=0;for(let e=l-1;(0!==i||a<o)&&-1!==e;e--,a++)i+=n*c[e]>>>0,c[e]=i%256>>>0,i=i/256>>>0;if(0!==i)throw new Error("Non-zero carry");o=a,s++}let u=l-o;for(;u!==l&&0===c[u];)u++;const d=new Uint8Array(a+(l-u));let h=a;for(;u!==l;)d[h++]=c[u++];return d}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"";let i=0,a=0,o=0;const l=t.length;for(;o!==l&&0===t[o];)o++,i++;const c=(l-o)*s+1>>>0,u=new Uint8Array(c);for(;o!==l;){let e=t[o],r=0;for(let t=c-1;(0!==e||r<a)&&-1!==t;t--,r++)e+=256*u[t]>>>0,u[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");a=r,o++}let d=c-a;for(;d!==c&&0===u[d];)d++;let h=r.repeat(i);for(;d<c;++d)h+=e.charAt(u[d]);return h},decodeUnsafe:a,decode:function(e){const t=a(e);if(t)return t;throw new Error("Non-base"+n+" character")}}};const i=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},1791:(e,t,n)=>{var r=n(5172),i=n(5546);e.exports=function e(t,n){function s(e,i,a,o){try{var l=t[e](i),c=l.value;return c instanceof r?n.resolve(c.v).then(function(e){s("next",e,a,o)},function(e){s("throw",e,a,o)}):n.resolve(c).then(function(e){l.value=e,a(l)},function(e){return s("throw",e,a,o)})}catch(t){o(t)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){s(e,r,t,n)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},1805:(e,t,n)=>{const r=n(6272),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[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 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}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return s[4*(e-1)+0];case r.M:return s[4*(e-1)+1];case r.Q:return s[4*(e-1)+2];case r.H:return s[4*(e-1)+3];default:return}}},1963:(e,t,n)=>{"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,{A:()=>r})},2086:(e,t,n)=>{"use strict";e.exports=n(5082)}
2,2104:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(1203),i=n(9921);t.isArrayLikeObject=function(e){return i.isObjectLike(e)&&r.isArrayLike(e)}},2132:(e,t,n)=>{"use strict";var r=n(2897).default;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(870),s=n(4803),a=n(5093);function o(e,t,n,u){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,n,r){if(null==t)return!0;if(Array.isArray(t))return l(e,t,n,r);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[i,s]of t.entries()){if(!1===n(e.get(i),s,i,e,t,r))return!1}return!0}(e,t,n,r);if(t instanceof Set)return c(e,t,n,r);const i=Object.keys(t);if(null==e||s.isPrimitive(e))return 0===i.length;if(0===i.length)return!0;if(null!==r&&void 0!==r&&r.has(t))return r.get(t)===e;null===r||void 0===r||r.set(t,e);try{for(let a=0;a<i.length;a++){const o=i[a];if(!s.isPrimitive(e)&&!(o in e))return!1;if(void 0===t[o]&&void 0!==e[o])return!1;if(null===t[o]&&null!==e[o])return!1;if(!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{null===r||void 0===r||r.delete(t)}}(e,t,n,u);case"function":return Object.keys(t).length>0?o(e,r({},t),n,u):a.isEqualsSameValueZero(e,t);default:return i.isObject(e)?"string"!==typeof t||""===t:a.isEqualsSameValueZero(e,t)}}function l(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let s=0;s<t.length;s++){const a=t[s];let o=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;let c=!1;if(n(e[l],a,s,e,t,r)&&(c=!0),c){i.add(l),o=!0;break}}if(!o)return!1}return!0}function c(e,t,n,r){return 0===t.size||e instanceof Set&&l([...e],[...t],n,r)}t.isMatchWith=function e(t,n,r){return"function"!==typeof r?e(t,n,()=>{}):o(t,n,function e(t,n,i,s,a,l){const c=r(t,n,i,s,a,l);return void 0!==c?Boolean(c):o(t,n,e,l)},new Map)},t.isSetMatch=c},2182:(e,t,n)=>{const r=n(8293);t.render=function(e,t,n){let i=n,s=t;"undefined"!==typeof i||t&&t.getContext||(i=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const a=r.getImageWidth(e.modules.size,i),o=s.getContext("2d"),l=o.createImageData(a,a);return r.qrToImageData(l.data,e,i),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"}(o,s,a),o.putImageData(l,0,0),s},t.renderToDataURL=function(e,n,r){let i=r;"undefined"!==typeof i||n&&n.getContext||(i=n,n=void 0),i||(i={});const s=t.render(e,n,i),a=i.type||"image/png",o=i.rendererOpts||{};return s.toDataURL(a,o.quality)}},2204:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(5316),i=n(7312),s=n(3799);t.sortBy=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];const o=n.length;return o>1&&s.isIterateeCall(e,n[0],n[1])?n=[]:o>2&&s.isIterateeCall(n[0],n[1],n[2])&&(n=[n[0]]),r.orderBy(e,i.flatten(n),["asc"])}},2285:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"===typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var o,l=[],c=!1,u=-1;function d(){c&&o&&(c=!1,o.length?l=o.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(o=l,l=[];++u<t;)o&&o[u].run();u=-1,t=l.length}o=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}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];l.push(new p(e,t)),1!==l.length||c||a(h)},p.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=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,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}},2330:(e,t,n)=>{"use strict";var r=n(5043);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=r.useState,a=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return o(function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})},[e,n,t]),a(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},2489:(e,t)=>
2{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}},2682:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isPlainObject=function(e){if("object"!==typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){var t;const n=e[Symbol.toStringTag];if(null==n)return!1;return!!(null!==(t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))&&void 0!==t&&t.writable)&&e.toString()==="[object ".concat(n,"]")}let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}},2715:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(9599),i=n(7330),s=n(3808),a=n(8845);t.iteratee=function(e){if(null==e)return r.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?a.matchesProperty(e[0],e[1]):s.matches(e);case"string":case"symbol":case"number":return i.property(e)}}},2730:(e,t,n)=>{"use strict";var r=n(5043),i=n(8853);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,o={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(o[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function m(e,t,n,r,i,s,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}function v(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;
vendor: 18,409 bytes, line 2
2if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(y,x);g[t]=new m(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(y,x);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(y,x);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),_=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var I=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=I&&e[I]||e["@@iterator"])?e:null}var R,D=Object.assign;function B(e){if(void 0===R)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return"\n"+R+e}var F=!1;function U(e,t){if(!e||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),s=r.stack.split("\n"),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(1!==a||1!==o)do{if(a--,0>--o||i[a]!==s[o]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=o);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function z(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 1:return e=U(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case j:return"Fragment";case _:return"Portal";case N:return"Profiler";case k:return"StrictMode";case C:return"Suspense";case M:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:q(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function J(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function Q(e,t){Z(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(te(n)){if(1<n.length)throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function se(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ue(e,t)})}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach(function(e){fe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ye=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xe(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(s(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,je=null,ke=null;function Ne(e){if(e=vi(e)){if("function"!==typeof _e)throw Error(s(280));var t=e.stateNode;t&&(t=wi(t),_e(e.stateNode,e.type,t))}}function Se(e){je?ke?ke.push(e):ke=[e]:je=e}function Ee(){if(je){var e=je,t=ke;if(ke=je=null,Ne(e),t)for(e=0;e<t.length;e++)Ne(t[e])}}function Ae(e,t){return e(t)}function Ce(){}var Me=!1;function Te(e,t,n){if(Me)return e(t,n);Me=!0;try{return Ae(e,t,n)}finally{Me=!1,(null!==je||null!==ke)&&(Ce(),Ee())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var Oe=!1;if(u)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){Oe=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch(ue){Oe=!1}function Le(e,t,n,r,i,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Re=!1,De=null,Be=!1,Fe=null,Ue={onError:function(e){Re=!0,De=e}};function ze(e,t,n,r,i,s,a,o,l){Re=!1,De=null,Le.apply(Ue,arguments)}function qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(qe(e)!==e)throw Error(s(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=qe(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return He(i),e;if(a===r)return He(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e))?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var $e=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Ge=i.unstable_shouldYield,Je=i.unstable_requestPaint,Ze=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Xe=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,st=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ot(e)/lt|0)|0},ot=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=268435455&n;if(0!==a){var o=a&~i;0!==o?r=dt(o):0!==(s&=a)&&(r=dt(s))}else 0!==(a=n&~i)?r=dt(a):0!==s&&(r=dt(s));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(s=t&-t)||16===i&&0!==(4194240&s)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var vt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,_t,jt,kt,Nt,St=!1,Et=[],At=null,Ct=null,Mt=null,Tt=new Map,Pt=new Map,Ot=[],It="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function Rt(e,t,n,r,i,s){return null===e||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},null!==t&&(null!==(t=vi(t))&&_t(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Dt(e){var t=xi(e.target);if(null!==t){var n=qe(t);
vendor: 5,370 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void Nt(e.priority,function(){jt(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=vi(n))&&_t(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Ft(e,t,n){Bt(e)&&n.delete(t)}function Ut(){St=!1,null!==At&&Bt(At)&&(At=null),null!==Ct&&Bt(Ct)&&(Ct=null),null!==Mt&&Bt(Mt)&&(Mt=null),Tt.forEach(Ft),Pt.forEach(Ft)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,St||(St=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ut)))}function qt(e){function t(t){return zt(t,e)}if(0<Et.length){zt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&zt(At,e),null!==Ct&&zt(Ct,e),null!==Mt&&zt(Mt,e),Tt.forEach(t),Pt.forEach(t),n=0;n<Ot.length;n++)(r=Ot[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Ot.length&&null===(n=Ot[0]).blockedOn;)Dt(n),null===n.blockedOn&&Ot.shift()}var Wt=b.ReactCurrentBatchConfig,Ht=!0;function Kt(e,t,n,r){var i=vt,s=Wt.transition;Wt.transition=null;try{vt=1,$t(e,t,n,r)}finally{vt=i,Wt.transition=s}}function Vt(e,t,n,r){var i=vt,s=Wt.transition;Wt.transition=null;try{vt=4,$t(e,t,n,r)}finally{vt=i,Wt.transition=s}}function $t(e,t,n,r){if(Ht){var i=Gt(e,t,n,r);if(null===i)Hr(e,t,r,Yt,n),Lt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return At=Rt(At,e,t,n,r,i),!0;case"dragenter":return Ct=Rt(Ct,e,t,n,r,i),!0;case"mouseover":return Mt=Rt(Mt,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Tt.set(s,Rt(Tt.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Pt.set(s,Rt(Pt.get(s)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<It.indexOf(e)){for(;null!==i;){var s=vi(i);if(null!==s&&wt(s),null===(s=Gt(e,t,n,r))&&Hr(e,t,r,Yt,n),s===i)break;i=s}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Yt=null;function Gt(e,t,n,r){if(Yt=null,null!==(e=xi(e=we(r))))if(null===(t=qe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Jt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Zt=null,Qt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Qt,r=n.length,i="value"in Zt?Zt.value:Zt.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[s-t];t++);return Xt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function sn(e){function t(t,n,r,i,s){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,on,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=sn(cn),dn=D({},cn,{view:0,detail:0}),hn=sn(dn),pn=D({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 2,503 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,on=e.screenY-ln.screenY):on=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:on}}),fn=sn(pn),mn=sn(D({},pn,{dataTransfer:0})),gn=sn(D({},dn,{relatedTarget:0})),yn=sn(D({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=D({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=sn(xn),bn=sn(D({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=jn[e])&&!!t[e]}function Nn(){return kn}var Sn=D({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=sn(Sn),An=sn(D({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=sn(D({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn})),Mn=sn(D({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=D({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}
vendor: 91,877 bytes, line 2
2),Pn=sn(Tn),On=[9,13,27,32],In=u&&"CompositionEvent"in window,Ln=null;u&&"documentMode"in document&&(Ln=document.documentMode);var Rn=u&&"TextEvent"in window&&!Ln,Dn=u&&(!In||Ln&&8<Ln&&11>=Ln),Bn=String.fromCharCode(32),Fn=!1;function Un(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Kn(e,t,n,r){Se(r),0<(t=Vr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,$n=null;function Yn(e){Br(e,0)}function Gn(e){if($(bi(e)))return e}function Jn(e,t){if("change"===e)return t}var Zn=!1;if(u){var Qn;if(u){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"===typeof er.oninput}Qn=Xn}else Qn=!1;Zn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Vn&&(Vn.detachEvent("onpropertychange",nr),$n=Vn=null)}function nr(e){if("value"===e.propertyName&&Gn($n)){var t=[];Kn(t,$n,e,we(e)),Te(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),$n=n,(Vn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gn($n)}function sr(e,t){if("click"===e)return Gn(t)}function ar(e,t){if("input"===e||"change"===e)return Gn(t)}var or="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(or(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!or(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=void 0===r.end?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=ur(n,s);var a=ur(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,xr=null,vr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},xr&&lr(xr,r)||(xr=r,0<(r=Vr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},jr={},kr={};function Nr(e){if(jr[e])return jr[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return jr[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Sr=Nr("animationend"),Er=Nr("animationiteration"),Ar=Nr("animationstart"),Cr=Nr("transitionend"),Mr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Mr.set(e,t),l(t,[e])}for(var Or=0;Or<Tr.length;Or++){var Ir=Tr[Or];Pr(Ir.toLowerCase(),"on"+(Ir[0].toUpperCase()+Ir.slice(1)))}Pr(Sr,"onAnimationEnd"),Pr(Er,"onAnimationIteration"),Pr(Ar,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Cr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Dr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,o,l,c){if(ze.apply(this,arguments),Re){if(!Re)throw Error(s(198));var u=De;Re=!1,De=null,Be||(Be=!0,Fe=u)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;Dr(i,o,c),s=l}else for(a=0;a<r.length;a++){if(l=(o=r[a]).instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;Dr(i,o,c),s=l}}}if(Be)throw e=Fe,Be=!1,Fe=null,e}function Fr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Wr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),Wr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function qr(e){if(!e[zr]){e[zr]=!0,a.forEach(function(t){"selectionchange"!==t&&(Rr.has(t)||Ur(t,!1,e),Ur(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Ur("selectionchange",!1,t))}}function Wr(e,t,n,r){switch(Jt(t)){case 1:var i=Kt;break;case 4:i=Vt;break;default:i=$t}n=i.bind(null,t,n,e),i=void 0,!Oe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var s=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var o=r.stateNode.containerInfo;if(o===i||8===o.nodeType&&o.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==o;){if(null===(a=xi(o)))return;if(5===(l=a.tag)||6===l){r=s=a;continue e}o=o.parentNode}}r=r.return}Te(function(){var r=s,i=we(n),a=[];e:{var o=Mr.get(e);if(void 0!==o){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case Sr:case Er:case Ar:l=yn;break;case Cr:l=Mn;break;case"scroll":l=hn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==o?o+"Capture":null:o;u=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&(null!=(m=Pe(f,h))&&u.push(Kr(f,m,p)))),d)break;f=f.return}0<u.length&&(o=new l(o,c,null,n,i),a.push({event:o,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!xi(c)&&!c[fi])&&(l||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?xi(c):null)&&(c!==(d=qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=An,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?o:bi(l),p=null==c?o:bi(c),(o=new u(m,f+"leave",l,n,i)).target=d,o.relatedTarget=p,m=null,xi(i)===r&&((u=new u(h,f+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,f=0,p=u=l;p;p=$r(p))f++;for(p=0,m=h;m;m=$r(m))p++;for(;0<f-p;)u=$r(u),f--;for(;0<p-f;)h=$r(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=$r(u),h=$r(h)}u=null}else u=null;null!==l&&Yr(a,o,l,u,!1),null!==c&&null!==d&&Yr(a,d,c,u,!0)}if("select"===(l=(o=r?bi(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var g=Jn;else if(Hn(o))if(Zn)g=ar;else{g=ir;var y=rr}else(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(g=sr);switch(g&&(g=g(e,r))?Kn(a,g,n,i):(y&&y(e,o,r),"focusout"===e&&(y=o._wrapperState)&&y.controlled&&"number"===o.type&&ee(o,"number",o.value)),y=r?bi(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,xr=null);break;case"focusout":xr=yr=gr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,br(a,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":br(a,n,i)}var x;if(In)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else qn?Un(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Dn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==v?"onCompositionEnd"===v&&qn&&(x=en()):(Qt="value"in(Zt=i)?Zt.value:Zt.textContent,qn=!0)),0<(y=Vr(r,v)).length&&(v=new bn(v,e,null,n,i),a.push({event:v,listeners:y}),x?v.data=x:null!==(x=zn(n))&&(v.data=x))),(x=Rn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!In&&Un(e,t)?(e=en(),Xt=Qt=Zt=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Vr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=x))}Br(a,t)})}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,s=i.stateNode;5===i.tag&&null!==s&&(i=s,null!=(s=Pe(e,n))&&r.unshift(Kr(e,s,i)),null!=(s=Pe(e,t))&&r.push(Kr(e,s,i))),e=e.return}return r}function $r(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var s=t._reactName,a=[];null!==n&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(null!==l&&l===r)break;5===o.tag&&null!==c&&(o=c,i?null!=(l=Pe(n,s))&&a.unshift(Kr(n,l,o)):i||null!=(l=Pe(n,s))&&a.push(Kr(n,l,o))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Gr=/\r\n?/g,Jr=/\u0000|\uFFFD/g;function Zr(e){return("string"===typeof e?e:""+e).replace(Gr,"\n").replace(Jr,"")}function Qr(e,t,n){if(t=Zr(t),Zr(e)!==t&&n)throw Error(s(425))}function Xr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,si="function"===typeof Promise?Promise:void 0,ai="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof si?function(e){return si.resolve(null).then(e).catch(oi)}:ri;function oi(e){setTimeout(function(){throw e})}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void qt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);qt(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,pi="__reactProps$"+di,fi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,yi="__reactHandles$"+di;function xi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function vi(e){return!(e=e[hi]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function wi(e){return e[pi]||null}var _i=[],ji=-1;function ki(e){return{current:e}}function Ni(e){0>ji||(e.current=_i[ji],_i[ji]=null,ji--)}function Si(e,t){ji++,_i[ji]=e.current,e.current=t}var Ei={},Ai=ki(Ei),Ci=ki(!1),Mi=Ei;function Ti(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,s={};for(i in n)s[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Oi(){Ni(Ci),Ni(Ai)}function Ii(e,t,n){if(Ai.current!==Ei)throw Error(s(168));Si(Ai,t),Si(Ci,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(s(108,W(e)||"Unknown",i));return D({},n,r)}function Ri(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Mi=Ai.current,Si(Ai,e),Si(Ci,Ci.current),!0}function Di(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=Li(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,Ni(Ci),Ni(Ai),Si(Ai,e)):Ni(Ci),Si(Ci,n)}var Bi=null,Fi=!1,Ui=!1;function zi(e){null===Bi?Bi=[e]:Bi.push(e)}function qi(){if(!Ui&&null!==Bi){Ui=!0;var e=0,t=vt;try{var n=Bi;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,Fi=!1}catch(i){throw null!==Bi&&(Bi=Bi.slice(e+1)),$e(Xe,qi),i}finally{vt=t,Ui=!1}}return null}var Wi=[],Hi=0,Ki=null,Vi=0,$i=[],Yi=0,Gi=null,Ji=1,Zi="";function Qi(e,t){Wi[Hi++]=Vi,Wi[Hi++]=Ki,Ki=e,Vi=t}function Xi(e,t,n){$i[Yi++]=Ji,$i[Yi++]=Zi,$i[Yi++]=Gi,Gi=e;var r=Ji;e=Zi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var s=32-at(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ji=1<<32-at(t)+i|n<<i|r,Zi=s+e}else Ji=1<<s|n<<i|r,Zi=e}function es(e){null!==e.return&&(Qi(e,1),Xi(e,1,0))}function ts(e){for(;e===Ki;)Ki=Wi[--Hi],Wi[Hi]=null,Vi=Wi[--Hi],Wi[Hi]=null;for(;e===Gi;)Gi=$i[--Yi],$i[Yi]=null,Zi=$i[--Yi],$i[Yi]=null,Ji=$i[--Yi],$i[Yi]=null}var ns=null,rs=null,is=!1,ss=null;function as(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function os(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ns=e,rs=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ns=e,rs=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Gi?{id:Ji,overflow:Zi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ns=e,rs=null,!0);default:return!1}}function ls(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function cs(e){if(is){var t=rs;if(t){var n=t;if(!os(e,t)){if(ls(e))throw Error(s(418));t=ci(n.nextSibling);var r=ns;t&&os(e,t)?as(r,n):(e.flags=-4097&e.flags|2,is=!1,ns=e)}}else{if(ls(e))throw Error(s(418));e.flags=-4097&e.flags|2,is=!1,ns=e}}}function us(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ns=e}function ds(e){if(e!==ns)return!1;if(!is)return us(e),is=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=rs)){if(ls(e))throw hs(),Error(s(418));for(;t;)as(e,t),t=ci(t.nextSibling)}if(us(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){rs=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}rs=null}}else rs=ns?ci(e.stateNode.nextSibling):null;return!0}function hs(){for(var e=rs;e;)e=ci(e.nextSibling)}function ps(){rs=ns=null,is=!1}function fs(e){null===ss?ss=[e]:ss.push(e)}var ms=b.ReactCurrentBatchConfig;function gs(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function ys(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xs(e){return(0,e._init)(e._payload)}function vs(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Oc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Dc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var s=n.type;return s===j?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===P&&xs(s)===t.type)?((r=i(t,n.props)).ref=gs(e,t,n),r.return=e,r):((r=Ic(n.type,n.key,n.props,null,e.mode,r)).ref=gs(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,s){return null===t||7!==t.tag?((t=Lc(n,e.mode,r,s)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Dc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ic(t.type,t.key,t.props,null,e.mode,n)).ref=gs(e,null,t),n.return=e,n;case _:return(t=Bc(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Lc(t,e.mode,n,null)).return=e,t;ys(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?c(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case P:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||L(n))return null!==i?null:d(e,t,n,r,null);ys(e,n)}return null}function f(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||L(r))return d(t,e=e.get(n)||null,r,i,null);ys(t,r)}return null}function m(i,s,o,l){for(var c=null,u=null,d=s,m=s=0,g=null;null!==d&&m<o.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=p(i,d,o[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),s=a(y,s,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===o.length)return n(i,d),is&&Qi(i,m),c;if(null===d){for(;m<o.length;m++)null!==(d=h(i,o[m],l))&&(s=a(d,s,m),null===u?c=d:u.sibling=d,u=d);return is&&Qi(i,m),c}for(d=r(i,d);m<o.length;m++)null!==(g=f(d,i,m,o[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),s=a(g,s,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),is&&Qi(i,m),c}function g(i,o,l,c){var u=L(l);if("function"!==typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var d=u=null,m=o,g=o=0,y=null,x=l.next();null!==m&&!x.done;g++,x=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var v=p(i,m,x.value,c);if(null===v){null===m&&(m=y);break}e&&m&&null===v.alternate&&t(i,m),o=a(v,o,g),null===d?u=v:d.sibling=v,d=v,m=y}if(x.done)return n(i,m),is&&Qi(i,g),u;if(null===m){for(;!x.done;g++,x=l.next())null!==(x=h(i,x.value,c))&&(o=a(x,o,g),null===d?u=x:d.sibling=x,d=x);return is&&Qi(i,g),u}for(m=r(i,m);!x.done;g++,x=l.next())null!==(x=f(m,i,g,x.value,c))&&(e&&null!==x.alternate&&m.delete(null===x.key?g:x.key),o=a(x,o,g),null===d?u=x:d.sibling=x,d=x);return e&&m.forEach(function(e){return t(i,e)}),is&&Qi(i,g),u}return function e(r,s,a,l){if("object"===typeof a&&null!==a&&a.type===j&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var c=a.key,u=s;null!==u;){if(u.key===c){if((c=a.type)===j){if(7===u.tag){n(r,u.sibling),(s=i(u,a.props.children)).return=r,r=s;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===P&&xs(c)===u.type){n(r,u.sibling),(s=i(u,a.props)).ref=gs(r,u,a),s.return=r,r=s;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===j?((s=Lc(a.props.children,r.mode,l,a.key)).return=r,r=s):((l=Ic(a.type,a.key,a.props,null,r.mode,l)).ref=gs(r,s,a),l.return=r,r=l)}return o(r);case _:e:{for(u=a.key;null!==s;){if(s.key===u){if(4===s.tag&&s.stateNode.containerInfo===a.containerInfo&&s.stateNode.implementation===a.implementation){n(r,s.sibling),(s=i(s,a.children||[])).return=r,r=s;break e}n(r,s);break}t(r,s),s=s.sibling}(s=Bc(a,r.mode,l)).return=r,r=s}return o(r);case P:return e(r,s,(u=a._init)(a._payload),l)}if(te(a))return m(r,s,a,l);if(L(a))return g(r,s,a,l);ys(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==s&&6===s.tag?(n(r,s.sibling),(s=i(s,a)).return=r,r=s):(n(r,s),(s=Dc(a,r.mode,l)).return=r,r=s),o(r)):n(r,s)}}var bs=vs(!0),ws=vs(!1),_s=ki(null),js=null,ks=null,Ns=null;function Ss(){Ns=ks=js=null}function Es(e){var t=_s.current;Ni(_s),e._currentValue=t}function As(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Cs(e,t){js=e,Ns=ks=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(vo=!0),e.firstContext=null)}function Ms(e){var t=e._currentValue;if(Ns!==e)if(e={context:e,memoizedValue:t,next:null},null===ks){if(null===js)throw Error(s(308));ks=e,js.dependencies={lanes:0,firstContext:e}}else ks=ks.next=e;return t}var Ts=null;function Ps(e){null===Ts?Ts=[e]:Ts.push(e)}function Os(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ps(t)):(n.next=i.next,i.next=n),t.interleaved=n,Is(e,r)}function Is(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ls=!1;function Rs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ds(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fs(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Al)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Is(e,n)}return null===(i=r.interleaved)?(t.next=t,Ps(r)):(t.next=i.next,i.next=t),r.interleaved=t,Is(e,n)}function Us(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xt(e,n)}}function zs(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===s?i=s=a:s=s.next=a,n=n.next}while(null!==n);null===s?i=s=t:s=s.next=t}else i=s=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qs(e,t,n,r){var i=e.updateQueue;Ls=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,c=l.next;l.next=null,null===a?s=c:a.next=c,a=l;var u=e.alternate;null!==u&&((o=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===o?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(null!==s){var d=i.baseState;for(a=0,u=c=l=null,o=s;;){var h=o.lane,p=o.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var f=e,m=o;switch(h=t,p=n,m.tag){case 1:if("function"===typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=m.payload)?f.call(p,d,h):f)||void 0===h)break e;d=D({},d,h);break e;case 2:Ls=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[o]:h.push(o))}else p={eventTime:p,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(h=o).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===s&&(i.shared.lanes=0);Rl|=a,e.lanes=a,e.memoizedState=d}}function Ws(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(s(191,i));i.call(r)}}}var Hs={},Ks=ki(Hs),Vs=ki(Hs),$s=ki(Hs);function Ys(e){if(e===Hs)throw Error(s(174));return e}function Gs(e,t){switch(Si($s,t),Si(Vs,e),Si(Ks,Hs),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ni(Ks),Si(Ks,t)}function Js(){Ni(Ks),Ni(Vs),Ni($s)}function Zs(e){Ys($s.current);var t=Ys(Ks.current),n=le(t,e.type);t!==n&&(Si(Vs,e),Si(Ks,n))}function Qs(e){Vs.current===e&&(Ni(Ks),Ni(Vs))}var Xs=ki(0);function ea(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ta=[];function na(){for(var e=0;e<ta.length;e++)ta[e]._workInProgressVersionPrimary=null;ta.length=0}var ra=b.ReactCurrentDispatcher,ia=b.ReactCurrentBatchConfig,sa=0,aa=null,oa=null,la=null,ca=!1,ua=!1,da=0,ha=0;function pa(){throw Error(s(321))}function fa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function ma(e,t,n,r,i,a){if(sa=a,aa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ra.current=null===e||null===e.memoizedState?Qa:Xa,e=n(r,i),ua){a=0;do{if(ua=!1,da=0,25<=a)throw Error(s(301));a+=1,la=oa=null,t.updateQueue=null,ra.current=eo,e=n(r,i)}while(ua)}if(ra.current=Za,t=null!==oa&&null!==oa.next,sa=0,la=oa=aa=null,ca=!1,t)throw Error(s(300));return e}function ga(){var e=0!==da;return da=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===la?aa.memoizedState=la=e:la=la.next=e,la}function xa(){if(null===oa){var e=aa.alternate;e=null!==e?e.memoizedState:null}else e=oa.next;var t=null===la?aa.memoizedState:la.next;if(null!==t)la=t,oa=e;else{if(null===e)throw Error(s(310));e={memoizedState:(oa=e).memoizedState,baseState:oa.baseState,baseQueue:oa.baseQueue,queue:oa.queue,next:null},null===la?aa.memoizedState=la=e:la=la.next=e}return la}function va(e,t){return"function"===typeof t?t(e):t}function ba(e){var t=xa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=oa,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=o=null,c=null,u=a;do{var d=u.lane;if((sa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,o=r):c=c.next=h,aa.lanes|=d,Rl|=d}u=u.next}while(null!==u&&u!==a);null===c?o=r:c.next=l,or(r,t.memoizedState)||(vo=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,aa.lanes|=a,Rl|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wa(e){var t=xa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);or(a,t.memoizedState)||(vo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function _a(){}function ja(e,t){var n=aa,r=xa(),i=t(),a=!or(r.memoizedState,i);if(a&&(r.memoizedState=i,vo=!0),r=r.queue,La(Sa.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==la&&1&la.memoizedState.tag){if(n.flags|=2048,Ma(9,Na.bind(null,n,r,i,t),void 0,null),null===Cl)throw Error(s(349));0!==(30&sa)||ka(n,t,i)}return i}function ka(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=aa.updateQueue)?(t={lastEffect:null,stores:null},aa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Na(e,t,n,r){t.value=n,t.getSnapshot=r,Ea(t)&&Aa(e)}function Sa(e,t,n){return n(function(){Ea(t)&&Aa(e)})}function Ea(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(r){return!0}}function Aa(e){var t=Is(e,1);null!==t&&nc(t,e,1,-1)}function Ca(e){var t=ya();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t.queue=e,e=e.dispatch=$a.bind(null,aa,e),[t.memoizedState,e]}function Ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=aa.updateQueue)?(t={lastEffect:null,stores:null},aa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ta(){return xa().memoizedState}function Pa(e,t,n,r){var i=ya();aa.flags|=e,i.memoizedState=Ma(1|t,n,void 0,void 0===r?null:r)}function Oa(e,t,n,r){var i=xa();r=void 0===r?null:r;var s=void 0;if(null!==oa){var a=oa.memoizedState;if(s=a.destroy,null!==r&&fa(r,a.deps))return void(i.memoizedState=Ma(t,n,s,r))}aa.flags|=e,i.memoizedState=Ma(1|t,n,s,r)}function Ia(e,t){return Pa(8390656,8,e,t)}function La(e,t){return Oa(2048,8,e,t)}function Ra(e,t){return Oa(4,2,e,t)}function Da(e,t){return Oa(4,4,e,t)}function Ba(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Oa(4,4,Ba.bind(null,t,e),n)}function Ua(){}function za(e,t){var n=xa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qa(e,t){var n=xa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wa(e,t,n){return 0===(21&sa)?(e.baseState&&(e.baseState=!1,vo=!0),e.memoizedState=n):(or(n,t)||(n=mt(),aa.lanes|=n,Rl|=n,e.baseState=!0),t)}function Ha(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{vt=n,ia.transition=r}}function Ka(){return xa().memoizedState}function Va(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e))Ga(t,n);else if(null!==(n=Os(e,t,n,r))){nc(n,e,r,ec()),Ja(n,t,r)}}function $a(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Ga(t,i);else{var s=e.alternate;if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,or(o,a)){var l=t.interleaved;return null===l?(i.next=i,Ps(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Os(e,t,i,r))&&(nc(n,e,r,i=ec()),Ja(n,t,r))}}function Ya(e){var t=e.alternate;return e===aa||null!==t&&t===aa}function Ga(e,t){ua=ca=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xt(e,n)}}var Za={readContext:Ms,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Qa={readContext:Ms,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Ms,useEffect:Ia,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Pa(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pa(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Va.bind(null,aa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Ca,useDebugValue:Ua,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Ca(!1),t=e[0];return e=Ha.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=aa,i=ya();if(is){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===Cl)throw Error(s(349));0!==(30&sa)||ka(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Ia(Sa.bind(null,r,a,e),[e]),r.flags|=2048,Ma(9,Na.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Cl.identifierPrefix;if(is){var n=Zi;t=":"+t+"R"+(n=(Ji&~(1<<32-at(Ji)-1)).toString(32)+n),0<(n=da++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xa={readContext:Ms,useCallback:za,useContext:Ms,useEffect:La,useImperativeHandle:Fa,useInsertionEffect:Ra,useLayoutEffect:Da,useMemo:qa,useReducer:ba,useRef:Ta,useState:function(){return ba(va)},useDebugValue:Ua,useDeferredValue:function(e){return Wa(xa(),oa.memoizedState,e)},useTransition:function(){return[ba(va)[0],xa().memoizedState]},useMutableSource:_a,useSyncExternalStore:ja,useId:Ka,unstable_isNewReconciler:!1},eo={readContext:Ms,useCallback:za,useContext:Ms,useEffect:La,useImperativeHandle:Fa,useInsertionEffect:Ra,useLayoutEffect:Da,useMemo:qa,useReducer:wa,useRef:Ta,useState:function(){return wa(va)},useDebugValue:Ua,useDeferredValue:function(e){var t=xa();return null===oa?t.memoizedState=e:Wa(t,oa.memoizedState,e)},useTransition:function(){return[wa(va)[0],xa().memoizedState]},useMutableSource:_a,useSyncExternalStore:ja,useId:Ka,unstable_isNewReconciler:!1};function to(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function no(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ro={isMounted:function(e){return!!(e=e._reactInternals)&&qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),s=Bs(r,i);s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Fs(e,s,i))&&(nc(t,e,i,r),Us(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),s=Bs(r,i);s.tag=1,s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Fs(e,s,i))&&(nc(t,e,i,r),Us(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Bs(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Fs(e,i,r))&&(nc(t,e,r,n),Us(t,e,r))}};function io(e,t,n,r,i,s,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,s,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,s))}function so(e,t,n){var r=!1,i=Ei,s=t.contextType;return"object"===typeof s&&null!==s?s=Ms(s):(i=Pi(t)?Mi:Ai.current,s=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ti(e,i):Ei),t=new t(n,s),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ro,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function ao(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function oo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Rs(e);var s=t.contextType;"object"===typeof s&&null!==s?i.context=Ms(s):(s=Pi(t)?Mi:Ai.current,i.context=Ti(e,s)),i.state=e.memoizedState,"function"===typeof(s=t.getDerivedStateFromProps)&&(no(e,t,s,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ro.enqueueReplaceState(i,i.state,null),qs(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(s){i="\nError generating stack: "+s.message+"\n"+s.stack}return{value:e,source:t,stack:i,digest:null}}function co(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function uo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ho="function"===typeof WeakMap?WeakMap:Map;function po(e,t,n){(n=Bs(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Kl=r),uo(0,t)},n}function fo(e,t,n){(n=Bs(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){uo(0,t)}}var s=e.stateNode;return null!==s&&"function"===typeof s.componentDidCatch&&(n.callback=function(){uo(0,t),"function"!==typeof r&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function mo(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ho;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Nc.bind(null,e,t,n),t.then(e,e))}function go(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function yo(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bs(-1,1)).tag=2,Fs(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var xo=b.ReactCurrentOwner,vo=!1;function bo(e,t,n,r){t.child=null===e?ws(t,null,n,r):bs(t,e.child,n,r)}function wo(e,t,n,r,i){n=n.render;var s=t.ref;return Cs(t,i),r=ma(e,t,n,r,s,i),n=ga(),null===e||vo?(is&&n&&es(t),t.flags|=1,bo(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ho(e,t,i))}function _o(e,t,n,r,i){if(null===e){var s=n.type;return"function"!==typeof s||Pc(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ic(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,jo(e,t,s,r,i))}if(s=e.child,0===(e.lanes&i)){var a=s.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Ho(e,t,i)}return t.flags|=1,(e=Oc(s,r)).ref=t.ref,e.return=t,t.child=e}function jo(e,t,n,r,i){if(null!==e){var s=e.memoizedProps;if(lr(s,r)&&e.ref===t.ref){if(vo=!1,t.pendingProps=r=s,0===(e.lanes&i))return t.lanes=e.lanes,Ho(e,t,i);0!==(131072&e.flags)&&(vo=!0)}}return So(e,t,n,r,i)}function ko(e,t,n){var r=t.pendingProps,i=r.children,s=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Si(Ol,Pl),Pl|=n;else{if(0===(1073741824&n))return e=null!==s?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Si(Ol,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==s?s.baseLanes:n,Si(Ol,Pl),Pl|=r}else null!==s?(r=s.baseLanes|n,t.memoizedState=null):r=n,Si(Ol,Pl),Pl|=r;return bo(e,t,i,n),t.child}function No(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function So(e,t,n,r,i){var s=Pi(n)?Mi:Ai.current;return s=Ti(t,s),Cs(t,i),n=ma(e,t,n,r,s,i),r=ga(),null===e||vo?(is&&r&&es(t),t.flags|=1,bo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ho(e,t,i))}function Eo(e,t,n,r,i){if(Pi(n)){var s=!0;Ri(t)}else s=!1;if(Cs(t,i),null===t.stateNode)Wo(e,t),so(t,n,r),oo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Ms(c):c=Ti(t,c=Pi(n)?Mi:Ai.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(o!==r||l!==c)&&ao(t,a,r,c),Ls=!1;var h=t.memoizedState;a.state=h,qs(t,r,a,i),l=t.memoizedState,o!==r||h!==l||Ci.current||Ls?("function"===typeof u&&(no(t,n,u,r),l=t.memoizedState),(o=Ls||io(t,n,o,r,h,l,c))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=o):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ds(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:to(t.type,o),a.props=c,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ms(l):l=Ti(t,l=Pi(n)?Mi:Ai.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(o!==d||h!==l)&&ao(t,a,r,l),Ls=!1,h=t.memoizedState,a.state=h,qs(t,r,a,i);var f=t.memoizedState;o!==d||h!==f||Ci.current||Ls?("function"===typeof p&&(no(t,n,p,r),f=t.memoizedState),(c=Ls||io(t,n,c,r,h,f,l)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ao(e,t,n,r,s,i)}function Ao(e,t,n,r,i,s){No(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&Di(t,n,!1),Ho(e,t,s);r=t.stateNode,xo.current=t;var o=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=bs(t,e.child,null,s),t.child=bs(t,null,o,s)):bo(e,t,o,s),t.memoizedState=r.state,i&&Di(t,n,!0),t.child}function Co(e){var t=e.stateNode;t.pendingContext?Ii(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ii(0,t.context,!1),Gs(e,t.containerInfo)}function Mo(e,t,n,r,i){return ps(),fs(i),t.flags|=256,bo(e,t,n,r),t.child}var To,Po,Oo,Io,Lo={dehydrated:null,treeContext:null,retryLane:0};function Ro(e){return{baseLanes:e,cachePool:null,transitions:null}}function Do(e,t,n){var r,i=t.pendingProps,a=Xs.current,o=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Si(Xs,1&a),null===e)return cs(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,o?(i=t.mode,o=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=l):o=Rc(l,i,0,null),e=Lc(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ro(n),t.memoizedState=Lo,e):Bo(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,o){if(n)return 256&t.flags?(t.flags&=-257,Fo(e,t,o,r=co(Error(s(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Rc({mode:"visible",children:r.children},i,0,null),(a=Lc(a,i,o,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&bs(t,e.child,null,o),t.child.memoizedState=Ro(o),t.memoizedState=Lo,a);if(0===(1&t.mode))return Fo(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Fo(e,t,o,r=co(a=Error(s(419)),r,void 0))}if(l=0!==(o&e.childLanes),vo||l){if(null!==(r=Cl)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|o))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Is(e,i),nc(r,e,i,-1))}return mc(),Fo(e,t,o,r=co(Error(s(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ec.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,rs=ci(i.nextSibling),ns=t,is=!0,ss=null,null!==e&&($i[Yi++]=Ji,$i[Yi++]=Zi,$i[Yi++]=Gi,Ji=e.id,Zi=e.overflow,Gi=t),t=Bo(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(o){o=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Oc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?o=Oc(r,o):(o=Lc(o,l,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,l=null===(l=e.child.memoizedState)?Ro(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Lo,i}return e=(o=e.child).sibling,i=Oc(o,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Bo(e,t){return(t=Rc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fo(e,t,n,r){return null!==r&&fs(r),bs(t,e.child,null,n),(e=Bo(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Uo(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),As(e.return,t,n)}function zo(e,t,n,r,i){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function qo(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(bo(e,t,r.children,n),0!==(2&(r=Xs.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Uo(e,n,t);else if(19===e.tag)Uo(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Si(Xs,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ea(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zo(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ea(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zo(t,!0,n,null,s);break;case"together":zo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wo(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ho(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Rl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Oc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Oc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ko(e,t){if(!is)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vo(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $o(e,t,n){var r=t.pendingProps;switch(ts(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vo(t),null;case 1:case 17:return Pi(t.type)&&Oi(),Vo(t),null;case 3:return r=t.stateNode,Js(),Ni(Ci),Ni(Ai),na(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ds(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ss&&(ac(ss),ss=null))),Po(e,t),Vo(t),null;case 5:Qs(t);var i=Ys($s.current);if(n=t.type,null!==e&&null!=t.stateNode)Oo(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(s(166));return Vo(t),null}if(e=Ys(Ks.current),ds(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[pi]=a,e=0!==(1&t.mode),n){case"dialog":Fr("cancel",r),Fr("close",r);break;case"iframe":case"object":case"embed":Fr("load",r);break;case"video":case"audio":for(i=0;i<Lr.length;i++)Fr(Lr[i],r);break;case"source":Fr("error",r);break;case"img":case"image":case"link":Fr("error",r),Fr("load",r);break;case"details":Fr("toggle",r);break;case"input":J(r,a),Fr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Fr("invalid",r);break;case"textarea":ie(r,a),Fr("invalid",r)}for(var l in xe(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):o.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Fr("scroll",r)}switch(n){case"input":V(r),X(r,a,!0);break;case"textarea":V(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Xr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[pi]=r,To(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(n,r),n){case"dialog":Fr("cancel",e),Fr("close",e),i=r;break;case"iframe":case"object":case"embed":Fr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Lr.length;i++)Fr(Lr[i],e);i=r;break;case"source":Fr("error",e),i=r;break;case"img":case"image":case"link":Fr("error",e),Fr("load",e),i=r;break;case"details":Fr("toggle",e),i=r;break;case"input":J(e,r),i=G(e,r),Fr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=D({},r,{value:void 0}),Fr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Fr("invalid",e)}for(a in xe(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?ge(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(o.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Fr("scroll",e):null!=u&&v(e,a,u,l))}switch(n){case"input":V(e),X(e,r,!1);break;case"textarea":V(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Vo(t),null;case 6:if(e&&null!=t.stateNode)Io(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));if(n=Ys($s.current),Ys(Ks.current),ds(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=ns))switch(e.tag){case 3:Qr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Vo(t),null;case 13:if(Ni(Xs),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(is&&null!==rs&&0!==(1&t.mode)&&0===(128&t.flags))hs(),ps(),t.flags|=98560,a=!1;else if(a=ds(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(s(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(s(317));a[hi]=t}else ps(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Vo(t),a=!1}else null!==ss&&(ac(ss),ss=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&Xs.current)?0===Il&&(Il=3):mc())),null!==t.updateQueue&&(t.flags|=4),Vo(t),null);case 4:return Js(),Po(e,t),null===e&&qr(t.stateNode.containerInfo),Vo(t),null;case 10:return Es(t.type._context),Vo(t),null;case 19:if(Ni(Xs),null===(a=t.memoizedState))return Vo(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)Ko(a,!1);else{if(0!==Il||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ea(e))){for(t.flags|=128,Ko(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Si(Xs,1&Xs.current|2),t.child}e=e.sibling}null!==a.tail&&Ze()>ql&&(t.flags|=128,r=!0,Ko(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ea(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ko(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!is)return Vo(t),null}else 2*Ze()-a.renderingStartTime>ql&&1073741824!==n&&(t.flags|=128,r=!0,Ko(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ze(),t.sibling=null,n=Xs.current,Si(Xs,r?1&n|2:1&n),t):(Vo(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Pl)&&(Vo(t),6&t.subtreeFlags&&(t.flags|=8192)):Vo(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}function Yo(e,t){switch(ts(t),t.tag){case 1:return Pi(t.type)&&Oi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Js(),Ni(Ci),Ni(Ai),na(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Qs(t),null;case 13:if(Ni(Xs),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));ps()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ni(Xs),null;case 4:return Js(),null;case 10:return Es(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}To=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Po=function(){},Oo=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ys(Ks.current);var s,a=null;switch(n){case"input":i=G(e,i),r=G(e,r),a=[];break;case"select":i=D({},i,{value:void 0}),r=D({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Xr)}for(u in xe(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(o.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(o.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Fr("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Io=function(e,t,n,r){n!==r&&(t.flags|=4)};var Go=!1,Jo=!1,Zo="function"===typeof WeakSet?WeakSet:Set,Qo=null;function Xo(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){kc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){kc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,void 0!==s&&el(t,n,s)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function sl(e){var t=e.alternate;null!==t&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[mi],delete t[gi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(st&&"function"===typeof st.onCommitFiberUnmount)try{st.onCommitFiberUnmount(it,n)}catch(o){}switch(n.tag){case 5:Jo||Xo(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),qt(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Jo&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,void 0!==a&&(0!==(2&s)||0!==(4&s))&&el(n,t,a),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Jo&&(Xo(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){kc(n,t,o)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Jo=(r=Jo)||null!==n.memoizedState,hl(e,t,n),Jo=r):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Zo),t.forEach(function(t){var r=Ac.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(s(160));pl(a,o,i),ul=null,dl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(u){kc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),yl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){kc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){kc(e,e.return,g)}}break;case 1:ml(t,e),yl(e),512&r&&null!==n&&Xo(n,n.return);break;case 5:if(ml(t,e),yl(e),512&r&&null!==n&&Xo(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(g){kc(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,o=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&Z(i,a),ve(l,o);var u=ve(l,a);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):v(i,d,h,u)}switch(l){case"input":Q(i,a);break;case"textarea":se(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(i,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[pi]=a}catch(g){kc(e,e.return,g)}}break;case 6:if(ml(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(s(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){kc(e,e.return,g)}}break;case 3:if(ml(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{qt(t.containerInfo)}catch(g){kc(e,e.return,g)}break;case 4:default:ml(t,e),yl(e);break;case 13:ml(t,e),yl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(zl=Ze())),4&r&&fl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Jo=(u=Jo)||d,ml(t,e),Jo=u):ml(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Qo=e,d=e.child;null!==d;){for(h=Qo=d;null!==Qo;){switch(f=(p=Qo).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Xo(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){kc(r,n,g)}}break;case 5:Xo(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Qo=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"===typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,o=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",o))}catch(g){kc(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){kc(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),yl(e),4&r&&fl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(s(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,ol(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,ol(e),a);break;default:throw Error(s(161))}}catch(o){kc(e,e.return,o)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function xl(e,t,n){Qo=e,vl(e,t,n)}function vl(e,t,n){for(var r=0!==(1&e.mode);null!==Qo;){var i=Qo,s=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Go;if(!a){var o=i.alternate,l=null!==o&&null!==o.memoizedState||Jo;o=Go;var c=Jo;if(Go=a,(Jo=l)&&!c)for(Qo=i;null!==Qo;)l=(a=Qo).child,22===a.tag&&null!==a.memoizedState?_l(i):null!==l?(l.return=a,Qo=l):_l(i);for(;null!==s;)Qo=s,vl(s,t,n),s=s.sibling;Qo=i,Go=o,Jo=c}bl(e)}else 0!==(8772&i.subtreeFlags)&&null!==s?(s.return=i,Qo=s):bl(e)}}function bl(e){for(;null!==Qo;){var t=Qo;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Jo||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Jo)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:to(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ws(t,a,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ws(t,o,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&qt(h)}}}break;default:throw Error(s(163))}Jo||512&t.flags&&il(t)}catch(p){kc(t,t.return,p)}}if(t===e){Qo=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qo=n;break}Qo=t.return}}function wl(e){for(;null!==Qo;){var t=Qo;if(t===e){Qo=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qo=n;break}Qo=t.return}}function _l(e){for(;null!==Qo;){var t=Qo;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){kc(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){kc(t,i,l)}}var s=t.return;try{il(t)}catch(l){kc(t,s,l)}break;case 5:var a=t.return;try{il(t)}catch(l){kc(t,a,l)}}}catch(l){kc(t,t.return,l)}if(t===e){Qo=null;break}var o=t.sibling;if(null!==o){o.return=t.return,Qo=o;break}Qo=t.return}}var jl,kl=Math.ceil,Nl=b.ReactCurrentDispatcher,Sl=b.ReactCurrentOwner,El=b.ReactCurrentBatchConfig,Al=0,Cl=null,Ml=null,Tl=0,Pl=0,Ol=ki(0),Il=0,Ll=null,Rl=0,Dl=0,Bl=0,Fl=null,Ul=null,zl=0,ql=1/0,Wl=null,Hl=!1,Kl=null,Vl=null,$l=!1,Yl=null,Gl=0,Jl=0,Zl=null,Ql=-1,Xl=0;function ec(){return 0!==(6&Al)?Ze():-1!==Ql?Ql:Ql=Ze()}function tc(e){return 0===(1&e.mode)?1:0!==(2&Al)&&0!==Tl?Tl&-Tl:null!==ms.transition?(0===Xl&&(Xl=mt()),Xl):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Jt(e.type)}function nc(e,t,n,r){if(50<Jl)throw Jl=0,Zl=null,Error(s(185));yt(e,n,r),0!==(2&Al)&&e===Cl||(e===Cl&&(0===(2&Al)&&(Dl|=n),4===Il&&oc(e,Tl)),rc(e,r),1===n&&0===Al&&0===(1&t.mode)&&(ql=Ze()+500,Fi&&qi()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-at(s),o=1<<a,l=i[a];-1===l?0!==(o&n)&&0===(o&r)||(i[a]=pt(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}(e,t);var r=ht(e,e===Cl?Tl:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Fi=!0,zi(e)}(lc.bind(null,e)):zi(lc.bind(null,e)),ai(function(){0===(6&Al)&&qi()}),n=null;else{switch(bt(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Cc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Ql=-1,Xl=0,0!==(6&Al))throw Error(s(327));var n=e.callbackNode;if(_c()&&e.callbackNode!==n)return null;var r=ht(e,e===Cl?Tl:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Al;Al|=2;var a=fc();for(Cl===e&&Tl===t||(Wl=null,ql=Ze()+500,hc(e,t));;)try{xc();break}catch(l){pc(e,l)}Ss(),Nl.current=a,Al=i,null!==Ml?t=0:(Cl=null,Tl=0,t=Il)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=sc(e,i))),1===t)throw n=Ll,hc(e,0),oc(e,r),rc(e,Ze()),n;if(6===t)oc(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!or(s(),i))return!1}catch(o){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gc(e,r))&&(0!==(a=ft(e))&&(r=a,t=sc(e,a))),1===t))throw n=Ll,hc(e,0),oc(e,r),rc(e,Ze()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:case 5:wc(e,Ul,Wl);break;case 3:if(oc(e,r),(130023424&r)===r&&10<(t=zl+500-Ze())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wc.bind(null,e,Ul,Wl),t);break}wc(e,Ul,Wl);break;case 4:if(oc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-at(r);a=1<<o,(o=t[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kl(r/1960))-r)){e.timeoutHandle=ri(wc.bind(null,e,Ul,Wl),r);break}wc(e,Ul,Wl);break;default:throw Error(s(329))}}}return rc(e,Ze()),e.callbackNode===n?ic.bind(null,e):null}function sc(e,t){var n=Fl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Ul,Ul=n,null!==t&&ac(t)),e}function ac(e){null===Ul?Ul=e:Ul.push.apply(Ul,e)}function oc(e,t){for(t&=~Bl,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&Al))throw Error(s(327));_c();var t=ht(e,0);if(0===(1&t))return rc(e,Ze()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=sc(e,r))}if(1===n)throw n=Ll,hc(e,0),oc(e,t),rc(e,Ze()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Ul,Wl),rc(e,Ze()),null}function cc(e,t){var n=Al;Al|=1;try{return e(t)}finally{0===(Al=n)&&(ql=Ze()+500,Fi&&qi())}}function uc(e){null!==Yl&&0===Yl.tag&&0===(6&Al)&&_c();var t=Al;Al|=1;var n=El.transition,r=vt;try{if(El.transition=null,vt=1,e)return e()}finally{vt=r,El.transition=n,0===(6&(Al=t))&&qi()}}function dc(){Pl=Ol.current,Ni(Ol)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ml)for(n=Ml.return;null!==n;){var r=n;switch(ts(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Oi();break;case 3:Js(),Ni(Ci),Ni(Ai),na();break;case 5:Qs(r);break;case 4:Js();break;case 13:case 19:Ni(Xs);break;case 10:Es(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Cl=e,Ml=e=Oc(e.current,null),Tl=Pl=t,Il=0,Ll=null,Bl=Dl=Rl=0,Ul=Fl=null,null!==Ts){for(t=0;t<Ts.length;t++)if(null!==(r=(n=Ts[t]).interleaved)){n.interleaved=null;var i=r.next,s=n.pending;if(null!==s){var a=s.next;s.next=i,r.next=a}n.pending=r}Ts=null}return e}function pc(e,t){for(;;){var n=Ml;try{if(Ss(),ra.current=Za,ca){for(var r=aa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ca=!1}if(sa=0,la=oa=aa=null,ua=!1,da=0,Sl.current=null,null===n||null===n.return){Il=1,Ll=t,Ml=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=Tl,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=go(o);if(null!==f){f.flags&=-257,yo(f,o,l,0,t),1&f.mode&&mo(a,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0===(1&t)){mo(a,u,t),mc();break e}c=Error(s(426))}else if(is&&1&l.mode){var y=go(o);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),yo(y,o,l,0,t),fs(lo(c,l));break e}}a=c=lo(c,l),4!==Il&&(Il=2),null===Fl?Fl=[a]:Fl.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,zs(a,po(0,c,t));break e;case 1:l=c;var x=a.type,v=a.stateNode;if(0===(128&a.flags)&&("function"===typeof x.getDerivedStateFromError||null!==v&&"function"===typeof v.componentDidCatch&&(null===Vl||!Vl.has(v)))){a.flags|=65536,t&=-t,a.lanes|=t,zs(a,fo(a,l,t));break e}}a=a.return}while(null!==a)}bc(n)}catch(b){t=b,Ml===n&&null!==n&&(Ml=n=n.return);continue}break}}function fc(){var e=Nl.current;return Nl.current=Za,null===e?Za:e}function mc(){0!==Il&&3!==Il&&2!==Il||(Il=4),null===Cl||0===(268435455&Rl)&&0===(268435455&Dl)||oc(Cl,Tl)}function gc(e,t){var n=Al;Al|=2;var r=fc();for(Cl===e&&Tl===t||(Wl=null,hc(e,t));;)try{yc();break}catch(i){pc(e,i)}if(Ss(),Al=n,Nl.current=r,null!==Ml)throw Error(s(261));return Cl=null,Tl=0,Il}function yc(){for(;null!==Ml;)vc(Ml)}function xc(){for(;null!==Ml&&!Ge();)vc(Ml)}function vc(e){var t=jl(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?bc(e):Ml=t,Sl.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=$o(n,t,Pl)))return void(Ml=n)}else{if(null!==(n=Yo(n,t)))return n.flags&=32767,void(Ml=n);if(null===e)return Il=6,void(Ml=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ml=t);Ml=t=e}while(null!==t);0===Il&&(Il=5)}function wc(e,t,n){var r=vt,i=El.transition;try{El.transition=null,vt=1,function(e,t,n,r){do{_c()}while(null!==Yl);if(0!==(6&Al))throw Error(s(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}(e,a),e===Cl&&(Ml=Cl=null,Tl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||$l||($l=!0,Cc(tt,function(){return _c(),null})),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=El.transition,El.transition=null;var o=vt;vt=1;var l=Al;Al|=4,Sl.current=null,function(e,t){if(ei=Ht,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(l=o+i),h!==a||0!==r&&3!==h.nodeType||(c=o+r),3===h.nodeType&&(o+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===i&&(l=o),p===a&&++d===r&&(c=o),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Qo=t;null!==Qo;)if(e=(t=Qo).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Qo=e;else for(;null!==Qo;){t=Qo;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:to(t.type,g),y);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(s(163))}}catch(w){kc(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Qo=e;break}Qo=t.return}m=tl,tl=!1}(e,n),gl(n,e),fr(ti),Ht=!!ei,ti=ei=null,e.current=n,xl(n,e,i),Je(),Al=l,vt=o,El.transition=a}else e.current=n;if($l&&($l=!1,Yl=e,Gl=i),a=e.pendingLanes,0===a&&(Vl=null),function(e){if(st&&"function"===typeof st.onCommitFiberRoot)try{st.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Ze()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Hl)throw Hl=!1,e=Kl,Kl=null,e;0!==(1&Gl)&&0!==e.tag&&_c(),a=e.pendingLanes,0!==(1&a)?e===Zl?Jl++:(Jl=0,Zl=e):Jl=0,qi()}(e,t,n,r)}finally{El.transition=i,vt=r}return null}function _c(){if(null!==Yl){var e=bt(Gl),t=El.transition,n=vt;try{if(El.transition=null,vt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Gl=0,0!==(6&Al))throw Error(s(331));var i=Al;for(Al|=4,Qo=e.current;null!==Qo;){var a=Qo,o=a.child;if(0!==(16&Qo.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Qo=u;null!==Qo;){var d=Qo;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Qo=h;else for(;null!==Qo;){var p=(d=Qo).sibling,f=d.return;if(sl(d),d===u){Qo=null;break}if(null!==p){p.return=f,Qo=p;break}Qo=f}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Qo=a}}if(0!==(2064&a.subtreeFlags)&&null!==o)o.return=a,Qo=o;else e:for(;null!==Qo;){if(0!==(2048&(a=Qo).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var x=a.sibling;if(null!==x){x.return=a.return,Qo=x;break e}Qo=a.return}}var v=e.current;for(Qo=v;null!==Qo;){var b=(o=Qo).child;if(0!==(2064&o.subtreeFlags)&&null!==b)b.return=o,Qo=b;else e:for(o=v;null!==Qo;){if(0!==(2048&(l=Qo).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(_){kc(l,l.return,_)}if(l===o){Qo=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Qo=w;break e}Qo=l.return}}if(Al=i,qi(),st&&"function"===typeof st.onPostCommitFiberRoot)try{st.onPostCommitFiberRoot(it,e)}catch(_){}r=!0}return r}finally{vt=n,El.transition=t}}return!1}function jc(e,t,n){e=Fs(e,t=po(0,t=lo(n,t),1),1),t=ec(),null!==e&&(yt(e,1,t),rc(e,t))}function kc(e,t,n){if(3===e.tag)jc(e,e,n);else for(;null!==t;){if(3===t.tag){jc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Vl||!Vl.has(r))){t=Fs(t,e=fo(t,e=lo(n,e),1),1),e=ec(),null!==t&&(yt(t,1,e),rc(t,e));break}}t=t.return}}function Nc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Tl&n)===n&&(4===Il||3===Il&&(130023424&Tl)===Tl&&500>Ze()-zl?hc(e,0):Bl|=n),rc(e,t)}function Sc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Is(e,t))&&(yt(e,t,n),rc(e,n))}function Ec(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Sc(e,n)}function Ac(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(t),Sc(e,n)}function Cc(e,t){return $e(e,t)}function Mc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tc(e,t,n,r){return new Mc(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ic(e,t,n,r,i,a){var o=2;if(r=e,"function"===typeof e)Pc(e)&&(o=1);else if("string"===typeof e)o=5;else e:switch(e){case j:return Lc(n.children,i,a,t);case k:o=8,i|=8;break;case N:return(e=Tc(12,n,t,2|i)).elementType=N,e.lanes=a,e;case C:return(e=Tc(13,n,t,i)).elementType=C,e.lanes=a,e;case M:return(e=Tc(19,n,t,i)).elementType=M,e.lanes=a,e;case O:return Rc(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case S:o=10;break e;case E:o=9;break e;case A:o=11;break e;case T:o=14;break e;case P:o=16,r=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Tc(o,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Lc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Rc(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function Dc(e,t,n){return(e=Tc(6,e,null,t)).lanes=n,e}function Bc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uc(e,t,n,r,i,s,a,o,l){return e=new Fc(e,t,n,o,l),1===t?(t=1,!0===s&&(t|=8)):t=0,s=Tc(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rs(s),e}function zc(e){if(!e)return Ei;e:{if(qe(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(Pi(n))return Li(e,n,t)}return t}function qc(e,t,n,r,i,s,a,o,l){return(e=Uc(n,r,!0,e,0,s,0,o,l)).context=zc(null),n=e.current,(s=Bs(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,Fs(n,s,i),e.current.lanes=i,yt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,s=ec(),a=tc(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bs(s,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Fs(i,t,a))&&(nc(e,i,a,s),Us(e,i,a)),a}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Vc(e,t){Kc(e,t),(e=e.alternate)&&Kc(e,t)}jl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ci.current)vo=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return vo=!1,function(e,t,n){switch(t.tag){case 3:Co(t),ps();break;case 5:Zs(t);break;case 1:Pi(t.type)&&Ri(t);break;case 4:Gs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Si(_s,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Si(Xs,1&Xs.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Do(e,t,n):(Si(Xs,1&Xs.current),null!==(e=Ho(e,t,n))?e.sibling:null);Si(Xs,1&Xs.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return qo(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Si(Xs,Xs.current),r)break;return null;case 22:case 23:return t.lanes=0,ko(e,t,n)}return Ho(e,t,n)}(e,t,n);vo=0!==(131072&e.flags)}else vo=!1,is&&0!==(1048576&t.flags)&&Xi(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wo(e,t),e=t.pendingProps;var i=Ti(t,Ai.current);Cs(t,n),i=ma(null,t,r,e,i,n);var a=ga();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pi(r)?(a=!0,Ri(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Rs(t),i.updater=ro,t.stateNode=i,i._reactInternals=t,oo(t,r,e,n),t=Ao(null,t,r,!0,a,n)):(t.tag=0,is&&a&&es(t),bo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wo(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Pc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===A)return 11;if(e===T)return 14}return 2}(r),e=to(r,e),i){case 0:t=So(null,t,r,e,n);break e;case 1:t=Eo(null,t,r,e,n);break e;case 11:t=wo(null,t,r,e,n);break e;case 14:t=_o(null,t,r,to(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,So(e,t,r,i=t.elementType===r?i:to(r,i),n);case 1:return r=t.type,i=t.pendingProps,Eo(e,t,r,i=t.elementType===r?i:to(r,i),n);case 3:e:{if(Co(t),null===e)throw Error(s(387));
vendor: 4,691 bytes, line 2
2r=t.pendingProps,i=(a=t.memoizedState).element,Ds(e,t),qs(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Mo(e,t,r,n,i=lo(Error(s(423)),t));break e}if(r!==i){t=Mo(e,t,r,n,i=lo(Error(s(424)),t));break e}for(rs=ci(t.stateNode.containerInfo.firstChild),ns=t,is=!0,ss=null,n=ws(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ps(),r===i){t=Ho(e,t,n);break e}bo(e,t,r,n)}t=t.child}return t;case 5:return Zs(t),null===e&&cs(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,ni(r,i)?o=null:null!==a&&ni(r,a)&&(t.flags|=32),No(e,t),bo(e,t,o,n),t.child;case 6:return null===e&&cs(t),null;case 13:return Do(e,t,n);case 4:return Gs(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=bs(t,null,r,n):bo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,wo(e,t,r,i=t.elementType===r?i:to(r,i),n);case 7:return bo(e,t,t.pendingProps,n),t.child;case 8:case 12:return bo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Si(_s,r._currentValue),r._currentValue=o,null!==a)if(or(a.value,o)){if(a.children===i.children&&!Ci.current){t=Ho(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){o=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Bs(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),As(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)o=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),As(o,n,t),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===t){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}bo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Cs(t,n),r=r(i=Ms(i)),t.flags|=1,bo(e,t,r,n),t.child;case 14:return i=to(r=t.type,t.pendingProps),_o(e,t,r,i=to(r.type,i),n);case 15:return jo(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:to(r,i),Wo(e,t),t.tag=1,Pi(r)?(e=!0,Ri(t)):e=!1,Cs(t,n),so(t,r,i),oo(t,r,i,n),Ao(null,t,r,!0,e,n);case 19:return qo(e,t,n);case 22:return ko(e,t,n)}throw Error(s(156,t.tag))};var $c="function"===typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Gc(e){this._internalRoot=e}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Xc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if("function"===typeof i){var o=i;i=function(){var e=Hc(a);o.call(e)}}Wc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"===typeof r){var s=r;r=function(){var e=Hc(a);s.call(e)}}var a=qc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=a,e[fi]=a.current,qr(8===e.nodeType?e.parentNode:e),uc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var o=r;r=function(){var e=Hc(l);o.call(e)}}var l=Uc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[fi]=l.current,qr(8===e.nodeType?e.parentNode:e),uc(function(){Wc(t,l,n,r)}),l}(n,t,e,i,r);return Hc(a)}Gc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));Wc(e,t,null,null)},Gc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc(function(){Wc(null,e,null,null)}),t[fi]=null}},Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ot.length&&0!==t&&t<Ot[n].priority;n++);Ot.splice(n,0,e),0===n&&Dt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(xt(t,1|n),rc(t,Ze()),0===(6&Al)&&(ql=Ze()+500,qi()))}break;case 13:uc(function(){var t=Is(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}}),Vc(e,1)}},_t=function(e){if(13===e.tag){var t=Is(e,134217728);if(null!==t)nc(t,e,134217728,ec());Vc(e,134217728)}},jt=function(e){if(13===e.tag){var t=tc(e),n=Is(e,t);if(null!==n)nc(n,e,t,ec());Vc(e,t)}},kt=function(){return vt},Nt=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}}
2,_e=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(s(90));$(r),Q(r,i)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ae=cc,Ce=uc;var eu={usingClientEntryPoint:!1,Events:[vi,bi,wi,Se,Ee,cc]},tu={findFiberByHostInstance:xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{it=ru.inject(nu),st=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jc(t))throw Error(s(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Jc(e))throw Error(s(299));var n=!1,r="",i=$c;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Uc(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,qr(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=null===(e=Ke(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Zc(t))throw Error(s(200));return Xc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Jc(e))throw Error(s(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",o=$c;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=qc(t,null,e,1,null!=n?n:null,i,0,a,o),e[fi]=t.current,qr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Gc(t)},t.render=function(e,t,n){if(!Zc(t))throw Error(s(200));return Xc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zc(e))throw Error(s(40));return!!e._reactRootContainer&&(uc(function(){Xc(null,null,e,!1,function(){e._reactRootContainer=null,e[fi]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zc(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return Xc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},2740:e=>{"use strict";e.exports=function(e,t,n,r,i,s,a,o){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,s,a,o],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},2777:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isSymbol=function(e){return"symbol"===typeof e||e instanceof Symbol}}
2,2799:(e,t,n)=>{"use strict";n.d(t,{Ng:()=>fo,J3:()=>ki,yq:()=>us,ZX:()=>$i,fH:()=>Vi,B2:()=>Wi,Kt:()=>Yi,Kw:()=>Oo});var r=n(3986),i=n(9379),s=n(6382);const a="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function l(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function c(e){if(!o(e))throw new Error("Uint8Array expected");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function u(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");l(e.outputLen),l(e.blockLen)}function d(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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 h(e,t){c(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let r=0;r<t.length;r++)t[r].fill(0)}function f(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function m(e,t){return e<<32-t|e>>>t}const g=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function y(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const x=g?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=y(e[t]);return e},v=(()=>"function"===typeof Uint8Array.from([]).toHex&&"function"===typeof Uint8Array.fromHex)(),b=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function w(e){if(c(e),v)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=b[e[n]];return t}const _=48,j=57,k=65,N=70,S=97,E=102;function A(e){return e>=_&&e<=j?e-_:e>=k&&e<=N?e-(k-10):e>=S&&e<=E?e-(S-10):void 0}function C(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);if(v)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const t=A(e.charCodeAt(s)),n=A(e.charCodeAt(s+1));if(void 0===t||void 0===n){const t=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+s)}r[i]=16*t+n}return r}function M(e){if("string"!==typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function T(e){return"string"===typeof e&&(e=M(e)),c(e),e}function P(){let e=0;for(let n=0;n<arguments.length;n++){const t=n<0||arguments.length<=n?void 0:arguments[n];c(t),e+=t.length}const t=new Uint8Array(e);for(let n=0,r=0;n<arguments.length;n++){const e=n<0||arguments.length<=n?void 0:arguments[n];t.set(e,r),r+=e.length}return t}class O{}function I(e){const t=t=>e().update(T(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(a&&"function"===typeof a.getRandomValues)return a.getRandomValues(new Uint8Array(e));if(a&&"function"===typeof a.randomBytes)return Uint8Array.from(a.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function R(e,t,n){return e&t^~e&n}function D(e,t,n){return e&t^e&n^t&n}class B extends O{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=f(this.buffer)}update(e){d(this),c(e=T(e));const{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let s=0;s<i;){const a=Math.min(r-this.pos,i-s);if(a===r){const t=f(e);for(;r<=i-s;s+=r)this.process(t,s);continue}n.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){d(this),h(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:s}=this;t[s++]=128,p(this.buffer.subarray(s)),this.padOffset>r-s&&(this.process(n,0),s=0);for(let u=s;u<r;u++)t[u]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),a=Number(n>>i&s),o=Number(n&s),l=r?4:0,c=r?0:4;e.setUint32(t+l,a,r),e.setUint32(t+c,o,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const a=f(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=o/4,c=this.get();if(l>c.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)a.setUint32(4*u,c[u],i)}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:i,destroyed:s,pos:a}=this;return e.destroyed=s,e.finished=i,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const F=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),U=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),z=BigInt(2**32-1),q=BigInt(32);function W(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&z),l:Number(e>>q&z)}:{h:0|Number(e>>q&z),l:0|Number(e&z)}}function H(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){const{h:n,l:a}=W(e[s],t);[r[s],i[s]]=[n,a]}return[r,i]}const K=(e,t,n)=>e>>>n,V=(e,t,n)=>e<<32-n|t>>>n,$=(e,t,n)=>e>>>
vendor: 3,255 bytes, line 2
2n|t<<32-n,Y=(e,t,n)=>e<<32-n|t>>>n,G=(e,t,n)=>e<<64-n|t>>>n-32,J=(e,t,n)=>e>>>n-32|t<<64-n,Z=(e,t,n)=>e<<n|t>>>32-n,Q=(e,t,n)=>t<<n|e>>>32-n,X=(e,t,n)=>t<<n-32|e>>>64-n,ee=(e,t,n)=>e<<n-32|t>>>64-n;function te(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}const ne=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),re=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,ie=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),se=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,ae=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),oe=(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0,le=Uint32Array.from([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]),ce=new Uint32Array(64);class ue extends B{constructor(){super(64,arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,8,!1),this.A=0|F[0],this.B=0|F[1],this.C=0|F[2],this.D=0|F[3],this.E=0|F[4],this.F=0|F[5],this.G=0|F[6],this.H=0|F[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:a,H:o}=this;return[e,t,n,r,i,s,a,o]}set(e,t,n,r,i,s,a,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|a,this.H=0|o}process(e,t){for(let u=0;u<16;u++,t+=4)ce[u]=e.getUint32(t,!1);for(let u=16;u<64;u++){const e=ce[u-15],t=ce[u-2],n=m(e,7)^m(e,18)^e>>>3,r=m(t,17)^m(t,19)^t>>>10;ce[u]=r+ce[u-7]+n+ce[u-16]|0}let{A:n,B:r,C:i,D:s,E:a,F:o,G:l,H:c}=this;for(let u=0;u<64;u++){const e=c+(m(a,6)^m(a,11)^m(a,25))+R(a,o,l)+le[u]+ce[u]|0,t=(m(n,2)^m(n,13)^m(n,22))+D(n,r,i)|0;c=l,l=o,o=a,a=s+e|0,s=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,o=o+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(n,r,i,s,a,o,l,c)}roundClean(){p(ce)}destroy(){this.set(0,0,0,0,0,0,0,0),p(this.buffer)}}const de=(()=>H(["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","0xf40e3585
25771202a","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))))(),he=(()=>de[0])(),pe=(()=>de[1])(),fe=new Uint32Array(80),me=new Uint32Array(80);class ge extends B{constructor(){super(128,arguments.length>0&&void 0!==arguments[0]?arguments[0]:64,16,!1),this.Ah=0|U[0],this.Al=0|U[1],this.Bh=0|U[2],this.Bl=0|U[3],this.Ch=0|U[4],this.Cl=0|U[5],this.Dh=0|U[6],this.Dl=0|U[7],this.Eh=0|U[8],this.El=0|U[9],this.Fh=0|U[10],this.Fl=0|U[11],this.Gh=0|U[12],this.Gl=0|U[13],this.Hh=0|U[14],this.Hl=0|U[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:a,Dl:o,Eh:l,El:c,Fh:u,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,n,r,i,s,a,o,l,c,u,d,h,p,f,m]}set(e,t,n,r,i,s,a,o,l,c,u,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|a,this.Dl=0|o,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let x=0;x<16;x++,t+=4)fe[x]=e.getUint32(t),me[x]=e.getUint32(t+=4);for(let x=16;x<80;x++){const e=0|fe[x-15],t=0|me[x-15],n=$(e,t,1)^$(e,t,8)^K(e,0,7),r=Y(e,t,1)^Y(e,t,8)^V(e,t,7),i=0|fe[x-2],s=0|me[x-2],a=$(i,s,19)^G(i,s,61)^K(i,0,6),o=Y(i,s,19)^J(i,s,61)^V(i,s,6),l=ie(r,o,me[x-7],me[x-16]),c=se(l,n,a,fe[x-7],fe[x-16]);fe[x]=0|c,me[x]=0|l}let{Ah:n,Al:r,Bh:i,Bl:s,Ch:a,Cl:o,Dh:l,Dl:c,Eh:u,El:d,Fh:h,Fl:p,Gh:f,Gl:m,Hh:g,Hl:y}=this;for(let x=0;x<80;x++){const e=$(u,d,14)^$(u,d,18)^G(u,d,41),t=Y(u,d,14)^Y(u,d,18)^J(u,d,41),v=u&h^~u&f,b=ae(y,t,d&p^~d&m,pe[x],me[x]),w=oe(b,g,e,v,he[x],fe[x]),_=0|b,j=$(n,r,28)^G(n,r,34)^G(n,r,39),k=Y(n,r,28)^J(n,r,34)^J(n,r,39),N=n&i^n&a^i&a,S=r&s^r&o^s&o;g=0|f,y=0|m,f=0|h,m=0|p,h=0|u,p=0|d,({h:u,l:d}=te(0|l,0|c,0|w,0|_)),l=0|a,c=0|o,a=0|i,o=0|s,i=0|n,s=0|r;const E=ne(_,k,S);n=re(E,w,j,N),r=0|E}({h:n,l:r}=te(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:s}=te(0|this.Bh,0|this.Bl,0|i,0|s)),({h:a,l:o}=te(0|this.Ch,0|this.Cl,0|a,0|o)),({h:l,l:c}=te(0|this.Dh,0|this.Dl,0|l,0|c)),({h:u,l:d}=te(0|this.Eh,0|this.El,0|u,0|d)),({h:h,l:p}=te(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:m}=te(0|this.Gh,0|this.Gl,0|f,0|m)),({h:g,l:y}=te(0|this.Hh,0|this.Hl,0|g,0|y)),this.set(n,r,i,s,a,o,l,c,u,d,h,p,f,m,g,y)}roundClean(){p(fe,me)}destroy(){p(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ye=I(()=>new ue),xe=I(()=>new ge),ve=BigInt(0),be=BigInt(1);function we(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("boolean"!==typeof e){const n=t&&'"'.concat(t,'"');throw new Error(n+"expected boolean, got type="+typeof e)}return e}function _e(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=o(e),i=null===e||void 0===e?void 0:e.length,s=void 0!==t;if(!r||s&&i!==t){const a=n&&'"'.concat(n,'" '),o=s?" of length ".concat(t):"",l=r?"length=".concat(i):"type=".concat(typeof e);throw new Error(a+"expected Uint8Array"+o+", got "+l)}return e}function je(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function ke(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?ve:BigInt("0x"+e)}function Ne(e){return ke(w(e))}function Se(e){return c(e),ke(w(Uint8Array.from(e).reverse()))}function Ee(e,t){return C(e.toString(16).padStart(2*t,"0"))}function Ae(e,t){return Ee(e,t).reverse()}function Ce(e,t,n){let r;if("string"===typeof t)try{r=C(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else{if(!o(t))throw new Error(e+" must be hex string or Uint8Array");r=Uint8Array.from(t)}const i=r.length;if("number"===typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r}function Me(e){return Uint8Array.from(e)}const Te=e=>"bigint"===typeof e&&ve<=e;function Pe(e,t,n,r){if(!function(e,t,n){return Te(e)&&Te(t)&&Te(n)&&t<=e&&e<n}(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Oe(e){let t;for(t=0;e>ve;e>>=be,t+=1);return t}const Ie=e=>(be<<BigInt(e))-be;function Le(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"object"!==typeof e)throw new Error("expected valid options object");function r(t,n,r){const i=e[t];if(r&&void 0===i)return;const s=typeof i;if(s!==n||null===i)throw new Error('param "'.concat(t,'" is invali
2d: expected ').concat(n,", got ").concat(s))}Object.entries(t).forEach(e=>{let[t,n]=e;return r(t,n,!1)}),Object.entries(n).forEach(e=>{let[t,n]=e;return r(t,n,!0)})}const Re=()=>{throw new Error("not implemented")};function De(e){const t=new WeakMap;return function(n){const r=t.get(n);if(void 0!==r)return r;for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];const o=e(n,...s);return t.set(n,o),o}}const Be=BigInt(0),Fe=BigInt(1),Ue=BigInt(2),ze=BigInt(3),qe=BigInt(4),We=BigInt(5),He=BigInt(7),Ke=BigInt(8),Ve=BigInt(9),$e=BigInt(16);function Ye(e,t){const n=e%t;return n>=Be?n:t+n}function Ge(e,t,n){let r=e;for(;t-- >Be;)r*=r,r%=n;return r}function Je(e,t){if(e===Be)throw new Error("invert: expected non-zero number");if(t<=Be)throw new Error("invert: expected positive modulus, got "+t);let n=Ye(e,t),r=t,i=Be,s=Fe,a=Fe,o=Be;for(;n!==Be;){const e=r/n,t=r%n,l=i-a*e,c=s-o*e;r=n,n=t,i=a,s=o,a=l,o=c}if(r!==Fe)throw new Error("invert: does not exist");return Ye(i,t)}function Ze(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Qe(e,t){const n=(e.ORDER+Fe)/qe,r=e.pow(t,n);return Ze(e,r,t),r}function Xe(e,t){const n=(e.ORDER-We)/Ke,r=e.mul(t,Ue),i=e.pow(r,n),s=e.mul(t,i),a=e.mul(e.mul(s,Ue),i),o=e.mul(s,e.sub(a,e.ONE));return Ze(e,o,t),o}function et(e){if(e<ze)throw new Error("sqrt is not defined for small field");let t=e-Fe,n=0;for(;t%Ue===Be;)t/=Ue,n++;let r=Ue;const i=lt(e);for(;1===at(i,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return Qe;let s=i.pow(r,t);const a=(t+Fe)/Ue;return function(e,r){if(e.is0(r))return r;if(1!==at(e,r))throw new Error("Cannot find square root");let i=n,o=e.mul(e.ONE,s),l=e.pow(r,t),c=e.pow(r,a);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,n=e.sqr(l);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const r=Fe<<BigInt(i-t-1),s=e.pow(o,r);i=t,o=e.sqr(s),l=e.mul(l,o),c=e.mul(c,s)}return c}}function tt(e){return e%qe===ze?Qe:e%Ke===We?Xe:e%$e===Ve?function(e){const t=lt(e),n=et(e),r=n(t,t.neg(t.ONE)),i=n(t,r),s=n(t,t.neg(r)),a=(e+He)/$e;return(e,t)=>{let n=e.pow(t,a),o=e.mul(n,r);const l=e.mul(n,i),c=e.mul(n,s),u=e.eql(e.sqr(o),t),d=e.eql(e.sqr(l),t);n=e.cmov(n,o,u),o=e.cmov(c,l,d);const h=e.eql(e.sqr(o),t),p=e.cmov(n,o,h);return Ze(e,p,t),p}}(e):et(e)}const nt=(e,t)=>(Ye(e,t)&Fe)===Fe,rt=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function it(e,t,n){if(n<Be)throw new Error("invalid exponent, negatives unsupported");if(n===Be)return e.ONE;if(n===Fe)return t;let r=e.ONE,i=t;for(;n>Be;)n&Fe&&(r=e.mul(r,i)),i=e.sqr(i),n>>=Fe;return r}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),s=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),s),r}function at(e,t){const n=(e.ORDER-Fe)/Ue,r=e.pow(t,n),i=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),a=e.eql(r,e.neg(e.ONE));if(!i&&!s&&!a)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function ot(e,t){void 0!==t&&l(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function lt(e,t){let n,r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=Be)throw new Error("invalid field: expected ORDER > 0, got "+e);let a,o=!1;if("object"===typeof t&&null!=t){if(s.sqrt||i)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(n=e.BITS),e.sqrt&&(r=e.sqrt),"boolean"===typeof e.isLE&&(i=e.isLE),"boolean"===typeof e.modFromBytes&&(o=e.modFromBytes),a=e.allowedLengths}else"number"===typeof t&&(n=t),s.sqrt&&(r=s.sqrt);const{nBitLength:l,nByteLength:c}=ot(e,n);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const d=Object.freeze({ORDER:e,isLE:i,BITS:l,BYTES:c,MASK:Ie(l),ZERO:Be,ONE:Fe,allowedLengths:a,create:t=>Ye(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return Be<=t&&t<e},is0:e=>e===Be,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&Fe)===Fe,neg:t=>Ye(-t,e),eql:(e,t)=>
2e===t,sqr:t=>Ye(t*t,e),add:(t,n)=>Ye(t+n,e),sub:(t,n)=>Ye(t-n,e),mul:(t,n)=>Ye(t*n,e),pow:(e,t)=>it(d,e,t),div:(t,n)=>Ye(t*Je(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Je(t,e),sqrt:r||(t=>(u||(u=tt(e)),u(d,t))),toBytes:e=>i?Ae(e,c):Ee(e,c),fromBytes:function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(a){if(!a.includes(t.length)||t.length>c)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+t.length);const e=new Uint8Array(c);e.set(t,i?0:e.length-t.length),t=e}if(t.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+t.length);let r=i?Se(t):Ne(t);if(o&&(r=Ye(r,e)),!n&&!d.isValid(r))throw new Error("invalid field element: outside of range 0..ORDER");return r},invertBatch:e=>st(d,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(d)}function ct(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 ut(e){const t=ct(e);return t+Math.ceil(t/2)}const dt=BigInt(0),ht=BigInt(1);function pt(e,t){const n=t.negate();return e?n:t}function ft(e,t){const n=st(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function mt(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function gt(e,t){mt(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:Ie(e),maxNumber:n,shiftBy:BigInt(e)}}function yt(e,t,n){const{windowSize:r,mask:i,maxNumber:s,shiftBy:a}=n;let o=Number(e&i),l=e>>a;o>r&&(o-=s,l+=ht);const c=t*r;return{nextN:l,offset:c+Math.abs(o)-1,isZero:0===o,isNeg:o<0,isNegF:t%2!==0,offsetF:c}}function xt(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function vt(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const bt=new WeakMap,wt=new WeakMap;function _t(e){return wt.get(e)||1}function jt(e){if(e!==dt)throw new Error("invalid wNAF")}class kt{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.ZERO,r=e;for(;t>dt;)t&ht&&(n=n.add(r)),r=r.double(),t>>=ht;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=gt(t,this.bits),i=[];let s=e,a=s;for(let o=0;o<n;o++){a=s,i.push(a);for(let e=1;e<r;e++)a=a.add(s),i.push(a);s=a.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,i=this.BASE;const s=gt(e,this.bits);for(let a=0;a<s.windows;a++){const{nextN:e,offset:o,isZero:l,isNeg:c,isNegF:u,offsetF:d}=yt(n,a,s);n=e,l?i=i.add(pt(u,t[d])):r=r.add(pt(c,t[o]))}return jt(n),{p:r,f:i}}wNAFUnsafe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.ZERO;const i=gt(e,this.bits);for(let s=0;s<i.windows&&n!==dt;s++){const{nextN:e,offset:a,isZero:o,isNeg:l}=yt(n,s,i);if(n=e,!o){const e=t[a];r=r.add(l?e.negate():e)}}return jt(n),r}
2getPrecomputes(e,t,n){let r=bt.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"===typeof n&&(r=n(r)),bt.set(t,r))),r}cached(e,t,n){const r=_t(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const i=_t(e);return 1===i?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){mt(t,this.bits),wt.set(e,t),bt.delete(e)}hasCache(e){return 1!==_t(e)}}function Nt(e,t,n,r){xt(n,e),vt(r,t);const i=n.length,s=r.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,o=Oe(BigInt(i));let l=1;o>12?l=o-3:o>4?l=o-2:o>0&&(l=2);const c=Ie(l),u=new Array(Number(c)+1).fill(a);let d=a;for(let h=Math.floor((t.BITS-1)/l)*l;h>=0;h-=l){u.fill(a);for(let t=0;t<s;t++){const e=r[t],i=Number(e>>BigInt(h)&c);u[i]=u[i].add(n[t])}let e=a;for(let t=u.length-1,n=a;t>0;t--)n=n.add(u[t]),e=e.add(n);if(d=d.add(e),0!==h)for(let t=0;t<l;t++)d=d.double()}return d}function St(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return function(e){const t=rt.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});Le(e,t)}(t),t}return lt(e,{isLE:n})}function Et(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(void 0===r&&(r="edwards"===e),!t||"object"!==typeof t)throw new Error("expected valid ".concat(e," CURVE object"));for(const o of["p","n","h"]){const e=t[o];if(!("bigint"===typeof e&&e>dt))throw new Error("CURVE.".concat(o," must be positive bigint"))}const i=St(t.p,n.Fp,r),s=St(t.n,n.Fn,r),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const o of a)if(!i.isValid(t[o]))throw new Error("CURVE.".concat(o," must be valid field element of CURVE.Fp"));return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}}const At=BigInt(0),Ct=BigInt(1),Mt=BigInt(2),Tt=BigInt(8);class Pt{constructor(e){this.ep=e}static fromBytes(e){Re()}static fromHex(e){Re()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return w(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.init(this.ep.precompute(e,t))}toRawBytes(){return this.toBytes()}}function Ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("function"!==typeof t)throw new Error('"hash" function param is required');Le(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:i,Fp:s,Fn:a}=e,l=n.randomBytes||L,c=n.adjustScalarBytes||(e=>e),u=n.domain||((e,t,n)=>{if(we(n,"phflag"),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function d(e){return a.create(Se(e))}function h(e){const{head:n,prefix:r,scalar:s}=function(e){const n=y.secretKey;e=Ce("private key",e,n);const r=Ce("hashed private key",t(e),2*n),i=c(r.slice(0,n));return{head:i,prefix:r.slice(n,2*n),scalar:d(i)}}(e),a=i.multiply(s),o=a.toBytes();return{head:n,prefix:r,scalar:s,point:a,pointBytes:o}}function p(e){return h(e).pointBytes}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uint8Array.of();for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];const a=P(...i);return d(t(u(a,Ce("context",e),!!r)))}const m={zip215:!0};const g=s.BYTES,y={secretKey:g,publicKey:g,signature:2*g,seed:g};function x(){return _e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:l(y.seed),y.seed,"seed")}const v={getExtendedPublicKey:h,randomSecretKey:x,isValidSecretKey:function(e){return o(e)&&e.length===a.BYTES},isValidPublicKey:function(t,n){try{return!!e.fromBytes(t,n)}catch(r){return!1}},toMontgomery(t){const{y:n}=e.fromBytes(t),r=y.publicKey,i=32===r;if(!i&&57!==r)throw new Error("only defined for 25519 and 448");const a=i?s.div(Ct+n,Ct-n):s.div(n-Ct,n+Ct);return s.toBytes(a)},toMontgomerySecret(e){const n=y.secretKey;_e(e,n);const r=t(e.subarray(0,n));return c(r).subarray(0,n)},randomPrivateKey:x,precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.BASE).precompute(t,!1)}};return Object.freeze({keygen:function(e){const t=v.randomSecretKey(e);return{secretKey:t,publicKey:p(t)}},getPublicKey:p,sign:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=Ce("message",e),r&&(e=r(e));const{prefix:s,scalar:o,pointBytes:l}=h(t),c=f(n.context,s,e),u=i.multiply(c).toBytes(),d=f(n.context,u,l,e),p=a.create(c+d*o);
2if(!a.isValid(p))throw new Error("sign failed: invalid s");return _e(P(u,a.toBytes(p)),y.signature,"result")},verify:function(t,n,s){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m;const{context:o,zip215:l}=a,c=y.signature;t=Ce("signature",t,c),n=Ce("message",n),s=Ce("publicKey",s,y.publicKey),void 0!==l&&we(l,"zip215"),r&&(n=r(n));const u=c/2,d=t.subarray(0,u),h=Se(t.subarray(u,c));let p,g,x;try{p=e.fromBytes(s,l),g=e.fromBytes(d,l),x=i.multiplyUnsafe(h)}catch(b){return!1}if(!l&&p.isSmallOrder())return!1;const v=f(o,g.toBytes(),p.toBytes(),n);return g.add(p.multiplyUnsafe(v)).subtract(x).clearCofactor().is0()},utils:v,Point:e,lengths:y})}function It(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:i}=function(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n={Fp:e.Fp,Fn:lt(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},r={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:n,hash:e.hash,eddsaOpts:r}}(e),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Et("edwards",e,t,t.FpFnLE),{Fp:r,Fn:i}=n;let s=n.CURVE;const{h:a}=s;Le(t,{},{uvRatio:"function"});const o=Mt<<BigInt(8*i.BYTES)-Ct,l=e=>r.create(e),c=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:r.sqrt(r.div(e,t))}}catch(n){return{isValid:!1,value:At}}});if(!function(e,t,n,r){const i=e.sqr(n),s=e.sqr(r),a=e.add(e.mul(t.a,i),s),o=e.add(e.ONE,e.mul(t.d,e.mul(i,s)));return e.eql(a,o)}(r,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function u(e,t){return Pe("coordinate "+e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2]?Ct:At,o),t}function d(e){if(!(e instanceof f))throw new Error("ExtendedPoint expected")}const h=De((e,t)=>{const{X:n,Y:i,Z:s}=e,a=e.is0();null==t&&(t=a?Tt:r.inv(s));const o=l(n*t),c=l(i*t),u=r.mul(s,t);if(a)return{x:At,y:Ct};if(u!==Ct)throw new Error("invZ was invalid");return{x:o,y:c}}),p=De(e=>{const{a:t,d:n}=s;if(e.is0())throw new Error("bad point: ZERO");const{X:r,Y:i,Z:a,T:o}=e,c=l(r*r),u=l(i*i),d=l(a*a),h=l(d*d),p=l(c*t);if(l(d*l(p+u))!==l(h+l(n*l(c*u))))throw new Error("bad point: equation left != right (1)");if(l(r*i)!==l(a*o))throw new Error("bad point: equation left != right (2)");return!0});class f{constructor(e,t,n,r){this.X=u("x",e),this.Y=u("y",t),this.Z=u("z",n,!0),this.T=u("t",r),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){if(e instanceof f)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return u("x",t),u("y",n),new f(t,n,Ct,l(t*n))}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=r.BYTES,{a:i,d:a}=s;e=Me(_e(e,n,"point")),we(t,"zip215");const u=Me(e),d=e[n-1];u[n-1]=-129&d;const h=Se(u),p=t?o:r.ORDER;Pe("point.y",h,At,p);const m=l(h*h),g=l(m-Ct),y=l(a*m-i);let{isValid:x,value:v}=c(g,y);if(!x)throw new Error("bad point: invalid y coordinate");const b=(v&Ct)===Ct,w=0!==(128&d);if(!t&&v===At&&w)throw new Error("bad point: x=0 and x_0=1");return w!==b&&(v=l(-v)),f.fromAffine({x:v,y:h})}static fromHex(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return f.fromBytes(Ce("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return m.createCache(this,e),t||this.multiply(Mt),this}assertValidity(){p(this)}equals(e){d(e);const{X:t,Y:n,Z:r}=this,{X:i,Y:s,Z:a}=e,o=l(t*a),c=l(i*r),u=l(n*a),h=l(s*r);return o===c&&u===h}is0(){return this.equals(f.ZERO)}negate(){return new f(l(-this.X),this.Y,this.Z,l(-this.T))}double(){const{a:e}=s,{X:t,Y:n,Z:r}=this,i=l(t*t),a=l(n*n),o=l(Mt*l(r*r)),c=l(e*i),u=t+n,d=l(l(u*u)-i-a),h=c+a,p=h-o,m=c-a,g=l(d*p),y=l(h*m),x=l(d*m),v=l(p*h);return new f(g,y,v,x)}add(e){d(e);const{a:t,d:n}=s,{X:r,Y:i,Z:a,T:o}=this,{X:c,Y:u,Z:h,T:p}=e,m=l(r*c),g=l(i*u),y=l(o*n*p),x=l(a*h),v=l((r+i)*(c+u)-m-g),b=x-y,w=x+y,_=l(g-t*m),j=l(v*b),k=l(w*_),N=l(v*_),S=l(b*w);return new f(j,k,S,N)}subtract(e){return this.add(e.negate())}multiply(e){if(!i.isValidNot0(e))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:t,f:n}=m.cached(this,e,e=>ft(f,e));return ft(f,[t,n])[0]}multiplyUnsafe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.ZERO;if(!i.isValid(e))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return e===At?f.ZERO:this.is0()||e===Ct?this:m.unsafe(this,e,e=>ft(f,e),t)}isSmallOrder(){return this.multiplyUnsafe(a).is0()}isTorsionFree(){return m.unsafe(this,s.n).is0()}toAffine(e){return h(this,e)}clearCofactor(){return a===Ct?this:this.multiplyUnsafe(a)}toBytes(){const{x:e,y:t}=this.toAffine(),n=r.toBytes(t);return n[n.length-1]|=e&Ct?128:0,n}toHex(){return w(this.toBytes())}toString(){return"<Point ".concat(this.is0()?"ZERO":this.toHex(),">")}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return ft(f,e)}static msm(e,t){return Nt(f,i,e,t)}
2_setWindowSize(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}f.BASE=new f(s.Gx,s.Gy,Ct,l(s.Gx*s.Gy)),f.ZERO=new f(At,Ct,Ct,At),f.Fp=r,f.Fn=i;const m=new kt(f,i.BITS);return f.BASE.precompute(8),f}(t,n);return function(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}(e,Ot(s,r,i))}M("HashToScalar-");const Lt=BigInt(0),Rt=BigInt(1),Dt=BigInt(2),Bt=(BigInt(3),BigInt(5)),Ft=BigInt(8),Ut=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),zt=(()=>({p:Ut,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Ft,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function qt(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),s=Ut,a=e*e%s*e%s,o=Ge(a,Dt,s)*a%s,l=Ge(o,Rt,s)*e%s,c=Ge(l,Bt,s)*l%s,u=Ge(c,t,s)*c%s,d=Ge(u,n,s)*u%s,h=Ge(d,r,s)*d%s,p=Ge(h,i,s)*h%s,f=Ge(p,i,s)*h%s,m=Ge(f,t,s)*c%s;return{pow_p_5_8:Ge(m,Dt,s)*e%s,b2:a}}function Wt(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ht=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Kt(e,t){const n=Ut,r=Ye(t*t*t,n),i=Ye(r*r*t,n);let s=Ye(e*r*qt(e*i).pow_p_5_8,n);const a=Ye(t*s*s,n),o=s,l=Ye(s*Ht,n),c=a===e,u=a===Ye(-e,n),d=a===Ye(-e*Ht,n);return c&&(s=o),(u||d)&&(s=l),nt(s,n)&&(s=Ye(-s,n)),{isValid:c||u,value:s}}const Vt=(()=>lt(zt.p,{isLE:!0}))(),$t=(()=>lt(zt.n,{isLE:!0}))(),Yt=(()=>(0,i.A)((0,i.A)({},zt),{},{Fp:Vt,hash:xe,adjustScalarBytes:Wt,uvRatio:Kt}))(),Gt=(()=>It(Yt))();const Jt=Ht,Zt=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),Qt=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),Xt=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),en=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),tn=e=>Kt(Rt,e),nn=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),rn=e=>Gt.Point.Fp.create(Se(e)&nn);function sn(e){const{d:t}=zt,n=Ut,r=e=>Vt.create(e),i=r(Jt*e*e),s=r((i+Rt)*Xt);let a=BigInt(-1);const o=r((a-t*i)*r(i+t));let{isValid:l,value:c}=Kt(s,o),u=r(c*e);nt(u,n)||(u=r(-u)),l||(c=u),l||(a=i);
2const d=r(a*(i-Rt)*en-o),h=c*c,p=r((c+c)*o),f=r(d*Zt),m=r(Rt-h),g=r(Rt+h);return new Gt.Point(r(p*g),r(m*f),r(f*g),r(p*m))}function an(e){c(e,64);const t=sn(rn(e.subarray(0,32))),n=sn(rn(e.subarray(32,64)));return new on(t.add(n))}class on extends Pt{constructor(e){super(e)}static fromAffine(e){return new on(Gt.Point.fromAffine(e))}assertSame(e){if(!(e instanceof on))throw new Error("RistrettoPoint expected")}init(e){return new on(e)}static hashToCurve(e){return an(Ce("ristrettoHash",e,64))}static fromBytes(e){c(e,32);const{a:t,d:n}=zt,r=Ut,i=e=>Vt.create(e),s=rn(e);if(!function(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}(Vt.toBytes(s),e)||nt(s,r))throw new Error("invalid ristretto255 encoding 1");const a=i(s*s),o=i(Rt+t*a),l=i(Rt-t*a),u=i(o*o),d=i(l*l),h=i(t*n*u-d),{isValid:p,value:f}=tn(i(h*d)),m=i(f*l),g=i(f*m*h);let y=i((s+s)*m);nt(y,r)&&(y=i(-y));const x=i(o*g),v=i(y*x);if(!p||nt(v,r)||x===Lt)throw new Error("invalid ristretto255 encoding 2");return new on(new Gt.Point(y,x,Rt,v))}static fromHex(e){return on.fromBytes(Ce("ristrettoHex",e,32))}static msm(e,t){return Nt(on,Gt.Point.Fn,e,t)}toBytes(){let{X:e,Y:t,Z:n,T:r}=this.ep;const i=Ut,s=e=>Vt.create(e),a=s(s(n+t)*s(n-t)),o=s(e*t),l=s(o*o),{value:c}=tn(s(a*l)),u=s(c*a),d=s(c*o),h=s(u*d*r);let p;if(nt(r*h,i)){let n=s(t*Jt),r=s(e*Jt);e=n,t=r,p=s(u*Qt)}else p=d;nt(e*h,i)&&(t=s(-t));let f=s((n-t)*p);return nt(f,i)&&(f=s(-f)),Vt.toBytes(f)}equals(e){this.assertSame(e);const{X:t,Y:n}=this.ep,{X:r,Y:i}=e.ep,s=e=>Vt.create(e),a=s(t*i)===s(n*r),o=s(n*i)===s(t*r);return a||o}is0(){return this.equals(on.ZERO)}}on.BASE=(()=>new on(Gt.Point.BASE))(),on.ZERO=(()=>new on(Gt.Point.ZERO))(),on.Fp=(()=>Vt)(),on.Fn=(()=>$t)();var ln=n(6373),cn=n.n(ln),un=n(5913),dn=n.n(un);const hn=ye;var pn=n(6060),fn=n(9328),mn=n(4705);const gn=["cause"];var yn=8078e3,xn=8078001,vn=8078004,bn=8078005,wn=8078006,_n=8078011;function jn(e){if(Array.isArray(e)){return"%5B"+e.map(jn).join("%2C%20")+"%5D"}return"bigint"===typeof e?"".concat(e,"n"):encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?(0,i.A)({},e):e))}function kn(e){let[t,n]=e;return"".concat(t,"=").concat(jn(n))}function Nn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};{let n="Solana error #".concat(e,"; Decode this error by running `npx @solana/errors decode -- ").concat(e);return Object.keys(t).length&&(n+=" '".concat(function(e){const t=Object.entries(e).map(kn).join("&");return btoa(t)}(t),"'")),"".concat(n,"`")}}var Sn=class extends Error{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let s,a,[o,l]=t;if(l){const{cause:e}=l,t=(0,r.A)(l,gn);e&&(a={cause:e}),Object.keys(t).length>0&&(s=t)}super(Nn(o,s),a),(0,mn.A)(this,"cause",this.cause),(0,mn.A)(this,"context",void 0),this.context=(0,i.A)({__code:o},s),this.name="SolanaError"}};function En(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function An(e){return Object.freeze((0,i.A)((0,i.A)({},e),{},{encode:t=>{const n=new Uint8Array(En(t,e));return e.write(t,n,0),n}}))}function Cn(e){return Object.freeze((0,i.A)((0,i.A)({},e),{},{decode:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.read(t,n)[0]}}))}function Mn(e){return"fixedSize"in e&&"number"===typeof e.fixedSize}function Tn(e,t){if(Mn(e)!==Mn(t))throw new Sn(vn);if(Mn(e)&&Mn(t)&&e.fixedSize!==t.fixedSize)throw new Sn(bn,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Mn(e)&&!Mn(t)&&e.maxSize!==t.maxSize)throw new Sn(wn,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return(0,i.A)((0,i.A)((0,i.A)({},t),e),{},{decode:t.decode,encode:e.encode,read:t.read,write:e.write})}function Pn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=n.length-r;if(i<t)throw new Sn(xn,{bytesLength:i,codecDescription:e,expected:t})}function On(e,t,n,r){if(r<t||r>n)throw new Sn(_n,{codecDescription:e,max:n,min:t,value:r})}function In(e){return 1!==(null===e||void 0===e?void 0:e.endian)}function Ln(e){return An({fixedSize:e.size,write(t,n,r){e.range&&On(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,In(e.config)),n.set(new Uint8Array(i),r),r+e.size}})}function Rn(e){return Cn({fixedSize:e.size,read(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.length-n<=0)throw new Sn(yn,{codecDescription:e})}(e.name,t,n),Pn(e.name,e.size,t,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(null!==t&&void 0!==t?t:0),i=null!==n&&void 0!==n?n:e.byteLength;return e.buffer.slice(r,r+i)}(t,n,e.size));return[e.get(r,In(e.config)),n+e.size]}})}var Dn=function(){return Ln({config:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8})},Bn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Tn(Dn(e),function(){return Rn({config:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8})}(e))};const Fn=["message","explanation"];class Un extends TypeError{constructor(e,t){let n;const{message:i,explanation:s}=e,a=(0,r.A)(e,Fn),{path:o}=e,l=0===o.length?i:"At path: ".concat(o.join(".")," -- ").concat(i);super(null!==s&&void 0!==s?s:l),null!=s&&(this.cause=l),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>null!==n&&void 0!==n?n:n=[e,...t()]}}function zn(e){return"object"===typeof e&&null!=e}function qn(e){return zn(e)&&!Array.isArray(e)}function Wn(e){return"symbol"===typeof e?e.toString():"string"===typeof e?JSON.stringify(e):"".concat(e)}function Hn(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"===typeof e&&(e={message:e});const{path:s,branch:a}=t,{type:o}=n,{refinement:l,message:c="Expected a value of type `".concat(o,"`").concat(l?" with refinement `".concat(l,"`"):"",", but received: `").concat(Wn(r),"`")}=e;return(0,i.A)((0,i.A)({value:r,type:o,refinement:l,key:s[s.length-1],path:s,branch:a},e),{},{message:c})}function*Kn(e,t,n,r){var i;zn(i=e)&&"function"===typeof i[Symbol.iterator]||(e=[e]);for(const s of e){const e=Hn(s,t,n,r);e&&(yield e)}}function Vn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:r=[],branch:i=[e],coerce:s=!1,mask:a=!1}=n,o={path:r,branch:i,mask:a};s&&(e=t.coercer(e,o));let l="valid";for(const c of t.validator(e,o))c.explanation=n.message,l="not_val
2id",yield[c,void 0];for(let[c,u,d]of t.entries(e,o)){const t=Vn(u,d,{path:void 0===c?r:[...r,c],branch:void 0===c?i:[...i,u],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&&(u=n[1],void 0===c?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):zn(e)&&(void 0!==u||c in e)&&(e[c]=u))}if("not_valid"!==l)for(const c of t.refiner(e,o))c.explanation=n.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,e])}()}class $n{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:s=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=s,this.validator=r?(e,t)=>Kn(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>Kn(i(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=Jn(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return Yn(e,this,t)}is(e){return Gn(e,this)}mask(e,t){return function(e,t,n){const r=Jn(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e){return Jn(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function Yn(e,t,n){const r=Jn(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function Gn(e,t){return!Jn(e,t)[0]}function Jn(e,t){const n=Vn(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(n);if(r[0]){return[new Un(r[0],function*(){for(const e of n)e[0]&&(yield e[0])}),void 0]}return[void 0,r[1]]}function Zn(e,t){return new $n({type:e,schema:null,validator:t})}function Qn(e){return new $n({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: ".concat(Wn(e))})}function Xn(){return Zn("boolean",e=>"boolean"===typeof e)}function er(e){return Zn("instance",t=>t instanceof e||"Expected a `".concat(e.name,"` instance, but received: ").concat(Wn(t)))}function tr(e){const t=Wn(e),n=typeof e;return new $n({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `".concat(t,"`, but received: ").concat(Wn(n))})}function nr(){return Zn("never",()=>!1)}function rr(e){return new $n((0,i.A)((0,i.A)({},e),{},{validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)}))}function ir(){return Zn("number",e=>"number"===typeof e&&!isNaN(e)||"Expected a number, but received: ".concat(Wn(e)))}function sr(e){return new $n((0,i.A)((0,i.A)({},e),{},{validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)}))}function ar(e,t){return new $n({type:"record",schema:null,*entries(n){if(zn(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>qn(e)||"Expected an object, but received: ".concat(Wn(e)),coercer:e=>qn(e)?(0,i.A)({},e):e})}function or(){return Zn("string",e=>"string"===typeof e||"Expected a string, but received: ".concat(Wn(e)))}function lr(e){const t=nr();return new $n({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||"Expected an array, but received: ".concat(Wn(e)),coercer:e=>Array.isArray(e)?e.slice():e})}function cr(e){const t=Object.keys(e);return new $n({type:"type",schema:e,*entries(n){if(zn(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>qn(e)||"Expected an object, but received: ".concat(Wn(e)),coercer:e=>qn(e)?(0,i.A)({},e):e})}function ur(e){const t=e.map(e=>e.type).join(" | ");return new $n({type:"union",schema:null,coercer(t,n){for(const r of e){const[e,i]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return i}return t},validator(n,r){const i=[];for(const t of e){const[...e]=Vn(n,t,r),[s]=e;if(!s[0])return[];for(const[t]of e)t&&i.push(t)}return["Expected the value to satisfy a union of `".concat(t,"`, but received: ").concat(Wn(n)),...i]}})}function dr(){return Zn("unknown",()=>!0)}function hr(e,t,n){return new $n((0,i.A)((0,i.A)({},e),{},{coercer:(r,i)=>Gn(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)}
2))}var pr=n(3861),fr=n.n(pr),mr=n(4493);const gr=["autoconnect","reconnect","reconnect_interval","max_reconnects"];var yr=class extends mr{constructor(e,t){super(),(0,mn.A)(this,"socket",void 0),this.socket=new window.WebSocket(e,t.protocols),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(i){r(i)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,n){this.socket.addEventListener(e,t,n)}};function xr(e,t){return new yr(e,t)}var vr=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},br=class extends mr{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ws://localhost:8080",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{autoconnect:s=!0,reconnect:a=!0,reconnect_interval:o=1e3,max_reconnects:l=5}=n,c=(0,r.A)(n,gr),u=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0;super(),(0,mn.A)(this,"address",void 0),(0,mn.A)(this,"rpc_id",void 0),(0,mn.A)(this,"queue",void 0),(0,mn.A)(this,"options",void 0),(0,mn.A)(this,"autoconnect",void 0),(0,mn.A)(this,"ready",void 0),(0,mn.A)(this,"reconnect",void 0),(0,mn.A)(this,"reconnect_timer_id",void 0),(0,mn.A)(this,"reconnect_interval",void 0),(0,mn.A)(this,"max_reconnects",void 0),(0,mn.A)(this,"rest_options",void 0),(0,mn.A)(this,"current_reconnects",void 0),(0,mn.A)(this,"generate_request_id",void 0),(0,mn.A)(this,"socket",void 0),(0,mn.A)(this,"webSocketFactory",void 0),(0,mn.A)(this,"dataPack",void 0),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=s,this.ready=!1,this.reconnect=a,this.reconnect_timer_id=void 0,this.reconnect_interval=o,this.max_reconnects=l,this.rest_options=c,this.current_reconnects=0,this.generate_request_id=u||(()=>"number"===typeof this.rpc_id?++this.rpc_id:Number(this.rpc_id)+1),this.dataPack=d||new vr,this.autoconnect&&this._connect(this.address,(0,i.A)({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,(0,i.A)({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((i,s)=>{if(!this.ready)return s(new Error("socket not ready"));const a=this.generate_request_id(e,t),o={jsonrpc:"2.0",method:e,params:t||void 0,id:a};this.socket.send(this.dataPack.encode(o),r,e=>{if(e)return s(e);this.queue[a]={promise:[i,s]},n&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],s(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 i={jsonrpc:"2.0",method:e,params:t};this.socket.send(this.dataPack.encode(i),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&&this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}getCurrentReconnects(){return this.current_reconnects}getMaxReconnects(){return this.max_reconnects}isReconnecting(){return void 0!==this.reconnect_timer_id}willReconnect(){return this.reconnect&&(0===this.max_reconnects||this.current_reconnects<this.max_reconnects)}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>
2{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",e=>{let{data:t}=e;t instanceof ArrayBuffer&&(t=s.Buffer.from(t).toString());try{t=this.dataPack.decode(t)}catch(n){return}if(t.notification&&this.listeners(t.notification).length){if(!Object.keys(t.params).length)return this.emit(t.notification);const e=[t.notification];if(t.params.constructor===Object)e.push(t.params);else for(let n=0;n<t.params.length;n++)e.push(t.params[n]);return Promise.resolve().then(()=>{this.emit.apply(this,e)})}if(!this.queue[t.id])return t.method?Promise.resolve().then(()=>{var e;this.emit(t.method,null===(e=t)||void 0===e?void 0:e.params)}):void 0;"error"in t==="result"in t&&this.queue[t.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[t.id].timeout&&clearTimeout(this.queue[t.id].timeout),t.error?this.queue[t.id].promise[1](t.error):this.queue[t.id].promise[0](t.result),delete this.queue[t.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",n=>{let{code:r,reason:i}=n;this.ready&&setTimeout(()=>
vendor: 4,648 bytes, line 2
2this.emit("close",r,i),0),this.ready=!1,this.socket=void 0,1e3!==r&&(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):this.reconnect&&this.max_reconnects>0&&this.current_reconnects>=this.max_reconnects&&setTimeout(()=>this.emit("max_reconnects_reached",r,i),1))})}};const wr=BigInt(0),_r=BigInt(1),jr=BigInt(2),kr=BigInt(7),Nr=BigInt(256),Sr=BigInt(113),Er=[],Ar=[],Cr=[];for(let Io=0,Lo=_r,Ro=1,Do=0;Io<24;Io++){[Ro,Do]=[Do,(2*Ro+3*Do)%5],Er.push(2*(5*Do+Ro)),Ar.push((Io+1)*(Io+2)/2%64);let e=wr;for(let t=0;t<7;t++)Lo=(Lo<<_r^(Lo>>kr)*Sr)%Nr,Lo&jr&&(e^=_r<<(_r<<BigInt(t))-_r);Cr.push(e)}const Mr=H(Cr,!0),Tr=Mr[0],Pr=Mr[1],Or=(e,t,n)=>n>32?X(e,t,n):Z(e,t,n),Ir=(e,t,n)=>n>32?ee(e,t,n):Q(e,t,n);class Lr extends O{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,l(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}clone(){return this._cloneInto()}keccak(){x(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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,i=(r+2)%10,s=n[i],a=n[i+1],o=Or(s,a,1)^n[t],l=Ir(s,a,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=o,e[r+n+1]^=l}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=Ar[n],s=Or(t,i,r),a=Ir(t,i,r),o=Er[n];t=e[o],i=e[o+1],e[o]=s,e[o+1]=a}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]^=Tr[r],e[1]^=Pr[r]}p(n)}(this.state32,this.rounds),x(this.state32),this.posOut=0,this.pos=0}update(e){d(this),c(e=T(e));const{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){const s=Math.min(t-this.pos,r-i);for(let t=0;t<s;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){d(this,!1),c(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return l(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(h(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,p(this.state)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new Lr(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}const Rr=(e,t,n)=>I(()=>new Lr(t,e,n)),Dr=(()=>Rr(1,136,32))();class Br extends O{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,u(e);const n=T(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,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=e.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),p(i)}update(e){return d(this),this.iHash.update(e),this}digestInto(e){d(this),c(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:i,blockLen:s,outputLen:a}=this;return e.finished=r,e.destroyed=i,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}
2const Fr=(e,t,n)=>new Br(e,t).update(n).digest();Fr.create=(e,t)=>new Br(e,t);const Ur=(e,t)=>(e+(e>=0?t:-t)/$r)/t;function zr(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function qr(e,t){const n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return we(n.lowS,"lowS"),we(n.prehash,"prehash"),void 0!==n.format&&zr(n.format),n}class Wr extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}}const Hr={Err:Wr,_tlv:{encode:(e,t)=>{const{Err:n}=Hr;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=je(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?je(i.length/2|128):"";return je(e)+s+i+t},decode(e,t){const{Err:n}=Hr;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++];let s=0;if(!!(128&i)){const e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const a=t.subarray(r,r+e);if(a.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===a[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of a)s=s<<8|t;if(r+=e,s<128)throw new n("tlv.decode(long): not minimal encoding")}else s=i;const a=t.subarray(r,r+s);if(a.length!==s)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+s)}}},_int:{encode(e){const{Err:t}=Hr;if(e<Kr)throw new t("integer: negative integers are not allowed");let n=je(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Hr;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return Ne(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=Hr,i=Ce("signature",e),{v:s,l:a}=r.decode(48,i);if(a.length)throw new t("invalid signature: left bytes after parsing");const{v:o,l:l}=r.decode(2,s),{v:c,l:u}=r.decode(2,l);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(o),s:n.decode(c)}},hexFromSig(e){const{_tlv:t,_int:n}=Hr,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}},Kr=BigInt(0),Vr=BigInt(1),$r=BigInt(2),Yr=BigInt(3),Gr=BigInt(4);function Jr(e,t){const{BYTES:n}=e;let r;if("bigint"===typeof t)r=t;else{let s=Ce("private key",t);try{r=e.fromBytes(s)}catch(i){throw new Error("invalid private key: expected ui8a of size ".concat(n,", got ").concat(typeof t))}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function Zr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Et("weierstrass",e,t),{Fp:r,Fn:i}=n;let s=n.CURVE;const{h:a,n:o}=s;Le(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:l}=t;if(l&&(!r.is0(s.a)||"bigint"!==typeof l.beta||!Array.isArray(l.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const c=Xr(r,i);function u(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const d=t.toBytes||function(e,t,n){const{x:i,y:s}=t.toAffine(),a=r.toBytes(i);if(we(n,"isCompressed"),n){u();return P(Qr(!r.isOdd(s)),a)}return P(Uint8Array.of(4),a,r.toBytes(s))},h=t.fromBytes||function(e){_e(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:n}=c,i=e.length,s=e[0],a=e.subarray(1);if(i!==t||2!==s&&3!==s){if(i===n&&4===s){const e=r.BYTES,t=r.fromBytes(a.subarray(0,e)),n=r.fromBytes(a.subarray(e,2*e));if(!f(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error("bad point: got length ".concat(i,", expected compressed=").concat(t," or uncompressed=").concat(n))}{const e=r.fromBytes(a);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=p(e);let n;try{n=r.sqrt(t)}catch(o){const e=o instanceof Error?": "+o.message:"";throw new Error("bad point: is not on curve, sqrt error"+e)}u();return 1===(1&s)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}};function p(e){const t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,s.a)),s.b)}function f(e,t){const n=r.sqr(t),i=p(e);return r.eql(n,i)}if(!f(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const m=r.mul(r.pow(s.a,Yr),Gr),g=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(m,g)))throw new Error("bad curve params: a or b");function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!r.isValid(t)||n&&r.is0(t))throw new Error("bad point coordinate ".concat(e));return t}function x(e){if(!(e instanceof k))throw new Error("ProjectivePoint expected")}function v(e){if(!l||!l.basises)throw new Error("no endo");return function(e,t,n){const[[r,i],[s,a]]=t,o=Ur(a*e,n),l=Ur(-i*e,n);let c=e-o*r-l*s,u=-o*i-l*a;const d=c<Kr,h=u<Kr;d&&(c=-c),h&&(u=-u);const p=Ie(Math.ceil(Oe(n)/2))+Vr;if(c<Kr||c>=p||u<Kr||u>=p)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:c,k2neg:h,k2:u}}(e,l.basises,i.ORDER)}const b=De((e,t)=>
2{const{X:n,Y:i,Z:s}=e;if(r.eql(s,r.ONE))return{x:n,y:i};const a=e.is0();null==t&&(t=a?r.ONE:r.inv(s));const o=r.mul(n,t),l=r.mul(i,t),c=r.mul(s,t);if(a)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:o,y:l}}),_=De(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!f(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function j(e,t,n,i,s){return n=new k(r.mul(n.X,e),n.Y,n.Z),t=pt(i,t),n=pt(s,n),t.add(n)}class k{constructor(e,t,n){this.X=y("x",e),this.Y=y("y",t,!0),this.Z=y("z",n),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof k)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?k.ZERO:new k(t,n,r.ONE)}static fromBytes(e){const t=k.fromAffine(h(_e(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return k.fromBytes(Ce("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return S.createCache(this,e),t||this.multiply(Yr),this}assertValidity(){_(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){x(e);const{X:t,Y:n,Z:i}=this,{X:s,Y:a,Z:o}=e,l=r.eql(r.mul(t,o),r.mul(s,i)),c=r.eql(r.mul(n,o),r.mul(a,i));return l&&c}negate(){return new k(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=s,n=r.mul(t,Yr),{X:i,Y:a,Z:o}=this;let l=r.ZERO,c=r.ZERO,u=r.ZERO,d=r.mul(i,i),h=r.mul(a,a),p=r.mul(o,o),f=r.mul(i,a);return f=r.add(f,f),u=r.mul(i,o),u=r.add(u,u),l=r.mul(e,u),c=r.mul(n,p),c=r.add(l,c),l=r.sub(h,c),c=r.add(h,c),c=r.mul(l,c),l=r.mul(f,l),u=r.mul(n,u),p=r.mul(e,p),f=r.sub(d,p),f=r.mul(e,f),f=r.add(f,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,p),d=r.mul(d,f),c=r.add(c,d),p=r.mul(a,o),p=r.add(p,p),d=r.mul(p,f),l=r.sub(l,d),u=r.mul(p,h),u=r.add(u,u),u=r.add(u,u),new k(l,c,u)}add(e){x(e);const{X:t,Y:n,Z:i}=this,{X:a,Y:o,Z:l}=e;let c=r.ZERO,u=r.ZERO,d=r.ZERO;const h=s.a,p=r.mul(s.b,Yr);let f=r.mul(t,a),m=r.mul(n,o),g=r.mul(i,l),y=r.add(t,n),v=r.add(a,o);y=r.mul(y,v),v=r.add(f,m),y=r.sub(y,v),v=r.add(t,i);let b=r.add(a,l);return v=r.mul(v,b),b=r.add(f,g),v=r.sub(v,b),b=r.add(n,i),c=r.add(o,l),b=r.mul(b,c),c=r.add(m,g),b=r.sub(b,c),d=r.mul(h,v),c=r.mul(p,g),d=r.add(c,d),c=r.sub(m,d),d=r.add(m,d),u=r.mul(c,d),m=r.add(f,f),m=r.add(m,f),g=r.mul(h,g),v=r.mul(p,v),m=r.add(m,g),g=r.sub(f,g),g=r.mul(h,g),v=r.add(v,g),f=r.mul(m,v),u=r.add(u,f),f=r.mul(b,v),c=r.mul(y,c),c=r.sub(c,f),f=r.mul(y,m),d=r.mul(b,d),d=r.add(d,f),new k(c,u,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(k.ZERO)}multiply(e){const{endo:n}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,s;const a=e=>S.cached(this,e,e=>ft(k,e));if(n){const{k1neg:t,k1:i,k2neg:o,k2:l}=v(e),{p:c,f:u}=a(i),{p:d,f:h}=a(l);s=u.add(h),r=j(n.beta,c,d,t,o)}else{const{p:t,f:n}=a(e);r=t,s=n}return ft(k,[r,s])[0]}multiplyUnsafe(e){const{endo:n}=t,r=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===Kr||r.is0())return k.ZERO;if(e===Vr)return r;if(S.hasCache(this))return this.multiply(e);if(n){const{k1neg:t,k1:i,k2neg:s,k2:a}=v(e),{p1:o,p2:l}=function(e,t,n,r){let i=t,s=e.ZERO,a=e.ZERO;for(;n>dt||r>dt;)n&ht&&(s=s.add(i)),r&ht&&(a=a.add(i)),i=i.double(),n>>=ht,r>>=ht;return{p1:s,p2:a}}(k,r,i,a);return j(n.beta,o,l,t,s)}return S.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return b(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return a===Vr||(e?e(k,this):S.unsafe(this,o).is0())}clearCofactor(){const{clearCofactor:e}=t;return a===Vr?this:e?e(k,this):this.multiplyUnsafe(a)}isSmallOrder(){return this.multiplyUnsafe(a).is0()}toBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return we(e,"isCompressed"),this.assertValidity(),d(k,this,e)}toHex(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return w(this.toBytes(e))}toString(){return"<Point ".concat(this.is0()?"ZERO":this.toHex(),">")}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.toBytes(e)}
2_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return ft(k,e)}static msm(e,t){return Nt(k,i,e,t)}static fromPrivateKey(e){return k.BASE.multiply(Jr(i,e))}}k.BASE=new k(s.Gx,s.Gy,r.ONE),k.ZERO=new k(r.ZERO,r.ONE,r.ZERO),k.Fp=r,k.Fn=i;const N=i.BITS,S=new kt(k,t.endo?Math.ceil(N/2):N);return k.BASE.precompute(8),k}function Qr(e){return Uint8Array.of(e?2:3)}function Xr(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function ei(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{Fn:n}=e,r=t.randomBytes||L,i=Object.assign(Xr(e.Fp,n),{seed:ut(n.ORDER)});function s(e){try{return!!Jr(n,e)}catch(t){return!1}}function a(){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.length,i=ct(t),s=ut(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const a=Ye(n?Se(e):Ne(e),t-Fe)+Fe;return n?Ae(a,i):Ee(a,i)}(_e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r(i.seed),i.seed,"seed"),n.ORDER)}function o(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.BASE.multiply(Jr(n,t)).toBytes(r)}function l(t){if("bigint"===typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:s,publicKeyUncompressed:a}=i;if(n.allowedLengths||r===s)return;const o=Ce("key",t).length;return o===s||o===a}const c={isValidSecretKey:s,isValidPublicKey:function(t,n){const{publicKey:r,publicKeyUncompressed:s}=i;try{const i=t.length;return(!0!==n||i===r)&&((!1!==n||i===s)&&!!e.fromBytes(t))}catch(a){return!1}},randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:e=>Jr(n,e),precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.BASE).precompute(t,!1)}};return Object.freeze({getPublicKey:o,getSharedSecret:function(t,r){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!0===l(t))throw new Error("first arg must be private key");if(!1===l(r))throw new Error("second arg must be public key");const s=Jr(n,t);return e.fromHex(r).multiply(s).toBytes(i)},keygen:function(e){const t=a(e);return{secretKey:t,publicKey:o(t)}},Point:e,utils:c,lengths:i})}function ti(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(t),Le(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||L,i=n.hmac||function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Fr(t,e,P(...r))},{Fp:s,Fn:a}=e,{ORDER:l,BITS:c}=a,{keygen:d,getPublicKey:h,getSharedSecret:p,utils:f,lengths:m}=ei(e,n),g={prehash:!1,lowS:"boolean"===typeof n.lowS&&n.lowS,format:void 0,extraEntropy:!1},y="compact";function x(e){return e>l>>Vr}function v(e,t){if(!a.isValidNot0(t))throw new Error("invalid signature ".concat(e,": out of range 1..Point.Fn.ORDER"));return t}class b{constructor(e,t,n){this.r=v("r",e),this.s=v("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;if(function(e,t){zr(t);const n=m.signature;_e(e,"compact"===t?n:"recovered"===t?n+1:void 0,"".concat(t," signature"))}(e,n),"der"===n){const{r:t,s:n}=Hr.toSig(_e(e));return new b(t,n)}"recovered"===n&&(t=e[0],n="compact",e=e.subarray(1));const r=a.BYTES,i=e.subarray(0,r),s=e.subarray(r,2*r);return new b(a.fromBytes(i),a.fromBytes(s),t)}static fromHex(e,t){return this.fromBytes(C(e),t)}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(t){const n=s.ORDER,{r:r,s:i,recovery:o}=this;if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");if(l*$r<n&&o>1)throw new Error("recovery id is ambiguous for h>1 curve");const c=2===o||3===o?r+l:r;if(!s.isValid(c))throw new Error("recovery id 2 or 3 invalid");const u=s.toBytes(c),d=e.fromBytes(P(Qr(0===(1&o)),u)),h=a.inv(c),p=j(Ce("msgHash",t)),f=a.create(-p*h),m=a.create(i*h),g=e.BASE.multiplyUnsafe(f).add(d.multiplyUnsafe(m));if(g.is0())throw new Error("point at infinify");return g.assertValidity(),g}
2hasHighS(){return x(this.s)}toBytes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;if(zr(e),"der"===e)return C(Hr.hexFromSig(this));const t=a.toBytes(this.r),n=a.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return P(Uint8Array.of(this.recovery),t,n)}return P(t,n)}toHex(e){return w(this.toBytes(e))}assertValidity(){}static fromCompact(e){return b.fromBytes(Ce("sig",e),"compact")}static fromDER(e){return b.fromBytes(Ce("sig",e),"der")}normalizeS(){return this.hasHighS()?new b(this.r,a.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return w(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return w(this.toBytes("compact"))}}const _=n.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=Ne(e),n=8*e.length-c;return n>0?t>>BigInt(n):t},j=n.bits2int_modN||function(e){return a.create(_(e))},k=Ie(c);function N(e){return Pe("num < 2^"+c,e,Kr,k),a.toBytes(e)}function S(e,n){return _e(e,void 0,"message"),n?_e(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:d,getPublicKey:h,getSharedSecret:p,utils:f,lengths:m,Point:e,sign:function(n,s){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=Ce("message",n);const{seed:l,k2sig:c}=function(t,n,i){if(["recovered","canonical"].some(e=>e in i))throw new Error("sign() legacy options not supported");const{lowS:s,prehash:o,extraEntropy:l}=qr(i,g);t=S(t,o);const c=j(t),u=Jr(a,n),d=[N(u),N(c)];if(null!=l&&!1!==l){const e=!0===l?r(m.secretKey):l;d.push(Ce("extraEntropy",e))}const h=P(...d),p=c;return{seed:h,k2sig:function(t){const n=_(t);if(!a.isValidNot0(n))return;const r=a.inv(n),i=e.BASE.multiply(n).toAffine(),o=a.create(i.x);if(o===Kr)return;const l=a.create(r*a.create(p+o*u));if(l===Kr)return;let c=(i.x===o?0:2)|Number(i.y&Vr),d=l;return s&&x(l)&&(d=a.neg(l),c^=1),new b(o,d,c)}}}(n,s,o),u=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");const r=e=>new Uint8Array(e),i=e=>Uint8Array.of(e);let s=r(e),a=r(e),o=0;const l=()=>{s.fill(1),a.fill(0),o=0},c=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(a,s,...t)},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r(0);a=c(i(0),e),s=c(),0!==e.length&&(a=c(i(1),e),s=c())},d=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){s=c();const t=s.slice();n.push(t),e+=s.length}return P(...n)};return(e,t)=>{let n;for(l(),u(e);!(n=t(d()));)u();return l(),n}}(t.outputLen,a.BYTES,i);return u(l,c)},verify:function(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{lowS:s,prehash:l,format:c}=qr(i,g);if(r=Ce("publicKey",r),n=S(Ce("message",n),l),"strict"in i)throw new Error("options.strict was renamed to lowS");const u=void 0===c?function(e){let t;const n="string"===typeof e||o(e),r=!n&&null!==e&&"object"===typeof e&&"bigint"===typeof e.r&&"bigint"===typeof e.s;if(!n&&!r)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new b(e.r,e.s);else if(n){try{t=b.fromBytes(Ce("sig",e),"der")}catch(i){if(!(i instanceof Hr.Err))throw i}if(!t)try{t=b.fromBytes(Ce("sig",e),"compact")}catch(s){return!1}}return t||!1}(t):b.fromBytes(Ce("sig",t),c);if(!1===u)return!1;try{const t=e.fromBytes(r);if(s&&u.hasHighS())return!1;const{r:i,s:o}=u,l=j(n),c=a.inv(o),d=a.create(l*c),h=a.create(i*c),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(h));if(p.is0())return!1;return a.create(p.x)===i}catch(d){return!1}},recoverPublicKey:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{prehash:r}=qr(n,g);return t=S(t,r),b.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:b,hash:t})}function ni(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;
2return{CURVE:t,curveOpts:{Fp:n,Fn:lt(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function ri(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=function(e){const{CURVE:t,curveOpts:n}=ni(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,ot(n.Fn.ORDER,n.Fn.BITS))})}(e,ti(Zr(t,n),r,i))}const ii={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},si={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},ai=BigInt(2);const oi=lt(ii.p,{sqrt:function(e){const t=ii.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),o=BigInt(44),l=BigInt(88),c=e*e*e%t,u=c*c*e%t,d=Ge(u,n,t)*u%t,h=Ge(d,n,t)*u%t,p=Ge(h,ai,t)*c%t,f=Ge(p,i,t)*p%t,m=Ge(f,s,t)*f%t,g=Ge(m,o,t)*m%t,y=Ge(g,l,t)*g%t,x=Ge(y,o,t)*m%t,v=Ge(x,n,t)*u%t,b=Ge(v,a,t)*f%t,w=Ge(b,r,t)*c%t,_=Ge(w,ai,t);if(!oi.eql(oi.sqr(_),e))throw new Error("Cannot find square root");return _}}),li=function(e,t){const n=t=>ri((0,i.A)((0,i.A)({},e),{},{hash:t}));return(0,i.A)((0,i.A)({},n(t)),{},{create:n})}((0,i.A)((0,i.A)({},ii),{},{Fp:oi,lowS:!0,endo:si}),ye);const ci=["commitment"],ui=["encoding"],di=["commitment"],hi=["commitment"],pi=(Gt.utils.randomPrivateKey,()=>{const e=Gt.utils.randomPrivateKey(),t=fi(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),{publicKey:t,secretKey:n}}),fi=Gt.getPublicKey;function mi(e){try{return Gt.ExtendedPoint.fromHex(e),!0}catch(t){return!1}}const gi=(e,t)=>Gt.sign(e,t.slice(0,32)),yi=Gt.verify,xi=e=>s.Buffer.isBuffer(e)?e:e instanceof Uint8Array?s.Buffer.from(e.buffer,e.byteOffset,e.byteLength):s.Buffer.from(e);class vi{constructor(e){Object.assign(this,e)}encode(){return s.Buffer.from((0,pn.serialize)(bi,this))}static decode(e){return(0,pn.deserialize)(bi,this,e)}static decodeUnchecked(e){return(0,pn.deserializeUnchecked)(bi,this,e)}}const bi=new Map;var wi;const _i=32;let ji=1;class ki extends vi{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=dn().decode(e);if(t.length!=_i)throw new Error("Invalid public key input");this._bn=new(cn())(t)}else this._bn=new(cn())(e);if(this._bn.byteLength()>_i)throw new Error("Invalid public key input")}}static unique(){const e=new ki(ji);return ji+=1,new ki(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return dn().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(s.Buffer);if(e.length===_i)return e;const t=s.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return"PublicKey(".concat(this.toString(),")")}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=s.Buffer.concat([e.toBuffer(),s.Buffer.from(t),n.toBuffer()]),i=hn(r);return new ki(i)}static createProgramAddressSync(e,t){let n=s.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");n=s.Buffer.concat([n,xi(e)])}),n=s.Buffer.concat([n,t.toBuffer(),s.Buffer.from("ProgramDerivedAddress")]);const r=hn(n);if(mi(r))throw new Error("Invalid seeds, address must fall off the curve");return new ki(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(s.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 mi(new ki(e).toBytes())}}wi=ki,ki.default=new wi("11111111111111111111111111111111"),bi.set(ki,{kind:"struct",fields:[["_bn","u256"]]});new ki("BPFLoader1111111111111111111111111111111111");const Ni=1232;
2class Si extends Error{constructor(e){super("Signature ".concat(e," has expired: block height exceeded.")),this.signature=void 0,this.signature=e}}Object.defineProperty(Si.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Ei extends Error{constructor(e,t){super("Transaction was not confirmed in ".concat(t.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(e," using the Solana Explorer or CLI tools.")),this.signature=void 0,this.signature=e}}Object.defineProperty(Ei.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Ai extends Error{constructor(e){super("Signature ".concat(e," has expired: the nonce is no longer valid.")),this.signature=void 0,this.signature=e}}Object.defineProperty(Ai.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Ci{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 Mi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return fn.av(32,e)},Ti=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature";return fn.av(64,e)},Pi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string";const t=fn.w3([fn.DH("length"),fn.DH("lengthPadding"),fn.av(fn.cY(fn.DH(),-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:s.Buffer.from(e,"utf8")};return r(i,t,n)},i.alloc=e=>fn.DH().span+fn.DH().span+s.Buffer.from(e,"utf8").length,i};function Oi(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 Oi({layout:e},t[e.property]);return 0};let r=0;return e.layout.fields.forEach(e=>{r+=n(e)}),r}function Ii(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 Li(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 Ri(e,t){if(!e)throw new Error(t||"Assertion failed")}class Di{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},i=r(t);i.isSigner=!0,i.isWritable=!0;for(const s of e){r(s.programId).isInvoked=!0;for(const e of s.keys){const t=r(e.pubkey);t.isSigner||(t.isSigner=e.isSigner),t.isWritable||(t.isWritable=e.isWritable)}}return new Di(t,n)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];Ri(e.length<=256,"Max static account keys length exceeded");const t=e.filter(e=>{let[,t]=e;return t.isSigner&&t.isWritable}),n=e.filter(e=>{let[,t]=e;return t.isSigner&&!t.isWritable}),r=e.filter(e=>{let[,t]=e;return!t.isSigner&&t.isWritable}),i=e.filter(e=>{let[,t]=e;return!t.isSigner&&!t.isWritable}),s={numRequiredSignatures:t.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:i.length};{Ri(t.length>0,"Expected at least one writable signer key");const[e]=t[0];Ri(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}return[s,[...t.map(e=>{let[t]=e;return new ki(t)}),...n.map(e=>{let[t]=e;return new ki(t)}),...r.map(e=>{let[t]=e;return new ki(t)}),...i.map(e=>{let[t]=e;return new ki(t)})]]}extractTableLookup(e){const[t,n]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&e.isWritable),[r,i]=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:i}]}drainKeysFoundInLookupTable(e,t){const n=new Array,r=new Array;for(const[i,s]of this.keyMetaMap.entries())if(t(s)){const t=new ki(i),s=e.findIndex(e=>e.equals(t));s>=0&&(Ri(s<256,"Max lookup table index exceeded"),n.push(s),r.push(t),this.keyMetaMap.delete(i))}return[n,r]}}const Bi="Reached end of buffer unexpectedly";function Fi(e){if(0===e.length)throw new Error(Bi);return e.shift()}function Ui(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const[s]=r;if(2===r.length?s+(null!==(t=r[1])&&void 0!==t?t:0)>e.length:s>=e.length)throw new Error(Bi);return e.splice(...r)}class zi{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 ki(e)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(e
2=>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:dn().decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Ci(this.staticAccountKeys)}static compile(e){const t=Di.compile(e.instructions,e.payerKey),[n,r]=t.getMessageComponents(),i=new Ci(r).compileInstructions(e.instructions).map(e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:dn().encode(e.data)}));return new zi({header:n,accountKeys:r,recentBlockhash:e.recentBlockhash,instructions:i})}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=[];Li(t,e);const n=this.instructions.map(e=>{const{accounts:t,programIdIndex:n}=e,r=Array.from(dn().decode(e.data));let i=[];Li(i,t.length);let a=[];return Li(a,r.length),{programIdIndex:n,keyIndicesCount:s.Buffer.from(i),keyIndices:t,dataLength:s.Buffer.from(a),data:r}});let r=[];Li(r,n.length);let i=s.Buffer.alloc(Ni);s.Buffer.from(r).copy(i);let a=r.length;n.forEach(e=>{const t=fn.w3([fn.u8("programIdIndex"),fn.av(e.keyIndicesCount.length,"keyIndicesCount"),fn.O6(fn.u8("keyIndex"),e.keyIndices.length,"keyIndices"),fn.av(e.dataLength.length,"dataLength"),fn.O6(fn.u8("userdatum"),e.data.length,"data")]).encode(e,i,a);a+=t}),i=i.slice(0,a);const o=fn.w3([fn.av(1,"numRequiredSignatures"),fn.av(1,"numReadonlySignedAccounts"),fn.av(1,"numReadonlyUnsignedAccounts"),fn.av(t.length,"keyCount"),fn.O6(Mi("key"),e,"keys"),Mi("recentBlockhash")]),l={numRequiredSignatures:s.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:s.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:s.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:s.Buffer.from(t),keys:this.accountKeys.map(e=>xi(e.toBytes())),recentBlockhash:dn().decode(this.recentBlockhash)};let c=s.Buffer.alloc(2048);const u=o.encode(l,c);return i.copy(c,u),c.slice(0,u+i.length)}static from(e){let t=[...e];const n=Fi(t);if(n!==(127&n))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const r=Fi(t),i=Fi(t),a=Ii(t);let o=[];for(let h=0;h<a;h++){const e=Ui(t,0,_i);o.push(new ki(s.Buffer.from(e)))}const l=Ui(t,0,_i),c=Ii(t);let u=[];for(let h=0;h<c;h++){const e=Fi(t),n=Ui(t,0,Ii(t)),r=Ui(t,0,Ii(t)),i=dn().encode(s.Buffer.from(r));u.push({programIdIndex:e,accounts:n,data:i})}const d={header:{numRequiredSignatures:n,numReadonlySignedAccounts:r,numReadonlyUnsignedAccounts:i},recentBlockhash:dn().encode(s.Buffer.from(l)),accountKeys:o,instructions:u};return new zi(d)}}class qi{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 Ci(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)=>
2e+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 ".concat(n.accountKey.toBase58()));for(const e of n.writableIndexes){if(!(e<r.state.addresses.length))throw new Error("Failed to find address for index ".concat(e," in address lookup table ").concat(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 ".concat(e," in address lookup table ").concat(n.accountKey.toBase58()));t.readonly.push(r.state.addresses[e])}}return t}static compile(e){const t=Di.compile(e.instructions,e.payerKey),n=new Array,r={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const l of i){const e=t.extractTableLookup(l);if(void 0!==e){const[t,{writable:i,readonly:s}]=e;n.push(t),r.writable.push(...i),r.readonly.push(...s)}}const[s,a]=t.getMessageComponents(),o=new Ci(a,r).compileInstructions(e.instructions);return new qi({header:s,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:o,addressTableLookups:n})}serialize(){const e=Array();Li(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),n=Array();Li(n,this.compiledInstructions.length);const r=this.serializeAddressTableLookups(),i=Array();Li(i,this.addressTableLookups.length);const s=fn.w3([fn.u8("prefix"),fn.w3([fn.u8("numRequiredSignatures"),fn.u8("numReadonlySignedAccounts"),fn.u8("numReadonlyUnsignedAccounts")],"header"),fn.av(e.length,"staticAccountKeysLength"),fn.O6(Mi(),this.staticAccountKeys.length,"staticAccountKeys"),Mi("recentBlockhash"),fn.av(n.length,"instructionsLength"),fn.av(t.length,"serializedInstructions"),fn.av(i.length,"addressTableLookupsLength"),fn.av(r.length,"serializedAddressTableLookups")]),a=new Uint8Array(Ni),o=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(e=>e.toBytes()),recentBlockhash:dn().decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:r},a);return a.slice(0,o)}serializeInstructions(){let e=0;const t=new Uint8Array(Ni);for(const n of this.compiledInstructions){const r=Array();Li(r,n.accountKeyIndexes.length);const i=Array();Li(i,n.data.length);e+=fn.w3([fn.u8("programIdIndex"),fn.av(r.length,"encodedAccountKeyIndexesLength"),fn.O6(fn.u8(),n.accountKeyIndexes.length,"accountKeyIndexes"),fn.av(i.length,"encodedDataLength"),fn.av(n.data.length,"data")]).encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(r),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:n.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array(Ni);for(const n of this.addressTableLookups){const r=Array();Li(r,n.writableIndexes.length);const i=Array();Li(i,n.readonlyIndexes.length);e+=fn.w3([Mi("accountKey"),fn.av(r.length,"encodedWritableIndexesLength"),fn.O6(fn.u8(),n.writableIndexes.length,"writableIndexes"),fn.av(i.length,"encodedReadonlyIndexesLength"),fn.O6(fn.u8(),n.readonlyIndexes.length,"readonlyIndexes")]).encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(r),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:n.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const n=Fi(t),r=127&n;Ri(n!==r,"Expected versioned message but received legacy message");Ri(0===r,"Expected versioned message with version 0 but found version ".concat(r));const i={numRequiredSignatures:Fi(t),numReadonlySignedAccounts:Fi(t),numReadonlyUnsignedAccounts:Fi(t)},s=[],a=Ii(t);for(let h=0;h<a;h++)s.push(new ki(Ui(t,0,_i)));const o=dn().encode(Ui(t,0,_i)),l=Ii(t),c=[];for(let h=0;h<l;h++){const e=Fi(t),n=Ui(t,0,Ii(t)),r=Ii(t),i=new Uint8Array(Ui(t,0,r));c.push({programIdIndex:e,accountKeyIndexes:n,data:i})}const u=Ii(t),d=[];for(let h=0;h<u;h++){const e=new ki(Ui(t,0,_i)),n=Ui(t,0,Ii(t)),r=Ui(t,0,Ii(t));d.push({accountKey:e,writableIndexes:n,readonlyIndexes:r})}return new qi({header:i,staticAccountKeys:s,recentBlockhash:o,compiledInstructions:c,addressTableLookups:d})}}const Wi={deserializeMessageVersion(e){const t=e[0],n=127&t;return n===t?"legacy":n},deserialize:e=>{const t=Wi.deserializeMessageVersion(e);if("legacy"===t)return zi.from(e);if(0===t)return qi.deserialize(e);throw new Error("Transaction message version ".concat(t," deserialization is not supported"))}};let Hi=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 Ki=s.Buffer.alloc(64).fill(0);class Vi{constructor(e){this.keys=void 0,this.programId=void 0,this.data=s.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(e=>{let{pubkey:t,isSigner:n,isWritable:r}=e;return{pubkey:t.toJSON(),isSigner:n,isWritable:r}}),programId:this.programId.toJSON(),data:[...this.data]}}}class $i{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,nonceInstru
2ction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(e=>e.toJSON()),signers:this.signatures.map(e=>{let{publicKey:t}=e;return t.toJSON()})}}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No instructions");return t.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 Vi(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 i=0;i<t.length;i++)if(void 0===t[i].programId)throw new Error("Transaction instruction index ".concat(i," has undefined program id"));const r=[],s=[];t.forEach(e=>{e.keys.forEach(e=>{s.push((0,i.A)({},e))});const t=e.programId.toString();r.includes(t)||r.push(t)}),r.forEach(e=>{s.push({pubkey:new ki(e),isSigner:!1,isWritable:!1})});const a=[];s.forEach(e=>{const t=e.pubkey.toString(),n=a.findIndex(e=>e.pubkey.toString()===t);n>-1?(a[n].isWritable=a[n].isWritable||e.isWritable,a[n].isSigner=a[n].isSigner||e.isSigner):a.push(e)}),a.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 o=a.findIndex(e=>e.pubkey.equals(n));if(o>-1){const[e]=a.splice(o,1);e.isSigner=!0,e.isWritable=!0,a.unshift(e)}else a.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(const i of this.signatures){const e=a.findIndex(e=>e.pubkey.equals(i.publicKey));if(!(e>-1))throw new Error("unknown signer: ".concat(i.publicKey.toString()));a[e].isSigner||(a[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 l=0,c=0,u=0;const d=[],h=[];a.forEach(e=>{let{pubkey:t,isSigner:n,isWritable:r}=e;n?(d.push(t.toString()),l+=1,r||(c+=1)):(h.push(t.toString()),r||(u+=1))});const p=d.concat(h),f=t.map(e=>{const{data:t,programId:n}=e;return{programIdIndex:p.indexOf(n.toString()),accounts:e.keys.map(e=>p.indexOf(e.pubkey.toString())),data:dn().encode(t)}});return f.forEach(e=>{Ri(e.programIdIndex>=0),e.accounts.forEach(e=>Ri(e>=0))}),new zi({header:{numRequiredSignatures:l,numReadonlySignedAccounts:c,numReadonlyUnsignedAccounts:u},accountKeys:p,recentBlockhash:e,instructions:f})}_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(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No signers");const r=new Set;this.signatures=t.filter(e=>{const t=e.toString();return!r.has(t)&&(r.add(t),!0)}).map(e=>({signature:null,publicKey:e}))}sign(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No signers");const r=new Set,i=[];for(const a of t){const e=a.publicKey.toString();r.has(e)||(r.add(e),i.push(a))}this.signatures=i.map(e=>({signature:null,publicKey:e.publicKey}));const s=this._compile();this._partialSign(s,...i)}partialSign(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No signers");const r=new Set,i=[];for(const a of t){const e=a.publicKey.toString();r.has(e)||(r.add(e),i.push(a))}const s=this._compile();this._partialSign(s,...i)}_partialSign(e){const t=e.serialize();for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];
2r.forEach(e=>{const n=gi(t,e.secretKey);this._addSignature(e.publicKey,xi(n))})}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){Ri(64===t.length);const n=this.signatures.findIndex(t=>e.equals(t.publicKey));if(n<0)throw new Error("unknown signer: ".concat(e.toString()));this.signatures[n].signature=s.Buffer.from(t)}verifySignatures(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){const n={};for(const{signature:r,publicKey:i}of this.signatures)null===r?t&&(n.missing||(n.missing=[])).push(i):yi(r,e,i.toBytes())||(n.invalid||(n.invalid=[])).push(i);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".concat(1===e.invalid.length?"":"(s)"," [`").concat(e.invalid.map(e=>e.toBase58()).join("`, `"),"`].")),e.missing&&(t+="\nMissing signature for public key".concat(1===e.missing.length?"":"(s)"," [`").concat(e.missing.map(e=>e.toBase58()).join("`, `"),"`].")),new Error(t)}}return this._serialize(r)}_serialize(e){const{signatures:t}=this,n=[];Li(n,t.length);const r=n.length+64*t.length+e.length,i=s.Buffer.alloc(r);return Ri(t.length<256),s.Buffer.from(n).copy(i,0),t.forEach((e,t)=>{let{signature:r}=e;null!==r&&(Ri(64===r.length,"signature has invalid length"),s.Buffer.from(r).copy(i,n.length+64*t))}),e.copy(i,n.length+64*t.length),Ri(i.length<=Ni,"Transaction too large: ".concat(i.length," > ").concat(Ni)),i}get keys(){return Ri(1===this.instructions.length),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return Ri(1===this.instructions.length),this.instructions[0].programId}get data(){return Ri(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e];const n=Ii(t);let r=[];for(let i=0;i<n;i++){const e=Ui(t,0,64);r.push(dn().encode(s.Buffer.from(e)))}return $i.populate(zi.from(t),r)}static populate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=new $i;return n.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(n.feePayer=e.accountKeys[0]),t.forEach((t,r)=>{const i={signature:t==dn().encode(Ki)?null:dn().decode(t),publicKey:e.accountKeys[r]};n.signatures.push(i)}),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 Vi({keys:r,programId:e.accountKeys[t.programIdIndex],data:dn().decode(t.data)}))}),n._message=e,n._json=n.toJSON(),n}}class Yi{get version(){return this.message.version}constructor(e,t){if(this.signatures=void 0,this.message=void 0,void 0!==t)Ri(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(64));this.signatures=t}this.message=e}serialize(){const e=this.message.serialize(),t=Array();Li(t,this.signatures.length);const n=fn.w3([fn.av(t.length,"encodedSignaturesLength"),fn.O6(Ti(),this.signatures.length,"signatures"),fn.av(e.length,"serializedMessage")]),r=new Uint8Array(2048),i=n.encode({encodedSignaturesLength:new Uint8Array(t),signatures:this.signatures,serializedMessage:e},r);return r.slice(0,i)}static deserialize(e){let t=[...e];const n=[],r=Ii(t);for(let s=0;s<r;s++)n.push(new Uint8Array(Ui(t,0,64)));const i=Wi.deserialize(new Uint8Array(t));return new Yi(i,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));Ri(e>=0,"Cannot sign with non signer key ".concat(r.publicKey.toBase58())),this.signatures[e]=gi(t,r.secretKey)}}addSignature(e,t){Ri(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));Ri(n>=0,"Can not add signature; `".concat(e.toBase58(),"` is not required to sign this transaction")),this.signatures[n]=t}}const Gi=new ki("SysvarC1ock11111111111111111111111111111111"),Ji=(new ki("SysvarEpochSchedu1e111111111111111111111111"),new ki("Sysvar1nstructions1111111111111111111111111"),new ki("SysvarRecentB1ockHashes11111111111111111111")),Zi=new ki("SysvarRent111111111111111111111111111111111"),Qi=(new ki("SysvarRewards111111111111111111111111111111"),new ki("SysvarS1otHashes111111111111111111111111111"),new ki("SysvarS1otHistory11111111111111111111111111"),new ki("SysvarStakeHistory1111111111111111111111111"));
2class Xi extends Error{constructor(e){let{action:t,signature:n,transactionMessage:r,logs:i}=e;const s=i?"Logs: \n".concat(JSON.stringify(i.slice(-10),null,2),". "):"",a="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";let o;switch(t){case"send":o="Transaction ".concat(n," resulted in an error. \n")+"".concat(r,". ")+s+a;break;case"simulate":o="Simulation failed. \nMessage: ".concat(r,". \n")+s+a;break;default:o="Unknown action '".concat(t,"'")}super(o),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=n,this.transactionMessage=r,this.transactionLogs=i||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){const e=this.transactionLogs;if(null==e||"object"!==typeof e||!("then"in e))return e}async getLogs(e){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((t,n)=>{e.getTransaction(this.signature).then(e=>{if(e&&e.meta&&e.meta.logMessages){const n=e.meta.logMessages;this.transactionLogs=n,t(n)}else n(new Error("Log messages not found"))}).catch(n)})),await this.transactionLogs}}class es extends Error{constructor(e,t){let{code:n,message:r,data:i}=e;super(null!=t?"".concat(t,": ").concat(r):r),this.code=void 0,this.data=void 0,this.code=n,this.data=i,this.name="SolanaJSONRPCError"}}async function ts(e,t,n,r){const i=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},s=await e.sendTransaction(t,n,i);let a;if(null!=t.recentBlockhash&&null!=t.lastValidBlockHeight)a=(await e.confirmTransaction({abortSignal:null===r||void 0===r?void 0:r.abortSignal,signature:s,blockhash:t.recentBlockhash,lastValidBlockHeight:t.lastValidBlockHeight},r&&r.commitment)).value;else if(null!=t.minNonceContextSlot&&null!=t.nonceInfo){const{nonceInstruction:n}=t.nonceInfo,i=n.keys[0].pubkey;a=(await e.confirmTransaction({abortSignal:null===r||void 0===r?void 0:r.abortSignal,minContextSlot:t.minNonceContextSlot,nonceAccountPubkey:i,nonceValue:t.nonceInfo.nonce,signature:s},r&&r.commitment)).value}else null!=(null===r||void 0===r?void 0: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."),a=(await e.confirmTransaction(s,r&&r.commitment)).value;if(a.err){if(null!=s)throw new Xi({action:"send",signature:s,transactionMessage:"Status: (".concat(JSON.stringify(a),")")});throw new Error("Transaction ".concat(s," failed (").concat(JSON.stringify(a),")"))}return s}function ns(e){return new Promise(t=>setTimeout(t,e))}function rs(e,t){const n=e.layout.span>=0?e.layout.span:Oi(e,t),r=s.Buffer.alloc(n),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,r),r}const is=fn.I0("lamportsPerSignature"),ss=fn.w3([fn.DH("version"),fn.DH("state"),Mi("authorizedPubkey"),Mi("nonce"),fn.w3([is],"feeCalculator")]),as=ss.span;class os{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=ss.decode(xi(e),0);return new os({authorizedPubkey:new ki(t.authorizedPubkey),nonce:new ki(t.nonce).toString(),feeCalculator:t.feeCalculator})}}function ls(e){const t=(0,fn.av)(8,e),n=t.decode.bind(t),r=t.encode.bind(t),i=t,s=Bn();return i.decode=(e,t)=>{const r=n(e,t);return s.decode(r)},i.encode=(e,t,n)=>{const i=s.encode(e);return r(i,t,n)},i}const cs=Object.freeze({Create:{index:0,layout:fn.w3([fn.DH("instruction"),fn.Wg("lamports"),fn.Wg("space"),Mi("programId")])},Assign:{index:1,layout:fn.w3([fn.DH("instruction"),Mi("programId")])},Transfer:{index:2,layout:fn.w3([fn.DH("instruction"),ls("lamports")])},CreateWithSeed:{index:3,layout:fn.w3([fn.DH("instruction"),Mi("base"),Pi("seed"),fn.Wg("lamports"),fn.Wg("space"),Mi("programId")])},AdvanceNonceAccount:{index:4,layout:fn.w3([fn.DH("instruction")])},WithdrawNonceAccount:{index:5,layout:fn.w3([fn.DH("instruction"),fn.Wg("lamports")])},InitializeNonceAccount:{index:6,layout:fn.w3([fn.DH("instruction"),Mi("authorized")])},AuthorizeNonceAccount:{index:7,layout:fn.w3([fn.DH("instruction"),Mi("authorized")])},Allocate:{index:8,layout:fn.w3([fn.DH("instruction"),fn.Wg("space")])},AllocateWithSeed:{index:9,layout:fn.w3([fn.DH("instruction"),Mi("base"),Pi("seed"),fn.Wg("space"),Mi("programId")])},AssignWithSeed:{index:10,layout:fn.w3([fn.DH("instruction"),Mi("base"),Pi("seed"),Mi("programId")])},TransferWithSeed:{index:11,layout:fn.w3([fn.DH("instruction"),ls("lamports"),Pi("seed"),Mi("programId")])},UpgradeNonceAccount:{index:12,layout:fn.w3([fn.DH("instruction")])}});class us{constructor(){}static createAccount(e){const t=rs(cs.Create,{lamports:e.lamports,space:e.space,programId:xi(e.programId.toBuffer())});return new Vi({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=rs(cs.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:xi(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=rs(cs.Transfer,{lamports:BigInt(e.lamports)}),n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new Vi({keys:n,programId:this.programId,data:t})}static assign(e){let t,n;if("basePubkey"in e){t=rs(cs.AssignWithSeed,{base:xi(e.basePubkey.toBuffer()),seed:e.seed,programId:xi(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=rs(cs.Assign,{programId:xi(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Vi({keys:n,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=rs(cs.CreateWithSeed,{base:xi(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:xi(e.programId.toBuffer())});let n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey.equals(e.fromPubkey)||n.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new Vi({keys:n,programId:this.programId,data:t})}static createNonceAccount(e){const t=new $i;"basePubkey"in e&&"seed"in e?t.add(us.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:as,programId:this.programId})):t.add(us.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:as,programId:this.programId}));const n={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(n)),t}static nonceInitialize(e){const t=rs(cs.InitializeNonceAccount,{authorized:xi(e.authorizedPubkey.toBuffer())}),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ji,isSigner:!1,isWritable:!1},{pubkey:Zi,isSigner:!1,isWritable:!1}],programId:this.programId,data:t};return new Vi(n)}static nonceAdvance(e){const t=rs(cs.AdvanceNonceAccount),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ji,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t};return new Vi(n)}static nonceWithdraw(e){const t=rs(cs.WithdrawNonceAccount,{lamports:e.lamports});return new Vi({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Ji,isSigner:!1,isWritable:!1},{pubkey:Zi,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceAuthorize(e){const t=rs(cs.AuthorizeNonceAccount,{authorized:xi(e.newAuthorizedPubkey.toBuffer())});return new Vi({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=rs(cs.AllocateWithSeed,{base:xi(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:xi(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=rs(cs.Allocate,{space:e.space}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Vi({keys:n,programId:this.programId,data:t})}}us.programId=new ki("11111111111111111111111111111111");class ds{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/ds.chunkSize)+1+1)}static async load(e,t,n,r,i){{const s=await e.getMinimumBalanceForRentExemption(i.length),a=await e.getAccountInfo(n.publicKey,"confirmed");let o=null;if(null!==a){if(a.executable)return console.error("Program load failed, account is already executable"),!1;a.data.length!==i.length&&(o=o||new $i,o.add(us.allocate({accountPubkey:n.publicKey,space:i.length}))),a.owner.equals(r)||(o=o||new $i,o.add(us.assign({accountPubkey:n.publicKey,programId:r}))),a.lamports<s&&(o=o||new $i,o.add(us.transfer({fromPubkey:t.publicKey,toPubkey:n.publicKey,lamports:s-a.lamports})))}else o=(new $i).add(us.createAccount({fromPubkey:t.publicKey,newAccountPubkey:n.publicKey,lamports:s>0?s:1,space:i.length,programId:r}));null!==o&&await ts(e,o,[t,n],{commitment:"confirmed"})}const a=fn.w3([fn.DH("instruction"),fn.DH("offset"),fn.DH("bytesLength"),fn.DH("bytesLengthPadding"),fn.O6(fn.u8("byte"),fn.cY(fn.DH(),-8),"bytes")]),o=ds.chunkSize;let l=0,c=i,u=[];for(;c.length>0;){const i=c.slice(0,o),d=s.Buffer.alloc(o+16);a.encode({instruction:0,offset:l,bytes:i,bytesLength:0,bytesLengthPadding:0},d);const h=(new $i).add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0}],programId:r,data:d});if(u.push(ts(e,h,[t,n],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")){const e=4;await ns(1e3/e)}l+=o,c=c.slice(o)}await Promise.all(u);{const i=fn.w3([fn.DH("instruction")]),a=s.Buffer.alloc(i.span);i.encode({instruction:1},a);const o=(new $i).add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0},{pubkey:Zi,isSigner:!1,isWritable:!1}],programId:r,data:a}),l="processed",c=await e.sendTransaction(o,[t,n],{preflightCommitment:l}),{context:u,value:h}=await e.confirmTransaction({signature:c,lastValidBlockHeight:o.lastV
2alidBlockHeight,blockhash:o.recentBlockhash},l);if(h.err)throw new Error("Transaction ".concat(c," failed (").concat(JSON.stringify(h),")"));for(;;){try{if(await e.getSlot({commitment:l})>u.slot)break}catch(d){}await new Promise(e=>setTimeout(e,Math.round(200)))}}return!0}}ds.chunkSize=932;new ki("BPFLoader2111111111111111111111111111111111");function hs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps,fs;function ms(){if(fs)return ps;fs=1;var e=Object.prototype.toString,t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function n(r,i){var s,a,o,l,c,u,d;if(!0===r)return"true";if(!1===r)return"false";switch(typeof r){case"object":if(null===r)return null;if(r.toJSON&&"function"===typeof r.toJSON)return n(r.toJSON(),i);if("[object Array]"===(d=e.call(r))){for(o="[",a=r.length-1,s=0;s<a;s++)o+=n(r[s],!0)+",";return a>-1&&(o+=n(r[s],!0)),o+"]"}if("[object Object]"===d){for(a=(l=t(r).sort()).length,o="",s=0;s<a;)void 0!==(u=n(r[c=l[s]],!1))&&(o&&(o+=","),o+=JSON.stringify(c)+":"+u),s++;return"{"+o+"}"}return JSON.stringify(r);case"function":case"undefined":return i?null:void 0;case"string":return JSON.stringify(r);default:return isFinite(r)?r:null}}return ps=function(e){var t=n(e,!1);if(void 0!==t)return""+t}}var gs=hs(ms());function ys(e){let t=0;for(;e>1;)e/=2,t++;return t}class xs{constructor(e,t,n,r,i){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=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=ys(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)))-ys(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+ys(32)):this.slotsPerEpoch}}var vs=globalThis.fetch;class bs extends br{constructor(e,t,n){super(e=>{const n=xr(e,(0,i.A)({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(){var e;const t=null===(e=this.underlyingSocket)||void 0===e?void 0:e.readyState;return 1===t?super.call(...arguments):Promise.reject(new Error("Tried to call a JSON-RPC method `"+(arguments.length<=0?void 0:arguments[0])+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(){var e;const t=null===(e=this.underlyingSocket)||void 0===e?void 0:e.readyState;return 1===t?super.notify(...arguments):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+(arguments.length<=0?void 0:arguments[0])+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}class ws{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 ".concat(n.typeIndex," != ").concat(e.index));return n}(_s,e),n=e.length-56;Ri(n>=0,"lookup table is invalid"),Ri(n%32===0,"lookup table is invalid");const r=n/32,{addresses:i}=fn.w3([fn.O6(Mi(),r,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new ki(t.authority[0]):void 0,addresses:i.map(e=>new ki(e))}}}const _s={index:1,layout:fn.w3([fn.DH("typeIndex"),ls("deactivationSlot"),fn.I0("lastExtendedSlot"),fn.u8("lastExtendedStartIndex"),fn.u8(),fn.O6(Mi(),fn.cY(fn.u8(),-1),"authority")])},js=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;const ks=hr(er(ki),or(),e=>new ki(e)),Ns=lr([or(),tr("base64")]),Ss=hr(er(s.Buffer),Ns,e=>s.Buffer.from(e[0],"base64"));function Es(e){let t,n;if("string"===typeof e)t=e;else if(e){const{commitment:i}=e;t=i,n=(0,r.A)(e,ci)}return{commitment:t,config:n}}function As(e){return e.map(e=>{var t;return"memcmp"in e?(0,i.A)((0,i.A)({},e),{},{memcmp:(0,i.A)((0,i.A)({},e.memcmp),{},{encoding:null!==(t=e.memcmp.encoding)&&void 0!==t?t:"base58"})}):e})}function Cs(e){return ur([cr({jsonrpc:tr("2.0"),id:or(),result:e}),cr({jsonrpc:tr("2.0"),id:or(),error:cr({code:dr(),message:or(),data:sr(Zn("any",()=>!0))})})])}const Ms=Cs(dr());function Ts(e){return hr(Cs(e),Ms,t=>"error"in t?t:(0,i.A)((0,i.A)({},t),{},{result:Yn(t.result,e)}))}function Ps(e){return Ts(cr({context:cr({slot:ir()}),value:e}))}function Os(e){return cr({context:cr({slot:ir()}),value:e})}function Is(e,t){return 0===e?new qi({header:t.header,staticAccountKeys:t.accountKeys.map(e=>new ki(e)),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:dn().decode(e.data)})),addressTableLookups:t.addressTableLookups}):new zi(t)}const Ls=cr({foundation:ir(),foundationTerm:ir(),initial:ir(),taper:ir(),terminal:ir()}
vendor: 4,214 bytes, line 2
2),Rs=Ts(Qn(rr(cr({epoch:ir(),effectiveSlot:ir(),amount:ir(),postBalance:ir(),commission:sr(rr(ir()))})))),Ds=Qn(cr({slot:ir(),prioritizationFee:ir()})),Bs=cr({total:ir(),validator:ir(),foundation:ir(),epoch:ir()}),Fs=cr({epoch:ir(),slotIndex:ir(),slotsInEpoch:ir(),absoluteSlot:ir(),blockHeight:sr(ir()),transactionCount:sr(ir())}),Us=cr({slotsPerEpoch:ir(),leaderScheduleSlotOffset:ir(),warmup:Xn(),firstNormalEpoch:ir(),firstNormalSlot:ir()}),zs=ar(or(),Qn(ir())),qs=rr(ur([cr({}),or()])),Ws=cr({err:qs}),Hs=tr("receivedSignature"),Ks=cr({"solana-core":or(),"feature-set":sr(ir())}),Vs=cr({program:or(),programId:ks,parsed:dr()}),$s=cr({programId:ks,accounts:Qn(ks),data:or()}),Ys=Ps(cr({err:rr(ur([cr({}),or()])),logs:rr(Qn(or())),accounts:sr(rr(Qn(rr(cr({executable:Xn(),owner:or(),lamports:ir(),data:Qn(or()),rentEpoch:sr(ir())}))))),unitsConsumed:sr(ir()),returnData:sr(rr(cr({programId:or(),data:lr([or(),tr("base64")])}))),innerInstructions:sr(rr(Qn(cr({index:ir(),instructions:Qn(ur([Vs,$s]))}))))})),Gs=Ps(cr({byIdentity:ar(or(),Qn(ir())),range:cr({firstSlot:ir(),lastSlot:ir()})}));const Js=Ts(Ls),Zs=Ts(Bs),Qs=Ts(Ds),Xs=Ts(Fs),ea=Ts(Us),ta=Ts(zs),na=Ts(ir()),ra=Ps(cr({total:ir(),circulating:ir(),nonCirculating:ir(),nonCirculatingAccounts:Qn(ks)})),ia=cr({amount:or(),uiAmount:rr(ir()),decimals:ir(),uiAmountString:sr(or())}),sa=Ps(Qn(cr({address:ks,amount:or(),uiAmount:rr(ir()),decimals:ir(),uiAmountString:sr(or())}))),aa=Ps(Qn(cr({pubkey:ks,account:cr({executable:Xn(),owner:ks,lamports:ir(),data:Ss,rentEpoch:ir()})}))),oa=cr({program:or(),parsed:dr(),space:ir()}),la=Ps(Qn(cr({pubkey:ks,account:cr({executable:Xn(),owner:ks,lamports:ir(),data:oa,rentEpoch:ir()})}))),ca=Ps(Qn(cr({lamports:ir(),address:ks}))),ua=cr({executable:Xn(),owner:ks,lamports:ir(),data:Ss,rentEpoch:ir()}),da=cr({pubkey:ks,account:ua}),ha=hr(ur([er(s.Buffer),oa]),ur([Ns,oa]),e=>Array.isArray(e)?Yn(e,Ss):e),pa=cr({executable:Xn(),owner:ks,lamports:ir(),data:ha,rentEpoch:ir()}),fa=cr({pubkey:ks,account:pa}),ma=cr({state:ur([tr("active"),tr("inactive"),tr("activating"),tr("deactivating")]),active:ir(),inactive:ir()}),ga=Ts(Qn(cr({signature:or(),slot:ir(),err:qs,memo:rr(or()),blockTime:sr(rr(ir()))}))),ya=Ts(Qn(cr({signature:or(),slot:ir(),err:qs,memo:rr(or()),blockTime:sr(rr(ir()))}))),xa=cr({subscription:ir(),result:Os(ua)}),va=cr({pubkey:ks,account:ua}),ba=cr({subscription:ir(),result:Os(va)}),wa=cr({parent:ir(),slot:ir(),root:ir()}),_a=cr({subscription:ir(),result:wa}),ja=ur([cr({type:ur([tr("firstShredReceived"),tr("completed"),tr("optimisticConfirmation"),tr("root")]),slot:ir(),timestamp:ir()}),cr({type:tr("createdBank"),parent:ir(),slot:ir(),timestamp:ir()}),cr({type:tr("frozen"),slot:ir(),timestamp:ir(),stats:cr({numTransactionEntries:ir(),numSuccessfulTransactions:ir(),numFailedTransactions:ir(),maxTransactionsPerEntry:ir()})}),cr({type:tr("dead"),slot:ir(),timestamp:ir(),err:or()})]),ka=cr({subscription:ir(),result:ja}),Na=cr({subscription:ir(),result:Os(ur([Ws,Hs]))}),Sa=cr({subscription:ir(),result:ir()}),Ea=cr({pubkey:or(),gossip:rr(or()),tpu:rr(or()),rpc:rr(or()),version:rr(or())}),Aa=cr({votePubkey:or(),nodePubkey:or(),activatedStake:ir(),epochVoteAccount:Xn(),epochCredits:Qn(lr([ir(),ir(),ir()])),commission:ir(),lastVote:ir(),rootSlot:rr(ir())}),Ca=Ts(cr({current:Qn(Aa),delinquent:Qn(Aa)})),Ma=ur([tr("processed"),tr("confirmed"),tr("finalized")]),Ta=cr({slot:ir(),confirmations:rr(ir()),err:qs,confirmationStatus:sr(Ma)}),Pa=Ps(Qn(rr(Ta))),Oa=Ts(ir()),Ia=cr({accountKey:ks,writableIndexes:Qn(ir()),readonlyIndexes:Qn(ir())}),La=cr({signatures:Qn(or()),message:cr({accountKeys:Qn(or()),header:cr({numRequiredSignatures:ir(),numReadonlySignedAccounts:ir(),numReadonlyUnsignedAccounts:ir()}),instructions:Qn(cr({accounts:Qn(ir()),data:or(),programIdIndex:ir()})),recentBlockhash:or(),addressTableLookups:sr(Qn(Ia))})}),Ra=cr({pubkey:ks,signer:Xn(),writable:Xn(),source:sr(ur([tr("transaction"),tr("lookupTable")]))}),Da=cr({accountKeys:Qn(Ra),signatures:Qn(or())}),Ba=cr({parsed:dr(),program:or(),programId:ks}),Fa=cr({accounts:Qn(ks),data:or(),programId:ks}),Ua=hr(ur([Fa,Ba]),ur([cr({parsed:dr(),program:or(),programId:or()}),cr({accounts:Qn(or()),data:or(),programId:or()})]),e=>
2Yn(e,"accounts"in e?Fa:Ba)),za=cr({signatures:Qn(or()),message:cr({accountKeys:Qn(Ra),instructions:Qn(Ua),recentBlockhash:or(),addressTableLookups:sr(rr(Qn(Ia)))})}),qa=cr({accountIndex:ir(),mint:or(),owner:sr(or()),programId:sr(or()),uiTokenAmount:ia}),Wa=cr({writable:Qn(ks),readonly:Qn(ks)}),Ha=cr({err:qs,fee:ir(),innerInstructions:sr(rr(Qn(cr({index:ir(),instructions:Qn(cr({accounts:Qn(ir()),data:or(),programIdIndex:ir()}))})))),preBalances:Qn(ir()),postBalances:Qn(ir()),logMessages:sr(rr(Qn(or()))),preTokenBalances:sr(rr(Qn(qa))),postTokenBalances:sr(rr(Qn(qa))),loadedAddresses:sr(Wa),computeUnitsConsumed:sr(ir()),costUnits:sr(ir())}),Ka=cr({err:qs,fee:ir(),innerInstructions:sr(rr(Qn(cr({index:ir(),instructions:Qn(Ua)})))),preBalances:Qn(ir()),postBalances:Qn(ir()),logMessages:sr(rr(Qn(or()))),preTokenBalances:sr(rr(Qn(qa))),postTokenBalances:sr(rr(Qn(qa))),loadedAddresses:sr(Wa),computeUnitsConsumed:sr(ir()),costUnits:sr(ir())}),Va=ur([tr(0),tr("legacy")]),$a=cr({pubkey:or(),lamports:ir(),postBalance:rr(ir()),rewardType:rr(or()),commission:sr(rr(ir()))}),Ya=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),transactions:Qn(cr({transaction:La,meta:rr(Ha),version:sr(Va)})),rewards:sr(Qn($a)),blockTime:rr(ir()),blockHeight:rr(ir())}))),Ga=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),rewards:sr(Qn($a)),blockTime:rr(ir()),blockHeight:rr(ir())}))),Ja=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),transactions:Qn(cr({transaction:Da,meta:rr(Ha),version:sr(Va)})),rewards:sr(Qn($a)),blockTime:rr(ir()),blockHeight:rr(ir())}))),Za=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),transactions:Qn(cr({transaction:za,meta:rr(Ka),version:sr(Va)})),rewards:sr(Qn($a)),blockTime:rr(ir()),blockHeight:rr(ir())}))),Qa=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),transactions:Qn(cr({transaction:Da,meta:rr(Ka),version:sr(Va)})),rewards:sr(Qn($a)),blockTime:rr(ir()),blockHeight:rr(ir())}))),Xa=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),rewards:sr(Qn($a)),blockTime:rr(ir()),blockHeight:rr(ir())}))),eo=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),transactions:Qn(cr({transaction:La,meta:rr(Ha)})),rewards:sr(Qn($a)),blockTime:rr(ir())}))),to=Ts(rr(cr({blockhash:or(),previousBlockhash:or(),parentSlot:ir(),signatures:Qn(or()),blockTime:rr(ir())}))),no=Ts(rr(cr({slot:ir(),meta:rr(Ha),blockTime:sr(rr(ir())),transaction:La,version:sr(Va)}))),ro=Ts(rr(cr({slot:ir(),transaction:za,meta:rr(Ka),blockTime:sr(rr(ir())),version:sr(Va)}))),io=Ps(cr({blockhash:or(),lastValidBlockHeight:ir()})),so=Ps(Xn()),ao=Ts(Qn(cr({slot:ir(),numTransactions:ir(),numSlots:ir(),samplePeriodSecs:ir()}))),oo=Ps(rr(cr({feeCalculator:cr({lamportsPerSignature:ir()})}))),lo=Ts(or()),co=Ts(or()),uo=cr({err:qs,logs:Qn(or()),signature:or()}),ho=cr({result:Os(uo),subscription:ir()}),po={"solana-client":"js/".concat("1.0.0-maintenance")};class fo{constructor(e,t){let n,r,i,s,a,o;var l;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=>{var n;const{commitment:r,config:i}=Es(t),s=this._buildArgs([],r,void 0,i),a=gs(s);return e[a]=null!==(n=e[a])&&void 0!==n?n:(async()=>{try{const e=Yn(await this._rpcRequest("getBlockHeight",s),Ts(ir()));if("error"in e)throw new es(e.error,"failed to get block height information");return e.result}finally{delete e[a]}})(),await e[a]}})(),t&&"string"===typeof t?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,n=t.wsEndpoint,r=t.httpHeaders,i=t.fetch,s=t.fetchMiddleware,a=t.disableRetryOnRateLimit,o=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(js);if(null==t)throw TypeError("Failed to validate endpoint URL `".concat(e,"`"));const[n,r,i,s]=t,a=e.startsWith("https:")?"wss:":"ws:",o=null==i?null:parseInt(i.slice(1),10),l=null==o?"":":".concat(o+1);return"".concat(a,"//").concat(r).concat(l).concat(s)}(e),this._rpcClient=function(e,t,n,r,i,s){const a=n||vs;let o;return null!=s&&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&&(o=async(e,t)=>{const n=await new Promise((n,i)=>{try{r(e,t,(e,t)=>n([e,t]))}catch(s){i(s)}});return await a(...n)}
2),new(fr())(async(n,r)=>{const s={method:"POST",body:n,agent:void 0,headers:Object.assign({"Content-Type":"application/json"},t||{},po)};try{let t,n=5,l=500;for(;t=o?await o(e,s):await a(e,s),429===t.status&&!0!==i&&(n-=1,0!==n);)console.error("Server responded with ".concat(t.status," ").concat(t.statusText,". Retrying after ").concat(l,"ms delay...")),await ns(l),l*=2;const c=await t.text();t.ok?r(null,c):r(new Error("".concat(t.status," ").concat(t.statusText,": ").concat(c)))}catch(l){l instanceof Error&&r(l)}},{})}(e,r,i,s,a,o),this._rpcRequest=(l=this._rpcClient,(e,t)=>new Promise((n,r)=>{l.request(e,t,(e,t)=>{e?r(e):n(t)})})),this._rpcBatchRequest=function(e){return t=>new Promise((n,r)=>{0===t.length&&n([]);const i=t.map(t=>e.request(t.methodName,t.args));e.request(i,(e,t)=>{e?r(e):n(t)})})}(this._rpcClient),this._rpcWebSocket=new bs(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}=Es(t),i=this._buildArgs([e.toBase58()],n,void 0,r),s=Yn(await this._rpcRequest("getBalance",i),Ps(ir()));if("error"in s)throw new es(s.error,"failed to get balance for ".concat(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=Yn(await this._rpcRequest("getBlockTime",[e]),Ts(rr(ir())));if("error"in t)throw new es(t.error,"failed to get block time for slot ".concat(e));return t.result}async getMinimumLedgerSlot(){const e=Yn(await this._rpcRequest("minimumLedgerSlot",[]),Ts(ir()));if("error"in e)throw new es(e.error,"failed to get minimum ledger slot");return e.result}async getFirstAvailableBlock(){const e=Yn(await this._rpcRequest("getFirstAvailableBlock",[]),na);if("error"in e)throw new es(e.error,"failed to get first available block");return e.result}async getSupply(e){let t={};t="string"===typeof e?{commitment:e}:e?(0,i.A)((0,i.A)({},e),{},{commitment:e&&e.commitment||this.commitment}):{commitment:this.commitment};const n=Yn(await this._rpcRequest("getSupply",[t]),ra);if("error"in n)throw new es(n.error,"failed to get supply");return n.result}async getTokenSupply(e,t){const n=this._buildArgs([e.toBase58()],t),r=Yn(await this._rpcRequest("getTokenSupply",n),Ps(ia));if("error"in r)throw new es(r.error,"failed to get token supply");return r.result}async getTokenAccountBalance(e,t){const n=this._buildArgs([e.toBase58()],t),r=Yn(await this._rpcRequest("getTokenAccountBalance",n),Ps(ia));if("error"in r)throw new es(r.error,"failed to get token account balance");return r.result}async getTokenAccountsByOwner(e,t,n){const{commitment:r,config:i}=Es(n);let s=[e.toBase58()];"mint"in t?s.push({mint:t.mint.toBase58()}):s.push({programId:t.programId.toBase58()});const a=this._buildArgs(s,r,"base64",i),o=Yn(await this._rpcRequest("getTokenAccountsByOwner",a),aa);if("error"in o)throw new es(o.error,"failed to get token accounts owned by account ".concat(e.toBase58()));return o.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 i=this._buildArgs(r,n,"jsonParsed"),s=Yn(await this._rpcRequest("getTokenAccountsByOwner",i),la);if("error"in s)throw new es(s.error,"failed to get token accounts owned by account ".concat(e.toBase58()
2));return s.result}async getLargestAccounts(e){const t=(0,i.A)((0,i.A)({},e),{},{commitment:e&&e.commitment||this.commitment}),n=t.filter||t.commitment?[t]:[],r=Yn(await this._rpcRequest("getLargestAccounts",n),ca);if("error"in r)throw new es(r.error,"failed to get largest accounts");return r.result}async getTokenLargestAccounts(e,t){const n=this._buildArgs([e.toBase58()],t),r=Yn(await this._rpcRequest("getTokenLargestAccounts",n),sa);if("error"in r)throw new es(r.error,"failed to get token largest accounts");return r.result}async getAccountInfoAndContext(e,t){const{commitment:n,config:r}=Es(t),i=this._buildArgs([e.toBase58()],n,"base64",r),s=Yn(await this._rpcRequest("getAccountInfo",i),Ps(rr(ua)));if("error"in s)throw new es(s.error,"failed to get info about account ".concat(e.toBase58()));return s.result}async getParsedAccountInfo(e,t){const{commitment:n,config:r}=Es(t),i=this._buildArgs([e.toBase58()],n,"jsonParsed",r),s=Yn(await this._rpcRequest("getAccountInfo",i),Ps(rr(pa)));if("error"in s)throw new es(s.error,"failed to get info about account ".concat(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}=Es(t),i=e.map(e=>e.toBase58()),s=this._buildArgs([i],n,"jsonParsed",r),a=Yn(await this._rpcRequest("getMultipleAccounts",s),Ps(Qn(rr(pa))));if("error"in a)throw new es(a.error,"failed to get info for accounts ".concat(i));return a.result}async getMultipleAccountsInfoAndContext(e,t){const{commitment:n,config:r}=Es(t),i=e.map(e=>e.toBase58()),s=this._buildArgs([i],n,"base64",r),a=Yn(await this._rpcRequest("getMultipleAccounts",s),Ps(Qn(rr(ua))));if("error"in a)throw new es(a.error,"failed to get info for accounts ".concat(i));return a.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,n){const{commitment:r,config:s}=Es(t),a=this._buildArgs([e.toBase58()],r,void 0,(0,i.A)((0,i.A)({},s),{},{epoch:null!=n?n:null===s||void 0===s?void 0:s.epoch})),o=Yn(await this._rpcRequest("getStakeActivation",a),Ts(ma));if("error"in o)throw new es(o.error,"failed to get Stake Activation ".concat(e.toBase58()));return o.result}async getProgramAccounts(e,t){const{commitment:n,config:s}=Es(t),a=s||{},{encoding:o}=a,l=(0,r.A)(a,ui),c=this._buildArgs([e.toBase58()],n,o||"base64",(0,i.A)((0,i.A)({},l),l.filters?{filters:As(l.filters)}:null)),u=await this._rpcRequest("getProgramAccounts",c),d=Qn(da),h=!0===l.withContext?Yn(u,Ps(d)):Yn(u,Ts(d));if("error"in h)throw new es(h.error,"failed to get accounts owned by program ".concat(e.toBase58()));return h.result}async getParsedProgramAccounts(e,t){const{commitment:n,config:r}=Es(t),i=this._buildArgs([e.toBase58()],n,"jsonParsed",r),s=Yn(await this._rpcRequest("getProgramAccounts",i),Ts(Qn(fa)));if("error"in s)throw new es(s.error,"failed to get accounts owned by program ".concat(e.toBase58()));return s.result}async confirmTransaction(e,t){let n,r;if("string"==typeof e)n=e;else{var i;const t=e;if(null!==(i=t.abortSignal)&&void 0!==i&&i.aborted)return Promise.reject(t.abortSignal.reason);n=t.signature}try{r=dn().decode(n)}catch(s){throw new Error("signature must be base58 encoded: "+n)}return Ri(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(e){let t,n,{commitment:r,signature:i}=e,s=!1;return{abortConfirmation:()=>{n&&(n(),n=void 0),null!=t&&(this.removeSignatureListener(t),t=void 0)},confirmationPromise:new Promise((e,a)=>{try{t=this.onSignature(i,(n,r)=>{t=void 0;const i={context:r,value:n};e({__type:Hi.PROCESSED,response:i})},r);const o=new Promise(e=>{null==t?e():n=this._onSubscriptionStateChange(t,t=>{"subscribed"===t&&e()})});(async()=>
2{if(await o,s)return;const t=await this.getSignatureStatus(i);if(s)return;if(null==t)return;const{context:n,value:l}=t;if(null!=l)if(null!==l&&void 0!==l&&l.err)a(l.err);else{switch(r){case"confirmed":case"single":case"singleGossip":if("processed"===l.confirmationStatus)return;break;case"finalized":case"max":case"root":if("processed"===l.confirmationStatus||"confirmed"===l.confirmationStatus)return}s=!0,e({__type:Hi.PROCESSED,response:{context:n,value:l}})}})()}catch(o){a(o)}})}}async confirmTransactionUsingBlockHeightExceedanceStrategy(e){let{commitment:t,strategy:{abortSignal:n,lastValidBlockHeight:r,signature:i}}=e,s=!1;const a=new Promise(e=>{const n=async()=>{try{return await this.getBlockHeight(t)}catch(e){return-1}};(async()=>{let t=await n();if(!s){for(;t<=r;){if(await ns(1e3),s)return;if(t=await n(),s)return}e({__type:Hi.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:o,confirmationPromise:l}=this.getTransactionConfirmationPromise({commitment:t,signature:i}),c=this.getCancellationPromise(n);let u;try{const e=await Promise.race([c,l,a]);if(e.__type!==Hi.PROCESSED)throw new Si(i);u=e.response}finally{s=!0,o()}return u}async confirmTransactionUsingDurableNonceStrategy(e){let{commitment:t,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:i,nonceValue:s,signature:a}}=e,o=!1;const l=new Promise(e=>{let n=s,a=null;const l=async()=>{try{const{context:e,value:n}=await this.getNonceAndContext(i,{commitment:t,minContextSlot:r});return a=e.slot,null===n||void 0===n?void 0:n.nonce}catch(e){return n}};(async()=>{if(n=await l(),!o)for(;;){if(s!==n)return void e({__type:Hi.NONCE_INVALID,slotInWhichNonceDidAdvance:a});if(await ns(2e3),o)return;if(n=await l(),o)return}})()}),{abortConfirmation:c,confirmationPromise:u}=this.getTransactionConfirmationPromise({commitment:t,signature:a}),d=this.getCancellationPromise(n);let h;try{const e=await Promise.race([d,u,l]);if(e.__type===Hi.PROCESSED)h=e.response;else{var p;let n;for(;;){var f;
2const t=await this.getSignatureStatus(a);if(null==t)break;if(!(t.context.slot<(null!==(f=e.slotInWhichNonceDidAdvance)&&void 0!==f?f:r))){n=t;break}await ns(400)}if(null===(p=n)||void 0===p||!p.value)throw new Ai(a);{const e=t||"finalized",{confirmationStatus:r}=n.value;switch(e){case"processed":case"recent":if("processed"!==r&&"confirmed"!==r&&"finalized"!==r)throw new Ai(a);break;case"confirmed":case"single":case"singleGossip":if("confirmed"!==r&&"finalized"!==r)throw new Ai(a);break;case"finalized":case"max":case"root":if("finalized"!==r)throw new Ai(a)}h={context:n.context,value:{err:n.value.err}}}}}finally{o=!0,c()}return h}async confirmTransactionUsingLegacyTimeoutStrategy(e){let t,{commitment:n,signature:r}=e;const i=new Promise(e=>{let r=this._confirmTransactionInitialTimeout||6e4;switch(n){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":r=this._confirmTransactionInitialTimeout||3e4}t=setTimeout(()=>e({__type:Hi.TIMED_OUT,timeoutMs:r}),r)}),{abortConfirmation:s,confirmationPromise:a}=this.getTransactionConfirmationPromise({commitment:n,signature:r});let o;try{const e=await Promise.race([a,i]);if(e.__type!==Hi.PROCESSED)throw new Ei(r,e.timeoutMs/1e3);o=e.response}finally{clearTimeout(t),s()}return o}async getClusterNodes(){const e=Yn(await this._rpcRequest("getClusterNodes",[]),Ts(Qn(Ea)));if("error"in e)throw new es(e.error,"failed to get cluster nodes");return e.result}async getVoteAccounts(e){const t=this._buildArgs([],e),n=Yn(await this._rpcRequest("getVoteAccounts",t),Ca);if("error"in n)throw new es(n.error,"failed to get vote accounts");return n.result}async getSlot(e){const{commitment:t,config:n}=Es(e),r=this._buildArgs([],t,void 0,n),i=Yn(await this._rpcRequest("getSlot",r),Ts(ir()));if("error"in i)throw new es(i.error,"failed to get slot");return i.result}async getSlotLeader(e){const{commitment:t,config:n}=Es(e),r=this._buildArgs([],t,void 0,n),i=Yn(await this._rpcRequest("getSlotLeader",r),Ts(or()));if("error"in i)throw new es(i.error,"failed to get slot leader");return i.result}async getSlotLeaders(e,t){const n=[e,t],r=Yn(await this._rpcRequest("getSlotLeaders",n),Ts(Qn(ks)));if("error"in r)throw new es(r.error,"failed to get slot leaders");return r.result}async getSignatureStatus(e,t){const{context:n,value:r}
2=await this.getSignatureStatuses([e],t);Ri(1===r.length);return{context:n,value:r[0]}}async getSignatureStatuses(e,t){const n=[e];t&&n.push(t);const r=Yn(await this._rpcRequest("getSignatureStatuses",n),Pa);if("error"in r)throw new es(r.error,"failed to get signature status");return r.result}async getTransactionCount(e){const{commitment:t,config:n}=Es(e),r=this._buildArgs([],t,void 0,n),i=Yn(await this._rpcRequest("getTransactionCount",r),Ts(ir()));if("error"in i)throw new es(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=Yn(await this._rpcRequest("getInflationGovernor",t),Js);if("error"in n)throw new es(n.error,"failed to get inflation");return n.result}async getInflationReward(e,t,n){const{commitment:r,config:s}=Es(n),a=this._buildArgs([e.map(e=>e.toBase58())],r,void 0,(0,i.A)((0,i.A)({},s),{},{epoch:null!=t?t:null===s||void 0===s?void 0:s.epoch})),o=Yn(await this._rpcRequest("getInflationReward",a),Rs);if("error"in o)throw new es(o.error,"failed to get inflation reward");return o.result}async getInflationRate(){const e=Yn(await this._rpcRequest("getInflationRate",[]),Zs);if("error"in e)throw new es(e.error,"failed to get inflation rate");return e.result}async getEpochInfo(e){const{commitment:t,config:n}=Es(e),r=this._buildArgs([],t,void 0,n),i=Yn(await this._rpcRequest("getEpochInfo",r),Xs);if("error"in i)throw new es(i.error,"failed to get epoch info");return i.result}async getEpochSchedule(){const e=Yn(await this._rpcRequest("getEpochSchedule",[]),ea);if("error"in e)throw new es(e.error,"failed to get epoch schedule");const t=e.result;return new xs(t.slotsPerEpoch,t.leaderScheduleSlotOffset,t.warmup,t.firstNormalEpoch,t.firstNormalSlot)}async getLeaderSchedule(){const e=Yn(await this._rpcRequest("getLeaderSchedule",[]),ta);if("error"in e)throw new es(e.error,"failed to get leader schedule");return e.result}async getMinimumBalanceForRentExemption(e,t){const n=this._buildArgs([e],t),r=Yn(await this._rpcRequest("getMinimumBalanceForRentExemption",n),Oa);return"error"in r?(console.warn("Unable to fetch minimum balance for rent exemption"),0):r.result}async getRecentBlockhashAndContext(e){const{context:t,value:{blockhash:n}}=await this.getLatestBlockhashAndContext(e);return{context:t,value:{blockhash:n,feeCalculator:{get lamportsPerSignature(){throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.")},toJSON:()=>({})}}}}async getRecentPerformanceSamples(e){const t=Yn(await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),ao);if("error"in t)throw new es(t.error,"failed to get recent performance samples");return t.result}async getFeeCalculatorForBlockhash(e,t){const n=this._buildArgs([e],t),r=Yn(await this._rpcRequest("getFeeCalculatorForBlockhash",n),oo);if("error"in r)throw new es(r.error,"failed to get fee calculator");const{context:i,value:s}=r.result;return{context:i,value:null!==s?s.feeCalculator:null}}async getFeeForMessage(e,t){const n=xi(e.serialize()).toString("base64"),r=this._buildArgs([n],t),i=Yn(await this._rpcRequest("getFeeForMessage",r),Ps(rr(ir())));if("error"in i)throw new es(i.error,"failed to get fee for message");if(null===i.result)throw new Error("invalid blockhash");return i.result}async getRecentPrioritizationFees(e){var t;const n=null===e||void 0===e||null===(t=e.lockedWritableAccounts)||void 0===t?void 0:t.map(e=>e.toBase58()),r=null!==n&&void 0!==n&&n.length?[n]:[],i=Yn(await this._rpcRequest("getRecentPrioritizationFees",r),Qs);if("error"in i)throw new es(i.error,"failed to get recent prioritization fees");return i.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}=Es(e),r=this._buildArgs([],t,void 0,n),i=Yn(await this._rpcRequest("getLatestBlockhash",r),io);if("error"in i)throw new es(i.error,"failed to get latest blockhash");return i.result}async isBlockhashValid(e,t){const{commitment:n,config:r}=Es(t),i=this._buildArgs([e],n,void 0,r),s=Yn(await this._rpcRequest("isBlockhashValid",i),so);if("error"in s)throw new es(s.error,"failed to determine if the blockhash `"+e+"`is valid");return s.result}async getVersion(){const e=Yn(await this._rpcRequest("getVersion",[]),Ts(Ks));if("error"in e)throw new es(e.error,"failed to get version");return e.result}async getGenesisHash(){const e=Yn(await this._rpcRequest("getGenesisHash",[]),Ts(or()));if("error"in e)throw new es(e.error,"failed to get genesis hash");return e.result}async getBlock(e,t){const{commitment:n,config:r}=Es(t),s=this._buildArgsAtLeastConfirmed([e],n,void 0,r),a=await this._rpcRequest("getBlock",s);
2try{switch(null===r||void 0===r?void 0:r.transactionDetails){case"accounts":{const e=Yn(a,Ja);if("error"in e)throw e.error;return e.result}case"none":{const e=Yn(a,Ga);if("error"in e)throw e.error;return e.result}default:{const e=Yn(a,Ya);if("error"in e)throw e.error;const{result:t}=e;return t?(0,i.A)((0,i.A)({},t),{},{transactions:t.transactions.map(e=>{let{transaction:t,meta:n,version:r}=e;return{meta:n,transaction:(0,i.A)((0,i.A)({},t),{},{message:Is(r,t.message)}),version:r}})}):null}}}catch(o){throw new es(o,"failed to get confirmed block")}}async getParsedBlock(e,t){const{commitment:n,config:r}=Es(t),i=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),s=await this._rpcRequest("getBlock",i);try{switch(null===r||void 0===r?void 0:r.transactionDetails){case"accounts":{const e=Yn(s,Qa);if("error"in e)throw e.error;return e.result}case"none":{const e=Yn(s,Xa);if("error"in e)throw e.error;return e.result}default:{const e=Yn(s,Za);if("error"in e)throw e.error;return e.result}}}catch(a){throw new es(a,"failed to get block")}}async getBlockProduction(e){let t,n;if("string"===typeof e)n=e;else if(e){const{commitment:i}=e;n=i,t=(0,r.A)(e,di)}const i=this._buildArgs([],n,"base64",t),s=Yn(await this._rpcRequest("getBlockProduction",i),Gs);if("error"in s)throw new es(s.error,"failed to get block production information");return s.result}async getTransaction(e,t){const{commitment:n,config:r}=Es(t),s=this._buildArgsAtLeastConfirmed([e],n,void 0,r),a=Yn(await this._rpcRequest("getTransaction",s),no);if("error"in a)throw new es(a.error,"failed to get transaction");const o=a.result;return o?(0,i.A)((0,i.A)({},o),{},{transaction:(0,i.A)((0,i.A)({},o.transaction),{},{message:Is(o.version,o.transaction.message)})}):o}async getParsedTransaction(e,t){const{commitment:n,config:r}=Es(t),i=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),s=Yn(await this._rpcRequest("getTransaction",i),ro);if("error"in s)throw new es(s.error,"failed to get transaction");return s.result}async getParsedTransactions(e,t){const{commitment:n,config:r}=Es(t),i=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r)}));return(await this._rpcBatchRequest(i)).map(e=>{const t=Yn(e,ro);if("error"in t)throw new es(t.error,"failed to get transactions");return t.result})}async getTransactions(e,t){const{commitment:n,config:r}=Es(t),s=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],n,void 0,r)}));return(await this._rpcBatchRequest(s)).map(e=>{const t=Yn(e,no);if("error"in t)throw new es(t.error,"failed to get transactions");const n=t.result;return n?(0,i.A)((0,i.A)({},n),{},{transaction:(0,i.A)((0,i.A)({},n.transaction),{},{message:Is(n.version,n.transaction.message)})}):n})}async getConfirmedBlock(e,t){const n=this._buildArgsAtLeastConfirmed([e],t),r=Yn(await this._rpcRequest("getBlock",n),eo);if("error"in r)throw new es(r.error,"failed to get confirmed block");const s=r.result;if(!s)throw new Error("Confirmed block "+e+" not found");const a=(0,i.A)((0,i.A)({},s),{},{transactions:s.transactions.map(e=>{let{transaction:t,meta:n}=e;const r=new zi(t.message);return{meta:n,transaction:(0,i.A)((0,i.A)({},t),{},{message:r})}})});return(0,i.A)((0,i.A)({},a),{},{transactions:a.transactions.map(e=>{let{transaction:t,meta:n}=e;return{meta:n,transaction:$i.populate(t.message,t.signatures)}})})}async getBlocks(e,t,n){const r=this._buildArgsAtLeastConfirmed(void 0!==t?[e,t]:[e],n),i=Yn(await this._rpcRequest("getBlocks",r),Ts(Qn(ir())));if("error"in i)throw new es(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=Yn(await this._rpcRequest("getBlock",n),to);if("error"in r)throw new es(r.error,"failed to get block");const i=r.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=Yn(await this._rpcRequest("getBlock",n),to);if("error"in r)throw new es(r.error,"failed to get confirmed block");const i=r.result;if(!i)throw new Error("Confirmed block "+e+" not found");return i}async getConfirmedTransaction(e,t){const n=this._buildArgsAtLeastConfirmed([e],t),r=Yn(await this._rpcRequest("getTransaction",n),no);if("error"in r)throw new es(r.error,"failed to get transaction");const s=r.result;if(!s)return s;const a=new zi(s.transaction.message),o=s.transaction.signatures;return(0,i.A)((0,i.A)({},s),{},{transaction:$i.populate(a,o)})}async getParsedConfirmedTransaction(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),r=Yn(await this._rpcRequest("getTransaction",n),ro);if("error"in r)throw new es(r.error,"failed to get confirmed transaction");return r.result}async getParsedConfirmedTransactions(e,t){const n=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],t,"jsonParsed")}));return(await this._rpcBatchRequest(n)).map(e=>{const t=Yn(e,ro);if("error"in t)throw new es(t.error,"failed to get confirmed transactions");return t.result})}async getConfirmedSignaturesForAddress(e,t,n){let r={},i=await this.getFirstAvailableBlock();for(;!("until"in r)&&!(--t<=0||t<i);)try{const e=await this.getConfirmedBlockSignatures(t,"finalized");
2e.signatures.length>0&&(r.until=e.signatures[e.signatures.length-1].toString())}catch(a){if(a instanceof Error&&a.message.includes("skipped"))continue;throw a}let s=await this.getSlot("finalized");for(;!("before"in r)&&!(++n>s);)try{const e=await this.getConfirmedBlockSignatures(n);e.signatures.length>0&&(r.before=e.signatures[e.signatures.length-1].toString())}catch(a){if(a instanceof Error&&a.message.includes("skipped"))continue;throw a}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),i=Yn(await this._rpcRequest("getConfirmedSignaturesForAddress2",r),ga);if("error"in i)throw new es(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),i=Yn(await this._rpcRequest("getSignaturesForAddress",r),ya);if("error"in i)throw new es(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 i=null;return null!==r&&(i=new ws({key:e,state:ws.deserialize(r.data)})),{context:n,value:i}}async getNonceAndContext(e,t){const{context:n,value:r}=await this.getAccountInfoAndContext(e,t);let i=null;return null!==r&&(i=os.fromAccountData(r.data)),{context:n,value:i}}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=Yn(await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),lo);if("error"in n)throw new es(n.error,"airdrop to ".concat(e.toBase58()," failed"));return n.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await ns(100);const e=Date.now()-this._blockhashInfo.lastFetch>=3e4;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 ns(200)}throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-e,"ms"))}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:t,config:n}=Es(e),r=this._buildArgs([],t,"base64",n),i=Yn(await this._rpcRequest("getStakeMinimumDelegation",r),Ps(ir()));if("error"in i)throw new es(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=s.Buffer.from(r).toString("base64");if(Array.isArray(t)||void 0!==n)throw new Error("Invalid arguments");const a=t||{};a.encoding="base64","commitment"in a||(a.commitment=this.commitment),t&&"object"===typeof t&&"innerInstructions"in t&&(a.innerInstructions=t.innerInstructions);const o=[i,a],l=Yn(await this._rpcRequest("simulateTransaction",o),Ys);if("error"in l)throw new Error("failed to simulate transaction: "+l.error.message);return l.result}let r;if(e instanceof $i){let t=e;r=new $i,r.feePayer=t.feePayer,r.instructions=e.instructions,r.nonceInfo=t.nonceInfo,r.signatures=t.signatures}else r=$i.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 a=r._compile(),o=a.serialize(),l=r._serialize(o).toString("base64"),c={encoding:"base64",commitment:this.commitment};if(n){const e=(Array.isArray(n)?n:a.nonProgramIds()).map(e=>
2e.toBase58());c.accounts={encoding:"base64",addresses:e}}i&&(c.sigVerify=!0),t&&"object"===typeof t&&"innerInstructions"in t&&(c.innerInstructions=t.innerInstructions);const u=[l,c],d=Yn(await this._rpcRequest("simulateTransaction",u),Ys);if("error"in d){let e;if("data"in d.error&&(e=d.error.data.logs,e&&Array.isArray(e))){const t="\n ",n=t+e.join(t);console.error(d.error.message,n)}throw new Xi({action:"simulate",signature:"",transactionMessage:d.error.message,logs:e})}return d.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 i=e.signature.toString("base64");if(!this._blockhashInfo.transactionSignatures.includes(i)){this._blockhashInfo.transactionSignatures.push(i);break}t=!0}}const i=e.serialize();return await this.sendRawTransaction(i,n)}async sendRawTransaction(e,t){const n=xi(e).toString("base64");return await this.sendEncodedTransaction(n,t)}async sendEncodedTransaction(e,t){const n={encoding:"base64"},r=t&&t.skipPreflight,i=!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),i&&(n.preflightCommitment=i);const s=[e,n],a=Yn(await this._rpcRequest("sendTransaction",s),co);if("error"in a){let e;throw"data"in a.error&&(e=a.error.data.logs),new Xi({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(e){}})()},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=>{let[t,n]=e;this._setSubscription(t,(0,i.A)((0,i.A)({},n),{},{state:"pending"}))})):this._updateSubscriptions()}_setSubscription(e,t){var n;const r=null===(n=this._subscriptionsByHash[e])||void 0===n?void 0:n.state;if(this._subscriptionsByHash[e]=t,r!==t.state){const n=this._subscriptionStateChangeCallbacksByHash[e];n&&n.forEach(e=>{try{e(t.state)}catch(n){}})}}_onSubscriptionStateChange(e,t){var n;const r=this._subscriptionHashByClientSubscriptionId[e];if(null==r)return()=>{};const i=(n=this._subscriptionStateChangeCallbacksByHash)[r]||(n[r]=new Set);return i.add(t),()=>{i.delete(t),0===i.size&&delete this._subscriptionStateChangeCallbacksByHash[r]}}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: ".concat(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];
2if(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:s}=n;try{this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"subscribing"}));const t=await this._rpcWebSocket.call(s,r);this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{serverSubscriptionId:t,state:"subscribed"})),this._subscriptionCallbacksByServerSubscriptionId[t]=n.callbacks,await this._updateSubscriptions()}catch(a){if(console.error("Received ".concat(a instanceof Error?"":"JSON-RPC ","error calling `").concat(s,"`"),{args:r,error:a}),!t())return;this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"pending"})),await this._updateSubscriptions()}})();break;case"subscribed":0===n.callbacks.size&&await(async()=>{const{serverSubscriptionId:r,unsubscribeMethod:s}=n;if(this._subscriptionsAutoDisposedByRpc.has(r))this._subscriptionsAutoDisposedByRpc.delete(r);else{this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"unsubscribing"})),this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"unsubscribing"}));try{await this._rpcWebSocket.call(s,[r])}catch(a){if(a instanceof Error&&console.error("".concat(s," error:"),a.message),!t())return;return this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"subscribed"})),void await this._updateSubscriptions()}}this._setSubscription(e,(0,i.A)((0,i.A)({},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}=Yn(e,xa);this._handleServerNotification(n,[t.value,t.context])}_makeSubscription(e,t){const n=this._nextClientSubscriptionId++,r=gs([e.method,t]),s=this._subscriptionsByHash[r];return void 0===s?this._subscriptionsByHash[r]=(0,i.A)((0,i.A)({},e),{},{args:t,callbacks:new Set([e.callback]),state:"pending"}):s.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];Ri(void 0!==t,"Could not find a `Subscription` when tearing down client subscription #".concat(n)),t.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),n}onAccountChange(e,t,n){const{commitment:r,config:i}=Es(n),s=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},s)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:t,subscription:n}=Yn(e,ba);this._handleServerNotification(n,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,n,r){const{commitment:i,config:s}=Es(n),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",s||(r?{filters:As(r)}:void 0));return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}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}=Yn(e,ho);this._handleServerNotification(n,[t.value,t.context])}_wsOnSlotNotification(e){const{result:t,subscription:n}=Yn(e,_a);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}=Yn(e,ka);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 "+"`".concat(e,"` for '").concat(t,"' events ")+"could not be found.")}_buildArgs(e,t,n,r){const i=t||this._commitment;if(i||n||r){let t={};n&&(t.encoding=n),i&&(t.commitment=i),r&&(t=Object.assign(t,r)),e.push(t)}return e}_buildArgsAtLeastConfirmed(e,t,n,r){const i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))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}=Yn(e,Na);"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"),i=this._makeSubscription({callback:(e,n)=>{if("status"===e.type){t(e.result,n);try{this.removeSignatureListener(i)}catch(r){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},r);return i}onSignatureWithOptions(e,t,n){const s=(0,i.A)((0,i.A)({},n),{},{commitment:n&&n.commitment||this._commitment||"finalized"}),{commitment:a}=s,o=(0,r.A)(s,hi),l=this._buildArgs([e],a,void 0,o),c=this._makeSubscription({callback:(e,n)=>{t(e,n);try{this.removeSignatureListener(c)}catch(r){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},l);return c}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:t,subscription:n}=Yn(e,Sa);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 mo{constructor(e){this._keypair=void 0,this._keypair=null!==e&&void 0!==e?e:pi()}static generate(){return new mo(pi())}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=fi(t);for(let e=0;e<32;e++)if(n[e]!==r[e])throw new Error("provided secretKey is invali
2d")}return new mo({publicKey:n,secretKey:e})}static fromSeed(e){const t=fi(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),new mo({publicKey:t,secretKey:n})}get publicKey(){return new ki(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const go=Object.freeze({CreateLookupTable:{index:0,layout:fn.w3([fn.DH("instruction"),ls("recentSlot"),fn.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:fn.w3([fn.DH("instruction")])},ExtendLookupTable:{index:2,layout:fn.w3([fn.DH("instruction"),ls(),fn.O6(Mi(),fn.cY(fn.DH(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:fn.w3([fn.DH("instruction")])},CloseLookupTable:{index:4,layout:fn.w3([fn.DH("instruction")])}});class yo{constructor(){}static createLookupTable(e){const[t,n]=ki.findProgramAddressSync([e.authority.toBuffer(),Dn().encode(e.recentSlot)],this.programId),r=rs(go.CreateLookupTable,{recentSlot:BigInt(e.recentSlot),bumpSeed:n}),i=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:us.programId,isSigner:!1,isWritable:!1}];return[new Vi({programId:this.programId,keys:i,data:r}),t]}static freezeLookupTable(e){const t=rs(go.FreezeLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Vi({programId:this.programId,keys:n,data:t})}static extendLookupTable(e){const t=rs(go.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:us.programId,isSigner:!1,isWritable:!1}),new Vi({programId:this.programId,keys:n,data:t})}static deactivateLookupTable(e){const t=rs(go.DeactivateLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Vi({programId:this.programId,keys:n,data:t})}static closeLookupTable(e){const t=rs(go.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 Vi({programId:this.programId,keys:n,data:t})}}yo.programId=new ki("AddressLookupTab1e1111111111111111111111111");const xo=Object.freeze({RequestUnits:{index:0,layout:fn.w3([fn.u8("instruction"),fn.DH("units"),fn.DH("additionalFee")])},RequestHeapFrame:{index:1,layout:fn.w3([fn.u8("instruction"),fn.DH("bytes")])},SetComputeUnitLimit:{index:2,layout:fn.w3([fn.u8("instruction"),fn.DH("units")])},SetComputeUnitPrice:{index:3,layout:fn.w3([fn.u8("instruction"),ls("microLamports")])}});class vo{constructor(){}static requestUnits(e){const t=rs(xo.RequestUnits,e);return new Vi({keys:[],programId:this.programId,data:t})}static requestHeapFrame(e){const t=rs(xo.RequestHeapFrame,e);return new Vi({keys:[],programId:this.programId,data:t})}static setComputeUnitLimit(e){const t=rs(xo.SetComputeUnitLimit,e);return new Vi({keys:[],programId:this.programId,data:t})}static setComputeUnitPrice(e){const t=rs(xo.SetComputeUnitPrice,{microLamports:BigInt(e.microLamports)});return new Vi({keys:[],programId:this.programId,data:t})}}vo.programId=new ki("ComputeBudget111111111111111111111111111111");const bo=fn.w3([fn.u8("numSignatures"),fn.u8("padding"),fn.NX("signatureOffset"),fn.NX("signatureInstructionIndex"),fn.NX("publicKeyOffset"),fn.NX("publicKeyInstructionIndex"),fn.NX("messageDataOffset"),fn.NX("messageDataSize"),fn.NX("messageInstructionIndex")]);class wo{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:t,message:n,signature:r,instructionIndex:i}=e;Ri(32===t.length,"Public Key must be ".concat(32," bytes but received ").concat(t.length," bytes")),Ri(64===r.length,"Signature must be ".concat(64," bytes but received ").concat(r.length," bytes"));const a=bo.span,o=a+t.length,l=o+r.length,c=s.Buffer.alloc(l+n.length),u=null==i?65535:i;return bo.encode({numSignatures:1,padding:0,signatureOffset:o,signatureInstructionIndex:u,publicKeyOffset:a,publicKeyInstructionIndex:u,messageDataOffset:l,messageDataSize:n.length,messageInstructionIndex:u},c),c.fill(t,a),c.fill(r,o),c.fill(n,l),new Vi({keys:[],programId:wo.programId,data:c})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:n,instructionIndex:r}=e;Ri(64===t.length,"Private key must be ".concat(64," bytes but received ").concat(t.length," bytes"));try{const e=mo.fromSecretKey(t),i=e.publicKey.toBytes(),s=gi(n,e.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:s,instructionIndex:r})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}wo.programId=new ki("Ed25519SigVerify111111111111111111111111111");li.utils.isValidPrivateKey;const _o=li.getPublicKey,jo=fn.w3([fn.u8("numSignatures"),fn.NX("signatureOffset"),fn.u8("signatureInstructionIndex"),fn.NX("ethAddressOffset"),fn.u8("ethAddressInstructionIndex"),fn.NX("messageDataOffset"),fn.NX("messageDataSize"),fn.u8("messageInstructionIndex"),fn.av(20,"ethAddress"),fn.av(64,"signature"),fn.u8("recoveryId")]);class ko{constructor(){}static publicKeyToEthAddress(e){Ri(64===e.length,"Public key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{return s.Buffer.from(Dr(xi(e))).slice(-20)}catch(t){throw new Error("Error constructing Ethereum address: ".concat(t))}}static createInstructionWithPublicKey(e){const{publicKey:t,message:n,signature:r,recoveryId:i,instructionIndex:s}=e;return ko.createInstructionWithEthAddress({ethAddress:ko.publicKeyToEthAddress(t),message:n,signature:r,recoveryId:i,instructionIndex:s})}static createInstructionWithEthAddress(e){const{ethAddress:t,message:n,signature:r,recoveryId:i,instructionIndex:a=0}=e;let o;o="string"===typeof t?t.startsWith("0x")?s.Buffer.from(t.substr(2),"hex"):s.Buffer.from(t,"hex"):t,Ri(20===o.length,"Address must be ".concat(20," bytes but received ").concat(o.length," bytes"));const l=12+o.length,c=l+r.length+1,u=s.Buffer.alloc(jo.span+n.length);return jo.encode({numSignatures:1,signatureOffset:l,signatureInstructionIndex:a,ethAddressOffset:12,ethAddressInstructionIndex:a,messageDataOffset:c,messageDataSize:n.length,messageInstructionIndex:a,signature:xi(r),ethAddress:xi(o),recoveryId:i},u),u.fill(xi(n),jo.span),new Vi({keys:[],programId:ko.programId,data:u})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:n,instructionIndex:r}=e;Ri(32===t.length,"Private key must be ".concat(32," bytes but received ").concat(t.length," bytes"));try{const e=xi(t),i=_o(e,!1).slice(1),a=s.Buffer.from(Dr(xi(n))),[o,l]=((e,t)=>{const n=li.sign(e,t);return[n.toCompactRawBytes(),n.recovery]})(a,e);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:o,recoveryId:l,instructionIndex:r})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}var No;ko.programId=new ki("KeccakSecp256k11111111111111111111111111111");const So=new ki("StakeConfig11111111111111111111111111111111");class Eo{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}}No=Eo,Eo.default=new No(0,0,ki.default);const Ao=Object.freeze({Initialize:{index:0,layout:fn.w3([fn.DH("instruction"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"authorized";return fn.w3([Mi("staker"),Mi("withdrawer")],e)}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return fn.w3([fn.Wg("unixTimestamp"),fn.Wg("epoch"),Mi("custodian")],e)}()])},Authorize:{index:1,layout:fn.w3([fn.DH("instruction"),Mi("newAuthorized"),fn.DH("stakeAuthorizationType")])},Delegate:{index:2,layout:fn.w3([fn.DH("instruction")])},Split:{index:3,layout:fn.w3([fn.DH("instruction"),fn.Wg("lamports")])},Withdraw:{index:4,layout:fn.w3([fn.DH("instruction"),fn.Wg("lamports")])},Deactivate:{index:5,layout:fn.w3([fn.DH("instruction")])},Merge:{index:7,layout:fn.w3([fn.DH("instruction")])},AuthorizeWithSeed:{index:8,layout:fn.w3([fn.DH("instruction"),Mi("newAuthorized"),fn.DH("stakeAuthorizationType"),Pi("authoritySeed"),Mi("authorityOwner")])}});Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class Co{constructor(){}static initialize(e){const{stakePubkey:t,authorized:n,lockup:r}=e,i=r||Eo.default,s=rs(Ao.Initialize,{authorized:{staker:xi(n.staker.toBuffer()),withdrawer:xi(n.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:xi(i.custodian.toBuffer())}}),a={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Zi,isSigner:!1,isWritable:!1}],programId:this.programId,data:s};return new Vi(a)}static createAccountWithSeed(e){const t=new $i;t.add(us.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:i}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:i}))}static createAccount(e){const t=new $i;t.add(us.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:n,authorized:r,lockup:i}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:i}))}static delegate(e){const{stakePubkey:t,authorizedPubkey:n,votePubkey:r}=e,i=rs(Ao.Delegate);return(new $i).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:Qi,isSigner:!1,isWritable:!1},{pubkey:So,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static authorize(e){const{stakePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,stakeAuthorizationType:i,custodianPubkey:s}=e,a=rs(Ao.Authorize,{newAuthorized:xi(r.toBuffer()),stakeAuthorizationType:i.index}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Gi,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return s&&o.push({pubkey:s,isSigner:!0,isWritable:!1}),(new $i).add({keys:o,programId:this.programId,data:a})}static authorizeWithSeed(e){const{stakePubkey:t,authorityBase:n,authoritySeed:r,authorityOwner:i,newAuthorizedPubkey:s,stakeAuthorizationType:a,custodianPubkey:o}=e,l=rs(Ao.AuthorizeWithSeed,{newAuthorized:xi(s.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:r,authorityOwner:xi(i.toBuffer())}),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:Gi,isSigner:!1,isWritable:!1}];return o&&c.push({pubkey:o,isSigner:!0,isWritable:!1}),(new $i).add({keys:c,programId:this.programId,data:l})}static splitInstruction(e){const{stakePubkey:t,authorizedPubkey:n,splitStakePubkey:r,lamports:i}=e,s=rs(Ao.Split,{lamports:i});return new Vi({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:s})}static split(e,t){const n=new $i;return n.add(us.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space
2:this.space,programId:this.programId})),n.add(this.splitInstruction(e))}static splitWithSeed(e,t){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:i,basePubkey:s,seed:a,lamports:o}=e,l=new $i;return l.add(us.allocate({accountPubkey:i,basePubkey:s,seed:a,space:this.space,programId:this.programId})),t&&t>0&&l.add(us.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:t})),l.add(this.splitInstruction({stakePubkey:n,authorizedPubkey:r,splitStakePubkey:i,lamports:o}))}static merge(e){const{stakePubkey:t,sourceStakePubKey:n,authorizedPubkey:r}=e,i=rs(Ao.Merge);return(new $i).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:Qi,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static withdraw(e){const{stakePubkey:t,authorizedPubkey:n,toPubkey:r,lamports:i,custodianPubkey:s}=e,a=rs(Ao.Withdraw,{lamports:i}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:Qi,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return s&&o.push({pubkey:s,isSigner:!0,isWritable:!1}),(new $i).add({keys:o,programId:this.programId,data:a})}static deactivate(e){const{stakePubkey:t,authorizedPubkey:n}=e,r=rs(Ao.Deactivate);return(new $i).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}}Co.programId=new ki("Stake11111111111111111111111111111111111111"),Co.space=200;const Mo=Object.freeze({InitializeAccount:{index:0,layout:fn.w3([fn.DH("instruction"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteInit";return fn.w3([Mi("nodePubkey"),Mi("authorizedVoter"),Mi("authorizedWithdrawer"),fn.u8("commission")],e)}()])},Authorize:{index:1,layout:fn.w3([fn.DH("instruction"),Mi("newAuthorized"),fn.DH("voteAuthorizationType")])},Withdraw:{index:3,layout:fn.w3([fn.DH("instruction"),fn.Wg("lamports")])},UpdateValidatorIdentity:{index:4,layout:fn.w3([fn.DH("instruction")])},AuthorizeWithSeed:{index:10,layout:fn.w3([fn.DH("instruction"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteAuthorizeWithSeedArgs";return fn.w3([fn.DH("voteAuthorizationType"),Mi("currentAuthorityDerivedKeyOwnerPubkey"),Pi("currentAuthorityDerivedKeySeed"),Mi("newAuthorized")],e)}()])}});Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class To{constructor(){}static initializeAccount(e){const{votePubkey:t,nodePubkey:n,voteInit:r}=e,i=rs(Mo.InitializeAccount,{voteInit:{nodePubkey:xi(r.nodePubkey.toBuffer()),authorizedVoter:xi(r.authorizedVoter.toBuffer()),authorizedWithdrawer:xi(r.authorizedWithdrawer.toBuffer()),commission:r.commission}}),s={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Zi,isSigner:!1,isWritable:!1},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i};return new Vi(s)}static createAccount(e){const t=new $i;return t.add(us.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:i}=e,s=rs(Mo.Authorize,{newAuthorized:xi(r.toBuffer()),voteAuthorizationType:i.index}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new $i).add({keys:a,programId:this.programId,data:s})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:n,currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:i,voteAuthorizationType:s,votePubkey:a}=e,o=rs(Mo.AuthorizeWithSeed,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:xi(n.toBuffer()),currentAuthorityDerivedKeySeed:r,newAuthorized:xi(i.toBuffer()),voteAuthorizationType:s.index}}),l=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:Gi,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return(new $i).add({keys:l,programId:this.programId,data:o})}static withdraw(e){const{votePubkey:t,authorizedWithdrawerPubkey:n,lamports:r,toPubkey:i}=e,s=rs(Mo.Withdraw,{lamports:r}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return(new $i).add({keys:a,programId:this.programId,data:s})}static safeWithdraw(e,t,n){if(e.lamports>t-n)throw new Error("Withdraw will leave vote account with insufficient funds.");return To.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:t,authorizedWithdrawerPubkey:n,nodePubkey:r}=e,i=rs(Mo.UpdateValidatorIdentity),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new $i).add({keys:s,programId:this.programId,data:i})}}To.programId=new ki("Vote111111111111111111111111111111111111111"),To.space=3762;new ki("Va1idator1nfo111111111111111111111111111111"),cr({name:or(),website:sr(or()),details:sr(or()),iconUrl:sr(or()),keybaseUsername:sr(or())});new ki("Vote111111111111111111111111111111111111111"),fn.w3([Mi("nodePubkey"),Mi("authorizedWithdrawer"),fn.u8("commission"),fn.I0(),fn.O6(fn.w3([fn.I0("slot"),fn.DH("confirmationCount")]),fn.cY(fn.DH(),-8),"votes"),fn.u8("rootSlotValid"),fn.I0("rootSlot"),fn.I0(),fn.O6(fn.w3([fn.I0("epoch"),Mi("authorizedVoter")]),fn.cY(fn.DH(),-8),"authorizedVoters"),fn.w3([fn.O6(fn.w3([Mi("authorizedPubkey"),fn.I0("epochOfLastAuthorizedSwitch"),fn.I0("targetEpoch")]),32,"buf"),fn.I0("idx"),fn.u8("isEmpty")],"priorVoters"),fn.I0(),fn.O6(fn.w3([fn.I0("epoch"),fn.I0("credits"),fn.I0("prevCredits")]),fn.cY(fn.DH(),-8),"epochCredits"),fn.w3([fn.I0("slot"),fn.I0("timestamp")],"lastTimestamp")]);const Po={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 Oo(e,t){const n=!1===t?"http":"https";if(!e)return Po[n].devnet;const r=Po[n][e];if(!r)throw new Error("Unknown ".concat(n," cluster: ").concat(e));return r}},2897:(e,t,n)=>{var r=n(3693);function i(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}
2e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e},e.exports.__esModule=!0,e.exports.default=e.exports},2960:(e,t,n)=>{var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3257:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3272:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toKey=function(e){var t;return"string"===typeof e||"symbol"===typeof e?e:Object.is(null===e||void 0===e||null===(t=e.valueOf)||void 0===t?void 0:t.call(e),-0)?"-0":String(e)}},3305:(e,t,n)=>{"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,{A:()=>r})},3693:(e,t,n)=>{var r=n(7736);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3757:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}},3799:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(4704),i=n(1203),s=n(870),a=n(5093);t.isIterateeCall=function(e,t,n){return!!s.isObject(n)&&(!!("number"===typeof t&&i.isArrayLike(n)&&r.isIndex(t)&&t<n.length||"string"===typeof t&&t in n)&&a.isEqualsSameValueZero(n[t],e))}},3808:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(8268),i=n(5261);t.matches=function(e){return e=i.cloneDeep(e),t=>r.isMatch(t,e)}},3821:(e,t,n)=>{e.exports=n(2204).sortBy},3861:(e,t,n)=>{"use strict";const r=n(5092).v4,i=n(8656),s=function(e,t){if(!(this instanceof s))return new s(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=s,s.prototype.request=function(e,t,n,r){const s=this;let a=null;const o=Array.isArray(e)&&"function"===typeof t;if(1===this.options.version&&o)throw new TypeError("JSON-RPC 1.0 does not support batching");if(o||!o&&e&&"object"===typeof e&&"function"===typeof t)r=t,a=e;else{"function"===typeof n&&(r=n,n=void 0);const s="function"===typeof r;try{a=i(e,t,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(c){if(s)return void r(c);throw c}if(!s)return a}let l;try{l=JSON.stringify(a,this.options.replacer)}catch(c){return void r(c)}return this.callServer(l,function(e,t){s._parseResponse(e,t,r)}),a},s.prototype._parseResponse=function(e,t,n){if(e)return void n(e);if(!t)return void n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(e){return void n(e)}if(3!==n.length)n(null,r);else{if(Array.isArray(r)){const e=function(e){return"undefined"!==typeof e.error},t=function(t){return!e(t)};return void n(null,r.filter(e),r.filter(t))}n(null,r.error,r.result)}}},3986:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{A:()=>r})}
2,4004:(e,t,n)=>{const r=n(7421),i=n(900),s=n(9642),a=n(8697),o=n(5200),l=n(8511),c=n(7969),u=n(7347);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function p(e){const t=h(l.NUMERIC,r.NUMERIC,e),n=h(l.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,s;c.isKanjiModeEnabled()?(i=h(l.BYTE,r.BYTE,e),s=h(l.KANJI,r.KANJI,e)):(i=h(l.BYTE_KANJI,r.BYTE,e),s=[]);return t.concat(n,i,s).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return s.getBitsLength(e);case r.KANJI:return o.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function m(e,t){let n;const l=r.getBestModeForData(e);if(n=r.from(t,l),n!==r.BYTE&&n.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(l));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new s(e);case r.KANJI:return new o(e);case r.BYTE:return new a(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 i=function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:d(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:d(i.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),s=function(e,t){const n={},i={start:{}};let s=["start"];for(let a=0;a<e.length;a++){const o=e[a],l=[];for(let e=0;e<o.length;e++){const c=o[e],u=""+a+e;l.push(u),n[u]={node:c,lastCount:0},i[u]={};for(let e=0;e<s.length;e++){const a=s[e];n[a]&&n[a].node.mode===c.mode?(i[a][u]=f(n[a].lastCount+c.length,c.mode)-f(n[a].lastCount,c.mode),n[a].lastCount+=c.length):(n[a]&&(n[a].lastCount=c.length),i[a][u]=f(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}s=l}for(let r=0;r<s.length;r++)i[s[r]].end=0;return{map:i,table:n}}(i,n),a=u.find_path(s.map,"start","end"),o=[];for(let t=1;t<a.length-1;t++)o.push(s.table[a[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)},[])}(o))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},4114:(e,t,n)=>{const r=n(7645);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},4202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function x(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=y.prototype;var b=v.prototype=new x;b.constructor=v,m(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray,_=Object.prototype.hasOwnProperty,j={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r){var i,s={},a=null,o=null;if(null!=t)for(i in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,i)&&!k.hasOwnProperty(i)&&(s[i]=t[i]);var l=arguments.length-2;if(1===l)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===s[i]&&(s[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:o,props:s,_owner:j.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function A(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function C(e,t,i,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===s?"."+A(l,0):s,w(a)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),C(a,t,i,"",function(e){return e})):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(l=0,s=""===s?".":s+":",w(e))for(var c=0;c<e.length;c++){var u=s+A(o=e[c],c);l+=C(o,t,i,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(o=e.next()).done;)l+=C(o=o.value,t,i,u=s+A(o,c++),a);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function M(e,t,n){if(null==e)return e;var r=[],i=0;return C(e,r,"","",function(e){return t.call(n,e,i++)}),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},O={transition:null},I={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:O,ReactCurrentOwner:j};function L(){throw Error("act(...) is not supported in production builds of React.")}
2t.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=a,t.PureComponent=v,t.StrictMode=s,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.act=L,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),s=e.key,a=e.ref,o=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,o=j.current),void 0!==t.key&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)_.call(t,c)&&!k.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:s,ref:a,props:i,_owner:o}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=N,t.createFactory=function(e){var t=N.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=L,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},4208:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const i=e[r],s=t(i,r,e);n.has(s)||n.set(s,i)}return Array.from(n.values())}},4332:(e,t,n)=>{e.exports=n(5053).uniqBy},4373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4391:(e,t,n)=>{"use strict";var r=n(7950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},4402:(e,t,n)=>{"use strict";function r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function i(e,t){switch(arguments.length){case 0:break;case 1:"function"===typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"===typeof t?this.interpolator(t):this.range(t)}return this}n.d(t,{C:()=>r,K:()=>i})},4445:(e,t)=>{"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=o(e),a=s[0],l=s[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),u=0,d=l>0?a-4:a;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)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],a=16383,o=0,l=r-i;o<l;o+=a)s.push(c(e,o,o+a>
2l?l:o+a));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],r[s.charCodeAt(a)]=a;function o(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 l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function c(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(l(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},4493:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,a){if("function"!==typeof r)throw new TypeError("The listener must be a function");var o=new i(r,s||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.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 i=0,s=r.length,a=new Array(s);i<s;i++)a[i]=r[i].fn;return a},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,s,a){var o=n?n+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,s),!0;case 6:return u.fn.call(u.context,t,r,i,s,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},o.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||a(this,s);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||i&&!o[l].once||r&&o[l].context!==r)&&c.push(o[l]);c.length?this._events[s]=1===c.length?c[0]:c:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},4566: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},4633:(e,t,n)=>{var r=n(5172),i=n(6993),s=n(5869),a=n(887),o=n(1791),l=n(4373),c=n(2960);function u(){"use strict";var t=i(),n=t.m(u),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function f(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,i,s){return t.resultName=i,n(r.d,c(e),s)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,n,r,i){return t.w(f(e),n,r,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)}
2,AsyncIterator:o,async:function(e,t,n,r,i){return(h(t)?a:s)(f(e),t,n,r,i)},keys:l,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},4661: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 i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!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},4704:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n=/^(?:0|[1-9]\d*)$/;t.isIndex=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER;switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return n.test(e)}}},4705:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>s})},4756:(e,t,n)=>{var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},4772:(e,t,n)=>{const r=n(7969),i=n(6272),s=n(4566),a=n(4661),o=n(9382),l=n(9021),c=n(4833),u=n(1805),d=n(8177),h=n(4980),p=n(350),f=n(7421),m=n(4004);function g(e,t,n){const r=e.size,i=p.getEncodedBits(t,n);let s,a;for(s=0;s<15;s++)a=1===(i>>s&1),s<6?e.set(s,8,a,!0):s<8?e.set(s+1,8,a,!0):e.set(r-15+s,8,a,!0),s<8?e.set(8,r-s-1,a,!0):s<9?e.set(8,15-s-1+1,a,!0):e.set(8,15-s-1,a,!0);e.set(r-8,8,1,!0)}function y(e,t,n){const i=new s;n.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(i)});const a=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const o=(a-i.getLengthInBits())/8;for(let r=0;r<o;r++)i.put(r%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),s=u.getTotalCodewordsCount(t,n),a=i-s,o=u.getBlocksCount(t,n),l=i%o,c=o-l,h=Math.floor(i/o),p=Math.floor(a/o),f=p+1,m=h-p,g=new d(m);let y=0;const x=new Array(o),v=new Array(o);let b=0;const w=new Uint8Array(e.buffer);for(let r=0;r<o;r++){const e=r<c?p:f;x[r]=w.slice(y,y+e),v[r]=g.encode(x[r]),y+=e,b=Math.max(b,e)}const _=new Uint8Array(i);let j,k,N=0;for(j=0;j<b;j++)for(k=0;k<o;k++)j<x[k].length&&(_[N++]=x[k][j]);for(j=0;j<m;j++)for(k=0;k<o;k++)_[N++]=v[k][j];return _}(i,e,t)}function x(e,t,n,i){let s;if(Array.isArray(e))s=m.fromArray(e);else{if("string"!==typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=m.rawSplit(e);r=h.getBestVersionForData(t,n)}s=m.fromString(e,r||40)}}const u=h.getBestVersionForData(s,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const d=y(t,n,s),p=r.getSymbolSize(t),f=new a(p);return function(e,t){const n=e.size,r=l.getPositions(t);for(let i=0;i<r.length;i++){const t=r[i][0],s=r[i][1];for(let r=-1;r<=7;r++)if(!(t+r<=-1||n<=t+r))for(let i=-1;i<=7;i++)s+i<=-1||n<=s+i||(r>=0&&r<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===r||6===r)||r>=2&&r<=4&&i>
2=2&&i<=4?e.set(t+r,s+i,!0,!0):e.set(t+r,s+i,!1,!0))}}(f,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)}}(f),function(e,t){const n=o.getPositions(t);for(let r=0;r<n.length;r++){const t=n[r][0],i=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,i+r,!0,!0):e.set(t+n,i+r,!1,!0)}}(f,t),g(f,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let i,s,a;for(let o=0;o<18;o++)i=Math.floor(o/3),s=o%3+n-8-3,a=1===(r>>o&1),e.set(i,s,a,!0),e.set(s,i,a,!0)}(f,t),function(e,t){const n=e.size;let r=-1,i=n-1,s=7,a=0;for(let o=n-1;o>0;o-=2)for(6===o&&o--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,o-n)){let r=!1;a<t.length&&(r=1===(t[a]>>>s&1)),e.set(i,o-n,r),s--,-1===s&&(a++,s=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(f,d),isNaN(i)&&(i=c.getBestMask(f,g.bind(null,f,n))),c.applyMask(i,f),g(f,n,i),{modules:f,version:t,errorCorrectionLevel:n,maskPattern:i,segments:s}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,s,a=i.M;return"undefined"!==typeof t&&(a=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),s=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),x(e,n,a,s)}},4803:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isPrimitive=function(e){return null==e||"object"!==typeof e&&"function"!==typeof e}},4830:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.debounce=function(e,t){let n,{signal:r,edges:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=null;const a=null!=i&&i.includes("leading"),o=null==i||i.includes("trailing"),l=()=>{null!==s&&(e.apply(n,s),n=void 0,s=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,o&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),n=void 0,s=null},h=function(){if(null!==r&&void 0!==r&&r.aborted)return;n=this;for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];s=t;const o=null==c;u(),a&&o&&l()};return h.schedule=u,h.cancel=d,h.flush=()=>{l()},null===r||void 0===r||r.addEventListener("abort",d,{once:!0}),h}},4833:(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,i=40,s=10;function a(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,i=0,s=0,a=null,o=null;for(let l=0;l<t;l++){i=s=0,a=o=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===a?i++:(i>=5&&(r+=n+(i-5)),a=t,i=1),t=e.get(c,l),t===o?s++:(s>=5&&(r+=n+(s-5)),o=t,s=1)}i>=5&&(r+=n+(i-5)),s>=5&&(r+=n+(s-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,s=0;for(let i=0;i<t;i++){r=s=0;for(let a=0;a<t;a++)r=r<<1&2047|e.get(i,a),a>=10&&(1488===r||93===r)&&n++,s=s<<1&2047|e.get(a,i),a>=10&&(1488===s||93===s)&&n++}return n*i},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)*s},t.applyMask=function(e,t){const n=t.size;
2for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,a(e,i,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,s=1/0;for(let a=0;a<r;a++){n(a),t.applyMask(a,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),r<s&&(s=r,i=a)}return i}},4879:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(6770);t.toFinite=function(e){if(!e)return 0===e?e:0;if((e=r.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e===e?e:0}},4925:(e,t,n)=>{"use strict";var r=n(9966).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 i=0;i<e.length;i++){var s=e.charAt(i),a=s.charCodeAt(0);if(255!==t[a])throw new TypeError(s+" is ambiguous");t[a]=i}var o=e.length,l=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function d(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);for(var n=0,i=0,s=0;e[n]===l;)i++,n++;for(var a=(e.length-n)*c+1>>>0,u=new Uint8Array(a);n<e.length;){var d=e.charCodeAt(n);if(d>255)return;var h=t[d];if(255===h)return;for(var p=0,f=a-1;(0!==h||p<s)&&-1!==f;f--,p++)h+=o*u[f]>>>0,u[f]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");s=p,n++}for(var m=a-s;m!==a&&0===u[m];)m++;var g=r.allocUnsafe(i+(a-m));g.fill(0,0,i);for(var y=i;m!==a;)g[y++]=u[m++];return g}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,i=0,s=0,a=t.length;s!==a&&0===t[s];)s++,n++;for(var c=(a-s)*u+1>>>0,d=new Uint8Array(c);s!==a;){for(var h=t[s],p=0,f=c-1;(0!==h||p<i)&&-1!==f;f--,p++)h+=256*d[f]>>>0,d[f]=h%o>>>0,h=h/o>>>0;if(0!==h)throw new Error("Non-zero carry");i=p,s++}for(var m=c-i;m!==c&&0===d[m];)m++;for(var g=l.repeat(n);m<c;++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"+o+" character")}}}},4980:(e,t,n)=>{const r=n(7969),i=n(1805),s=n(6272),a=n(7421),o=n(3257),l=r.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){const r=c(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!o.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=a.BYTE);const s=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===a.MIXED)return s;const l=s-c(n,e);switch(n){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,a.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},5007:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});const r="solana:signAndSendTransaction"},5043:(e,t,n)=>{"use strict";e.exports=n(4202)},5053:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(4208),i=n(9903),s=n(9599),a=n(2104),o=n(2715);t.uniqBy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.identity;return a.isArrayLikeObject(e)?r.uniqBy(Array.from(e),i.ary(o.iteratee(t),1)):[]}},5082:(e,t)=>{"use strict";var n=60103,r=60106,i=60107,s=60108,a=60114,o=60109,l=60110,c=60112,u=60113,d=60120,h=60115,p=60116,f=60121,m=60122,g=60117,y=60129,x=60131;if("function"===typeof Symbol&&Symbol.for){var v=Symbol.for;n=v("react.element"),r=v("react.portal"),i=v("react.fragment"),s=v("react.strict_mode"),a=v("react.profiler"),o=v("react.provider"),l=v("react.context"),c=v("react.forward_ref"),u=v("react.suspense"),d=v("react.suspense_list"),h=v("react.memo"),p=v("react.lazy"),f=v("react.block"),m=v("react.server.block"),g=v("react.fundamental"),y=v("react.debug_trace_mode"),x=v("react.legacy_hidden")}function b(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case s:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case p:case h:case o:return e;default:return t}}case r:return t}}}
2t.isFragment=function(e){return b(e)===i}},5092:(e,t,n)=>{"use strict";var r;n.d(t,{v4:()=>d});var i=new Uint8Array(16);function s(){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(i)}const a=/^(?:[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;const o=function(e){return"string"===typeof e&&a.test(e)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!o(n))throw TypeError("Stringified UUID is invalid");return n};const d=function(e,t,n){var r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},5093:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}},5172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},5173:(e,t,n)=>{e.exports=n(1497)()},5186:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,h:()=>c});class r extends Map{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(i(this,e))}has(e){return super.has(i(this,e))}set(e,t){return super.set(s(this,e),t)}delete(e){return super.delete(a(this,e))}}Set;function i(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)?n.get(i):t}function s(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)?n.get(i):(n.set(i,t),t)}function a(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)&&(t=n.get(i),n.delete(i)),t}function o(e){return null!==e&&"object"===typeof e?e.valueOf():e}var l=n(4402);const c=Symbol("implicit");function u(){var e=new r,t=[],n=[],i=c;function s(r){let s=e.get(r);if(void 0===s){if(i!==c)return i;e.set(r,s=t.push(r)-1)}return n[s%n.length]}return s.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return s},s.range=function(e){return arguments.length?(n=Array.from(e),s):n.slice()},s.unknown=function(e){return arguments.length?(i=e,s):i},s.copy=function(){return u(t,n).unknown(i)},l.C.apply(s,arguments),s}},5200:(e,t,n)=>{const r=n(7421),i=n(7969);function s(e){this.mode=r.KANJI,this.data=e}s.getBitsLength=function(e){return 13*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.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=s},5206:(e,t,n)=>{"use strict";function r(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function s(){}n.d(t,{Ay:()=>w,Qh:()=>k});var a=.7,o=1/a,l="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\(".concat(l,",").concat(l,",").concat(l,"\\)$")),p=new RegExp("^rgb\\(".concat(u,",").concat(u,",").concat(u,"\\)$")),f=new RegExp("^rgba\\(".concat(l,",").concat(l,",").concat(l,",").concat(c,"\\)$")),m=new RegExp("^rgba\\(".concat(u,",").concat(u,",").concat(u,",").concat(c,"\\)$")),g=new RegExp("^hsl\\(".concat(c,",").concat(u,",").concat(u,"\\)$")),y=new RegExp("^hsla\\(".concat(c,",").concat(u,",").concat(u,",").concat(c,"\\)$")),x={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function w(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=d.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?_(t):3===n?
2new N(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?j(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?j(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=h.exec(e))?new N(t[1],t[2],t[3],1):(t=p.exec(e))?new N(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=f.exec(e))?j(t[1],t[2],t[3],t[4]):(t=m.exec(e))?j(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?T(t[1],t[2]/100,t[3]/100,1):(t=y.exec(e))?T(t[1],t[2]/100,t[3]/100,t[4]):x.hasOwnProperty(e)?_(x[e]):"transparent"===e?new N(NaN,NaN,NaN,0):null}function _(e){return new N(e>>16&255,e>>8&255,255&e,1)}function j(e,t,n,r){return r<=0&&(e=t=n=NaN),new N(e,t,n,r)}function k(e,t,n,r){return 1===arguments.length?((i=e)instanceof s||(i=w(i)),i?new N((i=i.rgb()).r,i.g,i.b,i.opacity):new N):new N(e,t,n,null==r?1:r);var i}function N(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function S(){return"#".concat(M(this.r)).concat(M(this.g)).concat(M(this.b))}function E(){const e=A(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(C(this.r),", ").concat(C(this.g),", ").concat(C(this.b)).concat(1===e?")":", ".concat(e,")"))}function A(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function C(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M(e){return((e=C(e))<16?"0":"")+e.toString(16)}function T(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new O(e,t,n,r)}function P(e){if(e instanceof O)return new O(e.h,e.s,e.l,e.opacity);if(e instanceof s||(e=w(e)),!e)return new O;if(e instanceof O)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,c=(a+i)/2;return l?(o=t===a?(n-r)/l+6*(n<r):n===a?(r-t)/l+2:(t-n)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new O(o,l,c,e.opacity)}function O(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function I(e){return(e=(e||0)%360)<0?e+360:e}function L(e){return Math.max(0,Math.min(1,e||0))}function R(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}r(s,w,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v,formatHex:v,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return P(this).formatHsl()},formatRgb:b,toString:b}),r(N,k,i(s,{brighter(e){return e=null==e?o:Math.pow(o,e),new N(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new N(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new N(C(this.r),C(this.g),C(this.b),A(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:S,formatHex:S,formatHex8:function(){return"#".concat(M(this.r)).concat(M(this.g)).concat(M(this.b)).concat(M(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:E,toString:E})),r(O,function(e,t,n,r){return 1===arguments.length?P(e):new O(e,t,n,null==r?1:r)},i(s,{brighter(e){return e=null==e?o:Math.pow(o,e),new O(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new O(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new N(R(e>=240?e-240:e+120,i,r),R(e,i,r),R(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new O(I(this.h),L(this.s),L(this.l),A(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=A(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(I(this.h),", ").concat(100*L(this.s),"%, ").concat(100*L(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}))},5261:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(6433);t.cloneDeep=function(e){return r.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}},5303:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(2489),i=n(4704),s=n(6321),a=n(1444);t.has=function(e,t){let n;if(n=Array.isArray(t)?t:"string"===typeof t&&r.isDeepKey(t)&&null==(null===e||void 0===e?void 0:e[t])?a.toPath(t):[t],0===n.length)return!1;let o=e;for(let r=0;r<n.length;r++){const e=n[r];if(null==o||!Object.hasOwn(o,e)){if(!((Array.isArray(o)||s.isArguments(o))&&i.isIndex(e)&&e<o.length))return!1}o=o[e]}return!0}},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(9709),i=n(7043),s=n(1444);t.orderBy=function(e,t,n,a){if(null==e)return[];n=a?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=null==t?[null]:[t]),0===t.length&&(t=[null]),Array.isArray(n)||(n=null==n?[]:[n]),n=n.map(e=>String(e));const o=(e,t)=>{let n=e;for(let r=0;r<t.length&&null!=n;++r)n=n[t[r]];return n},l=t.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"===typeof e||Array.isArray(e)||i.isKey(e)?e:{key:e,path:s.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>((e,t)=>null==t||null==e?t:"object"===typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:o(t,e.path):"function"===typeof e?e(t):Array.isArray(e)?o(t,e):"object"===typeof t?t[e]:t)(t,e))})).slice().sort((e,t)=>
2{for(let i=0;i<l.length;i++){const s=r.compareValues(e.criteria[i],t.criteria[i],n[i]);if(0!==s)return s}return 0}).map(e=>e.original)}},5365:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c});var r=n(5206);function i(e,t,n,r,i){var s=e*e,a=s*e;return((1-3*e+3*s-a)*t+(4-6*s+3*a)*n+(1+3*e+3*s-3*a)*r+a*i)/6}var s=n(8419);function a(e,t){return function(n){return e+n*t}}function o(e){return 1===(e=+e)?l:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):(0,s.A)(isNaN(t)?n:t)}}function l(e,t){var n=t-e;return n?a(e,n):(0,s.A)(isNaN(e)?t:e)}const c=function e(t){var n=o(t);function i(e,t){var i=n((e=(0,r.Qh)(e)).r,(t=(0,r.Qh)(t)).r),s=n(e.g,t.g),a=n(e.b,t.b),o=l(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=s(t),e.b=a(t),e.opacity=o(t),e+""}}return i.gamma=e,i}(1);function u(e){return function(t){var n,i,s=t.length,a=new Array(s),o=new Array(s),l=new Array(s);for(n=0;n<s;++n)i=(0,r.Qh)(t[n]),a[n]=i.r||0,o[n]=i.g||0,l[n]=i.b||0;return a=e(a),o=e(o),l=e(l),i.opacity=1,function(e){return i.r=a(e),i.g=o(e),i.b=l(e),i+""}}}u(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),s=e[r],a=e[r+1],o=r>0?e[r-1]:2*s-a,l=r<t-1?e[r+2]:2*a-s;return i((n-r/t)*t,o,s,a,l)}}),u(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),s=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],l=e[(r+2)%t];return i((n-r/t)*t,s,a,o,l)}})},5414:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(1293);t.throttle=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{leading:i=!0,trailing:s=!0}=n;return r.debounce(e,t,{leading:i,maxWait:t,trailing:s})}},5487:(e,t,n)=>{const r=n(8293);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function s(e,t,n){let r=e+t;return"undefined"!==typeof n&&(r+=" "+n),r}t.render=function(e,t,n){const a=r.getOptions(t),o=e.modules.size,l=e.modules.data,c=o+2*a.margin,u=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+i(a.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,a=!1,o=0;for(let l=0;l<e.length;l++){const c=Math.floor(l%t),u=Math.floor(l/t);c||a||(a=!0),e[l]?(o++,l>0&&c>0&&e[l-1]||(r+=a?s("M",c+n,.5+u+n):s("m",i,0),i=0,a=!1),c+1<t&&e[l+1]||(r+=s("h",o),o=0)):i++}return r}(l,o,a.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"===typeof n&&n(null,p),p}},5508:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(6433),i=n(5990),s=n(7599);t.cloneDeepWith=function(e,t){return r.cloneDeepWith(e,(n,a,o,l)=>{const c=null===t||void 0===t?void 0:t(n,a,o,l);if(void 0!==c)return c;if("object"===typeof e){if(i.getTag(e)===s.objectTag&&"function"!==typeof e.constructor){const t={};return l.set(e,t),r.copyProperties(t,e,o,l),t}switch(Object.prototype.toString.call(e)){case s.numberTag:case s.stringTag:case s.booleanTag:{const t=new e.constructor(null===e||void 0===e?void 0:e.valueOf());return r.copyProperties(t,e),t}case s.argumentsTag:{const t={};return r.copyProperties(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}},5546:e=>{function t(n,r,i,s){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,i){function s(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(s("next",0),s("throw",1),s("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,s)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5869:(e,t,n)=>{var r=n(887);e.exports=function(e,t,n,i,s){var a=r(e,t,n,i,s);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},5913:(e,t,n)=>{var r=n(7970);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},5990:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
2),t.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}},6060:function(e,t,n){"use strict";var r=n(6382).Buffer,i=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]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},o=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)&&i(t,e,n);return s(t,e),t},l=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 c=l(n(6373)),u=l(n(9810)),d=o(n(8068)),h=new("function"!==typeof TextDecoder?d.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"===typeof e&&(e=r.from(e,"utf8")),u.default.encode(r.from(e))},t.baseDecode=function(e){return r.from(u.default.decode(e))};const p=1024;class f 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=f;class m{constructor(){this.buf=r.alloc(p),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=r.concat([this.buf,r.alloc(p)]))}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 c.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(r.from(new c.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(r.from(new c.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(r.from(new c.default(e).toArray("le",64)))}writeBuffer(e){this.buf=r.concat([r.from(this.buf.subarray(0,this.length)),e,r.alloc(p)]),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(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)}catch(i){if(i instanceof RangeError){const e=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new f("Reached the end of buffer when deserializing")}throw i}}}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 c.default(e,"le")}readU128(){const e=this.readBuffer(16);return new c.default(e,"le")}readU256(){const e=this.readBuffer(32);return new c.default(e,"le")}readU512(){const e=this.readBuffer(64);return new c.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new f("Expected buffer length ".concat(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 h.decode(t)}catch(n){throw new f("Error decoding UTF-8 string: ".concat(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 x(e){return e.charAt(0).toUpperCase()+e.slice(1)}function v(e,t,n,r,i){try{if("string"===typeof r)i["write".concat(x(r))](n);else if(r instanceof Array)if("number"===typeof r[0]){if(n.length!==r[0])throw new f("Expecting byte array of length ".concat(r[0],", but got ").concat(n.length," bytes"));i.writeFixedArray(n)}else if(2===r.length&&"number"===typeof r[1]){if(n.length!==r[1])throw new f("Expecting byte array of length ".concat(r[1],", but got ").concat(n.length," bytes"));for(let t=0;t<r[1];t++)v(e,null,n[t],r[0],i)}else i.writeArray(n,n=>{v(e,t,n,r[0],i)});else if(void 0!==r.kind)switch(r.kind){case"option":null===n||void 0===n?i.writeU8(0):(i.writeU8(1),v(e,t,n,r.type,i));break;
2case"map":i.writeU32(n.size),n.forEach((n,s)=>{v(e,t,s,r.key,i),v(e,t,n,r.value,i)});break;default:throw new f("FieldType ".concat(r," unrecognized"))}else b(e,n,i)}catch(s){throw s instanceof f&&s.addToFieldPath(t),s}}function b(e,t,n){if("function"===typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new f("Class ".concat(t.constructor.name," is missing in schema"));if("struct"===r.kind)r.fields.map(r=>{let[i,s]=r;v(e,i,t[i],s,n)});else{if("enum"!==r.kind)throw new f("Unexpected schema kind: ".concat(r.kind," for ").concat(t.constructor.name));{const i=t[r.field];for(let s=0;s<r.values.length;++s){const[a,o]=r.values[s];if(a===i){n.writeU8(s),v(e,a,t[a],o,n);break}}}}}function w(e,t,n,r){try{if("string"===typeof n)return r["read".concat(x(n))]();if(n instanceof Array){if("number"===typeof n[0])return r.readFixedArray(n[0]);if("number"===typeof n[1]){const t=[];for(let i=0;i<n[1];i++)t.push(w(e,null,n[0],r));return t}return r.readArray(()=>w(e,t,n[0],r))}if("option"===n.kind){return r.readU8()?w(e,t,n.type,r):void 0}if("map"===n.kind){let i=new Map;const s=r.readU32();for(let a=0;a<s;a++){const s=w(e,t,n.key,r),a=w(e,t,n.value,r);i.set(s,a)}return i}return _(e,n,r)}catch(i){throw i instanceof f&&i.addToFieldPath(t),i}}function _(e,t,n){if("function"===typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new f("Class ".concat(t.name," is missing in schema"));if("struct"===r.kind){const r={};for(const[i,s]of e.get(t).fields)r[i]=w(e,i,s,n);return new t(r)}if("enum"===r.kind){const i=n.readU8();if(i>=r.values.length)throw new f("Enum index: ".concat(i," is out of range"));const[s,a]=r.values[i],o=w(e,s,a,n);return new t({[s]:o})}throw new f("Unexpected schema kind: ".concat(r.kind," for ").concat(t.constructor.name))}a([g],y.prototype,"readU8",null),a([g],y.prototype,"readU16",null),a([g],y.prototype,"readU32",null),a([g],y.prototype,"readU64",null),a([g],y.prototype,"readU128",null),a([g],y.prototype,"readU256",null),a([g],y.prototype,"readU512",null),a([g],y.prototype,"readString",null),a([g],y.prototype,"readFixedArray",null),a([g],y.prototype,"readArray",null),t.BinaryReader=y,t.serialize=function(e,t){const n=new(arguments.length>2&&void 0!==arguments[2]?arguments[2]:m);return b(e,t,n),n.toArray()},t.deserialize=function(e,t,n){const r=new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:y)(n),i=_(e,t,r);if(r.offset<n.length)throw new f("Unexpected ".concat(n.length-r.offset," bytes after deserialized data"));return i},t.deserializeUnchecked=function(e,t,n){return _(e,t,new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:y)(n))}},6116:e=>{e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},6272:(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}}},6321:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(5990);t.isArguments=function(e){return null!==e&&"object"===typeof e&&"[object Arguments]"===r.getTag(e)}},6366:e=>{var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,i="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function s(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var o,l,c,u;if(Array.isArray(e)){if((o=e.length)!=a.length)return!1;for(l=o;0!==l--;)if(!s(e[l],a[l]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!s(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((o=e.length)!=a.length)return!1;for(l=o;0!==l--;)if(e[l]!==a[l])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"===typeof e.valueOf&&"function"===typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"===typeof e.toString&&"function"===typeof a.toString)return e.toString()===a.toString();if((o=(c=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(l=o;0!==l--;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=o;0!==l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!s(e[c[l]],a[c[l]]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return s(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},6373:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.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 a;
vendor: 4,489 bytes, line 2
2"object"===typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(7790).Buffer}catch(A){}function o(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 l(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function c(e,t,n,i){for(var s=0,a=0,o=Math.min(e.length,n),l=t;l<o;l++){var c=e.charCodeAt(l)-48;s*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a<i,"Invalid character"),s+=a}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"===typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.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 i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.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)},s.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 i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},s.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 i,s=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2===0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,l=0,u=n;u<o;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},s.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},s.prototype._move=function(e){u(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(A){s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","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"],p=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 6,101 bytes, line 2
2777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],l=(16777215&(o<<i|s)).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==s||a!==this.length-1?h[6-l.length]+l+n:l+n}for(0!==s&&(n=s.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 c=p[e],u=f[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);n=(d=d.idivn(u)).isZero()?m+n:h[c-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")},s.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},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),s.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 i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,l=a/67108864|0;n.words[0]=o;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var f=c-p|0;u+=(a=(i=0|e.words[f])*(s=0|t.words[p])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===s?(n<e.length&&(e[n++]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===s?(n>=0&&(e[n--]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.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},s.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},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.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},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.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()},s.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.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()},s.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.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()},s.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.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 i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},s.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 i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>
vendor: 5,785 bytes, line 2
2>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.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)},s.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,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(t=(0|n.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<n.length;a++)s=(t=(0|n.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,s,a=e.words,o=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,h=u>>>13,p=0|a[1],f=8191&p,m=p>>>13,g=0|a[2],y=8191&g,x=g>>>13,v=0|a[3],b=8191&v,w=v>>>13,_=0|a[4],j=8191&_,k=_>>>13,N=0|a[5],S=8191&N,E=N>>>13,A=0|a[6],C=8191&A,M=A>>>13,T=0|a[7],P=8191&T,O=T>>>13,I=0|a[8],L=8191&I,R=I>>>13,D=0|a[9],B=8191&D,F=D>>>13,U=0|o[0],z=8191&U,q=U>>>13,W=0|o[1],H=8191&W,K=W>>>13,V=0|o[2],$=8191&V,Y=V>>>13,G=0|o[3],J=8191&G,Z=G>>>13,Q=0|o[4],X=8191&Q,ee=Q>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],le=8191&oe,ce=oe>>>13,ue=0|o[8],de=8191&ue,he=ue>>>13,pe=0|o[9],fe=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(h,z)|0))<<13)|0;c=((s=Math.imul(h,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,z),i=(i=Math.imul(f,q))+Math.imul(m,z)|0,s=Math.imul(m,q);var ye=(c+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,H)|0))<<13)|0;c=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(x,z)|0,s=Math.imul(x,q),r=r+Math.imul(f,H)|0,i=(i=i+Math.imul(f,K)|0)+Math.imul(m,H)|0,s=s+Math.imul(m,K)|0;var xe=(c+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(h,$)|0))<<13)|0;c=((s=s+Math.imul(h,Y)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(w,z)|0,s=Math.imul(w,q),r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(x,H)|0,s=s+Math.imul(x,K)|0,r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,Y)|0;var ve=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(h,J)|0))<<13)|0;c=((s=s+Math.imul(h,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(k,z)|0,s=Math.imul(k,q),r=r+Math.imul(b,H)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(w,H)|0,s=s+Math.imul(w,K)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(x,$)|0,s=s+Math.imul(x,Y)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,Z)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,Z)|0;var be=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(S,z),i=(i=Math.imul(S,q))+Math.imul(E,z)|0,s=Math.imul(E,q),r=r+Math.imul(j,H)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(k,H)|0,s=s+Math.imul(k,K)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(w,$)|0,s=s+Math.imul(w,Y)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Z)|0,r=r+Math.imul(f,X)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(h,ne)|0))<<13)|0;c=((s=s+Math.imul(h,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(M,z)|0,s=Math.imul(M,q),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(E,H)|0,s=s+Math.imul(E,K)|0,r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(k,$)|0,s=s+Math.imul(k,Y)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,Z)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(c+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(h,se)|0))<<13)|0;c=((s=s+Math.imul(h,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,z),i=(i=Math.imul(P,q))+Math.imul(O,z)|0,s=Math.imul(O,q),r=r+Math.imul(C,H)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(M,H)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,$)|0,s=s+Math.imul(E,Y)|0,r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(k,J)|0,s=s+Math.imul(k,Z)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,X)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var je=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(h,le)|0))<<13)|0;c=((s=s+Math.imul(h,ce)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(R,z)|0,s=Math.imul(R,q),r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(O,H)|0,s=s+Math.imul(O,K)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,Y)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,Z)|0,r=r+Math.imul(j,
vendor: 8,505 bytes, line 2
2X)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(k,X)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,ae)|0,r=r+Math.imul(f,le)|0,i=(i=i+Math.imul(f,ce)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ce)|0;var ke=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;c=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(F,z)|0,s=Math.imul(F,q),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(R,H)|0,s=s+Math.imul(R,K)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(O,$)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,Z)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(E,X)|0,s=s+Math.imul(E,ee)|0,r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(b,se)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,ae)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(x,le)|0,s=s+Math.imul(x,ce)|0,r=r+Math.imul(f,de)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,he)|0;var Ne=(c+(r=r+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(h,fe)|0))<<13)|0;c=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,K))+Math.imul(F,H)|0,s=Math.imul(F,K),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(R,$)|0,s=s+Math.imul(R,Y)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Z)|0,r=r+Math.imul(C,X)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(E,ne)|0,s=s+Math.imul(E,re)|0,r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,ae)|0,r=r+Math.imul(b,le)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,le)|0,s=s+Math.imul(w,ce)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,he)|0;var Se=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,Y))+Math.imul(F,$)|0,s=Math.imul(F,Y),r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(R,J)|0,s=s+Math.imul(R,Z)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,X)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,ae)|0,r=r+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(k,le)|0,s=s+Math.imul(k,ce)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(w,de)|0,s=s+Math.imul(w,he)|0;var Ee=(c+(r=r+Math.imul(y,fe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(x,fe)|0))<<13)|0;c=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,Z))+Math.imul(F,J)|0,s=Math.imul(F,Z),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,ae)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(E,le)|0,s=s+Math.imul(E,ce)|0,r=r+Math.imul(j,de)|0,i=(i=i+Math.imul(j,he)|0)+Math.imul(k,de)|0,s=s+Math.imul(k,he)|0;var Ae=(c+(r=r+Math.imul(b,fe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,ee))+Math.imul(F,X)|0,s=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(R,ne)|0,s=s+Math.imul(R,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ce)|0,r=r+Math.imul(S,de)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(E,de)|0,s=s+Math.imul(E,he)|0;var Ce=(c+(r=r+Math.imul(j,fe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(k,fe)|0))<<13)|0;c=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(F,ne)|0,s=Math.imul(F,re),r=r+Math.imul(L,se)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,ae)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(O,le)|0,s=s+Math.imul(O,ce)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(M,de)|0,s=s+Math.imul(M,he)|0;var Me=(c+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(E,fe)|0))<<13)|0;c=((s=s+Math.imul(E,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,ae))+Math.imul(F,se)|0,s=Math.imul(F,ae),r=r+Math.imul(L,le)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ce)|0,r=r+Math.imul(P,de)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,he)|0;var Te=(c+(r=r+Math.imul(C,fe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,ce))+Math.imul(F,le)|0,s=Math.imul(F,ce),r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,he)|0)+Math.imul(R,de)|0,s=s+Math.imul(R,he)|0;var Pe=(c+(r=r+Math.imul(P,fe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;c=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,de),i=(i=Math.imul(B,he))+Math.imul(F,de)|0,s=Math.imul(F,he);var Oe=(c+(r=r+Math.imul(L,fe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(R,fe)|0))<<13)|0;c=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Ie=(c+(r=Math.imul(B,fe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(F,fe)|0))<<13)|0;return c=((s=Math.imul(F,me))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,l[0]=ge,l[1]=ye,l[2]=xe,l[3]=ve,l[4]=be,l[5]=we,l[6]=_e,l[7]=je,l[8]=ke,l[9]=Ne,l[10]=Se,l[11]=Ee,l[12]=Ae,l[13]=Ce,l[14]=Me,l[15]=Te,l[16]=Pe,l[17]=Oe,l[18]=Ie,0!==c&&(l[19]=c,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var a=i;i=0;for(var o=67108863&r,l=Math.min(s,t.length-1),c=Math.max(0,s-e.length+1);c<=l;c++){var u=s-c,d=(0|e.words[u])*(0|t.words[c]),h=67108863&d;o=67108863&(h=h+o|0),i+=(a=(a=a+(d/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function x(e,t,n){return y(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),s.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):x(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.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,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},v.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a<s;a++)r[a]=t[e[a]],i[a]=n[e[a]]},v.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,l=Math.cos(2*Math.PI/o),c=Math.sin(2*Math.PI/o),u=0;u<i;u+=o)for(var d=l,h=c,p=0;p<a;p++){var f=n[u+p],m=r[u+p],g=n[u+p+a],y=r[u+p+a],x=d*g-h*y;y=d*y+h*g,g=x,n[u+p]=f+g,r[u+p]=m+y,n[u+p+a]=f-g,r[u+p+a]=m-y,p!==o&&(x=l*d-c*h,h=l*h+c*d,d=x)}},v.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},v.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},v.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,n,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],n[2*a]=8191&s,s>>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===s),r(0===(-8192&s))},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),i=this.makeRBT(r),s=this.stub(r),a=new Array(r),o=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),h=n.words;h.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,s,o,l,r,i),this.transform(c,s,u,d,r,i);for(var p=0;p<r;
vendor: 18,518 bytes, line 2
2p++){var f=o[p]*u[p]-l[p]*d[p];l[p]=o[p]*d[p]+l[p]*u[p],o[p]=f}return this.conjugate(o,l,r),this.transform(o,l,h,s,r,i),this.conjugate(h,s,r),this.normalize13b(h,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),x(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"===typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,a=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.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,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"===typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,l=(0|this.words[t])-o<<n;this.words[t]=l|a,a=o>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,l=n;if(i-=a,i=Math.max(0,i),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-s|d>>>s,u=d&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.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 i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.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)},s.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},s.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()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,a=e.length+n;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+o;var l=(0|e.words[i])*t;o=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)o=(s=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&s;if(0===o)return this._strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var o,l=r.length-i.length;if("mod"!==t){(o=new s(null)).length=l+1,o.words=new Array(o.length);for(var c=0;c<o.length;c++)o.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,o&&(o.words[l]=1));for(var d=l-1;d>=0;d--){var h=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,d);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=h)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,o},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.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),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.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 i=new s(1),a=new s(0),o=new s(0),l=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;0===(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var f=0,m=1;0===(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(d)),o.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),a.isub(l)):(n.isub(t),o.isub(i),l.isub(a))}return{a:o,b:l,gcd:n.iushln(c)}},s.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 i,a=new s(1),o=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,h=1;0===(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(i=0===t.cmpn(1)?a:o).cmpn(0)<0&&i.iadd(e),i},s.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 i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0===(1&this.words[0])},s.prototype.isOdd=function(){return 1===(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,a=n;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.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 i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.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},s.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],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new S(e)},s.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)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function j(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=s._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 E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}w.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.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},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|s>>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},_.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},i(j,w),i(k,w),i(N,w),N.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new j;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new N}return b[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.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")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.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 s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var o=new s(1).toRed(this),l=o.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=a;0!==p.cmp(o);){for(var m=p,g=0;0!==m.cmp(o);g++)m=m.redSqr();r(g<f);var y=this.pow(d,new s(1).iushln(f-g-1));h=h.redMul(y),d=y.redSqr(),p=p.redMul(d),f=g}return h},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,o=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++o||0===r&&0===u)&&(i=this.mul(i,n[a]),o=0,a=0)):o=0}l=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new E(e)},i(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.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),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>
vendor: 5,381 bytes, line 2
2=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},6382:(e,t,n)=>{"use strict";const r=n(4445),i=n(6900),s="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(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 c(e,t,n)}function c(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=o(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(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(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return p(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 l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||J(e.length)?o(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return l.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 u(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 u(e),o(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(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,l.prototype),r}function f(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(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 i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!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 M(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return N(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(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 x(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){let s,a=1,o=e.length,l=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;
vendor: 4,871 bytes, line 2
2a=2,o/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(s=n;s<o;s++)if(c(e,s)===c(t,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===l)return r*a}else-1!==r&&(s-=s-r),r=-1}else for(n+l>o&&(n=o-l),s=n;s>=0;s--){let n=!0;for(let r=0;r<l;r++)if(c(e,s+r)!==c(t,r)){n=!1;break}if(n)return s}return-1}function b(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=t.length;let a;for(r>s/2&&(r=s/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(J(r))return a;e[n+a]=r}return a}function w(e,t,n,r){return Y(V(t,e.length-n),e,n,r)}function _(e,t,n,r){return Y(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 j(e,t,n,r){return Y($(t),e,n,r)}function k(e,t,n,r){return Y(function(e,t){let n,r,i;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function N(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,o,l;switch(a){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128===(192&n)&&(l=(31&t)<<6|63&n,l>127&&(s=l));break;case 3:n=e[i+1],r=e[i+2],128===(192&n)&&128===(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:n=e[i+1],r=e[i+2],o=e[i+3],128===(192&n)&&128===(192&r)&&128===(192&o)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=E));return n}(r)}t.kMaxLength=a,l.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}}(),l.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(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"===typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(G(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.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 i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.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}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=l.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(G(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.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},l.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},l.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},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):g.apply(this,arguments)}
vendor: 12,226 bytes, line 2
2,l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.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+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const o=Math.min(s,a),c=this.slice(r,i),u=e.slice(t,n);for(let l=0;l<o;++l)if(c[l]!==u[l]){s=c[l],a=u[l];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return x(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return x(this,e,t,n,!1)},l.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 i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return j(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function A(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let s=t;s<n;++s)i+=Z[e[s]];return i}function T(e,t,n){const r=e.slice(t,n);let i="";for(let s=0;s<r.length-1;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function P(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 O(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function I(e,t,n,r,i){q(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function L(e,t,n,r,i){q(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function R(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,s){return t=+t,n>>>=0,s||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,s){return t=+t,n>>>=0,s||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.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,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(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)}),l.prototype.readBigInt64BE=Q(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(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)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},l.prototype.writeBigUInt64LE=Q(function(e){return I(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Q(function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},l.prototype.writeBigInt64LE=Q(function(e){return I(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Q(function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.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 i=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),i},l.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&&!l.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 i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i<n;++i)this[i]=e;else{const s=l.isBuffer(e)?e:l.from(e,r),a=s.length;
2if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};const F={};function U(e,t,n){F[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name="".concat(this.name," [").concat(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"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}}function z(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function q(e,t,n,r,i,s){if(e>n||e<t){const r="bigint"===typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?">= 0".concat(r," and < 2").concat(r," ** ").concat(8*(s+1)).concat(r):">= -(2".concat(r," ** ").concat(8*(s+1)-1).concat(r,") and < 2 ** ")+"".concat(8*(s+1)-1).concat(r):">= ".concat(t).concat(r," and <= ").concat(n).concat(r),new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,s)}function W(e,t){if("number"!==typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,n){let r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=z(String(n)):"bigint"===typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i),r},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.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;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!==e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"===typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},6392:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.last=function(e){return e[e.length-1]}},6433:(e,t,n)=>{"use strict";var r=n(6382).Buffer;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(6443),s=n(5990),a=n(7599),o=n(4803),l=n(3757);function c(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;const h=null===d||void 0===d?void 0:d(e,t,n,i);if(void 0!==h)return h;if(o.isPrimitive(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const t=new Array(e.length);i.set(e,t);for(let r=0;r<e.length;r++)t[r]=c(e[r],r,n,i,d);
2return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;i.set(e,t);for(const[r,s]of e)t.set(r,c(s,r,n,i,d));return t}if(e instanceof Set){const t=new Set;i.set(e,t);for(const r of e)t.add(c(r,void 0,n,i,d));return t}if("undefined"!==typeof r&&r.isBuffer(e))return e.subarray();if(l.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);i.set(e,t);for(let r=0;r<e.length;r++)t[r]=c(e[r],r,n,i,d);return t}if(e instanceof ArrayBuffer||"undefined"!==typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,t),u(t,e,n,i,d),t}if("undefined"!==typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return i.set(e,t),u(t,e,n,i,d),t}if("undefined"!==typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return i.set(e,t),u(t,e,n,i,d),t}if(e instanceof Error){const t=new e.constructor;return i.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,u(t,e,n,i,d),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return i.set(e,t),u(t,e,n,i,d),t}if(e instanceof Number){const t=new Number(e.valueOf());return i.set(e,t),u(t,e,n,i,d),t}if(e instanceof String){const t=new String(e.valueOf());return i.set(e,t),u(t,e,n,i,d),t}if("object"===typeof e&&function(e){switch(s.getTag(e)){case a.argumentsTag:case a.arrayTag:case a.arrayBufferTag:case a.dataViewTag:case a.booleanTag:case a.dateTag:case a.float32ArrayTag:case a.float64ArrayTag:case a.int8ArrayTag:case a.int16ArrayTag:case a.int32ArrayTag:case a.mapTag:case a.numberTag:case a.objectTag:case a.regexpTag:case a.setTag:case a.stringTag:case a.symbolTag:case a.uint8ArrayTag:case a.uint8ClampedArrayTag:case a.uint16ArrayTag:case a.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return i.set(e,t),u(t,e,n,i,d),t}return e}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;const a=[...Object.keys(t),...i.getSymbols(t)];for(let i=0;i<a.length;i++){const o=a[i],l=Object.getOwnPropertyDescriptor(e,o);(null==l||l.writable)&&(e[o]=c(t[o],o,n,r,s))}}t.cloneDeepWith=function(e,t){return c(e,void 0,e,new Map,t)},t.cloneDeepWithImpl=c,t.copyProperties=u},6443:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}},6770:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(2777);t.toNumber=function(e){return r.isSymbol(e)?NaN:Number(e)}},6900:(e,t)=>{t.read=function(e,t,n,r,i){var s,a,o=8*i-r-1,l=(1<<o)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,s=p&(1<<-u)-1,p>>=-u,u+=o;u>0;s=256*s+e[t+d],d+=h,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),s-=c}return(p?-1:1)*a*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var a,o,l,c=8*s-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(o=0,a=u):a+d>=1?(o=(t*l-1)*Math.pow(2,i),a+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&o,p+=f,o/=256,i-=8);for(a=a<<i|o,c+=i;c>0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}},6993:(e,t,n)=>{var r=n(5546);function i(){var t,n,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",o=s.toStringTag||"@@toStringTag";function l(e,i,s,a){var o=i&&i.prototype instanceof u?i:u,l=Object.create(o.prototype);return r(l,"_invoke",function(e,r,i){var s,a,o,l=0,u=i||[],d=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return s=e,a=0,o=t,h.n=n,c}};function p(e,r){for(a=e,o=r,n=0;!d&&l&&!i&&n<u.length;n++){var i,s=u[n],p=h.p,f=s[2];e>3?(i=f===r)&&(o=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=t):s[0]<=p&&((i=e<2&&p<s[1])?(a=0,h.v=r,h.n=s[1]):p<f&&(i=e<3||s[0]>r||r>f)&&(s[4]=e,s[5]=r,h.n=f,a=0))}if(i||e>1)return c;throw d=!0,r}return function(i,u,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,f),a=u,o=f;(n=a<2?t:o)||!d;
2){s||(a?a<3?(a>1&&(h.n=-1),p(a,o)):h.n=o:h.v=o);try{if(l=2,s){if(a||(i="next"),n=s[i]){if(!(n=n.call(s,o)))throw TypeError("iterator result is not an object");if(!n.done)return n;o=n.value,a<2&&(a=0)}else 1===a&&(n=s.return)&&n.call(s),a<2&&(o=TypeError("The iterator does not provide a '"+i+"' method"),a=1);s=t}else if((n=(d=h.n<0)?o:e.call(r,h))!==c)break}catch(n){s=t,a=1,o=n}finally{l=1}}return{value:n,done:d}}}(e,s,a),!0),l}var c={};function u(){}function d(){}function h(){}n=Object.getPrototypeOf;var p=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),f=h.prototype=u.prototype=Object.create(p);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return d.prototype=h,r(f,"constructor",h),r(h,"constructor",d),d.displayName="GeneratorFunction",r(h,o,"GeneratorFunction"),r(f),r(f,o,"Generator"),r(f,a,function(){return this}),r(f,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:l,m:m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7043:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(2777),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.isKey=function(e,t){return!Array.isArray(e)&&(!("number"!==typeof e&&"boolean"!==typeof e&&null!=e&&!r.isSymbol(e))||("string"===typeof e&&(s.test(e)||!i.test(e))||null!=t&&Object.hasOwn(t,e)))}},7081:(e,t,n)=>{"use strict";var r=n(6382).Buffer;t.k5=function(e){{const t=r.from(e);t.reverse();const n=t.toString("hex");return 0===n.length?BigInt(0):BigInt("0x".concat(n))}},t.cI=function(e){{const t=e.toString("hex");return 0===t.length?BigInt(0):BigInt("0x".concat(t))}},t.Bq=function(e,t){{const n=e.toString(16),i=r.from(n.padStart(2*t,"0").slice(0,2*t),"hex");return i.reverse(),i}},t.zy=function(e,t){{const n=e.toString(16);return r.from(n.padStart(2*t,"0").slice(0,2*t),"hex")}}},7162:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(10),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,s=new RegExp(i.source,"g");function a(e,t){var n,a,o,l=i.lastIndex=s.lastIndex=0,c=-1,u=[],d=[];for(e+="",t+="";(n=i.exec(e))&&(a=s.exec(t));)(o=a.index)>l&&(o=t.slice(l,o),u[c]?u[c]+=o:u[++c]=o),(n=n[0])===(a=a[0])?u[c]?u[c]+=a:u[++c]=a:(u[++c]=null,d.push({i:c,x:(0,r.A)(n,a)})),l=s.lastIndex;return l<t.length&&(o=t.slice(l),u[c]?u[c]+=o:u[++c]=o),u.length<2?d[0]?function(e){return function(t){return e(t)+""}}(d[0].x):function(e){return function(){return e}}(t):(t=d.length,function(e){for(var n,r=0;r<t;++r)u[(n=d[r]).i]=n.x(e);return u.join("")})}},7231:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(3799),i=n(4879);t.range=function(e,t,n){n&&"number"!==typeof n&&r.isIterateeCall(e,t,n)&&(t=n=void 0),e=i.toFinite(e),void 0===t?(t=e,e=0):t=i.toFinite(t),n=void 0===n?e<t?1:-1:i.toFinite(n);const s=Math.max(Math.ceil((t-e)/(n||1)),0),a=new Array(s);for(let r=0;r<s;r++)a[r]=e,e+=n;return a}},7234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<s(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var o=2*(r+1)-1,l=e[o],c=o+1,u=e[c];if(0>s(l,n))c<i&&0>s(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[o]=n,r=o);else{if(!(c<i&&0>s(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,y="function"===typeof setTimeout?setTimeout:null,x="function"===typeof clearTimeout?clearTimeout:null,v="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,b(e),!m)if(null!==r(c))m=!0,O(_);else{var t=r(u);null!==t&&I(w,t.startTime-e)}}function _(e,n){m=!1,g&&(g=!1,x(S),S=-1),f=!0;var s=p;try{for(b(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!C());){var a=h.callback;if("function"===typeof a){h.callback=null,p=h.priorityLevel;var o=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof o?h.callback=o:h===r(c)&&i(c),b(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&I(w,d.startTime-n),l=!1}return l}finally{h=null,p=s,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j,k=!1,N=null,S=-1,E=5,A=-1;function C(){return!(t.unstable_now()-A<E)}function M(){if(null!==N){var e=t.unstable_now();A=e;var n=!0;try{n=N(!0,e)}finally{n?j():(k=!1,N=null)}}else k=!1}if("function"===typeof v)j=function(){v(M)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,P=T.port2;T.port1.onmessage=M,j=function(){P.postMessage(null)}}else j=function(){y(M,0)};function O(e){N=e,k||(k=!0,j())}function I(e,n){S=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,O(_))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,s){var a=t.unstable_now();switch("object"===typeof s&&null!==s?s="number"===typeof(s=s.delay)&&0<s?a+s:a:s=a,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>a?(e.sortIndex=s,n(u,e),null===r(c)&&e===r(u)&&(g?(x(S),S=-1):g=!0,I(w,s-a))):(e.sortIndex=o,n(c,e),m||f||(m=!0,O(_))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},7237:(e,t,n)=>{"use strict";n(8365)},7260:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isUnsafeProperty=function(e){return"__proto__"===e}},7312:(e,t)=>
2{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.flatten=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=[],r=Math.floor(t),i=(e,t)=>{for(let s=0;s<e.length;s++){const a=e[s];Array.isArray(a)&&t<r?i(a,t+1):n.push(a)}};return i(e,0),n}},7324:e=>{e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(t),l=0;l<s.length;l++){var c=s[l];if(!o(c))return!1;var u=e[c],d=t[c];if(!1===(i=n?n.call(r,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}},7330:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(9323);t.property=function(e){return function(t){return r.get(t,e)}}},7347:e=>{"use strict";var t={single_source_shortest_paths:function(e,n,r){var i={},s={};s[n]=0;var a,o,l,c,u,d,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(l in o=(a=p.pop()).value,c=a.cost,u=e[o]||{})u.hasOwnProperty(l)&&(d=c+u[l],h=s[l],("undefined"===typeof s[l]||h>d)&&(s[l]=d,p.push(l,d),i[l]=o));if("undefined"!==typeof r&&"undefined"===typeof s[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return i},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 i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},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},7421:(e,t,n)=>{const r=n(3257),i=n(8511);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 i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,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}}},7599:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.argumentsTag="[object Arguments]",t.arrayBufferTag="[object ArrayBuffer]",t.arrayTag="[object Array]",t.bigInt64ArrayTag="[object BigInt64Array]",t.bigUint64ArrayTag="[object BigUint64Array]",t.booleanTag="[object Boolean]",t.dataViewTag="[object DataView]",t.dateTag="[object Date]",t.errorTag="[object Error]",t.float32ArrayTag="[object Float32Array]",t.float64ArrayTag="[object Float64Array]",t.functionTag="[object Function]",t.int16ArrayTag="[object Int16Array]",t.int32ArrayTag="[object Int32Array]",t.int8ArrayTag="[object Int8Array]",t.mapTag="[object Map]",t.numberTag="[object Number]",t.objectTag="[object Object]",t.regexpTag="[object RegExp]",t.setTag="[object Set]",t.stringTag="[object String]",t.symbolTag="[object Symbol]",t.uint16ArrayTag="[object Uint16Array]",t.uint32ArrayTag="[object Uint32Array]",t.uint8ArrayTag="[object Uint8Array]",t.uint8ClampedArrayTag="[object Uint8ClampedArray]"},7645:e=>{"use strict";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 r=0;r<e.length;r++){var i=e.charAt(r),s=i.charCodeAt(0);if(255!==t[s])throw new TypeError(i+" is ambiguous");t[s]=r}var a=e.length,o=e.charAt(0),l=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function u(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var n=0,r=0,i=0;e[n]===o;)r++,n++;for(var s=(e.length-n)*l+1>>>0,c=new Uint8Array(s);e[n];){var u=e.charCodeAt(n);if(u>255)return;var d=t[u];
2if(255===d)return;for(var h=0,p=s-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=a*c[p]>>>0,c[p]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,n++}for(var f=s-i;f!==s&&0===c[f];)f++;for(var m=new Uint8Array(r+(s-f)),g=r;f!==s;)m[g++]=c[f++];return m}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,i=0,s=t.length;i!==s&&0===t[i];)i++,n++;for(var l=(s-i)*c+1>>>0,u=new Uint8Array(l);i!==s;){for(var d=t[i],h=0,p=l-1;(0!==d||h<r)&&-1!==p;p--,h++)d+=256*u[p]>>>0,u[p]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");r=h,i++}for(var f=l-r;f!==l&&0===u[f];)f++;for(var m=o.repeat(n);f<l;++f)m+=e.charAt(u[f]);return m},decodeUnsafe:u,decode:function(e){var t=u(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},7736:(e,t,n)=>{var r=n(3738).default,i=n(9045);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7770:(e,t,n)=>{e.exports=n(9323).get},7790:()=>{},7820:(e,t,n)=>{e.exports=n(5414).throttle},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2730)},7969:(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)}},7970:(e,t,n)=>{"use strict";var r=n(9966).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 i=0;i<e.length;i++){var s=e.charAt(i),a=s.charCodeAt(0);if(255!==t[a])throw new TypeError(s+" is ambiguous");t[a]=i}var o=e.length,l=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function d(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);for(var n=0,i=0,s=0;e[n]===l;)i++,n++;for(var a=(e.length-n)*c+1>>>0,u=new Uint8Array(a);n<e.length;){var d=e.charCodeAt(n);if(d>255)return;var h=t[d];if(255===h)return;for(var p=0,f=a-1;(0!==h||p<s)&&-1!==f;f--,p++)h+=o*u[f]>>>0,u[f]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");s=p,n++}for(var m=a-s;m!==a&&0===u[m];)m++;var g=r.allocUnsafe(i+(a-m));g.fill(0,0,i);for(var y=i;m!==a;)g[y++]=u[m++];return g}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,i=0,s=0,a=t.length;s!==a&&0===t[s];)s++,n++;for(var c=(a-s)*u+1>>>0,d=new Uint8Array(c);s!==a;){for(var h=t[s],p=0,f=c-1;(0!==h||p<i)&&-1!==f;f--,p++)h+=256*d[f]>>>0,d[f]=h%o>>>0,h=h/o>>>0;if(0!==h)throw new Error("Non-zero carry");i=p,s++}for(var m=c-i;m!==c&&0===d[m];)m++;for(var g=l.repeat(n);m<c;++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"+o+" character")}}}},8068:(e,t,n)=>{"use strict";function r(e,t,n){return t<=e&&e<=n}function i(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:()=>c,TextEncoder:()=>u});function s(e){this.tokens=[].slice.call(e)}s.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 a=-1;function o(e,t){if(e)throw TypeError("Decoder error");return t||65533}var l="utf-8";function c(e,t){if(!(this instanceof c))return new c(e,t);
vendor: 1,297 bytes, line 2
2if((e=void 0!==e?String(e).toLowerCase():l)!==l)throw new Error("Encoding not supported. Only utf-8 is supported");t=i(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 u(e,t){if(!(this instanceof u))return new u(e,t);if((e=void 0!==e?String(e).toLowerCase():l)!==l)throw new Error("Encoding not supported. Only utf-8 is supported");t=i(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,i=0,s=0,l=128,c=191;this.handler=function(e,u){if(-1===u&&0!==s)return s=0,o(t);if(-1===u)return a;if(0===s){if(r(u,0,127))return u;if(r(u,194,223))s=1,n=u-192;else if(r(u,224,239))224===u&&(l=160),237===u&&(c=159),s=2,n=u-224;else{if(!r(u,240,244))return o(t);240===u&&(l=144),244===u&&(c=143),s=3,n=u-240}return n<<=6*s,null}if(!r(u,l,c))return n=s=i=0,l=128,c=191,e.prepend(u),o(t);if(l=128,c=191,n+=u-128<<6*(s-(i+=1)),i!==s)return null;var d=n;return n=s=i=0,d}}function h(e){e.fatal;this.handler=function(e,t){if(-1===t)return a;
2if(r(t,0,127))return t;var n,i;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var s=[(t>>6*n)+i];n>0;){var o=t>>6*(n-1);s.push(128|63&o),n-=1}return s}}c.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=i(t),this._streaming||(this._decoder=new d({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var r,o=new s(n),l=[];!o.endOfStream()&&(r=this._decoder.handler(o,o.read()))!==a;)null!==r&&(Array.isArray(r)?l.push.apply(l,r):l.push(r));if(!this._streaming){do{if((r=this._decoder.handler(o,o.read()))===a)break;null!==r&&(Array.isArray(r)?l.push.apply(l,r):l.push(r))}while(!o.endOfStream());this._decoder=null}return l.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===l[0]?(this._BOMseen=!0,l.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}(l)}},u.prototype={encode:function(e,t){e=e?String(e):"",t=i(t),this._streaming||(this._encoder=new h(this._options)),this._streaming=Boolean(t.stream);for(var n,r=[],o=new s(function(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var s=t.charCodeAt(r);if(s<55296||s>57343)i.push(s);else if(56320<=s&&s<=57343)i.push(65533);else if(55296<=s&&s<=56319)if(r===n-1)i.push(65533);else{var a=e.charCodeAt(r+1);if(56320<=a&&a<=57343){var o=1023&s,l=1023&a;i.push(65536+(o<<10)+l),r+=1}else i.push(65533)}r+=1}return i}(e));!o.endOfStream()&&(n=this._encoder.handler(o,o.read()))!==a;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;(n=this._encoder.handler(o,o.read()))!==a;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}}},8177:(e,t,n)=>{const r=n(1312);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},8210:function(e,t,n){var r;!function(){"use strict";var i,s=1e9,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},o=!0,l="[DecimalError] ",c=l+"Invalid argument: ",u=l+"Exponent out of range: ",d=Math.floor,h=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f=1e7,m=9007199254740991,g=d(1286742750677284.5),y={};function x(e,t){var n,r,i,s,a,l,c,u,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),o?A(t,h):t;if(c=e.d,u=t.d,a=e.e,i=t.e,c=c.slice(),s=a-i){for(s<0?(r=c,s=-s,l=u.length):(r=u,i=a,l=c.length),s>(l=(a=Math.ceil(h/7))>l?a+1:l+1)&&(s=l,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for((l=c.length)-(s=u.length)<0&&(s=l,r=u,u=c,c=r),n=0;s;)n=(c[--s]=c[s]+u[s]+n)/f|0,c[s]%=f;for(n&&(c.unshift(n),++i),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=i,o?A(t,h):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(c+e)}function b(e){var t,n,r,i=e.length-1,s="",a=e[0];if(i>0){for(s+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(s+=N(n)),s+=r;(n=7-(r=(a=e[t])+"").length)&&(s+=N(n))}else if(0===a)return"0";for(;a%10===0;)a/=10;return s+a}y.absoluteValue=y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},y.comparedTo=y.cmp=function(e){var t,n,r,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(t=0,n=(r=s.d.length)<(i=e.d.length)?r:i;t<n;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1},y.decimalPlaces=y.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},y.dividedBy=y.div=function(e){return w(this,new this.constructor(e))},y.dividedToIntegerBy=y.idiv=function(e){var t=this.constructor;return A(w(this,new t(e),0,1),t.precision)},y.equals=y.eq=function(e){return!this.cmp(e)},y.exponent=function(){return j(this)},y.greaterThan=y.gt=function(e){return this.cmp(e)>0},y.greaterThanOrEqualTo=y.gte=function(e){return this.cmp(e)>=0},y.isInteger=y.isint=function(){return this.e>this.d.length-2},y.isNegative=y.isneg=function(){return this.s<0},y.isPositive=y.ispos=function(){return this.s>0},y.isZero=function(){return 0===this.s},y.lessThan=y.lt=function(e){return this.cmp(e)<0}
vendor: 10,654 bytes, line 2
2,y.lessThanOrEqualTo=y.lte=function(e){return this.cmp(e)<1},y.logarithm=y.log=function(e){var t,n=this,r=n.constructor,s=r.precision,a=s+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(i))throw Error(l+"NaN");if(n.s<1)throw Error(l+(n.s?"NaN":"-Infinity"));return n.eq(i)?new r(0):(o=!1,t=w(S(n,a),S(e,a),a),o=!0,A(t,s))},y.minus=y.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?C(t,e):x(t,(e.s=-e.s,e))},y.modulo=y.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return n.s?(o=!1,t=w(n,e,0,1).times(e),o=!0,n.minus(t)):A(new r(n),i)},y.naturalExponential=y.exp=function(){return _(this)},y.naturalLogarithm=y.ln=function(){return S(this)},y.negated=y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},y.plus=y.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?x(t,e):C(t,(e.s=-e.s,e))},y.precision=y.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=j(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},y.squareRoot=y.sqrt=function(){var e,t,n,r,i,s,a,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(l+"NaN")}for(e=j(c),o=!1,0==(i=Math.sqrt(+c))||i==1/0?(((t=b(c.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new u(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new u(i.toString()),i=a=(n=u.precision)+3;;)if(r=(s=r).plus(w(c,s,a+2)).times(.5),b(s.d).slice(0,a)===(t=b(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(A(s,n+1,0),s.times(s).eq(c)){r=s;break}}else if("9999"!=t)break;a+=4}return o=!0,A(r,n)},y.times=y.mul=function(e){var t,n,r,i,s,a,l,c,u,d=this,h=d.constructor,p=d.d,m=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,(c=p.length)<(u=m.length)&&(s=p,p=m,m=s,a=c,c=u,u=a),s=[],r=a=c+u;r--;)s.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)l=s[i]+m[r]*p[i-r-1]+t,s[i--]=l%f|0,t=l/f|0;s[i]=(s[i]+t)%f|0}for(;!s[--a];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,o?A(e,h.precision):e},y.toDecimalPlaces=y.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(v(e,0,s),void 0===t?t=r.rounding:v(t,0,8),A(n,e+j(n)+1,t))},y.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=M(r,!0):(v(e,0,s),void 0===t?t=i.rounding:v(t,0,8),n=M(r=A(new i(r),e+1,t),!0,e+1)),n},y.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?M(i):(v(e,0,s),void 0===t?t=a.rounding:v(t,0,8),n=M((r=A(new a(i),e+j(i)+1,t)).abs(),!1,e+j(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},y.toInteger=y.toint=function(){var e=this,t=e.constructor;return A(new t(e),j(e)+1,t.rounding)},y.toNumber=function(){return+this},y.toPower=y.pow=function(e){var t,n,r,s,a,c,u=this,h=u.constructor,p=+(e=new h(e));if(!e.s)return new h(i);if(!(u=new h(u)).s){if(e.s<1)throw Error(l+"Infinity");return u}if(u.eq(i))return u;if(r=h.precision,e.eq(i))return A(u,r);if(c=(t=e.e)>=(n=e.d.length-1),a=u.s,c){if((n=p<0?-p:p)<=m){for(s=new h(i),t=Math.ceil(r/7+4),o=!1;n%2&&T((s=s.times(u)).d,t),0!==(n=d(n/2));)T((u=u.times(u)).d,t);return o=!0,e.s<0?new h(i).div(s):A(s,r)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,o=!1,s=e.times(S(u,r+12)),o=!0,(s=_(s)).s=a,s},y.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=M(i,(n=j(i))<=a.toExpNeg||n>=a.toExpPos):(v(e,1,s),void 0===t?t=a.rounding:v(t,0,8),r=M(i=A(new a(i),e,t),e<=(n=j(i))||n<=a.toExpNeg,e)),r},y.toSignificantDigits=y.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(v(e,1,s),void 0===t?t=n.rounding:v(t,0,8)),A(new n(this),e,t)},y.toString=y.valueOf=y.val=y.toJSON=function(){var e=this,t=j(e),n=e.constructor;return M(e,t<=n.toExpNeg||t>=n.toExpPos)};var w=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,s;if(n!=r)s=n>r?1:-1;else for(i=s=0;i<n;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,s,a){var o,c,u,d,h,p,m,g,y,x,v,b,w,_,k,N,S,E,C=r.constructor,M=r.s==i.s?1:-1,T=r.d,P=i.d;if(!r.s)return new C(r);if(!i.s)throw Error(l+"Division by zero");for(c=r.e-i.e,S=P.length,k=T.length,g=(m=new C(M)).d=[],u=0;P[u]==(T[u]||0);)++u;if(P[u]>(T[u]||0)&&--c,(b=null==s?s=C.precision:a?s+(j(r)-j(i))+1:s)<0)return new C(0);if(b=b/7+2|0,u=0,1==S)for(d=0,P=P[0],b++;(u<k||d)&&b--;u++)w=d*f+(T[u]||0),g[u]=w/P|0,d=w%P|0;else{for((d=f/(P[0]+1)|0)>1&&(P=e(P,d),T=e(T,d),S=P.length,k=T.length),_=S,x=(y=T.slice(0,S)).length;x<S;)y[x++]=0;(E=P.slice()).unshift(0),N=P[0],P[1]>=f/2&&++N;do{d=0,(o=t(P,y,S,x))<0?(v=y[0],S!=x&&(v=v*f+(y[1]||0)),(d=v/N|0)>1?(d>=f&&(d=f-1),1==(o=t(h=e(P,d),y,p=h.length,x=y.length))&&(d--,n(h,S<p?E:P,p))):(0==d&&(o=d=1),h=P.slice()),(p=h.length)<x&&h.unshift(0),n(y,h,x),-1==o&&(o=t(P,y,S,x=y.length))<1&&(d++,n(y,S<x?E:P,x)),x=y.length):0===o&&(d++,y=[0]),g[u++]=d,o&&y[0]?y[x++]=T[_]||0:(y=[T[_]],x=1)}while((_++<k||void 0!==y[0])&&b--)}return g[0]||g.shift(),m.e=c,A(m,a?s+j(m)+1:s)}}();function _(e,t){var n,r,s,a,l,c=0,d=0,p=e.constructor,f=p.precision;if(j(e)>16)throw Error(u+j(e));if(!e.s)return new p(i);for(null==t?(o=!1,l=f):l=t,a=new p(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(l+=Math.log(h(2,d))/Math.LN10*2+5|0,n=r=s=new p(i),p.precision=l;;){if(r=A(r.times(e),l),n=n.times(++c),b((a=s.plus(w(r,n,l))).d).slice(0,l)===b(s.d).slice(0,l)){for(;d--;)s=A(s.times(s),l);return p.precision=f,null==t?(o=!0,A(s,f)):s}s=a}}function j(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function k(e,t,n){if(t>e.LN10.sd())throw o=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return A(new e(e.LN10),t)}function N(e){for(var t="";e--;)t+="0";return t}function S(e,t){var n,r,s,a,c,u,d,h,p,f=1,m=e,g=m.d,y=m.constructor,x=y.precision;if(m.s<1)throw Error(l+(m.s?"NaN":"-Infinity"));if(m.eq(i))return new y(0);if(null==t?(o=!1,h=x):h=t,m.eq(10))return null==t&&(o=!0),k(y,h);if(h+=10,y.precision=h,r=(n=b(g)).charAt(0),a=j(m),!(Math.abs(a)<15e14))return d=k(y,h+2,x).times(a+""),m=S(new y(r+"."+n.slice(1)),h-10).plus(d),y.precision=x,null==t?(o=!0,A(m,x)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((m=m.times(e)).d)).charAt(0),f++;for(a=j(m),r>1?(m=new y("0."+n),a++):m=new y(r+"."+n.slice(1)),u=c=m=w(m.minus(i),m.plus(i),h),p=A(m.times(m),h),s=3;;){if(c=A(c.times(p),h),b((d=u.plus(w(c,new y(s),h))).d).slice(0,h)===b(u.d).slice(0,h))return u=u.times(2),0!==a&&(u=u.plus(k(y,h+2,x).times(a+""))),u=w(u,new y(f),h),y.precision=x,null==t?(o=!0,A(u,x)):u;u=d,s+=2}}function E(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),o&&(e.e>g||e.e<-g))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function A(e,t,n){var r,i,s,a,l,c,p,m,y=e.d;for(a=1,s=y[0];s>=10;s/=10)a++;if((r=t-a)<0)r+=7,i=t,p=y[m=0];else{if((m=Math.ceil((r+1)/7))>=(s=y.length))return e;for(p=s=y[m],a=1;s>=10;s/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(l=p/(s=h(10,a-i-1))%10|0,c=t<0||void 0!==y[m+1]||p%s,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?i>0?p/h(10,a-i):0:y[m-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return c?(s=j(e),y.length=1,t=t-s-1,y[0]=h(10,(7-t%7)%7),e.e=d(-t/7)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=m,s=1,m--):(y.length=m+1,s=h(10,7-r),y[m]=i>0?(p/h(10,a-i)%h(10,i)|0)*s:0),c)for(;;){if(0==m){(y[0]+=s)==f&&(y[0]=1,++e.e);break}if(y[m]+=s,y[m]!=f)break;y[m--]=0,s=1}for(r=y.length;0===y[--r];)y.pop();if(o&&(e.e>g||e.e<-g))throw Error(u+j(e));return e}function C(e,t){var n,r,i,s,a,l,c,u,d,h,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),o?A(t,m):t;if(c=e.d,h=t.d,r=t.e,u=e.e,c=c.slice(),a=u-r){for((d=a<0)?(n=c,a=-a,l=h.length):(n=h,r=u,l=c.length),a>(i=Math.max(Math.ceil(m/7),l)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((d=(i=c.length)<(l=h.length))&&(l=i),i=0;i<l;i++)if(c[i]!=h[i]){d=c[i]<h[i];break}a=0}for(d&&(n=c,c=h,h=n,t.s=-t.s),l=c.length,i=h.length-l;i>0;--i)c[l++]=0;for(i=h.length;i>a;){if(c[--i]<h[i]){for(s=i;s&&0===c[--s];)c[s]=f-1;--c[s],c[i]+=f}c[i]-=h[i]}for(;0===c[--l];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(t.d=c,t.e=r,o?A(t,m):t):new p(0)}function M(e,t,n){var r,i=j(e),s=b(e.d),a=s.length;return t?(n&&(r=n-a)>0?s=s.charAt(0)+"."+s.slice(1)+N(r):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+N(-i-1)+s,n&&(r=n-a)>0&&(s+=N(r))):i>=a?(s+=N(i+1-a),n&&(r=n-i-1)>0&&(s=s+"."+N(r))):((r=i+1)<a&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(s+="."),s+=N(r))),e.s<0?"-"+s:s}function T(e,t){if(e.length>t)return e.length=t,!0}function P(e){if(!e||"object"!==typeof e)throw Error(l+"Object expected");var t,n,r,i=["precision",1,s,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(d(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(c+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(c+n+": "+r);this[n]=new this(r)}return this}a=function e(t){var n,r,i;function s(e){var t=this;if(!(t instanceof s))return new s(e);if(t.constructor=s,e instanceof s)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):E(t,e.toString())}if("string"!==typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!p.test(e))throw Error(c+e);E(t,e)}if(s.prototype=y,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.clone=e,s.config=s.set=P,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return s.config(t),s}(a),a.default=a.Decimal=a,i=new a(1),void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},8268:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(2132);t.isMatch=function(e,t){return r.isMatchWith(e,t,()=>{})}},8293:(e,t)=>
2{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,i=e.scale||4;return{width:r,scale:r?4:i,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 i=n.modules.size,s=n.modules.data,a=t.getScale(i,r),o=Math.floor((i+2*r.margin)*a),l=r.margin*a,c=[r.color.light,r.color.dark];for(let t=0;t<o;t++)for(let n=0;n<o;n++){let u=4*(t*o+n),d=r.color.light;if(t>=l&&n>=l&&t<o-l&&n<o-l){d=c[s[Math.floor((t-l)/a)*i+Math.floor((n-l)/a)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},8346:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)}},8355:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,a){if("function"!==typeof r)throw new TypeError("The listener must be a function");var o=new i(r,s||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.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 i=0,s=r.length,a=new Array(s);i<s;i++)a[i]=r[i].fn;return a},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,s,a){var o=n?n+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,s),!0;case 6:return u.fn.call(u.context,t,r,i,s,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},o.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||a(this,s);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||i&&!o[l].once||r&&o[l].context!==r)&&c.push(o[l]);c.length?this._events[s]=1===c.length?c[0]:c:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},8365:(e,t,n)=>{"use strict";var r=n(5043);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=r.useSyncExternalStore,a=r.useRef,o=r.useEffect,l=r.useMemo,c=r.useDebugValue},8396:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(5508);t.cloneDeep=function(e){return r.cloneDeepWith(e)}},8419:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>()=>e},8420:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}}
2,8443:(e,t,n)=>{"use strict";e.exports=n(9717)},8499:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,a){if("function"!==typeof r)throw new TypeError("The listener must be a function");var o=new i(r,s||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.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 i=0,s=r.length,a=new Array(s);i<s;i++)a[i]=r[i].fn;return a},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,s,a){var o=n?n+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,s),!0;case 6:return u.fn.call(u.context,t,r,i,s,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},o.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||a(this,s);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||i&&!o[l].once||r&&o[l].context!==r)&&c.push(o[l]);c.length?this._events[s]=1===c.length?c[0]:c:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},8511:(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 i="(?:(?![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(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const s=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return s.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return o.test(e)}},8631:(e,t,n)=>{"use strict";n.d(t,{Qk:()=>m,So:()=>f,clearWCSession:()=>g,wI:()=>y});var r=n(1666);const i="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",s=9e4,a=6e4,o="wc_session_topic",l="wc_session_wallet_address",c="wc_session_open_uri";let u=null,d=!1;async function h(){if(u)return u;const{SignClient:e}=await n.e(482).then(n.bind(n,6482)),t="e2e467b49fe9d756576b7244146e1c1b";return u=await e.init({projectId:t,metadata:{name:"deepnets.ai",description:"Solana token intelligence",url:window.location.origin,icons:["".concat(window.location.origin,"/logo192.png")],redirect:{universal:window.location.origin}}}),"undefined"===typeof document||d||(document.addEventListener("visibilitychange",()=>{if("visible"===document.visibilityState)try{var e,t,n,r;const i=null===(e=u)||void 0===e||null===(t=e.core)||void 0===t?void 0:t.relayer;null===i||void 0===i||null===(n=i.transportOpen)||void 0===n||n.call(i).catch(()=>{}),null===i||void 0===i||null===(r=i.restartTransport)||void 0===r||r.call(i).catch(()=>{})}catch(i){}}),d=!0),u}function p(e,t,n){return new Promise((r,i)=>{const s=setTimeout(()=>i(new Error("".concat(n," timed out after ").concat(t/1e3,"s"))),t);e.then(e=>{clearTimeout(s),r(e)},e=>{clearTimeout(s),i(e)})})}async function f(e,t){var n,u,d,f;
2const m=await h(),{uri:g,approval:y}=await m.connect({requiredNamespaces:{solana:{chains:[i],methods:["solana_signMessage","solana_signTransaction"],events:[]}}});if(!g)throw new Error("WalletConnect did not return a connection URI");window.location.href=t.buildWalletUri(g),null===(n=t.onWaiting)||void 0===n||n.call(t);const x=await p(y(),s,"".concat(t.walletLabel," connection")),v=null!==(u=null===x||void 0===x||null===(d=x.namespaces)||void 0===d||null===(f=d.solana)||void 0===f?void 0:f.accounts)&&void 0!==u?u:[];if(0===v.length)throw new Error("".concat(t.walletLabel," session has no Solana accounts"));const b=v[0].split(":").pop(),w=r.A.encode(e),_=await p(m.request({topic:x.topic,chainId:i,request:{method:"solana_signMessage",params:{message:w,pubkey:b}}}),a,"".concat(t.walletLabel," signMessage"));if(null===_||void 0===_||!_.signature)throw new Error("".concat(t.walletLabel," did not return a signature"));const j=r.A.decode(_.signature);return localStorage.setItem(o,x.topic),localStorage.setItem(l,b),localStorage.setItem(c,t.walletOpenUri),{publicKey:b,signature:j}}function m(e){const t=localStorage.getItem(o),n=localStorage.getItem(l);return!(!t||!n)&&(!e||n===e)}async function g(){const e=localStorage.getItem(o);for(const n of[o,l,c])localStorage.removeItem(n);if(e)try{const t=u||await h();await t.disconnect({topic:e,reason:{code:6e3,message:"User logged out"}})}catch(t){}}async function y(e){const t=localStorage.getItem(o),n=localStorage.getItem(l),s=localStorage.getItem(c);if(!t||!n)throw new Error("No WalletConnect session \u2014 sign in first");const u=await h();if(!u.session.get(t))throw g(),new Error("WalletConnect session expired \u2014 please sign in again");s&&(window.location.href=s,await new Promise(e=>setTimeout(e,1500)));const d=await p(u.request({topic:t,chainId:i,request:{method:"solana_signTransaction",params:{transaction:e}}}),a,"WalletConnect signTransaction"),f=null===d||void 0===d?void 0:d.transaction;if(!f){if(null!==d&&void 0!==d&&d.signature)throw new Error("Wallet returned only a signature, not a signed transaction \u2014 unsupported flow");throw new Error("Wallet did not return a signed transaction")}return function(e){try{return r.A.decode(e)}catch(t){try{return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}catch(n){throw new Error("Wallet returned a signed tx in an unknown encoding (not base58 or base64)")}}}(f)}},8656:(e,t,n)=>{"use strict";const r=n(5092).v4;e.exports=function(e,t,n,i){if("string"!==typeof e)throw new TypeError(e+" must be a string");const s="number"===typeof(i=i||{}).version?i.version:2;if(1!==s&&2!==s)throw new TypeError(s+" must be 1 or 2");const a={method:e};if(2===s&&(a.jsonrpc="2.0"),t){if("object"!==typeof t&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");a.params=t}if("undefined"===typeof n){const e="function"===typeof i.generator?i.generator:function(){return r()};a.id=e(a,i)}else 2===s&&null===n?i.notificationIdNull&&(a.id=null):a.id=n;return a}},8697:(e,t,n)=>{const r=n(7421);function i(e){this.mode=r.BYTE,this.data="string"===typeof e?(new TextEncoder).encode(e):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},8780:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});const r="solana:signTransaction"},8801:(e,t,n)=>{"use strict";function r(){}n.d(t,{l:()=>r})},8845:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(8268),i=n(3272),s=n(8396),a=n(9323),o=n(5303);t.matchesProperty=function(e,t){switch(typeof e){case"object":var n;Object.is(null===(n=e)||void 0===n?void 0:n.valueOf(),-0)&&(e="-0");break;case"number":e=i.toKey(e)}return t=s.cloneDeep(t),function(n){const i=a.get(n,e);return void 0===i?o.has(n,e):void 0===t?void 0===i:r.isMatch(i,t)}}},8853:(e,t,n)=>{"use strict";e.exports=n(7234)},8970:(e,t,n)=>{const r=n(6116),i=n(4772),s=n(2182),a=n(5487);
2function o(e,t,n,s,a){const o=[].slice.call(arguments,1),l=o.length,c="function"===typeof o[l-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(n=t,t=s=void 0):2!==l||t.getContext||(s=n,n=t,t=void 0),new Promise(function(r,a){try{const a=i.create(n,s);r(e(a,t,s))}catch(o){a(o)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(a=n,n=t,t=s=void 0):3===l&&(t.getContext&&"undefined"===typeof a?(a=s,s=void 0):(a=s,s=n,n=t,t=void 0));try{const r=i.create(n,s);a(null,e(r,t,s))}catch(u){a(u)}}t.create=i.create,t.toCanvas=o.bind(null,s.render),t.toDataURL=o.bind(null,s.renderToDataURL),t.toString=o.bind(null,function(e,t,n){return a.render(e,n)})},9021:(e,t,n)=>{const r=n(7969).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},9045:(e,t,n)=>{var r=n(3738).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9323:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(7260),i=n(2489),s=n(3272),a=n(1444);t.get=function e(t,n,o){if(null==t)return o;switch(typeof n){case"string":{if(r.isUnsafeProperty(n))return o;const s=t[n];return void 0===s?i.isDeepKey(n)?e(t,a.toPath(n),o):o:s}case"number":case"symbol":{"number"===typeof n&&(n=s.toKey(n));const e=t[n];return void 0===e?o:e}default:{var l;if(Array.isArray(n))return function(e,t,n){if(0===t.length)return n;let i=e;for(let s=0;s<t.length;s++){if(null==i)return n;if(r.isUnsafeProperty(t[s]))return n;i=i[t[s]]}if(void 0===i)return n;return i}(t,n,o);if(n=Object.is(null===(l=n)||void 0===l?void 0:l.valueOf(),-0)?"-0":String(n),r.isUnsafeProperty(n))return o;const e=t[n];return void 0===e?o:e}}}},9328:(e,t,n)=>{"use strict";t.I0=t.DH=t.NX=t.u8=t.cY=void 0,t.av=t.O6=t.w3=t.Wg=void 0;const r=n(6382);function i(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function s(e){return i(e),r.Buffer.from(e.buffer,e.byteOffset,e.length)}class a{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 o(e,t){return t.property?e+"["+t.property+"]":e}class l extends a{isCount(){throw new Error("ExternalLayout is abstract")}}class c extends l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0;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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(e);const n=e.length-t;return Math.floor(n/this.elementSpan)}encode(e,t,n){return 0}}class u extends l{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;if(!(e instanceof a))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 h}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(e,t+this.offset)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.layout.encode(e,t,n+this.offset)}}class d extends a{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readUIntLE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeUIntLE(e,n,this.span),this.span}}class h extends a{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readUIntBE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeUIntBE(e,n,this.span),this.span}}class p extends a{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readIntLE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeIntLE(e,n,this.span),this.span}}class f extends a{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readIntBE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(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 x extends a{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=s(e),r=n.readUInt32LE(t);return y(n.readUInt32LE(t+4),r)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=s(t);return i.writeUInt32LE(r.lo32,n),i.writeUInt32LE(r.hi32,n+4),8}}class v extends a{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=s(e);return y(n.readUInt32BE(t),n.readUInt32BE(t+4))}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=s(t);return i.writeUInt32BE(r.hi32,n),i.writeUInt32BE(r.lo32,n+4),8}}class b extends a{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=s(e),r=n.readUInt32LE(t);return y(n.readInt32LE(t+4),r)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=s(t);return i.writeUInt32LE(r.lo32,n),i.writeInt32LE(r.hi32,n+4),8}}class w extends a{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=s(e);return y(n.readInt32BE(t),n.readUInt32BE(t+4))}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=s(t);return i.writeInt32BE(r.hi32,n),i.writeUInt32BE(r.lo32,n+4),8}}class _ extends a{constructor(e){super(4,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readFloatLE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeFloatLE(e,n),4}}class j extends a{constructor(e){super(4,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readFloatBE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeFloatBE(e,n),4}}class k extends a{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readDoubleLE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeDoubleLE(e,n),8}}class N extends a{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s(e).readDoubleBE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(t).writeDoubleBE(e,n),8}}class S extends a{constructor(e,t,n){if(!(e instanceof a))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof l&&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 l)&&0<e.span&&(r=t*e.span),super(r,n),this.elementLayout=e,this.count=t}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof l&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let i=0;for(;i<r;)n+=this.elementLayout.getSpan(e,t+n),++i}return n}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];let r=0,i=this.count;for(i instanceof l&&(i=i.decode(e,t));r<i;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.elementLayout,i=e.reduce((e,i)=>e+r.encode(i,t,n+e),0);return this.count instanceof l&&this.count.encode(e.length,t,n),i}}class E extends a{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>
2e&&t instanceof a,!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof t&&void 0===n&&(n=t,t=void 0);for(const s of e)if(0>s.span&&void 0===s.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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{const i=r.getSpan(e,t);return t+=i,n+i},0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=n;let i=0,s=0;for(const a of this.fields){let r=a.span;if(s=0<r?r:0,void 0!==a.property){const i=e[a.property];void 0!==i&&(s=a.encode(i,t,n),0>r&&(r=a.getSpan(t,n)))}i=n,n+=r}return i+s-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 A{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 C extends A{constructor(e,t){if(!(e instanceof l&&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 M extends a{constructor(e,t,n){let r;if(e instanceof d||e instanceof h)r=new C(new u(e));else if(e instanceof l&&e.isCount())r=new C(e);else{if(!(e instanceof A))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 a))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&&(e instanceof d||e instanceof h)&&(i+=r.layout.span)),super(i,n),this.discriminator=r,this.usesPrefixDiscriminator=e instanceof d||e instanceof h,this.defaultLayout=t,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return s(e)},this.configGetSourceVariant=function(e){s=e.bind(this)}}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.discriminator,i=r.decode(e,n),s=this.registry[i];if(void 0===s){const s=this.defaultLayout;let a=0;this.usesPrefixDiscriminator&&(a=r.layout.span),t=this.makeDestinationObject(),t[r.property]=i,t[s.property]=s.decode(e,n+a)}else t=s.decode(e,n);return t}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,i=this.defaultLayout;let s=0;return this.usesPrefixDiscriminator&&(s=r.layout.span),r.encode(e[r.property],t,n),s+i.encode(e[i.property],t,n+s)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new T(this,e,t,n);return this.registry[e]=r,r}getVariant(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=e instanceof Uint8Array?this.discriminator.decode(e,n):e,this.registry[t]}}class T extends a{constructor(e,t,n,r){if(!(e instanceof M))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");
2if("string"===typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof a))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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,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 i=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),i+=this.layout.getSpan(t,n+r),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function P(e){return 0>e&&(e+=4294967296),e}class O extends a{constructor(e,t,n){if(!(e instanceof d||e instanceof h))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=P(e),this},this._packedGetValue=function(){return r}}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.makeDestinationObject(),r=this.word.decode(e,t);this._packedSetValue(r);for(const i of this.fields)void 0!==i.property&&(n[i.property]=i.decode(e));return n}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.word.decode(t,n);this._packedSetValue(r);for(const i of this.fields)if(void 0!==i.property){const t=e[i.property];void 0!==t&&i.encode(t)}return this.word.encode(this._packedGetValue(),t,n)}addField(e,t){const n=new I(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new L(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 I{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,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>r)throw new Error("bits too long for span remainder ("+(r-i)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=r-i-t),this.wordMask=P(this.valueMask<<this.start),this.property=n}decode(e,t){return P(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if("number"!==typeof e||!Number.isInteger(e)||e!==P(e&this.valueMask))throw new TypeError(o("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 L extends I{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 R extends a{constructor(e,t){if(!(e instanceof l&&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 l||(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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.span;return 0>n&&(n=this.length.decode(e,t)),s(e).slice(t,t+n)}encode(e,t,n){let r=this.length;if(this.length instanceof l&&(r=e.length),!(e instanceof Uint8Array&&r===e.length))throw new TypeError(o("Blob.encode",this)+" requires (length "+r+") Uint8Array as src");if(n+r>t.length)throw new RangeError("encoding overruns Uint8Array");const i=s(e);return s(t).write(i.toString("hex"),n,r,"hex"),this.length instanceof l&&this.length.encode(r,t,n),r}}class D extends a{constructor(e){super(-1,e)}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(e);let n=t;for(;n<e.length&&0!==e[n];)n+=1;return 1+n-t}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.getSpan(e,t);return s(e).slice(t,t+n-1).toString("utf-8")}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));const i=r.Buffer.from(e,"utf8"),a=i.length;if(n+a>t.length)throw new RangeError("encoding overruns Buffer");const o=s(t);return i.copy(o,n),o[n+a]=0,a+1}}class B extends a{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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(e),e.length-t}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<n)throw new RangeError("text length exceeds maxSpan");return s(e).slice(t,t+n).toString("utf-8")}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));const i=r.Buffer.from(e,"utf8"),a=i.length;if(0<=this.maxSpan&&this.maxSpan<a)throw new RangeError("text length exceeds maxSpan");if(n+a>t.length)throw new RangeError("encoding overruns Buffer");return i.copy(s(t),n),a}}class F extends a{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}t.cY=(e,t,n)=>new u(e,t,n),t.u8=e=>new d(1,e),t.NX=e=>new d(2,e),t.DH=e=>
2new d(4,e),t.I0=e=>new x(e),t.Wg=e=>new b(e),t.w3=(e,t,n)=>new E(e,t,n),t.O6=(e,t,n)=>new S(e,t,n),t.av=(e,t)=>new R(e,t)},9379:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(4705);function i(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},9382:(e,t,n)=>{const r=n(7969).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),s=[n-7];for(let r=1;r<t-1;r++)s[r]=s[r-1]-i;return s.push(6),s.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||n.push([r[t],r[e]]);return n}},9397:(e,t,n)=>{e.exports=n(2682).isPlainObject},9461:(e,t,n)=>{"use strict";e.exports=n(2330)},9599:(e,t)=>
2{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.identity=function(e){return e}},9642:(e,t,n)=>{const r=n(7421),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(e){this.mode=r.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=s},9645:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(6392),i=n(8346),s=n(1203);t.last=function(e){if(s.isArrayLike(e))return r.last(i.toArray(e))}},9709:(e,t)=>{"use strict";function n(e){return"symbol"===typeof e?1:null===e?2:void 0===e?3:e!==e?4:0}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.compareValues=(e,t,r)=>{if(e!==t){const i=n(e),s=n(t);if(i===s&&0===i){if(e<t)return"desc"===r?1:-1;if(e>t)return"desc"===r?-1:1}return"desc"===r?s-i:i-s}return 0}},9717:(e,t,n)=>{"use strict";var r=n(5043),i=n(9461);var s="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=i.useSyncExternalStore,o=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return o=t}return o=e}if(t=o,s(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,o=n)}var a,o,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]);var p=a(e,d[0],d[1]);return l(function(){h.hasValue=!0,h.value=p},[p]),u(p),p}},9810:(e,t,n)=>{var r=n(4925);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},9859:(e,t,n)=>{e.exports=n(7231).range},9903:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.ary=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.apply(this,r.slice(0,t))}}},9921:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObjectLike=function(e){return"object"===typeof e&&null!==e}},9966:(e,t,n)=>{var r=n(6382),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),s(i,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var s=Object.create(null);n.r(s);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&i&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(s,a),s}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+"."+{185:"246dbf00",227:"16d17bad",275:"cd398970",289:"f2adfad0",453:"8701dc61",482:"89a0b7a0",648:"0635c08c",765:"5340a2a3"}[e]+".chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}
2}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="frontend:";n.l=(r,i,s,a)=>{if(e[r])e[r].push(i);else{var o,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+s){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",n.nc&&o.setAttribute("nonce",n.nc),o.setAttribute("data-webpack",t+s),o.src=r),e[r]=[i];var h=(t,n)=>{o.onerror=o.onload=null,clearTimeout(p);var i=e[r];if(delete e[r],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(n)),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=h.bind(null,o.onerror),o.onload=h.bind(null,o.onload),l&&document.head.appendChild(o)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var s=new Promise((n,r)=>i=e[t]=[n,r]);r.push(i[2]=s);var a=n.p+n.u(t),o=new Error;n.l(a,r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var s=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;o.message="Loading chunk "+t+" failed.\n("+s+": "+a+")",o.name="ChunkLoadError",o.type=s,o.request=a,i[1](o)}},"chunk-"+t,t)}};var t=(t,r)=>{var i,s,[a,o,l]=r,c=0;if(a.some(t=>0!==e[t])){for(i in o)n.o(o,i)&&(n.m[i]=o[i]);if(l)l(n)}for(t&&t(r);c<a.length;c++)s=a[c],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0},r=self.webpackChunkfrontend=self.webpackChunkfrontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{Decoder:()=>Tv,Encoder:()=>Mv,PacketType:()=>Cv,isPacketValid:()=>Lv,protocol:()=>Av});var t={};n.r(t),n.d(t,{scaleBand:()=>UC,scaleDiverging:()=>YO,scaleDivergingLog:()=>GO,scaleDivergingPow:()=>ZO,scaleDivergingSqrt:()=>QO,scaleDivergingSymlog:()=>JO,scaleIdentity:()=>qM,scaleImplicit:()=>FC.h,scaleLinear:()=>zM,scaleLog:()=>ZM,scaleOrdinal:()=>FC.A,scalePoint:()=>qC,scalePow:()=>aT,scaleQuantile:()=>xT,scaleQuantize:()=>vT,scaleRadial:()=>cT,scaleSequential:()=>zO,scaleSequentialLog:()=>qO,scaleSequentialPow:()=>HO,scaleSequentialQuantile:()=>VO,scaleSequentialSqrt:()=>KO,scaleSequentialSymlog:()=>WO,scaleSqrt:()=>oT,scaleSymlog:()=>tT,scaleThreshold:()=>bT,scaleTime:()=>DO,scaleUtc:()=>BO,tickFormat:()=>FM});var r=n(5043),i=n.t(r,2),s=n(4391),a=n(3986),o=n(9379);const l=["sri"],c=["page"],u=["page","matches"],d=["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],h=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],p=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];var f="popstate";function m(){return _(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return v("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:b(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function g(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function y(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function x(e,t){return{usr:e.state,key:e.key,idx:t}}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return(0,o.A)((0,o.A)({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?w(t):t),{},{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function b(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function w(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,l="POP",c=null,u=d();function d(){return(a.state||{idx:null}).idx}function h(){l="POP";let e=d(),t=null==e?null:e-u;u=e,c&&c({action:l,location:m.location,delta:t})}function p(e){return j(e)}null==u&&(u=0,a.replaceState((0,o.A)((0,o.A)({},a.state),{},{idx:u}),""));let m={get action(){return l},get location(){return e(i,a)},listen(e){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(f,h),c=e,()=>{i.removeEventListener(f,h),c=null}},createHref:e=>
2t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l="PUSH";let r=v(m.location,e,t);n&&n(r,e),u=d()+1;let o=x(r,u),h=m.createHref(r);try{a.pushState(o,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}s&&c&&c({action:l,location:m.location,delta:1})},replace:function(e,t){l="REPLACE";let r=v(m.location,e,t);n&&n(r,e),u=d();let i=x(r,u),o=m.createHref(r);a.replaceState(i,"",o),s&&c&&c({action:l,location:m.location,delta:0})},go:e=>a.go(e)};return m}function j(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),g(n,"No window.location.(origin|href) available to create URL");let r="string"===typeof e?e:b(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}new WeakMap;function k(e,t){return N(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function N(e,t,n,r){let i=U(("string"===typeof t?w(t):t).pathname||"/",n);if(null==i)return null;let s=S(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(s);let a=null;for(let o=0;null==a&&o<s.length;++o){let e=F(i);a=R(s[o],e,r)}return a}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=function(e,s){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,o=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:s,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;g(l.relativePath.startsWith(r),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(r,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),l.relativePath=l.relativePath.slice(r.length)}let c=K([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(g(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),S(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:L(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let r of E(e.path))s(e,t,!0,r);else s(e,t)}),t}function E(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(0===r.length)return i?[s,""]:[s];let a=E(r.join("/")),o=[];return o.push(...a.map(e=>""===e?s:[s,e].join("/"))),i&&o.push(...a),o.map(t=>e.startsWith("/")&&""===t?"/":t)}var A=/^:[\w-]+$/,C=3,M=2,T=1,P=10,O=-2,I=e=>"*"===e;function L(e,t){let n=e.split("/"),r=n.length;return n.some(I)&&(r+=O),t&&(r+=M),n.filter(e=>!I(e)).reduce((e,t)=>e+(A.test(t)?C:""===t?T:P),r)}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,i={},s="/",a=[];for(let o=0;o<r.length;++o){let e=r[o],l=o===r.length-1,c="/"===s?t:t.slice(s.length)||"/",u=D({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=D({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;
2Object.assign(i,u.params),a.push({params:i,pathname:K([s,u.pathname]),pathnameBase:V(K([s,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(s=K([s,u.pathnameBase]))}return a}function D(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=B(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1),l=r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=o[n]||"";a=s.slice(0,s.length-e.length).replace(/(.)\/+$/,"$1")}const l=o[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:s,pathnameBase:a,pattern:e}}function B(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];y("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function F(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return y(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function U(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"]. Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function q(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function W(e){let t=q(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function H(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=w(e):(r=(0,o.A)({},e),g(!r.pathname||!r.pathname.includes("?"),z("?","pathname","search",r)),g(!r.pathname||!r.pathname.includes("#"),z("#","pathname","hash",r)),g(!r.search||!r.search.includes("#"),z("#","search","hash",r)));let s,a=""===e||""===r.pathname,l=a?"/":r.pathname;if(null==l)s=n;else{let e=t.length-1;if(!i&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}s=e>=0?t[e]:"/"}let c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:n,search:r="",hash:i=""}="string"===typeof e?w(e):e,s=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:s,search:$(r),hash:Y(i)}}(r,s),u=l&&"/"!==l&&l.endsWith("/"),d=(a||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}var K=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Y=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function G(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var J=["POST","PUT","PATCH","DELETE"],Z=(new Set(J),["GET",...J]);new Set(Z),Symbol("ResetLoaderData");var Q=r.createContext(null);Q.displayName="DataRouter";var X=r.createContext(null);X.displayName="DataRouterState";var ee=r.createContext(!1);var te=r.createContext({isTransitioning:!1});te.displayName="ViewTransition";var ne=r.createContext(new Map);
2ne.displayName="Fetchers";var re=r.createContext(null);re.displayName="Await";var ie=r.createContext(null);ie.displayName="Navigation";var se=r.createContext(null);se.displayName="Location";var ae=r.createContext({outlet:null,matches:[],isDataRoute:!1});ae.displayName="Route";var oe=r.createContext(null);oe.displayName="RouteError";function le(){return null!=r.useContext(se)}function ce(){return g(le(),"useLocation() may be used only in the context of a <Router> component."),r.useContext(se).location}var ue="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function de(e){r.useContext(ie).static||r.useLayoutEffect(e)}function he(){let{isDataRoute:e}=r.useContext(ae);return e?function(){let{router:e}=_e("useNavigate"),t=ke("useNavigate"),n=r.useRef(!1);de(()=>{n.current=!0});let i=r.useCallback(async function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y(n.current,ue),n.current&&("number"===typeof r?e.navigate(r):await e.navigate(r,(0,o.A)({fromRouteId:t},i)))},[e,t]);return i}():function(){g(le(),"useNavigate() may be used only in the context of a <Router> component.");let e=r.useContext(Q),{basename:t,navigator:n}=r.useContext(ie),{matches:i}=r.useContext(ae),{pathname:s}=ce(),a=JSON.stringify(W(i)),o=r.useRef(!1);de(()=>{o.current=!0});let l=r.useCallback(function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(y(o.current,ue),!o.current)return;if("number"===typeof r)return void n.go(r);let l=H(r,JSON.parse(a),s,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:K([t,l.pathname])),(i.replace?n.replace:n.push)(l,i.state,i)},[t,n,a,s,e]);return l}()}r.createContext(null);function pe(){let{matches:e}=r.useContext(ae),t=e[e.length-1];return t?t.params:{}}function fe(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=r.useContext(ae),{pathname:i}=ce(),s=JSON.stringify(W(n));return r.useMemo(()=>H(e,JSON.parse(s),i,"path"===t),[e,s,i,t])}function me(e,t,n,i,s){g(le(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=r.useContext(ie),{matches:l}=r.useContext(ae),c=l[l.length-1],u=c?c.params:{},d=c?c.pathname:"/",h=c?c.pathnameBase:"/",p=c&&c.route;{let e=p&&p.path||"";Ee(d,!p||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let f,m=ce();if(t){var x;let e="string"===typeof t?w(t):t;g("/"===h||(null===(x=e.pathname)||void 0===x?void 0:x.startsWith(h)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(h,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),f=e}else f=m;let v=f.pathname||"/",b=v;if("/"!==h){let e=h.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let _=k(e,{pathname:b});y(p||null!=_,'No routes matched location "'.concat(f.pathname).concat(f.search).concat(f.hash,'" ')),y(null==_||void 0!==_[_.length-1].route.element||void 0!==_[_.length-1].route.Component||void 0!==_[_.length-1].route.lazy,'Matched leaf route at location "'.concat(f.pathname).concat(f.search).concat(f.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let j=be(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:K([h,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:K([h,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),l,n,i,s);return t&&j?r.createElement(se.Provider,{value:{location:(0,o.A)({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:"POP"}},j):j}function ge(){let e=Ne(),t=G(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=r.createElement(r.Fragment,null,r.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:a},"ErrorBoundary")," or"," ",r.createElement("code",{style:a},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application
2Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:s},n):null,o)}var ye=r.createElement(ge,null),xe=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return void 0!==this.state.error?r.createElement(ae.Provider,{value:this.props.routeContext},r.createElement(oe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ve(e){let{routeContext:t,match:n,children:i}=e,s=r.useContext(Q);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(ae.Provider,{value:t},i)}function be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let s=e,a=null===n||void 0===n?void 0:n.errors;if(null!=a){let e=s.findIndex(e=>e.route.id&&void 0!==(null===a||void 0===a?void 0:a[e.route.id]));g(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(a).join(","))),s=s.slice(0,Math.min(s.length,e+1))}let o=!1,l=-1;if(n)for(let r=0;r<s.length;r++){let e=s[r];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(l=r),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){o=!0,s=l>=0?s.slice(0,l+1):[s[0]];break}}}return s.reduceRight((e,c,u)=>{let d,h=!1,p=null,f=null;n&&(d=a&&c.route.id?a[c.route.id]:void 0,p=c.route.errorElement||ye,o&&(l<0&&0===u?(Ee("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,f=null):l===u&&(h=!0,f=c.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,u+1)),g=()=>{let t;return t=d?p:h?f:c.route.Component?r.createElement(c.route.Component,null):c.route.element?c.route.element:e,r.createElement(ve,{match:c,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(c.route.ErrorBoundary||c.route.errorElement||0===u)?r.createElement(xe,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},unstable_onError:i}):g()},null)}function we(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function _e(e){let t=r.useContext(Q);return g(t,we(e)),t}function je(e){let t=r.useContext(X);return g(t,we(e)),t}function ke(e){let t=function(e){let t=r.useContext(ae);return g(t,we(e)),t}(e),n=t.matches[t.matches.length-1];return g(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function Ne(){var e;let t=r.useContext(oe),n=je("useRouteError"),i=ke("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[i]}var Se={};function Ee(e,t,n){t||Se[e]||(Se[e]=!0,y(!1,n))}var Ae={};function Ce(e,t){e||Ae[t]||(Ae[t]=!0,console.warn(t))}r.memo(function(e){let{routes:t,future:n,state:r,unstable_onError:i}=e;return me(t,void 0,r,i,n)});function Me(e){g(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Te(e){let{basename:t="/",children:n=null,location:i,navigationType:s="POP",navigator:a,static:o=!1}=e;g(!le(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=r.useMemo(()=>({basename:l,navigator:a,static:o,future:{}}),[l,a,o]);"string"===typeof i&&(i=w(i));
2let{pathname:u="/",search:d="",hash:h="",state:p=null,key:f="default"}=i,m=r.useMemo(()=>{let e=U(u,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:s}},[l,u,d,h,p,f,s]);return y(null!=m,'<Router basename="'.concat(l,'"> is not able to match the URL "').concat(u).concat(d).concat(h,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==m?null:r.createElement(ie.Provider,{value:c},r.createElement(se.Provider,{children:n,value:m}))}function Pe(e){let{children:t,location:n}=e;return me(Oe(t),n)}r.Component;function Oe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return r.Children.forEach(e,(e,i)=>{if(!r.isValidElement(e))return;let s=[...t,i];if(e.type===r.Fragment)return void n.push.apply(n,Oe(e.props.children,s));g(e.type===Me,"[".concat("string"===typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),g(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||s.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Oe(e.props.children,s)),n.push(a)}),n}var Ie="get",Le="application/x-www-form-urlencoded";function Re(e){return null!=e&&"string"===typeof e.tagName}function De(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}var Be=null;var Fe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ue(e){return null==e||Fe.has(e)?e:(y(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Le,'"')),null)}function ze(e,t){let n,r,i,s,a;if(function(e){return Re(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?U(a,t):null,n=e.getAttribute("method")||Ie,i=Ue(e.getAttribute("enctype"))||Le,s=new FormData(e)}else if(function(e){return Re(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Re(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=e.getAttribute("formaction")||a.getAttribute("action");if(r=o?U(o,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Ie,i=Ue(e.getAttribute("formenctype"))||Ue(a.getAttribute("enctype"))||Le,s=new FormData(a,e),!function(){if(null===Be)try{new FormData(document.createElement("form"),0),Be=!1}catch(e){Be=!0}return Be}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?"".concat(t,"."):"";s.append("".concat(e,"x"),"0"),s.append("".concat(e,"y"),"0")}else t&&s.append(t,r)}}else{if(Re(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ie,r=null,i=Le,a=e}return s&&"text/plain"===i&&(a=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!==typeof window?window:"undefined"!==typeof globalThis&&globalThis;function qe(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}Symbol("SingleFetchRedirect");function We(e,t,n){let r="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname="_root.".concat(n):t&&"/"===U(r.pathname,t)?r.pathname="".concat(t.replace(/\/$/,""),"/_root.").concat(n):r.pathname="".concat(r.pathname.replace(/\/$/,""),".").concat(n),r}async function He(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error("Error loading route module `".concat(e.module,"`, reloading page...")),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.
2isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ke(e){return null!=e&&"string"===typeof e.page}function Ve(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"===typeof e.imageSrcSet&&"string"===typeof e.imageSizes:"string"===typeof e.rel&&"string"===typeof e.href)}function $e(e,t,n,r,i,s){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,o=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null===(r=n[t].route.path)||void 0===r?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===s?t.filter((e,t)=>a(e,t)||o(e,t)):"data"===s?t.filter((t,s)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,s)||o(t,s))return!0;if(t.route.shouldRevalidate){var c;let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null===(c=n[0])||void 0===c?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof r)return r}return!0}):[]}function Ye(e,t){let{includeHydrateFallback:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Ge(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ke(i)&&"script"===i.as&&i.href&&r.has(i.href))return e;let s=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(i));return n.has(s)||(n.add(s),e.push({key:s,link:i})),e},[])}function Je(e,t){return"lazy"===e.mode&&!0===t}function Ze(){let e=r.useContext(Q);return qe(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qe(){let e=r.useContext(X);return qe(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xe=r.createContext(void 0);function et(){let e=r.useContext(Xe);return qe(e,"You must render this element inside a <HydratedRouter> element"),e}function tt(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function nt(e,t,n){if(n&&!at)return[e[0]];if(t){let n=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,n+1)}return e}Xe.displayName="FrameworkContext";function rt(e){let{page:t}=e,n=(0,a.A)(e,c),{router:i}=Ze(),s=r.useMemo(()=>k(i.routes,t,i.basename),[i.routes,t,i.basename]);return s?r.createElement(st,(0,o.A)({page:t,matches:s},n)):null}function it(e){let{manifest:t,routeModules:n}=et(),[i,s]=r.useState([]);return r.useEffect(()=>{let r=!1;return async function(e,t,n){return Ge((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await He(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ve).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?(0,o.A)((0,o.A)({},e),{},{rel:"prefetch",as:"style"}):(0,o.A)((0,o.A)({},e),{},{rel:"prefetch"})))}(e,t,n).then(e=>{r||s(e)}),()=>{r=!0}},[e,t,n]),i}function st(e){let{page:t,matches:n}=e,i=(0,a.A)(e,u),s=ce(),{manifest:l,routeModules:c}=et(),{basename:d}=Ze(),{loaderData:h,matches:p}=Qe(),f=r.useMemo(()=>$e(t,n,p,l,s,"data"),[t,n,p,l,s]),m=r.useMemo(()=>$e(t,n,p,l,s,"assets"),[t,n,p,l,s]),g=r.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let e=new Set,r=!1;if(n.forEach(t=>{var n;let i=l.routes[t.route.id];i&&i.hasLoader&&(!f.some(e=>e.route.id===t.route.id)&&t.route.id in h&&null!==(n=c[t.route.id])&&void 0!==n&&n.shouldRevalidate||i.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let i=We(t,d,"data");return r&&e.size>0&&i.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[i.pathname+i.search]},[d,h,s,l,f,n,t,c]),y=r.useMemo(()=>Ye(m,l),[m,l]),x=it(m);return r.createElement(r.Fragment,null,g.map(e=>r.createElement("link",(0,o.A)({key:e,rel:"prefetch",as:"fetch",href:e},i))),y.map(e=>r.createElement("link",(0,o.A)({key:e,rel:"modulepreload",href:e},i))),x.map(e=>{let{key:t,link:n}=e;return r.createElement("link",(0,o.A)({key:t,nonce:i.nonce},n))}))}var at=!1;function ot(e){let{manifest:t,serverHandoffString:n,isSpaMode:i,renderMeta:s,routeDiscovery:c,ssr:u}=et(),{router:d,static:h,staticContext:p}=Ze(),{matches:f}=Qe(),m=r.useContext(ee),g=Je(c,u);s&&(s.didRenderScripts=!0);let y=nt(f,null,i);r.useEffect(()=>{0},[]);let x=r.useMemo(()=>{var i;if(m)return null;let s=p?"window.__reactRouterContext = ".concat(n,";").concat("window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}
2).pipeThrough(new TextEncoderStream());"):" ",c=h?"".concat(null!==t.hmr&&void 0!==i&&i.runtime?"import ".concat(JSON.stringify(t.hmr.runtime),";"):"").concat(g?"":"import ".concat(JSON.stringify(t.url)),";\n").concat(y.map((e,n)=>{let r="route".concat(n),i=t.routes[e.route.id];qe(i,"Route ".concat(e.route.id," not found in manifest"));let{clientActionModule:s,clientLoaderModule:a,clientMiddlewareModule:o,hydrateFallbackModule:l,module:c}=i,u=[...s?[{module:s,varName:"".concat(r,"_clientAction")}]:[],...a?[{module:a,varName:"".concat(r,"_clientLoader")}]:[],...o?[{module:o,varName:"".concat(r,"_clientMiddleware")}]:[],...l?[{module:l,varName:"".concat(r,"_HydrateFallback")}]:[],{module:c,varName:"".concat(r,"_main")}];return 1===u.length?"import * as ".concat(r," from ").concat(JSON.stringify(c),";"):[u.map(e=>"import * as ".concat(e.varName,' from "').concat(e.module,'";')).join("\n"),"const ".concat(r," = {").concat(u.map(e=>"...".concat(e.varName)).join(","),"};")].join("\n")}).join("\n"),"\n ").concat(g?"window.__reactRouterManifest = ".concat(JSON.stringify(function(e,t){let{sri:n}=e,r=(0,a.A)(e,l),i=new Set(t.state.matches.map(e=>e.route.id)),s=t.state.location.pathname.split("/").filter(Boolean),c=["/"];for(s.pop();s.length>0;)c.push("/".concat(s.join("/"))),s.pop();c.forEach(e=>{let n=k(t.routes,e,t.basename);n&&n.forEach(e=>i.add(e.route.id))});let u=[...i].reduce((e,t)=>Object.assign(e,{[t]:r.routes[t]}),{});return(0,o.A)((0,o.A)({},r),{},{routes:u,sri:!!n||void 0})}(t,d),null,2),";"):"","\n window.__reactRouterRouteModules = {").concat(y.map((e,t)=>"".concat(JSON.stringify(e.route.id),":route").concat(t)).join(","),"};\n\nimport(").concat(JSON.stringify(t.entry.module),");"):" ";return r.createElement(r.Fragment,null,r.createElement("script",(0,o.A)((0,o.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:s},type:void 0})),r.createElement("script",(0,o.A)((0,o.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:c},type:"module",async:!0})))},[]),v=at||m?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(Ye(y,t,{includeHydrateFallback:!0}))),b="object"===typeof t.sri?t.sri:{};return Ce(!m,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),at||m?null:r.createElement(r.Fragment,null,"object"===typeof t.sri?r.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:b})}}):null,g?null:r.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:b[t.url],suppressHydrationWarning:!0}),r.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:b[t.entry.module],suppressHydrationWarning:!0}),v.map(t=>r.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:b[t],suppressHydrationWarning:!0})),x)}function lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)})}}r.Component;function ct(e){let{error:t,isOutsideRemixApp:n}=e;console.error(t);let i,s=r.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "\ud83d\udcbf Hey developer \ud83d\udc4b. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(G(t))return r.createElement(ut,{title:"Unhandled Thrown Response!"},r.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),s);if(t instanceof Error)0;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);new Error(e)}return r.createElement(ut,{title:"Application Error!",isOutsideRemixApp:n},r.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),r.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},i.stack),s)}function ut(e){var t;let{title:n,renderScripts:i,isOutsideRemixApp:s,children:a}=e,{routeModules:o}=et();return null!==o.root&&void 0!==t&&t.Layout&&!s?a:r.createElement("html",{lang:"en"},r.createElement("head",null,r.createElement("meta",{charSet:"utf-8"}),r.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),r.createElement("title",null,n)),r.createElement("body",null,r.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,i?r.createElement(ot,null):null)))}var dt="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{dt&&(window.__reactRouterVersion="7.9.4")}catch(d$){}function ht(e){let{basename:t,children:n,window:i}=e,s=r.useRef();null==s.current&&(s.current=m({window:i,v5Compat:!0}));let a=s.current,[o,l]=r.useState({action:a.action,location:a.location}),c=r.useCallback(e=>{r.startTransition(()=>l(e))},[l]);return r.useLayoutEffect(()=>a.listen(c),[a,c]),r.createElement(Te,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a})}var pt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ft=r.forwardRef(function(e,t){let n,{onClick:i,discover:s="render",prefetch:l="none",relative:c,reloadDocument:u,replace:h,state:p,target:f,to:m,preventScrollReset:x,viewTransition:v}=e,w=(0,a.A)(e,d),{basename:_}=r.useContext(ie),j="string"===typeof m&&pt.test(m),k=!1;if("string"===typeof m&&j&&(n=m,dt))try{let e=new URL(window.location.href),t=m.startsWith("//")?new URL(e.protocol+m):new URL(m),n=U(t.pathname,_);t.origin===e.origin&&null!=n?m=n+t.search+t.hash:k=!0}catch(d$){y(!1,'<Link to="'.concat(m,'">
2 contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}let N=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(le(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=r.useContext(ie),{hash:s,pathname:a,search:o}=fe(e,{relative:t}),l=a;return"/"!==n&&(l="/"===a?n:K([n,a])),i.createHref({pathname:l,search:o,hash:s})}(m,{relative:c}),[S,E,A]=function(e,t){let n=r.useContext(Xe),[i,s]=r.useState(!1),[a,o]=r.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:h}=t,p=r.useRef(null);r.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(i){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[i]);let f=()=>{s(!0)},m=()=>{s(!1),o(!1)};return n?"intent"!==e?[a,p,{}]:[a,p,{onFocus:tt(l,f),onBlur:tt(c,m),onMouseEnter:tt(u,f),onMouseLeave:tt(d,m),onTouchStart:tt(h,f)}]:[!1,p,{}]}(l,w),C=function(e){let{target:t,replace:n,state:i,preventScrollReset:s,relative:a,viewTransition:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=he(),c=ce(),u=fe(e,{relative:a});return r.useCallback(r=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(r,t)){r.preventDefault();let t=void 0!==n?n:b(c)===b(u);l(e,{replace:t,state:i,preventScrollReset:s,relative:a,viewTransition:o})}},[c,l,u,n,i,t,e,s,a,o])}(m,{replace:h,state:p,target:f,preventScrollReset:x,relative:c,viewTransition:v});let M=r.createElement("a",(0,o.A)((0,o.A)((0,o.A)({},w),A),{},{href:n||N,onClick:k||u?i:function(e){i&&i(e),e.defaultPrevented||C(e)},ref:lt(t,E),target:f,"data-discover":j||"render"!==s?void 0:"true"}));return S&&!j?r.createElement(r.Fragment,null,M,r.createElement(rt,{page:N})):M});ft.displayName="Link";var mt=r.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:l=!1,style:c,to:u,viewTransition:d,children:p}=e,f=(0,a.A)(e,h),m=fe(u,{relative:f.relative}),y=ce(),x=r.useContext(X),{navigator:v,basename:b}=r.useContext(ie),w=null!=x&&function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.useContext(te);g(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=xt("useViewTransitionState"),s=fe(e,{relative:t});if(!n.isTransitioning)return!1;let a=U(n.currentLocation.pathname,i)||n.currentLocation.pathname,o=U(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=D(s.pathname,o)||null!=D(s.pathname,a)}(m)&&!0===d,_=v.encodeLocation?v.encodeLocation(m).pathname:m.pathname,j=y.pathname,k=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(j=j.toLowerCase(),k=k?k.toLowerCase():null,_=_.toLowerCase()),k&&b&&(k=U(k,b)||k);const N="/"!==_&&_.endsWith("/")?_.length-1:_.length;let S,E=j===_||!l&&j.startsWith(_)&&"/"===j.charAt(N),A=null!=k&&(k===_||!l&&k.startsWith(_)&&"/"===k.charAt(_.length)),C={isActive:E,isPending:A,isTransitioning:w},M=E?n:void 0;S="function"===typeof s?s(C):[s,E?"active":null,A?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let T="function"===typeof c?c(C):c;return r.createElement(ft,(0,o.A)((0,o.A)({},f),{},{"aria-current":M,className:S,ref:t,style:T,to:u,viewTransition:d}),"function"===typeof p?p(C):p)});mt.displayName="NavLink";var gt=r.forwardRef((e,t)=>{let{discover:n="render",fetcherKey:i,navigate:s,reloadDocument:l,replace:c,state:u,method:d=Ie,action:h,onSubmit:f,relative:m,preventScrollReset:y,viewTransition:x}=e,v=(0,a.A)(e,p),w=_t(),_=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{basename:n}=r.useContext(ie),i=r.useContext(ae);g(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),a=(0,o.A)({},fe(e||".",{relative:t})),l=ce();if(null==e){a.search=l.search;let e=new URLSearchParams(a.search),t=e.getAll("index"),n=t.some(e=>""===e);if(n){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();a.search=n?"?".concat(n):""}}e&&"."!==e||!s.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:K([n,a.pathname]));return b(a)}(h,{relative:m}),j="get"===d.toLowerCase()?"get":"post",k="string"===typeof h&&pt.test(h);return r.createElement("form",(0,o.A)((0,o.A)({ref:t,method:j,action:_,onSubmit:l?f:e=>{if(f&&f(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null===t||void 0===t?void 0:t.getAttribute("formmethod"))||d;w(t||e.currentTarget,{fetcherKey:i,method:n,navigate:s,replace:c,state:u,relative:m,preventScrollReset:y,viewTransition:x})}},v),{},{"data-discover":k||"render"!==n?void 0:"true"}))});function yt(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function xt(e){let t=r.useContext(Q);return g(t,yt(e)),t}function vt(e){y("undefined"!==typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=r.useRef(De(e)),n=r.useRef(!1),i=ce(),s=r.useMemo(()=>function(e,t){let n=De(e);return t&&t.forEach((e,r)=>
2{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(i.search,n.current?null:t.current),[i.search]),a=he(),o=r.useCallback((e,t)=>{const r=De("function"===typeof e?e(new URLSearchParams(s)):e);n.current=!0,a("?"+r,t)},[a,s]);return[s,o]}gt.displayName="Form";var bt=0,wt=()=>"__".concat(String(++bt),"__");function _t(){let{router:e}=xt("useSubmit"),{basename:t}=r.useContext(ie),n=ke("useRouteId");return r.useCallback(async function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{action:s,method:a,encType:o,formData:l,body:c}=ze(r,t);if(!1===i.navigate){let t=i.fetcherKey||wt();await e.fetch(t,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||o,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||o,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}var jt=n(4705),kt=n(6366),Nt=n.n(kt),St=n(2740),Et=n.n(St),At=n(7324),Ct=n.n(At);const Mt=["children"],Tt=["children"];var Pt,Ot,It=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(It||{}),Lt={rel:["amphtml","canonical","alternate"]},Rt={type:["application/ld+json"]},Dt={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},Bt=Object.values(It),Ft={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Ut=Object.entries(Ft).reduce((e,t)=>{let[n,r]=t;return e[r]=n,e},{}),zt="data-rh",qt="defaultTitle",Wt="defer",Ht="encodeSpecialCharacters",Kt="onChangeClientState",Vt="titleTemplate",$t="prioritizeSeoTags",Yt=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},Gt=e=>{let t=Yt(e,"title");const n=Yt(e,Vt);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Yt(e,qt);return t||r||void 0},Jt=e=>Yt(e,Kt)||(()=>{}),Zt=(e,t)=>t.filter(t=>"undefined"!==typeof t[e]).map(t=>t[e]).reduce((e,t)=>(0,o.A)((0,o.A)({},e),t),{}),Qt=(e,t)=>t.filter(e=>"undefined"!==typeof e.base).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){const r=Object.keys(n);for(let i=0;i<r.length;i+=1){const s=r[i].toLowerCase();if(-1!==e.indexOf(s)&&n[s])return t.concat(n)}}return t},[]),Xt=(e,t,n)=>{const r={};return n.filter(t=>{return!!Array.isArray(t[e])||("undefined"!==typeof t[e]&&(n="Helmet: ".concat(e,' should be of type "Array". Instead found type "').concat(typeof t[e],'"'),console&&"function"===typeof console.warn&&console.warn(n)),!1);var n}).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{let n;const s=Object.keys(e);for(let r=0;r<s.length;r+=1){const i=s[r],a=i.toLowerCase();-1===t.indexOf(a)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===a&&"stylesheet"===e[a].toLowerCase()||(n=a),-1===t.indexOf(i)||"innerHTML"!==i&&"cssText"!==i&&"itemprop"!==i||(n=i)}if(!n||!e[n])return!1;const a=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][a]&&(i[n][a]=!0,!0)}).reverse().forEach(t=>e.push(t));const s=Object.keys(i);for(let t=0;t<s.length;t+=1){const e=s[t],n=(0,o.A)((0,o.A)({},r[e]),i[e]);r[e]=n}return e},[]).reverse()},en=(e,t)=>{if(Array.isArray(e)&&e.length)for(let n=0;n<e.length;n+=1){if(e[n][t])return!0}return!1},tn=e=>Array.isArray(e)?e.join(""):e,nn=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(((e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1})(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},rn=(e,t)=>(0,o.A)((0,o.A)({},e),{},{[t]:void 0}),sn=["noscript","script","style"],an=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},on=e=>Object.keys(e).reduce((t,n)=>{const r="undefined"!==typeof e[n]?"".concat(n,'="').concat(e[n],'"'):"".concat(n);return t?"".concat(t," ").concat(r):r},""),ln=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((t,n)=>(t[Ft[n]||n]=e[n],t),t)},cn=(e,t)=>t.map((t,n)=>{const i={key:n,[zt]:!0};
2return Object.keys(t).forEach(e=>{const n=Ft[e]||e;if("innerHTML"===n||"cssText"===n){const e=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:e}}else i[n]=t[e]}),r.createElement(e,i)}),un=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];switch(e){case"title":return{toComponent:()=>((e,t,n)=>{const i=ln(n,{key:t,[zt]:!0});return[r.createElement("title",i,t)]})(0,t.title,t.titleAttributes),toString:()=>((e,t,n,r)=>{const i=on(n),s=tn(t);return i?"<".concat(e," ").concat(zt,'="true" ').concat(i,">").concat(an(s,r),"</").concat(e,">"):"<".concat(e," ").concat(zt,'="true">').concat(an(s,r),"</").concat(e,">")})(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>ln(t),toString:()=>on(t)};default:return{toComponent:()=>cn(e,t),toString:()=>function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t.reduce((t,r)=>{const i=r,s=Object.keys(i).filter(e=>!("innerHTML"===e||"cssText"===e)).reduce((e,t)=>{const r="undefined"===typeof i[t]?t:"".concat(t,'="').concat(an(i[t],n),'"');return e?"".concat(e," ").concat(r):r},""),a=i.innerHTML||i.cssText||"",o=-1===sn.indexOf(e);return"".concat(t,"<").concat(e," ").concat(zt,'="true" ').concat(s).concat(o?"/>":">".concat(a,"</").concat(e,">"))},"")}(e,t,n)}}},dn=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:s,styleTags:a,title:o="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:u,metaTags:d,scriptTags:h}=e,p={toComponent:()=>{},toString:()=>""};return c&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:h}=(e=>{let{metaTags:t,linkTags:n,scriptTags:r,encode:i}=e;const s=nn(t,Dt),a=nn(n,Lt),o=nn(r,Rt);return{priorityMethods:{toComponent:()=>[...cn("meta",s.priority),...cn("link",a.priority),...cn("script",o.priority)],toString:()=>"".concat(un("meta",s.priority,i)," ").concat(un("link",a.priority,i)," ").concat(un("script",o.priority,i))},metaTags:s.default,linkTags:a.default,scriptTags:o.default}})(e)),{priority:p,base:un("base",t,r),bodyAttributes:un("bodyAttributes",n,r),htmlAttributes:un("htmlAttributes",i,r),link:un("link",u,r),meta:un("meta",d,r),noscript:un("noscript",s,r),script:un("script",h,r),style:un("style",a,r),title:un("title",{title:o,titleAttributes:l},r)}},hn=[],pn=!("undefined"===typeof window||!window.document||!window.document.createElement),fn=class{constructor(e,t){(0,jt.A)(this,"instances",[]),(0,jt.A)(this,"canUseDOM",pn),(0,jt.A)(this,"context",void 0),(0,jt.A)(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?hn:this.instances,add:e=>{(this.canUseDOM?hn:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?hn:this.instances).indexOf(e);(this.canUseDOM?hn:this.instances).splice(t,1)}}}),this.context=e,this.canUseDOM=t||!1,t||(e.helmet=dn({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},mn=r.createContext({}),gn=(Pt=class e extends r.Component{constructor(t){super(t),(0,jt.A)(this,"helmetData",void 0),this.helmetData=new fn(this.props.context||{},e.canUseDOM)}render(){return r.createElement(mn.Provider,{value:this.helmetData.value},this.props.children)}},(0,jt.A)(Pt,"canUseDOM",pn),Pt),yn=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll("".concat(e,"[").concat(zt,"]")),i=[].slice.call(r),s=[];let a;return t&&t.length&&t.forEach(t=>{const n=document.createElement(e);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{const r=e,i="undefined"===typeof t[r]?"":t[r];n.setAttribute(e,i)}n.setAttribute(zt,"true"),i.some((e,t)=>(a=t,n.isEqualNode(e)))?i.splice(a,1):s.push(n)}
2),i.forEach(e=>{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)}),s.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:s}},xn=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(zt),i=r?r.split(","):[],s=[...i],a=Object.keys(t);for(const o of a){const e=t[o]||"";n.getAttribute(o)!==e&&n.setAttribute(o,e),-1===i.indexOf(o)&&i.push(o);const r=s.indexOf(o);-1!==r&&s.splice(r,1)}for(let o=s.length-1;o>=0;o-=1)n.removeAttribute(s[o]);i.length===s.length?n.removeAttribute(zt):n.getAttribute(zt)!==a.join(",")&&n.setAttribute(zt,a.join(","))},vn=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:s,metaTags:a,noscriptTags:o,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:h}=e;xn("body",r),xn("html",i),((e,t)=>{"undefined"!==typeof e&&document.title!==e&&(document.title=tn(e)),xn("title",t)})(d,h);const p={baseTag:yn("base",n),linkTags:yn("link",s),metaTags:yn("meta",a),noscriptTags:yn("noscript",o),scriptTags:yn("script",c),styleTags:yn("style",u)},f={},m={};Object.keys(p).forEach(e=>{const{newTags:t,oldTags:n}=p[e];t.length&&(f[e]=t),n.length&&(m[e]=p[e].oldTags)}),t&&t(),l(e,f,m)},bn=null,wn=e=>{bn&&cancelAnimationFrame(bn),e.defer?bn=requestAnimationFrame(()=>{vn(e,()=>{bn=null})}):(vn(e),bn=null)},_n=class extends r.Component{constructor(){super(...arguments),(0,jt.A)(this,"rendered",!1)}shouldComponentUpdate(e){return!Ct()(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const r=(i=e.get().map(e=>{const t=(0,o.A)({},e.props);return delete t.context,t}),{baseTag:Qt(["href"],i),bodyAttributes:Zt("bodyAttributes",i),defer:Yt(i,Wt),encode:Yt(i,Ht),htmlAttributes:Zt("htmlAttributes",i),linkTags:Xt("link",["rel","href"],i),metaTags:Xt("meta",["name","charset","http-equiv","property","itemprop"],i),noscriptTags:Xt("noscript",["innerHTML"],i),onChangeClientState:Jt(i),scriptTags:Xt("script",["src","innerHTML"],i),styleTags:Xt("style",["cssText"],i),title:Gt(i),titleAttributes:Zt("titleAttributes",i),prioritizeSeoTags:en(i,$t)});var i;gn.canUseDOM?wn(r):dn&&(n=dn(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},jn=(Ot=class extends r.Component{shouldComponentUpdate(e){return!Nt()(rn(this.props,"helmetData"),rn(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error("<".concat(e.type," /> elements are self-closing and can not contain children. Refer to our API for more information."))}}flattenArrayTypeChildren(e,t,n,r){return(0,o.A)((0,o.A)({},t),{},{[e.type]:[...t[e.type]||[],(0,o.A)((0,o.A)({},n),this.mapNestedChildrenToProps(e,r))]})}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return(0,o.A)((0,o.A)({},t),{},{[e.type]:r,titleAttributes:(0,o.A)({},n)});case"body":return(0,o.A)((0,o.A)({},t),{},{bodyAttributes:(0,o.A)({},n)});case"html":return(0,o.A)((0,o.A)({},t),{},{htmlAttributes:(0,o.A)({},n)});default:return(0,o.A)((0,o.A)({},t),{},{[e.type]:(0,o.A)({},n)})}}mapArrayTypeChildrenToProps(e,t){let n=(0,o.A)({},t);return Object.keys(e).forEach(t=>{n=(0,o.A)((0,o.A)({},n),{},{[t]:e[t]})}),n}warnOnInvalidChildren(e,t){return Et()(Bt.some(t=>e.type===t),"function"===typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types ".concat(Bt.join(", ")," are allowed. Helmet does not support rendering <").concat(e.type,"> elements. Refer to our API for more information.")),Et()(!t||"string"===typeof t||Array.isArray(t)&&!t.some(e=>"string"!==typeof e),"Helmet expects a string as a child of <".concat(e.type,">. Did you forget to wrap your children in braces? ( <").concat(e.type,">{``}</").concat(e.type,"> ) Refer to our API for more information.")),!0}mapChildrenToProps(e,t){let n={};
2return r.Children.forEach(e,e=>{if(!e||!e.props)return;const r=e.props,{children:i}=r,s=(0,a.A)(r,Mt),o=Object.keys(s).reduce((e,t)=>(e[Ut[t]||t]=s[t],e),{});let{type:l}=e;switch("symbol"===typeof l?l=l.toString():this.warnOnInvalidChildren(e,i),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(e,n,o,i);break;default:t=this.mapObjectTypeChildren(e,t,o,i)}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const e=this.props,{children:t}=e,n=(0,a.A)(e,Tt);let i=(0,o.A)({},n),{helmetData:s}=n;if(t&&(i=this.mapChildrenToProps(t,i)),s&&!(s instanceof fn)){s=new fn(s.context,!0),delete i.helmetData}return s?r.createElement(_n,(0,o.A)((0,o.A)({},i),{},{context:s.value})):r.createElement(mn.Consumer,null,e=>r.createElement(_n,(0,o.A)((0,o.A)({},i),{},{context:e})))}},(0,jt.A)(Ot,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Ot),kn=n(2799);const Nn=(0,r.createContext)({});const Sn=e=>{let{children:t,endpoint:n,config:i={commitment:"confirmed"}}=e;const s=(0,r.useMemo)(()=>new kn.Ng(n,i),[n,i]);return r.createElement(Nn.Provider,{value:{connection:s}},t)};const En=n(8355);class An extends Error{constructor(e,t){super(e),this.error=t}}class Cn extends An{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class Mn extends An{constructor(){super(...arguments),this.name="WalletLoadError"}}class Tn extends An{constructor(){super(...arguments),this.name="WalletConfigError"}}class Pn extends An{constructor(){super(...arguments),this.name="WalletConnectionError"}}class On extends An{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class In extends An{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class Ln extends An{constructor(){super(...arguments),this.name="WalletAccountError"}}class Rn extends An{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class Dn extends An{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class Bn extends An{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class Fn extends An{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class Un extends An{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class zn extends An{constructor(){super(...arguments),this.name="WalletSignInError"}}var qn;!function(e){e.Installed="Installed",e.NotDetected="NotDetected",e.Loadable="Loadable",e.Unsupported="Unsupported"}(qn||(qn={}));class Wn extends En{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.publicKey;if(!r)throw new Dn;return e.feePayer=e.feePayer||r,e.recentBlockhash=e.recentBlockhash||(await t.getLatestBlockhash({commitment:n.preflightCommitment,minContextSlot:n.minContextSlot})).blockhash,e}}function Hn(e){if("undefined"===typeof window||"undefined"===typeof document)return;const t=[];function n(){if(e())for(const e of t)e()}const r=setInterval(n,1e3);t.push(()=>clearInterval(r)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",n,{once:!0}),t.push(()=>document.removeEventListener("DOMContentLoaded",n))),"complete"!==document.readyState&&(window.addEventListener("load",n,{once:!0}),t.push(()=>window.removeEventListener("load",n))),n()}function Kn(){if(!navigator)return!1;const e=navigator.userAgent.toLowerCase(),t=e.includes("iphone")||e.includes("ipad"),n=e.includes("safari");return t&&n}function Vn(e){return"version"in e}const $n=["signers"];class Yn extends Wn{async sendTransaction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!0;try{if(Vn(e)){if(!this.supportedTransactionVersions)throw new Bn("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(e.version))throw new Bn("Sending transaction version ".concat(e.version," isn't supported by this wallet"));try{const r=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(r,n)}catch(i){if(i instanceof Fn)throw r=!1,i;throw new Bn(null===i||void 0===i?void 0:i.message,i)}}else try{const{signers:r}=n,i=(0,a.A)(n,$n);e=await this.prepareTransaction(e,t,i),(null===r||void 0===r?void 0:r.length)&&e.partialSign(...r);const s=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(s,i)}catch(i){if(i instanceof Fn)throw r=!1,i;throw new Bn(null===i||void 0===i?void 0:i.message,i)}}
2catch(i){throw r&&this.emit("error",i),i}}async signAllTransactions(e){for(const n of e)if(Vn(n)){if(!this.supportedTransactionVersions)throw new Fn("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(n.version))throw new Fn("Signing transaction version ".concat(n.version," isn't supported by this wallet"))}const t=[];for(const n of e)t.push(await this.signTransaction(n));return t}}class Gn extends Yn{}class Jn extends Gn{}const Zn="solana:signIn";var Qn=n(991),Xn=n(5007),er=n(8780);n(8970);const tr="".concat("(?:\\nURI: (?<uri>[^\\n]+))?").concat("(?:\\nVersion: (?<version>[^\\n]+))?").concat("(?:\\nChain ID: (?<chainId>[^\\n]+))?").concat("(?:\\nNonce: (?<nonce>[^\\n]+))?").concat("(?:\\nIssued At: (?<issuedAt>[^\\n]+))?").concat("(?:\\nExpiration Time: (?<expirationTime>[^\\n]+))?").concat("(?:\\nNot Before: (?<notBefore>[^\\n]+))?").concat("(?:\\nRequest ID: (?<requestId>[^\\n]+))?").concat("(?:\\nResources:(?<resources>(?:\\n- [^\\n]+)*))?");new RegExp("^".concat("(?<domain>[^\\n]+?) wants you to sign in with your Solana account:\\n").concat("(?<address>[^\\n]+)(?:\\n|$)").concat("(?:\\n(?<statement>[\\S\\s]*?)(?:\\n|$))??").concat(tr,"\\n*$"));function nr(e){let t="".concat(e.domain," wants you to sign in with your Solana account:\n");t+="".concat(e.address),e.statement&&(t+="\n\n".concat(e.statement));const n=[];if(e.uri&&n.push("URI: ".concat(e.uri)),e.version&&n.push("Version: ".concat(e.version)),e.chainId&&n.push("Chain ID: ".concat(e.chainId)),e.nonce&&n.push("Nonce: ".concat(e.nonce)),e.issuedAt&&n.push("Issued At: ".concat(e.issuedAt)),e.expirationTime&&n.push("Expiration Time: ".concat(e.expirationTime)),e.notBefore&&n.push("Not Before: ".concat(e.notBefore)),e.requestId&&n.push("Request ID: ".concat(e.requestId)),e.resources){n.push("Resources:");for(const t of e.resources)n.push("- ".concat(t))}return n.length&&(t+="\n\n".concat(n.join("\n"))),t}function rr(e){return Object.freeze((0,o.A)((0,o.A)({},e),{},{decode:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.read(t,n)[0]}}))}var ir=e=>rr({read(t,n){const r=0===n?t:t.slice(n);if(0===r.length)return["",0];let i=r.findIndex(e=>0!==e);i=-1===i?r.length:i;const s=e[0].repeat(i);if(i===r.length)return[s,t.length];const a=function(e,t){const n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}(r.slice(i).reduce((e,t)=>256n*e+BigInt(t),0n),e);return[s+a,t.length]}});var sr="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";globalThis.TextDecoder,globalThis.TextEncoder;const ar="ERROR_ASSOCIATION_PORT_OUT_OF_RANGE",or="ERROR_FORBIDDEN_WALLET_BASE_URL",lr="ERROR_SECURE_CONTEXT_REQUIRED",cr="ERROR_SESSION_CLOSED",ur="ERROR_SESSION_TIMEOUT",dr="ERROR_WALLET_NOT_FOUND",hr="ERROR_INVALID_PROTOCOL_VERSION";class pr extends Error{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,i,s]=t;super(i),this.code=r,this.data=s,this.name="SolanaMobileWalletAdapterError"}}class fr extends Error{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,i,s,a]=t;super(s),this.code=i,this.data=a,this.jsonRpcMessageId=r,this.name="SolanaMobileWalletAdapterProtocolError"}}function mr(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(d$){s(d$)}}function o(e){try{l(r.throw(e))}catch(d$){s(d$)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(a,o)}l((r=r.apply(e,t||[])).next())})}function gr(e,t){const n=window.btoa(String.fromCharCode.call(null,...e));return t?n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):n}function yr(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}function xr(e,t){return mr(this,void 0,void 0,function*(){const n=yield crypto.subtle.exportKey("raw",e),r=yield crypto.subtle.sign({hash:"SHA-256",name:"ECDSA"},t,n),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(new Uint8Array(n),0),i.set(new Uint8Array(r),n.byteLength),i})}function vr(e){return(t=function(e){return nr(e)}(e),window.btoa(t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");var t}const br="solana:signTransactions",wr="solana:cloneAuthorization";function _r(e){return ir(sr).decode(e)}function jr(e){return _r(yr(e))}function kr(e,t){return new Proxy({},{get:(n,r)=>"then"===r?null:(null==n[r]&&(n[r]=function(n){return mr(this,void 0,void 0,function*(){const{method:i,params:s}=function(e,t,n){let r=t,i=e.toString().replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).toLowerCase();switch(e){case"authorize":{let{chain:e}=r;
2if("legacy"===n){switch(e){case"solana:testnet":e="testnet";break;case"solana:devnet":e="devnet";break;case"solana:mainnet":e="mainnet-beta";break;default:e=r.cluster}r.cluster=e}else{switch(e){case"testnet":case"devnet":e="solana:".concat(e);break;case"mainnet-beta":e="solana:mainnet"}r.chain=e}}case"reauthorize":{const{auth_token:e,identity:t}=r;if(e)if("legacy"===n)i="reauthorize",r={auth_token:e,identity:t};else i="authorize";break}}return{method:i,params:r}}(r,n,e),a=yield t(i,s);return"authorize"===i&&s.sign_in_payload&&!a.sign_in_result&&(a.sign_in_result=yield function(e,t,n){var r;return mr(this,void 0,void 0,function*(){const i=null!==(r=e.domain)&&void 0!==r?r:window.location.host,s=t.accounts[0].address,a=vr(Object.assign(Object.assign({},e),{domain:i,address:jr(s)})),o=yr((yield n("sign_messages",{addresses:[s],payloads:[a]})).signed_payloads[0]),l=gr(o.slice(0,o.length-64)),c=gr(o.slice(o.length-64));return{address:s,signed_message:0==l.length?a:l,signature:c}})}(s.sign_in_payload,a,t)),function(e,t,n){if("getCapabilities"===e){const e=t;switch(n){case"legacy":{const t=[br];return!0===e.supports_clone_authorization&&t.push(wr),Object.assign(Object.assign({},e),{features:t})}case"v1":return Object.assign(Object.assign({},e),{supports_sign_and_send_transactions:!0,supports_clone_authorization:e.features.includes(wr)})}}return t}(r,a,e)})}),n[r]),defineProperty:()=>!1,deleteProperty:()=>!1})}function Nr(e,t,n){return mr(this,void 0,void 0,function*(){const r=function(e){if(e>=4294967296)throw new Error("Outbound sequence number overflow. The maximum sequence number is 32-bytes.");const t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),new Uint8Array(t)}(t),i=new Uint8Array(12);crypto.getRandomValues(i);const s=yield crypto.subtle.encrypt(Er(r,i),n,(new TextEncoder).encode(e)),a=new Uint8Array(r.byteLength+i.byteLength+s.byteLength);return a.set(new Uint8Array(r),0),a.set(new Uint8Array(i),r.byteLength),a.set(new Uint8Array(s),r.byteLength+i.byteLength),a})}function Sr(e,t){return mr(this,void 0,void 0,function*(){const n=e.slice(0,4),r=e.slice(4,16),i=e.slice(16),s=yield crypto.subtle.decrypt(Er(n,r),t,i);return function(){void 0===Ar&&(Ar=new TextDecoder("utf-8"));return Ar}().decode(s)})}function Er(e,t){return{additionalData:e,iv:t,name:"AES-GCM",tagLength:128}}let Ar;function Cr(){return mr(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])})}function Mr(){return mr(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey","deriveBits"])})}function Tr(e){let t="";const n=new Uint8Array(e),r=n.byteLength;for(let i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}function Pr(e){if(e<49152||e>65535)throw new pr(ar,"Association port number must be between 49152 and 65535. ".concat(e," given."),{port:e});return e}function Or(e){return e.replace(/[/+=]/g,e=>({"/":"_","+":"-","=":"."}[e]))}function Ir(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Lr(e,t){let n=null;if(t){try{n=new URL(t)}catch(Im){}if("https:"!==(null===n||void 0===n?void 0:n.protocol))throw new pr(or,"Base URLs supplied by wallets must be valid `https` URLs")}n||(n=new URL("".concat("solana-wallet",":/")));const r=e.startsWith("/")?e:[...Ir(n.pathname),...Ir(e)].join("/");return new URL(r,n)}function Rr(e,t){return mr(this,void 0,void 0,function*(){return Nr(JSON.stringify(e),e.id,t)})}function Dr(e,t){return mr(this,void 0,void 0,function*(){const n=yield Sr(e,t),r=JSON.parse(n);if(Object.hasOwnProperty.call(r,"error"))throw new fr(r.id,r.error.code,r.error.message);return r})}function Br(e,t,n){return mr(this,void 0,void 0,function*(){const[r,i]=yield Promise.all([crypto.subtle.exportKey("raw",t),crypto.subtle.importKey("raw",e.slice(0,65),{name:"ECDH",namedCurve:"P-256"},!1,[])]),s=yield crypto.subtle.deriveBits({name:"ECDH",public:i},n,256),a=yield crypto.subtle.importKey("raw",s,"HKDF",!1,["deriveKey"]);return yield crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(r),info:new Uint8Array},a,{name:"AES-GCM",length:128},!1,["encrypt","decrypt"])})}function Fr(e,t){return mr(this,void 0,void 0,function*(){const n=yield Sr(e,t),r=JSON.parse(n);let i="legacy";if(Object.hasOwnProperty.call(r,"v"))switch(r.v){case 1:case"1":case"v1":i="v1";break;case"legacy":i="legacy";break;default:throw new pr(hr,"Unknown/unsupported protocol version: ".concat(r.v))}return{protocol_version:i}})}const Ur=0,zr=1;let qr=null;function Wr(e){return mr(this,void 0,void 0,function*(){if("https:"===e.protocol)window.location.assign(e);else try{const t=-1!==navigator.userAgent.indexOf("Firefox/")?Ur:zr;switch(t){case Ur:!function(e){null==qr&&(qr=document.createElement("iframe"),qr.style.display="none",document.body.appendChild(qr)),qr.contentWindow.location.href=e.toString()}(e);break;case zr:{const t=new Promise((e,t)=>
2{function n(){clearTimeout(i),window.removeEventListener("blur",r)}function r(){n(),e()}window.addEventListener("blur",r);const i=setTimeout(()=>{n(),t()},3e3)});window.location.assign(e),yield t;break}}}catch(d$){throw new pr(dr,"Found no installed wallet that supports the mobile wallet protocol.")}})}function Hr(e,t){return mr(this,void 0,void 0,function*(){const n=Pr(49152+Math.floor(16384*Math.random())),r=yield function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["v1"];return mr(this,void 0,void 0,function*(){const i=Pr(t),s=Tr(yield crypto.subtle.exportKey("raw",e)),a=Lr("v1/associate/local",n);return a.searchParams.set("association",Or(s)),a.searchParams.set("port","".concat(i)),r.forEach(e=>{a.searchParams.set("v",e)}),a})}(e,n,t);return yield Wr(r),n})}const Kr={retryDelayScheduleMs:[150,150,200,500,500,750,750,1e3],timeoutMs:3e4},Vr="com.solana.mobilewalletadapter.v1";function $r(){if("undefined"===typeof window||!0!==window.isSecureContext)throw new pr(lr,"The mobile wallet adapter protocol must be used in a secure context (`https`).")}function Yr(e){let t;try{t=new URL(e)}catch(Im){throw new pr(or,"Invalid base URL supplied by wallet")}if("https:"!==t.protocol)throw new pr(or,"Base URLs supplied by wallets must be valid `https` URLs")}function Gr(e){return new DataView(e).getUint32(0,!1)}const Jr="standard:connect",Zr="standard:disconnect",Qr="standard:events";var Xr=n(4114);const ei="solana:mainnet",ti="solana:devnet",ni="solana:testnet",ri="solana:localnet";function ii(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(d$){s(d$)}}function o(e){try{l(r.throw(e))}catch(d$){s(d$)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(a,o)}l((r=r.apply(e,t||[])).next())})}function si(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 ai(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}var oi,li,ci,ui,di,hi,pi,fi;class mi{constructor(){var e=this;oi.add(this),li.set(this,null),ci.set(this,{}),ui.set(this,!1),this.dom=null,this.open=()=>{console.debug("Modal open"),si(this,oi,"m",hi).call(this),si(this,li,"f")&&(si(this,li,"f").style.display="flex")},this.close=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;var n;console.debug("Modal close"),si(e,oi,"m",pi).call(e),si(e,li,"f")&&(si(e,li,"f").style.display="none"),null===(n=si(e,ci,"f").close)||void 0===n||n.forEach(e=>e(t))},fi.set(this,e=>{"Escape"===e.key&&this.close(e)}),this.init=this.init.bind(this),ai(this,li,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f")}init(){return ii(this,void 0,void 0,function*(){console.log("Injecting modal"),si(this,oi,"m",di).call(this)})}addEventListener(e,t){var n;return(null===(n=si(this,ci,"f")[e])||void 0===n?void 0:n.push(t))||(si(this,ci,"f")[e]=[t]),()=>this.removeEventListener(e,t)}removeEventListener(e,t){var n;si(this,ci,"f")[e]=null===(n=si(this,ci,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)}}li=new WeakMap,ci=new WeakMap,ui=new WeakMap,fi=new WeakMap,oi=new WeakSet,di=function(){if(document.getElementById("mobile-wallet-adapter-embedded-root-ui"))return void(si(this,li,"f")||ai(this,li,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f"));ai(this,li,document.createElement("div"),"f"),si(this,li,"f").id="mobile-wallet-adapter-embedded-root-ui",si(this,li,"f").innerHTML='\n<div class="mobile-wallet-adapter-embedded-modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title">\n <div data-modal-close style="position: absolute; width: 100%; height: 100%;"></div>\n\t<div class="mobile-wallet-adapter-embedded-modal-card">\n\t\t<div>\n\t\t\t<button data-modal-close class="mobile-wallet-adapter-embedded-modal-close">\n\t\t\t\t<svg width="14" height="14">\n\t\t\t\t\t<path d="M 6.7125,8.3036995 1.9082,13.108199 c -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 C 0.1056,12.896899 0,12.631699 0,12.312499 c 0,-0.3192 0.1056,-0.5844 0.3167,-0.7958 L 5.1212,6.7124995 0.3167,1.9082 C 0.1056,1.6969 0,1.4317 0,1.1125 0,0.7933 0.1056,0.5281 0.3167,0.3167 0.5281,0.1056 0.7933,0 1.1125,0 1.4317,0 1.6969,0.1056 1.9082,0.3167 L 6.7125,5.1212 11.5167,0.3167 C 11.7281,0.1056 11.9933,0 12.3125,0 c 0.3192,0 0.5844,0.1056 0.7957,0.3167 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 L 8.3037001,6.7124995 13.1082,11.516699 c 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 z" />\n\t\t\t\t</svg>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class="mobile-wallet-adapter-embedded-modal-content"></div>\n\t</div>\n</div>\n',si(this,li,"f").style.display="none";const e=si(this,li,"f").querySelector(".mobile-wallet-adapter-embedded-modal-content");e&&(e.innerHTML=this.contentHtml);const t=document.createElement("style");t.id="mobile-wallet-adapter-embedded-modal-styles",t.textContent='\n.mobile-wallet-adapter-embedded-modal-container {\n display: flex; /* Use flexbox to center content */\n justify-content: center; /* Center horizontally */\n align-items: center; /* Center vertically */\n position: fixed;
2 /* Stay in place */\n z-index: 1; /* Sit on top */\n left: 0;\n top: 0;\n width: 100%; /* Full width */\n height: 100%; /* Full height */\n background-color: rgba(0,0,0,0.4); /* Black w/ opacity */\n overflow-y: auto; /* enable scrolling */\n}\n\n.mobile-wallet-adapter-embedded-modal-card {\n display: flex;\n flex-direction: column;\n margin: auto 20px;\n max-width: 780px;\n padding: 20px;\n border-radius: 24px;\n background: #ffffff;\n font-family: "Inter Tight", "PT Sans", Calibri, sans-serif;\n transform: translateY(-200%);\n animation: slide-in 0.5s forwards;\n}\n\n@keyframes slide-in {\n 100% { transform: translateY(0%); }\n}\n\n.mobile-wallet-adapter-embedded-modal-close {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n background: #e4e9e9;\n border: none;\n border-radius: 50%;\n}\n\n.mobile-wallet-adapter-embedded-modal-close:focus-visible {\n outline-color: red;\n}\n\n.mobile-wallet-adapter-embedded-modal-close svg {\n fill: #546266;\n transition: fill 200ms ease 0s;\n}\n\n.mobile-wallet-adapter-embedded-modal-close:hover svg {\n fill: #fff;\n}\n'+this.contentStyles;const n=document.createElement("div");n.innerHTML='\n<link rel="preconnect" href="https://fonts.googleapis.com">\n<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">\n',this.dom=n.attachShadow({mode:"closed"}),this.dom.appendChild(t),this.dom.appendChild(si(this,li,"f")),document.body.appendChild(n)},hi=function(){if(!si(this,li,"f")||si(this,ui,"f"))return;[...si(this,li,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null===e||void 0===e?void 0:e.addEventListener("click",this.close)),window.addEventListener("load",this.close),document.addEventListener("keydown",si(this,fi,"f")),ai(this,ui,!0,"f")},pi=function(){if(!si(this,ui,"f"))return;if(window.removeEventListener("load",this.close),document.removeEventListener("keydown",si(this,fi,"f")),!si(this,li,"f"))return;[...si(this,li,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null===e||void 0===e?void 0:e.removeEventListener("click",this.close)),ai(this,ui,!1,"f")};const gi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDIuNUgxN0MxNy44Mjg0IDIuNSAxOC41IDMuMTcxNTcgMTguNSA0VjIwQzE4LjUgMjAuODI4NCAxNy44Mjg0IDIxLjUgMTcgMjEuNUg3QzYuMTcxNTcgMjEuNSA1LjUgMjAuODI4NCA1LjUgMjBWNEM1LjUgMy4xNzE1NyA2LjE3MTU3IDIuNSA3IDIuNVpNMyA0QzMgMS43OTA4NiA0Ljc5MDg2IDAgNyAwSDE3QzE5LjIwOTEgMCAyMSAxLjc5MDg2IDIxIDRWMjBDMjEgMjIuMjA5MSAxOS4yMDkxIDI0IDE3IDI0SDdDNC43OTA4NiAyNCAzIDIyLjIwOTEgMyAyMFY0Wk0xMSA0LjYxNTM4QzEwLjQ0NzcgNC42MTUzOCAxMCA1LjA2MzEgMTAgNS42MTUzOFY2LjM4NDYyQzEwIDYuOTM2OSAxMC40NDc3IDcuMzg0NjIgMTEgNy4zODQ2MkgxM0MxMy41NTIzIDcuMzg0NjIgMTQgNi45MzY5IDE0IDYuMzg0NjJWNS42MTUzOEMxNCA1LjA2MzEgMTMuNTUyMyA0LjYxNTM4IDEzIDQuNjE1MzhIMTFaIiBmaWxsPSIjRENCOEZGIi8+Cjwvc3ZnPgo=";function yi(e){return window.btoa(String.fromCharCode.call(null,...e))}function xi(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}var vi,bi,wi,_i,ji,ki,Ni,Si,Ei,Ai,Ci,Mi,Ti,Pi,Oi,Ii,Li,Ri,Di,Bi,Fi,Ui,zi,qi,Wi,Hi,Ki,Vi,$i,Yi,Gi,Ji,Zi,Qi,Xi;const es="Mobile Wallet Adapter",ts=[Xn.R,er.q,Qn.F,Zn];class ns{constructor(e){var t=this;vi.add(this),bi.set(this,{}),wi.set(this,"1.0.0"),_i.set(this,es),ji.set(this,"https://solanamobile.com/wallets"),ki.set(this,gi),Ni.set(this,void 0),Si.set(this,void 0),Ei.set(this,void 0),Ai.set(this,!1),Ci.set(this,0),Mi.set(this,[]),Ti.set(this,void 0),Pi.set(this,void 0),Oi.set(this,void 0),Ii.set(this,(e,t)=>{var n;return(null===(n=si(this,bi,"f")[e])||void 0===n?void 0:n.push(t))||(si(this,bi,"f")[e]=[t]),()=>si(this,vi,"m",Ri).call(this,e,t)}),Di.set(this,function(){let{silent:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ii(t,void 0,void 0,function*(){if(si(this,Ai,"f")||this.connected)return{accounts:this.accounts};ai(this,Ai,!0,"f");try{if(e){const e=yield si(this,Ei,"f").get();if(!e)return{accounts:this.accounts};yield si(this,Ui,"f").call(this,e.capabilities),yield si(this,Fi,"f").call(this,e)}else yield si(this,Bi,"f").call(this)}catch(d$){throw new Error(d$ instanceof Error&&d$.message||"Unknown error")}finally{ai(this,Ai,!1,"f")}return{accounts:this.accounts}})}),Bi.set(this,e=>ii(this,void 0,void 0,function*(){try{const t=yield si(this,Ei,"f").get();if(t)return si(this,Fi,"f").call(this,t),t;const n=yield si(this,Ti,"f").select(si(this,Mi,"f"));return yield si(this,Wi,"f").call(this,t=>ii(this,void 0,void 0,function*(){const[r,i]=yield Promise.all([t.getCapabilities(),t.authorize({chain:n,identity:si(this,Ni,"f"),sign_in_payload:e})]),s=si(this,Ki,"f").call(this,i.accounts),a=Object.assign(Object.assign({},i),{accounts:s,chain:n,capabilities:r});return Promise.all([si(this,Ui,"f").call(this,r),si(this,Ei,"f").set(a),si(this,Fi,"f").call(this,a)]),a}))}catch(d$){throw new Error(d$ instanceof Error&&d$.message||"Unknown error")}})),Fi.set(this,e=>ii(this,void 0,void 0,function*(){var t;const n=null==si(this,Si,"f")||(null===(t=si(this,Si,"f"))||void 0===t?void 0:t.accounts.length)!==e.accounts.length||si(this,Si,"f").accounts.some((t,n)=>t.address!==e.accounts[n].address);ai(this,Si,e,"f"),n&&si(this,vi,"m",Li).call(this,"change",{accounts:this.accounts})})),Ui.set(this,e=>ii(this,void 0,void 0,function*(){const t=e.features.includes("solana:signTransactions"),n=e.supports_sign_and_send_transactions,r=Xn.R in this.features!==n||er.q in this.features!==t;ai(this,Pi,Object.assign(Object.assign({},(n||!n&&!t)&&{[Xn.R]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:si(this,Yi,"f")}}),t&&{[er.q]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:si(this,Gi,"f")}}),"f"),r&&si(this,vi,"m",Li).call(this,"change",{features:this.features})})),zi.set(this,(e,t,n)=>ii(this,void 0,void 0,function*(){var r,i;try{const[s,a]=yield Promise.all([null!==(i=null===(r=si(this,Si,"f"))||void 0===r?void 0:r.capabilities)&&void 0!==i?i:yield e.getCapabilities(),e.authorize({auth_token:t,identity:si(this,Ni,"f"),chain:n})]),o=si(this,Ki,"f").call(this,a.accounts),l=Object.assign(Object.assign({},a),{accounts:o,chain:n,capabilities:s});Promise.all([si(this,Ei,"f").set(l),si(this,Fi,"f").call(this,l)])}catch(d$){throw si(this,qi,"f").call(this),new Error(d$ instanceof Error&&d$.message||"Unknown error")}})),qi.set(this,()=>ii(this,void 0,void 0,function*(){var e;si(this,Ei,"f").clear(),ai(this,Ai,!1,"f"),ai(this,Ci,(e=si(this,Ci,"f"),++e),"f"),ai(this,Si,void 0,"f"),si(this,vi,"m",Li).call(this,"change",{accounts:this.accounts})})),Wi.set(this,e=>ii(this,void 0,void 0,function*(){var t;const n=null===(t=si(this,Si,"f"))||void 0===t?void 0:t.wallet_uri_base,r=n?{baseUri:n}:void 0,i=si(this,Ci,"f");try{return yield function(e,t){return mr(this,void 0,void 0,function*(){$r();const n=yield Cr(),r=yield Hr(n.publicKey,null===t||void 0===t?void 0:t.baseUri),i="ws://localhost:".concat(r,"/solana-wallet");let s;const a=(()=>{const e=[...Kr.retryDelayScheduleMs];return()=>e.length>1?e.shift():e[0]})();let o=1,l=0,c={__type:"disconnected"};return new Promise((t,r)=>{let u;const d={},h=()=>mr(this,void 0,void 0,function*(){if("connecting"!==c.__type)return void console.warn("Expected adapter state to be `connecting` at the moment the websocket opens. "+"Got `".concat(c.__type,"`."));u.removeEventListener("open",h);const{associationKeypair:e}=c,t=yield Mr();u.send(yield xr(t.publicKey,e.privateKey)),c={__type:"hello_req_sent",associationPublicKey:e.publicKey,ecdhPrivateKey:t.privateKey}}),p=e=>{e.wasClean?c={__type:"disconnected"}:r(new pr(cr,"The wallet session dropped unexpectedly (".concat(e.code,": ").concat(e.reason,")."),{closeEvent:e})),g()},f=e=>mr(this,void 0,void 0,function*(){g(),Date.now()-s>
2=Kr.timeoutMs?r(new pr(ur,"Failed to connect to the wallet websocket at ".concat(i,"."))):(yield new Promise(e=>{const t=a();y=window.setTimeout(e,t)}),x())}),m=i=>mr(this,void 0,void 0,function*(){const s=yield i.data.arrayBuffer();switch(c.__type){case"connecting":if(0!==s.byteLength)throw new Error("Encountered unexpected message while connecting");const i=yield Mr();u.send(yield xr(i.publicKey,n.privateKey)),c={__type:"hello_req_sent",associationPublicKey:n.publicKey,ecdhPrivateKey:i.privateKey};break;case"connected":try{const e=Gr(s.slice(0,4));if(e!==l+1)throw new Error("Encrypted message has invalid sequence number");l=e;const t=yield Dr(s,c.sharedSecret),n=d[t.id];delete d[t.id],n.resolve(t.result)}catch(d$){if(!(d$ instanceof fr))throw d$;{const t=d[d$.jsonRpcMessageId];delete d[d$.jsonRpcMessageId],t.reject(d$)}}break;case"hello_req_sent":{if(0===s.byteLength){const e=yield Mr();u.send(yield xr(e.publicKey,n.privateKey)),c={__type:"hello_req_sent",associationPublicKey:n.publicKey,ecdhPrivateKey:e.privateKey};break}const i=yield Br(s,c.associationPublicKey,c.ecdhPrivateKey),a=s.slice(65),h=0!==a.byteLength?yield(()=>mr(this,void 0,void 0,function*(){const e=Gr(a.slice(0,4));if(e!==l+1)throw new Error("Encrypted message has invalid sequence number");return l=e,Fr(a,i)}))():{protocol_version:"legacy"};c={__type:"connected",sharedSecret:i,sessionProperties:h};const p=kr(h.protocol_version,(e,t)=>mr(this,void 0,void 0,function*(){const n=o++;return u.send(yield Rr({id:n,jsonrpc:"2.0",method:e,params:null!==t&&void 0!==t?t:{}},i)),new Promise((t,r)=>{d[n]={resolve(n){switch(e){case"authorize":case"reauthorize":{const{wallet_uri_base:e}=n;if(null!=e)try{Yr(e)}catch(d$){return void r(d$)}break}}t(n)},reject:r}})}));try{t(yield e(p))}catch(d$){r(d$)}finally{g(),u.close()}break}}});let g,y;const x=()=>{g&&g(),c={__type:"connecting",associationKeypair:n},void 0===s&&(s=Date.now()),u=new WebSocket(i,[Vr]),u.addEventListener("open",h),u.addEventListener("close",p),u.addEventListener("error",f),u.addEventListener("message",m),g=()=>{window.clearTimeout(y),u.removeEventListener("open",h),u.removeEventListener("close",p),u.removeEventListener("error",f),u.removeEventListener("message",m)}};x()})})}(e,r)}catch(d$){throw si(this,Ci,"f")!==i&&(yield new Promise(()=>{})),d$ instanceof Error&&"SolanaMobileWalletAdapterError"===d$.name&&"ERROR_WALLET_NOT_FOUND"===d$.code&&(yield si(this,Oi,"f").call(this,this)),d$}})),Hi.set(this,()=>{if(!si(this,Si,"f"))throw new Error("Wallet not connected");return{authToken:si(this,Si,"f").auth_token,chain:si(this,Si,"f").chain}}),Ki.set(this,e=>e.map(e=>{var t,n;const r=xi(e.address);return{address:Xr.encode(r),publicKey:r,label:e.label,icon:e.icon,chains:null!==(t=e.chains)&&void 0!==t?t:si(this,Mi,"f"),features:null!==(n=e.features)&&void 0!==n?n:ts}})),Vi.set(this,e=>ii(this,void 0,void 0,function*(){const{authToken:t,chain:n}=si(this,Hi,"f").call(this);try{const r=e.map(e=>yi(e));return yield si(this,Wi,"f").call(this,e=>ii(this,void 0,void 0,function*(){yield si(this,zi,"f").call(this,e,t,n);return(yield e.signTransactions({payloads:r})).signed_payloads.map(xi)}))}catch(d$){throw new Error(d$ instanceof Error&&d$.message||"Unknown error")}})),$i.set(this,(e,t)=>ii(this,void 0,void 0,function*(){const{authToken:n,chain:r}=si(this,Hi,"f").call(this);try{return yield si(this,Wi,"f").call(this,i=>ii(this,void 0,void 0,function*(){const[s,a]=yield Promise.all([i.getCapabilities(),si(this,zi,"f").call(this,i,n,r)]);if(s.supports_sign_and_send_transactions){const n=yi(e);return(yield i.signAndSendTransactions(Object.assign(Object.assign({},t),{payloads:[n]}))).signatures.map(xi)[0]}throw new Error("connected wallet does not support signAndSendTransaction")}))}catch(d$){throw new Error(d$ instanceof Error&&d$.message||"Unknown error")}})),Yi.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ii(t,void 0,void 0,function*(){const e=[];for(const t of n){const n=yield si(this,$i,"f").call(this,t.transaction,t.options);e.push({signature:n})}return e})}),Gi.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ii(t,void 0,void 0,function*(){return(yield si(this,Vi,"f").call(this,n.map(e=>{let{transaction:t}=e;return t}))).map(e=>({signedTransaction:e}))})}),Ji.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ii(t,void 0,void 0,function*(){const{authToken:e,chain:t}=si(this,Hi,"f").call(this),r=n.map(e=>{let{account:t}=e;return yi(t.publicKey)}),i=n.map(e=>{let{message:t}=e;return yi(t)});try{return yield si(this,Wi,"f").call(this,n=>ii(this,void 0,void 0,function*(){yield si(this,zi,"f").call(this,n,e,t);return(yield n.signMessages({addresses:r,payloads:i})).signed_payloads.map(xi).map(e=>({signedMessage:e,signature:e.slice(-64)}))}
2))}catch(d$){throw new Error(d$ instanceof Error&&d$.message||"Unknown error")}})}),Zi.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ii(t,void 0,void 0,function*(){const e=[];if(!(n.length>1))return[yield si(this,Qi,"f").call(this,n[0])];for(const t of n)e.push(yield si(this,Qi,"f").call(this,t));return e})}),Qi.set(this,e=>ii(this,void 0,void 0,function*(){var t,n,r;ai(this,Ai,!0,"f");try{const i=yield si(this,Bi,"f").call(this,Object.assign(Object.assign({},e),{domain:null!==(t=null===e||void 0===e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(!i.sign_in_result)throw new Error("Sign in failed, no sign in result returned by wallet");const s=i.sign_in_result.address,a=i.accounts.find(e=>e.address==s);return{account:Object.assign(Object.assign({},null!==a&&void 0!==a?a:{address:Xr.encode(xi(s))}),{publicKey:xi(s),chains:null!==(n=null===a||void 0===a?void 0:a.chains)&&void 0!==n?n:si(this,Mi,"f"),features:null!==(r=null===a||void 0===a?void 0:a.features)&&void 0!==r?r:i.capabilities.features}),signedMessage:xi(i.sign_in_result.signed_message),signature:xi(i.sign_in_result.signature)}}catch(d$){throw new Error(d$ instanceof Error&&d$.message||"Unknown error")}finally{ai(this,Ai,!1,"f")}})),ai(this,Ei,e.authorizationCache,"f"),ai(this,Ni,e.appIdentity,"f"),ai(this,Mi,e.chains,"f"),ai(this,Ti,e.chainSelector,"f"),ai(this,Oi,e.onWalletNotFound,"f"),ai(this,Pi,{[Xn.R]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:si(this,Yi,"f")},[er.q]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:si(this,Gi,"f")}},"f")}get version(){return si(this,wi,"f")}get name(){return si(this,_i,"f")}get url(){return si(this,ji,"f")}get icon(){return si(this,ki,"f")}get chains(){return si(this,Mi,"f")}get features(){return Object.assign({[Jr]:{version:"1.0.0",connect:si(this,Di,"f")},[Zr]:{version:"1.0.0",disconnect:si(this,qi,"f")},[Qr]:{version:"1.0.0",on:si(this,Ii,"f")},[Qn.F]:{version:"1.0.0",signMessage:si(this,Ji,"f")},[Zn]:{version:"1.0.0",signIn:si(this,Zi,"f")}},si(this,Pi,"f"))}get accounts(){var e,t;return null!==(t=null===(e=si(this,Si,"f"))||void 0===e?void 0:e.accounts)&&void 0!==t?t:[]}get connected(){return!!si(this,Si,"f")}get isAuthorized(){return!!si(this,Si,"f")}get currentAuthorization(){return si(this,Si,"f")}get cachedAuthorizationResult(){return si(this,Ei,"f").get()}}bi=new WeakMap,wi=new WeakMap,_i=new WeakMap,ji=new WeakMap,ki=new WeakMap,Ni=new WeakMap,Si=new WeakMap,Ei=new WeakMap,Ai=new WeakMap,Ci=new WeakMap,Mi=new WeakMap,Ti=new WeakMap,Pi=new WeakMap,Oi=new WeakMap,Ii=new WeakMap,Di=new WeakMap,Bi=new WeakMap,Fi=new WeakMap,Ui=new WeakMap,zi=new WeakMap,qi=new WeakMap,Wi=new WeakMap,Hi=new WeakMap,Ki=new WeakMap,Vi=new WeakMap,$i=new WeakMap,Yi=new WeakMap,Gi=new WeakMap,Ji=new WeakMap,Zi=new WeakMap,Qi=new WeakMap,vi=new WeakSet,Li=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;null===(i=si(this,bi,"f")[e])||void 0===i||i.forEach(e=>e.apply(null,n))},Ri=function(e,t){var n;si(this,bi,"f")[e]=null===(n=si(this,bi,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)};Xi=new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakSet;Event;new WeakMap;class rs extends mi{constructor(){super(...arguments),this.contentStyles=ss,this.contentHtml=is}initWithError(e){super.init(),this.populateError(e)}populateError(e){var t,n;const r=null===(t=this.dom)||void 0===t?void 0:t.getElementById("mobile-wallet-adapter-error-message"),i=null===(n=this.dom)||void 0===n?void 0:n.getElementById("mobile-wallet-adapter-error-action");if(r){if("SolanaMobileWalletAdapterError"===e.name)switch(e.code){case"ERROR_WALLET_NOT_FOUND":return r.innerHTML="To use mobile wallet adapter, you must have a compatible mobile wallet application installed on your device.",void(i&&i.addEventListener("click",()=>{window.location.href="https://solanamobile.com/wallets"}));case"ERROR_BROWSER_NOT_SUPPORTED":return r.innerHTML="This browser appears to be incompatible with mobile wallet adapter. Open this page in a compatible mobile browser app and try again.",void(i&&(i.style.display="none"))}r.innerHTML="An unexpected error occurred: ".concat(e.message)}else console.log("Failed to locate error dialog element")}}const is='\n<svg class="mobile-wallet-adapter-embedded-modal-error-icon" xmlns="http://www.w3.org/2000/svg" height="50px" viewBox="0 -960 960 960" width="50px" fill="#000000"><path d="M 280,-80 Q 197,-80 138.5,-138.5 80,-197 80,-280 80,-363 138.5,-421.5 197,-480 280,-480 q 83,0 141.5,58.5 58.5,58.5 58.5,141.5 0,83 -58.5,141.5 Q 363,-80 280,-80 Z M 824,-120 568,-376 Q 556,-389 542.5,-402.5 529,-416 516,-428 q 38,-24 61,-64 23,-40 23,-88 0,-75 -52.5,-127.5 Q 495,-760 420,-760 345,-760 292.5,-707.5 240,-655 240,-580 q 0,6 0.5,11.5 0.5,5.5 1.5,11.5 -18,2 -39.5,8 -21.5,6 -38.5,14 -2,-11 -3,-22 -1,-11 -1,-23 0,-109 75.5,-184.5 Q 311,-840 420,-840 q 109,0 184.5,75.5 75.5,75.5 75.5,184.5 0,43 -13.5,81.5 Q 653,-460 629,-428 l 251,252 z m -615,-61 71,-71 70,71 29,-28 -71,-71 71,-71 -28,-28 -71,71 -71,-71 -28,28 71,71 -71,71 z"/></svg>\n<div class="mobile-wallet-adapter-embedded-modal-title">We can\'t find a wallet.</div>\n<div id="mobile-wallet-adapter-error-message" class="mobile-wallet-adapter-embedded-modal-subtitle"></div>\n<div>\n <button data-error-action id="mobile-wallet-adapter-error-action" class="mobile-wallet-adapter-embedded-modal-error-action">\n Find a wallet\n </button>\n</div>\n',ss="\n.mobile-wallet-adapter-embedded-modal-content {\n text-align: center;\n}\n\n.mobile-wallet-adapter-embedded-modal-error-icon {\n margin-top: 24px;\n}\n\n.mobile-wallet-adapter-embedded-modal-title {\n margin: 18px 100px auto 100px;\n color: #000000;
2\n font-size: 2.75em;\n font-weight: 600;\n}\n\n.mobile-wallet-adapter-embedded-modal-subtitle {\n margin: 30px 60px 40px 60px;\n color: #000000;\n font-size: 1.25em;\n font-weight: 400;\n}\n\n.mobile-wallet-adapter-embedded-modal-error-action {\n display: block;\n width: 100%;\n height: 56px;\n /*margin-top: 40px;*/\n font-size: 1.25em;\n /*line-height: 24px;*/\n /*letter-spacing: -1%;*/\n background: #000000;\n color: #FFFFFF;\n border-radius: 18px;\n}\n\n/* Smaller screens */\n@media all and (max-width: 600px) {\n .mobile-wallet-adapter-embedded-modal-title {\n font-size: 1.5em;\n margin-right: 12px;\n margin-left: 12px;\n }\n .mobile-wallet-adapter-embedded-modal-subtitle {\n margin-right: 12px;\n margin-left: 12px;\n }\n}\n";function as(){return ii(this,void 0,void 0,function*(){if("undefined"!==typeof window){const e=window.navigator.userAgent.toLowerCase(),t=new rs;e.includes("wv")?t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_BROWSER_NOT_SUPPORTED",message:""}):t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_WALLET_NOT_FOUND",message:""}),t.open()}})}const os="SolanaMobileWalletAdapterDefaultAuthorizationCache";function ls(){return{select(e){return ii(this,void 0,void 0,function*(){return 1===e.length?e[0]:e.includes(ei)?ei:e[0]})}}}function cs(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(d$){s(d$)}}function o(e){try{l(r.throw(e))}catch(d$){s(d$)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(a,o)}l((r=r.apply(e,t||[])).next())})}function us(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 ds(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}const hs="standard:connect";function ps(e){return window.btoa(String.fromCharCode.call(null,...e))}var fs,ms,gs,ys,xs,vs,bs,ws,_s,js,ks,Ns,Ss;const Es=es;function As(e){switch(e){case"mainnet-beta":return"solana:mainnet";case"testnet":return"solana:testnet";case"devnet":return"solana:devnet";default:return e}}class Cs extends Jn{constructor(e,t){super(),fs.add(this),this.supportedTransactionVersions=new Set(["legacy",0]),ms.set(this,void 0),gs.set(this,!1),ys.set(this,"undefined"!==typeof window&&window.isSecureContext&&"undefined"!==typeof document&&/android/i.test(navigator.userAgent)?qn.Loadable:qn.Unsupported),xs.set(this,void 0),vs.set(this,void 0),bs.set(this,void 0),ws.set(this,e=>cs(this,void 0,void 0,function*(){if(e.accounts&&e.accounts.length>0){us(this,fs,"m",js).call(this);const t=yield us(this,xs,"f").call(this,e.accounts);t!==us(this,vs,"f")&&(ds(this,vs,t,"f"),ds(this,bs,void 0,"f"),this.emit("connect",this.publicKey))}})),ds(this,xs,e=>cs(this,void 0,void 0,function*(){var n;const r=yield t.addressSelector.select(e.map(e=>{let{publicKey:t}=e;return ps(t)}));return null!==(n=e.find(e=>{let{publicKey:t}=e;return ps(t)===r}))&&void 0!==n?n:e[0]}),"f"),ds(this,ms,e,"f"),us(this,ms,"f").features["standard:events"].on("change",us(this,ws,"f")),this.name=us(this,ms,"f").name,this.icon=us(this,ms,"f").icon,this.url=us(this,ms,"f").url}get publicKey(){var e;if(!us(this,bs,"f")&&us(this,vs,"f"))try{ds(this,bs,new kn.J3(us(this,vs,"f").publicKey),"f")}catch(d$){throw new Rn(d$ instanceof Error&&(null===d$||void 0===d$?void 0:d$.message)||"Unknown error",d$)}return null!==(e=us(this,bs,"f"))&&void 0!==e?e:null}get connected(){return us(this,ms,"f").connected}get connecting(){return us(this,gs,"f")}get readyState(){return us(this,ys,"f")}autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(){return cs(this,void 0,void 0,function*(){return yield this.autoConnect()})}autoConnect(){return cs(this,void 0,void 0,function*(){us(this,fs,"m",_s).call(this,!0)})}connect(){return cs(this,void 0,void 0,function*(){us(this,fs,"m",_s).call(this)})}performAuthorization(e){return cs(this,void 0,void 0,function*(){try{const t=yield us(this,ms,"f").cachedAuthorizationResult;if(t)return yield us(this,ms,"f").features[hs].connect({silent:!0}),t;e?yield us(this,ms,"f").features[Zn].signIn(e):yield us(this,ms,"f").features[hs].connect();return yield yield us(this,ms,"f").cachedAuthorizationResult}catch(d$){throw new Pn(d$ instanceof Error&&d$.message||"Unknown error",d$)}})}disconnect(){return cs(this,void 0,void 0,function*(){return yield us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){ds(this,gs,!1,"f"),ds(this,bs,void 0,"f"),ds(this,vs,void 0,"f"),yield us(this,ms,"f").features["standard:disconnect"].disconnect(),this.emit
2("disconnect")}))})}signIn(e){return cs(this,void 0,void 0,function*(){return us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){var t;if(us(this,ys,"f")!==qn.Installed&&us(this,ys,"f")!==qn.Loadable)throw new Cn;ds(this,gs,!0,"f");try{const n=yield us(this,ms,"f").features[Zn].signIn(Object.assign(Object.assign({},e),{domain:null!==(t=null===e||void 0===e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(n.length>0)return n[0];throw new Error("Sign in failed, no sign in result returned by wallet")}catch(d$){throw new Pn(d$ instanceof Error&&d$.message||"Unknown error",d$)}finally{ds(this,gs,!1,"f")}}))})}signMessage(e){return cs(this,void 0,void 0,function*(){return yield us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){const t=us(this,fs,"m",ks).call(this);try{return(yield us(this,ms,"f").features[Qn.F].signMessage({account:t,message:e}))[0].signature}catch(n){throw new Un(null===n||void 0===n?void 0:n.message,n)}}))})}sendTransaction(e,t,n){return cs(this,void 0,void 0,function*(){return yield us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){const r=us(this,fs,"m",ks).call(this);try{function s(){let e,r;switch(t.commitment){case"confirmed":case"finalized":case"processed":e=t.commitment;break;default:e="finalized"}switch(null===n||void 0===n?void 0:n.preflightCommitment){case"confirmed":case"finalized":case"processed":r=n.preflightCommitment;break;case void 0:r=e;break;default:r="finalized"}return("finalized"===r?2:"confirmed"===r?1:0)<("finalized"===e?2:"confirmed"===e?1:0)?r:e}if(Xn.R in us(this,ms,"f").features){const a=As(us(this,ms,"f").currentAuthorization.chain),[o]=(yield us(this,ms,"f").features[Xn.R].signAndSendTransaction({account:r,transaction:e.serialize(),chain:a,options:n?{skipPreflight:n.skipPreflight,maxRetries:n.maxRetries}:void 0})).map(e=>ps(e.signature));return o}{const[l]=yield us(this,fs,"m",Ns).call(this,[e]);if(function(e){return"version"in e}(l))return yield t.sendTransaction(l);{const c=l.serialize();return yield t.sendRawTransaction(c,Object.assign(Object.assign({},n),{preflightCommitment:s()}))}}}catch(i){throw new Bn(null===i||void 0===i?void 0:i.message,i)}}))})}signTransaction(e){return cs(this,void 0,void 0,function*(){return yield us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){const[t]=yield us(this,fs,"m",Ns).call(this,[e]);return t}))})}signAllTransactions(e){return cs(this,void 0,void 0,function*(){return yield us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){return yield us(this,fs,"m",Ns).call(this,e)}))})}}ms=new WeakMap,gs=new WeakMap,ys=new WeakMap,xs=new WeakMap,vs=new WeakMap,bs=new WeakMap,ws=new WeakMap,fs=new WeakSet,_s=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return cs(this,void 0,void 0,function*(){if(!this.connecting&&!this.connected)return yield us(this,fs,"m",Ss).call(this,()=>cs(this,void 0,void 0,function*(){if(us(this,ys,"f")!==qn.Installed&&us(this,ys,"f")!==qn.Loadable)throw new Cn;ds(this,gs,!0,"f");try{yield us(this,ms,"f").features[hs].connect({silent:e})}catch(d$){throw new Pn(d$ instanceof Error&&d$.message||"Unknown error",d$)}finally{ds(this,gs,!1,"f")}}))})},js=function(){us(this,ys,"f")!==qn.Installed&&this.emit("readyStateChange",ds(this,ys,qn.Installed,"f"))},ks=function(){if(!us(this,ms,"f").isAuthorized||!us(this,vs,"f"))throw new Dn;return us(this,vs,"f")},Ns=function(e){return cs(this,void 0,void 0,function*(){const t=us(this,fs,"m",ks).call(this);try{if(er.q in us(this,ms,"f").features)return us(this,ms,"f").features[er.q].signTransaction(...e.map(e=>({account:t,transaction:e.serialize()}))).then(e=>e.map(e=>{const t=e.signedTransaction,n=64*t[0]+1;return"legacy"===kn.B2.deserializeMessageVersion(t.slice(n,t.length))?kn.ZX.from(t):kn.Kt.deserialize(t)}));throw new Error("Connected wallet does not support signing transactions")}catch(n){throw new Fn(null===n||void 0===n?void 0:n.message,n)}})},Ss=function(e){return cs(this,void 0,void 0,function*(){try{return yield e()}catch(d$){throw this.emit("error",d$),d$}})};class Ms extends Cs{constructor(e){var t;const n=As(null!==(t=e.chain)&&void 0!==t?t:e.cluster);super(new ns({appIdentity:e.appIdentity,authorizationCache:{set:e.authorizationResultCache.set,get:()=>cs(this,void 0,void 0,function*(){return yield e.authorizationResultCache.get()}),clear:e.authorizationResultCache.clear},chains:[n],chainSelector:ls(),onWalletNotFound:()=>cs(this,void 0,void 0,function*(){e.onWalletNotFound(this)})}),{addressSelector:e.addressSelector,chain:n})}}class Ts extends Ms{}function Ps(){return function(){let e;try{e=window.localStorage}catch(Im){}return{clear(){return ii(this,void 0,void 0,function*(){if(e)try{e.removeItem(os)}catch(Im){}})},get(){return ii(this,void 0,void 0,function*(){if(e)try{const t=JSON.parse(e.getItem(os));if(t&&t.accounts){const e=t.accounts.map(e=>Object.assign(Object.assign({},e),{publicKey:"publicKey"in e?new Uint8Array(Object.values(e.publicKey)):Xr.decode(e.address)}));return Object.assign(Object.assign({},t),{accounts:e})}return t||void 0}catch(Im){}})},set(t){return ii(this,void 0,void 0,function*(){if(e)try{e.setItem(os,JSON.stringify(t))}catch(Im){}})}}}()}function Os(e){return cs(this,void 0,void 0,function*(){return as()})}const Is=function(e){return Jr in e.features&&Qr in e.features&&(Xn.R in e.features||er.q in e.features)},Ls="https://api.mainnet-beta.solana.com";function Rs(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}function Ds(e,t){if(e===t)return!0;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap;var Bs=n(1666);const Fs=["signers"];var Us,zs,qs,Ws,Hs,Ks,Vs,$s,Ys,Gs,Js,Zs,Qs,Xs,ea,ta,na,ra,ia=function(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)},sa=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};class aa extends Wn{get name(){return ia(this,$s,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return ia(this,$s,"f").icon}get readyState(){return ia(this,Ys,"f")}get publicKey(){return ia(this,qs,"f")}get connecting(){return ia(this,Ws,"f")}get supportedTransactionVersions(){return ia(this,Vs,"f")}get wallet(){return ia(this,$s,"f")}get standard(){return!0}constructor(e){let{wallet:t}=e;super(),Us.add(this),zs.set(this,void 0),qs.set(this,void 0),Ws.set(this,void 0),Hs.set(this,void 0),Ks.set(this,void 0),Vs.set(this,void 0),$s.set(this,void 0),Ys.set(this,"undefined"===typeof window||"undefined"===typeof document?qn.Unsupported:qn.Installed),Xs.set(this,e=>{if("accounts"in e){const e=ia(this,$s,"f").accounts[0];ia(this,zs,"f")&&!ia(this,Hs,"f")&&e!==ia(this,zs,"f")&&(e?ia(this,Us,"m",Js).call(this,e):(this.emit
2("error",new On),ia(this,Us,"m",Zs).call(this)))}"features"in e&&ia(this,Us,"m",Qs).call(this)}),sa(this,$s,t,"f"),sa(this,zs,null,"f"),sa(this,qs,null,"f"),sa(this,Ws,!1,"f"),sa(this,Hs,!1,"f"),sa(this,Ks,ia(this,$s,"f").features[Qr].on("change",ia(this,Xs,"f")),"f"),ia(this,Us,"m",Qs).call(this)}destroy(){sa(this,zs,null,"f"),sa(this,qs,null,"f"),sa(this,Ws,!1,"f"),sa(this,Hs,!1,"f");const e=ia(this,Ks,"f");e&&(sa(this,Ks,null,"f"),e())}async autoConnect(){return ia(this,Us,"m",Gs).call(this,{silent:!0})}async connect(){return ia(this,Us,"m",Gs).call(this)}async disconnect(){if(Zr in ia(this,$s,"f").features)try{sa(this,Hs,!0,"f"),await ia(this,$s,"f").features[Zr].disconnect()}catch(e){this.emit("error",new In(null===e||void 0===e?void 0:e.message,e))}finally{sa(this,Hs,!1,"f")}ia(this,Us,"m",Zs).call(this)}async sendTransaction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const s=ia(this,zs,"f");if(!s)throw new Dn;let l;if(Xn.R in ia(this,$s,"f").features)if(s.features.includes(Xn.R))l=Xn.R;else{if(!(er.q in ia(this,$s,"f").features)||!s.features.includes(er.q))throw new Ln;l=er.q}else{if(!(er.q in ia(this,$s,"f").features))throw new Tn;if(!s.features.includes(er.q))throw new Ln;l=er.q}const c=(r=t.rpcEndpoint).includes(Ls)?ei:/\bdevnet\b/i.test(r)?ti:/\btestnet\b/i.test(r)?ni:/\blocalhost\b/i.test(r)||/\b127\.0\.0\.1\b/.test(r)?ri:ei;if(!s.chains.includes(c))throw new Bn;try{const{signers:r}=n,i=(0,a.A)(n,Fs);let u;if(Vn(e)?((null===r||void 0===r?void 0:r.length)&&e.sign(r),u=e.serialize()):(e=await this.prepareTransaction(e,t,i),(null===r||void 0===r?void 0:r.length)&&e.partialSign(...r),u=new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))),l===Xn.R){const[e]=await ia(this,$s,"f").features[Xn.R].signAndSendTransaction({account:s,chain:c,transaction:u,options:{preflightCommitment:Rs(i.preflightCommitment||t.commitment),skipPreflight:i.skipPreflight,maxRetries:i.maxRetries,minContextSlot:i.minContextSlot}});return Bs.A.encode(e.signature)}{const[e]=await ia(this,$s,"f").features[er.q].signTransaction({account:s,chain:c,transaction:u,options:{preflightCommitment:Rs(i.preflightCommitment||t.commitment),minContextSlot:i.minContextSlot}});return await t.sendRawTransaction(e.signedTransaction,(0,o.A)((0,o.A)({},i),{},{preflightCommitment:Rs(i.preflightCommitment||t.commitment)}))}}catch(i){if(i instanceof An)throw i;throw new Bn(null===i||void 0===i?void 0:i.message,i)}}catch(i){throw this.emit("error",i),i}var r}}zs=new WeakMap,qs=new WeakMap,Ws=new WeakMap,Hs=new WeakMap,Ks=new WeakMap,Vs=new WeakMap,$s=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Us=new WeakSet,Gs=async function(e){try{if(this.connected||this.connecting)return;if(ia(this,Ys,"f")!==qn.Installed)throw new Cn;if(sa(this,Ws,!0,"f"),!ia(this,$s,"f").accounts.length)try{await ia(this,$s,"f").features[Jr].connect(e)}catch(t){throw new Pn(null===t||void 0===t?void 0:t.message,t)}const n=ia(this,$s,"f").accounts[0];if(!n)throw new Ln;ia(this,Us,"m",Js).call(this,n)}catch(t){throw this.emit("error",t),t}finally{sa(this,Ws,!1,"f")}},Js=function(e){let t;try{t=new kn.J3(e.address)}catch(n){throw new Rn(null===n||void 0===n?void 0:n.message,n)}sa(this,zs,e,"f"),sa(this,qs,t,"f"),ia(this,Us,"m",Qs).call(this),this.emit("connect",t)},Zs=function(){sa(this,zs,null,"f"),sa(this,qs,null,"f"),ia(this,Us,"m",Qs).call(this),this.emit("disconnect")},Qs=function(){var e,t;const n=Xn.R in ia(this,$s,"f").features?ia(this,$s,"f").features[Xn.R].supportedTransactionVersions:ia(this,$s,"f").features[er.q].supportedTransactionVersions;sa(this,Vs,Ds(n,["legacy"])?null:new Set(n),"f"),er.q in ia(this,$s,"f").features&&null!==(e=ia(this,zs,"f"))&&void 0!==e&&e.features.includes(er.q)?(this.signTransaction=ia(this,Us,"m",ea),this.signAllTransactions=ia(this,Us,"m",ta)):(delete this.signTransaction,delete this.signAllTransactions),Qn.F in ia(this,$s,"f").features&&null!==(t=ia(this,zs,"f"))&&void 0!==t&&t.features.includes(Qn.F)?this.signMessage=ia(this,Us,"m",na):delete this.signMessage,Zn in ia(this,$s,"f").features?this.signIn=ia(this,Us,"m",ra):delete this.signIn},ea=async function(e){try{const n=ia(this,zs,"f");if(!n)throw new Dn;if(!(er.q in ia(this,$s,"f").features))throw new Tn;if(!n.features.includes(er.q))throw new Ln;try{const t=(await ia(this,$s,"f").features[er.q].signTransaction({account:n,transaction:Vn(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))}
2))[0].signedTransaction;return Vn(e)?kn.Kt.deserialize(t):kn.ZX.from(t)}catch(t){if(t instanceof An)throw t;throw new Fn(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}},ta=async function(e){try{const n=ia(this,zs,"f");if(!n)throw new Dn;if(!(er.q in ia(this,$s,"f").features))throw new Tn;if(!n.features.includes(er.q))throw new Ln;try{const t=await ia(this,$s,"f").features[er.q].signTransaction(...e.map(e=>({account:n,transaction:Vn(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return e.map((e,n)=>{const r=t[n].signedTransaction;return Vn(e)?kn.Kt.deserialize(r):kn.ZX.from(r)})}catch(t){throw new Fn(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}},na=async function(e){try{const n=ia(this,zs,"f");if(!n)throw new Dn;if(!(Qn.F in ia(this,$s,"f").features))throw new Tn;if(!n.features.includes(Qn.F))throw new Ln;try{return(await ia(this,$s,"f").features[Qn.F].signMessage({account:n,message:e}))[0].signature}catch(t){throw new Un(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}},ra=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(!(Zn in ia(this,$s,"f").features))throw new Tn;let n;try{[n]=await ia(this,$s,"f").features[Zn].signIn(e)}catch(t){throw new zn(null===t||void 0===t?void 0:t.message,t)}if(!n)throw new zn;return ia(this,Us,"m",Js).call(this,n.account),n}catch(t){throw this.emit("error",t),t}};var oa,la=function(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)},ca=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};let ua;const da=new Set;const ha={};function pa(){if(ua)return ua;if(ua=Object.freeze({register:fa,get:ga,on:ya}),"undefined"===typeof window)return ua;const e=Object.freeze({register:fa});try{window.addEventListener("wallet-standard:register-wallet",t=>{let{detail:n}=t;return n(e)})}catch(t){console.error("wallet-standard:register-wallet event listener could not be added\n",t)}try{window.dispatchEvent(new va(e))}catch(t){console.error("wallet-standard:app-ready event could not be dispatched\n",t)}return ua}function fa(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(n=n.filter(e=>!da.has(e))).length?(n.forEach(e=>function(e){ma=void 0,da.add(e)}(e)),null===(e=ha.register)||void 0===e||e.forEach(e=>xa(()=>e(...n))),function(){var e;n.forEach(e=>function(e){ma=void 0,da.delete(e)}(e)),null===(e=ha.unregister)||void 0===e||e.forEach(e=>xa(()=>e(...n)))}):()=>{}}let ma;function ga(){return ma||(ma=[...da]),ma}function ya(e,t){var n;return(null===(n=ha[e])||void 0===n?void 0:n.push(t))||(ha[e]=[t]),function(){var n;ha[e]=null===(n=ha[e])||void 0===n?void 0:n.filter(e=>t!==e)}}function xa(e){try{e()}catch(t){console.error(t)}}
2class va extends Event{get detail(){return la(this,oa,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),oa.set(this,void 0),ca(this,oa,e,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}function ba(e){const t=wa(()=>new Set),{get:n,on:i}=wa(()=>function(){if(ua)return ua;if(ua=pa(),"undefined"===typeof window)return ua;const e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),ua;const{register:t}=ua,n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(e=>xa(()=>e({register:t})))};try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch(r){return console.error("window.navigator.wallets could not be set"),ua}return n(...e),ua}()),[s,a]=(0,r.useState)(()=>_a(n()));(0,r.useEffect)(()=>{const e=[i("register",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(e=>[...e,..._a(t)])}),i("unregister",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(e=>e.filter(e=>t.some(t=>t===e.wallet)))})];return()=>e.forEach(e=>e())},[i]);const o=function(e){const t=(0,r.useRef)(void 0);return(0,r.useEffect)(()=>{t.current=e}),t.current}(s);return(0,r.useEffect)(()=>{if(!o)return;const e=new Set(s);new Set(o.filter(t=>!e.has(t))).forEach(e=>e.destroy())},[o,s]),(0,r.useEffect)(()=>()=>s.forEach(e=>e.destroy()),[]),(0,r.useMemo)(()=>[...s,...e.filter(e=>{let{name:n}=e;return!s.some(e=>e.name===n)||(t.has(n)||(t.add(n),console.warn("".concat(n," was registered as a Standard Wallet. The Wallet Adapter for ").concat(n," can be removed from your app."))),!1)})],[s,e,t])}function wa(e){const t=(0,r.useRef)(void 0);return void 0===t.current&&(t.current={value:e()}),t.current.value}function _a(e){return e.filter(Is).map(e=>new aa({wallet:e}))}var ja;oa=new WeakMap,function(e){e[e.DESKTOP_WEB=0]="DESKTOP_WEB",e[e.MOBILE_WEB=1]="MOBILE_WEB"}(ja||(ja={}));class ka extends An{constructor(){super(...arguments),this.name="WalletNotSelectedError"}}const Na=[],Sa={autoConnect:!1,connecting:!1,connected:!1,disconnecting:!1,select(){Ea("call","select")},connect:()=>Promise.reject(Ea("call","connect")),disconnect:()=>Promise.reject(Ea("call","disconnect")),sendTransaction:()=>Promise.reject(Ea("call","sendTransaction")),signTransaction:()=>Promise.reject(Ea("call","signTransaction")),signAllTransactions:()=>Promise.reject(Ea("call","signAllTransactions")),signMessage:()=>Promise.reject(Ea("call","signMessage")),signIn:()=>Promise.reject(Ea("call","signIn"))};function Ea(e,t){const n=new Error("You have tried to ".concat(e,' "').concat(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(Sa,"wallets",{get:()=>(Ea("read","wallets"),Na)}),Object.defineProperty(Sa,"wallet",{get:()=>(Ea("read","wallet"),null)}),Object.defineProperty(Sa,"publicKey",{get:()=>(Ea("read","publicKey"),null)});const Aa=(0,r.createContext)(Sa);function Ca(){return(0,r.useContext)(Aa)}function Ma(e){let{children:t,wallets:n,adapter:i,isUnloadingRef:s,onAutoConnectRequest:a,onConnectError:o,onError:l,onSelectWallet:c}=e;const u=(0,r.useRef)(!1),[d,h]=(0,r.useState)(!1),p=(0,r.useRef)(!1),[f,m]=(0,r.useState)(!1),[g,y]=(0,r.useState)(()=>{var e;return null!==(e=null===i||void 0===i?void 0:i.publicKey)&&void 0!==e?e:null}),[x,v]=(0,r.useState)(()=>{var e;return null!==(e=null===i||void 0===i?void 0:i.connected)&&void 0!==e&&e}),b=(0,r.useRef)(l);(0,r.useEffect)(()=>(b.current=l,()=>{b.current=void 0}),[l]);const w=(0,r.useRef)((e,t)=>(s.current||(b.current?b.current(e,t):(console.error(e,t),e instanceof Cn&&"undefined"!==typeof window&&t&&window.open(t.url,"_blank"))),e)),[_,j]=(0,r.useState)(()=>n.map(e=>({adapter:e,readyState:e.readyState})).filter(e=>{let{readyState:t}=e;return t!==qn.Unsupported}));(0,r.useEffect)(()=>{function e(e){j(t=>{const n=t.findIndex(e=>{let{adapter:t}=e;return t===this});if(-1===n)return t;const{adapter:r}=t[n];return[...t.slice(0,n),{adapter:r,readyState:e},...t.slice(n+1)].filter(e=>{let{readyState:t}=e;return t!==qn.Unsupported})})}return j(e=>n.map((t,n)=>{const r=e[n];return r&&r.adapter===t&&r.readyState===t.readyState?r:{adapter:t,readyState:t.readyState}}).filter(e=>{let{readyState:t}=e;return t!==qn.Unsupported}
2)),n.forEach(t=>t.on("readyStateChange",e,t)),()=>{n.forEach(t=>t.off("readyStateChange",e,t))}},[i,n]);const k=(0,r.useMemo)(()=>{var e;return null!==(e=_.find(e=>e.adapter===i))&&void 0!==e?e:null},[i,_]);(0,r.useEffect)(()=>{if(!i)return;const e=e=>{y(e),u.current=!1,h(!1),v(!0),p.current=!1,m(!1)},t=()=>{s.current||(y(null),u.current=!1,h(!1),v(!1),p.current=!1,m(!1))},n=e=>{w.current(e,i)};return i.on("connect",e),i.on("disconnect",t),i.on("error",n),()=>{i.off("connect",e),i.off("disconnect",t),i.off("error",n),t()}},[i,s]);const N=(0,r.useRef)(!1);(0,r.useEffect)(()=>()=>{N.current=!1},[i]),(0,r.useEffect)(()=>{N.current||u.current||x||!a||(null===k||void 0===k?void 0:k.readyState)!==qn.Installed&&(null===k||void 0===k?void 0:k.readyState)!==qn.Loadable||(u.current=!0,h(!0),N.current=!0,async function(){try{await a()}catch(e){o()}finally{h(!1),u.current=!1}}())},[x,a,o,k]);const S=(0,r.useCallback)(async(e,t,n)=>{if(!i)throw w.current(new ka);if(!x)throw w.current(new Dn,i);return await i.sendTransaction(e,t,n)},[i,x]),E=(0,r.useMemo)(()=>i&&"signTransaction"in i?async e=>{if(!x)throw w.current(new Dn,i);return await i.signTransaction(e)}:void 0,[i,x]),A=(0,r.useMemo)(()=>i&&"signAllTransactions"in i?async e=>{if(!x)throw w.current(new Dn,i);return await i.signAllTransactions(e)}:void 0,[i,x]),C=(0,r.useMemo)(()=>i&&"signMessage"in i?async e=>{if(!x)throw w.current(new Dn,i);return await i.signMessage(e)}:void 0,[i,x]),M=(0,r.useMemo)(()=>i&&"signIn"in i?async e=>await i.signIn(e):void 0,[i]),T=(0,r.useCallback)(async()=>{if(u.current||p.current||null!==k&&void 0!==k&&k.adapter.connected)return;if(!k)throw w.current(new ka);const{adapter:e,readyState:t}=k;if(t!==qn.Installed&&t!==qn.Loadable)throw w.current(new Cn,e);u.current=!0,h(!0);try{await e.connect()}catch(d$){throw o(),d$}finally{h(!1),u.current=!1}},[o,k]),P=(0,r.useCallback)(async()=>{if(!p.current&&i){p.current=!0,m(!0);try{await i.disconnect()}finally{m(!1),p.current=!1}}},[i]);return r.createElement(Aa.Provider,{value:{autoConnect:!!a,wallets:_,wallet:k,publicKey:g,connected:x,connecting:d,disconnecting:f,select:c,connect:T,disconnect:P,sendTransaction:S,signTransaction:E,signAllTransactions:A,signMessage:C,signIn:M}},t)}let Ta;function Pa(e){return function(e){let{adapters:t,userAgentString:n}=e;return t.some(e=>e.name!==Es&&e.readyState===qn.Installed)?ja.DESKTOP_WEB:n&&/android/i.test(n)&&!function(e){return/(WebView|Version\/.+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)|; wv\).+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+))/i.test(e)}(n)?ja.MOBILE_WEB:ja.DESKTOP_WEB}({adapters:e,userAgentString:function(){var e,t;return void 0===Ta&&(Ta=null!==(e=null===(t=globalThis.navigator)||void 0===t?void 0:t.userAgent)&&void 0!==e?e:null),Ta}()})===ja.MOBILE_WEB}function Oa(){const e=globalThis.location;if(e)return"".concat(e.protocol,"//").concat(e.host)}function Ia(e){let{children:t,wallets:n,autoConnect:i,localStorageKey:s="walletName",onError:a}=e;const{connection:o}=(0,r.useContext)(Nn),l=ba(n),c=(0,r.useMemo)(()=>{if(!Pa(l))return null;const e=l.find(e=>e.name===Es);return e||new Ts({addressSelector:{select(e){return cs(this,void 0,void 0,function*(){return e[0]})}},appIdentity:{uri:Oa()},authorizationResultCache:Ps(),cluster:(t=null===o||void 0===o?void 0:o.rpcEndpoint,t?/devnet/i.test(t)?"devnet":/testnet/i.test(t)?"testnet":"mainnet-beta":"mainnet-beta"),onWalletNotFound:Os});var t},[l,null===o||void 0===o?void 0:o.rpcEndpoint]),u=(0,r.useMemo)(()=>null==c||-1!==l.indexOf(c)?l:[c,...l],[l,c]),[d,h]=function(e,t){const n=(0,r.useState)(()=>{try{const t=localStorage.getItem(e);if(t)return JSON.parse(t)}catch(n){"undefined"!==typeof window&&console.error(n)}return t}),i=n[0],s=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{if(s.current)s.current=!1;else try{null===i?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(i))}catch(t){"undefined"!==typeof window&&console.error(t)}},[i,e]),n}(s,null),p=(0,r.useMemo)(()=>{var e;return null!==(e=u.find(e=>e.name===d))&&void 0!==e?e:null},[u,d]),f=(0,r.useCallback)(e=>{d!==e&&(p&&p.name!==Es&&p.disconnect(),h(e))},[p,h,d]);(0,r.useEffect)(()=>
2{if(p)return p.on("disconnect",e),()=>{p.off("disconnect",e)};function e(){y.current||h(null)}},[p,l,h,d]);const m=(0,r.useRef)(!1),g=(0,r.useMemo)(()=>{if(i&&p)return async()=>{(!0===i||await i(p))&&(m.current?await p.connect():await p.autoConnect())}},[i,p]),y=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(d!==Es||!Pa(l))return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)};function e(){y.current=!0}y.current=!1},[l,d]);const x=(0,r.useCallback)(()=>{p&&f(null)},[p,f]),v=(0,r.useCallback)(e=>{m.current=!0,f(e)},[f]);return r.createElement(Ma,{wallets:u,adapter:p,isUnloadingRef:y,onAutoConnectRequest:g,onConnectError:x,onError:a,onSelectWallet:v},t)}const La={setVisible(e){console.error(Ra("call","setVisible"))},visible:!1};function Ra(e,t){return"You have tried to "+" ".concat(e,' "').concat(t,'"')+" on a WalletModalContext without providing one. Make sure to render a WalletModalProvider as an ancestor of the component that uses WalletModalContext"}Object.defineProperty(La,"visible",{get:()=>(console.error(Ra("read","visible")),!1)});const Da=(0,r.createContext)(La);function Ba(){return(0,r.useContext)(Da)}var Fa=n(7950);const Ua=e=>{let{id:t,children:n,expanded:i=!1}=e;const s=(0,r.useRef)(null),a=(0,r.useRef)(!0);return(0,r.useLayoutEffect)(()=>{i?(()=>{const e=s.current;e&&requestAnimationFrame(()=>{e.style.height=e.scrollHeight+"px"})})():(()=>{const e=s.current;e&&requestAnimationFrame(()=>{e.style.height=e.offsetHeight+"px",e.style.overflow="hidden",requestAnimationFrame(()=>{e.style.height="0"})})})()},[i]),(0,r.useLayoutEffect)(()=>{const e=s.current;if(e)return a.current&&(t(),a.current=!1),e.addEventListener("transitionend",n),()=>e.removeEventListener("transitionend",n);function t(){e&&(e.style.overflow=i?"initial":"hidden",i&&(e.style.height="auto"))}function n(n){e&&n.target===e&&"height"===n.propertyName&&t()}},[i]),r.createElement("div",{className:"wallet-adapter-collapse",id:t,ref:s,role:"region",style:{height:0,transition:a.current?void 0:"height 250ms ease-out"}},n)},za=e=>r.createElement("button",{className:"wallet-adapter-button ".concat(e.className||""),disabled:e.disabled,style:e.style,onClick:e.onClick,tabIndex:e.tabIndex||0,type:"button"},e.startIcon&&r.createElement("i",{className:"wallet-adapter-button-start-icon"},e.startIcon),e.children,e.endIcon&&r.createElement("i",{className:"wallet-adapter-button-end-icon"},e.endIcon)),qa=["wallet"],Wa=e=>{let{wallet:t}=e,n=(0,a.A)(e,qa);return t&&r.createElement("img",(0,o.A)({src:t.adapter.icon,alt:"".concat(t.adapter.name," icon")},n))},Ha=e=>{let{handleClick:t,tabIndex:n,wallet:i}=e;return r.createElement("li",null,r.createElement(za,{onClick:t,startIcon:r.createElement(Wa,{wallet:i}),tabIndex:n},i.adapter.name,i.readyState===qn.Installed&&r.createElement("span",null,"Detected")))},Ka=()=>r.createElement("svg",{width:"97",height:"96",viewBox:"0 0 97 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("circle",{cx:"48.5",cy:"48",r:"48",fill:"url(#paint0_linear_880_5115)",fillOpacity:"0.1"}),r.createElement("circle",{cx:"48.5",cy:"48",r:"47",stroke:"url(#paint1_linear_880_5115)",strokeOpacity:"0.4",strokeWidth:"2"}),r.createElement("g",{clipPath:"url(#clip0_880_5115)"},r.createElement("path",{d:"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z",fill:"url(#paint2_linear_880_5115)"}),r.createElement("path",{d:"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8
2077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z",fill:"url(#paint3_linear_880_5115)"})),r.createElement("defs",null,r.createElement("linearGradient",{id:"paint0_linear_880_5115",x1:"3.41664",y1:"98.0933",x2:"103.05",y2:"8.42498",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("linearGradient",{id:"paint1_linear_880_5115",x1:"3.41664",y1:"98.0933",x2:"103.05",y2:"8.42498",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("linearGradient",{id:"paint2_linear_880_5115",x1:"25.9583",y1:"68.7101",x2:"67.2337",y2:"23.7879",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("linearGradient",{id:"paint3_linear_880_5115",x1:"58.3326",y1:"49.4467",x2:"61.0002",y2:"45.4453",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("clipPath",{id:"clip0_880_5115"},r.createElement("rect",{width:"48",height:"48",fill:"white",transform:"translate(24.5 24)"}
2)))),Va=e=>{let{className:t="",container:n="body"}=e;const i=(0,r.useRef)(null),{wallets:s,select:a}=Ca(),{setVisible:o}=Ba(),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!1),[h,p]=(0,r.useState)(null),[f,m]=(0,r.useMemo)(()=>{const e=[],t=[];for(const n of s)n.readyState===qn.Installed?e.push(n):t.push(n);return e.length?[e,t]:[t,[]]},[s]),g=(0,r.useCallback)(()=>{d(!1),setTimeout(()=>o(!1),150)},[o]),y=(0,r.useCallback)(e=>{e.preventDefault(),g()},[g]),x=(0,r.useCallback)((e,t)=>{a(t),y(e)},[a,y]),v=(0,r.useCallback)(()=>c(!l),[l]),b=(0,r.useCallback)(e=>{const t=i.current;if(!t)return;const n=t.querySelectorAll("button"),r=n[0],s=n[n.length-1];e.shiftKey?document.activeElement===r&&(s.focus(),e.preventDefault()):document.activeElement===s&&(r.focus(),e.preventDefault())},[i]);return(0,r.useLayoutEffect)(()=>{const e=e=>{"Escape"===e.key?g():"Tab"===e.key&&b(e)},{overflow:t}=window.getComputedStyle(document.body);return setTimeout(()=>d(!0),0),document.body.style.overflow="hidden",window.addEventListener("keydown",e,!1),()=>{document.body.style.overflow=t,window.removeEventListener("keydown",e,!1)}},[g,b]),(0,r.useLayoutEffect)(()=>p(document.querySelector(n)),[n]),h&&(0,Fa.createPortal)(r.createElement("div",{"aria-labelledby":"wallet-adapter-modal-title","aria-modal":"true",className:"wallet-adapter-modal ".concat(u&&"wallet-adapter-modal-fade-in"," ").concat(t),ref:i,role:"dialog"},r.createElement("div",{className:"wallet-adapter-modal-container"},r.createElement("div",{className:"wallet-adapter-modal-wrapper"},r.createElement("button",{onClick:y,className:"wallet-adapter-modal-button-close"},r.createElement("svg",{width:"14",height:"14"},r.createElement("path",{d:"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z"}))),f.length?r.createElement(r.Fragment,null,r.createElement("h1",{className:"wallet-adapter-modal-title"},"Connect a wallet on Solana to continue"),r.createElement("ul",{className:"wallet-adapter-modal-list"},f.map(e=>r.createElement(Ha,{key:e.adapter.name,handleClick:t=>x(t,e.adapter.name),wallet:e})),m.length?r.createElement(Ua,{expanded:l,id:"wallet-adapter-modal-collapse"},m.map(e=>r.createElement(Ha,{key:e.adapter.name,handleClick:t=>x(t,e.adapter.name),tabIndex:l?0:-1,wallet:e}))):null),m.length?r.createElement("button",{className:"wallet-adapter-modal-list-more",onClick:v,tabIndex:0},r.createElement("span",null,l?"Less ":"More ","options"),r.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",xmlns:"http://www.w3.org/2000/svg",className:"".concat(l?"wallet-adapter-modal-list-more-icon-rotate":"")},r.createElement("path",{d:"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z"}))):null):r.createElement(r.Fragment,null,r.createElement("h1",{className:"wallet-adapter-modal-title"},"You'll need a wallet on Solana to continue"),r.createElement("div",{className:"wallet-adapter-modal-middle"},r.createElement(Ka,null)),m.length?r.createElement(r.Fragment,null,r.createElement("button",{className:"wallet-adapter-modal-list-more",onClick:v,tabIndex:0},r.createElement("span",null,l?"Hide ":"Already have a wallet? View ","options"),r.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",xmlns:"http://www.w3.org/2000/svg",className:"".concat(l?"wallet-adapter-modal-list-more-icon-rotate":"")},r.createElement("path",{d:"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z"}))),r.createElement(Ua,{expanded:l,id:"wallet-adapter-modal-collapse"},r.createElement("ul",{className:"wallet-adapter-modal-list"},m.map(e=>r.createElement(Ha,{key:e.adapter.name,handleClick:t=>x(t,e.adapter.name),tabIndex:l?0:-1,wallet:e}))))):null))),r.createElement("div",{className:"wallet-adapter-modal-overlay",onMouseDown:y})),h)},$a=["children"],Ya=e=>{let{children:t}=e,n=(0,a.A)(e,$a);const[i,s]=(0,r.useState)(!1);return r.createElement(Da.Provider,{value:{visible:i,setVisible:s}},t,i&&r.createElement(Va,(0,o.A)({},n)))},Ga=["signers"];class Ja extends Gn{constructor(){super(),this.name="Phantom",this.url="https://phantom.app",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3Ni44NTA5IDM0LjQyOTIgODUuNjE4MiAyNC4zNDggODUuNjE4MkMxOS41ODI0IDg1LjYxODIgMTUgODMuNjU2MyAxNSA3NS4xMzQyQzE1IDUzLjQzMDUgNDQuNjMyNiAxOS44MzI3IDcyLjEyNjggMTkuODMyN0M4Ny43NjggMTkuODMyNyA5NCAzMC42ODQ2IDk0IDQzLjAwNzlDOTQgNTguODI1OCA4My43MzU1IDc2LjkxMjIgNzMuNTMyMSA3Ni45MTIyQzcwLjI5MzkgNzYuOTEyMiA2OC43MDUzIDc1LjEzNDIgNjguNzA1MyA3Mi4zMTRDNjguNzA1MyA3MS41NzgzIDY4LjgyNzUgNzAuNzgxMiA2OS4wNzE5IDY5LjkyMjlDNjUuNTg5MyA3NS44Njk5IDU4Ljg2ODUgODEuMzg3OCA1Mi41NzU0IDgxLjM4NzhDNDcuOTkzIDgxLjM4NzggNDUuNjcxMyA3OC41MDYzIDQ1LjY3MTMgNzQuNDU5OEM0NS42NzEzIDcyLjk4ODQgNDUuOTc2OCA3MS40NTU2IDQ2LjUyNjcgNjkuOTIyOVpNODMuNjc2MSA0Mi41Nzk0QzgzLjY3NjEgNDYuMTcwNCA4MS41NTc1IDQ3Ljk2NTggNzkuMTg3NSA0Ny45NjU4Qzc2Ljc4MTYgNDcuOTY1OCA3NC42OTg5IDQ2LjE3MDQgNzQuNjk4OSA0Mi41Nzk0Qzc0LjY5ODkgMzguOTg4NSA3Ni43ODE2IDM3LjE5MzEgNzkuMTg3NSAzNy4xOTMxQzgxLjU1NzUgMzcuMTkzMSA4My42NzYxIDM4Ljk4ODUgODMuNjc2MSA0Mi41Nzk0Wk03MC4yMTAzIDQyLjU3OTVDNzAuMjEwMyA0Ni4xNzA0IDY4LjA5MTYgNDcuOTY1OCA2NS43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState="undefined"===typeof window||"undefined"===typeof document?qn.Unsupported:qn.NotDetected,this._disconnected=()=>{const e=this._wallet;e&&(e.off("disconnect",this._disconnected),e.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null,this.emit
2("error",new On),this.emit("disconnect"))},this._accountChanged=e=>{const t=this._publicKey;if(t){try{e=new kn.J3(e.toBytes())}catch(n){return void this.emit("error",new Rn(null===n||void 0===n?void 0:n.message,n))}t.equals(e)||(this._publicKey=e,this.emit("connect",e))}},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==qn.Unsupported&&(Kn()?(this._readyState=qn.Loadable,this.emit("readyStateChange",this._readyState)):Hn(()=>{var e,t;return!!(null!==(e=window.phantom)&&void 0!==e&&null!==(e=e.solana)&&void 0!==e&&e.isPhantom||null!==(t=window.solana)&&void 0!==t&&t.isPhantom)&&(this._readyState=qn.Installed,this.emit("readyStateChange",this._readyState),!0)}))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async autoConnect(){this.readyState===qn.Installed&&await this.connect()}async connect(){try{var e;if(this.connected||this.connecting)return;if(this.readyState===qn.Loadable){const e=encodeURIComponent(window.location.href),t=encodeURIComponent(window.location.origin);return void(window.location.href="https://phantom.app/ul/browse/".concat(e,"?ref=").concat(t))}if(this.readyState!==qn.Installed)throw new Cn;this._connecting=!0;const n=(null===(e=window.phantom)||void 0===e?void 0:e.solana)||window.solana;if(!n.isConnected)try{await n.connect()}catch(t){throw new Pn(null===t||void 0===t?void 0:t.message,t)}if(!n.publicKey)throw new Ln;let r;try{r=new kn.J3(n.publicKey.toBytes())}catch(t){throw new Rn(null===t||void 0===t?void 0:t.message,t)}n.on("disconnect",this._disconnected),n.on("accountChanged",this._accountChanged),this._wallet=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const e=this._wallet;if(e){e.off("disconnect",this._disconnected),e.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await e.disconnect()}catch(t){this.emit("error",new In(null===t||void 0===t?void 0:t.message,t))}}this.emit("disconnect")}async sendTransaction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const i=this._wallet;if(!i)throw new Dn;try{const{signers:r}=n,s=(0,a.A)(n,Ga);Vn(e)?(null===r||void 0===r?void 0:r.length)&&e.sign(r):(e=await this.prepareTransaction(e,t,s),(null===r||void 0===r?void 0:r.length)&&e.partialSign(...r)),s.preflightCommitment=s.preflightCommitment||t.commitment;const{signature:o}=await i.signAndSendTransaction(e,s);return o}catch(r){if(r instanceof An)throw r;throw new Bn(null===r||void 0===r?void 0:r.message,r)}}catch(r){throw this.emit("error",r),r}}async signTransaction(e){try{const n=this._wallet;if(!n)throw new Dn;try{return await n.signTransaction(e)||e}catch(t){throw new Fn(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}}async signAllTransactions(e){try{const n=this._wallet;if(!n)throw new Dn;try{return await n.signAllTransactions(e)||e}catch(t){throw new Fn(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}}async signMessage(e){try{const n=this._wallet;if(!n)throw new Dn;try{const{signature:t}=await n.signMessage(e);return t}catch(t){throw new Un(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}}}var Za,Qa=function(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)},Xa=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};function eo(e){const t=t=>{let{register:n}=t;return n(e)};try{window.dispatchEvent(new to(t))}catch(n){console.error("wallet-standard:register-wallet event could not be dispatched\n",n)}try{window.addEventListener("wallet-standard:app-ready",e=>{let{detail:n}=e;return t(n)})}catch(n){console.error("wallet-standard:app-ready event listener could not be added\n",n)}}
2class to extends Event{get detail(){return Qa(this,Za,"f")}get type(){return"wallet-standard:register-wallet"}constructor(e){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),Za.set(this,void 0),Xa(this,Za,e,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}Za=new WeakMap;var no,ro,io,so,ao,oo,lo,co,uo,ho,po,fo,mo,go,yo=function(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)},xo=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};class vo{constructor(){var e=this;no.add(this),ro.set(this,{}),io.set(this,"1.0.0"),so.set(this,"MetaMask"),ao.set(this,"data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9wLWNvbG9yPSIjNTQ5N2Q1Ii8+PHN0b3Agb2Zmc2V0PSIuNiIgc3RvcC1jb2xvcj0iIzQzYjRjYSIvPjxzdG9wIG9mZnNldD0iLjcyIiBzdG9wLWNvbG9yPSIjMjhlMGI5Ii8+PHN0b3Agb2Zmc2V0PSIuOTciIHN0b3AtY29sb3I9IiMxOWZiOWIiLz48L2xpbmVhckdyYWRpZW50PjxnIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjA5NCI+PHBhdGggZD0ibTI2LjEwOSAzLjY0My05LjM2OSA2Ljk1OSAxLjczMy00LjEwNSA3LjYzNy0yLjg1M3oiIGZpbGw9IiNlMjc2MWIiIHN0cm9rZT0iI2UyNzYxYiIvPjxnIGZpbGw9IiNlNDc2MWIiIHN0cm9rZT0iI2U0NzYxYiI+PHBhdGggZD0ibTQuNDgxIDMuNjQzIDkuMjk0IDcuMDI0LTEuNjQ4LTQuMTcxem0xOC4yNTggMTYuMTMtMi40OTUgMy44MjMgNS4zMzkgMS40NjkgMS41MzUtNS4yMDctNC4zNzgtLjA4NXptLTE5LjI0Ny4wODUgMS41MjUgNS4yMDcgNS4zMzktMS40NjktMi40OTUtMy44MjN6Ii8+PHBhdGggZD0ibTEwLjA1NSAxMy4zMTMtMS40ODggMi4yNTEgNS4zMDEuMjM1LS4xODgtNS42OTd6bTEwLjQ4IDAtMy42NzItMy4yNzctLjEyMiA1Ljc2MyA1LjI5Mi0uMjM1LTEuNDk3LTIuMjUxem0tMTAuMTc4IDEwLjI4MyAzLjE4My0xLjU1NC0yLjc0OS0yLjE0Ny0uNDMzIDMuNzAxem02LjY5NS0xLjU1NCAzLjE5MiAxLjU1NC0uNDQzLTMuNzAxeiIvPjwvZz48cGF0aCBkPSJtMjAuMjQ0IDIzLjU5Ni0zLjE5Mi0xLjU1NC4yNTQgMi4wODEtLjAyOC44NzZ6bS05Ljg4NyAwIDIuOTY2IDEuNDAzLS4wMTktLjg3Ni4yMzUtMi4wODEtMy4xODMgMS41NTR6IiBmaWxsPSIjZDdjMWIzIiBzdHJva2U9IiNkN2MxYjMiLz48cGF0aCBkPSJtMTMuMzY5IDE4LjUyMS0yLjY1NS0uNzgxIDEuODc0LS44NTd6bTMuODUxIDAgLjc4MS0xLjYzOCAxLjg4My44NTctMi42NjUuNzgxeiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3Ii8+PHBhdGggZD0ibTEwLjM1NyAyMy41OTYuNDUyLTMuODIzLTIuOTQ3LjA4NXptOS40MzUtMy44MjMuNDUyIDMuODIzIDIuNDk1LTMuNzM4em0yLjI0MS00LjIwOS01LjI5Mi4yMzUuNDkgMi43MjEuNzgyLTEuNjM4IDEuODgzLjg1N3ptLTExLjMxOCAyLjE3NSAxLjg4My0uODU3Ljc3MiAxLjYzOC40OTktMi43MjEtNS4zMDEtLjIzNXoiIGZpbGw9IiNjZDYxMTYiIHN0cm9rZT0iI2NkNjExNiIvPjxwYXRoIGQ9Im04LjU2NyAxNS41NjQgMi4yMjIgNC4zMzEtLjA3NS0yLjE1NnptMTEuMzI4IDIuMTc1LS4wOTQgMi4xNTYgMi4yMzItNC4zMzEtMi4xMzcgMi4xNzV6bS02LjAyNi0xLjk0LS40OTkgMi43MjEuNjIxIDMuMjExLjE0MS00LjIyOC0uMjY0LTEuNzA0em0yLjg3MiAwLS4yNTQgMS42OTUuMTEzIDQuMjM3LjYzMS0zLjIxMXoiIGZpbGw9IiNlNDc1MWYiIHN0cm9rZT0iI2U0NzUxZiIvPjxwYXRoIGQ9Im0xNy4yMyAxOC41Mi0uNjMxIDMuMjExLjQ1Mi4zMTEgMi43NS0yLjE0Ny4wOTQtMi4xNTZ6bS02LjUxNi0uNzgxLjA3NSAyLjE1NiAyLjc1IDIuMTQ3LjQ1Mi0uMzExLS42MjItMy4yMTF6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48cGF0aCBkPSJtMTcuMjc3IDI0Ljk5OS4wMjgtLjg3Ni0uMjM1LS4yMDdoLTMuNTVsLS4yMTcuMjA3LjAxOS44NzYtMi45NjYtMS40MDMgMS4wMzYuODQ4IDIuMSAxLjQ1OWgzLjYwNmwyLjEwOS0xLjQ1OSAxLjAzNi0uODQ4eiIgZmlsbD0iI2MwYWQ5ZSIgc3Ryb2tlPSIjYzBhZDllIi8+PHBhdGggZD0ibTE3LjA1MSAyMi4wNDItLjQ1Mi0uMzExaC0yLjYwOGwtLjQ1Mi4zMTEtLjIzNSAyLjA4MS4yMTctLjIwN2gzLjU1bC4yMzUuMjA3LS4yNTQtMi4wODF6IiBmaWxsPSIjMTYxNjE2IiBzdHJva2U9IiMxNjE2MTYiLz48cGF0aCBkPSJtMjYuNTA1IDExLjA1My44LTMuODQyLTEuMTk2LTMuNTY5LTkuMDU4IDYuNzIzIDMuNDg0IDIuOTQ3IDQuOTI1IDEuNDQxIDEuMDkyLTEuMjcxLS40NzEtLjMzOS43NTMtLjY4Ny0uNTg0LS40NTIuNzUzLS41NzQtLjQ5OS0uMzc3em0tMjMuMjExLTMuODQxLjggMy44NDItLjUwOC4zNzcuNzUzLjU3NC0uNTc0LjQ1Mi43NTMuNjg3LS40NzEuMzM5IDEuMDgzIDEuMjcxIDQuOTI1LTEuNDQxIDMuNDg0LTIuOTQ3
2LTkuMDU5LTYuNzIzeiIgZmlsbD0iIzc2M2QxNiIgc3Ryb2tlPSIjNzYzZDE2Ii8+PHBhdGggZD0ibTI1LjQ2IDE0Ljc1NC00LjkyNS0xLjQ0MSAxLjQ5NyAyLjI1MS0yLjIzMiA0LjMzMSAyLjkzOC0uMDM4aDQuMzc4bC0xLjY1Ny01LjEwNHptLTE1LjQwNS0xLjQ0MS00LjkyNSAxLjQ0MS0xLjYzOCA1LjEwNGg0LjM2OWwyLjkyOC4wMzgtMi4yMjItNC4zMzEgMS40ODgtMi4yNTF6bTYuNjg1IDIuNDg2LjMxMS01LjQzMyAxLjQzMS0zLjg3aC02LjM1NmwxLjQxMyAzLjg3LjMyOSA1LjQzMy4xMTMgMS43MTQuMDA5IDQuMjE5aDIuNjFsLjAxOS00LjIxOS4xMjItMS43MTR6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48L2c+PGNpcmNsZSBjeD0iMjMuNSIgY3k9IjIzLjUiIGZpbGw9IiMwMDAiIHI9IjYuNSIvPjxwYXRoIGQ9Im0yNy40NzMgMjUuNTQ1LTEuMzEgMS4zNjhjLS4wMjkuMDMtLjA2My4wNTMtLjEwMS4wN2EuMzEuMzEgMCAwIDEgLS4xMjEuMDI0aC02LjIwOWMtLjAzIDAtLjA1OS0uMDA4LS4wODMtLjAyNGEuMTUuMTUgMCAwIDEgLS4wNTYtLjA2NWMtLjAxMi0uMDI2LS4wMTUtLjA1Ni0uMDEtLjA4NHMuMDE4LS4wNTUuMDM5LS4wNzZsMS4zMTEtMS4zNjhjLjAyOC0uMDMuMDYzLS4wNTMuMTAxLS4wNjlhLjMxLjMxIDAgMCAxIC4xMjEtLjAyNWg2LjIwOGMuMDMgMCAuMDU5LjAwOC4wODMuMDI0YS4xNS4xNSAwIDAgMSAuMDU2LjA2NWMuMDEyLjAyNi4wMTUuMDU2LjAxLjA4NHMtLjAxOC4wNTUtLjAzOS4wNzZ6bS0xLjMxLTIuNzU2Yy0uMDI5LS4wMy0uMDYzLS4wNTMtLjEwMS0uMDdhLjMxLjMxIDAgMCAwIC0uMTIxLS4wMjRoLTYuMjA5Yy0uMDMgMC0uMDU5LjAwOC0uMDgzLjAyNHMtLjA0NC4wMzgtLjA1Ni4wNjUtLjAxNS4wNTYtLjAxLjA4NC4wMTguMDU1LjAzOS4wNzZsMS4zMTEgMS4zNjhjLjAyOC4wMy4wNjMuMDUzLjEwMS4wNjlhLjMxLjMxIDAgMCAwIC4xMjEuMDI1aDYuMjA4Yy4wMyAwIC4wNTktLjAwOC4wODMtLjAyNGEuMTUuMTUgMCAwIDAgLjA1Ni0uMDY1Yy4wMTItLjAyNi4wMTUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4="),oo.set(this,null),lo.set(this,(e,t)=>{var n;return(null===(n=yo(this,ro,"f")[e])||void 0===n?void 0:n.push(t))||(yo(this,ro,"f")[e]=[t]),()=>yo(this,no,"m",uo).call(this,e,t)}),ho.set(this,async()=>{if(!yo(this,oo,"f")){let t;try{t=(await n.e(227).then(n.bind(n,4227))).default}catch(e){throw new Error("Unable to load Solflare MetaMask SDK")}xo(this,oo,new t,"f"),yo(this,oo,"f").on("standard_change",e=>yo(this,no,"m",co).call(this,"change",e))}return this.accounts.length||await yo(this,oo,"f").connect(),{accounts:this.accounts}}),po.set(this,async()=>{yo(this,oo,"f")&&await yo(this,oo,"f").disconnect()}),fo.set(this,async function(){if(!yo(e,oo,"f"))throw new Dn;return await yo(e,oo,"f").standardSignAndSendTransaction(...arguments)}),mo.set(this,async function(){if(!yo(e,oo,"f"))throw new Dn;return await yo(e,oo,"f").standardSignTransaction(...arguments)}),go.set(this,async function(){if(!yo(e,oo,"f"))throw new Dn;return await yo(e,oo,"f").standardSignMessage(...arguments)})}get version(){return yo(this,io,"f")}get name(){return yo(this,so,"f")}get icon(){return yo(this,ao,"f")}get chains(){return[ei,ti,ni]}get features(){return{[Jr]:{version:"1.0.0",connect:yo(this,ho,"f")},[Zr]:{version:"1.0.0",disconnect:yo(this,po,"f")},[Qr]:{version:"1.0.0",on:yo(this,lo,"f")},[Xn.R]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:yo(this,fo,"f")},[er.q]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:yo(this,mo,"f")},[Qn.F]:{version:"1.0.0",signMessage:yo(this,go,"f")}}}get accounts(){return yo(this,oo,"f")?yo(this,oo,"f").standardAccounts:[]}}ro=new WeakMap,io=new WeakMap,so=new WeakMap,ao=new WeakMap,oo=new WeakMap,lo=new WeakMap,ho=new WeakMap,po=new WeakMap,fo=new WeakMap,mo=new WeakMap,go=new WeakMap,no=new WeakSet,co=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];null===(t=yo(this,ro,"f")[e])||void 0===t||t.forEach(e=>e.apply(null,r))},uo=function(e,t){var n;yo(this,ro,"f")[e]=null===(n=yo(this,ro,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)};let bo=!1;async function wo(){const e="solflare-detect-metamask";function t(){window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:{id:e,jsonrpc:"2.0",method:"wallet_getSnaps"}}},window.location.origin)}function n(r){var i;const s=r.data;var a;"metamask-inpage"===(null===s||void 0===s?void 0:s.target)&&"metamask-provider"===(null===(i=s.data)||void 0===i?void 0:i.name)&&((null===(a=s.data.data)||void 0===a?void 0:a.id)===e?(window.removeEventListener("message",n),s.data.data.error||bo||(eo(new vo),bo=!0)):t())}window.addEventListener("message",n),window.setTimeout(()=>window.removeEventListener("message",n),5e3),t()}const _o=["signers"];class jo extends Gn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.name="Solflare",this.url="https://solflare.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJTIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwMjA1MGE7c3Ryb2tlOiNmZmVmNDY7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOi41cHg7fS5jbHMtMntmaWxsOiNmZmVmNDY7fTwvc3R5bGU+PC9kZWZzPjxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMCIgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiByeD0iMTIiIHJ5PSIxMiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTI0LjIzL
2DI2LjQybDIuNDYtMi4zOCw0LjU5LDEuNWMzLjAxLDEsNC41MSwyLjg0LDQuNTEsNS40MywwLDEuOTYtLjc1LDMuMjYtMi4yNSw0LjkzbC0uNDYuNS4xNy0xLjE3Yy42Ny00LjI2LS41OC02LjA5LTQuNzItNy40M2wtNC4zLTEuMzhoMFpNMTguMDUsMTEuODVsMTIuNTIsNC4xNy0yLjcxLDIuNTktNi41MS0yLjE3Yy0yLjI1LS43NS0zLjAxLTEuOTYtMy4zLTQuNTF2LS4wOGgwWk0xNy4zLDMzLjA2bDIuODQtMi43MSw1LjM0LDEuNzVjMi44LjkyLDMuNzYsMi4xMywzLjQ2LDUuMThsLTExLjY1LTQuMjJoMFpNMTMuNzEsMjAuOTVjMC0uNzkuNDItMS41NCwxLjEzLTIuMTcuNzUsMS4wOSwyLjA1LDIuMDUsNC4wOSwyLjcxbDQuNDIsMS40Ni0yLjQ2LDIuMzgtNC4zNC0xLjQyYy0yLS42Ny0yLjg0LTEuNjctMi44NC0yLjk2TTI2LjgyLDQyLjg3YzkuMTgtNi4wOSwxNC4xMS0xMC4yMywxNC4xMS0xNS4zMiwwLTMuMzgtMi01LjI2LTYuNDMtNi43MmwtMy4zNC0xLjEzLDkuMTQtOC43Ny0xLjg0LTEuOTYtMi43MSwyLjM4LTEyLjgxLTQuMjJjLTMuOTcsMS4yOS04Ljk3LDUuMDktOC45Nyw4Ljg5LDAsLjQyLjA0LjgzLjE3LDEuMjktMy4zLDEuODgtNC42MywzLjYzLTQuNjMsNS44LDAsMi4wNSwxLjA5LDQuMDksNC41NSw1LjIybDIuNzUuOTItOS41Miw5LjE0LDEuODQsMS45NiwyLjk2LTIuNzEsMTQuNzMsNS4yMmgwWiIvPjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState="undefined"===typeof window||"undefined"===typeof document?qn.Unsupported:qn.Loadable,this._disconnected=()=>{const e=this._wallet;e&&(e.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new On),this.emit("disconnect"))},this._accountChanged=e=>{if(!e)return;const t=this._publicKey;if(t){try{e=new kn.J3(e.toBytes())}catch(n){return void this.emit("error",new Rn(null===n||void 0===n?void 0:n.message,n))}t.equals(e)||(this._publicKey=e,this.emit("connect",e))}},this._connecting=!1,this._publicKey=null,this._wallet=null,this._config=e,this._readyState!==qn.Unsupported&&(Hn(()=>{var e;return!!(null!==(e=window.solflare)&&void 0!==e&&e.isSolflare||window.SolflareApp)&&(this._readyState=qn.Installed,this.emit("readyStateChange",this._readyState),!0)}),wo())}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){var e;return!(null===(e=this._wallet)||void 0===e||!e.connected)}get readyState(){return this._readyState}async autoConnect(){this.readyState===qn.Loadable&&Kn()||await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==qn.Loadable&&this._readyState!==qn.Installed)throw new Cn;if(this.readyState===qn.Loadable&&Kn()){const e=encodeURIComponent(window.location.href),t=encodeURIComponent(window.location.origin);return void(window.location.href="https://solflare.com/ul/v1/browse/".concat(e,"?ref=").concat(t))}let t,r,i;try{t=(await n.e(648).then(n.bind(n,4648))).default}catch(e){throw new Mn(null===e||void 0===e?void 0:e.message,e)}try{r=new t({network:this._config.network})}catch(e){throw new Tn(null===e||void 0===e?void 0:e.message,e)}if(this._connecting=!0,!r.connected)try{await r.connect()}catch(e){throw new Pn(null===e||void 0===e?void 0:e.message,e)}if(!r.publicKey)throw new Pn;try{i=new kn.J3(r.publicKey.toBytes())}catch(e){throw new Rn(null===e||void 0===e?void 0:e.message,e)}r.on("disconnect",this._disconnected),r.on("accountChanged",this._accountChanged),this._wallet=r,this._publicKey=i,this.emit("connect",i)}catch(e){throw this.emit("error",e),e}finally{this._connecting=!1}}async disconnect(){const e=this._wallet;if(e){e.off("disconnect",this._disconnected),e.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await e.disconnect()}catch(t){this.emit("error",new In(null===t||void 0===t?void 0:t.message,t))}}this.emit("disconnect")}async sendTransaction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const i=this._wallet;if(!i)throw new Dn;try{const{signers:r}=n,s=(0,a.A)(n,_o);return Vn(e)?(null===r||void 0===r?void 0:r.length)&&e.sign(r):(e=await this.prepareTransaction(e,t,s),(null===r||void 0===r?void 0:r.length)&&e.partialSign(...r)),s.preflightCommitment=s.preflightCommitment||t.commitment,await i.signAndSendTransaction(e,s)}catch(r){if(r instanceof An)throw r;throw new Bn(null===r||void 0===r?void 0:r.message,r)}}catch(r){throw this.emit("error",r),r}}async signTransaction(e){try{const n=this._wallet;if(!n)throw new Dn;try{return await n.signTransaction(e)||e}catch(t){throw new Fn(null===t||void 0===t?void 0:t.message,t)}}
2catch(t){throw this.emit("error",t),t}}async signAllTransactions(e){try{const n=this._wallet;if(!n)throw new Dn;try{return await n.signAllTransactions(e)||e}catch(t){throw new Fn(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}}async signMessage(e){try{const n=this._wallet;if(!n)throw new Dn;try{return await n.signMessage(e,"utf8")}catch(t){throw new Un(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}}}var ko="undefined"!=typeof window?window:void 0,No="undefined"!=typeof globalThis?globalThis:ko;"undefined"==typeof self&&(No.self=No),"undefined"==typeof File&&(No.File=function(){});var So=null==No?void 0:No.navigator,Eo=null==No?void 0:No.document,Ao=null==No?void 0:No.location,Co=null==No?void 0:No.fetch,Mo=null!=No&&No.XMLHttpRequest&&"withCredentials"in new No.XMLHttpRequest?No.XMLHttpRequest:void 0,To=null==No?void 0:No.AbortController,Po=null==No?void 0:No.CompressionStream,Oo=null==So?void 0:So.userAgent,Io=null!=ko?ko:{},Lo="1.373.2",Ro={DEBUG:!1,LIB_VERSION:Lo,LIB_NAME:"web",JS_SDK_VERSION:Lo};function Do(e,t,n,r,i,s,a){try{var o=e[s](a),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function Bo(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function a(e){Do(s,r,i,a,o,"next",e)}function o(e){Do(s,r,i,a,o,"throw",e)}a(void 0)})}}function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fo.apply(null,arguments)}function Uo(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var zo,qo="NativeGzipValidationError",Wo=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),Ho=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=qo,t},Ko=function(){var e=Bo(function*(e,t){18>e.size&&Ho("too-short");var n=new Uint8Array(yield e.slice(0,10).arrayBuffer());31===n[0]&&139===n[1]&&8===n[2]||Ho("invalid-header");var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(zo)return zo;zo=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;zo[e]=t>>>0}return zo})(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&Ho("invalid-crc");var i=t.length>>>0;r.getUint32(4,!0)!==i&&Ho("invalid-size")});return function(t,n){return e.apply(this,arguments)}}();function Vo(){return Vo=Bo(function*(e,t,n){void 0===t&&(t=!0);try{var r=(new TextEncoder).encode(e),i=new CompressionStream("gzip"),s=i.writable.getWriter(),a=s.write(r).then(()=>s.close()).catch(function(){var e=Bo(function*(e){try{yield s.abort(e)}catch(e){}throw e});return function(t){return e.apply(this,arguments)}}()),o=new Response(i.readable).blob(),[l]=yield Promise.all([o,a]);return yield Ko(l,r),l}catch(e){if(null!=n&&n.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}}),Vo.apply(this,arguments)}var $o=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Yo=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return $o.concat(t).some(e=>{var t=e.toLowerCase();return-1!==n.indexOf(t)})},Go=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function Jo(e,t){return-1!==e.indexOf(t)}var Zo=function(e){return e.trim()},Qo=function(e){return e.replace(/^\$/,"")},Xo=Object.prototype,el=Xo.hasOwnProperty,tl=Xo.toString,nl=Array.isArray||function(e){return"[object Array]"===tl.call(e)},rl=e=>"function"==typeof e,il=e=>e===Object(e)&&!nl(e),sl=e=>{if(il(e)){for(var t in e)if(el.call(e,t))return!1;return!0}return!1},al=e=>void 0===e,ol=e=>"[object String]"==tl.call(e),ll=e=>ol(e)&&0===e.trim().length,cl=e=>null===e,ul=e=>al(e)||cl(e),dl=e=>"[object Number]"==tl.call(e)&&e==e,hl=e=>dl(e)&&e>0,pl=e=>"[object Boolean]"===tl.call(e),fl=e=>Jo(Go,e);function ml(e){return null===e||"object"!=typeof e}function gl(e,t){return{}.toString.call(e)==="[object "+t+"]"}function yl(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var xl=[!0,"true",1,"1","yes"],vl=e=>Jo(xl,e),bl=[!1,"false",0,"0","no"];function wl(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),dl(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),wl(i||n,t,n,r))}
2class _l{constructor(e){this.$t={},this.zt=e.zt,this.Zt=wl(e.bucketSize,0,100,e.Gt),this.Qt=wl(e.refillRate,0,this.Zt,e.Gt),this.Jt=wl(e.refillInterval,0,864e5,e.Gt)}Kt(e,t){var n=Math.floor((t-e.lastAccess)/this.Jt);n>0&&(e.tokens=Math.min(e.tokens+n*this.Qt,this.Zt),e.lastAccess=e.lastAccess+n*this.Jt)}consumeRateLimit(e){var t,n=Date.now(),r=String(e),i=this.$t[r];return i?this.Kt(i,n):this.$t[r]=i={tokens:this.Zt,lastAccess:n},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this.zt)||t.call(this,e)),0===i.tokens)}stop(){this.$t={}}}var jl,kl,Nl,Sl="Mobile",El="iOS",Al="Android",Cl="Tablet",Ml=Al+" "+Cl,Tl="iPad",Pl="Apple",Ol=Pl+" Watch",Il="Safari",Ll="BlackBerry",Rl="Samsung",Dl=Rl+"Browser",Bl=Rl+" Internet",Fl="Chrome",Ul=Fl+" OS",zl=Fl+" "+El,ql="Internet Explorer",Wl=ql+" "+Sl,Hl="Opera",Kl=Hl+" Mini",Vl="Edge",$l="Microsoft "+Vl,Yl="Firefox",Gl=Yl+" "+El,Jl="Nintendo",Zl="PlayStation",Ql="Xbox",Xl=Al+" "+Sl,ec=Sl+" "+Il,tc="Windows",nc=tc+" Phone",rc="Nokia",ic="Ouya",sc="Generic",ac=sc+" "+Sl.toLowerCase(),oc=sc+" "+Cl.toLowerCase(),lc="Konqueror",cc="(\\d+(\\.\\d+)?)",uc=new RegExp("Version/"+cc),dc=new RegExp(Ql,"i"),hc=new RegExp(Zl+" \\w+","i"),pc=new RegExp(Jl+" \\w+","i"),fc=new RegExp(Ll+"|PlayBook|BB10","i"),mc={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},gc=function(e,t){return t=t||"",Jo(e," OPR/")&&Jo(e,"Mini")?Kl:Jo(e," OPR/")?Hl:fc.test(e)?Ll:Jo(e,"IE"+Sl)||Jo(e,"WPDesktop")?Wl:Jo(e,Dl)?Bl:Jo(e,Vl)||Jo(e,"Edg/")?$l:Jo(e,"FBIOS")?"Facebook "+Sl:Jo(e,"UCWEB")||Jo(e,"UCBrowser")?"UC Browser":Jo(e,"CriOS")?zl:Jo(e,"CrMo")||Jo(e,Fl)?Fl:Jo(e,Al)&&Jo(e,Il)?Xl:Jo(e,"FxiOS")?Gl:Jo(e.toLowerCase(),lc.toLowerCase())?lc:((e,t)=>t&&Jo(t,Pl)||function(e){return Jo(e,Il)&&!Jo(e,Fl)&&!Jo(e,Al)}(e))(e,t)?Jo(e,Sl)?ec:Il:Jo(e,Yl)?Yl:Jo(e,"MSIE")||Jo(e,"Trident/")?ql:Jo(e,"Gecko")?Yl:""},yc={[Wl]:[new RegExp("rv:"+cc)],[$l]:[new RegExp(Vl+"?\\/"+cc)],[Fl]:[new RegExp("("+Fl+"|CrMo)\\/"+cc)],[zl]:[new RegExp("CriOS\\/"+cc)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+cc)],[Il]:[uc],[ec]:[uc],[Hl]:[new RegExp("(Opera|OPR)\\/"+cc)],[Yl]:[new RegExp(Yl+"\\/"+cc)],[Gl]:[new RegExp("FxiOS\\/"+cc)],[lc]:[new RegExp("Konqueror[:/]?"+cc,"i")],[Ll]:[new RegExp(Ll+" "+cc),uc],[Xl]:[new RegExp("android\\s"+cc,"i")],[Bl]:[new RegExp(Dl+"\\/"+cc)],[ql]:[new RegExp("(rv:|MSIE )"+cc)],Mozilla:[new RegExp("rv:"+cc)]},xc=function(e,t){var n=gc(e,t),r=yc[n];if(al(r))return null;for(var i=0;r.length>i;i++){var s=e.match(r[i]);if(s)return parseFloat(s[s.length-2])}return null},vc=[[new RegExp(Ql+"; "+Ql+" (.*?)[);]","i"),e=>[Ql,e&&e[1]||""]],[new RegExp(Jl,"i"),[Jl,""]],[new RegExp(Zl,"i"),[Zl,""]],[fc,[Ll,""]],[new RegExp(tc,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[nc,""];if(new RegExp(Sl).test(t)&&!/IEMobile\b/.test(t))return[tc+" "+Sl,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=mc[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[tc,r]}return[tc,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[El,[e[3],e[4],e[5]||"0"].join(".")]:[El,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=al(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Al+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Al+")","i"),e=>e&&e[2]?[Al,[e[2],e[3],e[4]||"0"].join(".")]:[Al,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Ul,""]],[/Linux|debian/i,["Linux",""]]],bc=function(e){return pc.test(e)?Jl:hc.test(e)?Zl:dc.test(e)?Ql:new RegExp(ic,"i").test(e)?ic:new RegExp("("+nc+"|WPDesktop)","i").test(e)?nc:/iPad/.test(e)?Tl:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Ol:fc.test(e)?Ll:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(rc,"i").test(e)?rc:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Sl).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Al:Ml:new RegExp("(pda|"+Sl+")","i").test(e)?ac:new RegExp(Cl,"i").test(e)&&!new RegExp(Cl+" pc","i").test(e)?oc:""},wc=e=>e instanceof Error,_c={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},jc=_c.info;function kc(e){if(pl(e))return{boolValue:e};if("number"==typeof e)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if("string"==typeof e)return{stringValue:e};if(nl(e))return{arrayValue:{values:e.map(e=>kc(e))}};try{return{stringValue:JSON.stringify(e)}}catch(d$){return{stringValue:String(e)}}}function Nc(e){var t=[];for(var n in e){var r=e[n];cl(r)||al(r)||t.push({key:n,value:kc(r)})}return t}function Sc(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return Nl&&n.length===kl||(kl=n.length,Nl=n.reduce((n,r)=>{jl||(jl={});var i=jl[r];if(i)n[i[0]]=i[1];else for(var s=e(r),a=s.length-1;a>=0;a--){var o=s[a],l=null==o?void 0:o.filename,c=t[r];
vendor: 5,059 bytes, line 2
2if(l&&c){n[l]=c,jl[r]=[l,c];break}}return n},{})),Nl}}class Ec{constructor(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),s=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(s,n),$exception_level:"error"}}modifyFrames(e){var t=this;return Bo(function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&nl(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),Fo({},e,{cause:n,stack:r})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Bo(function*(){var n=e;for(var r of t.modifiers)n=yield r(n);return n})()}convertToExceptionList(e,t){var n,r,i,s={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(s.stacktrace={type:"raw",frames:e.stack});var a=[s];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,Fo({},t,{handled:!0}))),a}buildParsingContext(e){var t;return{chunkIdMap:Sc(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var r=(n,r)=>{if(4>=r){var i=this.buildCoercingContext(e,t,r);return this.applyCoercers(n,i)}};return Fo({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,n),next:e=>r(e,n+1)})}}var Ac="?";function Cc(e,t,n,r,i){var s={platform:e,filename:t,function:"<anonymous>"===n?Ac:n,in_app:!0};return al(r)||(s.lineno=r),al(i)||(s.colno=i),s}var Mc=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ac,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},Tc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Pc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Oc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ic=(e,t)=>{var n=Tc.exec(e);if(n){var[,r,i,s]=n;return Cc(t,r,Ac,+i,+s)}var a=Pc.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var o=Oc.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,c]=Mc(a[1]||Ac,a[2]);return Cc(t,c,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},Lc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Rc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Dc=(e,t)=>{var n=Lc.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=Rc.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],s=n[1]||Ac;return[s,i]=Mc(s,i),Cc(t,i,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Bc=/\(error: (.*)\)/;class Fc{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var n=ol(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return gl(e,"DOMException")}isDOMError(e){return gl(e,"DOMError")}}class Uc{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var n=e.message;return String(n.error&&"string"==typeof n.error.message?n.error.message:n)}getStack(e){return e.stacktrace||e.stack||void 0}}class zc{constructor(){}match(e){return gl(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var n;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}var qc=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Wc{match(e){return"string"==typeof e}coerce(e,t){var n,[r,i]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=i?i:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}getInfos(e){var t="Error",n=e,r=e.match(qc);return r&&(t=r[1],n=r[2]),[t,n]}}var Hc=["fatal","error","warning","log","info","debug"];function Kc(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");
2if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}class Vc{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return yl(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Kc(e)}isSeverityLevel(e){return ol(e)&&!ll(e)&&Hc.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(wc(n))return n}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class $c{match(e){return yl(e)}coerce(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Kc(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}class Yc{match(e){return ml(e)}coerce(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}}}class Gc{match(e){return gl(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!yl(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var n,r=this.getUnhandledRejectionReason(e);return ml(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var Jc="$message",Zc="$timestamp",Qc=new Set([Jc,Zc]),Xc={enabled:!0,max_bytes:32768};function eu(e){var t;return e?{enabled:null!==(t=e.enabled)&&void 0!==t?t:Xc.enabled,max_bytes:nu(e.max_bytes,Xc.max_bytes)}:Fo({},Xc)}class tu{constructor(e){this.Yt=[],this.Xt=0,this.qt=eu(e)}setConfig(e){this.qt=eu(e),this.er()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(e,n)=>{if("bigint"==typeof n)return n.toString();if("function"!=typeof n&&"symbol"!=typeof n){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&"object"==typeof n){if(t.has(n))return"[Circular]";t.add(n)}return n}})}catch(e){return}}(e);if(t)try{var n=JSON.parse(t);if(!il(n))return;var r=n,i=r[Jc],s=r[Zc];if(!ol(i)||0===i.trim().length)return;if(!ol(s)&&!dl(s))return;return{step:r,json:t}}catch(e){return}}(e);if(t){var n=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),n=0,r=0;t.length>r;r++)"%"===t[r]?(n+=1,r+=2):n+=1;return n}(t.json);n>this.qt.max_bytes||(this.Yt.push({step:t.step,bytes:n}),this.Xt+=n,this.er())}}getAttachable(){return this.Yt.map(e=>e.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var e=this.Yt.shift();e&&(this.Xt-=e.bytes)}}}function nu(e,t){if(!dl(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var ru=function(e,t){var{debugEnabled:n}=void 0===t?{}:t,r={k(t){if(ko&&(Ro.DEBUG||Io.POSTHOG_DEBUG||n)&&!al(ko.console)&&ko.console){for(var r=("__rrweb_original__"in ko.console[t]?ko.console[t].__rrweb_original__:ko.console[t]),i=arguments.length,s=new Array(i>1?i-1:0),a=1;i>a;a++)s[a-1]=arguments[a];r(e,...s)}},debug(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k("error",...t)},critical(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning(e){r.error("You must initialize PostHog before calling "+e)},createLogger:(t,n)=>ru(e+" "+t,n)};return r},iu=ru("[PostHog.js]"),su=iu.createLogger,au=su("[ExternalScriptsLoader]"),ou=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return au.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=null==Eo?void 0:Eo.querySelectorAll("script");
2if(r)for(var i,s=function(){if(r[a].src===t){var e=r[a];return e.__posthog_loading_callback_fired?{v:n()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,n(void 0,t)}),e.onerror=e=>n(e),{v:void 0})}},a=0;r.length>a;a++)if(i=s())return i.v;var o=()=>{if(!Eo)return n("document not found");var r=Eo.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>n(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)Eo.head.appendChild(r);else{var i,s=Eo.querySelectorAll("body > script");s.length>0?null==(i=s[0].parentNode)||i.insertBefore(r,s[0]):Eo.body.appendChild(r)}};null!=Eo&&Eo.body?o():null==Eo||Eo.addEventListener("DOMContentLoaded",o)};Io.__PosthogExtensions__=Io.__PosthogExtensions__||{},Io.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if("remote-config"!==t){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var i="/static/"+t+".js?v="+e.version;if("toolbar"===t){var s=3e5;i=i+"&t="+Math.floor(Date.now()/s)*s}r=e.requestRouter.endpointFor("assets",i)}ou(e,r,n)}else{var a=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");ou(e,a,n)}},Io.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);ou(e,r,n)};var lu="$people_distinct_id",cu="$device_id",uu="__alias",du="__timers",hu="$autocapture_disabled_server_side",pu="$heatmaps_enabled_server_side",fu="$exception_capture_enabled_server_side",mu="$error_tracking_suppression_rules",gu="$error_tracking_capture_extension_exceptions",yu="$web_vitals_enabled_server_side",xu="$dead_clicks_enabled_server_side",vu="$product_tours_enabled_server_side",bu="$web_vitals_allowed_metrics",wu="$session_recording_remote_config",_u="$replay_override_sampling",ju="$replay_override_linked_flag",ku="$replay_override_url_trigger",Nu="$replay_override_event_trigger",Su="$sesid",Eu="$session_is_sampled",Au="$enabled_feature_flags",Cu="$active_feature_flags",Mu="$early_access_features",Tu="$feature_flag_details",Pu="$feature_flag_payloads",Ou="$feature_flag_request_id",Iu="$override_feature_flags",Lu="$override_feature_flag_payloads",Ru="$stored_person_properties",Du="$stored_group_properties",Bu="$surveys",Fu="$surveys_activated",Uu="ph_product_tours",zu="$flag_call_reported",qu="$flag_call_reported_session_id",Wu="$feature_flag_errors",Hu="$feature_flag_evaluated_at",Ku="$user_state",Vu="$client_session_props",$u="$capture_rate_limit",Yu="$initial_campaign_params",Gu="$initial_referrer_info",Ju="$initial_person_info",Zu="$epp",Qu="__POSTHOG_TOOLBAR__",Xu="$posthog_cookieless",ed="$sdk_debug_extensions_init_method",td="$sdk_debug_extensions_init_time_ms",nd="$sdk_debug_recording_script_not_loaded",rd="PostHog loadExternalDependency extension not found.",id="on_reject",sd="always",ad="anonymous",od="identified",ld="identified_only",cd="visibilitychange",ud="beforeunload",dd="$pageview",hd="$pageleave",pd="$identify",fd="$groupidentify";function md(e,t){nl(e)&&e.forEach(t)}function gd(e,t){if(!ul(e))if(nl(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(var n in e)el.call(e,n)&&t(e[n],n)}var yd=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var s in i)void 0!==i[s]&&(e[s]=i[s]);return e};function xd(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var vd=function(e){try{return e()}catch(e){return}},bd=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){iu.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),iu.critical(e)}}},wd=function(e){var t={};return gd(e,function(e,n){(ol(e)&&e.length>0||dl(e))&&(t[n]=e)}),t},_d=["herokuapp.com","vercel.app","netlify.app"];
2function jd(e){var t=null==e?void 0:e.hostname;if(!ol(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of _d)if(n===r)return!1;return!0}function kd(e,t,n,r){var{capture:i=!1,passive:s=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:i,passive:s})}function Nd(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return dl(e)&&isFinite(e)&&Math.floor(e)===e});class Sd{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,n,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||0>e||0>t||0>n||0>r||e>0xffffffffffff||t>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=r>>>24,i[13]=r>>>16,i[14]=r>>>8,i[15]=r,new Sd(i)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Sd(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}}class Ed{constructor(){this.S=0,this.C=0,this.I=new Md}generate(){var e=this.generateOrAbort();if(al(e)){this.S=0;var t=this.generateOrAbort();if(al(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return Sd.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var Ad,Cd=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ko&&!al(ko.crypto)&&crypto.getRandomValues&&(Cd=e=>crypto.getRandomValues(e));class Md{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(Cd(this.M),this.O=0),this.M[this.O++]}}var Td=()=>Pd().toString(),Pd=()=>(Ad||(Ad=new Ed)).generate(),Od="",Id=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Ld={R:()=>!!Eo,D(e){iu.error("cookieStore error: "+e)},A(e){if(Eo){try{for(var t=e+"=",n=Eo.cookie.split(";").filter(e=>e.length),r=0;n.length>r;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},F(e){var t;try{t=JSON.parse(Ld.A(e))||{}}catch(e){}return t},N(e,t,n,r,i){if(Eo)try{var s="",a="",o=function(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=Eo),Od)return Od;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+Td();!Od&&r--;){var s=n.slice(r).join("."),a=i+"=1;domain=."+s+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(i)&&(t.cookie=a+";max-age=0",Od=s)}return Od}(e);if(!n){var r=(e=>{var t=e.match(Id);return t?t[0]:""})(e);r!==n&&iu.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}(Eo.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+864e5*n),s="; expires="+l.toUTCString()}i&&(a="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+o+a;return c.length>3686.4&&iu.warn("cookieStore warning: large cookie, len="+c.length),Eo.cookie=c,c}catch(e){return}},q(e,t){if(null!=Eo&&Eo.cookie)try{Ld.N(e,"",-1,t)}catch(e){return}}},Rd=null,Dd={R(){if(!cl(Rd))return Rd;var e=!0;if(al(ko))e=!1;else try{var t="__mplssupport__";Dd.N(t,"xyz"),'"xyz"'!==Dd.A(t)&&(e=!1),Dd.q(t)}catch(ko){e=!1}return e||iu.error("localStorage unsupported; falling back to cookie store"),Rd=e,e},D(e){iu.error("localStorage error: "+e)},A(e){try{return null==ko?void 0:ko.localStorage.getItem(e)}catch(ko){Dd.D(ko)}return null},F(e){try{return JSON.parse(Dd.A(e))||{}}catch(e){}return null},N(e,t){try{null==ko||ko.localStorage.setItem(e,JSON.stringify(t))}catch(ko){Dd.D(ko)}},q(e){try{null==ko||ko.localStorage.removeItem(e)}catch(ko){Dd.D(ko)}}},Bd=[cu,"distinct_id",Su,Eu,Zu,Ju,Ku],Fd={},Ud={R:()=>!0,D(e){iu.error("memoryStorage error: "+e)},A:e=>Fd[e]||null,F:e=>Fd[e]||null,N(e,t){Fd[e]=t},q(e){delete Fd[e]}},zd=null,qd={R(){if(!cl(zd))return zd;if(zd=!0,al(ko))zd=!1;else try{var e="__support__";qd.N(e,"xyz"),'"xyz"'!==qd.A(e)&&(zd=!1),qd.q(e)}catch(ko){zd=!1}
2return zd},D(e){iu.error("sessionStorage error: ",e)},A(e){try{return null==ko?void 0:ko.sessionStorage.getItem(e)}catch(ko){qd.D(ko)}return null},F(e){try{return JSON.parse(qd.A(e))||null}catch(e){}return null},N(e,t){try{null==ko||ko.sessionStorage.setItem(e,JSON.stringify(t))}catch(ko){qd.D(ko)}},q(e){try{null==ko||ko.sessionStorage.removeItem(e)}catch(ko){qd.D(ko)}}};class Wd{constructor(e){this._instance=e}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===sd||this.isRejected()||-1===this.consent&&this.qt.cookieless_mode===id}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.qt.opt_out_capturing_by_default}optInOut(e){this.nr.N(this.sr,e?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:n}=this._instance.config;return n||(t?t+e:"__ph_opt_in_out_"+e)}get ir(){var e=this.nr.A(this.sr);return vl(e)?1:Jo(bl,e)?0:-1}get nr(){var e=this.qt.opt_out_capturing_persistence_type,t="localStorage"===e?Dd:Ld;if(!this.ar||this.ar!==t){this.ar=t;var n="localStorage"===e?Ld:Dd;n.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(vl(n.A(this.sr))),n.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[null==So?void 0:So.doNotTrack,null==So?void 0:So.msDoNotTrack,Io.doNotTrack].some(e=>vl(e))}}var Hd=su("[Dead Clicks]"),Kd=()=>!0,Vd=e=>{var t,n=!(null==(t=e.instance.persistence)||!t.get_property(xu)),r=e.instance.config.capture_dead_clicks;return pl(r)?r:!!il(r)||n};class $d{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[xu]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(e){var t,n;null!=(t=Io.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?Hd.error("failed to load script",t):e()})}hr(){var e;if(Eo){if(!this.ur&&null!=(e=Io.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=il(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ur=Io.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ur.start(Eo),Hd.info("starting...")}}else Hd.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,Hd.info("stopping..."))}}var Yd=su("[SegmentIntegration]"),Gd="posthog-js";function Jd(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:a=!0}=void 0===t?{}:t;return t=>{var o,l,c,u,d;if("*"!==s&&!s.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p,f=(null==(o=t.exception)?void 0:o.values)||[],m=f.map(e=>Fo({},e,{stacktrace:e.stacktrace?Fo({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>Fo({},e,{platform:"web:javascript"}))}):void 0})),g={$exception_message:(null==(l=f[0])?void 0:l.value)||t.message,$exception_type:null==(c=f[0])?void 0:c.type,$exception_level:t.level,$exception_list:m,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(u=f[0])?void 0:u.value)||t.message,$sentry_exception_type:null==(d=f[0])?void 0:d.type,$sentry_tags:t.tags};return n&&r&&(g.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+t.event_id),a&&(null==(p=e.exceptions)||p.sendExceptionEvent(g)),t}}class Zd{constructor(e,t,n,r,i,s){this.name=Gd,this.setupOnce=function(a){a(Jd(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==s||s}))}}}
vendor: 5,037 bytes, line 2
2class Qd{constructor(e){this.cr=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength)&&(iu.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:n}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.vr()}vr(){var e;this.pr=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.cr)}destroy(){var e;null==(e=this.pr)||e.call(this),this.pr=void 0}doPageView(e,t){var n,r=this.gr(e,t);return this.dr={pathname:null!==(n=null==ko?void 0:ko.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.gr(e,null==(t=this.dr)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.dr)?void 0:e.pageViewId}}gr(e,t){var n=this.dr;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:s,lastScrollY:a,maxScrollY:o,maxContentHeight:l,lastContentY:c,maxContentY:u}=i;if(!(al(s)||al(a)||al(o)||al(l)||al(c)||al(u))){s=Math.ceil(s),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var d=s>1?wl(a/s,0,1,iu):1,h=s>1?wl(o/s,0,1,iu):1,p=l>1?wl(c/l,0,1,iu):1,f=l>1?wl(u/l,0,1,iu):1;r=yd(r,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:f})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}}var Xd={[lu]:{exposure:"hidden"},[uu]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[du]:{exposure:"hidden"},[hu]:{exposure:"event"},[pu]:{exposure:"hidden"},[fu]:{exposure:"event"},[mu]:{exposure:"hidden"},[gu]:{exposure:"event"},[yu]:{exposure:"event"},[xu]:{exposure:"event"},[vu]:{exposure:"hidden"},[bu]:{exposure:"event"},[wu]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Su]:{exposure:"hidden"},[Eu]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[Au]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!il(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[Cu]:{exposure:"event"},[Mu]:{exposure:"hidden"},[Tu]:{exposure:"hidden"},[Pu]:{exposure:"event"},[Ou]:{exposure:"event"},[Iu]:{exposure:"event"},[Lu]:{exposure:"hidden"},[Ru]:{exposure:"hidden"},[Du]:{exposure:"hidden"},[Bu]:{exposure:"hidden"},[Fu]:{exposure:"event"},[Uu]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[zu]:{exposure:"hidden"},[qu]:{exposure:"hidden"},[Wu]:{exposure:"hidden"},[Hu]:{exposure:"hidden"},[Ku]:{exposure:"hidden"},[Vu]:{exposure:"hidden"},[$u]:{exposure:"hidden"},[Yu]:{exposure:"hidden"},[Gu]:{exposure:"hidden"},[Ju]:{exposure:"hidden"},[Zu]:{exposure:"hidden"},[_u]:{exposure:"event"},[ju]:{exposure:"event"},[ku]:{exposure:"event"},[Nu]:{exposure:"event"},[ed]:{exposure:"event"},[td]:{exposure:"event"},[nd]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},eh=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],th=e=>{var t=null==Eo?void 0:Eo.createElement("a");return al(t)?null:(t.href=e,t)},nh=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var s=r[i].split("=");if(s[0]===t){n=s;break}}if(!nl(n)||2>n.length)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){iu.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},rh=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],s=(r[0]||"").split("?"),a=s[1],o=s[0],l=(a||"").split("&"),c=[],u=0;l.length>u;u++){var d=l[u].split("=");nl(d)&&(t.includes(d[0])?c.push(d[0]+"="+n):c.push(l[u]))}var h=o;return null!=a&&(h+="?"+c.join("&")),null!=i&&(h+="#"+i),h},ih=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));
2return n?n[1]:null},sh="https?://(.*)",ah=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],oh=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...ah],lh="<masked>",ch=["li_fat_id"];function uh(e,t,n){if(!Eo)return{};var r,i=t?[...ah,...n||[]]:[],s=dh(rh(Eo.URL,i,lh),e),a=(r={},gd(ch,function(e){var t=Ld.A(e);r[e]=t||null}),r);return yd(a,s)}function dh(e,t){var n=oh.concat(t||[]),r={};return gd(n,function(t){var n=nh(e,t);r[t]=n||null}),r}function hh(e){var t=function(e){return e?0===e.search(sh+"google.([^/?]*)")?"google":0===e.search(sh+"bing.com")?"bing":0===e.search(sh+"yahoo.com")?"yahoo":0===e.search(sh+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!cl(t)){r.$search_engine=t;var i=Eo?nh(Eo.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function ph(){return navigator.language||navigator.userLanguage}var fh="$direct";function mh(){return(null==Eo?void 0:Eo.referrer)||fh}function gh(e,t){var n=e?[...ah,...t||[]]:[],r=null==Ao?void 0:Ao.href.substring(0,1e3);return{r:mh().substring(0,1e3),u:r?rh(r,n,lh):void 0}}function yh(e){var t,{r:n,u:r}=e,i={$referrer:n,$referring_domain:null==n?void 0:n==fh?fh:null==(t=th(n))?void 0:t.host};if(r){i.$current_url=r;var s=th(r);i.$host=null==s?void 0:s.host,i.$pathname=null==s?void 0:s.pathname;var a=dh(r);yd(i,a)}if(n){var o=hh(n);yd(i,o)}return i}function xh(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(ko){return}}function vh(){try{return(new Date).getTimezoneOffset()}catch(ko){return}}var bh=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class wh{constructor(e,t){this.qt=e,this.props={},this.mr=!1,this.yr=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.nr=this.br(e),this.load(),e.debug&&iu.info("Persistence loaded",e.persistence,Fo({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this._r}br(e){-1===bh.indexOf(e.persistence.toLowerCase())&&(iu.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=function(e){void 0===e&&(e=[]);var t=[...Bd,...e];return Fo({},Dd,{F(e){try{var t={};try{t=Ld.F(e)||{}}catch(e){}var n=yd(t,JSON.parse(Dd.A(e)||"{}"));return Dd.N(e,n),n}catch(e){}return null},N(e,n,r,i,s,a){try{Dd.N(e,n,void 0,void 0,a);var o={};t.forEach(e=>{n[e]&&(o[e]=n[e])}),Object.keys(o).length&&Ld.N(e,o,r,i,s,a)}catch(e){Dd.D(e)}},q(e,t){try{null==ko||ko.localStorage.removeItem(e),Ld.q(e,t)}catch(ko){Dd.D(ko)}}})}(e.cookie_persisted_properties||[]),n=e.persistence.toLowerCase();return"localstorage"===n&&Dd.R()?Dd:"localstorage+cookie"===n&&t.R()?t:"sessionstorage"===n&&qd.R()?qd:"memory"===n?Ud:"cookie"===n?Ld:t.R()?t:Ld}wr(e){var t=null!=e?e:this.qt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[Hu];return!n||"number"!=typeof n||Date.now()-n>t}properties(){var e={};return gd(this.props,(t,n)=>{var r=(e=>{var t=Xd[e];if(t)return t;for(var[n,r]of eh)if(0===e.indexOf(n))return r})(n);if("derived"===(null==r?void 0:r.exposure)){if(null!=r.shouldSkipFromEventProperties&&r.shouldSkipFromEventProperties(t,n===Au?()=>this.wr():()=>!1))return;r.transformToEventProperties&&yd(e,r.transformToEventProperties(t))}else r&&"event"!==r.exposure||(e[n]=t)}),e}load(){if(!this._r){var e=this.nr.F(this.yr);e&&(this.props=yd({},e))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(e,t,n){if(il(e)){al(t)&&(t="None"),this.Sr=al(n)?this.Ir:n;var r=!1;if(gd(e,(e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.Tr(n,e),r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(il(e)){this.Sr=al(t)?this.Ir:t;var n=!1;if(gd(e,(t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.Tr(r,t),n=!0)}),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Er(e),this.save())}update_campaign_params(){if(!this.mr){var e=uh(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);sl(wd(e))||this.register(e),this.mr=!0}}update_search_keyword(){var e;this.register((e=null==Eo?void 0:Eo.referrer)?hh(e):{})}update_referrer_info(){var e;this.register_once({$referrer:mh(),$referring_domain:null!=Eo&&Eo.referrer&&(null==(e=th(Eo.referrer))?void 0:e.host)||fh},void 0)}set_initial_person_info(){this.props[Yu]||this.props[Gu]||this.register_once({[Ju]:gh(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};gd([Gu,Yu],t=>{var n=this.props[t];n&&gd(n,function(t,n){e["$initial_"+Qo(n)]=t})});var t,n,r=this.props[Ju];if(r){var i=(t=yh(r),n={},gd(t,function(e,t){n["$initial_"+Qo(t)]=e}),n);yd(e,i)}return e}
2safe_merge(e){return gd(this.props,function(t,n){n in e||(e[n]=t)}),e}update_config(e,t,n){if(this.Ir=this.Sr=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var n=[...e].sort(),r=[...t].sort();return n.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this.br(e),i=this.props;this.clear(),this.nr=r,this.props=i,this.save()}}set_disabled(e){this._r=e,this._r?this.remove():this.save()}set_cross_subdomain(e){e!==this.kr&&(this.kr=e,this.remove(),this.save())}set_secure(e){e!==this.Cr&&(this.Cr=e,this.remove(),this.save())}set_event_timer(e,t){var n=this.props[du]||{};n[e]=t,this.Tr(du,n),this.save()}remove_event_timer(e){var t=this.props[du]||{},n=t[e];return al(n)||(delete t[e],this.Tr(du,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.Tr(e,t),this.save()}Tr(e,t){this.props[e]=t}Er(e){delete this.props[e]}}var _h="events",jh="cancelEvents",kh="popover",Nh="api",Sh="widget",Eh="survey shown",Ah="survey dismissed",Ch="survey sent",Mh="$survey_id",Th="$survey_iteration",Ph="$survey_last_seen_date",Oh="popover",Ih="inline",Lh="product tour shown",Rh="$product_tour_last_seen_date",Dh="$product_tour_type",Bh=su("[RateLimiter]");class Fh{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{Bh.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void Bh.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t,n,r;void 0===e&&(e=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:s}=this,a=(new Date).getTime(),o=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property($u))&&void 0!==t?t:{tokens:i,last:a};o.tokens+=(a-o.last)/1e3*s,o.last=a,o.tokens>i&&(o.tokens=i);var l=1>o.tokens;return l||e||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+s+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(r=this.instance.persistence)||r.set_property($u,o),{isRateLimited:l,remainingTokens:o.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var Uh=su("[RemoteConfig]");class zh{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=Io._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Mr(e){var t,n;null!=(t=Io.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Pr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return Uh.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void Uh.warn("Remote config is disabled. Falling back to local config.");this.Mr(e=>{if(!e)return Uh.info("No config found after loading remote JS config. Falling back to JSON."),void this.Pr(e=>{this.Rr(e),this.Or()});this.Rr(e),this.Or()})}catch(ko){Uh.error("Error loading remote config",ko)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}
vendor: 3,859 bytes, line 2
2refresh(){!this._instance.Lr()&&Eo&&"hidden"!==Eo.visibilityState&&this._instance.reloadFeatureFlags()}Or(){var e;if(!this.Fr){var t=null!==(e=this._instance.config.remote_config_refresh_interval_ms)&&void 0!==e?e:3e5;0!==t&&(this.Fr=setInterval(()=>{this.refresh()},t))}}Rr(e){var t;e||Uh.error("Failed to fetch remote config from PostHog."),this._instance.Rr(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var qh="gzip-js",Wh="base64",Hh=Uint8Array,Kh=Uint16Array,Vh=Uint32Array,$h=new Hh([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]),Yh=new Hh([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]),Gh=new Hh([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Jh=function(e,t){for(var n=new Kh(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new Vh(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)i[s]=s-n[r]<<5|r;return[n,i]},Zh=Jh($h,2),Qh=Zh[1];Zh[0][28]=258,Qh[258]=28;for(var Xh=Jh(Yh,0)[1],ep=new Kh(32768),tp=0;32768>tp;++tp){var np=(43690&tp)>>>1|(21845&tp)<<1;ep[tp]=((65280&(np=(61680&(np=(52428&np)>>>2|(13107&np)<<2))>>>4|(3855&np)<<4))>>>8|(255&np)<<8)>>>1}var rp=function(e,t,n){for(var r=e.length,i=0,s=new Kh(t);r>i;++i)++s[e[i]-1];var a,o=new Kh(t);for(i=0;t>i;++i)o[i]=o[i-1]+s[i-1]<<1;if(n){a=new Kh(1<<t);var l=15-t;for(i=0;r>i;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,h=d|(1<<u)-1;h>=d;++d)a[ep[d]>>>l]=c}else for(a=new Kh(r),i=0;r>i;++i)a[i]=ep[o[e[i]-1]++]>>>15-e[i];return a},ip=new Hh(288);for(tp=0;144>tp;++tp)ip[tp]=8;for(tp=144;256>tp;++tp)ip[tp]=9;for(tp=256;280>tp;++tp)ip[tp]=7;for(tp=280;288>tp;++tp)ip[tp]=8;var sp=new Hh(32);for(tp=0;32>tp;++tp)sp[tp]=5;var ap=rp(ip,9,0),op=rp(sp,5,0),lp=function(e){return(e/8|0)+(7&e&&1)},cp=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Kh?Kh:e instanceof Vh?Vh:Hh)(n-t);return r.set(e.subarray(t,n)),r},up=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},dp=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},hp=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new Hh(0),0];if(1==i){var a=new Hh(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var o=n[0],l=n[1],c=0,u=1,d=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=i-1;)o=n[n[d].f>n[c].f?c++:d++],l=n[c!=u&&n[d].f>n[c].f?c++:d++],n[u++]={s:-1,f:o.f+l.f,l:o,r:l};var h=s[0].s;for(r=1;i>r;++r)s[r].s>h&&(h=s[r].s);var p=new Kh(h+1),f=pp(n[u-1],p,0);if(f>t){r=0;var m=0,g=f-t,y=1<<g;for(s.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i>r;++r){var x=s[r].s;if(t>=p[x])break;m+=y-(1<<f-p[x]),p[x]=t}for(m>>>=g;m>0;){var v=s[r].s;t>p[v]?m-=1<<t-p[v]++-1:++r}for(;r>=0&&m;--r){var b=s[r].s;p[b]==t&&(--p[b],++m)}f=t}return[new Hh(p),f]},pp=function(e,t,n){return-1==e.s?Math.max(pp(e.l,t,n+1),pp(e.r,t,n+1)):t[e.s]=n},fp=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Kh(++t),r=0,i=e[0],s=1,a=function(e){n[r++]=e},o=1;t>=o;++o)if(e[o]==i&&o!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[o]}return[n.subarray(0,r),t]},mp=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},gp=function(e,t,n){var r=n.length,i=lp(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;r>s;++s)e[i+s+4]=n[s];return 8*(i+4+r)},yp=function(e,t,n,r,i,s,a,o,l,c,u){up(t,u++,n),++i[256];for(var d=hp(i,15),h=d[0],p=d[1],f=hp(s,15),m=f[0],g=f[1],y=fp(h),x=y[0],v=y[1],b=fp(m),w=b[0],_=b[1],j=new Kh(19),k=0;x.length>k;++k)j[31&x[k]]++;for(k=0;w.length>k;++k)j[31&w[k]]++;for(var N=hp(j,7),S=N[0],E=N[1],A=19;A>
vendor: 4,229 bytes, line 2
24&&!S[Gh[A-1]];--A);var C,M,T,P,O=c+5<<3,I=mp(i,ip)+mp(s,sp)+a,L=mp(i,h)+mp(s,m)+a+14+3*A+mp(j,S)+(2*j[16]+3*j[17]+7*j[18]);if(I>=O&&L>=O)return gp(t,u,e.subarray(l,l+c));if(up(t,u,1+(I>L)),u+=2,I>L){C=rp(h,p,0),M=h,T=rp(m,g,0),P=m;var R=rp(S,E,0);for(up(t,u,v-257),up(t,u+5,_-1),up(t,u+10,A-4),u+=14,k=0;A>k;++k)up(t,u+3*k,S[Gh[k]]);u+=3*A;for(var D=[x,w],B=0;2>B;++B){var F=D[B];for(k=0;F.length>k;++k)up(t,u,R[U=31&F[k]]),u+=S[U],U>15&&(up(t,u,F[k]>>>5&127),u+=F[k]>>>12)}}else C=ap,M=ip,T=op,P=sp;for(k=0;o>k;++k)if(r[k]>255){var U;dp(t,u,C[257+(U=r[k]>>>18&31)]),u+=M[U+257],U>7&&(up(t,u,r[k]>>>23&31),u+=$h[U]);var z=31&r[k];dp(t,u,T[z]),u+=P[z],z>3&&(dp(t,u,r[k]>>>5&8191),u+=Yh[z])}else dp(t,u,C[r[k]]),u+=M[r[k]];return dp(t,u,C[256]),u+M[256]},xp=new Vh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vp=function(){for(var e=new Vh(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),bp=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var wp=!!Mo||!!Co,_p="text/plain",jp=!1,kp=function(e,t,n){var r;void 0===n&&(n=!0);var[i,s]=e.split("?"),a=Fo({},t),o=null!==(r=null==s?void 0:s.split("&").map(e=>{var t,[r,i]=e.split("="),s=n&&null!==(t=a[r])&&void 0!==t?t:i;return delete a[r],r+"="+s}))&&void 0!==r?r:[],l=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return gd(e,function(e,t){al(e)||al(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)}),i.join(t)}(a);return l&&o.push(l),i+"?"+o.join("&")},Np=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),Sp=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===qh){var r=function(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=vp[255&n^t[r]]^n>>>8;e=n},d:()=>4294967295^e}}(),r=e.length;n.p(e);var i,s,a,o,l=(o=10+((i=t).filename&&i.filename.length+1||0),function(e,t,n,r){var i=e.length,s=new Hh(r+i+5*(1+Math.floor(i/7e3))+8),a=s.subarray(r,s.length-8),o=0;if(!t||8>i)for(var l=0;i>=l;l+=65535){var c=l+65535;i>c?o=gp(a,o,e.subarray(l,c)):(a[l]=!0,o=gp(a,o,e.subarray(l,i)))}else{for(var u=xp[t-1],d=u>>>13,h=8191&u,p=(1<<n)-1,f=new Kh(32768),m=new Kh(p+1),g=Math.ceil(n/3),y=2*g,x=function(t){return(e[t]^e[t+1]<<g^e[t+2]<<y)&p},v=new Vh(25e3),b=new Kh(288),w=new Kh(32),_=0,j=0,k=(l=0,0),N=0,S=0;i>l;++l){var E=x(l),A=32767&l,C=m[E];if(f[A]=C,m[E]=A,l>=N){var M=i-l;if((_>7e3||k>24576)&&M>423){o=yp(e,a,0,v,b,w,j,k,S,l-S,o),k=_=j=0,S=l;for(var T=0;286>T;++T)b[T]=0;for(T=0;30>T;++T)w[T]=0}var P=2,O=0,I=h,L=A-C&32767;if(M>2&&E==x(l-L))for(var R=Math.min(d,M)-1,D=Math.min(32767,l),B=Math.min(258,M);D>=L&&--I&&A!=C;){if(e[l+P]==e[l+P-L]){for(var F=0;B>F&&e[l+F]==e[l+F-L];++F);if(F>P){if(P=F,O=L,F>R)break;var U=Math.min(L,F-2),z=0;for(T=0;U>T;++T){var q=l-L+T+32768&32767,W=q-f[q]+32768&32767;W>z&&(z=W,C=q)}}}L+=(A=C)-(C=f[A])+32768&32767}if(O){v[k++]=268435456|Qh[P]<<18|Xh[O];var H=31&Qh[P],K=31&Xh[O];j+=$h[H]+Yh[K],++b[257+H],++w[K],N=l+P,++_}else v[k++]=e[l],++b[e[l]]}}o=yp(e,a,!0,v,b,w,j,k,S,l-S,o)}return cp(s,0,r+lp(o)+8)}(s=e,null==(a=t).level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+a.mem,o)),c=l.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&bp(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(l,t),bp(l,c-8,n.d()),bp(l,c-4,r),l}(function(e){var t=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new Hh(e.length+(e.length>>>1)),r=0,i=function(e){n[r++]=e},s=0;t>s;++s){if(r+5>n.length){var a=new Hh(r+8+(t-s<<1));a.set(n),n=a}var o=e.charCodeAt(s);128>o?i(o):2048>o?(i(192|o>>>6),i(128|63&o)):o>55295&&57344>o?(i(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++s))>>>18),i(128|o>>>12&63),i(128|o>>>6&63),i(128|63&o)):(i(224|o>>>12),i(128|o>>>6&63),i(128|63&o))}return cp(n,0,r)}(Np(t)),{mtime:0});return{contentType:_p,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===Wh){var i=function(e){return e?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>
2String.fromCharCode(parseInt(t,16)))):e}(Np(t)),s=(e=>"data="+encodeURIComponent("string"==typeof e?e:Np(e)))(i);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var a=Np(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Ep=function(){var e=Bo(function*(e){var t=Np(e.data),n=yield function(e,t,n){return Vo.apply(this,arguments)}(t,Ro.DEBUG,{rethrow:!0});if(!n)return e;var r=yield n.arrayBuffer();return Fo({},e,{tr:{contentType:_p,body:r,estimatedSize:r.byteLength}})});return function(t){return e.apply(this,arguments)}}(),Ap=(e,t)=>kp(e,{_:(new Date).getTime().toString(),ver:Ro.JS_SDK_VERSION,compression:t}),Cp=[];Co&&Cp.push({transport:"fetch",method(e){var t,n,{contentType:r,body:i,estimatedSize:s}=null!==(t=Sp(e))&&void 0!==t?t:{},a=new Headers;gd(e.headers,function(e,t){a.append(t,e)}),r&&a.append("Content-Type",r);var o=e.url,l=null;if(To){var c=new To;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}Co(o,Fo({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(s||0),body:i,signal:null==(n=l)?void 0:n.signal},e.fetchOptions)).then(t=>t.text().then(n=>{var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){iu.error(e)}null==e.callback||e.callback(r)})).catch(t=>{iu.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),Mo&&Cp.push({transport:"XHR",method(e){var t,n=new Mo;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:i}=null!==(t=Sp(e))&&void 0!==t?t:{};gd(e.headers,function(e,t){n.setRequestHeader(t,e)}),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(e){}null==e.callback||e.callback(t)}},n.send(i)}}),null!=So&&So.sendBeacon&&Cp.push({transport:"sendBeacon",method(e){var t=kp(e.url,{beacon:"1"});try{var n,{contentType:r,body:i}=null!==(n=Sp(e))&&void 0!==n?n:{};if(!i)return;var s=i instanceof Blob?i:new Blob([i],{type:r});So.sendBeacon(t,s)}catch(e){}}});var Mp=3e3;class Tp{constructor(e,t){this.Ar=!0,this.Nr=[],this.$r=wl((null==t?void 0:t.flush_interval_ms)||Mp,250,5e3,iu.createLogger("flush interval"),Mp),this.Dr=e}enqueue(e){this.Nr.push(e),this.qr||this.jr()}unload(){this.Hr();var e=this.Nr.length>0?this.Ur():{},t=Object.values(e);[...t.filter(e=>0===e.url.indexOf("/e")),...t.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Dr(Fo({},e,{transport:"sendBeacon"}))})}enable(){this.Ar=!1,this.jr()}jr(){var e=this;this.Ar||(this.qr=setTimeout(()=>{if(this.Hr(),this.Nr.length>0){var t=this.Ur(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&nl(n.data)&&gd(n.data,e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp}),e.Dr(n)};for(var r in t)n()}},this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var e={};return gd(this.Nr,t=>{var n,r=t,i=(r?r.batchKey:null)||r.url;al(e[i])&&(e[i]=Fo({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)}),this.Nr=[],e}}var Pp=["retriesPerformedSoFar"];class Op{constructor(e){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=e,this.Nr=[],this.Vr=!0,!al(ko)&&"onLine"in ko.navigator&&(this.Vr=ko.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},kd(ko,"online",this.Wr),kd(ko,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,n=Uo(e,Pp);hl(t)&&(n.url=kp(n.url,{retry_count:t})),this._instance._send_request(Fo({},n,{callback:e=>{200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=t?t:0)>=10?null==n.callback||n.callback(e):this.Qr(Fo({retriesPerformedSoFar:t},n))}}))}Qr(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=Math.random()-.5;return Math.ceil(r+i*(r-n))}(t),r=Date.now()+n;this.Nr.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),iu.warn(i),this.Br||(this.Br=!0,this.Jr())}
vendor: 4,891 bytes, line 2
2Jr(){if(this.Kr&&clearTimeout(this.Kr),0===this.Nr.length)return this.Br=!1,void(this.Kr=void 0);this.Kr=setTimeout(()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()},this.zr)}Zr(){var e=Date.now(),t=[],n=this.Nr.filter(n=>e>n.retryAt||(t.push(n),!1));if(this.Nr=t,n.length>0)for(var{requestOptions:r}of n)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,al(ko)||(this.Wr&&(ko.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(ko.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(Fo({},e,{transport:"sendBeacon"}))}catch(ko){iu.error(ko)}this.Nr=[]}}class Ip{constructor(e){this.Yr=()=>{var e,t,n,r;this.Xr||(this.Xr={});var i=this.scrollElement(),s=this.scrollY(),a=i?Math.max(0,i.scrollHeight-i.clientHeight):0,o=s+((null==i?void 0:i.clientHeight)||0),l=(null==i?void 0:i.scrollHeight)||0;this.Xr.lastScrollY=Math.ceil(s),this.Xr.maxScrollY=Math.max(s,null!==(e=this.Xr.maxScrollY)&&void 0!==e?e:0),this.Xr.maxScrollHeight=Math.max(a,null!==(t=this.Xr.maxScrollHeight)&&void 0!==t?t:0),this.Xr.lastContentY=o,this.Xr.maxContentY=Math.max(o,null!==(n=this.Xr.maxContentY)&&void 0!==n?n:0),this.Xr.maxContentHeight=Math.max(l,null!==(r=this.Xr.maxContentHeight)&&void 0!==r?r:0)},this._instance=e}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var e=this.Xr;return setTimeout(this.Yr,0),e}startMeasuringScrollPosition(){kd(ko,"scroll",this.Yr,{capture:!0}),kd(ko,"scrollend",this.Yr,{capture:!0}),kd(ko,"resize",this.Yr)}scrollElement(){if(!this.ei)return null==ko?void 0:ko.document.documentElement;var e=nl(this.ei)?this.ei:[this.ei];for(var t of e){var n=null==ko?void 0:ko.document.querySelector(t);if(n)return n}}scrollY(){if(this.ei){var e=this.scrollElement();return e&&e.scrollTop||0}return ko&&(ko.scrollY||ko.pageYOffset||ko.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var e=this.scrollElement();return e&&e.scrollLeft||0}return ko&&(ko.scrollX||ko.pageXOffset||ko.document.documentElement.scrollLeft)||0}}var Lp=e=>gh(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class Rp{constructor(e,t,n,r){this.ti=e=>{var t=this.ri();if(!t||t.sessionId!==e){var n={sessionId:e,props:this.ii(this._instance)};this.ni.register({[Vu]:n})}},this._instance=e,this.si=t,this.ni=n,this.ii=r||Lp,this.si.onSessionId(this.ti)}ri(){return this.ni.props[Vu]}getSetOnceProps(){var e,t=null==(e=this.ri())?void 0:e.props;return t?"r"in t?yh(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return gd(wd(this.getSetOnceProps()),(t,n)=>{"$current_url"===n&&(n="url"),e["$session_entry_"+Qo(n)]=t}),e}}class Dp{constructor(){this.oi={}}on(e,t){return this.oi[e]||(this.oi[e]=[]),this.oi[e].push(t),()=>{this.oi[e]=this.oi[e].filter(e=>e!==t)}}emit(e,t){for(var n of this.oi[e]||[])n(t);for(var r of this.oi["*"]||[])r(e,t)}}var Bp=su("[SessionId]");class Fp{on(e,t){return this.ai.on(e,t)}constructor(e,t,n){var r;if(this.ui=[],this.li=void 0,this.ai=new Dp,this.hi=(e,t)=>!(!hl(e)||!hl(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===sd)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=e.config,this.ni=e.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=t||Td,this.fi=n||Td;var i=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*wl(this.qt.session_idle_timeout_seconds||1800,60,36e3,Bp.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+i+"_window_id",this.mi="ph_"+i+"_primary_window_exists",this.yi()){var s=qd.F(this.gi),a=qd.F(this.mi);s&&!a?this.ci=s:qd.q(this.gi),qd.N(this.mi,!0)}if(null!=(r=this.qt.bootstrap)&&r.sessionID)try{var o=(()=>{var e=this.qt.bootstrap.sessionID.replace(/-/g,"");if(32!==e.length)throw new Error("Not a valid UUID");if("7"!==e[12])throw new Error("Not a UUIDv7");return parseInt(e.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,(new Date).getTime(),o)}catch(e){Bp.error("Invalid sessionID in bootstrap",e)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return al(this.ui)&&(this.ui=[]),this.ui.push(e),this.di&&e(this.di,this.ci),()=>{this.ui=this.ui.filter(t=>t!==e)}}yi(){return"memory"!==this.qt.persistence&&!this.ni._r&&qd.R()}xi(e){e!==this.ci&&(this.ci=e,this.yi()&&qd.N(this.gi,e))}Si(){return this.ci?this.ci:this.yi()?qd.F(this.gi):null}
2bi(e,t,n){e===this.di&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.di=e,this.ni.register({[Su]:[t,e,n]}))}ki(){var e=this.ni.props[Su];return nl(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&ko&&(ko.removeEventListener(ud,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&qd.q(this.mi)},kd(ko,ud,this.li,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.qt.cookieless_mode===sd)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),[r,i,s]=this.ki(),a=this.Si(),o=hl(s)&&Math.abs(n-s)>864e5,l=!1,c=!i,u=!c&&!e&&this.hi(n,r);c||u||o?(i=this.vi(),a=this.fi(),Bp.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}}),s=n,l=!0):a||(a=this.fi(),l=!0);var d=hl(r)&&e&&!o?r:n,h=hl(s)?s:(new Date).getTime();return this.xi(a),this.bi(i,d,h),e||this.pi(),l&&this.ui.forEach(e=>e(i,a,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:h,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:r}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout(()=>{var[e]=this.ki();if(this.hi((new Date).getTime(),e)){var t=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var Up=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Yo(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>Yo(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},zp=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function qp(e,t,n){return Np({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var Wp={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>zp(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!zp(t,e))),icontains:(e,t)=>t.map(Hp).some(t=>e.map(Hp).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(Hp).every(t=>e.map(Hp).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})},Hp=e=>e.toLowerCase();function Kp(e,t){return!e||Object.entries(e).every(e=>{var[n,r]=e,i=null==t?void 0:t[n];if(al(i)||cl(i))return!1;var s=[String(i)],a=Wp[r.operator];return!!a&&a(r.values,s)})}var Vp="custom",$p="i.posthog.com",Yp=/^\/static\//;class Gp{constructor(e){this.Ii={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+$p,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Vp),this.Ii[this.apiHost]}Ti(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&Yp.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var n=this.Ti(t);if(n)return""+n+t}if(this.region===Vp)return this.apiHost+t;var r=$p+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var Jp=su("[Surveys]"),Zp="seenSurvey_",Qp=[kh,Sh,Nh],Xp={ignoreConditions:!1,ignoreDelay:!1,displayType:Oh}
2,ef=su("[PostHog ExternalIntegrations]"),tf={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class nf{constructor(e){this._instance=e}lr(e,t){var n;null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,e=>{if(e)return ef.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e=this,t=function(t){var n,i,s;!r||null!=(n=Io.__PosthogExtensions__)&&null!=(n=n.integrations)&&n[t]||e.lr(tf[t],()=>{var n;null==(n=Io.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[t])||n.start(e._instance)}),!r&&null!=(i=Io.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[t]&&(null==(s=Io.__PosthogExtensions__)||null==(s=s.integrations)||null==(s=s[t])||s.stop())};for(var[n,r]of Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{})){var i;t(n)}}}var rf,sf={},af=0,of=()=>{},lf='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',cf="Surveys module not available",uf="sanitize_properties is deprecated. Use before_send instead",df="Invalid value for property_denylist config: ",hf="posthog",pf=!wp&&-1===(null==Oo?void 0:Oo.indexOf("MSIE"))&&-1===(null==Oo?void 0:Oo.indexOf("Mozilla")),ff=e=>{var t;return Fo({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:jd(null==Eo?void 0:Eo.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:of,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:Ao&&ol(null==Ao?void 0:Ao.search)&&-1!==Ao.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==ko||null==(t=ko.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){iu.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:ld,before_send:void 0,request_queue_config:{flush_interval_ms:Mp},error_tracking:{},_onCapture:of,__preview_eager_load_replay:!1},(e=>({rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},mf=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],gf=e=>{var t={};for(var[n,r]of mf)al(e[n])||(t[r]=e[n]);var i=yd({},t,e);return nl(e.property_blacklist)&&(al(e.property_denylist)?i.property_denylist=e.property_blacklist:nl(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:iu.error(df+e.property_denylist)),i};class yf{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(e){iu.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class xf{Mi(e,t){if(e){var n=this.Pi.indexOf(e);-1!==n&&this.Pi.splice(n,1)}return this.Pi.push(t),null==t.initialize||t.initialize(),t}Ri(){return this.config.cookieless_mode===sd||this.config.cookieless_mode===id&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}get flagsEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}constructor(){var e;this.webPerformance=new yf,this.Oi=!1,this.version=Ro.LIB_VERSION,this.Li=new Dp,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=ff(),this.SentryIntegration=Zd,this.sentryIntegration=e=>function(e,t){var n=Jd(e,t);return{name:Gd,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new Ip(this),this.pageViewM
2anager=new Qd(this),this.rateLimiter=new Fh(this),this.requestRouter=new Gp(this),this.consent=new Wd(this),this.externalIntegrations=new nf(this);var t=null!==(e=xf.__defaultExtensionClasses)&&void 0!==e?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{var r=ol(e)?{[e]:t}:e;this.setPersonProperties(r),null==n||n({})},set_once:(e,t,n)=>{var r=ol(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==n||n({})}},this.on("eventCaptured",e=>iu.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,n){if(n&&n!==hf){var r,i=null!==(r=sf[n])&&void 0!==r?r:new xf;return i._init(e,t,n),sf[n]=i,sf[hf][n]=i,i}return this._init(e,t,n)}_init(e,t,n){var r,i;if(void 0===t&&(t={}),al(e)||ll(e))return iu.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.Di(t.debug),this.qi=t,this.ji=[],t.person_profiles?this.Ni=t.person_profiles:t.process_person&&(this.Ni=t.process_person),this.set_config(yd({},ff(t.defaults),gf(t),{name:n,token:e})),this.config.on_xhr_error&&iu.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:qh;var s=this.Hi();this.persistence=new wh(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new wh(Fo({},this.config,{persistence:"sessionStorage"}),s);var a=Fo({},this.persistence.props),o=Fo({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ui=new Tp(e=>this.Bi(e),this.config.request_queue_config),this.zi=new Op(this),this.__request_queue=[];var l=this.Ri();if(l||(this.sessionManager=new Fp(this),this.sessionPropsManager=new Rp(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(iu.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(l)},0)):(iu.info("Initializing extensions synchronously"),this.Vi(l)),Ro.DEBUG=Ro.DEBUG||this.config.debug,Ro.DEBUG&&iu.info("Starting in debug mode",{this:this,config:t,thisC:Fo({},this.config),p:a,s:o}),!this.config.identity_distinct_id||null!=(r=t.bootstrap)&&r.distinctID||(t.bootstrap=Fo({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(i=t.bootstrap)?void 0:i.distinctID)){var c=t.bootstrap.distinctID,u=this.get_distinct_id(),d=this.persistence.get_property(Ku);if(t.bootstrap.isIdentifiedID&&null!=u&&u!==c&&d===ad)this.identify(c);else if(t.bootstrap.isIdentifiedID&&null!=u&&u!==c&&d===od)iu.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var h=this.config.get_device_id(Td()),p=t.bootstrap.isIdentifiedID?h:c;this.persistence.set_property(Ku,t.bootstrap.isIdentifiedID?od:ad),this.register({distinct_id:c,$device_id:p})}}if(l)this.register_once({distinct_id:Xu,$device_id:null},"");else if(!this.get_distinct_id()){var f=this.config.get_device_id(Td());this.register_once({distinct_id:f,$device_id:f},""),this.persistence.set_property(Ku,ad)}return kd(ko,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var n=e.config.segment;if(!n)return t();!function(e,t){var n=e.config.segment;if(!n)return t();var r=n=>{var r=()=>n.anonymousId()||Td();e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(Ku,od)),t()},i=n.user();"then"in i&&rl(i.then)?i.then(r):r(i)}(e,()=>{n.register((e=>{Promise&&Promise.resolve||Yd.warn("This browser does not have Promise support, and can not use the segment integration");var t=(t,n)=>{if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(Yd.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(Yd.info("UserId set, identifying with PostHog"),e.identify(t.event.userId)
2);var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,dd),identify:e=>t(e,pd),screen:e=>t(e,"$screen")}})(e)).then(()=>{t()})})}(this,()=>this.Wi()):this.Wi(),rl(this.config._onCapture)&&this.config._onCapture!==of&&(iu.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&iu.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(e){var t,n,r,i,s,a,o,l=performance.now(),c=Fo({},xf.__defaultExtensionClasses,this.config.__extensionClasses),u=[];c.featureFlags&&this.Pi.push(this.featureFlags=null!==(t=this.featureFlags)&&void 0!==t?t:new c.featureFlags(this)),c.exceptions&&this.Pi.push(this.exceptions=null!==(n=this.exceptions)&&void 0!==n?n:new c.exceptions(this)),c.historyAutocapture&&this.Pi.push(this.historyAutocapture=new c.historyAutocapture(this)),c.tracingHeaders&&this.Pi.push(new c.tracingHeaders(this)),c.siteApps&&this.Pi.push(this.siteApps=new c.siteApps(this)),c.sessionRecording&&!e&&this.Pi.push(this.sessionRecording=new c.sessionRecording(this)),this.config.disable_scroll_properties||u.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),c.autocapture&&this.Pi.push(this.autocapture=new c.autocapture(this)),c.surveys&&this.Pi.push(this.surveys=null!==(r=this.surveys)&&void 0!==r?r:new c.surveys(this)),c.logs&&this.Pi.push(this.logs=null!==(i=this.logs)&&void 0!==i?i:new c.logs(this)),c.conversations&&this.Pi.push(this.conversations=null!==(s=this.conversations)&&void 0!==s?s:new c.conversations(this)),c.productTours&&this.Pi.push(this.productTours=new c.productTours(this)),c.heatmaps&&this.Pi.push(this.heatmaps=new c.heatmaps(this)),c.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new c.webVitalsAutocapture(this)),c.exceptionObserver&&this.Pi.push(this.exceptionObserver=new c.exceptionObserver(this)),c.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new c.deadClicksAutocapture(this,Vd)),c.toolbar&&this.Pi.push(this.toolbar=null!==(a=this.toolbar)&&void 0!==a?a:new c.toolbar(this)),c.experiments&&this.Pi.push(this.experiments=null!==(o=this.experiments)&&void 0!==o?o:new c.experiments(this)),this.Pi.forEach(e=>{e.initialize&&u.push(()=>{null==e.initialize||e.initialize()})}),u.push(()=>{if(this.Zi){var e=this.Zi;this.Zi=void 0,this.Rr(e)}}),this.Gi(u,l)}Gi(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Gi(e,t)},0);var n=e.shift();if(n)try{n()}catch(e){iu.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({[ed]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[td]:r}),this.config.__preview_deferred_init_extensions&&iu.info("PostHog extensions initialized ("+r+"ms)")}Rr(e){var t;if(!Eo||!Eo.body)return iu.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Rr(e)},500);this.config.__preview_deferred_init_extensions&&(this.Zi=e),this.Qi=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Jo(e.supportedCompression,qh)?qh:Jo(e.supportedCompression,Wh)?Wh:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:ld}),this.Pi.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}Wi(){try{this.config.loaded(this)}catch(e){iu.critical("`loaded` function failed",e)}if(this.Ji(),this.config.internal_or_test_user_hostname&&null!=Ao&&Ao.hostname){var e=Ao.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()},1),this.Yi=new zh(this),this.Yi.load()}Ji(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ui)||e.enable())}_dom_loaded(){this.is_capturing()&&md(this.__request_queue,e=>this.Bi(e)),this.__request_queue=[],this.Ji()}_handle_unload(){var e,t,n,r;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(hd
2),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(n=this.Ui)||n.unload(),null==(r=this.zi)||r.unload()):this.Xi()&&this.capture(hd,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(pf?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=kp(e.url,{ip:this.config.ip?1:0}),e.headers=Fo({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,n,r,i=Fo({},e);i.timeout=i.timeout||6e4,i.url=Ap(i.url,i.compression);var s=null!==(t=i.transport)&&void 0!==t?t:"fetch",a=Cp.filter(e=>!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)),o=null!==(n=null==(r=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===s)return e[t]}(a))?void 0:r.method)&&void 0!==n?n:a[0].method;if(!o)throw new Error("No available transport method");"sendBeacon"!==s&&i.data&&i.compression===qh&&Po&&!jp?Ep(i).then(e=>{o(e)}).catch(t=>{if(Wo(t))return jp=!0,void o(Fo({},i,{compression:void 0,url:Ap(e.url,void 0)}));(e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return Wo(e)||t===qo})(t)&&(jp=!0),o(i)}):o(i)})(Fo({},e,{callback:t=>{var n,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(n=(r=this.config).on_request_error)||n.call(r,t),null==e.callback||e.callback(t)}}))))}Bi(e){this.zi?this.zi.retriableRequest(e):this._send_request(e)}_execute_array(e){af++;try{var t,n=[],r=[],i=[];md(e,e=>{if(e)if(nl(t=e[0]))i.push(e);else if(rl(e))try{e.call(this)}catch(t){iu.error("Error executing queued PostHog call",e,t)}else nl(e)&&"alias"===t?n.push(e):nl(e)&&-1!==t.indexOf("capture")&&rl(this[t])?i.push(e):r.push(e)});var s=function(e,t){md(e,function(e){try{if(nl(e[0])){var n=t;gd(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){iu.error("Error executing queued PostHog call",e,t)}})};s(n,this),s(r,this),s(i,this)}finally{af--}}push(e){if(af>0&&nl(e)&&ol(e[0])){var t=xf.prototype[e[0]];rl(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,n){var r,i,s,a,o;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!al(e)&&ol(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var c=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==c||!c.isRateLimited){null!=t&&t.$current_url&&!ol(null==t?void 0:t.$current_url)&&(iu.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=n&&n.en||iu.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var u=new Date,d=(null==n?void 0:n.timestamp)||u,h=(null==n?void 0:n.uuid)||Td(),p={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},d,h)};e===dd&&this.config.__preview_capture_bot_pageviews&&l&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),c&&(p.properties.$lib_rate_limit_remaining_tokens=c.remainingTokens),(null==n?void 0:n.$set)&&(p.$set=null==n?void 0:n.$set);var f,m,g,y=this.tn(null==n?void 0:n.$set_once,e!==fd,e===pd);if(y&&(p.$set_once=y),null!=n&&n._noTruncate||(i=this.config.properties_string_max_length,s=p,a=e=>ol(e)?e.slice(0,i):e,o=new Set,p=function e(t,n){return t!==Object(t)?a?a(t):t:o.has(t)?void 0:(o.add(t),nl(t)?(r=[],md(t,t=>{r.push(e(t))})):(r={},gd(t,(t,n)=>{o.has(t)||(r[n]=e(t,n))})),r);var r}(s)),p.timestamp=d,al(null==n?void 0:n.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=u),e===Ah||e===Ch){var x=null==t?void 0:t[Mh],v=null==t?void 0:t[Th];(e=>{try{var t=(e=>((e,t)=>{var n=""+Zp+t.id;return t.current_iteration&&t.current_iteration>0&&(n=""+Zp+t.id+"_"+t.current_iteration),n})(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){Jp.error("Failed to persist survey seen state",e)}})({id:x,current_iteration:v}),p.$set=Fo({},p.$set,{[(f={id:x,current_iteration:v},m=e===Ch?"responded":"dismissed",g="$survey_"+m+"/"+f.id,f.current_iteration&&f.current_iteration>0&&(g="$survey_"+m+"/"+f.id+"/"+f.current_iteration),g)]:!0})}else e===Eh&&(p.$set=Fo({},p.$set,{[Ph]:(new Date).toISOString()}));if(e===Lh){var b=null==t?void 0:t[Dh];b&&(p.$set=Fo({},p.$set,{[Rh+"/"+b]:(new Date).toISOString()}))}var w=Fo({},p.properties.$set,p.$set);if(sl(w)||this.setPersonPropertiesForFlags(w),!ul(this.config.before_send)){var _=this.rn(p);if(!_)return;p=_}this.Li.emit("eventCaptured",p);var j={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==n?void 0:n._batchKey};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this.Bi(j):this.Ui.enqueue(j),p}iu.critical("This capture call is ignored due to client rate limiting.")}}else iu.error("No event name provided to posthog.capture")}else iu.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var s=i?void 0:this.persistence.remove_event_timer(e),a=Fo({},t);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,this.Ri()&&(a.$cookieless_mode=!0),"$snapshot"===e){var o=Fo({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=o.distinct_id,(!ol(a.distinct_id)&&!dl(a.distinct_id)||ll(a.distinct_id))&&iu.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var l,c=function(e,t){var n,r,i,s;if(!Oo)return{};var a,o,l,c,u,d,h,p,f=e?[...ah,...t||[]]:[],[m,g]=function(e){for(var t=0;vc.length>t;t++){var[n,r]=vc[t],i=n.exec(e),s=i&&(rl(r)?r(i,e):r);if(s)return s}return["",""]}(Oo);return yd(wd({$os:m,$os_version:g,$browser:gc(Oo,navigator.vendor),$device:bc(Oo),$device_type:(o=Oo,l={userAgentDataPlatform:null==(n=navigator)||null==(n=n.userAgentData)?void 0:n.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==ko||null==(i=ko.screen)?void 0:i.width,screenHeight:null==ko||null==(s=ko.screen)?void 0:s.height,devicePixelRatio:null==ko?void 0:ko.devicePixelRatio},p=bc(o),p===Tl||p===Ml||"Kobo"===p||"Kindle Fire"===p||p===oc?Cl:p===Jl||p===Ql||p===Zl||p===ic?"Console":p===Ol?"Wearable":p?Sl:"Android"===(null==l?void 0:l.userAgentDataPlatform)&&(null!==(c=null==l?void 0:l.maxTouchPoints)&&void 0!==c?c:0)>0?600>Math.min(null!==(u=null==l?void 0:l.screenWidth)&&void 0!==u?u:0,null!==(d=null==l?void 0:l.screenHeight)&&void 0!==d?d:0)/(null!==(h=null==l?void 0:l.devicePixelRatio)&&void 0!==h?h:1)?Sl:Cl:"Desktop"),$timezone:xh(),$timezone_offset:vh()}),{$current_url:rh(null==Ao?void 0:Ao.href,f,lh),$host:null==Ao?void 0:Ao.host,$pathname:null==Ao?void 0:Ao.pathname,$raw_user_agent:Oo.length>1e3?Oo.substring(0,997)+"...":Oo,$browser_version:xc(Oo,navigator.vendor),$browser_language:ph(),$browser_language_prefix:(a=ph(),"string"==typeof a?a.split("-")[0]:void 0),$screen_height:null==ko?void 0:ko.screen.height,$screen_width:null==ko?void 0:ko.screen.width,$viewport_height:null==ko?void 0:ko.innerHeight,$viewport_width:null==ko?void 0:ko.innerWidth,$lib:Ro.LIB_NAME,$lib_version:Ro.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:u,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime());a.$session_id=u,a.$window_id=d}this.sessionPropsManager&&yd(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&yd(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=null==(h=this.zi)?void 0:h.length}catch(ko){a.$sdk_debug_error_capturing_properties=String(ko)}if(this.requestRouter.region===Vp&&(a.$lib_custom_api_host=this.config.api_host),l=e!==dd||i?e!==h
vendor: 9,396 bytes, line 2
2d||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),a=yd(a,l),e===dd&&Eo&&(a.title=Eo.title),!al(s)){var p=n.getTime()-s;a.$duration=parseFloat((p/1e3).toFixed(3))}Oo&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=yd({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),nl(this.config.property_denylist)?gd(this.config.property_denylist,function(e){delete a[e]}):iu.error(df+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var f=this.config.sanitize_properties;f&&(iu.error(uf),a=f(a,e));var m=this.nn();return a.$process_person_profile=m,m&&!i&&this.sn("_calculate_event_properties"),a}tn(e,t,n){var r;if(void 0===t&&(t=!0),void 0===n&&(n=!1),!this.persistence||!this.nn())return e;if(this.Oi&&!n)return e;var i=this.persistence.get_initial_props(),s=null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps(),a=yd({},i,s||{},e||{}),o=this.config.sanitize_properties;return o&&(iu.error(uf),a=o(a,"$set_once")),t&&(this.Oi=!0),sl(a)?void 0:a}register(e,t){var n;null==(n=this.persistence)||n.register(e,t)}register_once(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}an(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var n;return null==(n=this.featureFlags)?void 0:n.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,n){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t,n){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.Li.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:cf}),()=>{})}onSessionId(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:cf})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:cf})}renderSurvey(e,t){var n;null==(n=this.surveys)||n.renderSurvey(e,t)}displaySurvey(e,t){var n;void 0===t&&(t=Xp),null==(n=this.surveys)||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,n;return null!==(t=null==(n=this.surveys)?void 0:n.canRenderSurvey(e))&&void 0!==t?t:{visible:!1,disabledReason:cf}}canRenderSurveyAsync(e,t){var n,r;return void 0===t&&(t=!1),null!==(n=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))&&void 0!==n?n:Promise.resolve({visible:!1,disabledReason:cf})}un(e){return!e||ll(e)?(iu.critical("Unique user id has not been set in posthog.identify"),!1):e===Xu?(iu.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(iu.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return iu.uninitializedWarning("posthog.identify");if(dl(e)&&(e=e.toString(),iu.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(e)&&this.sn("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(cu)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(uu)&&(this.unregister(uu),this.register({distinct_id:e}));var i,s=(this.persistence.get_property(Ku)||ad)===ad;e!==r&&s?(this.persistence.set_property(Ku,od),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(pd,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.$i=qp(e,t,n),null==(i=this.featureFlags)||i.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(zu))}}setPersonProperties(e,t){if((e||t)&&this.sn("posthog.setPersonProperties")){var n=qp(this.get_distinct_id(),e,t);this.$i!==n?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.$i=n):iu.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,n){if(e&&t){var r=this.getGroups(),i=r[e]!==t;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Fo({},r,{[e]:t})}),i||n){var s={$group_type:e,$group_key:t};n&&(s.$group_set=n),this.capture(fd,s)}n&&this.setGroupPropertiesForFlags({[e]:n}),i&&!n&&this.reloadFeatureFlags()}else iu.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var n;void 0===t&&(t=!0),null==(n=this.featureFlags)||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var n;void 0===t&&(t=!0),this.sn("posthog.setGroupPropertiesForFlags")&&(null==(n=this.featureFlags)||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){var t,n,r,i,s,a,o,l;if(iu.info("reset"),!this.__loaded)return iu.uninitializedWarning("posthog.reset");var c=this.get_property(cu);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),null==(r=this.surveys)||r.reset(),null==(i=this.Yi)||i.stop(),null==(s=this.featureFlags)||s.reset(),null==(a=this.conversations)||a.reset(),null==(o=this.persistence)||o.set_property(Ku,ad),null==(l=this.sessionManager)||l.resetSessionId(),this.$i=null,this.config.cookieless_mode===sd)this.register_once({distinct_id:Xu,$device_id:null},"");else{var u=this.config.get_device_id(Td());this.register_once({distinct_id:u,$device_id:e?u:c},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(n=this.conversations)||n.ln()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&n){var i,s=null!==(i=e.timestampLookBack)&&void 0!==i?i:10;if(!n)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-n)/1e3)-s,0)}return r}alias(e,t){return e===this.get_property(lu)?(iu.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(al(t)&&(t=this.get_distinct_id()),e!==t?(this.an(uu,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(iu.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=Fo({},this.config);if(il(e)){var n,r,i,s,a,o,l,c,u,d;yd(this.config,gf(e));var h=this.Hi();null==(n=this.persistence)||n.update_config(this.config,t,h),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new wh(Fo({},this.config,{persistence:"sessionStorage"}),h);var p=this.Di(this.config.debug);pl(p)&&(this.config.debug=p),pl(this.config.debug)&&(this.config.debug?(Ro.DEBUG=!0,Dd.R()&&Dd.N("ph_debug",!0),iu.info("set_config",{config:e,oldConfig:t,newConfig:Fo({},this.config)})):(Ro.DEBUG=!1,Dd.R()&&Dd.q("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(i=this.exceptions)||i.onConfigChange(),null==(s=this.sessionRecording)||s.startIfEnabledOrStop(),null==(a=this.autocapture)||a.startIfEnabled(),null==(o=this.heatmaps)||o.startIfEnabled(),null==(l=this.exceptionObserver)||l.startIfEnabledOrStop(),null==(c=this.deadClicksAutocapture)||
2c.startIfEnabledOrStop(),null==(u=this.surveys)||u.loadIfEnabled(),this.cn(),null==(d=this.externalIntegrations)||d.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){Ro.LIB_NAME=e,Ro.LIB_VERSION=t}startSessionRecording(e){var t,n,r,i,s,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(n=this.sessionRecording)||n.overrideSampling()),o.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),o.url_trigger&&(null==(i=this.sessionRecording)||i.overrideTrigger("url")),o.event_trigger&&(null==(s=this.sessionRecording)||s.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Fo({},r,t))}}addExceptionStep(e,t){var n;null==(n=this.exceptions)||n.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!==(e=null==(t=this.logs)?void 0:t.logger)&&void 0!==e?e:xf.dn}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,n;return null!==(t=null==(n=this.toolbar)?void 0:n.loadToolbar(e))&&void 0!==t&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:hf;return t!==hf&&(t=hf+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(Ku))===od||(null==(t=this.sessionPersistence)?void 0:t.get_property(Ku))===od}nn(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===ld&&!this._isIdentified()&&sl(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[uu])&&(null==(t=this.persistence)||null==(t=t.props)||!t[Zu]))}Xi(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(e){return"never"===this.config.person_profiles?(iu.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(Zu,!0),!0)}Hi(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==id)}cn(){var e,t,n,r,i=this.Hi();return(null==(e=this.persistence)?void 0:e._r)!==i&&(null==(n=this.persistence)||n.set_disabled(i)),(null==(t=this.sessionPersistence)?void 0:t._r)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i)),i}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==sd){if(this.Ri()){var n,r,i,s,a;this.reset(!0),null==(n=this.sessionManager)||n.destroy(),null==(r=this.pageViewManager)||r.destroy(),this.sessionManager=new Fp(this),this.pageViewManager=new Qd(this),this.persistence&&(this.sessionPropsManager=new Rp(this,this.sessionManager,this.persistence));var o,l=null!==(i=null==(s=this.config.__extensionClasses)?void 0:s.sessionRecording)&&void 0!==i?i:null==(a=xf.__defaultExtensionClasses)?void 0:a.sessionRecording;l&&(this.sessionRecording=this.Mi(this.sessionRecording,new l(this)),this.Qi&&(null==(o=this.sessionRecording)||null==o.onRemoteConfig||o.onRemoteConfig(this.Qi)))}var c,u;this.consent.optInOut(!0),this.cn(),this.Ji(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==id&&(null==(c=this.surveys)||c.loadIfEnabled()),(al(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!==(u=null==e?void 0:e.captureEventName)&&void 0!==u?u:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else iu.warn(lf)}opt_out_capturing(){var e,t,n;this.config.cookieless_mode!==sd?(this.config.cookieless_mode===id&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===id&&(this.register({distinct_id:Xu,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(n=this.pageViewM
vendor: 13,583 bytes, line 2
2anager)||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki())):iu.warn(lf)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===sd||(this.config.cookieless_mode===id?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return So?Up(So,this.config.custom_blocked_useragents):void 0}Ki(){Eo&&("visible"===Eo.visibilityState?this.Fi||(this.Fi=!0,this.capture(dd,{title:Eo.title},{send_instantly:!0}),this.Ai&&(Eo.removeEventListener(cd,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),kd(Eo,cd,this.Ai)))}debug(e){!1===e?(null==ko||ko.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==ko||ko.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var e,t,n,r,i,s,a=this.qi||{};return"advanced_disable_flags"in a?!!a.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(iu.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",r=iu,i=(t="advanced_disable_flags")in(e=a)&&!ul(e[t]),s=n in e&&!ul(e[n]),i?e[t]:!!s&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]))}rn(e){if(ul(this.config.before_send))return e;var t=nl(this.config.before_send)?this.config.before_send:[this.config.before_send],n=e;for(var r of t){if(n=r(n),ul(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return fl(e.event)?iu.warn(i+". This can cause unexpected behavior."):iu.info(i),null}n.properties&&!sl(n.properties)||iu.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var e;return null==(e=this.pageViewManager.dr)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}Di(e){var t=pl(e)&&!e,n=Dd.R()&&"true"===Dd.A("ph_debug");return!t&&(!!n||e)}}xf.__defaultExtensionClasses={},xf.dn={trace:rf=()=>{},debug:rf,info:rf,warn:rf,error:rf,fatal:rf},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=bd(e.prototype[t[n]])}(xf,["identify"]);function vf(e){return e instanceof Element&&(e.id===Qu||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function bf(e){return!!e&&1===e.nodeType}function wf(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function _f(e){return!!e&&3===e.nodeType}function jf(e){return!!e&&11===e.nodeType&&bf(e.host)}function kf(e){return e?Zo(e).split(/\s+/):[]}function Nf(e){var t=null==ko?void 0:ko.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function Sf(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return kf(t)}function Ef(e){return ul(e)?null:Zo(e).split(/(\s+)/).filter(e=>Kf(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Af(e){var t="";return Df(e)&&!Bf(e)&&e.childNodes&&e.childNodes.length&&gd(e.childNodes,function(e){var n;_f(e)&&e.textContent&&(t+=null!==(n=Ef(e.textContent))&&void 0!==n?n:"")}),Zo(t)}function Cf(e){return al(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Mf=["a","button","form","input","select","textarea","label"];function Tf(e,t){if(al(t))return!0;var n,r=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function Pf(e){var t=e.parentNode;return!(!t||!bf(t))&&t}var Of=["next","previous","prev",">","<"],If=[".ph-no-rageclick",".ph-no-capture"],Lf=e=>!e||wf(e,"html")||!bf(e),Rf=(e,t)=>{if(!ko||Lf(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!wf(i,"body");)if(jf(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var s=Pf(i);if(!s)break;if(t||Mf.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var a=ko.getComputedStyle(s);a&&"pointer"===a.getPropertyValue("cursor")&&(n=!0)}r.push(s),i=s}return{parentIsUsefulElement:n,targetElementList:r}};function Df(e){for(var t=e;t.parentNode&&!wf(t,"body");t=t.parentNode){var n=Sf(t);if(Jo(n,"ph-sensitive")||Jo(n,"ph-no-capture"))return!1}if(Jo(Sf(e),"ph-include"))return!0;var r=e.type||"";if(ol(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!ol(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function Bf(e){return!!(wf(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||wf(e,"select")||wf(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Ff="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Uf=new RegExp("^(?:"+Ff+")$"),zf=new RegExp(Ff),qf="\\d{3}-?\\d{2}-?\\d{4}",Wf=new RegExp("^("+qf+")$"),Hf=new RegExp("("+qf+")");function Kf(e,t){if(void 0===t&&(t=!0),ul(e))return!1;if(ol(e)){if(e=Zo(e),(t?Uf:zf).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Wf:Hf).test(e))return!1}return!0}function Vf(e){var t=Af(e);return Kf(t=(t+" "+$f(e)).trim())?t:""}function $f(e){var t="";return e&&e.childNodes&&e.childNodes.length&&gd(e.childNodes,function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=Af(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+$f(e)).trim())}catch(e){iu.error("[AutoCapture]",e)}}),t}function Yf(e){return e.replace(/"|\\"/g,'\\"')}function Gf(e){var t=e.attr__class;return t?nl(t)?t:kf(t):void 0}class Jf{constructor(e){this.disabled=!1===e;var t=il(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}var Zf="$copy_autocapture",Qf=su("[AutoCapture]");function Xf(e,t){return t.length>e?t.slice(0,e)+"...":t}function em(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!bf(t));return t}var tm=su("[ExceptionAutocapture]");function nm(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return rl(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}var rm=su("[TracingHeaders]"),im=su("[Web Vitals]"),sm=9e5,am="disabled",om="lazy_loading",lm="awaiting_config",cm="missing_config";su("[SessionRecording]"),su("[SessionRecording]");var um="[SessionRecording]",dm=su(um),hm=su("[Heatmaps]");function pm(e){return il(e)&&"clientX"in e&&"clientY"in e&&dl(e.clientX)&&dl(e.clientY)}var fm=su("[Product Tours]"),mm=["$set_once","$set"],gm=su("[SiteApps]"),ym="Error while initializing PostHog app with config id ";function xm(e,t,n){if(ul(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class vm{constructor(e){this.vn=new Dp,this.fn=(e,t)=>this.pn(e,t)&&this.gn(e,t)&&this.mn(e,t)&&this.yn(e,t),this.pn=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.bn=new Set,this._n=new Set}init(){var e,t;al(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,n;if(!al(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t,n;null==(t=this._n)||t.add(e),null==(n=e.steps)||n.forEach(e=>{var t;null==(t=this.bn)||t.add((null==e?void 0:e.event)||"")})}),null!=(n=this._instance)&&n.autocapture)){var r,i=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&i.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(i)}}on(e,t){var n;null!=t&&0!=e.length&&(this.bn.has(e)||this.bn.has(null==t?void 0:t.event))&&this._n&&(null==(n=this._n)?void 0:n.size)>0&&this._n.forEach(e=>{this.wn(t,e)&&this.vn.emit("actionCaptured",e.name)})}xn(e){this.onAction("actionCaptured",t=>e(t))}wn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n of t.steps)if(this.fn(e,n))return!0;return!1}onAction(e,t){return this.vn.on(e,t)}gn(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!xm(r,t.url,t.url_matching||"contains"))return!1}return!0}mn(e,t){return!!this.Sn(e,t)&&!!this.kn(e,t)&&!!this.Cn(e,t)}Sn(e,t){var n;if(null==t||!t.href)return!0;var r=this.In(e);if(r.length>0)return r.some(e=>xm(e.href,t.href,t.href_matching||"exact"));var i,s=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!s&&xm((i=s.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")}kn(e,t){var n;if(null==t||!t.text)return!0;var r=this.In(e);if(r.length>0)return r.some(e=>xm(e.text,t.text,t.text_matching||"exact")||xm(e.$el_text,t.text,t.text_matching||"exact"));var i,s,a,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!ul(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(o),s=t.text,a=t.text_matching||"exact",i.some(e=>xm(e,s,a)))}Cn(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var s=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&s)try{return new RegExp(t.selector_regex).test(s)}catch(e){return!1}return!1}In(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}yn(e,t){return null==t||!t.properties||0===t.properties.length||Kp(t.properties.reduce((e,t)=>{var n=nl(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class bm{constructor(e){this._instance=e,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(e,t){return!!e&&Kp(e.propertyFilters,null==t?void 0:t.properties)}Rn(e,t){var n=new Map;return e.forEach(e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach(t=>{if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}})}),n}On(e,t,n){var r=(n===_h?this.Tn:this.En).get(e),i=[];return this.Ln(e=>{i=e.filter(e=>null==r?void 0:r.includes(e.id))}),i.filter(r=>{var i,s=null==(i=r.conditions)||null==(i=i[n])||null==(i=i.values)?void 0:i.find(t=>t.name===e);return this.Pn(s,t)})}register(e){var t;al(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Fn(e),this.An(e))}An(e){var t=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0});0!==t.length&&(null==this.Nn&&(this.Nn=new vm(this._instance),this.Nn.init(),this.Nn.xn(e=>{this.onAction(e)})),t.forEach(e=>{var t,n,r,i,s;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(n=e.conditions)&&null!=(n=n.actions)&&n.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(i=this.Nn)||i.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEach(t=>{if(t&&t.name){var n=this.Mn.get(t.name);n&&n.push(e.id),this.Mn.set(t.name,n||[e.id])}}))}))}Fn(e){var t,n=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}),r=e.filter(e=>{var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0});0===n.length&&0===r.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.Tn=this.Rn(e,_h),this.En=this.Rn(e,jh))}onEvent(e,t){var n,r=this.le(),i=this.$n(),s=this.Dn(),a=(null==(n=this._instance)||null==(n=n.persistence)?void 0:n.props[i])||[];if(s===e&&t&&a.length>0){var o,l;r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:a});var c=(null==t||null==(o=t.properties)?void 0:o.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(c){var u=a.indexOf(c);0>u||(a.splice(u,1),this.qn(a))}}else{if(this.En.has(e)){var d=this.On(e,t,jh);d.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map(e=>e.id)}
2),d.forEach(e=>{var t=a.indexOf(e.id);0>t||a.splice(t,1),this.jn(e.id)}),this.qn(a))}if(this.Tn.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.Tn.get(e)});var h=this.On(e,t,_h);this.qn(a.concat(h.map(e=>e.id)||[]))}}}onAction(e){var t,n=this.$n(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[n])||[];this.Mn.has(e)&&this.qn(r.concat(this.Mn.get(e)||[]))}qn(e){var t=this.le(),n=[...new Set(e)].filter(e=>!this.Hn(e));t.info("updating activated items",{activatedItems:n}),this.Un(n)}getActivatedIds(){var e,t=this.$n();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}}class wm extends bm{constructor(e){super(e)}$n(){return Fu}Dn(){return Eh}Ln(e){var t;null==(t=this._instance)||t.getSurveys(e)}jn(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}le(){return Jp}Un(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[Fu]:e})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var _m="SDK is not enabled or survey functionality is not yet loaded",jm="Disabled. Not loading surveys.",km=null!=ko&&ko.location?ih(ko.location.hash,"__posthog")||ih(location.hash,"state"):null,Nm="_postHogToolbarParams",Sm=su("[Toolbar]"),Em=su("[FeatureFlags]"),Am=su("[FeatureFlags]",{debugEnabled:!0}),Cm="\" failed. Feature flags didn't load in time.",Mm=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},Tm=e=>{var t={};for(var[n,r]of xd(e||{}))r&&(t[n]=r);return t},Pm=su("[Error tracking]"),Om="Refusing to render web experiment since the viewer is a likely bot",Im={icontains:(e,t)=>!!ko&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!ko&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!ko&&zp(t.href,e),not_regex:(e,t)=>!!ko&&!zp(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class Lm{get qt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{Lm.zn("retrieved web experiments from the server"),t.Vn=new Map,e.forEach(e=>{if(e.feature_flag_key){var n;t.Vn&&(Lm.zn("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(n=t.Vn)||n.set(e.feature_flag_key,e));var r=t._instance.getFeatureFlag(e.feature_flag_key);ol(r)&&e.variants[r]&&t.Wn(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var i in e.variants){var s=e.variants[i];Lm.Zn(s)&&t.Wn(e.name,i,s.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())Lm.zn(Om);else if(!this.qt.disable_web_experiments){if(ul(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Lm.zn("applying feature flags",e),e.forEach(e=>{var t;if(this.Vn&&null!=(t=this.Vn)&&t.has(e)){var n,r=this._instance.getFeatureFlag(e),i=null==(n=this.Vn)?void 0:n.get(e);r&&null!=i&&i.variants[r]&&this.Wn(i.name,r,i.variants[r].transforms)}})}}previewWebExperiment(){var e=Lm.getWindowLocation();if(null!=e&&e.search){var t=nh(null==e?void 0:e.search,"__experiment_id"),n=nh(null==e?void 0:e.search,"__experiment_variant");t&&n&&(Lm.zn("previewing web experiments "+t+" && "+n),this.getWebExperiments(e=>{this.Gn(parseInt(t),n,e)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,n){if(this.qt.disable_web_experiments&&!n)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}Gn(e,t,n){var r=n.filter(t=>t.id===e);r&&r.length>0&&(Lm.zn("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Wn(r[0].name,t,r[0].variants[t].transforms))}static Zn(e){return!ul(e.conditions)&&Lm.Qn(e)&&Lm.Jn(e)}static Qn(e){var t;if(ul(e.conditions)||ul(null==(t=e.conditions)?void 0:t.url))return!0;var n,r,i,s=Lm.getWindowLocation();return!!s&&(null==(n=e.conditions)||!n.url||Im[null!==(r=null==(i=e.conditions)?void 0:i.urlMatchType)&&void 0!==r?r:"icontains"](e.conditions.url,s))}
2static getWindowLocation(){return null==ko?void 0:ko.location}static Jn(e){var t;if(ul(e.conditions)||ul(null==(t=e.conditions)?void 0:t.utm))return!0;var n=uh();if(n.utm_source){var r,i,s,a,o,l,c,u,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==n.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==n.utm_medium,f=null==(c=e.conditions)||null==(c=c.utm)||!c.utm_term||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_term)==n.utm_term;return d&&p&&f&&h}return!1}static zn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];iu.info("[WebExperiments] "+e,n)}Wn(e,t,n){this._is_bot()?Lm.zn(Om):"control"!==t?n.forEach(n=>{if(n.selector){var r;Lm.zn("applying transform of variant "+t+" for experiment "+e+" ",n);var i=null==(r=document)?void 0:r.querySelectorAll(n.selector);null==i||i.forEach(e=>{var t=e;n.html&&(t.innerHTML=n.html),n.css&&t.setAttribute("style",n.css)})}}):Lm.zn("Control variants leave the page unmodified.")}_is_bot(){return So&&this._instance?Up(So,this.qt.custom_blocked_useragents):void 0}}var Rm=su("[Conversations]"),Dm="Conversations not available yet.",Bm={featureFlags:class{constructor(e){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}us(){var e,t;return null!==(e=null==(t=this.ni)?void 0:t.wr(this.qt.feature_flag_cache_ttl_ms))&&void 0!==e&&e}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,Em.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=null!==(e=this.qt.evaluation_contexts)&&void 0!==e?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(Em.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||Em.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:n}=this._instance,r=null!==(e=null==(t=n.bootstrap)?void 0:t.featureFlags)&&void 0!==e?e:{};if(Object.keys(r).length){var i,s,a=null!==(i=null==(s=n.bootstrap)?void 0:s.featureFlagPayloads)&&void 0!==i?i:{},o=Object.keys(r).filter(e=>!!r[e]).reduce((e,t)=>(e[t]=r[t]||!1,e),{}),l=Object.keys(a).filter(e=>o[e]).reduce((e,t)=>(a[t]&&(e[t]=a[t]),e),{});this.receivedFeatureFlags({featureFlags:o,featureFlagPayloads:l})}}updateFlags(e,t,n){var r=null!=n&&n.merge?this.getFlagVariants():{},i=null!=n&&n.merge?this.getFlagPayloads():{},s=Fo({},r,e),a=Fo({},i,t),o={};for(var[l,c]of Object.entries(s)){var u="string"==typeof c;o[l]={key:l,enabled:!!u||Boolean(c),variant:u?c:void 0,reason:void 0,metadata:al(null==a?void 0:a[l])?void 0:{id:0,version:void 0,description:void 0,payload:a[l]}}}this.receivedFeatureFlags({flags:o})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(Tu),t=this.os(Iu),n=this.os(Lu);if(!n&&!t)return e||{};var r=yd({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var s of i){var a,o,l=r[s],c=null==t?void 0:t[s],u=al(c)?null!==(a=null==l?void 0:l.enabled)&&void 0!==a&&a:!!c,d=al(c)?l.variant:"string"==typeof c?c:void 0,h=null==n?void 0:n[s],p=Fo({},l,{enabled:u,variant:u?null!=d?d:null==l?void 0:l.variant:void 0});u!==(null==l?void 0:l.enabled)&&(p.original_enabled=null==l?void 0:l.enabled),d!==(null==l?void 0:l.variant)&&(p.original_variant=null==l?void 0:l.variant),h&&(p.metadata=Fo({},null==l?void 0:l.metadata,{payload:h,original_payload:null==l||null==(o=l.metadata)?void 0:o.payload})),r[s]=p}return this.Kn||(Em.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Kn=!0),r}getFlagVariants(){var e=this.os(Au),t=this.os(Iu);
2if(!t)return e||{};for(var n=yd({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Kn||(Em.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Kn=!0),n}getFlagPayloads(){var e=this.os(Pu),t=this.os(Lu);if(!t)return e||{};for(var n=yd({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Kn||(Em.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Kn=!0),n}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.ds||(this._instance.Li.emit("featureFlagsReloading",!0),this.ds=setTimeout(()=>{this.vs()},5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var n=this.qt.token,r=this.os(cu),i={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Fo({},(null==(t=this.ni)?void 0:t.get_initial_props())||{},this.os(Ru)||{}),group_properties:this.os(Du),timezone:xh()};cl(r)||al(r)||(i.$device_id=r),(null!=e&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.cs()&&(i.evaluation_contexts=this.hs());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:s,data:i,compression:this.qt.disable_compression?void 0:Wh,timeout:this.qt.feature_flag_request_timeout_ms,callback:e=>{var t,n,r,s=!0;if(200===e.statusCode&&(this.ts||(this.$anon_distinct_id=void 0),s=!1),this.Xn=!1,!i.disable_flags||this.ts){this.rs=!s;var a=[];e.error?e.error instanceof Error?a.push("AbortError"===e.error.name?"timeout":"connection_error"):a.push("unknown_error"):200!==e.statusCode&&a.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&a.push("errors_while_computing_flags");var o,l=!(null==(n=e.json)||null==(n=n.quotaLimited)||!n.includes("feature_flags"));l&&a.push("quota_limited"),null==(r=this.ni)||r.register({[Wu]:a}),l?Em.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags(null!==(o=e.json)&&void 0!==o?o:{},s,{partialResponse:!!this.qt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var n;if(void 0===t&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFeatureFlagResult(e,t);return null!==(n=null==r?void 0:r.variant)&&void 0!==n?n:null==r?void 0:r.enabled}}else Em.warn('getFeatureFlag for key "'+e+Cm)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),r=e in n,i=n[e],s=this.getFlagPayloads()[e],a=String(i),o=this.os(Ou)||void 0,l=this.os(Hu)||void 0,c=this.os(zu)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var u,d=this._instance.get_session_id(),h=this.os(qu);d&&d!==h&&(c={},null==(u=this.ni)||u.register({[zu]:c,[qu]:d}))}if((t.send_event||!("send_event"in t))&&(!(e in c)||!c[e].includes(a))){var p,f,m,g,y,x,v,b,w,_;nl(c[e])?c[e].push(a):c[e]=[a],null==(p=this.ni)||p.register({[zu]:c});var j=this.getFeatureFlagDetails(e),k=[...null!==(f=this.os(Wu))&&void 0!==f?f:[]];al(i)&&k.push("flag_missing");var N={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:s||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(m=this.qt.bootstrap)||null==(m
2=m.featureFlags)?void 0:m[e])||null,$feature_flag_bootstrapped_payload:(null==(g=this.qt.bootstrap)||null==(g=g.featureFlagPayloads)?void 0:g[e])||null,$used_bootstrap_value:!this.rs};al(null==j||null==(y=j.metadata)?void 0:y.version)||(N.$feature_flag_version=j.metadata.version);var S,E=null!==(x=null==j||null==(v=j.reason)?void 0:v.description)&&void 0!==x?x:null==j||null==(b=j.reason)?void 0:b.code;E&&(N.$feature_flag_reason=E),null!=j&&null!=(w=j.metadata)&&w.id&&(N.$feature_flag_id=j.metadata.id),al(null==j?void 0:j.original_variant)&&al(null==j?void 0:j.original_enabled)||(N.$feature_flag_original_response=al(j.original_variant)?j.original_enabled:j.original_variant),null!=j&&null!=(_=j.metadata)&&_.original_payload&&(N.$feature_flag_original_payload=null==j||null==(S=j.metadata)?void 0:S.original_payload),k.length&&(N.$feature_flag_error=k.join(",")),this._instance.capture("$feature_flag_called",N)}if(r){var A=s;if(!al(s))try{A=JSON.parse(s)}catch(e){}return{key:e,enabled:!!i,variant:"string"==typeof i?i:void 0,payload:A}}}}else Em.warn('getFeatureFlagResult for key "'+e+Cm)}getRemoteConfigPayload(e,t){var n=this.qt.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(r.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.qt.disable_compression?void 0:Wh,timeout:this.qt.feature_flag_request_timeout_ms,callback(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return al(n)?void 0:!!n}Em.warn('isFeatureEnabled for key "'+e+Cm)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,n){if(this.ni){this.Yn=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();!function(e,t,n,r,i,s){void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var a=(e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(e=>{var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(e=>t[e].enabled).filter(e=>{var n;return null==(n=t[e].metadata)?void 0:n.payload}).map(e=>{var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]}))):Em.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e})(e),o=a.flags,l=a.featureFlags,c=a.featureFlagPayloads;if(l){var u=e.requestId,d=e.evaluatedAt;if(nl(l)){Em.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(l)for(var p=0;l.length>p;p++)h[l[p]]=!0;t&&t.register({[Cu]:l,[Au]:h})}else{var f=l,m=c,g=o;if(null!=s&&s.partialResponse)f=Fo({},n,f),m=Fo({},r,m),g=Fo({},i,g);else if(e.errorsWhileComputingFlags)if(o){var y=new Set(Object.keys(o).filter(e=>{var t;return!(null!=(t=o[e])&&t.failed)}));f=Fo({},n,Object.fromEntries(Object.entries(f).filter(e=>{var[t]=e;return y.has(t)}))),m=Fo({},r,Object.fromEntries(Object.entries(m||{}).filter(e=>{var[t]=e;return y.has(t)}))),g=Fo({},i,Object.fromEntries(Object.entries(g||{}).filter(e=>{var[t]=e;return y.has(t)})))}else f=Fo({},n,f),m=Fo({},r,m),g=Fo({},i,g);t&&t.register(Fo({[Cu]:Object.keys(Tm(f)),[Au]:f||{},[Pu]:m||{},[Tu]:g||{}},u?{[Ou]:u}:{},d?{[Hu]:d}:{}))}}}(e,this.ni,r,i,s,n),t||(this.ss=!1),this.ps(t)}}override(e,t){void 0===t&&(t=!1),Em.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return Em.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.ni.unregister(Iu),this.ni.unregister(Lu),this.ps(),Am.info("All overrides cleared");if(nl(e)){var t=Mm(e);return this.ni.register({[Iu]:t}),this.ps(),Am.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Kn=Boolean(null!==(n=r.suppressWarning)&&void 0!==n&&n),"flags"in r)if(!1===r.flags)this.ni.unregister(Iu),Am.info("Flag overrides cleared");else if(r.flags){if(nl(r.flags)){var i=Mm(r.flags);this.ni.register({[Iu]:i})}else this.ni.register({[Iu]:r.flags});Am.info("Flag overrides set",{flags:r.flags})}return"payloads"in r&&(!1===r.payloads?(this.ni.unregister(Lu),Am.info("Payload overrides cleared")):r.payloads&&(this.ni.register({[Lu]:r.payloads}),Am.info("Payload overrides set",{payloads:r.payloads}))),void this.ps()}if(e&&"object"==typeof e)return this.ni.register({[Iu]:e}),this.ps(),Am.info("Flag overrides set",{flags:e});Em.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:n}=this.gs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,i=(this.os(Mu)||[]).find(t=>t.flagKey===e),s={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:s};i&&(a.$early_access_feature_name=i.name),n&&(a.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(s,!1);var o=Fo({},this.getFlagVariants(),{[e]:t});null==(r=this.ni)||r.register({[Cu]:Object.keys(Tm(o)),[Au]:o}),this.ps()}
2getEarlyAccessFeatures(e,t,n){void 0===t&&(t=!1);var r=this.os(Mu),i=n?"&"+n.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+i),method:"GET",callback:t=>{var n,r;if(t.json){var i=t.json.earlyAccessFeatures;return null==(n=this.ni)||n.unregister(Mu),null==(r=this.ni)||r.register({[Mu]:i}),e(i)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,n)=>(e[n]=t[n],e),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach(r=>r(t,n,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=this.os(Ru)||{},r=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),i=null==e?void 0:e.$set_once,s={};if(i)for(var a in i)({}).hasOwnProperty.call(i,a)&&(a in n||(s[a]=i[a]));this._instance.register({[Ru]:Fo({},n,s,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Ru)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var n=this.os(Du)||{};0!==Object.keys(n).length&&Object.keys(n).forEach(t=>{n[t]=Fo({},n[t],e[t]),delete e[t]}),this._instance.register({[Du]:Fo({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(Du)||{};this._instance.register({[Du]:Fo({},t,{[e]:{}})})}else this._instance.unregister(Du)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Kn=!1}}},Fm={sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!(null==(e=this.ys)||!e.isStarted)}get status(){var e,t;return this.bs===lm||this.bs===cm?this.bs:null!==(e=null==(t=this.ys)?void 0:t.status)&&void 0!==e?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=am,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw dm.error("started without valid sessionManager"),new Error(um+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===sd)throw new Error(um+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!(null==(e=this._instance.get_property(wu))||!e.enabled),n=!this.qt.disable_session_recording,r=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return ko&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||null==(t=this.ys)||!t.isStarted){var n=!al(Object.assign)&&!al(Array.from);this.ws&&n?(this.xs(e),dm.info("starting")):(this.bs=am,this.stopRecording())}}xs(e){var t,n,r;this.ws&&(this.bs!==lm&&this.bs!==cm&&(this.bs=om),null!=Io&&null!=(t=Io.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=Io.__PosthogExtensions__)&&n.initSessionRecording?this.Ss(e):null==(r=Io.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.ks,t=>{if(t)return dm.error("could not load recorder",t);this.Ss(e)}))}stopRecording(){var e,t;null==(e=this._s)||e.call(this),this._s=void 0,null==(t=this.ys)||t.stop()}Cs(){var e,t;null==(e=this._s)||e.call(this),this._s=void 0,null==(t=this.ys)||t.discard()}Is(){var e;null==(e=this.ni)||e.unregister(Eu)}Ts(e,t){if(ul(e))return null;var n,r=dl(e)?e:parseFloat(e);return"number"!=typeof(n=r)||!Number.isFinite(n)||0>n||n>1?(dm.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}Es(e){if(this.ni){var t,n,r=this.ni,i=()=>{var t,n=!1===e.sessionRecording?void 0:e.sessionRecording,i=this.Ts(null==(t=this.qt.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),s=this.Ts(null==n?void 0:n.sampleRate,"remote config sampleRate"),a=null!=i?i:s;ul(a)&&this.Is();var o=null==n?void 0:n.minimumDurationMilliseconds;r.register({[wu]:Fo({cache_timestamp:Date.now(),enabled:!!n},n,{networkPayloadCapture:Fo({capturePerformance:e.capturePerformance},null==n?void 0:n.networkPayloadCapture),canvasRecording:{enabled:null==n?void 0:n.recordCanvas,fps:null==n?void 0:n.canvasFps,quality:null==n?void 0:n.canvasQuality},sampleRate:a,minimumDurationMilliseconds:al(o)?null:o,endpoint:null==n?void 0:n.endpoint,triggerMatchType:null==n?void 0:n.triggerMatchType,masking:null==n?void 0:n.masking,urlTriggers:null==n?void 0:n.urlTriggers,version:null==n?void 0:n.version,triggerGroups:null==n?void 0:n.triggerGroups})})};i(),null==(t=this._s)||t.call(this),this._s=null==(n=this._instance.sessionManager)?void 0:n.onSessionId(i)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.Es(e),void this.Cs()):(this.Es(e),void this.startIfEnabledOrStop()):(this.bs===lm&&(this.bs=cm,dm.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;void 0===t&&(t="log"),null!=(n=this.ys)&&n.log?this.ys.log(e,t):dm.warn("log called before recorder was ready")}get ks(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(wu);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}Ms(){var e,t,n=this._instance.get_property(wu);if(!n)return!1;try{t="object"==typeof n?n:JSON.parse(n)}catch(e){return dm.warn("persisted remote config for session recording is invali
2d and will be ignored",e),!1}var r=null!==(e=t.cache_timestamp)&&void 0!==e?e:Date.now();return 36e5>=Date.now()-r}Ss(e){var t,n;if(null==(t=Io.__PosthogExtensions__)||!t.initSessionRecording)return dm.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[nd]:!0});if(this.ys||(this.ys=null==(n=Io.__PosthogExtensions__)?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms()){if(this.bs===cm||this.bs===lm)return;return this.bs=lm,dm.info("persisted remote config is stale, requesting fresh config before starting"),void new zh(this._instance).load()}this.bs=om,this.ys.start(e)}onRRwebEmit(e){var t;null==(t=this.ys)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||null==(t=this.ni)||t.register({[ju]:!0}),null==(e=this.ys)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||null==(t=this.ni)||t.register({[_u]:!0}),null==(e=this.ys)||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||null==(n=this.ni)||n.register({["url"===e?ku:Nu]:!0}),null==(t=this.ys)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.ys)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!(null==(n=this.ys)||!n.tryAddCustomEvent(e,t))}}},Um={autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new Jf(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get qt(){var e,t,n=il(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map(e=>new RegExp(e)),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),n}Fs(){if(this.isBrowserSupported()){if(ko&&Eo){var e=e=>{e=e||(null==ko?void 0:ko.event);try{this.As(e)}catch(ko){Qf.error("Failed to capture event",ko)}};if(kd(Eo,"submit",e,{capture:!0}),kd(Eo,"change",e,{capture:!0}),kd(Eo,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=e=>{e=e||(null==ko?void 0:ko.event);try{this.As(e,Zf)}catch(ko){Qf.error("Failed to capture copy/cut event",ko)}};kd(Eo,"copy",t,{capture:!0}),kd(Eo,"cut",t,{capture:!0})}}}else Qf.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[hu]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,n=[];return null==(t=this.Ls)||t.forEach(t=>{var r=null==Eo?void 0:Eo.querySelectorAll(t);null==r||r.forEach(r=>{e===r&&n.push(t)})}),n}get isEnabled(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[hu];if(cl(this.Rs)&&!pl(n)&&!this.instance.Lr())return!1;var r=null!==(t=this.Rs)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!r}As(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=Cf(e);_f(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!ko||Lf(e))return!1;var n,r,i;if(pl(t)?(n=!!t&&If,r=void 0):(n=null!==(i=null==t?void 0:t.css_selector_ignorelist)&&void 0!==i?i:If,r=null==t?void 0:t.content_ignorelist),!1===n)return!1;var{targetElementList:s}=Rf(e,!1);return!function(e,t){if(!1===e||al(e))return!1;var n;if(!0===e)n=Of;else{if(!nl(e))return!1;if(e.length>10)return iu.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:r}=e;return n.some(e=>t.includes(e)||r.includes(e))})}(r,s.map(e=>{var t;return{safeText:Af(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!Tf(s,n)}(r,this.instance.config.rageclick)&&this.As(e,"$rageclick");var i=t===Zf;if(r&&function(e,t,n,r,i){var s,a,o,l;if(void 0===n&&(n=void 0),!ko||Lf(e))return!1;if(null!=(s=n)&&s.url_allowlist&&!Nf(n.url_allowlist))return!1;if(null!=(a=n)&&a.url_ignorelist&&Nf(n.url_ignorelist))return!1;if(null!=(o=n)&&o.dom_event_allowlist){var c=n.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}var{parentIsUsefulElement:u,targetElementList:d}=Rf(e,r);if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(al(n))return!0;var r,i=function(e){if(n.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var s of e)if(r=i(s))return r.v;return!1}(d,n))return!1;if(!Tf(d,null==(l=n)?void 0:l.css_selector_allowlist))return!1;var h=ko.getComputedStyle(e);
vendor: 8,287 bytes, line 2
2if(h&&"pointer"===h.getPropertyValue("cursor")&&"click"===t.type)return!0;var p=e.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return u?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(Mf.indexOf(p)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.qt,i,i?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:a}=function(e,t){var n,r,{e:i,maskAllElementAttributes:s,maskAllText:a,elementAttributeIgnoreList:o,elementsChainAsString:l}=t;if(!bf(e))return{props:{}};for(var c=[e],u=e;u.parentNode&&!wf(u,"body");)if(jf(u.parentNode))c.push(u.parentNode.host),u=u.parentNode.host;else{if(!bf(u.parentNode))break;c.push(u.parentNode),u=u.parentNode}var d,h,p=[],f={},m=!1,g=!1;if(gd(c,e=>{var t=Df(e);if(wf(e,"a")){var n=e.getAttribute("href");m=t&&!!n&&Kf(n)&&n}Jo(Sf(e),"ph-no-capture")&&(g=!0),p.push(function(e,t,n,r){var i=e.tagName.toLowerCase(),s={tag_name:i};Mf.indexOf(i)>-1&&!n&&(s.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?Xf(1024,Vf(e)):Xf(1024,Af(e)));var a=Sf(e);a.length>0&&(s.classes=a.filter(function(e){return""!==e})),gd(e.attributes,function(n){var i;if((!Bf(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&(null==r||!r.includes(n.name))&&!t&&Kf(n.value)&&(!ol(i=n.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var a=n.value;"class"===n.name&&(a=kf(a).join(" ")),s["attr__"+n.name]=Xf(1024,a)}});for(var o=1,l=1,c=e;c=em(c);)o++,c.tagName===e.tagName&&l++;return s.nth_child=o,s.nth_of_type=l,s}(e,s,a,o));var r=function(e){if(!Df(e))return{};var t={};return gd(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&Kf(r)&&(t[n]=r)}}),t}(e);yd(f,r)}),g)return{props:{},explicitNoCapture:g};if(a||(p[0].$el_text=wf(e,"a")||wf(e,"button")?Vf(e):Af(e)),m){var y,x;p[0].attr__href=m;var v=null==(y=th(m))?void 0:y.host,b=null==ko||null==(x=ko.location)?void 0:x.host;v&&b&&v!==b&&(d=m)}return{props:yd({$event_type:i.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:(h=p,function(e){return e.map(e=>{var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var i of(e.attr_class.sort(),e.attr_class))r+="."+i.replace(/"/g,"");var s=Fo({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return xd(s).sort((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)}).forEach(e=>{var[t,n]=e;return a[Yf(t.toString())]=Yf(n.toString())}),(r+=":")+xd(a).map(e=>{var[t,n]=e;return t+'="'+n+'"'}).join("")}).join(";")}(function(e){return e.map(e=>{var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:Gf(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return xd(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,n]=e;return r.attributes[t]=n}),r})}(h)))},null!=(n=p[0])&&n.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===i.type?{$external_click_url:d}:{},f)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Os});if(a)return!1;var o=this.getElementSelectors(r);if(o&&o.length>0&&(s.$element_selectors=o),t===Zf){var l,c=Ef(null==ko||null==(l=ko.getSelection())?void 0:l.toString()),u=e.type||"clipboard";if(!c)return!1;s.$selected_content=c,s.$copy_type=u}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return rl(null==Eo?void 0:Eo.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ns=(null==ko||null==(t=ko.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(iu.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.$s&&this.$s(),this.$s=void 0,iu.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(ko&&ko.history){var n=this;null!=(e=ko.history.pushState)&&e.__posthog_wrapped__||nm(ko.history,"pushState",e=>function(t,r,i){e.call(this,t,r,i),n.Ds("pushState")}),null!=(t=ko.history.replaceState)&&t.__posthog_wrapped__||nm(ko.history,"replaceState",e=>function(t,r,i){e.call(this,t,r,i),n.Ds("replaceState")}),this.qs()}}Ds(e){try{var t,n=null==ko||null==(t=ko.location)?void 0:t.pathname;if(!n)return;n!==this.Ns&&this.isEnabled&&this._instance.capture(dd,{navigation_type:e}),this.Ns=n}catch(ko){iu.error("Error capturing "+e+" pageview",ko)}}qs(){if(!this.$s){var e=()=>{this.Ds("popstate")};kd(ko,"popstate",e),this.$s=()=>{ko&&ko.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.js=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.js=!(null==(t=this.instance.persistence)||!t.props[pu]),this.rageclicks=new Jf(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return il(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return ul(this.qt.capture_heatmaps)?ul(this.qt.enable_heatmaps)?this.js:this.qt.enable_heatmaps:!1!==this.qt.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;hm.info("starting..."),this.Us(),this.At()}else{var e;clearInterval(null!==(e=this.Hs)&&void 0!==e?e:void 0),this.Bs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[pu]:t}),this.js=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}zs(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Hs&&clearInterval(this.Hs),this.Hs="visible"===(null==Eo?void 0:Eo.visibilityState)?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Us(){ko&&Eo&&(this.Vs=this.Zr.bind(this),kd(ko,ud,this.Vs),this.Ws=e=>this.Mt(e||(null==ko?void 0:ko.event)),kd(Eo,"click",this.Ws,{capture:!0}),this.Zs=e=>this.Gs(e||(null==ko?void 0:ko.event)),kd(Eo,"mousemove",this.Zs,{capture:!0}),this.Qs=new $d(this.instance,Kd,this.zs.bind(this)),this.Qs.startIfEnabledOrStop(),this.Js=this.At.bind(this),kd(Eo,cd,this.Js),this.Ps=!0)}Bs(){var e;ko&&Eo&&(this.Vs&&ko.removeEventListener(ud,this.Vs),this.Ws&&Eo.removeEventListener("click",this.Ws,{capture:!0}),this.Zs&&Eo.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Js&&Eo.removeEventListener(cd,this.Js),clearTimeout(this.Ks),null==(e=this.Qs)||e.stop(),this.Ps=!1)}Ys(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),s=function(e,t,n){for(var r=e;r&&bf(r)&&!wf(r,"body");){if(r===n)return!1;if(Jo(t,null==ko?void 0:ko.getComputedStyle(r).position))return!0;r=Pf(r)}return!1}(Cf(e),["fixed","sticky"],i);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:n),target_fixed:s,type:t}}Mt(e,t){var n;if(void 0===t&&(t="click"),!vf(e.target)&&pm(e)){var r=this.Ys(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Xs(Fo({},r,{type:"rageclick"})),this.Xs(r)}}Gs(e){!vf(e.target)&&pm(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout(()=>{this.Xs(this.Ys(e,"mousemove"))},500))}Xs(e){if(ko){var t=ko.location.href,n=this.qt.custom_personal_data_properties,r=this.qt.mask_personal_data_properties?[...ah,...n||[]]:[],i=rh(t,r,lh);this.M=this.M||{},this.M[i]||(this.M[i]=[]),this.M[i].push(e)}}Zr(){this.M&&!sl(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:$d,webVitalsAutocapture:class{constructor(e){var t;this.js=!1,this.Ps=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),0!==this.M.metrics.length&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((e,t)=>
2Fo({},e,{["$web_vitals_"+t.name+"_event"]:Fo({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=e=>{var t,n=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(al(n))im.error("Could not read session ID. Dropping metrics!");else{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.io();al(r)||(ul(null==e?void 0:e.name)||ul(null==e?void 0:e.value)?im.error("Invalid metric received",e):!this.no||this.no>e.value?(this.M.url!==r&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),al(this.M.url)&&(this.M.url=r),this.M.firstMetricTimestamp=al(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.M.metrics.push(Fo({},e,{$current_url:r,$session_id:n.sessionId,$window_id:n.windowId,timestamp:Date.now()})),this.M.metrics.length===this.allowedMetrics.length&&this.eo()):im.error("Ignoring metric with value >= "+this.no,e))}},this.so=()=>{if(!this.Ps){var e,t,n,r,i=Io.__PosthogExtensions__;al(i)||al(i.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:n,onINP:r}=i.postHogWebVitalsCallbacks),e&&t&&n&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.ht.bind(this)),this.Ps=!0):im.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.js=!(null==(t=this._instance.persistence)||!t.props[yu]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=il(this.oo)?null==(e=this.oo)?void 0:e.web_vitals_allowed_metrics:void 0;return ul(n)?(null==(t=this._instance.persistence)?void 0:t.props[bu])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(il(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=il(this.oo)?this.oo.web_vitals_attribution:void 0;return null!=e&&e}get no(){var e=il(this.oo)&&dl(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:sm;return e>0&&6e4>=e?sm:e}get isEnabled(){var e=null==Ao?void 0:Ao.protocol;if("http:"!==e&&"https:"!==e)return im.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=il(this.oo)?this.oo.web_vitals:pl(this.oo)?this.oo:void 0;return pl(t)?t:this.js}startIfEnabled(){this.isEnabled&&!this.Ps&&(im.info("enabled, starting..."),this.lr(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=il(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=il(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[yu]:t}),this._instance.persistence.register({[bu]:n})),this.js=t,this.startIfEnabled()}}lr(e){var t,n;null!=(t=Io.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?im.error("failed to load script",t):e()})}io(){var e=ko?ko.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...ah,...t||[]]:[];return rh(e,n,lh)}im.error("Could not determine current URL")}}},zm={exceptionObserver:class{constructor(e){var t,n,r;this.so=()=>{var e;if(ko&&this.isEnabled&&null!=(e=Io.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=Io.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=Io.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=Io.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.qt.capture_unhandled_errors&&(this.ao=t(this.captureException.bind(this))),!this.uo&&this.qt.capture_unhandled_rejections&&(this.uo=n(this.captureException.bind(this))),!this.lo&&this.qt.capture_console_errors&&(this.lo=r(this.captureException.bind(this)))}
2catch(ko){tm.error("failed to start",ko),this.ho()}}},this._instance=e,this.co=!(null==(t=this._instance.persistence)||!t.props[fu]),this.do=new _l({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,Gt:tm}),this.qt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return il(e)?t=Fo({},t,e):(al(e)?this.co:e)&&(t=Fo({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(tm.info("enabled"),this.ho(),this.lr(this.so)):this.ho()}lr(e){var t,n;null!=(t=Io.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return tm.error("failed to load script",t);e()})}ho(){var e,t,n;null==(e=this.ao)||e.call(this),this.ao=void 0,null==(t=this.uo)||t.call(this),this.uo=void 0,null==(n=this.lo)||n.call(this),this.lo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[fu]:this.co}),this.qt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.vo()}captureException(e){var t,n,r,i=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this.do.consumeRateLimit(i)?tm.info("Skipping exception capture because of client rate limiting.",{exception:i}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.fo=[],this.po=new Ec([new Fc,new Gc,new zc,new Uc,new $c,new Vc,new Wc,new Yc],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],s=t.split("\n"),a=r;s.length>a;a++){var o=s[a];if(1024>=o.length){var l=Bc.test(o)?o.replace(Bc,"$1"):o;if(!l.match(/\S*Error: /)){for(var c of n){var u=c(l,e);if(u){i.push(u);break}}if(i.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map(e=>{return Fo({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||Ac});var n})}(i)}}("web:javascript",Ic,Dc)),this._instance=e,this.fo=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(mu))&&void 0!==t?t:[],this.mo=eu(this.yo()),this.bo=new tu(this.mo)}onConfigChange(){this.mo=eu(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var i=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],s=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.fo=i,this._instance.persistence&&this._instance.persistence.register({[mu]:this.fo,[gu]:s})}}get _o(){var e,t=!!this._instance.get_property(gu),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!ol(e)||0===e.trim().length)return void Pm.warn("Ignoring exception step because message must be a non-empty string");var n=this.wo(t),{sanitizedProperties:r,droppedKeys:i}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((n,r)=>Qc.has(r)?(t.push(r),n):(n[r]=e[r],n),{}),droppedKeys:t}}(n);i.length>0&&Pm.warn("Ignoring reserved exception step fields",{droppedKeys:i}),this.bo.add(Fo({[Jc]:e,[Zc]:(new Date).toISOString()},r))}catch(e){Pm.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.xo(t)){if(this.So(t))return this.ko("Exception dropped: matched a suppression rule"),void Pm.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.Co(t))return this.ko("Exception dropped: thrown by a browser extension"),void Pm.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Io(t))return this.ko("Exception dropped: thrown by the PostHog SDK"),void Pm.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.mo.enabled&&ul(e.$exception_steps)?this.To(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return r&&this.bo.clear(),r}catch(e){return Pm.error("Failed to capture exception event. Dropping this exception.",e),void this.bo.clear()}}catch(e){return void Pm.error("Failed to process exception event. Ignoring this exception.",e)}}To(e){try{var t=this.bo.getAttachable();return 0===t.length?e:Fo({},e,{$exception_steps:t})}catch(t){return Pm.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}ko(e){this.mo.enabled&&this.bo.add({[Jc]:e,[Zc]:(new Date).toISOString()})}wo(e){return il(e)?Fo({},e):{}}yo(){var e,t;return null!==(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)&&void 0!==e?e:{}}So(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>
2{var{type:n,value:r}=t;return ol(n)&&n.length>0&&e.$exception_types.push(n),ol(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.fo.some(e=>{var n=e.values.map(e=>{var n,r=Wp[e.operator],i=nl(e.value)?e.value:[e.value],s=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,s)});return"OR"===e.type?n.some(Boolean):n.every(Boolean)})}Co(e){return e.flatMap(e=>{var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Io(e){if(e.length>0){var t,n,r,i,s=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],a=s[s.length-1];return null!==(r=null==a||null==(i=a.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1}xo(e){return!ul(e)&&nl(e)}}},qm=Fo({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Eo=null,this.Mo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[vu]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Eo||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(vu)||this.lr(()=>this.Po())}lr(e){var t,n;null!=(t=Io.__PosthogExtensions__)&&t.generateProductTours?e():null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"product-tours",t=>{t?fm.error("Could not load product tours script",t):e()})}Po(){var e;!this.Eo&&null!=(e=Io.__PosthogExtensions__)&&e.generateProductTours&&(this.Eo=Io.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!nl(this.Mo)||t){var n=this.ni;if(n){var r=n.props[Uu];if(nl(r)&&!t)return this.Mo=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var r=t.statusCode;if(200!==r||!t.json){var i="Product Tours API could not be loaded, status: "+r;return fm.error(i),void e([],{isLoaded:!1,error:i})}var s=nl(t.json.product_tours)?t.json.product_tours:[];this.Mo=s,n&&n.register({[Uu]:s}),e(s,{isLoaded:!0})}})}else e(this.Mo,{isLoaded:!0})}getActiveProductTours(e){ul(this.Eo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Eo.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Eo)||t.showTourById(e)}previewTour(e){this.Eo?this.Eo.previewTour(e):this.lr(()=>{var t;this.Po(),null==(t=this.Eo)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Eo)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Eo)||e.nextStep()}previousStep(){var e;null==(e=this.Eo)||e.previousStep()}clearCache(){var e;this.Mo=null,null==(e=this.ni)||e.unregister(Uu)}resetTour(e){var t;null==(t=this.Eo)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Eo)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Eo)||t.cancelPendingTour(e)}}},Bm),Wm={siteApps:class{constructor(e){this._instance=e,this.Ro=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Oo(e,t){if(t){var n=this.globalsForEvent(t);this.Ro.push(n),this.Ro.length>1e3&&(this.Ro=this.Ro.slice(10))}}get siteAppLoaders(){var e;return null==(e=Io._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Oo.bind(this));this.Lo=()=>{e(),this.Ro=[],this.Lo=void 0}}}globalsForEvent(e){var t,n,r,i,s,a,o;if(!e)throw new Error("Event payload is required");var l={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[d,h]of Object.entries(u))l[d]={id:c[d],type:d,properties:h};var{$set_once:p,$set:f}=e;return{event:Fo({},Uo(e,mm),{properties:Fo({},e.properties,f?{$set:Fo({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},f)}:{},p?{$set_once:Fo({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},p)}:{}),elements_chain:null!==(s=null==(a=e.properties)?void 0:a.$elements_chain)&&void 0!==s?s:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var n;!t.errored&&this.Ro.length&&(gm.info("Processing "+this.Ro.length+" events for site app with id "+e.id),this.Ro.forEac
2h(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(n=this.Lo)||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,gm.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),r&&n()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(e){i(e)}});s&&(t.processEvent=s),r=!0}catch(t){gm.error(ym+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){gm.error("Error while processing buffered events PostHog app with config id "+e.id,n),t.errored=!0}}Fo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Ao(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{null==n.processEvent||n.processEvent(t)}catch(t){gm.error("Error while processing event "+e.event+" for site app "+n.id,t)}}}onRemoteConfig(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.Fo(),void this._instance.on("eventCaptured",e=>this.Ao(e))):void gm.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this.Lo)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var s=function(e){var t;Io["__$$ph_site_app_"+e]=i._instance,null==(t=Io.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(i._instance,o,t=>{if(t)return gm.error(ym+e,t)})};for(var{id:a,url:o}of e.siteApps)s(a)}else gm.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},Hm={tracingHeaders:class{constructor(e){this.No=void 0,this.$o=void 0,this.so=()=>{var e,t,n=this.Do()||[];al(this.No)&&(null==(e=Io.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(n,this._instance.get_distinct_id(),this._instance.sessionManager)),al(this.$o)&&(null==(t=Io.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(n,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,n;null!=(t=Io.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(n=Io.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return rm.error("failed to load script",t);e()})}Do(){var e;return null!==(e=this._instance.config.addTracingHeaders)&&void 0!==e?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Do()?this.lr(this.so):(null==(e=this.No)||e.call(this),null==(t=this.$o)||t.call(this),this.No=void 0,this.$o=void 0)}}},Km=Fo({surveys:class{get qt(){return this._instance.config}constructor(e){this.qo=void 0,this._surveyManager=null,this.jo=!1,this.Ho=[],this.Uo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(ul(t))return Jp.warn("Flags not loaded yet. Not loading surveys.");var n=nl(t);this.qo=n?t.length>0:t,Jp.info("flags response received, isSurveysEnabled: "+this.qo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(null!=n&&n.startsWith(Zp)||null!=n&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.jo)Jp.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)Jp.info(jm);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())Jp.info("Not loading surveys in cookieless mode without consent.");else{var e=null==Io?void 0:Io.__PosthogExtensions__;if(e){if(!al(this.qo)||this.qt.advanced_enable_surveys){var t=this.qo||this.qt.advanced_enable_surveys;this.jo=!0;try{var n=e.generateSurveys;if(n)return void this.Bo(n,t);var r=e.loadExternalDependency;if(!r)return void this.zo(rd);r(this._instance,"surveys",n=>{n||!e.generateSurveys?this.zo("Could not load surveys script",n):this.Bo(e.generateSurveys,t)})}catch(e){throw this.zo("Error initializing surveys",e),e}finally{this.jo=!1}}}else Jp.error("PostHog Extensions not found.")}}Bo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new wm(this._instance),Jp.info("Surveys loaded successfully"),this.Vo({isLoaded:!0})}zo(e,t){Jp.error(e,t),this.Vo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ho.push(e),this._surveyManager&&this.Vo({isLoaded:!0}),()=>{this.Ho=this.Ho.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.qt.disable_surveys)return Jp.info(jm),e([]);var n,r=this._instance.get_property(Bu);if(r&&!t)return e(r,{isLoaded:!0});"undefined"!=typeof Promise&&this.Uo?this.Uo.then(t=>{var{surveys:n,context:r}=t;return e(n,r)}):("undefined"!=typeof Promise&&(this.Uo=new Promise(e=>{n=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:t=>{var r;this.Uo=null;var i=t.statusCode;if(200!==i||!t.json){var s="Surveys API could not be loaded, status: "+i;Jp.error(s);var a={isLoaded:!1,error:s};return e([],a),void(null==n||n({surveys:[],context:a}))}
vendor: 9,627 bytes, line 2
2var o,l=t.json.surveys||[],c=l.filter(e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)||function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e)));c.length>0&&(null==(o=this._surveyEventReceiver)||o.register(c)),null==(r=this._instance.persistence)||r.register({[Bu]:l});var u={isLoaded:!0};e(l,u),null==n||n({surveys:l,context:u})}}))}Vo(e){for(var t of this.Ho)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){Jp.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!ul(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Jp.warn("init was not called")}Wo(e){var t=null;return this.getSurveys(n=>{var r;t=null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:null}),t}Zo(e){if(ul(this._surveyManager))return{eligible:!1,reason:_m};var t="string"==typeof e?this.Wo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(ul(this._surveyManager))return Jp.warn("init was not called"),{visible:!1,disabledReason:_m};var t=this.Zo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return ul(this._surveyManager)?(Jp.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:_m})):new Promise(n=>{this.getSurveys(t=>{var r,i=null!==(r=t.find(t=>t.id===e))&&void 0!==r?r:null;if(i){var s=this.Zo(i);n({visible:s.eligible,disabledReason:s.reason})}else n({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,n){var r;if(ul(this._surveyManager))Jp.warn("init was not called");else{var i="string"==typeof e?this.Wo(e):e;if(null!=i&&i.id)if(Qp.includes(i.type)){var s=null==Eo?void 0:Eo.querySelector(t);if(s)return null!=(r=i.appearance)&&r.surveyPopupDelaySeconds?(Jp.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;Jp.info("Rendering survey "+i.id+" with delay of "+(null==(e=i.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(i,s,n),Jp.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s,n);Jp.warn("Survey element not found")}else Jp.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Jp.warn("Survey not found")}}displaySurvey(e,t){var n;if(ul(this._surveyManager))Jp.warn("init was not called");else{var r=this.Wo(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=Fo({},r,{appearance:Fo({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Oh&&t.initialResponses&&Jp.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var s=this.canRenderSurvey(r);if(!s.visible)return void Jp.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==Ih?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else Jp.warn("Survey not found")}}cancelPendingSurvey(e){ul(this._surveyManager)?Jp.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},Bm),Vm={toolbar:class{constructor(e){this.instance=e}Go(e){Io.ph_toolbar_state=e}Qo(){var e;return null!==(e=Io.ph_toolbar_state)&&void 0!==e?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),Nd(this.instance.config))return!1;if(!ko||!Eo)return!1;e=null!=e?e:ko.location,n=null!=n?n:ko.history;try{if(!t){try{ko.localStorage.setItem("test","test"),ko.localStorage.removeItem("test")}catch(ko){return!1}t=null==ko?void 0:ko.localStorage}var r,i=km||ih(e.hash,"__posthog")||ih(e.hash,"state"),s=i?vd(()=>JSON.parse(atob(decodeURIComponent(i))))||vd(()=>JSON.parse(decodeURIComponent(i))):null;return s&&"ph_authorize"===s.action?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(Nm)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch(ko){return!1}}Jo(e){var t=Io.ph_load_toolbar||Io.ph_load_editor;!ul(t)&&rl(t)?t(e,this.instance):Sm.warn("No toolbar load function found")}loadToolbar(e){var t=!(null==Eo||!Eo.getElementById(Qu));if(!ko||t)return!1;var n="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=Fo({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(ko.localStorage.setItem(Nm,JSON.stringify(Fo({},r,{source:void 0}))),2===this.Qo())this.Jo(r);else if(0===this.Qo()){var i;this.Go(1),null==(i=Io.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"toolbar",e=>{if(e)return Sm.error("[Toolbar] Failed to load",e),void this.Go(0);this.Go(2),this.Jo(r)}),kd(ko,"turbolinks:load",()=>{this.Go(0),this.loadToolbar(r)})}return!0}Ko(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},$m=Fo({experiments:Lm},Bm),Ym={conversations:class{constructor(e){this.Yo=void 0,this._conversationsManager=null,this.Xo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;ul(t)||(pl(t)?this.Yo=t:(this.Yo=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.Yo=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Xo||this._instance.config.disable_conversations||Nd(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==Io?void 0:Io.__PosthogExtensions__;if(e&&!al(this.Yo)&&this.Yo)if(this.ea&&this.ea.token){this.Xo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Xo=!1);var n=e.loadExternalDependency;if(!n)return void this.ra(rd);n(this._instance,"conversations",t=>{t||!e.initConversations?this.ra("Could not load conversations script",t):this.ta(e.initConversations),this.Xo=!1})}catch(e){this.ra("Error initializing conversations",e),this.Xo=!1}}else Rm.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Rm.info("Conversations loaded successfully")}catch(e){this.ra("Error completing conversations initialization",e)}else Rm.error("Cannot complete initialization: remote config is null")}ra(e,t){Rm.error(e,t),this._conversationsManager=null,this.Xo=!1}show(){this._conversationsManager?this._conversationsManager.show():Rm.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Yo&&!cl(this._conversationsManager)}isVisible(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&void 0!==e&&e}sendMessage(e,t,n){var r=this;return Bo(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(Rm.warn(Dm),null)})()}getMessages(e,t){var n=this;return Bo(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(Rm.warn(Dm),null)})()}markAsRead(e){var t=this;return Bo(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Rm.warn(Dm),null)})()}getTickets(e){var t=this;return Bo(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Rm.warn(Dm),null)})()}requestRestoreLink(e){var t=this;return Bo(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Rm.warn(Dm),null)})()}restoreFromToken(e){var t=this;return Bo(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Rm.warn(Dm),null)})()}restoreFromUrlToken(){var e=this;return Bo(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Rm.warn(Dm),null)})()}getCurrentTicketId(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())&&void 0!==e?e:null}getWidgetSessionId(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())&&void 0!==e?e:null}ln(){var e;null==(e=this._conversationsManager)||e.setIdentity()}hn(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},Gm={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=su("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.ua=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=null==(t=e.logs)?void 0:t.captureConsoleLogs;!ul(n)&&n&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.oa=0,this.aa=0,this.ua=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=null==Io?void 0:Io.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var n;t||null==(n=e.logs)||!n.initializeLogs?this.Gt.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.na=!0)}):this.Gt.error(rd)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,r,i,s,a;
2if(this._instance.is_capturing())if(e&&e.body){var o=null!==(t=null==(n=this._instance.config.logs)?void 0:n.flushIntervalMs)&&void 0!==t?t:3e3,l=null!==(r=null==(i=this._instance.config.logs)?void 0:i.maxLogsPerInterval)&&void 0!==r?r:1e3,c=Date.now();if(o>c-this.aa||(this.aa=c,this.oa=0,this.ua=!1),l>this.oa){this.oa++;var u=function(e,t){var n=e.level||"info",{text:r,number:i}=_c[n]||jc,s=String(Date.now())+"000000",a={};t.distinctId&&(a.posthogDistinctId=t.distinctId),t.sessionId&&(a.sessionId=t.sessionId),t.currentUrl&&(a["url.full"]=t.currentUrl),t.screenName&&(a["screen.name"]=t.screenName),t.appState&&(a["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(a.feature_flags=t.activeFeatureFlags);var o=Fo({},a,e.attributes||{}),l={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:i,severityText:r,body:{stringValue:e.body},attributes:Nc(o)};return e.trace_id&&(l.traceId=e.trace_id),e.span_id&&(l.spanId=e.span_id),al(e.trace_flags)||(l.flags=e.trace_flags),l}(e,this.la());this.sa.push({record:u}),(null!==(s=null==(a=this._instance.config.logs)?void 0:a.maxBufferSize)&&void 0!==s?s:100)>this.sa.length?this.ha():this.flushLogs()}else this.ua||(this.Gt.warn("captureLog dropping logs: exceeded "+l+" logs per "+o+"ms"),this.ua=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),0!==this.sa.length){var t=this.sa;this.sa=[];var n=this._instance.config.logs,r=Fo({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),i=function(e,t,n,r){return{resourceLogs:[{resource:{attributes:Nc(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}(t.map(e=>e.record),r,Ro.LIB_NAME,Ro.LIB_VERSION),s=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:s,data:i,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.qr||(this.qr=setTimeout(()=>{this.qr=void 0,this.flushLogs()},null!==(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)&&void 0!==e?e:3e3))}la(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(null!=Io&&null!=(e=Io.location)&&e.href&&(t.currentUrl=Io.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}},Jm=Fo({},Bm,Fm,Um,zm,qm,Wm,Km,Hm,Vm,$m,Ym,Gm);xf.__defaultExtensionClasses=Fo({},Jm);var Zm,Qm=(Zm=sf[hf]=new xf,function(){function e(){e.done||(e.done=!0,pf=!1,gd(sf,function(e){e._dom_loaded()}))}null!=Eo&&Eo.addEventListener?"complete"===Eo.readyState?e():kd(Eo,"DOMContentLoaded",e,{capture:!1}):ko&&iu.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),Zm);const Xm="phc_yUEDY36P5gAP6WpLLPMdJYTJ4eSpfpbpFk75QcYAkV5F",eg={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WALLETCONNECT_PROJECT_ID:"e2e467b49fe9d756576b7244146e1c1b",REACT_APP_POSTHOG_KEY:"phc_yUEDY36P5gAP6WpLLPMdJYTJ4eSpfpbpFk75QcYAkV5F",REACT_APP_STRIPE_PUBLISHABLE_KEY:"pk_live_51SwEigK4ikRiTdCMXRRHcDN0bPLkryTwAfC3BuJo2AxmNAKRpjIS2EHI0Id1Hm5DTATnvrTvQYzmqhJrRZqDhfFK00cifLVP5s",REACT_APP_GMGN_REFERRAL_CODE:"9E9bbGF8",REACT_APP_TURNSTILE_SITE_KEY:"0x4AAAAAACs84OQZ53l48ZTw"}.REACT_APP_POSTHOG_HOST||("undefined"!==typeof window?"".concat(window.location.origin,"/_phr"):"https://us.i.posthog.com"),tg="aa265573b3577750375979654fd2b22ac8d45ef2";let ng=!1;async function rg(e){if(!ng)return;const t=e.walletAddress?await async function(e){const t=(new TextEncoder).encode("deepnets:".concat(e)),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).slice(0,6).map(e=>e.toString(16).padStart(2,"0")).join("")}(e.walletAddress):void 0;Qm.identify(e.id,{walletFingerprint:t,tier:e.tier,dnetTier:e.dnetTier,dnetBalance:e.dnetBalance})}function ig(e,t){ng&&Qm.capture(e,sg(t))}function sg(e){const t={};for(const[n,r]of Object.entries(e))"walletAddress"!==n&&"wallet"!==n&&(t[n]=r);return t}function ag(e){return tg&&(e.app_version=tg),e}const og={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WALLETCONNECT_PROJECT_ID:"e2e467b49fe9d756576b7244146e1c1b",REACT_APP_POSTHOG_KEY:"phc_yUEDY36P5gAP6WpLLPMdJYTJ4eSpfpbpFk75QcYAkV5F",REACT_APP_STRIPE_PUBLISHABLE_KEY:"pk_live_51SwEigK4ikRiTdCMXRRHcDN0bPLkryTwAfC3BuJo2AxmNAKRpjIS2EHI0Id1Hm5DTATnvrTvQYzmqhJrRZqDhfFK00cifLVP5s",REACT_APP_GMGN_REFERRAL_CODE:"9E9bbGF8",REACT_APP_TURNSTILE_SITE_KEY:"0x4AAAAAACs84OQZ53l48ZTw"}.REACT_APP_DEEPNETS_API_HOST||"https://spa-api.deepnets.ai",lg="0x4AAAAAACs84OQZ53l48ZTw";let cg=null;const ug=Date.now();let dg=!1;function hg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;if(!dg){dg=!0;try{ig("spa_token_ready",(0,o.A)({source:e,ms:t,sinceLoadMs:Date.now()-ug},n?{reason:n}:{}))}catch(r){}}}const pg="deepnets_spa_token",fg="deepnets_spa_token_expires";let mg=null,gg=0,yg=null,xg=!1;!function(){try{const e=localStorage.getItem(pg),t=localStorage.getItem(fg);
2if(e&&t){const n=Number(t);n>Date.now()+3e5?(mg=e,gg=n):(localStorage.removeItem(pg),localStorage.removeItem(fg))}}catch(e){}}();let vg=null;function bg(){if(window.turnstile)return Promise.resolve();if(vg)return vg;const e=new Promise((e,t)=>{window.onloadTurnstileCallback=()=>e();const n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback",n.async=!0,n.crossOrigin="anonymous",n.onerror=()=>t(new Error("Failed to load Turnstile")),document.head.appendChild(n),setTimeout(()=>t(new Error("Turnstile script load timed out")),5e3)});return e.catch(()=>{vg=null}),vg=e,e}async function wg(e){try{const t=await fetch("".concat(og,"/api/spa/session"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({turnstileToken:e})});if(!t.ok)return cg="server_rejected",!1;const n=await t.json();return mg=n.token,gg=n.expiresAt,function(e,t){try{localStorage.setItem(pg,e),localStorage.setItem(fg,String(t))}catch(n){}}(n.token,n.expiresAt),!0}catch(t){return cg="network_error",!1}}async function _g(){const e=await(t=e=>{wg(e).then(e=>{if(e)try{ig("spa_token_late_recovery",{sinceLoadMs:Date.now()-ug})}catch(t){}})},xg?Promise.resolve(null):(xg=!0,new Promise(e=>{let n=!1,r=!1,i=null;const s=()=>
2{if(!i)return;const e=window.turnstile;try{null===e||void 0===e||e.remove(i)}catch(t){}i=null},a=t=>{n||(n=!0,e(t))},o=setTimeout(()=>{cg="challenge_timeout",a(null)},8e3),l=setTimeout(()=>{r=!0,xg=!1,s()},25e3);let c=!1;const u=e=>{c||(c=!0,clearTimeout(o),clearTimeout(l),xg=!1,s(),r||(n?t(e):a(e)))},d=e=>{clearTimeout(o),clearTimeout(l),xg=!1,s(),cg=e,a(null)};bg().then(()=>{const e=window.turnstile;if(!e)return void d("script_error");let t=document.getElementById("turnstile-container");if(t)try{e.remove(t)}catch(n){}else t=document.createElement("div"),t.id="turnstile-container",t.style.display="none",document.body.appendChild(t);i=t,e.render(t,{sitekey:lg,"refresh-expired":"never",callback:u,"error-callback":()=>d("challenge_rejected"),"timeout-callback":()=>d("challenge_timeout")})}).catch(()=>d("script_error"))})));var t;e&&await wg(e)}async function jg(){if(mg&&Date.now()<gg-2e3)hg("cache");else{if(!yg){const e=Date.now();yg=_g().finally(()=>{var t;yg=null,hg(mg?"turnstile":"failed",Date.now()-e,mg?void 0:null!==(t=cg)&&void 0!==t?t:"network_error")})}await yg}}function kg(e){if(mg&&e.set("x-spa-token",mg),!e.has("Authorization")){const t=localStorage.getItem("deepnets_token");t&&e.set("Authorization","Bearer ".concat(t))}}async function Ng(e,t){await jg();const n=new Headers(null===t||void 0===t?void 0:t.headers);kg(n);let r=await fetch(e,(0,o.A)((0,o.A)({},t),{},{headers:n}));if(403===r.status&&mg){mg=null,gg=0;try{localStorage.removeItem(pg),localStorage.removeItem(fg)}catch(i){}await jg();const n=new Headers(null===t||void 0===t?void 0:t.headers);kg(n),r=await fetch(e,(0,o.A)((0,o.A)({},t),{},{headers:n}))}if(429===r.status){const n=parseInt(r.headers.get("Retry-After")||"",10),i=Math.min(1e3*(n||2),1e4);await new Promise(e=>setTimeout(e,i)),await jg();const s=new Headers(null===t||void 0===t?void 0:t.headers);return kg(s),fetch(e,(0,o.A)((0,o.A)({},t),{},{headers:s}))}return r}function Sg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(mg)return;let t=!1;const r=setTimeout(()=>{t||mg||n(!0)},e);return jg().finally(()=>{t||(clearTimeout(r),n(!1))}),()=>{t=!0,clearTimeout(r)}},[e]),t}function Eg(){return og}lg&&!mg&&bg().catch(()=>{});const Ag=Eg();let Cg=null,Mg=null;async function Tg(){var e,t,n,r,i,s,a,o,l,c,u,d,h,p,f,m,g,y,x,v,b,w,_,j;const k=new Date,N=localStorage.getItem("deepnets_token"),S={hasToken:!!N};if(N){S.tokenPrefix=N.substring(0,20)+"\u2026";try{const e=function(e){const t=e.split(".");if(3!==t.length)throw new Error("Not a valid JWT (expected 3 parts)");return JSON.parse(atob(t[1].replace(/-/g,"+").replace(/_/g,"/")))}(N),t=new Date(1e3*e.exp),n=(t.getTime()-k.getTime())/36e5;S.jwt={payload:e,exp:t.toISOString(),expUnix:e.exp,hoursLeft:Math.round(10*n)/10,expired:t<k}}catch(d$){S.decodeError=d$.message}}const E=null!==(e=Cg)&&void 0!==e?e:{user:null,isAuthenticated:!1,isLoading:!1},A=null!==(t=Mg)&&void 0!==t?t:{connected:!1,publicKey:null};let C;if(N)try{const e=await fetch("".concat(Ag,"/api/auth/me"),{headers:{Authorization:"Bearer ".concat(N),"Content-Type":"application/json"}}),t=await e.json().catch(()=>null);C={status:e.status,ok:e.ok,body:t}}catch(d$){C={status:0,ok:!1,body:{networkError:d$.message}}}const M=document.querySelector("header"),T=((null===M||void 0===M?void 0:M.textContent)||"").trim().replace(/\s+/g," ").substring(0,300),P=!!(/\.\.\./.test(T)||null!==(n=E.user)&&void 0!==n&&n.username)&&T.includes(null===(r=E.user)||void 0===r?void 0:r.username),O=/\d/.test(T)&&!/deepnets\.ai/.test(T.replace(/\d/g,"")),I={headerText:T,showsWalletOrName:P,showsCredits:O};let L;L=N?null!==(i=S.jwt)&&void 0!==i&&i.expired?E.isAuthenticated?"\ud83d\udd34 Token EXPIRED in localStorage but React still shows authenticated \u2192 UI is lying, next API call will 401":"\ud83d\udfe1 Token expired and React cleared state \u2014 but token still in localStorage (should be removed)":C&&!C.ok?E.isAuthenticated?"\ud83d\udd34 Server REJECTS token (".concat(C.status,") but React shows authenticated \u2192 stale state, user sees UI but API calls fail"):"\ud83d\udfe1 Server rejects token (".concat(C.status,") and React is not authenticated \u2014 token should be cleared from localStorage"):null!==(s=C)&&void 0!==s&&s.ok&&E.isAuthenticated?"\ud83d\udfe2 All consistent \u2014 token valid, server accepts it, React shows authenticated":null!==(a=C)&&void 0!==a&&a.ok&&!E.isAuthenticated?"\ud83d\udfe1 Server accepts token but React shows NOT authenticated \u2192 refreshUser() may not have run or failed":"\ud83d\udfe1 Unable to fully determine \u2014 check individual fields":E.isAuthenticated?"\ud83d\udd34 No token in localStorage but React thinks user is authenticated \u2192 stale React state":"\ud83d\udfe2 No token, not authenticated \u2014 consistent";const R={ts:k.toISOString(),localStorage:S,react:{user:E.user,isAuthenticated:E.isAuthenticated,isLoading:E.isLoading},wallet:A,server:C,dom:I,diagnosis:L};return console.group("\ud83d\udd0d deepnetsDiag()"),console.log("%c"+L,"font-size: 14px; font-weight: bold;"),console.log(""),console.log("%clocalStorage","font-weight: bold; color: #5b6ef5;"),console.table({"Has token":S.hasToken,"Token prefix":null!==(o=S.tokenPrefix)&&void 0!==o?o:"\u2014","JWT expired":null!==(l=null===(c=S.jwt)||void 0===c?void 0:c.expired)&&void 0!==l?l:"\u2014","Hours left"
2:null!==(u=null===(d=S.jwt)||void 0===d?void 0:d.hoursLeft)&&void 0!==u?u:"\u2014",Expires:null!==(h=null===(p=S.jwt)||void 0===p?void 0:p.exp)&&void 0!==h?h:"\u2014"}),null!==(f=S.jwt)&&void 0!==f&&f.payload&&console.log("JWT payload:",S.jwt.payload),console.log(""),console.log("%cReact AuthContext","font-weight: bold; color: #5b6ef5;"),console.table({isAuthenticated:E.isAuthenticated,isLoading:E.isLoading,"user.id":null!==(m=null===(g=E.user)||void 0===g?void 0:g.id)&&void 0!==m?m:"\u2014","user.username":null!==(y=null===(x=E.user)||void 0===x?void 0:x.username)&&void 0!==y?y:"\u2014","user.walletAddress":null!==(v=null===(b=E.user)||void 0===b?void 0:b.walletAddress)&&void 0!==v?v:"\u2014","user.credits":null!==(w=null===(_=E.user)||void 0===_?void 0:_.credits)&&void 0!==w?w:"\u2014"}),console.log(""),console.log("%cWallet Adapter","font-weight: bold; color: #5b6ef5;"),console.table({connected:A.connected,publicKey:null!==(j=A.publicKey)&&void 0!==j?j:"\u2014"}),C&&(console.log(""),console.log("%cServer /api/auth/me","font-weight: bold; color: #5b6ef5;"),console.log("Status: ".concat(C.status," ").concat(C.ok?"\u2705":"\u274c")),console.log("Response:",C.body)),console.groupEnd(),R}let Pg={isAuthenticated:!1};function Og(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{const n=(0,o.A)((0,o.A)((0,o.A)((0,o.A)({isAuthenticated:Pg.isAuthenticated},void 0!==Pg.userTier?{userTier:Pg.userTier}:{}),void 0!==Pg.dnetTier?{dnetTier:Pg.dnetTier}:{}),void 0!==Pg.dnetBalance?{dnetBalance:Pg.dnetBalance}:{}),t);Ng("".concat(Eg(),"/api/analytics/event"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,props:n,ts:Date.now()}),keepalive:!0}).catch(()=>{}),ig(e,n)}catch(n){}}function Ig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{const n=e instanceof Error?e.message:String(e);!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!ng)return;const n=e instanceof Error?e:new Error("string"===typeof e?e:(()=>{try{return JSON.stringify(e)}catch(t){return String(e)}})());Qm.captureException(n,sg(t))}(e,t),Og("client_error",(0,o.A)((0,o.A)({},t),{},{message:n}))}catch(n){}}var Lg=n(579);const Rg=Eg(),Dg=(0,r.createContext)(void 0),Bg=()=>{const e=(0,r.useContext)(Dg);if(void 0===e)throw new Error("useAuth must be used within an AuthProvider");return e},Fg=e=>{let{children:t}=e;const[i,s]=(0,r.useState)(null),[a,l]=(0,r.useState)(!0),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)(null),p=(0,r.useCallback)((e,t,n)=>{Og("login_prompt_clicked",(0,o.A)({source:e},n||{})),h(null!==t&&void 0!==t?t:null),u(!0)},[]),f=(0,r.useCallback)(e=>{p("gated_link",e)},[p]),m=(0,r.useCallback)(()=>h(null),[]),{publicKey:g,signMessage:y,connected:x,connecting:v,disconnect:b,wallet:w,connect:_}=Ca(),{visible:j}=Ba(),k=r.useRef(!1);(0,r.useEffect)(()=>{k.current&&!j&&(!w||x||v||_().catch(e=>{console.warn("Wallet connect after modal close failed:",e)})),k.current=j},[j,w,x,v,_]);const N=()=>localStorage.getItem("deepnets_token"),S=e=>{localStorage.setItem("deepnets_token",e)},E=()=>{localStorage.removeItem("deepnets_token")},A=()=>{const e=N();return e?{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}:{"Content-Type":"application/json"}},C=(0,r.useCallback)(async()=>{const e=N();if(!e)return s(null),void l(!1);try{const t=await Ng("".concat(Rg,"/api/auth/me?bustCache=true"),{headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(t.ok){const e=await t.json();s(e.user)}else E(),s(null)}catch(t){console.error("Error refreshing user:",t)}finally{l(!1)}},[]);(0,r.useEffect)(()=>{C()},[C]);const M=r.useRef(!1);(0,r.useEffect)(()=>{if(x){if(x&&!a&&!i){if(N())return void C()}if(x&&g&&y&&!a&&!i&&!M.current&&!I.current&&!c){if(N())return;M.current=!0,T(g.toBase58(),y).catch(()=>{M.current=!1})}}else M.current=!1},[x,g,y,i,a,c]);const T=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"wallet";const r=(new Date).toISOString(),i="Sign in to deepnets.ai\nTimestamp: ".concat(r),a=(new TextEncoder).encode(i),o=await t(a),l=Bs.A.encode(o),c=await Ng("".concat(Rg,"/api/auth/wallet"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({walletAddress:e,signature:l,message:i})});if(!c.ok){const e=await c.json().catch(()=>({error:"Login failed"}));throw Og("login_failed",{method:n,status:c.status,reason:String(e.error||"Login failed").slice(0,80)}),new Error(e.error||"Login failed")}const d=await c.json();S(d.token),s(d.user),u(!1),Og("login_completed",{method:n}),C()},P=(0,r.useCallback)(async function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"wallet";const a=Bs.A.encode(r),o=await Ng("".concat(Rg,"/api/auth/wallet"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({walletAddress:e,signature:a,message:t})});if(!o.ok){const e=await o.json().catch(()=>({}));throw Og("login_failed",{method:i,status:o.status,reason:String(e.error||"Login failed").slice(0,80)}),new Error(e.error||"Login failed")}const l=await o.json();S(l.token),s(l.user),u(!1),Og("login_completed",{method:i}),Promise.resolve().then(n.bind(n,1051)).then(t=>{t.persistentPhantomWalletMatches(e)||t.clearPersistentPhantomSession()}).catch(()=>{}),await C()},[]),O=(0,r.useCallback)(async()=>
2{if(!g||!y)throw new Error("Wallet not connected");try{await T(g.toBase58(),y)}catch(e){throw console.error("Wallet login error:",e),Og("login_failed",{method:"wallet",reason:(e instanceof Error?e.message:"unknown").slice(0,80)}),e}},[g,y]),I=r.useRef(!1),L=(0,r.useCallback)(()=>{I.current=!0,E(),s(null),M.current=!1,ng&&Qm.reset(),Promise.resolve().then(n.bind(n,8631)).then(e=>e.clearWCSession()).catch(()=>{}),x?b().finally(()=>{I.current=!1}):I.current=!1},[x,b]),R=(0,r.useCallback)(async()=>{if(!g||!y)throw new Error("Wallet not connected");if(!N())throw new Error("Not authenticated");const e=(new Date).toISOString(),t="Link wallet to deepnets.ai account\nTimestamp: ".concat(e),n=(new TextEncoder).encode(t);try{const e=await y(n),r=Bs.A.encode(e),i=g.toBase58(),a=await Ng("".concat(Rg,"/api/auth/link-wallet"),{method:"POST",headers:A(),body:JSON.stringify({walletAddress:i,signature:r,message:t})});if(!a.ok){const e=await a.json();throw new Error(e.error||"Failed to link wallet")}const o=await a.json();S(o.token),s(o.user)}catch(r){throw console.error("Link wallet error:",r),r}},[g,y]);(0,r.useEffect)(()=>{var e;!function(e,t){Cg=e,Mg=t}({user:i,isAuthenticated:!!i,isLoading:a},{connected:x,publicKey:null!==(e=null===g||void 0===g?void 0:g.toBase58()
2)&&void 0!==e?e:null}),window.deepnetsDiag=Tg}),(0,r.useEffect)(()=>{var e;e={isAuthenticated:!!i,userTier:null===i||void 0===i?void 0:i.tier,dnetTier:null===i||void 0===i?void 0:i.dnetTier,dnetBalance:null===i||void 0===i?void 0:i.dnetBalance},Pg=e,i&&rg({id:i.id,walletAddress:i.walletAddress,tier:i.tier,dnetTier:i.dnetTier,dnetBalance:i.dnetBalance}).catch(()=>{})},[i]);const D={user:i,isAuthenticated:!!i,isLoading:a,loginWithWallet:O,loginWithSignedMessage:P,openLogin:p,loginWithEmail:async e=>{try{const t=await Ng("".concat(Rg,"/api/auth/email/request"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})}),n=await t.json();if(!t.ok)throw new Error(n.error||"Failed to send magic link");return{success:!0,message:n.message}}catch(t){throw console.error("Email login error:",t),t}},verifyEmailToken:async e=>{try{const t=await Ng("".concat(Rg,"/api/auth/email/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e})});if(!t.ok){const e=await t.json();throw new Error(e.error||"Token verification failed")}const n=await t.json();S(n.token),s(n.user),u(!1),Og("login_completed",{method:"email"}),await C()}catch(t){throw console.error("Email verify error:",t),t}},logout:L,refreshUser:C,linkWallet:R,linkEmail:async e=>{if(!N())throw new Error("Not authenticated");try{const t=await Ng("".concat(Rg,"/api/auth/link-email"),{method:"POST",headers:A(),body:JSON.stringify({email:e})});if(!t.ok){const e=await t.json();throw new Error(e.error||"Failed to link email")}const n=await t.json();S(n.token),s(n.user)}catch(t){throw console.error("Link email error:",t),t}},showLoginModal:c,setShowLoginModal:u,pendingLoginRedirect:d,requestLogin:f,clearPendingLoginRedirect:m};return(0,Lg.jsx)(Dg.Provider,{value:D,children:t})},Ug={watcher:1e6,deep_diver:15e6},zg={watcher:10,deep_diver:150},qg="https://jup.ag/tokens/93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump";function Wg(e){switch(e){case"deep_diver":return"Deep Diver";case"watcher":return"Watcher";default:return"Free"}}function Hg(e){switch(e){case"deep_diver":return"text-purple-400";case"watcher":return"text-crypto-accent";default:return"text-gray-400"}}function Kg(e){switch(e){case"deep_diver":return"\ud83d\udd31";case"watcher":return"\ud83d\udc41\ufe0f";default:return""}}function Vg(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toFixed(0)}function $g(e){return"watcher"===e||"deep_diver"===e}function Yg(e){return"deep_diver"===e}function Gg(e){const t=new Uint8Array(e);let n="";for(const r of t)n+=String.fromCharCode(r);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Jg(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,"="),i=atob(r),s=new ArrayBuffer(i.length),a=new Uint8Array(s);for(let o=0;o<i.length;o++)a[o]=i.charCodeAt(o);return s}function Zg(){return Qg.stubThis(void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.PublicKeyCredential)&&"function"===typeof globalThis.PublicKeyCredential)}const Qg={stubThis:e=>e};function Xg(e){const{id:t}=e;return(0,o.A)((0,o.A)({},e),{},{id:Jg(t),transports:e.transports})}function ey(e){return"localhost"===e||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}class ty extends Error{constructor(e){let{message:t,code:n,cause:r,name:i}=e;super(t,{cause:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=null!==i&&void 0!==i?i:r.name,this.code=n}}const ny=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const e=new Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}},ry=["cross-platform","platform"];function iy(e){if(e&&!(ry.indexOf(e)<0))return e}async function sy(e){var t;!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:n,useAutoRegister:r=!1}=e;
2if(!Zg())throw new Error("WebAuthn is not supported in this browser");const i=(0,o.A)((0,o.A)({},n),{},{challenge:Jg(n.challenge),user:(0,o.A)((0,o.A)({},n.user),{},{id:Jg(n.user.id)}),excludeCredentials:null===(t=n.excludeCredentials)||void 0===t?void 0:t.map(Xg)}),s={};let a;r&&(s.mediation="conditional"),s.publicKey=i,s.signal=ny.createNewAbortSignal();try{a=await navigator.credentials.create(s)}catch(g){throw function(e){let{error:t,options:n}=e;const{publicKey:r}=n;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===t.name){if(n.signal instanceof AbortSignal)return new ty({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if("ConstraintError"===t.name){var i,s,a;if(!0===(null===(i=r.authenticatorSelection)||void 0===i?void 0:i.requireResidentKey))return new ty({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if("conditional"===n.mediation&&"required"===(null===(s=r.authenticatorSelection)||void 0===s?void 0:s.userVerification))return new ty({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if("required"===(null===(a=r.authenticatorSelection)||void 0===a?void 0:a.userVerification))return new ty({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if("InvalidStateError"===t.name)return new ty({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if("NotAllowedError"===t.name)return new ty({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if("NotSupportedError"===t.name)return 0===r.pubKeyCredParams.filter(e=>"public-key"===e.type).length?new ty({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new ty({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if("SecurityError"===t.name){const e=globalThis.location.hostname;if(!ey(e))return new ty({message:"".concat(globalThis.location.hostname," is an invalid domain"),code:"ERROR_INVALID_DOMAIN",cause:t});if(r.rp.id!==e)return new ty({message:'The RP ID "'.concat(r.rp.id,'" is invalid for this domain'),code:"ERROR_INVALID_RP_ID",cause:t})}else if("TypeError"===t.name){if(r.user.id.byteLength<1||r.user.id.byteLength>64)return new ty({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if("UnknownError"===t.name)return new ty({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}({error:g,options:s})}if(!a)throw new Error("Registration was not completed");const{id:l,rawId:c,response:u,type:d}=a;let h,p,f,m;if("function"===typeof u.getTransports&&(h=u.getTransports()),"function"===typeof u.getPublicKeyAlgorithm)try{p=u.getPublicKeyAlgorithm()}catch(y){ay("getPublicKeyAlgorithm()",y)}if("function"===typeof u.getPublicKey)try{const e=u.getPublicKey();null!==e&&(f=Gg(e))}catch(y){ay("getPublicKey()",y)}if("function"===typeof u.getAuthenticatorData)try{m=Gg(u.getAuthenticatorData())}catch(y){ay("getAuthenticatorData()",y)}return{id:l,rawId:Gg(c),response:{attestationObject:Gg(u.attestationObject),clientDataJSON:Gg(u.clientDataJSON),transports:h,publicKeyAlgorithm:p,publicKey:f,authenticatorData:m},type:d,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:iy(a.authenticatorAttachment)}}function ay(e,t){console.warn("The browser extension that intercepted this WebAuthn API call incorrectly implemented ".concat(e,". You should report this error to them.\n"),t)}const oy={stubThis:e=>e};async function ly(e){var t;!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:n,useBrowserAutofill:r=!1,verifyBrowserAutofillInput:i=!0}=e;
2if(!Zg())throw new Error("WebAuthn is not supported in this browser");let s;var a;0!==(null===(t=n.allowCredentials)||void 0===t?void 0:t.length)&&(s=null===(a=n.allowCredentials)||void 0===a?void 0:a.map(Xg));const l=(0,o.A)((0,o.A)({},n),{},{challenge:Jg(n.challenge),allowCredentials:s}),c={};if(r){if(!await function(){if(!Zg())return oy.stubThis(new Promise(e=>e(!1)));const e=globalThis.PublicKeyCredential;return void 0===(null===e||void 0===e?void 0:e.isConditionalMediationAvailable)?oy.stubThis(new Promise(e=>e(!1))):oy.stubThis(e.isConditionalMediationAvailable())}())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&i)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');c.mediation="conditional",l.allowCredentials=[]}let u;c.publicKey=l,c.signal=ny.createNewAbortSignal();try{u=await navigator.credentials.get(c)}catch(g){throw function(e){let{error:t,options:n}=e;const{publicKey:r}=n;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===t.name){if(n.signal instanceof AbortSignal)return new ty({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if("NotAllowedError"===t.name)return new ty({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if("SecurityError"===t.name){const e=globalThis.location.hostname;if(!ey(e))return new ty({message:"".concat(globalThis.location.hostname," is an invalid domain"),code:"ERROR_INVALID_DOMAIN",cause:t});if(r.rpId!==e)return new ty({message:'The RP ID "'.concat(r.rpId,'" is invalid for this domain'),code:"ERROR_INVALID_RP_ID",cause:t})}else if("UnknownError"===t.name)return new ty({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}({error:g,options:c})}if(!u)throw new Error("Authentication was not completed");const{id:d,rawId:h,response:p,type:f}=u;let m;return p.userHandle&&(m=Gg(p.userHandle)),{id:d,rawId:Gg(h),response:{authenticatorData:Gg(p.authenticatorData),clientDataJSON:Gg(p.clientDataJSON),signature:Gg(p.signature),userHandle:m},type:f,clientExtensionResults:u.getClientExtensionResults(),authenticatorAttachment:iy(u.authenticatorAttachment)}}let cy=null;function uy(e){cy=e}function dy(e){const t="".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search);return e?"".concat(t,"#").concat(e):window.location.href}function hy(e,t){const n=encodeURIComponent(dy(t)),r=encodeURIComponent(window.location.origin);switch(e){case"phantom":return"https://phantom.app/ul/browse/".concat(n,"?ref=").concat(r);case"solflare":return"https://solflare.com/ul/v1/browse/".concat(n,"?ref=").concat(r);case"backpack":return"https://backpack.app/ul/v1/browse/".concat(n,"?ref=").concat(r)}}function py(e){return!!function(){var e,t,n,r,i;if("undefined"===typeof window||"undefined"===typeof navigator)return!1;if(!/iPhone|iPad|iPod|Android/i.test(navigator.userAgent))return!1;let s=!1;try{s=pa().get().length>0}catch(c){}const a=window,o="function"===typeof(null===(e=a.solana)||void 0===e?void 0:e.connect),l=!!(a.backpack||null!==(t=a.solflare)&&void 0!==t&&t.isSolflare||a.glowSolana||null!==(n=a.coin98)&&void 0!==n&&n.sol||null!==(r=a.trustwallet)&&void 0!==r&&r.solana||null!==(i=a.bitkeep)&&void 0!==i&&i.solana);return!s&&!o&&!l}()&&(cy?(cy(e),!0):(window.location.href=hy("phantom",e),!0))}const fy=e=>{var t;let{isOpen:n,onClose:i}=e;const{setVisible:s}=Ba(),{connected:a,publicKey:o,signMessage:l}=Ca(),{isAuthenticated:c,loginWithWallet:u,loginWithEmail:d,refreshUser:h}=Bg(),[p,f]=(0,r.useState)(null),[m,g]=(0,r.useState)(!1),[y,x]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),[w,_]=(0,r.useState)(""),[j,k]=(0,r.useState)(!1),[N,S]=(0,r.useState)(!1),E="undefined"!==typeof window&&"undefined"!==typeof navigator&&"credentials"in navigator&&"function"===typeof(null===(t=navigator.credentials)||void 0===t?void 0:t.get);(0,r.useEffect)(()=>{c&&(g(!1),x(!1),f(null),S(!1),_(""),i())},[c,i]),(0,r.useEffect)(()=>{n&&(f(null),S(!1),_(""))},[n]);const A=(0,r.useCallback)(async()=>
2{if(a&&o&&l&&!m){g(!0),f(null);try{await u()}catch(n){var e,t;null!==n&&void 0!==n&&null!==(e=n.message)&&void 0!==e&&e.includes("User rejected")||null!==n&&void 0!==n&&null!==(t=n.message)&&void 0!==t&&t.includes("rejected")?f("Sign request cancelled"):f((null===n||void 0===n?void 0:n.message)||"Login failed. Please try again.")}finally{g(!1),x(!1)}}},[a,o,l,m,u]);(0,r.useEffect)(()=>{y&&a&&o&&l&&!c&&A()},[y,a,o,l,c,A]);return n?(0,Lg.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px]",onClick:i}),(0,Lg.jsxs)("div",{className:"relative bg-crypto-gray border border-gray-700 rounded-xl p-6 w-full max-w-md mx-4 shadow-2xl",children:[(0,Lg.jsx)("button",{onClick:i,className:"absolute top-4 right-4 text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,Lg.jsxs)("div",{className:"text-center mb-5",children:[(0,Lg.jsx)("h2",{className:"text-xl font-bold text-white",children:"See the full picture \u2014 free"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mt-1.5",children:"Unlock full holder analysis, safety history, and the trending feed."}),(0,Lg.jsx)("div",{className:"inline-flex items-center gap-1.5 mt-3 text-xs font-medium text-crypto-accent bg-crypto-accent/10 border border-crypto-accent/25 rounded-full px-3 py-1",children:"\u2728 New accounts get free credits to start"})]}),N?(0,Lg.jsxs)("div",{className:"text-center py-4",children:[(0,Lg.jsx)("div",{className:"text-4xl mb-3",children:"\u2709\ufe0f"}),(0,Lg.jsx)("h3",{className:"text-lg font-semibold text-white mb-2",children:"Check your email"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-4",children:["We sent a sign-in link to ",(0,Lg.jsx)("span",{className:"text-white font-medium",children:w}),". Click it to sign in."]}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs",children:["Didn't get it?"," ",(0,Lg.jsx)("button",{onClick:()=>{S(!1),f(null)},className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"Try again"})]})]}):(0,Lg.jsxs)("div",{className:"space-y-3",children:[(0,Lg.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),w.trim()&&!j){k(!0),f(null);try{await d(w.trim()),S(!0),Og("email_link_requested")}catch(t){f((null===t||void 0===t?void 0:t.message)||"Failed to send sign-in link"),Og("email_link_failed",{reason:null!==t&&void 0!==t&&t.message?String(t.message).slice(0,80):"unknown"})}finally{k(!1)}}},className:"space-y-2",children:[(0,Lg.jsx)("input",{type:"email",value:w,onChange:e=>_(e.target.value),placeholder:"[email protected]",className:"w-full bg-crypto-dark border border-gray-600 rounded-lg px-4 py-3 text-white placeholder-gray-500 focus:outline-none focus:border-crypto-accent transition-colors text-sm",required:!0}),(0,Lg.jsx)("button",{type:"submit",disabled:j||!w.trim(),className:"w-full flex items-center justify-center gap-2 bg-crypto-accent hover:bg-crypto-accent/80 disabled:opacity-60 disabled:cursor-not-allowed text-crypto-dark font-medium py-3 px-4 rounded-lg transition-colors",children:j?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"w-4 h-4 border-2 border-crypto-dark border-t-transparent rounded-full animate-spin"}),"Sending\u2026"]}):"Email me a sign-in link"})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,Lg.jsx)("div",{className:"flex-1 border-t border-gray-700"}),(0,Lg.jsx)("span",{className:"text-gray-500 text-xs",children:"or continue with"}),(0,Lg.jsx)("div",{className:"flex-1 border-t border-gray-700"})]}),(0,Lg.jsx)("button",{onClick:()=>{f(null),py()||(a&&o&&l?A():(x(!0),s(!0)))},disabled:m,className:"w-full flex items-center justify-center gap-3 bg-gray-700 hover:bg-gray-600 disabled:opacity-60 disabled:cursor-not-allowed text-white font-medium py-3 px-4 rounded-lg transition-colors",children:m?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent roun
2ded-full animate-spin"}),"Signing in\u2026"]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Lg.jsx)("path",{d:"M21 18v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v1h-9a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h9zm-9-2h10V8H12v8zm4-2.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"})}),a?"Sign In with Wallet":"Connect Wallet"]})}),E&&(0,Lg.jsx)("button",{onClick:async()=>{if(!v){b(!0),f(null);try{const e=await Ng("".concat(Eg(),"/api/auth/passkey/login/begin"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error||"Failed to start passkey sign-in")}const t=await e.json(),n=await ly({optionsJSON:t}),r=await Ng("".concat(Eg(),"/api/auth/passkey/login/complete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.error||"Passkey sign-in failed")}const i=await r.json();if(!i.token)throw new Error("Sign-in did not return a token");localStorage.setItem("deepnets_token",i.token),Og("login_completed",{method:"passkey"}),await h()}catch(e){const t=(null===e||void 0===e?void 0:e.message)||"Passkey sign-in failed";t.includes("cancel")||t.includes("timed out")||t.includes("NotAllowed")?f("Cancelled."):f(t)}finally{b(!1)}}},disabled:v||m,className:"w-full flex items-center justify-center gap-2 bg-gray-700 hover:bg-gray-600 disabled:opacity-60 disabled:cursor-not-allowed text-white font-medium py-3 px-4 rounded-lg transition-colors",children:v?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Follow prompts on your device\u2026"]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),"Sign in with Passkey"]})}),p&&(0,Lg.jsx)("p",{className:"text-center text-red-400 text-sm",children:p}),(0,Lg.jsx)("p",{className:"text-center text-gray-500 text-xs mt-3",children:"Email or passkey takes seconds. Connect a wallet anytime to unlock $DNET tier access."})]}),(0,Lg.jsx)("div",{className:"mt-6 pt-4 border-t border-gray-700",children:(0,Lg.jsxs)("p",{className:"text-center text-gray-500 text-xs",children:["By signing in, you agree to our"," ",(0,Lg.jsx)(ft,{to:"/terms",onClick:i,className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"Terms of Service"})]})})]})]}):null},my=e=>{const t=e=>e>=100?Math.round(e).toString():e>=10?e.toFixed(1).replace(/\.0$/,""):e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"");return e>=1e9?"".concat(t(e/1e9),"B"):e>=1e6?"".concat(t(e/1e6),"M"):e>=1e3?"".concat(t(e/1e3),"K"):Math.round(e).toString()},gy=e=>"".concat(e.slice(0,4),"\u2026").concat(e.slice(-4)),yy=e=>{let{icon:t,label:n,onClick:r,value:i}=e;return(0,Lg.jsxs)("button",{onClick:r,className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-gray-300 hover:bg-gray-800/60 hover:text-white transition-colors",role:"menuitem",children:[(0,Lg.jsx)("i",{className:"fas ".concat(t," w-4 text-center text-gray-500")}),(0,Lg.jsx)("span",{className:"flex-1 text-left",children:n}),i&&(0,Lg.jsx)("span",{className:"text-white font-medium",children:i})]})},xy=e=>{let{open:t,onClose:n,triggerRef:i}=e;const{user:s,logout:a}=Bg(),o=he(),l=(0,r.useRef)(null),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{if(!t)return;const e=e=>{var t,r;const s=e.target;null!==(t=l.current)&&void 0!==t&&t.contains(s)||null!==(r=i.current)&&void 0!==r&&r.contains(s)||n()},r=e=>{"Escape"===e.key&&n()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",r)}},[t,n,i]),(0,r.useEffect)(()=>
2{if(!t)return;if(null===s||void 0===s||!s.walletAddress)return void u(0);let e=!1;return(async()=>{try{const t=await Ng("".concat(Eg(),"/api/burn/dnet-balance/").concat(s.walletAddress));if(!t.ok)return;const n=await t.json();e||u(n.balance)}catch(t){}})(),()=>{e=!0}},[t,null===s||void 0===s?void 0:s.walletAddress]),!t||!s)return null;const p=e=>{n(),o(e)};return(0,Lg.jsxs)("div",{ref:l,role:"menu",className:"absolute right-0 top-full mt-2 w-72 bg-crypto-gray border border-gray-700 rounded-xl shadow-2xl overflow-hidden z-50 animate-fadeIn",children:[s.walletAddress&&(0,Lg.jsx)("div",{className:"p-4 border-b border-gray-800",children:(0,Lg.jsxs)("button",{onClick:()=>{s.walletAddress&&(navigator.clipboard.writeText(s.walletAddress),h(!0),setTimeout(()=>h(!1),1500))},className:"flex items-center gap-1.5 text-xs text-gray-400 hover:text-crypto-accent transition-colors font-mono group",title:"Copy address",children:[(0,Lg.jsx)("span",{children:gy(s.walletAddress)}),(0,Lg.jsx)("svg",{className:"w-3 h-3 opacity-60 group-hover:opacity-100",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})}),d&&(0,Lg.jsx)("span",{className:"text-crypto-accent",children:"copied"})]})}),(0,Lg.jsx)("div",{className:"px-4 py-3 border-b border-gray-800",children:(0,Lg.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Lg.jsx)("span",{className:"text-gray-400",children:"$DNET balance"}),(0,Lg.jsx)("span",{className:"text-white font-medium",children:null!==c?my(c):void 0!==s.dnetBalance?my(s.dnetBalance):"\u2026"})]})}),(0,Lg.jsxs)("nav",{className:"py-1",children:[(0,Lg.jsx)(yy,{icon:"fa-user",label:"Account",onClick:()=>p("/profile")}),(0,Lg.jsx)(yy,{icon:"fa-coins",label:"Credits",onClick:()=>p("/profile/credits"),value:s.credits.toLocaleString()}),(0,Lg.jsx)(yy,{icon:"fa-key",label:"API Keys",onClick:()=>p("/api-keys")}),(0,Lg.jsx)(yy,{icon:"fa-shield-halved",label:"Security",onClick:()=>p("/profile/security")})]}),(0,Lg.jsx)("div",{className:"border-t border-gray-800 py-1",children:(0,Lg.jsxs)("button",{onClick:()=>{n(),a()},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-red-400 hover:bg-red-500/10 transition-colors",role:"menuitem",children:[(0,Lg.jsx)("i",{className:"fas fa-right-from-bracket w-4 text-center"}),"Sign Out"]})})]})},vy=e=>{let{className:t}=e;return(0,Lg.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Lg.jsx)("path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4"}),(0,Lg.jsx)("path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5"}),(0,Lg.jsx)("path",{d:"M18 12a1 1 0 0 0 0 4h4v-4h-4z"})]})},by=()=>{var e;const{user:t,isAuthenticated:n,isLoading:i,showLoginModal:s,setShowLoginModal:a,openLogin:o,clearPendingLoginRedirect:l}=Bg(),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1),p=(0,r.useRef)(null);return(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("header",{className:"border-b border-gray-800 bg-crypto-gray/50 backdrop-blur-sm sticky top-0 z-50",children:[(0,Lg.jsx)("div",{className:"max-w-7xl mx-auto px-3 sm:px-6 py-4",children:(0,Lg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Lg.jsxs)(ft,{to:"/",className:"flex items-center space-x-2 text-white no-underline",children:[(0,Lg.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Lg.jsx)("line",{x1:"15",y1:"15",x2:"15",y2:"3",stroke:"#5b6ef5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,Lg.jsx)("line",{x1:"15",y1:"15",x2:"26",y2:"9",stroke:"#5b6ef5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,Lg.jsx)("line",{x1:"15",y1:"15",x2:"26",y2:"21",stroke:"#5b6ef5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,Lg.jsx)("line",{x1:"15",y1:"15",x2:"15",y2:"27",stroke:"#5b6ef5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,Lg.jsx)("line",{x1:"15",y1:"15",x2:"4",y2:"21",stroke:"#5b6ef5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,Lg.jsx)("line",{x1:"15",y1:"15",x2:"4",y2:"9",stroke:"#5b6ef5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,Lg.jsx)("line",{x1:"15",y1:"3",x2:"26",y2:"9",stroke:"#5b6ef5",strokeWidth:"1",strokeLinecap:"round",opacity:"0.45"}),(0,Lg.jsx)("line",{x1:"26",y1:"9",x2:"26",y2:"21",stroke:"#5b6ef5",strokeWidth:"1",strokeLinecap:"round",opacity:"0.45"}),(0,Lg.jsx)("line",{x1:"26",y1:"21",x2:"15",y2:"27",stroke:"#5b6ef5",strokeWidth:"1",strokeLinecap:"round",opacity:"0.45"}),(0,Lg.jsx)("line",{x1:"15",y1:"27",x2:"4",y2:"21",stroke:"#5b6ef5",strokeWidth:"1",strokeLinecap:"round",opacity:"0.45"}),(0,Lg.jsx)("line",{x1:"4",y1:"21",x2:"4",y2:"9",stroke:"#5b6ef5",strokeWidth:"1",strokeLinecap:"round",opacity:"0.45"}),(0,Lg.jsx)("line",{x1:"4",y1:"9",x2:"15",y2:"3",stroke:"#5b6ef5",strokeWidth:"1",strokeLinecap:"round",opacity:"0.45"}),(0,Lg.jsx)("circle",{cx:"15",cy:"3",r:"2.2",fill:"#5b6ef5"}),(0,Lg.jsx)("circle",{cx:"26",cy:"9",r:"2.2",fill:"#5b6ef5"}),(0,Lg.jsx)("circle",{cx:"26",cy:"21",r:"2.2",fill:"#5b6ef5"}),(0,Lg.jsx)("circle",{cx:"15",cy:"27",r:"2.2",fill:"#5b6ef5"}),(0,Lg.jsx)("circle",{cx:"4",cy:"21",r:"2.2",fill:"#5b6ef5"}),(0,Lg.jsx)("circle",{cx:"4",cy:"9",r:"2.2",fill:"#5b6ef5"}),(0,Lg.jsx)("circle",{cx:"15",cy:"15",r:"3.5",fill:"#8b9ef8"})]}),(0,Lg.jsx)("span",{className:"text-xl font-bold",children:"deepnets.ai"})]}),(0,Lg.jsxs)("nav",{className:"hidden md:flex items-center space-x-1",children:[(0,Lg.jsxs)(ft,{to:"/trending",className:"flex items-center gap-1.5 px-3 py-2 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-fire text-orange-400 text-xs"}),"Trending"]}),(0,Lg.jsxs)(ft,{to:"/figures",className:"flex items-center gap-1.5 px-3 py-2 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-user-secret text-purple-400 text-xs"}),"Figures"]}),(0,Lg.jsxs)(ft,{to:"/agents",className:"flex items-center gap-1.5 px-3 py-2 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-robot text-crypto-accent text-xs"}),"Agents"]}),(0,Lg.jsxs)(ft,{to:"/whitepaper",className:"flex items-center gap-1.5 px-3 py-2 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-file-alt text-gray-500 text-xs"}),"$DNET Whitepaper"]})]}),(0,Lg.jsx)("button",{onClick:()=>u(!c),className:"md:hidden flex items-center justify-center w-9 h-9 text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors","aria-label":"Menu",children:(0,Lg.jsx)("i",{className:"fas ".concat(c?"fa-times":"fa-bars")})}),(0,Lg.jsx)("div",{className:"flex items-center",children:i?(0,Lg.jsx)("div",{className:"w-6 h-6 border-2 border-gray-600 border-t-crypto-accent rounded-full animate-spin"}):n&&t?(0,Lg.jsxs)("div",{className:"relative",children:[(0,Lg.jsxs)("button",{ref:p,onClick:()=>h(e=>!e),"aria-haspopup":"menu","aria-expanded":d,className:"flex items-center gap-0 bg-gray-800/80 hover:bg-gray-700/80 border border-gray-700 rounded-lg transition-colors overflow-hidden",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 border-r border-gray-700",children:[(0,Lg.jsx)(vy,{className:"w-4 h-4 text-gray-400"}),(0,Lg.jsx)("span",{className:"text-gray-300 text-sm font-mono hidden sm:inline",children:t.username||(null===(e=t.email)||void 0===e?void 0:e.split("@")[0])||(t.walletAddress?(f=t.walletAddress,"".concat(f.slice(0,4),"...").concat(f.slice(-4))):"Profile")})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2",children:[t.tier&&"free"!==t.tier&&(0,Lg.jsxs)("span",{className:"".concat(Hg(t.tier)," text-xs font-semibold"),children:[Kg(t.tier)," ",Wg(t.tier)]}),"free"===t.tier&&(0,Lg.jsx)("span",{className:"text-gray-500 text-xs",children:"Free"}),(0,Lg.jsx)("i",{className:"fas fa-chevron-down text-gray-500 text-[10px] ml-1 transition-transform ".concat(d?"rotate-180":"")})]})]}),(0,Lg.jsx)(xy,{open:d,onClose:()=>h(!1),triggerRef:p})]}):(0,Lg.jsxs)("button",{onClick:()=>{o("header")},className:"flex items-center gap-2 bg-gray-800/80 hover:bg-gray-700/80 border border-gray-700 rounded-lg px-4 py-2 transition-colors",children:[(0,Lg.jsx)(vy,{className:"w-4 h-4 text-gray-400"}),(0,Lg.jsx)("span",{className:"text-gray-300 text-sm font-medium",children:"Login"})]})})]})}),c&&(0,Lg.jsxs)("nav",{className:"md:hidden border-t border-gray-800 mt-3 pt-3 pb-1 flex flex-col space-y-1",children:[(0,Lg.jsxs)(ft,{to:"/trending",onClick:()=>u(!1),className:"flex items-center gap-2 px-3 py-2.5 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-fire text-orange-400 text-xs w-4 text-center"}),"Trending"]}),(0,Lg.jsxs)(ft,{to:"/figures",onClick:()=>u(!1),className:"flex items-center gap-2 px-3 py-2.5 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-user-secret text-purple-400 text-xs w-4 text-center"}),"Figures"]}),(0,Lg.jsxs)(ft,{to:"/agents",onClick:()=>u(!1),className:"flex items-center gap-2 px-3 py-2.5 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-robot text-crypto-accent text-xs w-4 text-center"}),"Agents"]}),(0,Lg.jsxs)(ft,{to:"/whitepaper",onClick:()=>u(!1),className:"flex items-center gap-2 px-3 py-2.5 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-file-alt text-gray-500 text-xs w-4 text-center"}),"Whitepaper"]}),(0,Lg.jsxs)("a",{href:"https://x.com/i/chat/group_join/g2050256478343213064/QYTP6iN6Q6",target:"_blank",rel:"noopener noreferrer",onClick:()=>u(!1),className:"flex items-center gap-2 px-3 py-2.5 text-sm text-gray-400 hover:text-white rounded-lg hover:bg-gray-800/50 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-comments text-blue-400 text-xs w-4 text-center"}),"XChat group \u2197"]})]})]}),(0,Lg.jsx)(fy,{isOpen:s,onClose:()=>{n||(Og("login_modal_dismissed"),l()),a(!1)}})]});var f},wy=Eg(),_y=()=>{const[e,t]=(0,r.useState)(null);(0,r.useEffect)(()=>{Ng("".concat(wy,"/api/burn/stats")).then(e=>e.ok?e.json():null).then(e=>{null!==e&&void 0!==e&&e.burned&&t(e.burned)}).catch(()=>{})},[]);return(0,Lg.jsx)("footer",{className:"border-t border-gray-800 bg-crypto-gray/30 mt-16",children:(0,Lg.jsxs)("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[(0,Lg.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mb-8",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"font-semibold text-white mb-2",children:"Deepnets.ai"}),(0,Lg.jsx)("p",{className:"text-gray-500 text-sm mb-4",children:"Scam detection for safer trading."}),(0,Lg.jsxs)("div",{className:"flex flex-col gap-1.5 text-sm",children:[(0,Lg.jsx)("a",{href:"https://solscan.io/token/93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-white transition-colors font-mono text-xs",title:"$DNET token on Solscan",children:"$DNET: 93VXFh...pVjpump"}),null!==e&&(0,Lg.jsxs)("a",{href:"https://solscan.io/token/93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-orange-400 transition-colors text-xs",title:"".concat(e.toLocaleStr
2ing()," DNET burned (").concat((e/1e7).toFixed(1),"% of supply)"),children:[(e=>e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":e>=1e3?(e/1e3).toFixed(0)+"K":e.toLocaleString())(e)," burned"]})]})]}),(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"font-medium text-gray-400 text-sm uppercase tracking-wider mb-3",children:"Resources"}),(0,Lg.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Lg.jsx)(ft,{to:"/tiers",className:"text-gray-500 hover:text-white transition-colors text-sm",children:"Tiers"}),(0,Lg.jsx)(ft,{to:"/whitepaper",className:"text-gray-500 hover:text-white transition-colors text-sm",children:"Whitepaper"}),(0,Lg.jsx)(ft,{to:"/api-docs",className:"text-gray-500 hover:text-white transition-colors text-sm",children:"API Docs"}),(0,Lg.jsx)("a",{href:"https://www.tibane.net/staking/93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-green-400 transition-colors text-sm",children:"Stake $DNET"})]}),(0,Lg.jsx)("div",{className:"font-medium text-gray-400 text-sm uppercase tracking-wider mb-3 mt-6",children:"Legal"}),(0,Lg.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Lg.jsx)(ft,{to:"/terms",className:"text-gray-500 hover:text-white transition-colors text-sm",children:"Terms of Service"}),(0,Lg.jsx)(ft,{to:"/privacy",className:"text-gray-500 hover:text-white transition-colors text-sm",children:"Privacy Policy"})]})]}),(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"font-medium text-gray-400 text-sm uppercase tracking-wider mb-3",children:"Connect"}),(0,Lg.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Lg.jsxs)("a",{href:"https://x.com/deepnets_ai",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-white transition-colors text-sm flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fab fa-x-twitter w-4"}),"@deepnets_ai"]}),(0,Lg.jsxs)("a",{href:"https://x.com/deepnets_agent",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-white transition-colors text-sm flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fab fa-x-twitter w-4"}),"@deepnets_agent"]}),(0,Lg.jsxs)("a",{href:"https://x.com/i/chat/group_join/g2050256478343213064/QYTP6iN6Q6",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-white transition-colors text-sm flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-comments w-4"}),"XChat group"]})]})]})]}),(0,Lg.jsx)("div",{className:"border-t border-gray-800 pt-6",children:(0,Lg.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-2 text-xs text-gray-600",children:[(0,Lg.jsx)("span",{children:"Percipio LLC"}),(0,Lg.jsx)("span",{children:"Created by SciFantastic with curiosity"})]})})]})})},jy=e=>{let{locked:t,staked:n,multisig:r,burned:i,multisigVaultCount:s,multisigThreshold:a,multisigMemberCount:o,threshold:l=1}=e;const c=(()=>{if(null==r||r<=l)return"";const e="".concat(r.toFixed(1),"% multisig");return 1===s&&a&&o?"".concat(e," (").concat(a,"-of-").concat(o,")"):s&&s>1?"".concat(e," across ").concat(s," vaults"):e})(),u=[{value:t,icon:"fa-lock",color:"text-green-400",title:null!=t?"".concat(t.toFixed(1),"% locked"):"",label:"locked"},{value:n,icon:"fa-gem",color:"text-yellow-300",title:null!=n?"".concat(n.toFixed(1),"% staked"):"",label:"staked"},{value:r,icon:"fa-shield-halved",color:"text-amber-400",title:c,label:"multisig"},{value:i,icon:"fa-fire",color:"text-orange-300",title:null!=i?"".concat(i.toFixed(1),"% burned"):"",label:"burned"}].filter(e=>{var t;return(null!==(t=e.value)&&void 0!==t?t:0)>l});return 0===u.length?null:(0,Lg.jsx)("span",{className:"inline-flex items-center gap-1 ml-1.5",children:u.map(e=>(0,Lg.jsx)("span",{className:e.color,title:e.title,children:(0,Lg.jsx)("i",{className:"fas ".concat(e.icon," text-[10px]")})},e.label))})},ky=()=>{const e=(0,r.useRef)(null),t=(0,r.useRef)(0),n=(0,r.useRef)([]),i=(0,r.useRef)({x:-1e3,y:-1e3});return(0,r.useEffect)(()=>{const r=e.current;if(!r)return;const s=r.getContext("2d");if(!s)return;const a=91,o=110,l=245,c=139,u=158,d=248,h=200,p=150,f=.15;function m(){r&&(r.width=window.innerWidth,r.height=window.innerHeight)}m(),window.addEventListener("resize",m);const g=[];for(let e=0;e<60;e++)g.push({x:Math.random()*r.width,y:Math.random()*r.height,vx:(Math.random()-.5)*f*2,vy:(Math.random()-.5)*f*2,radius:2*Math.random()+1,opacity:.5*Math.random()+.2,pulsePhase:Math.random()*Math.PI*2,pulseSpeed:.01*Math.random()+.005,connections:[]});function y(e){i.current={x:e.clientX,y:e.clientY}}function x(){i.current={x:-1e3,y:-1e3}}n.current=g,window.addEventListener("mousemove",y),window.addEventListener("mouseleave",x);let v=0;const b=[];return function e(){if(!r||!s)return;v++,s.clearRect(0,0,r.width,r.height);
2const n=i.current;for(const t of g){t.pulsePhase+=t.pulseSpeed,t.x+=t.vx,t.y+=t.vy;const e=t.x-n.x,i=t.y-n.y,s=Math.sqrt(e*e+i*i);if(s<p&&s>0){const n=.3*(1-s/p);t.vx+=e/s*n,t.vy+=i/s*n}t.vx*=.99,t.vy*=.99;Math.sqrt(t.vx*t.vx+t.vy*t.vy)<.075&&(t.vx+=.02*(Math.random()-.5),t.vy+=.02*(Math.random()-.5));const a=50;t.x<-a&&(t.x=r.width+a),t.x>r.width+a&&(t.x=-a),t.y<-a&&(t.y=r.height+a),t.y>r.height+a&&(t.y=-a)}for(let t=0;t<g.length;t++)for(let e=t+1;e<g.length;e++){const r=g[t].x-g[e].x,i=g[t].y-g[e].y,c=Math.sqrt(r*r+i*i);if(c<h){const r=.15*(1-c/h),i=(g[t].x+g[e].x)/2,u=(g[t].y+g[e].y)/2,d=Math.sqrt((i-n.x)**2+(u-n.y)**2),p=d<225?.3*(1-d/225):0;s.beginPath(),s.moveTo(g[t].x,g[t].y),s.lineTo(g[e].x,g[e].y),s.strokeStyle="rgba(".concat(a,", ").concat(o,", ").concat(l,", ").concat(r+p,")"),s.lineWidth=.5+2*p,s.stroke()}}for(const t of g){const e=.3*Math.sin(t.pulsePhase)+.7,r=t.radius*e,i=t.opacity*e,c=t.x-n.x,u=t.y-n.y,d=Math.sqrt(c*c+u*u),h=d<p?.6*(1-d/p):0;if(r>1.5||h>.1){const e=3*r+8*h,n=s.createRadialGradient(t.x,t.y,0,t.x,t.y,e);n.addColorStop(0,"rgba(".concat(a,", ").concat(o,", ").concat(l,", ").concat(.3*(i+h),")")),n.addColorStop(1,"rgba(".concat(a,", ").concat(o,", ").concat(l,", 0)")),s.beginPath(),s.arc(t.x,t.y,e,0,2*Math.PI),s.fillStyle=n,s.fill()}s.beginPath(),s.arc(t.x,t.y,r+2*h,0,2*Math.PI),s.fillStyle="rgba(".concat(a,", ").concat(o,", ").concat(l,", ").concat(Math.min(i+h,1),")"),s.fill()}v%45===0&&function(){for(let e=0;e<10;e++){const e=Math.floor(Math.random()*g.length),t=Math.floor(Math.random()*g.length);if(e===t)continue;const n=g[e].x-g[t].x,r=g[e].y-g[t].y;if(Math.sqrt(n*n+r*r)<160)return void b.push({fromIdx:e,toIdx:t,progress:0,speed:.008+.012*Math.random(),opacity:.7+.3*Math.random()})}}();for(let t=b.length-1;t>=0;t--){const e=b[t];if(e.progress+=e.speed,e.progress>=1){b.splice(t,1);continue}const n=g[e.fromIdx],r=g[e.toIdx],i=n.x-r.x,h=n.y-r.y;if(Math.sqrt(i*i+h*h)>240){b.splice(t,1);continue}const p=n.x+(r.x-n.x)*e.progress,f=n.y+(r.y-n.y)*e.progress,m=Math.min(4*e.progress,4*(1-e.progress),1),y=e.opacity*m,x=12,v=s.createRadialGradient(p,f,0,p,f,x);v.addColorStop(0,"rgba(".concat(c,", ").concat(u,", ").concat(d,", ").concat(.6*y,")")),v.addColorStop(.4,"rgba(".concat(a,", ").concat(o,", ").concat(l,", ").concat(.3*y,")")),v.addColorStop(1,"rgba(".concat(a,", ").concat(o,", ").concat(l,", 0)")),s.beginPath(),s.arc(p,f,x,0,2*Math.PI),s.fillStyle=v,s.fill(),s.beginPath(),s.arc(p,f,2,0,2*Math.PI),s.fillStyle="rgba(".concat(c,", ").concat(u,", ").concat(d,", ").concat(y,")"),s.fill()}t.current=requestAnimationFrame(e)}(),()=>{cancelAnimationFrame(t.current),window.removeEventListener("resize",m),window.removeEventListener("mousemove",y),window.removeEventListener("mouseleave",x)}},[]),(0,Lg.jsx)("canvas",{ref:e,className:"fixed inset-0 pointer-events-none",style:{zIndex:0,opacity:.6}})},Ny=e=>{let{isOpen:t,requestId:n,previousCredits:i,currentCredits:s,onClose:a,onSuccess:o,onError:l}=e;const[c,u]=(0,r.useState)("new"),[d,h]=(0,r.useState)(null),[p,f]=(0,r.useState)(null),m=(0,r.useRef)(!1),g=(0,r.useRef)(o),y=(0,r.useRef)(l);(0,r.useEffect)(()=>{g.current=o},[o]),(0,r.useEffect)(()=>{y.current=l},[l]),(0,r.useEffect)(()=>{if(t&&n){u("new"),h(null),m.current=!0,f(null);let e=!0;const t=async()=>{if(n&&e)try{const r=await Ng("".concat(Eg(),"/api/request-status?requestId=").concat(n));if(!r.ok)throw new Error("Failed to check status");const i=await r.json();if(u(i.status),i.progress&&h(i.progress),"completed"===i.status)e=!1,m.current=!1,g.current();else if("failed"===i.status){e=!1,m.current=!1;const t=i.failureReason||"Analysis failed";f(t),y.current(t)}else setTimeout(t,2e3)}catch(r){console.error("Error polling status:",r),e=!1,m.current=!1;const t="Failed to check analysis status";f(t),y.current(t)}};t()}else m.current=!1;return()=>{m.current=!1}},[t,n]);return t?(0,Lg.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,Lg.jsx)("div",{className:"bg-crypto-card rounded-lg p-6 max-w-md w-full mx-4",children:(0,Lg.jsxs)("div",{className:"text-center",children:[(0,Lg.jsx)("div",{className:"mb-4",children:p?(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-red-400 text-2xl"}):"completed"===c?(0,Lg.jsx)("i",{className:"fas fa-check-circle text-green-400 text-2xl"}):(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin text-blue-400 text-2xl"})}),(0,Lg.jsx)("h3",{className:"text-xl font-semibold text-white mb-2",children:"Token Analysis Refresh"}),d&&"new"!==c?(0,Lg.jsx)("div",{className:"text-left bg-crypto-dark/50 rounded-lg p-3 mb-4 space-y-1.5",children:d.split("\n").map((e,t)=>(0,Lg.jsxs)("div",{className:"text-sm text-gray-300 flex items-center space-x-2",children:[(0,Lg.jsx)("span",{className:"w-5 text-center",children:e.split(" ")[0]}),(0,Lg.jsx)("span",{children:e.slice(e.indexOf(" ")+1)})]},t))}):(0,Lg.jsx)("p",{className:"text-gray-300 mb-4",children:(()=>{switch(c){case"new":return"Request submitted, waiting to start...";case"processing":return"Analyzing token holders...";case"completed":return"Analysis completed successfully!";
vendor: 6,610 bytes, line 2
2case"failed":return"Analysis failed";default:return"Processing request..."}})()}),null!=i&&null!=s&&(0,Lg.jsxs)("div",{className:"bg-crypto-dark/50 rounded-lg px-4 py-2 mb-4 inline-flex items-center space-x-2 text-sm",children:[(0,Lg.jsx)("span",{className:"text-gray-400",children:"Credits:"}),(0,Lg.jsx)("span",{className:"text-yellow-400 font-medium",children:i}),(0,Lg.jsx)("span",{className:"text-gray-500",children:"\u2192"}),(0,Lg.jsx)("span",{className:"text-crypto-accent font-medium",children:s})]}),n&&(0,Lg.jsxs)("p",{className:"text-xs text-gray-500 mb-4",children:["Request ID: ",n.slice(0,8),"..."]}),p&&(0,Lg.jsx)("div",{className:"bg-red-900/20 border border-red-500 rounded-lg p-3 mb-4",children:(0,Lg.jsx)("p",{className:"text-red-400 text-sm",children:p})}),(0,Lg.jsxs)("div",{className:"flex justify-center space-x-3",children:["completed"===c&&(0,Lg.jsx)("button",{onClick:a,className:"bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-lg font-medium transition-colors",children:"Close"}),p&&(0,Lg.jsx)("button",{onClick:a,className:"bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded-lg font-medium transition-colors",children:"Close"}),"completed"!==c&&!p&&(0,Lg.jsx)("button",{onClick:()=>{m.current=!1,a()},className:"bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded-lg font-medium transition-colors",children:"Cancel"})]})]})})}):null};var Sy=n(9328),Ey=n(7081);const Ay=e=>({decode:e.decode.bind(e),encode:e.encode.bind(e)});var Cy=n(6382).Buffer;const My=e=>t=>{const n=(0,Sy.av)(e,t),{encode:r,decode:i}=Ay(n),s=n;return s.decode=(e,t)=>{const n=i(e,t);return(0,Ey.k5)(Cy.from(n))},s.encode=(t,n,i)=>{const s=(0,Ey.Bq)(t,e);return r(s,n,i)},s},Ty=e=>t=>{const n=(0,Sy.av)(e,t),{encode:r,decode:i}=Ay(n),s=n;return s.decode=(e,t)=>{const n=i(e,t);return(0,Ey.cI)(Cy.from(n))},s.encode=(t,n,i)=>{const s=(0,Ey.zy)(t,e);return r(s,n,i)},s},Py=My(8);Ty(8),My(16),Ty(16),My(24),Ty(24),My(32),Ty(32);var Oy=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Iy=Math.ceil,Ly=Math.floor,Ry="[BigNumber Error] ",Dy=Ry+"Number primitive has more than 15 significant digits: ",By=1e14,Fy=14,Uy=9007199254740991,zy=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],qy=1e7,Wy=1e9;function Hy(e){var t=0|e;return e>0||e===t?t:t-1}function Ky(e){for(var t,n,r=1,i=e.length,s=e[0]+"";r<i;){for(t=e[r++]+"",n=Fy-t.length;n--;t="0"+t);s+=t}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function Vy(e,t){var n,r,i=e.c,s=t.c,a=e.s,o=t.s,l=e.e,c=t.e;if(!a||!o)return null;if(n=i&&!i[0],r=s&&!s[0],n||r)return n?r?0:-o:a;if(a!=o)return a;if(n=a<0,r=l==c,!i||!s)return r?0:!i^n?1:-1;if(!r)return l>c^n?1:-1;for(o=(l=i.length)<(c=s.length)?l:c,a=0;a<o;a++)if(i[a]!=s[a])return i[a]>s[a]^n?1:-1;return l==c?0:l>c^n?1:-1}function $y(e,t,n,r){if(e<t||e>n||e!==Ly(e))throw Error(Ry+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Yy(e){var t=e.c.length-1;return Hy(e.e/Fy)==t&&e.c[t]%2!=0}function Gy(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Jy(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Zy=function e(t){var n,r,i,s=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,l=4,c=-7,u=21,d=-1e7,h=1e7,p=!1,f=1,m=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},y="0123456789abcdefghijklmnopqrstuvwxyz",x=!0;function v(e,t){var n,s,a,c,u,p,f,m,g=this;if(!(g instanceof v))return new v(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>h?g.c=g.e=null:e.e<d?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,u=e;u>=10;u/=10,c++);return void(c>h?g.c=g.e=null:(g.e=c,g.c=[e]))}m=String(e)}else{if(!Oy.test(m=String(e)))return i(g,m,p);g.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(u=m.search(/e/i))>0?(c<0&&(c=u),c+=+m.slice(u+1),m=m.substring(0,u)):c<0&&(c=m.length)}else{if($y(t,2,y.length,"Base"),10==t&&x)return j(g=new v(e),o+g.e+1,l);if(m=String(e),p="number"==typeof e){if(0*e!=0)return i(g,m,p,t);if(g.s=1/e<0?(m=m.slice(1),-1):1,v.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(Dy+e)}else g.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=y.slice(0,t),c=u=0,f=m.length;u<f;u++)if(n.indexOf(s=m.charAt(u))<0){if("."==s){if(u>c){c=f;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,u=-1,c=0;continue}return i(g,String(e),p,t)}p=!1,(c=(m=r(m,t,10,g.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(u=0;48===m.charCodeAt(u);u++);for(f=m.length;48===m.charCodeAt(--f););if(m=m.slice(u,++f)){if(f-=u,p&&v.DEBUG&&f>15&&(e>Uy||e!==Ly(e)))throw Error(Dy+g.s*e);if((c=c-u-1)>h)g.c=g.e=null;else if(c<d)g.c=[g.e=0];else{if(g.e=c,g.c=[],u=(c+1)%Fy,c<0&&(u+=Fy),u<f){for(u&&g.c.push(+m.slice(0,u)),f-=Fy;u<f;)g.c.push(+m.slice(u,u+=Fy));u=Fy-(m=m.slice(u)).length}else u-=f;for(;u--;m+="0");g.c.push(+m)}}else g.c=[g.e=0]}function b(e,t,n,r){var i,s,a,o,d;if(null==n?n=l:$y(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)d=Ky(e.c),d=1==r||2==r&&(a<=c||a>=u)?Gy(d,a):Jy(d,a,"0");else if(s=(e=j(new v(e),t,n)).e,o=(d=Ky(e.c)).length,1==r||2==r&&(t<=s||s<=c)){for(;o<t;d+="0",o++);d=Gy(d,s)}else if(t-=a+(2===r&&s>a),d=Jy(d,s,"0"),s+1>o){if(--t>0)for(d+=".";t--;d+="0");}else if((t+=s-o)>0)for(s+1==o&&(d+=".");t--;d+="0");return e.s<0&&i?"-"+d:d}function w(e,t){for(var n,r,i=1,s=new v(e[0]);i<e.length;i++)(!(r=new v(e[i])).s||(n=Vy(s,r))===t||0===n&&s.s===t)&&(s=r);return s}function _(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*Fy-1)>h?e.c=e.e=null:n<d?e.c=[e.e=0]:(e.e=n,e.c=t),e}function j(e,t,n,r){var i,s,a,o,l,c,u,p=e.c,f=zy;if(p){e:{for(i=1,o=p[0];o>=10;o/=10,i++);if((s=t-i)<0)s+=Fy,a=t,l=p[c=0],u=Ly(l/f[i-a-1]%10);else if((c=Iy((s+1)/Fy))>=p.length){if(!r)break e;for(;p.length<=c;p.push(0));l=u=0,i=1,a=(s%=Fy)-Fy+1}else{for(l=o=p[c],i=1;o>=10;o/=10,i++);u=(a=(s%=Fy)-Fy+i)<0?0:Ly(l/f[i-a-1]%10)}if(r=r||t<0||null!=p[c+1]||(a<0?l:l%f[i-a-1]),r=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(s>0?a>0?l/f[i-a]:0:p[c-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=f[(Fy-t%Fy)%Fy],e.e=-t||0):p[0]=e.e=0,e;if(0==s?(p.length=c,o=1,c--):(p.length=c+1,o=f[Fy-s],p[c]=a>0?Ly(l/f[i-a]%f[a])*o:0),r)for(;;
vendor: 4,189 bytes, line 2
2){if(0==c){for(s=1,a=p[0];a>=10;a/=10,s++);for(a=p[0]+=o,o=1;a>=10;a/=10,o++);s!=o&&(e.e++,p[0]==By&&(p[0]=1));break}if(p[c]+=o,p[c]!=By)break;p[c--]=0,o=1}for(s=p.length;0===p[--s];p.pop());}e.e>h?e.c=e.e=null:e.e<d&&(e.c=[e.e=0])}return e}function k(e){var t,n=e.e;return null===n?e.toString():(t=Ky(e.c),t=n<=c||n>=u?Gy(t,n):Jy(t,n,"0"),e.s<0?"-"+t:t)}return v.clone=e,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(Ry+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&($y(n=e[t],0,Wy,t),o=n),e.hasOwnProperty(t="ROUNDING_MODE")&&($y(n=e[t],0,8,t),l=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?($y(n[0],-Wy,0,t),$y(n[1],0,Wy,t),c=n[0],u=n[1]):($y(n,-Wy,Wy,t),c=-(u=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)$y(n[0],-Wy,-1,t),$y(n[1],1,Wy,t),d=n[0],h=n[1];else{if($y(n,-Wy,Wy,t),!n)throw Error(Ry+t+" cannot be zero: "+n);d=-(h=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(Ry+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw p=!n,Error(Ry+"crypto unavailable");p=n}else p=n}if(e.hasOwnProperty(t="MODULO_MODE")&&($y(n=e[t],0,9,t),f=n),e.hasOwnProperty(t="POW_PRECISION")&&($y(n=e[t],0,Wy,t),m=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(Ry+t+" not an object: "+n);g=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(Ry+t+" invalid: "+n);x="0123456789"==n.slice(0,10),y=n}}return{DECIMAL_PLACES:o,ROUNDING_MODE:l,EXPONENTIAL_AT:[c,u],RANGE:[d,h],CRYPTO:p,MODULO_MODE:f,POW_PRECISION:m,FORMAT:g,ALPHABET:y}},v.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===s||-1===s)&&i>=-Wy&&i<=Wy&&i===Ly(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%Fy)<1&&(t+=Fy),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=By||n!==Ly(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(Ry+"Invalid BigNumber: "+e)},v.maximum=v.max=function(){return w(arguments,-1)},v.minimum=v.min=function(){return w(arguments,1)},v.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return Ly(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,r,i,s,l,c=0,u=[],d=new v(a);if(null==e?e=o:$y(e,0,Wy),s=Iy(e/Fy),p)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));c<s;)(l=131072*n[c]+(n[c+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[c]=r[0],n[c+1]=r[1]):(u.push(l%1e14),c+=2);c=s/2}else{if(!crypto.randomBytes)throw p=!1,Error(Ry+"crypto unavailable");for(n=crypto.randomBytes(s*=7);c<s;)(l=281474976710656*(31&n[c])+1099511627776*n[c+1]+4294967296*n[c+2]+16777216*n[c+3]+(n[c+4]<<16)+(n[c+5]<<8)+n[c+6])>=9e15?crypto.randomBytes(7).copy(n,c):(u.push(l%1e14),c+=7);c=s/7}if(!p)for(;c<s;)(l=t())<9e15&&(u[c++]=l%1e14);for(s=u[--c],e%=Fy,s&&e&&(l=zy[Fy-e],u[c]=Ly(s/l)*l);0===u[c];u.pop(),c--);if(c<0)u=[i=0];else{for(i=-1;0===u[0];u.splice(0,1),i-=Fy);for(c=1,l=u[0];l>=10;l/=10,c++);c<Fy&&(i-=Fy-c)}return d.e=i,d.c=u,d}}(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,s,a=[0],o=0,l=e.length;o<l;){for(s=a.length;s--;a[s]*=t);for(a[0]+=r.indexOf(e.charAt(o++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,s,a,c){var u,d,h,p,f,g,x,b,w=r.indexOf("."),_=o,j=l;for(w>=0&&(p=m,m=0,r=r.replace(".",""),g=(b=new v(i)).pow(r.length-w),m=p,b.c=t(Jy(Ky(g.c),g.e,"0"),10,s,e),b.e=b.c.length),h=p=(x=t(r,i,s,c?(u=y,e):(u=e,y))).length;0==x[--p];x.pop());if(!x[0])return u.charAt(0);if(w<0?--h:(g.c=x,g.e=h,g.s=a,x=(g=n(g,b,_,j,s)).c,f=g.r,h=g.e),w=x[d=h+_+1
vendor: 6,297 bytes, line 2
2],p=s/2,f=f||d<0||null!=x[d+1],f=j<4?(null!=w||f)&&(0==j||j==(g.s<0?3:2)):w>p||w==p&&(4==j||f||6==j&&1&x[d-1]||j==(g.s<0?8:7)),d<1||!x[0])r=f?Jy(u.charAt(1),-_,u.charAt(0)):u.charAt(0);else{if(x.length=d,f)for(--s;++x[--d]>s;)x[d]=0,d||(++h,x=[1].concat(x));for(p=x.length;!x[--p];);for(w=0,r="";w<=p;r+=u.charAt(x[w++]));r=Jy(r,h,u.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,s,a,o=0,l=e.length,c=t%qy,u=t/qy|0;for(e=e.slice();l--;)o=((i=c*(s=e[l]%qy)+(r=u*s+(a=e[l]/qy|0)*c)%qy*qy+o)/n|0)+(r/qy|0)+u*a,e[l]=i%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var i,s;if(n!=r)s=n>r?1:-1;else for(i=s=0;i<n;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,s,a,o){var l,c,u,d,h,p,f,m,g,y,x,b,w,_,k,N,S,E=r.s==i.s?1:-1,A=r.c,C=i.c;if(!A||!A[0]||!C||!C[0])return new v(r.s&&i.s&&(A?!C||A[0]!=C[0]:C)?A&&0==A[0]||!C?0*E:E/0:NaN);for(g=(m=new v(E)).c=[],E=s+(c=r.e-i.e)+1,o||(o=By,c=Hy(r.e/Fy)-Hy(i.e/Fy),E=E/Fy|0),u=0;C[u]==(A[u]||0);u++);if(C[u]>(A[u]||0)&&c--,E<0)g.push(1),d=!0;else{for(_=A.length,N=C.length,u=0,E+=2,(h=Ly(o/(C[0]+1)))>1&&(C=e(C,h,o),A=e(A,h,o),N=C.length,_=A.length),w=N,x=(y=A.slice(0,N)).length;x<N;y[x++]=0);S=C.slice(),S=[0].concat(S),k=C[0],C[1]>=o/2&&k++;do{if(h=0,(l=t(C,y,N,x))<0){if(b=y[0],N!=x&&(b=b*o+(y[1]||0)),(h=Ly(b/k))>1)for(h>=o&&(h=o-1),f=(p=e(C,h,o)).length,x=y.length;1==t(p,y,f,x);)h--,n(p,N<f?S:C,f,o),f=p.length,l=1;else 0==h&&(l=h=1),f=(p=C.slice()).length;if(f<x&&(p=[0].concat(p)),n(y,p,x,o),x=y.length,-1==l)for(;t(C,y,N,x)<1;)h++,n(y,N<x?S:C,x,o),x=y.length}else 0===l&&(h++,y=[0]);g[u++]=h,y[0]?y[x++]=A[w]||0:(y=[A[w]],x=1)}while((w++<_||null!=y[0])&&E--);d=null!=y[0],g[0]||g.splice(0,1)}if(o==By){for(u=1,E=g[0];E>=10;E/=10,u++);j(m,s+(m.e=u+c*Fy-1)+1,a,d)}else m.e=c,m.r=+d;return m}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(s,a,o,l){var c,u=o?a:a.replace(i,"");if(r.test(u))s.s=isNaN(u)?null:u<0?-1:1;else{if(!o&&(u=u.replace(e,function(e,t,n){return c="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=c?e:t}),l&&(c=l,u=u.replace(t,"$1").replace(n,"0.$1")),a!=u))return new v(u,c);if(v.DEBUG)throw Error(Ry+"Not a"+(l?" base "+l:"")+" number: "+a);s.s=null}s.c=s.e=null}}(),s.absoluteValue=s.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},s.comparedTo=function(e,t){return Vy(this,new v(e,t))},s.decimalPlaces=s.dp=function(e,t){var n,r,i,s=this;if(null!=e)return $y(e,0,Wy),null==t?t=l:$y(t,0,8),j(new v(s),e+s.e+1,t);if(!(n=s.c))return null;if(r=((i=n.length-1)-Hy(this.e/Fy))*Fy,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},s.dividedBy=s.div=function(e,t){return n(this,new v(e,t),o,l)},s.dividedToIntegerBy=s.idiv=function(e,t){return n(this,new v(e,t),0,1)},s.exponentiatedBy=s.pow=function(e,t){var n,r,i,s,o,c,u,d,h=this;if((e=new v(e)).c&&!e.isInteger())throw Error(Ry+"Exponent not an integer: "+k(e));if(null!=t&&(t=new v(t)),o=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return d=new v(Math.pow(+k(h),o?e.s*(2-Yy(e)):+k(e))),t?d.mod(t):d;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);(r=!c&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||o&&h.c[1]>=24e7:h.c[0]<8e13||o&&h.c[0]<=9999975e7)))return s=h.s<0&&Yy(e)?-0:0,h.e>-1&&(s=1/s),new v(c?1/s:s);m&&(s=Iy(m/Fy+2))}for(o?(n=new v(.5),c&&(e.s=1),u=Yy(e)):u=(i=Math.abs(+k(e)))%2,d=new v(a);;){if(u){if(!(d=d.times(h)).c)break;s?d.c.length>s&&(d.c.length=s):r&&(d=d.mod(t))}if(i){if(0===(i=Ly(i/2)))break;u=i%2}else if(j(e=e.times(n),e.e+1,1),e.e>14)u=Yy(e);else{if(0===(i=+k(e)))break;u=i%2}h=h.times(h),s?h.c&&h.c.length>s&&(h.c.length=s):r&&(h=h.mod(t))}return r?d:(c&&(d=a.div(d)),t?d.mod(t):s?j(d,m,l,undefined):d)},s.integerValue=function(e){var t=new v(this);return null==e?e=l:$y(e,0,8),j(t,t.e+1,e)},s.isEqualTo=s.eq=function(e,t){return 0===Vy(this,new v(e,t))},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(e,t){return Vy(this,new v(e,t))>0},s.isGreaterThanOrEqualTo=s.gte=function(e,t){return 1===(t=Vy(this,new v(e,t)))||0===t},s.isInteger=function(){return!!this.c&&Hy(this.e/Fy)>this.c.length-2},s.isLessThan=s.lt=function(e,t){return Vy(this,new v(e,t))<0},s.isLessThanOrEqualTo=s.lte=function(e,t){return-1===(t=Vy(this,new v(e,t)))||0===t},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&0==this.c[0]},s.minus=function(e,t){var n,r,i,s,a=this,o=a.s;if(t=(e=new v(e,t)).s,!o||!t)return new v(NaN);if(o!=t)return e.s=-t,a.plus(e);var c=a.e/Fy,u=e.e/Fy,d=a.c,h=e.c;if(!c||!u){if(!d||!h)return d?(e.s=-t,e):new v(h?a:NaN);if(!d[0]||!h[0])return h[0]?(e.s=-t,e):new v(d[0]?a:3==l?-0:0)}if(c=Hy(c),u=Hy(u),d=d.slice(),o=c-u){for((s=o<0)?(o=-o,i=d):(u=c,i=h),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(r=(s=(o=d.length)<(t=h.length))?o:t,o=t=0;t<r;t++)if(d[t]!=h[t]){s=d[t]<h[t];break}if(s&&(i=d,d=h,h=i,e.s=-e.s),(t=(r=h.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=By-1;r>o;){if(d[--r]<h[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=By}d[r]-=h[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?_(e,d,u):(e.s=3==l?-1:1,e.c=[e.e=0],e)},s.modulo=s.mod=function(e,t){var r,i,s=this;return e=new v(e,t),!s.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||s.c&&!s.c[0]?new v(s):(9==f?(i=e.s,e.s=1,r=n(s,e,0,3),e.s=i,r.s*=i):r=n(s,e,0,f),(e=s.minus(r.times(e))).c[0]||1!=f||(e.s=s.s),e)},s.multipliedBy=s.times=function(e,t){var n,r,i,s,a,o,l,c,u,d,h,p,f,m,g,y=this,x=y.c,b=(e=new v(e,t)).c;if(!x||!b||!x[0]||!b[0])return!y.s||!e.s||x&&!x[0]&&!b||b&&!b[0]&&!x?e.c=e.e=e.s=null:(e.s*=y.s,x&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=Hy(y.e/Fy)+Hy(e.e/Fy),e.s*=y.s,(l=x.length)<(d=b.length)&&(f=x,x=b,b=f,i=l,l=d,d=i),i=l+d,f=[];i--;f.push(0));for(m=By,g=qy,i=d;--i>=0;){for(n=0,h=b[i]%g,p=b[i]/g|0,s=i+(a=l);s>i;)n=((c=h*(c=x[--a]%g)+(o=p*c+(u=x[a]/g|0)*h)%g*g+f[s]+n)/m|0)+(o/g|0)+p*u,f[s--]=c%m;f[s]=n}return n?++r:f.splice(0,1),_(e,f,r)},s.negated=function(){var e=new v(this);return e.s=-e.s||null,e},s.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new v(e,t)).s,!i||!t)return new v(NaN);
vendor: 6,515 bytes, line 2
2if(i!=t)return e.s=-t,r.minus(e);var s=r.e/Fy,a=e.e/Fy,o=r.c,l=e.c;if(!s||!a){if(!o||!l)return new v(i/0);if(!o[0]||!l[0])return l[0]?e:new v(o[0]?r:0*i)}if(s=Hy(s),a=Hy(a),o=o.slice(),i=s-a){for(i>0?(a=s,n=l):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(t=l.length)<0&&(n=l,l=o,o=n,t=i),i=0;t;)i=(o[--t]=o[t]+l[t]+i)/By|0,o[t]=By===o[t]?0:o[t]%By;return i&&(o=[i].concat(o),++a),_(e,o,a)},s.precision=s.sd=function(e,t){var n,r,i,s=this;if(null!=e&&e!==!!e)return $y(e,1,Wy),null==t?t=l:$y(t,0,8),j(new v(s),e,t);if(!(n=s.c))return null;if(r=(i=n.length-1)*Fy+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&s.e+1>r&&(r=s.e+1),r},s.shiftedBy=function(e){return $y(e,-9007199254740991,Uy),this.times("1e"+e)},s.squareRoot=s.sqrt=function(){var e,t,r,i,s,a=this,c=a.c,u=a.s,d=a.e,h=o+4,p=new v("0.5");if(1!==u||!c||!c[0])return new v(!u||u<0&&(!c||c[0])?NaN:c?a:1/0);if(0==(u=Math.sqrt(+k(a)))||u==1/0?(((t=Ky(c)).length+d)%2==0&&(t+="0"),u=Math.sqrt(+t),d=Hy((d+1)/2)-(d<0||d%2),r=new v(t=u==1/0?"5e"+d:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+d)):r=new v(u+""),r.c[0])for((u=(d=r.e)+h)<3&&(u=0);;)if(s=r,r=p.times(s.plus(n(a,s,h,1))),Ky(s.c).slice(0,u)===(t=Ky(r.c)).slice(0,u)){if(r.e<d&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(j(r,r.e+o+2,1),e=!r.times(r).eq(a));break}if(!i&&(j(s,s.e+o+2,0),s.times(s).eq(a))){r=s;break}h+=4,u+=4,i=1}return j(r,r.e+o+1,l,e)},s.toExponential=function(e,t){return null!=e&&($y(e,0,Wy),e++),b(this,e,t,1)},s.toFixed=function(e,t){return null!=e&&($y(e,0,Wy),e=e+this.e+1),b(this,e,t)},s.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=g;else if("object"!=typeof n)throw Error(Ry+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var s,a=r.split("."),o=+n.groupSize,l=+n.secondaryGroupSize,c=n.groupSeparator||"",u=a[0],d=a[1],h=i.s<0,p=h?u.slice(1):u,f=p.length;if(l&&(s=o,o=l,l=s,f-=s),o>0&&f>0){for(s=f%o||o,u=p.substr(0,s);s<f;s+=o)u+=c+p.substr(s,o);l>0&&(u+=c+p.slice(s)),h&&(u="-"+u)}r=d?u+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):u}return(n.prefix||"")+r+(n.suffix||"")},s.toFraction=function(e){var t,r,i,s,o,c,u,d,p,f,m,g,y=this,x=y.c;if(null!=e&&(!(u=new v(e)).isInteger()&&(u.c||1!==u.s)||u.lt(a)))throw Error(Ry+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+k(u));if(!x)return new v(y);for(t=new v(a),p=r=new v(a),i=d=new v(a),g=Ky(x),o=t.e=g.length-y.e-1,t.c[0]=zy[(c=o%Fy)<0?Fy+c:c],e=!e||u.comparedTo(t)>0?o>0?t:p:u,c=h,h=1/0,u=new v(g),d.c[0]=0;f=n(u,t,0,1),1!=(s=r.plus(f.times(i))).comparedTo(e);)r=i,i=s,p=d.plus(f.times(s=p)),d=s,t=u.minus(f.times(s=t)),u=s;return s=n(e.minus(r),i,0,1),d=d.plus(s.times(p)),r=r.plus(s.times(i)),d.s=p.s=y.s,m=n(p,i,o*=2,l).minus(y).abs().comparedTo(n(d,r,o,l).minus(y).abs())<1?[p,i]:[d,r],h=c,m},s.toNumber=function(){return+k(this)},s.toPrecision=function(e,t){return null!=e&&$y(e,1,Wy),b(this,e,t,2)},s.toString=function(e){var t,n=this,i=n.s,s=n.e;return null===s?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=s<=c||s>=u?Gy(Ky(n.c),s):Jy(Ky(n.c),s,"0"):10===e&&x?t=Jy(Ky((n=j(new v(n),o+s+1,l)).c),n.e,"0"):($y(e,2,y.length,"Base"),t=r(Jy(Ky(n.c),s,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},s.valueOf=s.toJSON=function(){return k(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,null!=t&&v.set(t),v}();new Zy("1e+18");const Qy=e=>{const t=(0,Sy.av)(32,e),{encode:n,decode:r}=Ay(t),i=t;return i.decode=(e,t)=>{const n=r(e,t);return new kn.J3(n)},i.encode=(e,t,r)=>{const i=e.toBuffer();return n(i,t,r)},i},Xy=new kn.J3("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),ex=new kn.J3("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),tx=new kn.J3("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");new kn.J3("So11111111111111111111111111111111111111112"),new kn.J3("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");class nx extends Error{constructor(e){super(e)}}class rx extends nx{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}n(6382).Buffer;const ix=(0,Sy.w3)([(0,Sy.DH)("mintAuthorityOption"),Qy("mintAuthority"),Py("supply"),(0,Sy.u8)("decimals"),(e=>{const t=(0,Sy.u8)(e),{encode:n,decode:r}=Ay(t),i=t;return i.decode=(e,t)=>!!r(e,t),i.encode=(e,t,r)=>{const i=Number(e);return n(i,t,r)},i})("isInitialized"),(0,Sy.DH)("freezeAuthorityOption"),Qy("freezeAuthority")]);ix.span;async function sx(e,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xy,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:tx;if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&!kn.J3.isOnCurve(t.toBuffer()))throw new rx;const[i]=await kn.J3.findProgramAddress([t.toBuffer(),n.toBuffer(),e.toBuffer()],r);return i}var ax,ox=n(6382).Buffer;function lx(e,t,n,r,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Xy,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:tx;const o=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:kn.yq.programId,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!1}];return new kn.fH({keys:o,programId:a,data:i})}function cx(e,t,n){if(n.length){e.push({pubkey:t,isSigner:!1,isWritable:!1});for(const t of n)e.push({pubkey:t instanceof kn.J3?t:t.publicKey,isSigner:!0,isWritable:!1})}else e.push({pubkey:t,isSigner:!0,isWritable:!1});return e}!function(e){e[e.InitializeMint=0]="InitializeMint",e[e.InitializeAccount=1]="InitializeAccount",e[e.InitializeMultisig=2]="InitializeMultisig",e[e.Transfer=3]="Transfer",e[e.Approve=4]="Approve",e[e.Revoke=5]="Revoke",e[e.SetAuthority=6]="SetAuthority",e[e.MintTo=7]="MintTo",e[e.Burn=8]="Burn",e[e.CloseAccount=9]="CloseAccount",e[e.FreezeAccount=10]="FreezeAccount",e[e.ThawAccount=11]="ThawAccount",e[e.TransferChecked=12]="TransferChecked",e[e.ApproveChecked=13]="ApproveChecked",e[e.MintToChecked=14]="MintToChecked",e[e.BurnChecked=15]="BurnChecked",e[e.InitializeAccount2=16]="InitializeAccount2",e[e.SyncNative=17]="SyncNative",e[e.InitializeAccount3=18]="InitializeAccount3",e[e.InitializeMultisig2=19]="InitializeMultisig2",e[e.InitializeMint2=20]="InitializeMint2",e[e.GetAccountDataSize=21]="GetAccountDataSize",e[e.InitializeImmutableOwner=22]="InitializeImmutableOwner",e[e.AmountToUiAmount=23]="Amou
2ntToUiAmount",e[e.UiAmountToAmount=24]="UiAmountToAmount",e[e.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",e[e.TransferFeeExtension=26]="TransferFeeExtension",e[e.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",e[e.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",e[e.Reallocate=29]="Reallocate",e[e.MemoTransferExtension=30]="MemoTransferExtension",e[e.CreateNativeMint=31]="CreateNativeMint",e[e.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",e[e.InterestBearingMintExtension=33]="InterestBearingMintExtension",e[e.CpiGuardExtension=34]="CpiGuardExtension",e[e.InitializePermanentDelegate=35]="InitializePermanentDelegate",e[e.TransferHookExtension=36]="TransferHookExtension",e[e.MetadataPointerExtension=39]="MetadataPointerExtension"}(ax||(ax={}));var ux=n(6382).Buffer;const dx=(0,Sy.w3)([(0,Sy.u8)("instruction"),Py("amount"),(0,Sy.u8)("decimals")]);function hx(e,t,n,r,i,s){let a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Xy;const o=cx([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0}],r,arguments.length>6&&void 0!==arguments[6]?arguments[6]:[]),l=ux.alloc(dx.span);return dx.encode({instruction:ax.TransferChecked,amount:BigInt(i),decimals:s},l),new kn.fH({keys:o,programId:a,data:l})}const px=new kn.J3("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"),fx=[{tier:"regular",durationHours:12,price:"$99",priceUsdc:99,label:"Spotlight 12hr",description:"Featured at the top of the watchlist for 12 hours"},{tier:"regular",durationHours:24,price:"$179",priceUsdc:179,label:"Spotlight 24hr",description:"Featured at the top of the watchlist for 24 hours"},{tier:"sponsor",durationHours:12,price:"$299",priceUsdc:299,label:"Research Sponsor 12hr",description:"Top placement + auto social research on all new watchlist tokens"},{tier:"sponsor",durationHours:24,price:"$549",priceUsdc:549,label:"Research Sponsor 24hr",description:"Top placement + auto social research on all new watchlist tokens"}],mx=e=>{const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4),i=Math.floor(r/60),s=Math.floor(i/24);return s>0?"".concat(s,"d ago"):i>0?"".concat(i,"h ago"):r>0?"".concat(r,"m ago"):"now"},gx=e=>{let{token:t,isSponsor:n,formatTimeAgo:r,formatMarketCap:i}=e;return(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("p",{className:"text-gray-500 text-[11px] mb-2",children:"Preview \u2014 how it will appear on the watchlist:"}),(0,Lg.jsxs)("div",{className:"rounded-xl p-4 flex items-center gap-3 ".concat(n?"bg-gradient-to-r from-purple-900/20 to-crypto-gray border border-purple-500/30":"bg-crypto-gray border border-crypto-yellow/20"),children:[t.image?(0,Lg.jsx)("img",{src:t.image,alt:"",className:"w-10 h-10 rounded-full object-cover bg-gray-700"}):(0,Lg.jsx)("div",{className:"w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center text-gray-400 font-bold text-lg",children:t.symbol.charAt(0)}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 min-w-0",children:[(0,Lg.jsx)("span",{className:"font-semibold text-[15px] text-white",children:t.symbol}),(0,Lg.jsx)("span",{className:"text-gray-400 text-[13px] truncate",children:t.name})]}),n?(0,Lg.jsxs)("span",{className:"text-[10px] font-semibold text-purple-300 bg-purple-500/20 px-2 py-0.5 rounded-full flex items-center gap-1 ml-2 whitespace-nowrap",children:[(0,Lg.jsx)("i",{className:"fas fa-crown text-[8px]"}),"SPONSOR"]}):(0,Lg.jsxs)("span",{className:"text-[10px] font-semibold text-crypto-yellow bg-crypto-yellow/10 px-2 py-0.5 rounded-full flex items-center gap-1 ml-2 whitespace-nowrap",children:[(0,Lg.jsx)("i",{className:"fas fa-star text-[8px]"}),"SPOTLIGHT"]})]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between text-[12px]",children:[(0,Lg.jsxs)("span",{className:"text-gray-500",children:["Added ",r(t.watchlistAddedAt)]}),t.market_cap>0&&(0,Lg.jsx)("span",{className:"text-gray-500",children:i(t.market_cap)})]})]})]}),t.description&&(0,Lg.jsx)("p",{className:"text-gray-500 text-xs mt-2 line-clamp-2",children:t.description})]})},yx=e=>{let{isOpen:t,onClose:n,preselectedMint:i,preselectedName:s,preselectedSymbol:a}=e;const{publicKey:o,signTransaction:l,connected:c}=Ca(),{setVisible:u}=Ba(),[d,h]=(0,r.useState)(i||""),[p,f]=(0,r.useState)(null),[m,g]=(0,r.useState)("usdc"),[y,x]=(0,r.useState)(""),[v,b]=(0,r.useState)(!1),[w,_]=(0,r.useState)(null),[j,k]=(0,r.useState)(null),[N,S]=(0,r.useState)(null),[E,A]=(0,r.useState)(null),[C,M]=(0,r.useState)(null),[T,P]=(0,r.useState)(null),[O,I]=(0,r.useState)(!1),[L,R]=(0,r.useState)(null),D=(0,r.useRef)(null);(0,r.useEffect)(()=>{i&&h(i)},[i]),(0,r.useEffect)(()=>{t&&Promise.all([Ng("".concat(Eg(),"/api/spotlight/availability?tier=regular")).then(e=>e.json()),Ng("".concat(Eg(),"/api/spotlight/availability?tier=sponsor")).then(e=>e.json())]).then(e=>{let[t,n]=e;A(t),M(n)}).catch(()=>{})},[t]),(0,r.useEffect)(()=>{D.current&&clearTimeout(D.current);const e=d.trim();return!e||e.length<32?(P(null),void R(null)):(I(!0),R(null),D.current=setTimeout(async()=>{try{const t=await Ng("".concat(Eg(),"/api/spotlight/validate/").concat(e)),n=await t.json();n.eligible?(P(n.token),R(null)):(P(null),R(n.error||"Token is not eligible"))}catch(t){P(null),R("Failed to validate token")}finally{I(!1)}},500),()=>{D.current&&clearTimeout(D.current)})},[d]);const B=async()=>
2{if(T&&p){b(!0),k(null);try{const e=await Ng("".concat(Eg(),"/api/spotlight/purchase"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mint:T.mint,tier:p.tier,durationHours:p.durationHours,email:y||void 0})}),t=await e.json();if(!e.ok)return void k(t.error||"Failed to create checkout");t.checkoutUrl&&(window.location.href=t.checkoutUrl)}catch(e){k("Something went wrong. Please try again.")}finally{b(!1)}}},F=async()=>{if(T&&p)if(o&&l){b(!0),k(null),S(null),_("Creating purchase...");try{const e=await Ng("".concat(Eg(),"/api/spotlight/purchase-usdc"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mint:T.mint,tier:p.tier,durationHours:p.durationHours,walletAddress:o.toBase58()})}),t=await e.json();if(!e.ok)return void k(t.error||"Failed to create purchase");const{spotlightId:n,amountUsdc:r,treasuryWallet:i}=t,s=new kn.J3(i),a=BigInt(r)*BigInt(10**6);_("Checking USDC balance...");const c=await Ng("".concat(Eg(),"/api/spotlight/usdc-balance/").concat(o.toBase58()));if(c.ok){const e=await c.json();if(e.balance<r)return void k("Insufficient USDC balance. You have ".concat(e.balance," USDC but need ").concat(r," USDC."))}_("Building transaction...");const u=await sx(px,o,!1,Xy),d=await sx(px,s,!1,Xy),h=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Xy,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:tx;return lx(e,t,n,r,ox.from([1]),i,s)}(o,d,s,px,Xy,tx),f=hx(u,px,d,o,a,6,[],Xy),m=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!m.ok)throw new Error("Could not fetch blockhash");const{blockhash:g}=await m.json(),y=(new kn.ZX).add(h,f);y.recentBlockhash=g,y.feePayer=o,_("Approve the transfer in your wallet...");const x=await l(y);_("Sending transaction...");const v=x.serialize().toString("base64"),b=await Ng("".concat(Eg(),"/api/burn/send-transaction"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transaction:v})});if(!b.ok){const e=await b.json();throw new Error(e.error||"Failed to send transaction")}const{signature:w}=await b.json();_("Verifying payment...");const j=await Ng("".concat(Eg(),"/api/spotlight/verify-usdc"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spotlightId:n,txSignature:w})});if(!j.ok){const e=await j.json();throw new Error(e.error||"Verification failed")}S({txSignature:w}),_(null)}catch(n){var e,t;null!==(e=n.message)&&void 0!==e&&e.includes("User rejected")||null!==(t=n.message)&&void 0!==t&&t.includes("rejected the request")?k("Transaction cancelled"):k(n.message||"USDC payment failed"),_(null)}finally{b(!1)}}else u(!0)};if(!t)return null;const U=e=>{const t="regular"===e?E:C;if(!t)return null;if(t.slotsAvailable>0)return(0,Lg.jsxs)("span",{className:"text-crypto-accent text-xs",children:[t.slotsAvailable," slot",t.slotsAvailable>1?"s":""," available now"]});const n=new Date(t.nextAvailableAt),r=Math.max(0,Math.ceil((n.getTime()-Date.now())/36e5));return(0,Lg.jsxs)("span",{className:"text-crypto-yellow text-xs",children:["Next slot in ~",r,"h (queued)"]})};return Fa.createPortal((0,Lg.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:n}),(0,Lg.jsxs)("div",{className:"relative bg-crypto-gray border border-gray-700 rounded-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-700",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-bold text-white",children:"Spotlight a Token"}),(0,Lg.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"Feature a clean watchlist token at the top of the page. If a subsequent scan flags risks, the spotlight will be removed with no refund."})]}),(0,Lg.jsx)("button",{onClick:n,className:"text-gray-400 hover:text-white transition-colors p-1 ml-4 flex-shrink-0",children:(0,Lg.jsx)("i",{className:"fas fa-times text-lg"})})]}),(0,Lg.jsxs)("div",{className:"p-6 space-y-6",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Token Mint Address"}),i?(0,Lg.jsxs)("div",{className:"bg-crypto-dark border border-gray-600 rounded-lg p-3 flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"font-semibold text-white",children:a||""}),(0,Lg.jsx)("span",{className:"text-gray-400 text-sm truncate",children:s||i})]}):(0,Lg.jsxs)("div",{className:"relative",children:[(0,Lg.jsx)("input",{type:"text",value:d,onChange:e=>h(e.target.value.trim()),placeholder:"Paste token mint address...",className:"w-full bg-crypto-dark border rounded-lg p-3 text-white font-mono text-sm placeholder-gray-500 focus:outline-none ".concat(T?"border-crypto-accent/50 focus:border-crypto-accent":L?"border-red-500/50 focus:border-red-500":"border-gray-600 focus:border-crypto-accent")}),O&&(0,Lg.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin text-gray-400 text-sm"})})]}),!i&&!T&&!L&&(0,Lg.jsx)("p",{className:"text-gray-500 text-xs mt-1.5",children:"Must be a clean token on the watchlist with research in the last hour"}),L&&(0,Lg.jsxs)("p",{className:"text-red-400 text-xs mt-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-circle mr-1"}),L]})]}),T&&(0,Lg.jsx)(gx,{token:T,isSponsor:"sponsor"===(null===p||void 0===p?void 0:p.tier),formatTimeAgo:mx,formatMarketCap:e=>!e||e<=0?"":e<1e6?"$".concat((e/1e3).toFixed(1),"K"):e<1e9?"$".concat((e/1e6).toFixed(1),"M"):"$".concat((e/1e9).toFixed(1),"B")}),(T||i)&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Choose a Plan"}),(0,Lg.jsx)("div",{className:"space-y-3",children:fx.map(e=>{const t=(null===p||void 0===p?void 0:p.tier)===e.tier&&(null===p||void 0===p?void 0:p.durationHours)===e.durationHours,n="sponsor"===e.tier;return(0,Lg.jsxs)("button",{onClick:()=>f(e),className:"w-full text-left p-4 rounded-xl border transition-all ".concat(t?n?"border-purple-500 bg-purple-500/10":"border-crypto-accent bg-crypto-accent/10":"border-gray-700 bg-crypto-dark hover:border-gray-500"),children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,Lg.jsx)("i",{className:"fas fa-crown text-purple-400 text-sm"}),(0,Lg.jsx)("span",{className:"font-semibold ".concat(n?"text-purple-300":"text-white"),children:e.label})]}),t&&(0,Lg.jsx)("span",{className:"font-bold text-lg text-white",children:e.price})]}),(0,Lg.jsx)("div",{className:"flex items-center justify-between",children:(0,Lg.jsx)("p",{className:"text-xs text-gray-400",children:e.description})}),(0,Lg.jsx)("div",{className:"mt-2",children:U(e.tier)})]},"".concat(e.tier,"_").concat(e.durationHours))})})]}),(T||i)&&p&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Payment Method"}),(0,Lg.jsxs)("div",{className:"flex rounded-xl overflow-hidden border border-gray-700",children:[(0,Lg.jsxs)("button",{onClick:()=>{g("usdc"),k(null)},className:"flex-1 py-2.5 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2 ".concat("usdc"===m?"bg-blue-500/15 text-blue-400 border-r border-blue-500/30":"bg-crypto-dark text-gray-400 hover:text-gray-300 border-r border-gray-700"),children:[(0,Lg.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 32 32",fill:"
2currentColor",children:[(0,Lg.jsx)("circle",{cx:"16",cy:"16",r:"16",fill:"currentColor",opacity:"0.2"}),(0,Lg.jsx)("path",{d:"M20.8 18.4c0-2.4-1.6-3.2-4.8-3.6-2.4-.4-2.8-.8-2.8-1.6s.8-1.2 2-1.2c1.2 0 2 .4 2.4 1.2l2.4-1.2c-.8-1.2-2-2-3.6-2.4V8h-2.4v1.6c-2.4.4-3.6 2-3.6 3.6 0 2.4 1.6 3.2 4.8 3.6 2 .4 2.8.8 2.8 1.6s-1.2 1.6-2.4 1.6c-1.6 0-2.4-.8-2.8-1.6l-2.4 1.2c.8 1.6 2 2.4 4 2.8V24h2.4v-1.6c2.4-.4 4-1.6 4-4z",fill:"currentColor"})]}),"USDC"]}),(0,Lg.jsxs)("button",{onClick:()=>{g("card"),S(null),k(null)},className:"flex-1 py-2.5 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2 ".concat("card"===m?"bg-crypto-accent/15 text-crypto-accent":"bg-crypto-dark text-gray-400 hover:text-gray-300"),children:[(0,Lg.jsx)("i",{className:"fas fa-credit-card text-xs"}),"Card"]})]}),"usdc"===m&&!c&&(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs mt-2",children:[(0,Lg.jsx)("i",{className:"fas fa-wallet mr-1"}),"You'll need to connect your wallet to pay with USDC"]})]}),(T||i)&&"card"===m&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:["Email ",(0,Lg.jsx)("span",{className:"text-gray-500",children:"(optional, for receipt)"})]}),(0,Lg.jsx)("input",{type:"email",value:y,onChange:e=>x(e.target.value),placeholder:"[email protected]",className:"w-full bg-crypto-dark border border-gray-600 rounded-lg p-3 text-white placeholder-gray-500 focus:border-crypto-accent focus:outline-none"})]}),N&&(0,Lg.jsxs)("div",{className:"bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg p-3",children:[(0,Lg.jsxs)("p",{className:"text-crypto-accent text-sm font-medium",children:["Payment confirmed! Your spotlight is now ",p?"sponsor"===p.tier?"live as Re
2search Sponsor":"live":"active","."]}),(0,Lg.jsx)("a",{href:"https://solscan.io/tx/".concat(N.txSignature),target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white text-xs mt-1 block transition-colors",children:"View transaction on Solscan \u2192"})]}),j&&(0,Lg.jsx)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-3 text-red-400 text-sm",children:j}),(T||i)&&!N&&(0,Lg.jsx)("button",{onClick:async()=>{T&&p&&("usdc"===m?await F():await B())},disabled:!T&&!i||!p||v,className:"w-full py-3 rounded-xl font-semibold text-lg transition-all ".concat(!T&&!i||!p||v?"bg-gray-700 text-gray-500 cursor-not-allowed":"usdc"===m?"bg-blue-600 hover:bg-blue-500 text-white":"sponsor"===(null===p||void 0===p?void 0:p.tier)?"bg-purple-600 hover:bg-purple-500 text-white":"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark"),children:v?(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin mr-2"}),w||"Processing..."]}):p?"usdc"===m?"Pay ".concat(p.priceUsdc," USDC \u2014 ").concat(p.label):"Pay ".concat(p.price," \u2014 ").concat(p.label):"Select a plan"})]})]})]}),document.body)},xx=Object.create(null);xx.open="0",xx.close="1",xx.ping="2",xx.pong="3",xx.message="4",xx.upgrade="5",xx.noop="6";const vx=Object.create(null);Object.keys(xx).forEach(e=>{vx[xx[e]]=e});const bx={type:"error",data:"parser error"},wx="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_x="function"===typeof ArrayBuffer,jx=e=>"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,kx=(e,t,n)=>{let{type:r,data:i}=e;return wx&&i instanceof Blob?t?n(i):Nx(i,n):_x&&(i instanceof ArrayBuffer||jx(i))?t?n(i):Nx(new Blob([i]),n):n(xx[r]+(i||""))},Nx=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function Sx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ex;const Ax="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cx="undefined"===typeof Uint8Array?[]:new Uint8Array(256);for(let n=0;n<64;n++)Cx[Ax.charCodeAt(n)]=n;const Mx="function"===typeof ArrayBuffer,Tx=(e,t)=>{if("string"!==typeof e)return{type:"message",data:Ox(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:Px(e.substring(1),t)};return vx[n]?e.length>1?{type:vx[n],data:e.substring(1)}:{type:vx[n]}:bx},Px=(e,t)=>{if(Mx){const n=(e=>{let t,n,r,i,s,a=.75*e.length,o=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<o;t+=4)n=Cx[e.charCodeAt(t)],r=Cx[e.charCodeAt(t+1)],i=Cx[e.charCodeAt(t+2)],s=Cx[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&s;return c})(e);return Ox(n,t)}return{base64:!0,data:e}},Ox=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Ix=String.fromCharCode(30);function Lx(){return new TransformStream({transform(e,t){!function(e,t){wx&&e.data instanceof Blob?e.data.arrayBuffer().then(Sx).then(t):_x&&(e.data instanceof ArrayBuffer||jx(e.data))?t(Sx(e.data)):kx(e,!1,e=>{Ex||(Ex=new TextEncoder),t(Ex.encode(e))})}(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!==typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Rx;function Dx(e){return e.reduce((e,t)=>e+t.length,0)}function Bx(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Fx(e){if(e)return function(e){for(var t in Fx.prototype)e[t]=Fx.prototype[t];return e}(e)}Fx.prototype.on=Fx.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Fx.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Fx.prototype.off=Fx.prototype.removeListener=Fx.prototype.removeAllListeners=Fx.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},Fx.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},Fx.prototype.emitReserved=Fx.prototype.emit,Fx.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Fx.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ux="function"===typeof Promise&&"function"===typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),zx="undefined"!==typeof self?self:"undefined"!==typeof window?window:Function("return this")();function qx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const Wx=zx.setTimeout,Hx=zx.clearTimeout;function Kx(e,t){t.useNativeTimers?(e.setTimeoutFn=Wx.bind(zx),e.clearTimeoutFn=Hx.bind(zx)):(e.setTimeoutFn=zx.setTimeout.bind(zx),e.clearTimeoutFn=zx.clearTimeout.bind(zx))}function Vx(e){return"string"===typeof e?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}function $x(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}
vendor: 4,328 bytes, line 2
2class Yx extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Gx extends Fx{constructor(e){super(),this.writable=!1,Kx(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new Yx(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Tx(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class Jx extends Gx{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(Ix),r=[];for(let i=0;i<n.length;i++){const e=Tx(n[i],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((e,s)=>{kx(e,!1,e=>{r[s]=e,++i===n&&t(r.join(Ix))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=$x()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Zx=!1;try{Zx="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(h$){}const Qx=Zx;function Xx(){}class ev extends Jx{constructor(e){if(super(e),"undefined"!==typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!==typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class tv extends Fx{constructor(e,t,n){super(),this.createRequest=e,Kx(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;const t=qx(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(d$){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(d$){}try{n.setRequestHeader("Accept","*/*")}catch(d$){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&
vendor: 4,300 bytes, line 2
2(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"===typeof n.status?n.status:0)},0))},n.send(this._data)}catch(d$){return void this.setTimeoutFn(()=>{this._onError(d$)},0)}"undefined"!==typeof document&&(this._index=tv.requestsCount++,tv.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if("undefined"!==typeof this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Xx,e)try{this._xhr.abort()}catch(d$){}"undefined"!==typeof document&&delete tv.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(tv.requestsCount=0,tv.requests={},"undefined"!==typeof document)if("function"===typeof attachEvent)attachEvent("onunload",nv);else if("function"===typeof addEventListener){addEventListener("onpagehide"in zx?"pagehide":"unload",nv,!1)}function nv(){for(let e in tv.requests)tv.requests.hasOwnProperty(e)&&tv.requests[e].abort()}const rv=function(){const e=iv({xdomain:!1});return e&&null!==e.responseType}();function iv(e){const t=e.xdomain;try{if("undefined"!==typeof XMLHttpRequest&&(!t||Qx))return new XMLHttpRequest}catch(d$){}if(!t)try{return new(zx[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(d$){}}const sv="undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class av extends Gx{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=sv?{}:qx(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(h$){return this.emitReserved("error",h$)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;kx(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(d$){}r&&Ux(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){"undefined"!==typeof this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=$x()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const ov=zx.WebSocket||zx.MozWebSocket;const lv={websocket:class extends av{createSocket(e,t,n){return sv?new ov(e,t,n):t?new ov(e,t):new ov(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Gx{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(h$){return this.emitReserved("error",h$)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){Rx||(Rx=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(a,o){for(n.push(a);;){if(0===r){if(Dx(n)<1)break;const e=Bx(n,1);s=128===(128&e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(Dx(n)<2)break;const e=Bx(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(Dx(n)<8)break;const e=Bx(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),s=t.getUint32(0);if(s>Math.pow(2,21)-1){o.enqueue(bx);break}i=s*Math.pow(2,32)+t.getUint32(4),r=3}else{if(Dx(n)<i)break;const e=Bx(n,i);o.enqueue(Tx(s?e:Rx.decode(e),t)),r=0}if(0===i||i>e){o.enqueue(bx);break}}}})}
vendor: 3,566 bytes, line 2
2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Lx();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then(e=>{let{done:t,value:n}=e;t||(this.onPacket(n),i())}).catch(e=>{})};i();const s={type:"open"};this.query.sid&&(s.data='{"sid":"'.concat(this.query.sid,'"}')),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&Ux(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends ev{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=rv&&!t}request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(e,{xd:this.xd},this.opts),new tv(iv,this.uri(),e)}}},cv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,uv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dv(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=cv.exec(e||""),s={},a=14;for(;a--;)s[uv[a]]=i[a]||"";return-1!=n&&-1!=r&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,s.path),s.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,s.query),s}const hv="function"===typeof addEventListener&&"function"===typeof removeEventListener,pv=[];hv&&addEventListener("offline",()=>{pv.forEach(e=>e())},!1);class fv extends Fx{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"===typeof e&&(t=e,e=null),e){const n=dv(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=dv(t.host).host);Kx(this,t),this.secure=null!=t.secure?t.secure:"undefined"!==typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!==typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!==typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"===typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let e=n[r].split("=");
vendor: 5,759 bytes, line 2
2t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),hv&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},pv.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&fv.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",fv.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=Vx(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Ux(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"===typeof t&&(r=t,t=void 0),"function"===typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(fv.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),hv&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=pv.indexOf(this._offlineEventListener);-1!==e&&pv.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}fv.protocol=4;class mv extends fv{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;fv.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;fv.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}
vendor: 5,228 bytes, line 2
2]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function i(){n||(n=!0,c(),t.close(),t=null)}const s=e=>{const n=new Error("probe error: "+e);n.transport=t.name,i(),this.emitReserved("upgradeError",n)};function a(){s("transport closed")}function o(){s("socket closed")}function l(e){t&&e.name!==t.name&&i()}const c=()=>{t.removeListener("open",r),t.removeListener("error",s),t.removeListener("close",a),this.off("close",o),this.off("upgrading",l)};t.once("open",r),t.once("error",s),t.once("close",a),this.once("close",o),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}class gv extends mv{constructor(e){const t="object"===typeof e?e:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(!t.transports||t.transports&&"string"===typeof t.transports[0])&&(t.transports=(t.transports||["polling","websocket","webtransport"]).map(e=>lv[e]).filter(e=>!!e)),super(e,t)}}const yv="function"===typeof ArrayBuffer,xv=Object.prototype.toString,vv="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===xv.call(Blob),bv="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===xv.call(File);function wv(e){return yv&&(e instanceof ArrayBuffer||(e=>"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||vv&&e instanceof Blob||bv&&e instanceof File}function _v(e,t){if(!e||"object"!==typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(_v(e[t]))return!0;return!1}if(wv(e))return!0;if(e.toJSON&&"function"===typeof e.toJSON&&1===arguments.length)return _v(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&_v(e[n]))return!0;return!1}function jv(e){const t=[],n=e.data,r=e;return r.data=kv(n,t),r.attachments=t.length,{packet:r,buffers:t}}function kv(e,t){if(!e)return e;if(wv(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=kv(e[r],t);return n}if("object"===typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=kv(e[r],t));return n}return e}function Nv(e,t){return e.data=Sv(e.data,t),delete e.attachments,e}function Sv(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"===typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Sv(e[n],t);else if("object"===typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sv(e[n],t));return e}const Ev=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Av=5;var Cv;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(Cv||(Cv={}));class Mv{constructor(e){this.replacer=e}encode(e){return e.type!==Cv.EVENT&&e.type!==Cv.ACK||!_v(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Cv.EVENT?Cv.BINARY_EVENT:Cv.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Cv.BINARY_EVENT&&e.type!==Cv.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=jv(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}class Tv extends Fx{constructor(e){super(),this.reviver=e}add(e){let t;if("string"===typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===Cv.BINARY_EVENT;n||t.type===Cv.BINARY_ACK?(t.type=n?Cv.EVENT:Cv.ACK,this.reconstructor=new Pv(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!wv(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===Cv[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Cv.BINARY_EVENT||n.type===Cv.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));
2if(!Tv.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(d$){return!1}}static isPayloadValid(e,t){switch(e){case Cv.CONNECT:return Iv(t);case Cv.DISCONNECT:return void 0===t;case Cv.CONNECT_ERROR:return"string"===typeof t||Iv(t);case Cv.EVENT:case Cv.BINARY_EVENT:return Array.isArray(t)&&("number"===typeof t[0]||"string"===typeof t[0]&&-1===Ev.indexOf(t[0]));case Cv.ACK:case Cv.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Pv{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=Nv(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ov=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e};function Iv(e){return"[object Object]"===Object.prototype.toString.call(e)}function Lv(e){return"string"===typeof e.nsp&&(void 0===(t=e.id)||Ov(t))&&function(e,t){switch(e){case Cv.CONNECT:return void 0===t||Iv(t);case Cv.DISCONNECT:return void 0===t;case Cv.EVENT:return Array.isArray(t)&&("number"===typeof t[0]||"string"===typeof t[0]&&-1===Ev.indexOf(t[0]));case Cv.ACK:return Array.isArray(t);case Cv.CONNECT_ERROR:return"string"===typeof t||Iv(t);default:return!1}}(e.type,e.data);var t}function Rv(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Dv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Bv extends Fx{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Rv(e,"open",this.onopen.bind(this)),Rv(e,"packet",this.onpacket.bind(this)),Rv(e,"error",this.onerror.bind(this)),Rv(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("message"),this.emit.apply(this,t),this}emit(e){var t,n,r;if(Dv.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(s.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const o={type:Cv.EVENT,data:s,options:{}};if(o.options.compress=!1!==this.flags.compress,"function"===typeof s[s.length-1]){const e=this.ids++,t=s.pop();this._registerAckCallback(e,t),o.id=e}const l=null===(n=null===(t=this.io.engine)||void 0===t?void 0:t.transport)||void 0===n?void 0:n.writable,c=this.connected&&!(null===(r=this.io.engine)||void 0===r?void 0:r._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var n,r=this;const i=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===i)return void(this.acks[e]=t);const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},i),a=function(){r.io.clearTimeoutFn(s);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t.apply(r,n)};a.withError=!0,this.acks[e]=a}emitWithAck(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Promise((t,r)=>{const i=(e,n)=>e?r(e):t(n);i.withError=!0,n.push(i),this.emit(e,...n)})}_addToQueue(e){var t=this;let n;"function"===typeof e[e.length-1]&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(function(e){t._queue[0];if(null!==e)r.tryCount>t._opts.retries&&(t._queue.shift(),n&&n(e));else if(t._queue.shift(),n){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];n(null,...s)}return r.pending=!1,t._drainQueue()}),this._queue.push(r),this._drainQueue()}_drainQueue(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.connected||0===this._queue.length)return;const t=this._queue[0];
vendor: 7,661 bytes, line 2
2t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Cv.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Cv.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Cv.EVENT:case Cv.BINARY_EVENT:this.onevent(e);break;case Cv.ACK:case Cv.BINARY_ACK:this.onack(e);break;case Cv.DISCONNECT:this.ondisconnect();break;case Cv.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"===typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];t.packet({type:Cv.ACK,id:e,data:i})}}}onack(e){const t=this.acks[e.id];"function"===typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Cv.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function Fv(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Fv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},Fv.prototype.reset=function(){this.attempts=0},Fv.prototype.setMin=function(e){this.ms=e},Fv.prototype.setMax=function(e){this.max=e},Fv.prototype.setJitter=function(e){this.jitter=e};class Uv extends Fx{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&"object"===typeof t&&(n=t,t=void 0),(n=n||{}).path=n.path||"/socket.io",this.opts=n,Kx(this,n),this.reconnection(!1!==n.reconnection),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=n.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new Fv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==n.timeout?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==n.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new gv(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Rv(t,"open",function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},s=Rv(t,"error",i);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Rv(e,"ping",this.onping.bind(this)),Rv(e,"data",this.ondata.bind(this)),Rv(e,"error",this.onerror.bind(this)),Rv(e,"close",this.onclose.bind(this)),Rv(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(d$){this.onclose("parse error",d$)}}ondecoded(e){Ux(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Bv(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t){if(this.nsps[n].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;
2n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const zv={};function qv(e,t){"object"===typeof e&&(t=e,e=void 0);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=e;n=n||"undefined"!==typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"===typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e="undefined"!==typeof n?n.protocol+"//"+e:"https://"+e),r=dv(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,s=n.path,a=zv[i]&&s in zv[i].nsps;let o;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?o=new Uv(r,t):(zv[i]||(zv[i]=new Uv(r,t)),o=zv[i]),n.query&&!t.query&&(t.query=n.queryKey),o.socket(n.path,t)}Object.assign(qv,{Manager:Uv,Socket:Bv,io:qv,connect:qv});const Wv=Eg();const Hv=/^0x[0-9a-fA-F]{40}$/,Kv=e=>!!e&&Hv.test(e.trim()),Vv=["robinhood","base","ethereum","bsc","arc"],$v={robinhood:{name:"Robinhood Chain",short:"RH",explorer:"https://robinhoodchain.blockscout.com",dexscreener:"robinhood",badgeClass:"text-lime-300 bg-lime-500/10 border-lime-500/30"},base:{name:"Base",short:"BASE",explorer:"https://basescan.org",gmgn:"base",dexscreener:"base",badgeClass:"text-blue-300 bg-blue-500/10 border-blue-500/30"},ethereum:{name:"Ethereum",short:"ETH",explorer:"https://etherscan.io",gmgn:"eth",dexscreener:"ethereum",badgeClass:"text-indigo-300 bg-indigo-500/10 border-indigo-500/30"},bsc:{name:"BNB Chain",short:"BSC",explorer:"https://bscscan.com",gmgn:"bsc",dexscreener:"bsc",badgeClass:"text-yellow-300 bg-yellow-500/10 border-yellow-500/30"},arc:{name:"Arc",short:"ARC",explorer:"https://explorer.arc.io",dexscreener:"arc",badgeClass:"text-cyan-300 bg-cyan-500/10 border-cyan-500/30"}};function Yv(e,t){const n=Xv(t);return n?"/token/".concat(n,"/").concat(e.toLowerCase()):"/token/".concat(e)}function Gv(e,t){const n=Xv(t);return n?"/wallet/".concat(n,"/").concat(e.toLowerCase()):"/wallet/".concat(e)}function Jv(e,t){return Xv(t)?Gv(e,t):"/network/".concat(e)}function Zv(e,t,n){const r=Xv(n);return r?"".concat($v[r].explorer,"/").concat(e,"/").concat(t):"https://solscan.io/".concat("address"===e?"account":e,"/").concat(t)}function Qv(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest";const r=Xv(t);return r?"/holder-analysis/".concat(r,"/").concat(e.toLowerCase(),"/").concat(n):"/holder-analysis/".concat(e,"/").concat(n)}function Xv(e){const t=(e||"").trim().toLowerCase();return Object.prototype.hasOwnProperty.call($v,t)?t:null}const eb=["https://ipfs.filebase.io/ipfs/","https://gateway.pinata.cloud/ipfs/"];function tb(e){if(!e)return[];const t=function(e){const t=e.trim();let n=t.match(/^ipfs:\/\/(?:ipfs\/)?(.+)$/i);
2return n?n[1]:(n=t.match(/^https?:\/\/[^/]+\/ipfs\/(.+)$/i),n?n[1]:(n=t.match(/^https?:\/\/([a-z0-9]{46,})\.ipfs\.[^/]+(\/.*)?$/i),n?n[1]+(n[2]||""):null))}(e);if(!t)return[e];const n=eb.map(e=>e+t);return/^https?:/i.test(e)&&!n.includes(e)&&n.push(e),n}const nb=/^[1-9A-HJ-NP-Za-km-z]{32,44}$/,rb=()=>{const[e,t]=(0,r.useState)(""),[n,i]=(0,r.useState)([]),[s,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)(null),d=he();(0,r.useEffect)(()=>{Ng("".concat(Eg(),"/api/stats")).then(e=>e.ok?e.json():null).then(e=>{e&&u(e)}).catch(()=>{})},[]);const h=(0,r.useCallback)((e,n,r)=>{Og("search_result_clicked",{resultType:e.searchResultType,hasHolderData:"token"===e.searchResultType?!!e.hasHolderData:null,position:n.findIndex(t=>t===e),resultCount:n.length,auto:r}),t(""),i([]),l(!1),"token"===e.searchResultType?d("/token/".concat(e.mint)):"network"===e.searchResultType?d("/network/".concat(e.walletAddress)):"wallet"===e.searchResultType&&d("/wallet/".concat(e.walletAddress))},[d]),p=(0,r.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.trim().length<2)return i([]),void l(!1);a(!0);const n=Date.now();try{const r=await Ng("".concat(Eg(),"/api/search?q=").concat(encodeURIComponent(e)));if(r.ok){const s=await r.json();if(i(s),l(!0),Og("search_performed",{queryLength:e.trim().length,resultCount:Array.isArray(s)?s.length:0,ms:Date.now()-n,autoNavigated:!(!t||!Array.isArray(s)||1!==s.length)}),t&&Array.isArray(s)&&1===s.length)return void h(s[0],s,!0)}else Og("search_failed",{status:r.status,ms:Date.now()-n})}catch(r){console.error("Search error:",r),i([]),Og("search_failed",{status:0,ms:Date.now()-n})}finally{a(!1)}},[h]);(0,r.useEffect)(()=>{const n=e.trim();if(n.length<2)return i([]),l(!1),void a(!1);if(a(!0),Kv(n))return Og("search_result_clicked",{resultType:"evm_address",hasHolderData:null,position:-1,resultCount:0,auto:!0}),t(""),void d("/token/".concat(n.toLowerCase()));if(nb.test(n))return void p(e,!0);const r=setTimeout(()=>{p(e)},250);return()=>clearTimeout(r)},[e,p,d]);const f=e=>h(e,n,!1);return(0,r.useEffect)(()=>{const e=e=>{e.target.closest(".search-container")||l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,Lg.jsxs)("section",{className:"text-center mb-6",children:[(0,Lg.jsx)("h1",{className:"text-4xl sm:text-5xl font-semibold mb-2 text-white tracking-tight",children:"Deep Insight, No Digging"}),(0,Lg.jsx)("p",{className:"text-lg text-gray-400 mb-2 max-w-2xl mx-auto font-normal",children:"Deep funding-network mapping, holder research, and safety analysis for Solana tokens."}),(0,Lg.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 sm:gap-8 mb-3 text-sm text-gray-500",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-crypto-accent"}),(0,Lg.jsx)("span",{children:"Detects coordinated wallet networks"})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-crypto-red"}),(0,Lg.jsx)("span",{children:"Identifies liquidity traps"})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-crypto-yellow"}),(0,Lg.jsx)("span",{children:null!==c&&void 0!==c&&c.tokensAnalyzed?"".concat(c.tokensAnalyzed.toLocaleString(),"+ tokens analyzed daily"):"Thousands of tokens analyzed daily"})]})]}),(0,Lg.jsxs)("div",{className:"max-w-2xl mx-auto relative search-container",children:[(0,Lg.jsxs)("div",{className:"relative",children:[(0,Lg.jsx)("input",{type:"text",value:e,onChange:e=>{const n=e.target.value;t(n)},onKeyDown:e=>{"Enter"===e.key&&n.length>0?f(n[0]):"Escape"===e.key&&(t(""),i([]),l(!1))},placeholder:"Paste token mint address or search by name/symbol...",className:"w-full bg-crypto-gray border border-gray-700 rounded-xl px-6 py-4 text-lg focus:outline-none focus:border-crypto-accent transition-colors pr-16",autoComplete:"off"}),(0,Lg.jsx)("button",{type:"button",onClick:()=>{n.length>0?f(n[0]):e.trim().length>=2&&p(e)},"aria-label":"Search",className:"absolute right-2 top-1/2 transform -translate-y-1/2 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-2 rounded-lg font-medium transition-all disabled:opacity-50",children:s?(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin"}):(0,Lg.jsx)("i",{className:"fas fa-search"})})]}),o&&n.length>0&&(0,Lg.jsx)("div",{className:"absolute top-full mt-2 w-full bg-crypto-gray border border-gray-700 rounded-xl shadow-lg z-50 max-h-96 overflow-y-auto",children:n.map(e=>"token"===e.searchResultType?(0,Lg.jsxs)("div",{className:"flex items-center space-x-4 p-4 hover:bg-gray-700 cursor-pointer border-b border-gray-700 last:border-b-0",onClick:()=>
2f(e),children:[(0,Lg.jsx)(db,{uri:e.uri||"",uriMetadata:e.uriMetadata,symbol:e.symbol,name:e.name}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 mb-1 min-w-0",children:[(0,Lg.jsx)("span",{className:"font-bold shrink-0",children:e.symbol}),(0,Lg.jsx)("span",{className:"text-gray-300 text-sm truncate",children:e.name})]}),(0,Lg.jsxs)("div",{className:"text-gray-400 text-sm",children:[e.hasHolderData?"".concat(e.totalHolders," holders \u2022 ").concat(e.networkPercentage,"% network owned"):"No holder analysis available",e.createdAt&&(0,Lg.jsxs)(Lg.Fragment,{children:[" \u2022 ","Created ",ab("string"===typeof e.createdAt?e.createdAt:e.createdAt.toISOString())]})]}),(0,Lg.jsx)("div",{className:"text-gray-500 text-xs font-mono truncate",children:e.mint})]}),e.hasHolderData&&e.riskLevel&&(0,Lg.jsx)("div",{className:"text-sm font-medium px-2 py-1 rounded shrink-0 whitespace-nowrap ".concat("DANGEROUS"===e.riskLevel||"RISKY"===e.riskLevel?"bg-crypto-red text-white":"bg-crypto-accent text-crypto-dark"),children:e.riskLevel})]},e.mint):"network"===e.searchResultType?(0,Lg.jsxs)("div",{className:"flex items-center space-x-4 p-4 hover:bg-gray-700 cursor-pointer border-b border-gray-700 last:border-b-0",onClick:()=>f(e),children:[(0,Lg.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-600 flex items-center justify-center",children:(0,Lg.jsx)("i",{className:"fas fa-wallet text-gray-400"})}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Lg.jsx)("span",{className:"font-bold",children:"Funding Network Root Wallet"}),(0,Lg.jsxs)("span",{className:"text-gray-300 text-sm",children:["(",e.totalNetworkSize," wallets)"]})]}),(0,Lg.jsx)("div",{className:"text-gray-500 text-xs font-mono truncate",children:e.walletAddress})]})]},e.walletAddress):"wallet"===e.searchResultType?(0,Lg.jsxs)("div",{className:"flex items-center space-x-4 p-4 hover:bg-gray-700 cursor-pointer border-b border-gray-700 last:border-b-0",onClick:()=>f(e),children:[(0,Lg.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-600 flex items-center justify-center",children:(0,Lg.jsx)("i",{className:"fas fa-wallet text-gray-400"})}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Lg.jsx)("span",{className:"font-bold",children:"Wallet"}),e.exchange&&(0,Lg.jsxs)("span",{className:"text-gray-300 text-sm",children:["(",e.exchange,")"]})]}),(0,Lg.jsxs)("div",{className:"text-gray-400 text-sm",children:["Top funding source: ",e.topFundingSource]}),(0,Lg.jsx)("div",{className:"text-gray-500 text-xs font-mono truncate",children:e.walletAddress})]})]},e.walletAddress):null)}),o&&0===n.length&&e.length>=2&&!s&&(0,Lg.jsx)("div",{className:"absolute top-full mt-2 w-full bg-crypto-gray border border-gray-700 rounded-xl shadow-lg z-50 p-4 text-center text-gray-400",children:nb.test(e.trim())?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"mb-1 text-gray-200",children:"We haven't analyzed this token yet."}),(0,Lg.jsx)("div",{className:"mb-3 text-gray-500 text-xs font-mono break-all",children:e.trim()}),(0,Lg.jsx)("button",{onClick:()=>{Og("search_result_clicked",{resultType:"unresearched_mint",hasHolderData:!1,position:-1,resultCount:0}),d("/token/".concat(e.trim()))},className:"inline-block bg-crypto-accent text-crypto-dark font-medium px-4 py-2 rounded-lg hover:bg-crypto-accent/80 text-sm",children:"Research this token"})]}):(0,Lg.jsxs)("div",{children:['No tokens found matching "',e,'"']})})]})]})},ib=e=>{let{bundles:t,watchlistTokens:n,performers:r,spotlights:i,bundlesLoading:s,watchlistLoading:a,performersLoading:o,bundlesError:l,watchlistError:c,performersError:u,onRequestAnalysis:d}=e;return(0,Lg.jsx)("section",{className:"mb-4",children:(0,Lg.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Lg.jsx)(cb,{performers:r,spotlights:i,loading:o,error:u,onRequestAnalysis:d}),(0,Lg.jsx)(lb,{tokens:n,loading:a,error:c,onRequestAnalysis:d}),(0,Lg.jsx)(ob,{bundles:t,loading:s,error:l,onRequestAnalysis:d})]})})},sb=e=>!e||e<=0||e<1e3?"":e<1e6?"".concat((e/1e3).toFixed(1),"K"):e<1e9?"".concat((e/1e6).toFixed(1),"M"):"".concat((e/1e9).toFixed(1),"B"),ab=e=>{const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4),i=Math.floor(r/60),s=Math.floor(i/24);return s>0?"".concat(s,"d ago"):i>0?"".concat(i,"h ago"):r>0?"".concat(r,"m ago"):"now"},ob=e=>{let{bundles:t,loading:n,error:r,onRequestAnalysis:i}=e;const s=Sg();return n?(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-crypto-red mr-3"}),"Flagged"]}),(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-gray-400",children:[(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin"}),(0,Lg.jsx)("span",{children:s?"Verifying your browser\u2026":"Loading..."})]})]}),(0,Lg.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((e,t)=>(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl py-2 px-3 animate-pulse",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Lg.jsx)("div",{className:"w-10 h-10 bg-gray-600 rounded-full"}),(0,Lg.jsxs)("div",{className:"flex-1",children:[(0,Lg.jsx)("div",{className:"h-4 bg-gray-600 rounded mb-2 w-1/2"}),(0,Lg.jsx)("div",{className:"h-3 bg-gray-600 rounded w-3/4"})]})]})},t))})]}):r?(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-crypto-red mr-3"}),"Flagged"]})}),(0,Lg.jsxs)("div",{className:"text-center py-12 bg-crypto-gray border border-gray-700 rounded-xl",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Failed to load bundles: ",r]}),(0,Lg.jsx)("button",{onClick:()=>window.location.reload(),className:"mt-4 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-2 rounded-lg font-medium transition-all",children:"Try Again"})]})]}):(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-crypto-red mr-3"}),"Flagged"]})}),(0,Lg.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>{const t=e.flag||"flagged";
2return(0,Lg.jsx)("div",{className:"flag-slide-in",children:(0,Lg.jsx)(ft,{to:Yv(e.mint,e.chain),className:"block bg-crypto-gray border border-gray-700 rounded-xl py-2 px-3 hover:border-crypto-red/40 hover:shadow-lg hover:shadow-crypto-red/5 transition-all duration-200 cursor-pointer",children:(0,Lg.jsxs)("div",{className:"grid grid-cols-[auto_1fr_auto] gap-3 items-center",children:[(0,Lg.jsx)(db,{uri:e.uri,uriMetadata:e.uriMetadata,symbol:e.symbol,name:e.name}),(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 mb-1",children:[(0,Lg.jsxs)("h3",{className:"font-semibold text-[15px] text-white whitespace-nowrap inline-flex items-baseline",children:[e.symbol,(0,Lg.jsx)(ub,{chain:e.chain}),(0,Lg.jsx)(jy,{locked:e.lockedPercent,staked:e.stakedPercent,multisig:e.multisigPercent,burned:e.burnPercent,multisigVaultCount:e.multisigVaultCount,multisigThreshold:e.multisigThreshold,multisigMemberCount:e.multisigMemberCount})]}),(0,Lg.jsx)("span",{className:"text-gray-400 text-[13px] truncate",children:e.name})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] whitespace-nowrap",children:[(0,Lg.jsxs)("span",{className:"text-gray-500 font-mono",children:[e.mint.slice(0,4),"\u2026",e.mint.slice(-4)]}),(0,Lg.jsx)("span",{className:"text-gray-600",children:"\xb7"}),(0,Lg.jsx)("span",{className:"text-gray-500",children:ab(e.timestamp||e.createdAt)})]})]}),(0,Lg.jsx)("span",{className:"text-[11px] font-semibold px-2 py-1 rounded-md whitespace-nowrap text-crypto-red bg-crypto-red/10",children:t})]})})},e.mint)})})]})},lb=e=>{let{tokens:t,loading:n,error:i,onRequestAnalysis:s}=e;const a=Sg(),[o,l]=(0,r.useState)("all"),c=Array.from(new Set(t.map(e=>{var t;return null!==(t=e.chain)&&void 0!==t?t:"solana"}))),u="all"===o?t:t.filter(e=>{var t;return(null!==(t=e.chain)&&void 0!==t?t:"solana")===o}),d=u.slice(0,10);return n?(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-list text-crypto-accent mr-3"}),"New Watchlist"]}),(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-gray-400",children:[(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin"}),(0,Lg.jsx)("span",{children:a?"Verifying your browser\u2026":"Loading..."})]})]}),(0,Lg.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((e,t)=>(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl py-2 px-3 animate-pulse",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Lg.jsx)("div",{className:"w-10 h-10 bg-gray-600 rounded-full"}),(0,Lg.jsxs)("div",{className:"flex-1",children:[(0,Lg.jsx)("div",{className:"h-4 bg-gray-600 rounded mb-2 w-1/2"}),(0,Lg.jsx)("div",{className:"h-3 bg-gray-600 rounded w-3/4"})]})]})},t))})]}):i?(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-list text-crypto-accent mr-3"}),"New Watchlist"]})}),(0,Lg.jsxs)("div",{className:"text-center py-12 bg-crypto-gray border border-gray-700 rounded-xl",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Failed to load watchlist: ",i]}),(0,Lg.jsx)("button",{onClick:()=>window.location.reload(),className:"mt-4 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-2 rounded-lg font-medium transition-all",children:"Try Again"})]})]}):(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-list text-crypto-accent mr-3"}),"New Watchlist"]}),c.length>1&&(0,Lg.jsx)("div",{className:"flex items-center gap-1 text-[11px]",role:"group","aria-label":"Filter by chain",children:["all",...c].map(e=>{var t,n,r;return(0,Lg.jsx)("button",{onClick:()=>l(e),"aria-pressed":o===e,className:"px-2 py-0.5 rounded border transition-colors ".concat(o===e?"border-crypto-accent text-crypto-accent":"border-gray-700 text-gray-400 hover:text-white"),children:"all"===e?"All":"solana"===e?"SOL":null!==(t=null===(n=$v[null!==(r=Xv(e))&&void 0!==r?r:"base"])||void 0===n?void 0:n.short)&&void 0!==t?t:e},e)})})]}),(0,Lg.jsx)("div",{className:"space-y-2",children:d.map(e=>{var t;const n=e.timestamp?ab(e.timestamp):"recently",r=sb(e.market_cap);return(0,Lg.jsx)(ft,{to:Yv(e.mint,e.chain),onClick:()=>{try{navigator.sendBeacon("".concat(Eg(),"/api/spotlight/click"),new Blob([JSON.stringify({mint:e.mint,spotlighted:!1,tier:null})],{type:"application/json"}))}catch(Uo){}},className:"block bg-crypto-gray border border-gray-700 rounded-xl py-2 px-3 hover:border-crypto-accent/40 hover:shadow-lg hover:shadow-crypto-accent/5 transition-all duration-200 cursor-pointer",children:(0,Lg.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Lg.jsx)(db,{uri:e.ur
2i||"",uriMetadata:e.uriMetadata,symbol:e.symbol,name:e.name}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-1",children:(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 min-w-0",children:[(0,Lg.jsxs)("h3",{className:"font-semibold text-[15px] text-white inline-flex items-baseline",children:[e.symbol,(0,Lg.jsx)(ub,{chain:e.chain}),e.charityName&&(0,Lg.jsx)("i",{className:"fas fa-hand-holding-heart text-pink-400 ml-1.5 text-[12px]",title:"Charity coin \u2014 fees routed via ".concat(null!==(t=e.charityDonationSource)&&void 0!==t?t:"donate.gg"," (listed on donate.gg)")}),(0,Lg.jsx)(jy,{locked:e.lockedPercent,staked:e.stakedPercent,multisig:e.multisigPercent,burned:e.burnPercent,multisigVaultCount:e.multisigVaultCount,multisigThreshold:e.multisigThreshold,multisigMemberCount:e.multisigMemberCount})]}),(0,Lg.jsx)("span",{className:"text-gray-400 text-[13px] truncate",children:e.name})]})}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between text-[12px]",children:[(0,Lg.jsxs)("span",{className:"text-gray-500",children:["Added ",n]}),r&&(0,Lg.jsxs)("span",{className:"text-gray-500",children:["$",r]})]})]})]})},e.mint)})})]})},cb=e=>{let{performers:t,spotlights:n=[],loading:i,error:s,onRequestAnalysis:a}=e;const l=Sg(),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)([]);if((0,r.useEffect)(()=>{if(!c&&t.length>0){const e=[...t].sort((e,t)=>(t.currentMultiplier||0)-(e.currentMultiplier||0)).map(e=>e.mint);h(e)}},[t,c]),(0,r.useEffect)(()=>{if(0===d.length&&t.length>0){const e=[...t].sort((e,t)=>(t.currentMultiplier||0)-(e.currentMultiplier||0)).map(e=>e.mint);h(e)}},[t,d.length]),i)return(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-chart-line text-green-400 mr-3"}),"Performers"]}),(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-gray-400",children:[(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin"}),(0,Lg.jsx)("span",{children:l?"Verifying your browser\u2026":"Loading..."})]})]}),(0,Lg.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((e,t)=>(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl py-2 px-3 animate-pulse",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Lg.jsx)("div",{className:"w-10 h-10 bg-gray-600 rounded-full"}),(0,Lg.jsxs)("div",{className:"flex-1",children:[(0,Lg.jsx)("div",{className:"h-4 bg-gray-600 rounded mb-2 w-1/2"}),(0,Lg.jsx)("div",{className:"h-3 bg-gray-600 rounded w-3/4"})]})]})},t))})]});if(s)return(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-chart-line text-green-400 mr-3"}),"Performers"]})}),(0,Lg.jsxs)("div",{className:"text-center py-12 bg-crypto-gray border border-gray-700 rounded-xl",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Failed to load performers: ",s]}),(0,Lg.jsx)("button",{onClick:()=>window.location.reload(),className:"mt-4 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-2 rounded-lg font-medium transition-all",children:"Try Again"})]})]});const p=new Map(t.map(e=>[e.mint,e])),f=new Set(n.map(e=>e.mint)),m=n.map(e=>{const t=p.get(e.mint)||{mint:e.mint,name:e.name,symbol:e.symbol,uri:e.uri||"",uriMetadata:e.uriMetadata||void 0,timestamp:e.timestamp,market_cap:e.market_cap||0,currentPrice:e.currentPrice||0,topNetworkPercentage:0,riskLevel:"",createdAt:"",topHolderPercentage:0,holders:0};return(0,o.A)((0,o.A)({},t),{},{spotlightTier:e.tier})}),g=d.map(e=>p.get(e)).filter(e=>void 0!==e&&!f.has(e.mint)),y=new Set(d),x=t.filter(e=>!y.has(e.mint)&&!f.has(e.mint)),v=[...g,...x].slice(0,Math.max(0,10-m.length));return(0,Lg.jsxs)("div",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,Lg.jsxs)("h2",{className:"text-2xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-chart-line text-green-400 mr-3"}),"Performers"]})}),(0,Lg.jsxs)("div",{className:"space-y-2",children:[m.map(e=>{var t;const n=e.timestamp?ab(e.timestamp):"recently",r=sb(e.market_cap),i="sponsor"===e.spotlightTier;return(0,Lg.jsx)(ft,{to:"/token/".concat(e.mint),onClick:()=>{try{navigator.sendBeacon("".concat(Eg(),"/api/spotlight/click"),new Blob([JSON.stringify({mint:e.mint,spotlighted:!0,tier:e.spotlightTier})],{type:"application/json"}))}catch(Uo){}},className:"block rounded-xl py-2 px-3 transition-all duration-200 cursor-pointer ".concat(i?"bg-gradient-to-br from-purple-900/40 via-crypto-gray to-crypto-gray border border-purple-500/60 shadow-[0_4px_24px_-4px_rgba(168,85,247,0.35)] hover:border-purple-400/80 hover:shadow-[0_6px_32px_-4px_rgba(168,85,247,0.5)]":"bg-gradient-to-br from-crypto-yellow/15 via-crypto-gray to-crypto-gray border border-crypto-yellow/50 shadow-[0_4px_24px_-4px_rgba(255,165,2,0.25)] hover:border-crypto-yellow/70 hover:shadow-[0_6px_32px_-4px_rgba(255,165,2,0.4)]"),children:(0,Lg.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Lg.jsx)(db,{uri:e.ur
2i||"",uriMetadata:e.uriMetadata,symbol:e.symbol,name:e.name}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 min-w-0",children:[(0,Lg.jsxs)("h3",{className:"font-semibold text-[15px] text-white inline-flex items-baseline",children:[e.symbol,(0,Lg.jsx)(ub,{chain:e.chain}),e.charityName&&(0,Lg.jsx)("i",{className:"fas fa-hand-holding-heart text-pink-400 ml-1.5 text-[12px]",title:"Charity coin \u2014 fees routed via ".concat(null!==(t=e.charityDonationSource)&&void 0!==t?t:"donate.gg"," (listed on donate.gg)")}),(0,Lg.jsx)(jy,{locked:e.lockedPercent,staked:e.stakedPercent,multisig:e.multisigPercent,burned:e.burnPercent,multisigVaultCount:e.multisigVaultCount,multisigThreshold:e.multisigThreshold,multisigMemberCount:e.multisigMemberCount})]}),(0,Lg.jsx)("span",{className:"text-gray-400 text-[13px] truncate",children:e.name})]}),i?(0,Lg.jsxs)("span",{className:"text-[10px] font-semibold text-purple-300 bg-purple-500/20 px-2 py-0.5 rounded-full flex items-center gap-1 ml-2 whitespace-nowrap",children:[(0,Lg.jsx)("i",{className:"fas fa-crown text-[8px]"}),"SPONSOR"]}):(0,Lg.jsxs)("span",{className:"text-[10px] font-semibold text-crypto-yellow bg-crypto-yellow/10 px-2 py-0.5 rounded-full flex items-center gap-1 ml-2 whitespace-nowrap",children:[(0,Lg.jsx)("i",{className:"fas fa-star text-[8px]"}),"SPOTLIGHT"]})]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between text-[12px]",children:[(0,Lg.jsxs)("span",{className:"text-gray-500",children:["Added ",n]}),r&&(0,Lg.jsxs)("span",{className:"text-gray-500",children:["$",r]})]})]})]})},e.mint)}),v.map(e=>{var t;const n=e.currentMultiplier||1,r=e.timestamp?ab(e.timestamp):"recently",i=sb(e.market_cap);return(0,Lg.jsx)(ft,{to:Yv(e.mint,e.chain),className:"block bg-crypto-gray border border-gray-700 rounded-xl py-2 px-3 hover:border-green-400/40 hover:shadow-lg hover:shadow-green-400/5 transition-all duration-200 cursor-pointer",children:(0,Lg.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Lg.jsx)(db,{uri:e.uri||"",uriMetadata:e.uriMetadata,symbol:e.symbol,name:e.name}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 min-w-0",children:[(0,Lg.jsxs)("h3",{className:"font-semibold text-[15px] text-white inline-flex items-baseline",children:[e.symbol,(0,Lg.jsx)(ub,{chain:e.chain}),e.charityName&&(0,Lg.jsx)("i",{className:"fas fa-hand-holding-heart text-pink-400 ml-1.5 text-[12px]",title:"Charity coin \u2014 fees routed via ".concat(null!==(t=e.charityDonationSource)&&void 0!==t?t:"donate.gg"," (listed on donate.gg)")}),(0,Lg.jsx)(jy,{locked:e.lockedPercent,staked:e.stakedPercent,multisig:e.multisigPercent,burned:e.burnPercent,multisigVaultCount:e.multisigVaultCount,multisigThreshold:e.multisigThreshold,multisigMemberCount:e.multisigMemberCount})]}),(0,Lg.jsx)("span",{className:"text-gray-400 text-[13px] truncate",children:e.name})]}),(0,Lg.jsxs)("span",{className:"text-green-400 font-semibold text-sm ml-2",children:[n.toFixed(1),"x"]})]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between text-[12px]",children:[(0,Lg.jsxs)("span",{className:"text-gray-500",children:["Added ",r]}),i&&(0,Lg.jsxs)("span",{className:"text-gray-500",children:["$",i]})]})]})]})},e.mint)})]})]})},ub=e=>{let{chain:t}=e;const n=Xv(t);if(!n)return null;const r=$v[n];return(0,Lg.jsx)("span",{className:"ml-1.5 self-center text-[9px] font-semibold border px-1 py-px rounded ".concat(r.badgeClass),title:"".concat(r.name," token"),children:r.short})},db=e=>{var t;let{uri:n,uriMetadata:i,symbol:s,name:a}=e;const[o,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(0),d=r.useMemo(()=>tb(o),[o]),h=null!==(t=d[c])&&void 0!==t?t:null,[p,f]=(0,r.useState)(!0),[m,g]=(0,r.useState)(null),y=r.useRef(null);if((0,r.useEffect)(()=>{if(u(0),i)l(i.image||null),f(!1);else{(async()=>{try{var e;const t=await fetch(null!==(e=tb(n)[0])&&void 0!==e?e:n);if(t.ok){const e=await t.json();l(e.image||null)}}catch(t){console.warn("Failed to fetch metadata for ".concat(a,":"),t)}finally{f(!1)}})()}},[i,n,a]),p)return(0,Lg.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-600 animate-pulse"});const x=e=>{const t='<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="24" fill="#1a1a1a"/><text x="24" y="28" text-anchor="middle" fill="#666" font-size="12" font-family="Arial">'.concat(e||"?","</text></svg>");return"data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(t))))},v=h||x(s);return(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("img",{ref:y,className:"w-12 h-12 rounded-full",src:v,alt:"".concat(a," logo"),onMouseEnter:()=>{if(y.current&&h){const e=y.current.getBoundingClientRect();g({x:e.left,y:e.top})}},onMouseLeave:()=>g(null),onError:e=>{if(c+1<d.length)return void u(c+1);e.target.src=x(s)}}),m&&h&&Fa.createPortal((0,Lg.jsx)("div",{className:"fixed z-[9999] pointer-events-none",style:{left:m.x,top:m.y,transform:"translate(-10px, -10px)"},children:(0,Lg.jsx)("img",{className:"w-[300px] h-[300px] rounded-xl border-2 border-gray-600 shadow-2xl object-cover bg-crypto-gray",src:h,alt:"".concat(a," logo preview")})}),document.body)]})},hb=()=>{const[e,t]=(0,r.useState)(null),[n,i]=(0,r.useState)(!0),[s,a]=(0,r.useState)(null);(0,r.useEffect)(()=>{o()},[]);const o=async()=>{try{i(!0);const e=await Ng("".concat(Eg(),"/api/stats"));if(!e.ok)throw new Error("Failed to fetch stats");const n=await e.json();t(n)}catch(h$){a(h$ instanceof Error?h$.message:"An error occurred")}finally{i(!1)}};return n?(0,Lg.jsxs)("section",{className:"mb-8",children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,Lg.jsx)("h2",{className:"text-2xl font-bold",children:"Last 24 Hours"})}),(0,Lg.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[...Array(3)].map((e,t)=>(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6 text-center animate-pulse",children:[(0,Lg.jsx)("div",{className:"h-8 bg-gray-600 rounded mb-2"}),(0,Lg.jsx)("div",{className:"h-4 bg-gray-600 rounded w-3/4 mx-auto"})]},t))})]}):s?(0,Lg.jsxs)("section",{className:"mb-8",children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,Lg.jsx)("h2",{className:"text-2xl font-bold",children:"Last 24 Hours"})}),(0,Lg.jsxs)("div",{className:"text-center py-12",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Failed to load stats: ",s]}),(0,Lg.jsx)("button",{onClick:o,className:"mt-4 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-2 rounded-lg font-medium transition-all",children:"Try Again"})]})]}):(0,Lg.jsxs)("section",{className:"mt-2 mb-4",children:[(0,Lg.jsx)("div",{className:"h-px bg-gradient-to-r from-transparent via-gray-700 to-transparent mb-3"}),(0,Lg.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,Lg.jsx)("h2",{className:"text-lg font-medium text-gray-400",children:"Last 24 Hours"})}),(0,Lg.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Lg.jsxs)("div",{className:"bg-crypto-gray/50 border border-gray-700/50 rounded-xl py-3 px-4 text-center group hover:border-crypto-accent/30 transition-colors",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-2",children:[(0,Lg.jsx)("div",{className:"w-10 h-10 rounded-lg bg-crypto-accent/10 flex items-center justify-center",children:(0,Lg.jsx)("i",{className:"fas fa-search text-crypto-accent"})}),(0,Lg.jsx)("div",{className:"text-3xl font-semibold text-crypto-accent",children:(null===e||void 0===e?void 0:e.tokensAnalyzed.toLocaleStr
2ing())||"0"})]}),(0,Lg.jsx)("div",{className:"text-sm text-gray-500",children:"Tokens Analyzed"})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray/50 border border-gray-700/50 rounded-xl py-3 px-4 text-center group hover:border-crypto-red/30 transition-colors",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-2",children:[(0,Lg.jsx)("div",{className:"w-10 h-10 rounded-lg bg-crypto-red/10 flex items-center justify-center",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-crypto-red"})}),(0,Lg.jsx)("div",{className:"text-3xl font-semibold text-crypto-red",children:(null===e||void 0===e?void 0:e.bundlesDetected.toLocaleString())||"0"})]}),(0,Lg.jsx)("div",{className:"text-sm text-gray-500",children:"Tokens Flagged"})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray/50 border border-gray-700/50 rounded-xl py-3 px-4 text-center group hover:border-crypto-yellow/30 transition-colors",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-2",children:[(0,Lg.jsx)("div",{className:"w-10 h-10 rounded-lg bg-crypto-yellow/10 flex items-center justify-center",children:(0,Lg.jsx)("i",{className:"fas fa-chart-pie text-crypto-yellow"})}),(0,Lg.jsxs)("div",{className:"text-3xl font-semibold text-crypto-yellow",children:[(null===e||void 0===e?void 0:e.averageBundleRate)||"0.0","%"]})]}),(0,Lg.jsx)("div",{className:"text-sm text-gray-500",children:"Percent Flagged"})]})]})]})},pb=()=>{const{isAuthenticated:e,refreshUser:t,openLogin:n}=Bg(),[i,s]=(0,r.useState)([]),[a,l]=(0,r.useState)([]),[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)([]),[p,f]=(0,r.useState)(!0),[m,g]=(0,r.useState)(!0),[y,x]=(0,r.useState)(!0),[v,b]=(0,r.useState)(null),[w,_]=(0,r.useState)(null),[j,k]=(0,r.useState)(null),[N,S]=(0,r.useState)(!1),[E,A]=(0,r.useState)(null),[C,M]=(0,r.useState)([]),[T,P]=(0,r.useState)(!1),[O,I]=(0,r.useState)(null);(0,r.useEffect)(()=>{const e=new URLSearchParams(window.location.search);if("open"===e.get("spotlight")){var t;const n=e.get("mint");n&&I({mint:n,name:"",symbol:""}),P(!0),Og("spotlight_modal_opened",{source:"token_page_cta",mint:null!==(t=e.get("mint"))&&void 0!==t?t:null}),window.history.replaceState({},"",window.location.pathname)}},[]);const L=async()=>{try{const e=await Ng("".concat(Eg(),"/api/spotlight/active"));if(e.ok){const t=await e.json();M(t)}}catch(e){}};(0,r.useEffect)(()=>{K(),V(),$(),L();const e=setInterval(L,6e4);return()=>clearInterval(e)},[]);const R=(0,r.useMemo)(()=>["watchlist","performers","bundles","prices"],[]),D=(0,r.useCallback)(e=>{u(e),g(!1)},[]),B=(0,r.useCallback)(e=>{h(e),x(!1)},[]),F=(0,r.useCallback)(e=>{u(t=>{let n=t.filter(t=>!e.removed.includes(t.mint));for(const r of e.added)n.find(e=>e.mint===r.mint)||n.unshift(r);return n})},[]),U=(0,r.useCallback)(e=>{h(t=>{let n=t.filter(t=>!e.removed.includes(t.mint));for(const r of e.added)n.find(e=>e.mint===r.mint)||n.push(r);return n.sort((e,t)=>(t.currentMultiplier||0)-(e.currentMultiplier||0)),n})},[]),z=(0,r.useRef)([]);(0,r.useEffect)(()=>{z.current=i},[i]);const q=(0,r.useRef)([]);(0,r.useEffect)(()=>{q.current=a},[a]);const W=(0,r.useCallback)(e=>{const t=new Set(z.current.map(e=>e.mint)),n=new Set(q.current.map(e=>e.mint)),r=[],i=[];for(const s of e)t.has(s.mint)?r.push(s):n.has(s.mint)||i.push(s);r.length>0&&s(e=>{const t=[...e];for(const n of r){const e=t.findIndex(e=>e.mint===n.mint);e>=0&&(t[e]=(0,o.A)((0,o.A)({},t[e]),n))}return t}),i.length>0&&l(e=>[...e,...i])},[]);(0,r.useEffect)(()=>{if(0===a.length)return;const e=setTimeout(()=>{l(e=>{if(0===e.length)return e;const[t,...n]=e;return s(e=>e.some(e=>e.mint===t.mint)?e:[t,...e].slice(0,10)),n})},400);return()=>clearTimeout(e)},[a]);const H=(0,r.useCallback)(e=>{u(t=>{const n=[...t];let r=!1;for(const i of e){const e=n.findIndex(e=>e.mint===i.mint);e>=0&&(n[e]=(0,o.A)((0,o.A)({},n[e]),{},{market_cap:i.marketCap,currentPrice:i.priceSol}),r=!0)}return r?n:t}),h(t=>{const n=[...t];let r=!1;for(const i of e){const e=n.findIndex(e=>e.mint===i.mint);if(e>=0){const t=n[e],s=t.priceAtWatchlistAdded,a=s&&s>0&&i.priceSol>0?i.priceSol/s:t.currentMultiplier;n[e]=(0,o.A)((0,o.A)({},t),{},{market_cap:i.marketCap,currentPrice:i.priceSol,currentMultiplier:a}),r=!0}}return r?n:t}),M(t=>{const n=[...t];let r=!1;for(const i of e){const e=n.findIndex(e=>e.mint===i.mint);e>=0&&(n[e]=(0,o.A)((0,o.A)({},n[e]),{},{market_cap:i.marketCap,currentPrice:i.priceSol}),r=!0)}return r?n:t})},[]);!function(e){let{rooms:t,onWatchlistSnapshot:n,onWatchlistDiff:i,onPerformersSnapsh
2ot:s,onPerformersDiff:a,onBundlesUpdate:o,onPriceUpdate:l,onTrendingSnapshot:c}=e;const u=(0,r.useRef)(null),d=(0,r.useRef)(n),h=(0,r.useRef)(i),p=(0,r.useRef)(s),f=(0,r.useRef)(a),m=(0,r.useRef)(o),g=(0,r.useRef)(l),y=(0,r.useRef)(c);d.current=n,h.current=i,p.current=s,f.current=a,m.current=o,g.current=l,y.current=c,(0,r.useEffect)(()=>{let e=null,n=!1;return jg().then(()=>{n||(e=qv(Wv,{transports:["websocket","polling"],withCredentials:!0,auth:{spaToken:mg}}),u.current=e,e.on("connect",()=>{console.log("[WS] Connected:",e.id),e.emit("subscribe",t)}),e.on("frontpage:watchlist:snapshot",e=>{var t;null===(t=d.current)||void 0===t||t.call(d,e)}),e.on("frontpage:performers:snapshot",e=>{var t;null===(t=p.current)||void 0===t||t.call(p,e)}),e.on("frontpage:watchlist:update",e=>{var t;null===(t=d.current)||void 0===t||t.call(d,e)}),e.on("frontpage:performers:update",e=>{var t;null===(t=p.current)||void 0===t||t.call(p,e)}),e.on("frontpage:watchlist:diff",e=>{var t;null===(t=h.current)||void 0===t||t.call(h,e)}),e.on("frontpage:performers:diff",e=>{var t;null===(t=f.current)||void 0===t||t.call(f,e)}),e.on("bundles:update",e=>{var t;null===(t=m.current)||void 0===t||t.call(m,e)}),e.on("price:update",e=>{var t;null===(t=g.current)||void 0===t||t.call(g,e)}),e.on("trending:snapshot",e=>{var t;null===(t=y.current)||void 0===t||t.call(y,e)}),e.on("disconnect",e=>{console.log("[WS] Disconnected:",e)}))}),()=>{n=!0,e&&e.disconnect(),u.current=null}},[t])}({rooms:R,onWatchlistSnapshot:D,onWatchlistDiff:F,onPerformersSnapshot:B,onPerformersDiff:U,onBundlesUpdate:W,onPriceUpdate:H});const K=async()=>{try{f(!0);const e=await Ng("".concat(Eg(),"/api/flagged-tokens"));if(!e.ok)throw new Error("Failed to fetch flagged tokens");const t=await e.json();s(t)}catch(h$){b(h$ instanceof Error?h$.message:"An error occurred")}finally{f(!1)}},V=async()=>{try{g(!0);const e=await Ng("".concat(Eg(),"/api/watchlist"));if(!e.ok)throw new Error("Failed to fetch watchlist");const t=await e.json();u(t)}catch(h$){_(h$ instanceof Error?h$.message:"An error occurred")}finally{g(!1)}},$=async()=>{try{x(!0);const e=await Ng("".concat(Eg(),"/api/watchlist-performers"));if(!e.ok)throw new Error("Failed to fetch performers");const t=(await e.json()).map(e=>{var t,n,r,i,s,a,l,c,u;return(0,o.A)((0,o.A)({},e),{},{priceAtWatchlistAdded:e.priceAtWatchlistAdded||(null===(t=e.performanceEvaluation)||void 0===t?void 0:t.priceAtWatchlistAdded)||e.price,currentMultiplier:null!==(n=null!==(r=e.liveCurrentMultiplier)&&void 0!==r?r:null===(i=e.performanceEvaluation)||void 0===i?void 0:i.currentMultiplier)&&void 0!==n?n:e.currentMultiplier,currentPrice:null!==(s=null!==(a=e.livePriceSol)&&void 0!==a?a:null===(l=e.performanceEvaluation)||void 0===l?void 0:l.currentPrice)&&void 0!==s?s:e.currentPrice,market_cap:null!==(c=e.liveMarketCapUsd)&&void 0!==c?c:e.market_cap,peakMultiplier:(null===(u=e.performanceEvaluation)||void 0===u?void 0:u.peakMultiplier)||e.peakMultiplier})});h(t)}catch(h$){k(h$ instanceof Error?h$.message:"An error occurred")}finally{x(!1)}};return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white relative",children:[(0,Lg.jsx)(ky,{}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-7xl mx-auto px-6 py-4 relative z-10",children:[(0,Lg.jsx)(rb,{}),(0,Lg.jsx)(ib,{bundles:i,watchlistTokens:c,performers:d,spotlights:C,bundlesLoading:p,watchlistLoading:m,performersLoading:y,bundlesError:v,watchlistError:w,performersError:j,onRequestAnalysis:async r=>{if(e)try{const e=localStorage.getItem("deepnets_token"),s={"Content-Type":"application/json"};e&&(s.Authorization="Bearer ".concat(e));const a=await Ng("".concat(Eg(),"/api/request-token-safety-analysis"),{method:"POST",headers:s,body:JSON.stringify({mint:r})});if(401===a.status)return localStorage.removeItem("deepnets_token"),t(),void n("home");if(402===a.status){var i;const e=await a.json();return void alert("Insufficient credits. You need 1 credit but have ".concat(null!==(i=e.available)&&void 0!==i?i:0,". Visit your profile to get more credits."))}if(!a.ok)throw new Error("Failed to request analysis");const o=await a.json();A(o.requestId),S(!0),t()}catch(s){console.error("Error requesting analysis:",s),alert("Failed to request analysis. Please try again.")}else n("home")}}),(0,Lg.jsx)(hb,{})]}),(0,Lg.jsx)(_y,{}),(0,Lg.jsx)(Ny,{isOpen:N,requestId:E,onClose:()=>{S(!1),A(null)},onSuccess:()=>{window.location.reload()},onError:e=>{alert("Analysis failed: ".concat(e))}}),(0,Lg.jsx)(yx,{isOpen:T,onClose:()=>{P(!1),I(null)},preselectedMint:null===O||void 0===O?void 0:O.mint,preselectedName:null===O||void 0===O?void 0:O.name,preselectedSymbol:null===O||void 0===O?void 0:O.symbol})]})},fb=["to","onClick","children"],mb=e=>{let{to:t,onClick:n,children:r}=e,i=(0,a.A)(e,fb);const{isAuthenticated:s,requestLogin:l}=Bg();return(0,Lg.jsx)(ft,(0,o.A)((0,o.A)({to:t,onClick:e=>{if(!s){var r;e.preventDefault();const n="string"===typeof t?t:null!==(r=t.pathname)&&void 0!==r?r:null;return void l(n)}null===n||void 0===n||n(e)}},i),{},{children:r}))};var gb=n(1051),yb=n(8631),xb=n(6382).Buffer;const vb="So11111111111111111111111111111111111111112",bb=e=>{var t;
2let{tokenMint:n,tokenSymbol:i,tokenDecimals:s=6,riskLevel:a,compact:o=!1}=e;const{publicKey:l,signTransaction:c}=Ca(),{setVisible:u}=Ba(),{user:d}=Bg(),h=null!==(t=null===d||void 0===d?void 0:d.walletAddress)&&void 0!==t?t:null,[p,f]=(0,r.useState)(null),[m,g]=(0,r.useState)("buy"),[y,x]=(0,r.useState)(""),[v,b]=(0,r.useState)("auto"),[w,_]=(0,r.useState)(!o),[j,k]=(0,r.useState)(null),[N,S]=(0,r.useState)(!1),[E,A]=(0,r.useState)(null),[C,M]=(0,r.useState)(!1),[T,P]=(0,r.useState)("idle"),[O,I]=(0,r.useState)(null),[L,R]=(0,r.useState)(null),D="RISKY"===a||"DANGEROUS"===a,B="buy"===m?vb:n,F="buy"===m?n:vb,U="buy"===m?"SOL":i,z="buy"===m?i:"SOL",q="buy"===m?9:s,W="buy"===m?s:9;(0,r.useEffect)(()=>{var e;const t=null!==(e=null===l||void 0===l?void 0:l.toBase58())&&void 0!==e?e:h;if(!t||"sell"!==m)return void f(null);(async()=>{try{const r=await Ng("".concat(Eg(),"/api/jupiter/balance?wallet=").concat(t,"&mint=").concat(n));if(r.ok){var e;const t=await r.json();f(null!==(e=t.balance)&&void 0!==e?e:0)}else f(0)}catch(r){f(0)}})()},[l,h,n,m]);const H=null!=p&&p>0?[{label:"25%",value:(.25*p).toString()},{label:"50%",value:(.5*p).toString()},{label:"100%",value:p.toString()}]:[],K="buy"===m?[{label:"0.1 SOL",value:"0.1"},{label:"0.5 SOL",value:"0.5"},{label:"1 SOL",value:"1"}]:H,V=(0,r.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!y||parseFloat(y)<=0)return void k(null);const t=Math.floor(parseFloat(y)*Math.pow(10,q));if(isNaN(t)||t<=0)k(null);else{e||(S(!0),A(null));try{var n;const r=null!==(n=null===l||void 0===l?void 0:l.toBase58())&&void 0!==n?n:h,i=r?"/api/jupiter/order":"/api/jupiter/quote",s=new URL("".concat(Eg()).concat(i));s.searchParams.set("inputMint",B),s.searchParams.set("outputMint",F),s.searchParams.set("amount",t.toString()),r&&s.searchParams.set("taker",r),"auto"!==v&&s.searchParams.set("slippageBps",v.toString());const a=await Ng(s.toString());if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||e.message||"API error: ".concat(a.status))}const o=await a.json();k(o),e&&A(null)}catch(h$){console.error("Quote fetch error:",h$),e||(A(h$.message||"Failed to fetch quote"),k(null))}finally{e||S(!1)}}},[l,h,y,B,F,q,v]);(0,r.useEffect)(()=>{const e=setTimeout(()=>{V()},600);return()=>clearTimeout(e)},[V]),(0,r.useEffect)(()=>{if(!y||parseFloat(y)<=0)return;const e=setInterval(()=>{V(!0)},5e3);return()=>clearInterval(e)},[y,V]),(0,r.useEffect)(()=>{k(null),A(null),P("idle"),R(null),I(null),x("")},[m]);const $=(0,r.useCallback)(async e=>{const t=Math.floor(parseFloat(y)*Math.pow(10,q)),n=new URL("".concat(Eg(),"/api/jupiter/order"));n.searchParams.set("inputMint",B),n.searchParams.set("outputMint",F),n.searchParams.set("amount",t.toString()),n.searchParams.set("taker",e),"auto"!==v&&n.searchParams.set("slippageBps",v.toString());const r=await Ng(n.toString());if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.error||e.message||"Failed to get fresh quote")}return r.json()},[y,q,B,F,v]),Y=(0,r.useCallback)(async(e,t)=>{P("sending");const n=await Ng("".concat(Eg(),"/api/jupiter/execute"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({signedTransaction:e,requestId:t})});if(!n.ok){const e=await n.json().catch(()=>({}));throw new Error(e.error||e.message||"Swap execution failed")}const r=await n.json();if(I(r.signature||r.txid),"Failed"===r.status)throw new Error(r.error||"Transaction failed on-chain. Try increasing slippage.");P("success")},[]),G=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(G.current)return;if(!new URLSearchParams(window.location.search).has("phantom-tx-pending"))return;G.current=!0;const e=(0,gb.dj)("jupiter-swap");if(!e)return;const t=new URL(window.location.href);if(t.searchParams.delete("phantom-tx-pending"),window.history.replaceState({},"",t.toString()),e.error)return R(e.error.toLowerCase().includes("cancel")?"Transaction cancelled":e.error),void P("error");if(!e.signedTransactionBase58)return R("Phantom returned no signed transaction"),void P("error");const n=String(e.params.requestId||"");if(!n)return R("Lost the swap request ID \u2014 please retry"),void P("error");const r=Bs.A.decode(e.signedTransactionBase58),i=xb.from(r).toString("base64");M(!0),R(null),Y(i,n).catch(e=>{let t=(null===e||void 0===e?void 0:e.message)||"Swap failed";t.includes("insufficient")||t.includes("Insufficient")?t="Insufficient balance":t.includes("slippage")||t.includes("Slippage")?t="Slippage exceeded \u2014 try increasing tolerance":(t.includes("rejected")||t.includes("User rejected"))&&(t="Transaction rejected by wallet"),R(t),P("error")}).finally(()=>M(!1))},[Y]);return"success"===T?(0,Lg.jsxs)("div",{className:"bg-crypto-card h-full flex flex-col items-center justify-center ".concat(o?"p-4":"rounded-xl p-5"),children:[(0,Lg.jsx)("div",{className:"w-14 h-14 bg-green-500/20 rounded-full flex items-center justify-center mb-4",children:(0,Lg.jsx)("svg",{className:"w-7 h-7 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,Lg.jsxs)("h3",{className:"text-lg font-semibold text-white mb-1",children:["buy"===m?"Buy":"Sell"," Successful"]}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-5",children:"Transaction submitted"}),(0,Lg.jsx)("button",{onClick:()=>{P("idle"),I(null),k(null)},className:"w-full max-w-[280px] bg-green-500 hover:bg-green-400 text-black font-semibold py-2.5 px-4 roun
2ded-lg transition-colors mb-3",children:"New swap"}),O&&(0,Lg.jsxs)("a",{href:"https://solscan.io/tx/".concat(O),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-300 text-xs transition-colors",children:["View on Solscan",(0,Lg.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}):(0,Lg.jsxs)("div",{className:"bg-crypto-card flex flex-col h-full ".concat(o?"p-3 rounded-none":"p-5 rounded-xl"),children:[(0,Lg.jsxs)("div",{className:"flex rounded-lg bg-crypto-dark p-1 ".concat(o?"mb-2":"mb-4"),children:[(0,Lg.jsx)("button",{onClick:()=>g("buy"),className:"flex-1 ".concat(o?"py-1.5 text-xs":"py-2 text-sm"," font-semibold rounded-md transition-colors border ").concat("buy"===m?"border-green-500 text-green-400":"border-transparent text-gray-400 hover:text-white"),children:"Buy"}),(0,Lg.jsx)("button",{onClick:()=>g("sell"),className:"flex-1 ".concat(o?"py-1.5 text-xs":"py-2 text-sm"," font-semibold rounded-md transition-colors border ").concat("sell"===m?"border-red-500 text-red-400":"border-transparent text-gray-400 hover:text-white"),children:"Sell"})]}),D&&"buy"===m&&(0,Lg.jsx)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-2.5 mb-3",children:(0,Lg.jsxs)("div",{className:"flex items-start gap-2",children:[(0,Lg.jsx)("svg",{className:"w-4 h-4 text-red-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,Lg.jsxs)("p",{className:"text-red-300/80 text-xs",children:["Flagged as ",(0,Lg.jsx)("span",{className:"font-semibold text-red-400",children:a})," \u2014 proceed with caution"]})]})}),(0,Lg.jsxs)("div",{className:o?"mb-2":"mb-3",children:[!o&&(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,Lg.jsx)("label",{className:"text-gray-400 text-xs font-medium",children:"Amount"}),(0,Lg.jsxs)("span",{className:"text-gray-500 text-xs",children:[U,"sell"===m&&null!=p&&(0,Lg.jsxs)("span",{className:"ml-1 text-gray-600",children:["(bal: ",p>=1e3?(p/1e3).toFixed(1)+"K":p.toFixed(2),")"]})]})]}),o?(0,Lg.jsxs)("div",{className:"flex items-center gap-2 bg-crypto-dark border border-gray-700 rounded-lg px-3 py-1.5 focus-within:border-gray-500 transition-colors",children:[(0,Lg.jsx)("label",{className:"text-gray-500 text-xs font-medium flex-shrink-0",children:"Amount"}),(0,Lg.jsx)("input",{type:"number",value:y,onChange:e=>x(e.target.value),placeholder:"0.0",step:"any",min:"0",className:"flex-1 min-w-0 bg-transparent border-0 outline-none text-white placeholder-gray-600 text-base font-medium text-right"}),(0,Lg.jsxs)("span",{className:"text-gray-500 text-xs flex-shrink-0",children:[U,"sell"===m&&null!=p&&(0,Lg.jsxs)("span",{className:"ml-1 text-gray-600",children:["(",p>=1e3?(p/1e3).toFixed(1)+"K":p.toFixed(2),")"]})]})]}):(0,Lg.jsx)("input",{type:"number",value:y,onChange:e=>x(e.target.value),placeholder:"0.0",step:"any",min:"0",className:"w-full bg-crypto-dark border border-gray-700 rounded-lg px-3 text-white placeholder-gray-600 focus:outline-none focus:border-gray-500 transition-colors font-medium py-2.5 text-lg"}),(0,Lg.jsx)("div",{className:"flex gap-1.5 mt-1.5",children:K.map(e=>(0,Lg.jsx)("button",{onClick:()=>x(e.value),className:"flex-1 py-1 px-2 rounded text-xs font-medium transition-colors ".concat(y===e.value?"bg-gray-600 text-white":"bg-crypto-dark text-gray-400 hover:text-gray-200 border border-gray-700"),children:e.label},e.value))})]}),(0,Lg.jsxs)("div",{className:o?"mb-2":"mb-3",children:[(0,Lg.jsxs)("button",{onClick:()=>_(!w),className:"flex items-center gap-1 text-gray-500 hover:text-gray-300 text-xs transition-colors",children:[(0,Lg.jsx)("svg",{className:"w-3 h-3 transition-transform ".concat(w?"rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),"Slippage: ","auto"===v?"Auto":"".concat(v/100,"%")]}),w&&(0,Lg.jsx)("div",{className:"flex gap-1.5 mt-1.5",children:[{label:"Auto",value:"auto"},{label:"1%",value:100},{label:"3%",value:300},{label:"5%",value:500}].map(e=>(0,Lg.jsx)("button",{onClick:()=>b(e.value),className:"flex-1 py-1 px-2 rounded text-xs font-medium transition-colors ".concat(v===e.value?"bg-gray-600 text-white":"bg-crypto-dark text-gray-400 hover:text-gray-200 border border-gray-700"),children:e.label},String(e.value)))})]}),(0,Lg.jsx)("div",{className:"bg-crypto-dark rounded-lg flex-shrink-0 ".concat(o?"p-2 mb-2":"p-3 mb-3"),style:o?{minHeight:"72px"}:void 0,children:N?(0,Lg.jsxs)("div",{className:"flex items-center justify-center gap-2 py-1",children:[(0,Lg.jsx)("div",{className:"w-3.5 h-3.5 border-2 border-gray-500 border-t-transparent roun
2ded-full animate-spin"}),(0,Lg.jsx)("span",{className:"text-gray-500 text-xs",children:"Fetching quote\u2026"})]}):E?(0,Lg.jsx)("p",{className:"text-gray-500 text-xs text-center py-1",children:E}):j?(0,Lg.jsxs)("div",{className:"space-y-1.5",children:[(0,Lg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Lg.jsx)("span",{className:"text-gray-400 text-xs",children:"You receive (est.)"}),(0,Lg.jsxs)("span",{className:"text-white text-sm font-semibold",children:[((e,t)=>{const n=parseFloat(e)/Math.pow(10,t);return n>=1e6?(n/1e6).toFixed(2)+"M":n>=1e3?(n/1e3).toFixed(2)+"K":n>=1?n.toFixed(4):n.toPrecision(4)})(j.outAmount,W)," ",z]})]}),j.priceImpactPct&&parseFloat(j.priceImpactPct)>.01&&(0,Lg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Lg.jsx)("span",{className:"text-gray-400 text-xs",children:"Price impact"}),(0,Lg.jsxs)("span",{className:"text-xs font-medium ".concat(parseFloat(j.priceImpactPct)>5?"text-red-400":parseFloat(j.priceImpactPct)>1?"text-yellow-400":"text-gray-400"),children:[parseFloat(j.priceImpactPct).toFixed(2),"%"]})]}),(0,Lg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Lg.jsx)("span",{className:"text-gray-400 text-xs",children:"Route"}),(0,Lg.jsx)("span",{className:"text-gray-400 text-xs",children:(()=>{if(null===j||void 0===j||!j.routePlan)return"Jupiter";const e=j.routePlan.map(e=>e.swapInfo.label).filter(Boolean);return[...new Set(e)].join(" \u2192 ")||"Jupiter"})()})]})]}):(0,Lg.jsx)("p",{className:"text-gray-600 text-xs text-center py-1",children:"Enter an amount to see quote"})}),L&&(0,Lg.jsxs)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-2.5 mb-3",children:[(0,Lg.jsx)("p",{className:"text-red-400 text-xs",children:L}),O&&(0,Lg.jsxs)("a",{href:"https://solscan.io/tx/".concat(O),target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 text-xs mt-1 inline-block transition-colors",children:["View tx: ",O.slice(0,8),"\u2026"]})]}),!o&&(0,Lg.jsx)("div",{className:"flex-1"}),(0,Lg.jsx)("button",{onClick:async()=>{if(!j)return;if(!l&&(0,gb.persistentPhantomWalletMatches)(h))try{M(!0),R(null),P("signing");const e=await $(h),t=xb.from(e.transaction,"base64"),n=Bs.A.encode(t);return void(0,gb.l3)({transactionBase58:n,operation:"jupiter-swap",params:{requestId:e.requestId},returnUrl:window.location.pathname+window.location.search})}catch(h$){return R((null===h$||void 0===h$?void 0:h$.message)||"Swap failed"),P("error"),void M(!1)}if(!l&&!!h&&(0,yb.Qk)(h)){M(!0),R(null),P("signing");try{const e=await $(h),t=xb.from(e.transaction,"base64"),n=Bs.A.encode(t),r=await(0,yb.wI)(n),i=xb.from(r).toString("base64");await Y(i,e.requestId)}catch(h$){let t=(null===h$||void 0===h$?void 0:h$.message)||"Swap failed";t.includes("insufficient")||t.includes("Insufficient")?t="Insufficient balance":t.includes("slippage")||t.includes("Slippage")?t="Slippage exceeded \u2014 try increasing tolerance":(t.includes("rejected")||t.toLowerCase().includes("cancel"))&&(t="Transaction rejected by wallet"),R(t),P("error")}finally{M(!1)}}else if(c&&l){M(!0),R(null),P("signing");try{const e=await $(l.toBase58()),t=xb.from(e.transaction,"base64"),n=kn.Kt.deserialize(t),r=await c(n);P("sending");const i=xb.from(r.serialize()).toString("base64"),s=await Ng("".concat(Eg(),"/api/jupiter/execute"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({signedTransaction:i,requestId:e.requestId})});if(!s.ok){const e=await s.json().catch(()=>({}));throw new Error(e.error||e.message||"Swap execution failed")}const a=await s.json();if(I(a.signature||a.txid),"Failed"===a.status)throw new Error(a.error||"Transaction failed on-chain. Try increasing slippage.");P("success")}catch(h$){console.error("Swap error:",h$);let t=h$.message||"Swap failed";t.includes("insufficient")||t.includes("Insufficient")?t="Insufficient balance":t.includes("slippage")||t.includes("Slippage")?t="Slippage exceeded \u2014 try increasing tolerance":(t.includes("rejected")||t.includes("User rejected"))&&(t="Transaction rejected by wallet"),R(t),P("error")}finally{M(!1)}}else{if(h&&/iPhone|iPad|iPod|Android/i.test(navigator.userAgent))return void(window.location.href=hy("phantom","swap"));if(py("swap"))return;u(!0)}},disabled:!j||C||N,className:"w-full flex items-center justify-center gap-2 font-semibold px-4 roun
2ded-lg transition-colors ".concat(o?"py-2.5 text-sm":"py-3"," disabled:opacity-40 disabled:cursor-not-allowed ").concat("buy"===m?"bg-green-500 text-black hover:bg-green-400":"bg-red-500 text-white hover:bg-red-400"),children:C?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"w-4 h-4 border-2 border-white/60 border-t-white rounded-full animate-spin"}),"signing"===T?"Confirm in wallet\u2026":"Submitting\u2026"]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"buy"===m?"Buy":"Sell"," ",i]})}),(0,Lg.jsx)("p",{className:"text-center text-gray-600 text-[10px] mt-2",children:"Powered by Jupiter"})]})};const wb=e=>{let{text:t,title:n="Copy",className:i,iconClassName:s="text-[10px]",showLabel:a=!1,children:o}=e;const[l,c]=(0,r.useState)(!1);return(0,Lg.jsxs)("button",{type:"button",onClick:async e=>{e.preventDefault(),e.stopPropagation();const n=await async function(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch(t){}try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);const n=document.execCommand("copy");return document.body.removeChild(t),n}catch(n){return!1}}(t);Og("copy_ca",{success:n}),n&&(c(!0),window.setTimeout(()=>c(!1),1400))},title:l?"Copied!":n,"aria-label":l?"Copied":n,className:"inline-flex items-center gap-1.5 ".concat(null!==i&&void 0!==i?i:"text-crypto-accent hover:text-crypto-accent/80 p-1"),children:[o,(0,Lg.jsx)("i",{className:"fas ".concat(l?"fa-check":"fa-copy"," ").concat(s)}),(a||o)&&l&&(0,Lg.jsx)("span",{className:"text-[11px] font-medium text-crypto-accent",children:"Copied"})]})},_b=e=>"SAFE"===e||"OK"===e?"LOW":"RISKY"===e?"MEDIUM":"DANGEROUS"===e?"HIGH":e,jb=e=>e>20?"text-crypto-red":e>10?"text-crypto-yellow":e>5?"text-crypto-accent":"text-white",kb=e=>{const t=e.name||e.tokenName||"Unknown",n=e.symbol||e.tokenSymbol||"???",r=e.overallSafetyLevel,i=e.criticalRisks||[],s=e.warnings||[];if(r){if("OK"===r||"SAFE"===r)return"\u2705 ".concat(t," ($").concat(n,") - Clean token on @deepnets_ai");const e=i[0]||s[0];if(e){return"".concat("DANGEROUS"===r?"\ud83d\udea8 DANGEROUS":"\u26a0\ufe0f RISKY",": ").concat(t," ($").concat(n,") - ").concat(e)}return"".concat(t," ($").concat(n,") - ").concat(r," token analysis on @deepnets_ai")}const a=e.riskLevel;return"".concat(t," ($").concat(n,") - ").concat(a," RISK token analysis")},Nb=e=>{let{mint:t,tokenDetails:n,className:i,pagePath:s}=e;const[a,o]=(0,r.useState)(!1),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(!1),h=kb(n),p="".concat(window.location.origin).concat(null!==s&&void 0!==s?s:"/token/".concat(t)),f=e=>{Og("post_on_x_clicked",{mint:t,source:e});const n="".concat(window.location.origin).concat(null!==s&&void 0!==s?s:"/token/".concat(t)),r="https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(h),"&url=").concat(encodeURIComponent(n));window.open(r,"_blank","width=600,height=400")},m=()=>{l&&URL.revokeObjectURL(l),c(null),d(!1)};return(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:null!==i&&void 0!==i?i:"flex items-center gap-1.5",children:[(0,Lg.jsxs)("button",{onClick:()=>f("direct"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 hover:border-white/20 transition-all text-gray-300 hover:text-white text-sm",title:"Share on X",children:[(0,Lg.jsx)("svg",{viewBox:"0 0 24 24",className:"w-3.5 h-3.5 fill-current","aria-hidden":"true",children:(0,Lg.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),(0,Lg.jsx)("span",{children:"Share on X"})]}),(0,Lg.jsx)("button",{onClick:async()=>{Og("share_modal_opened",{mint:t}),o(!0);try{const e="".concat(Eg(),"/api/share/image/").concat(t),n=await Ng(e);
2if(!n.ok)throw new Error("Failed to generate image");const r=await n.blob();c(URL.createObjectURL(r))}catch(h$){console.error("Share image error:",h$)}finally{o(!1)}},disabled:a,className:"flex items-center justify-center w-8 h-8 rounded-lg bg-white/5 hover:bg-white/10 border border-white/10 hover:border-white/20 transition-all text-gray-400 hover:text-white disabled:opacity-50",title:"Share card / more options",children:a?(0,Lg.jsx)("div",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}):(0,Lg.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})})]}),l&&Fa.createPortal((0,Lg.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/80 backdrop-blur-sm",onClick:e=>{e.target===e.currentTarget&&m()},children:(0,Lg.jsxs)("div",{className:"relative max-w-[90vw]",children:[(0,Lg.jsx)("button",{onClick:m,className:"absolute -top-3 -right-3 w-8 h-8 rounded-full bg-gray-800 border border-gray-600 flex items-center justify-center text-gray-400 hover:text-white hover:bg-gray-700 transition-all z-10",children:"\u2715"}),(0,Lg.jsx)("img",{src:l,alt:"Share preview",className:"rounded-xl shadow-2xl border border-gray-700 max-w-full max-h-[60vh] object-contain"}),(0,Lg.jsxs)("div",{className:"mt-3 bg-white/5 border border-white/10 rounded-lg p-3 max-w-full",children:[(0,Lg.jsx)("p",{className:"text-gray-300 text-sm whitespace-pre-wrap",children:h}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:p})]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-center space-x-3 mt-4",children:[(0,Lg.jsxs)("button",{onClick:()=>{if(!l)return;const e=document.createElement("a");e.href=l,e.download="deepnets-".concat(t.slice(0,8),".png"),e.click()},className:"flex items-center space-x-2 px-4 py-2 rounded-lg bg-white/10 hover:bg-white/20 border border-white/20 text-white text-sm transition-all",children:[(0,Lg.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),(0,Lg.jsx)("span",{children:"Download"})]}),(0,Lg.jsx)("button",{onClick:async()=>{if(l)try{const e=await fetch(l),t=await e.blob();await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),d(!0),setTimeout(()=>d(!1),2e3)}catch(h$){console.error("Copy failed:",h$)}},className:"flex items-center space-x-2 px-4 py-2 rounded-lg border text-sm transition-all ".concat(u?"bg-green-500/20 border-green-500/30 text-green-400":"bg-white/10 hover:bg-white/20 border-white/20 text-white"),children:u?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),(0,Lg.jsx)("span",{children:"Copied!"})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})}),(0,Lg.jsx)("span",{children:"Copy Image"})]})}),(0,Lg.jsxs)("button",{onClick:()=>f("modal"),className:"flex items-center space-x-2 px-4 py-2 rounded-lg bg-white/10 hover:bg-white/20 border border-white/20 text-white text-sm transition-all",children:[(0,Lg.jsx)("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:(0,Lg.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),(0,Lg.jsx)("span",{children:"Post on X"})]})]}),(0,Lg.jsxs)("p",{className:"mt-3 text-[11px] text-gray-500 text-center max-w-md mx-auto leading-relaxed",children:[(0,Lg.jsx)("span",{className:"text-gray-400",children:"Tip:"})," if X doesn't show the card preview right away, close the post window and click Post on X again. X's preview queue c
2an take ~20 seconds the first time it sees a link."]})]})}),document.body)]})},Sb=e=>{let{figureKey:t,displayName:n,confidence:r,percentage:i,sent:s,tokenAccount:a,className:o}=e;const l="probable"===r,c="number"===typeof i&&i>0?s?"sent ".concat(i.toFixed(1),"%"):"".concat(i.toFixed(1),"%"):null;return(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1.5 ".concat(null!==o&&void 0!==o?o:"text-sm"),children:[(0,Lg.jsxs)(ft,{to:"/figures/".concat(t),onClick:e=>e.stopPropagation(),title:(l?"Probable identity (unconfirmed lead) \u2014 ".concat(n):"Known figure: ".concat(n))+(s?" \xb7 supply was SENT to this wallet (airdrop/spoof), not acquired":""),className:"inline-flex items-center gap-1.5 hover:underline font-semibold ".concat(l?"text-amber-400":"text-crypto-accent"),children:[(0,Lg.jsx)("i",{className:"fas ".concat(l?"fa-user-tag text-amber-400":"fa-user-check text-crypto-green"," text-xs")}),(0,Lg.jsx)("span",{children:n}),l&&(0,Lg.jsx)("span",{className:"text-amber-400/70 text-[10px] font-normal",children:"?"})]}),c&&(a?(0,Lg.jsx)("a",{href:"https://solscan.io/account/".concat(a),target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),title:"View this holding's token account on Solscan".concat(s?" (supply was sent here, not acquired)":""),className:"text-gray-500 font-normal hover:underline hover:text-gray-300",children:c}):(0,Lg.jsx)("span",{className:"text-gray-500 font-normal",children:c}))]})},Eb=e=>{const t=(new Date).getTime()-new Date(e).getTime(),n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),s=Math.floor(i/24),a=Math.floor(s/7),o=Math.floor(s/30);return n<60?"".concat(n,"s ago"):r<60?"".concat(r,"m ago"):i<24?"".concat(i,"h ago"):s<7?"".concat(s,"d ago"):a<4?"".concat(a,"w ago"):"".concat(o,"mo ago")},Ab=e=>{var t;let{mint:n,onRequestResearch:i,requestingResearch:s}=e;const[a,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{try{const e=await Ng("".concat(Eg(),"/api/social_research/").concat(n));if(!e.ok){if(404===e.status)return void d("no-data");throw new Error("Failed to fetch social research data")}const t=await e.json();o(t)}catch(h$){d(h$ instanceof Error?h$.message:"An error occurred")}finally{c(!1)}})()},[n]);const f=e=>e>=7?"text-green-400":e>=4?"text-yellow-400":"text-gray-400",m=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString();if(l)return(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl mb-6 opacity-70",children:[(0,Lg.jsx)("div",{className:"flex justify-between items-center mb-4 pb-2 border-b border-gray-700",children:(0,Lg.jsxs)("h3",{className:"text-xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-share-alt mr-2 text-blue-400"}),"Social Research"]})}),(0,Lg.jsx)("div",{className:"text-gray-400 text-center py-4",children:"Loading social data..."})]});if(u||!a)return i?(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl mb-6",children:[(0,Lg.jsx)("div",{className:"flex justify-between items-center mb-2 pb-2 border-b border-gray-700",children:(0,Lg.jsxs)("h3",{className:"text-xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-share-alt mr-2 text-blue-400"}),"Social Research"]})}),(0,Lg.jsxs)("div",{className:"flex flex-wrap items-center gap-3 py-2",children:[(0,Lg.jsx)("span",{className:"text-sm text-gray-400",children:"No social research has been run for this token yet."}),(0,Lg.jsx)("button",{onClick:i,disabled:s,className:"px-3 py-1 text-xs font-medium rounded-lg border border-gray-600 text-gray-300 hover:text-white hover:border-gray-500 transition disabled:opacity-50",children:s?"Requesting\u2026":"Run research (1 credit)"})]})]}):null;const g=!!i&&Date.now()-new Date(a.researchedAt).getTime()>36e5;return(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl mb-6",children:[(0,Lg.jsxs)("div",{className:"flex justify-between items-center mb-4 pb-2 border-b border-gray-700",children:[(0,Lg.jsxs)("h3",{className:"text-xl font-bold flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-share-alt mr-2 text-blue-400"}),"Social Research"]}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-2",children:[Eb(a.researchedAt),g&&i&&(0,Lg.jsx)("button",{onClick:i,disabled:s,className:"px-2 py-0.5 text-[11px] font-medium rounded border border-gray-600 text-gray-300 hover:text-white hover:border-gray-500 transition disabled:opacity-50",children:s?"Requesting\u2026":"Refresh research (1 credit)"})]})]}),(0,Lg.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,Lg.jsxs)("div",{className:"flex flex-wrap gap-4",children:[a.overallSocialSentiment&&(0,Lg.jsxs)("div",{className:"flex flex-col items-center min-w-[80px] px-3 py-2 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-base font-semibold whitespace-nowrap ".concat((e=>{if(!e)return"text-gray-400";switch(e.toLowerCase()){case"positive":return"text-green-400";case"negative":return"text-red-400";default:return"text-gray-400"}})(a.overallSocialSentiment)),children:["positive"===a.overallSocialSentiment?"\ud83d\ude0a":"negative"===a.overallSocialSentiment?"\ud83d\ude1f":"\ud83d\ude10"," ",a.overallSocialSentiment.charAt(0).toUpperCase()+a.overallSocialSentiment.
2slice(1)]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500 uppercase tracking-wider mt-1",children:"Sentiment"})]}),void 0!==a.overallTrendingPotentialRank&&(0,Lg.jsxs)("div",{className:"flex flex-col items-center min-w-[80px] px-3 py-2 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-base font-semibold whitespace-nowrap ".concat(f(a.overallTrendingPotentialRank)),children:["\ud83d\udd25 ",a.overallTrendingPotentialRank,"/10"]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500 uppercase tracking-wider mt-1",children:"Potential"})]}),(0,Lg.jsxs)("div",{className:"flex flex-col items-center min-w-[80px] px-3 py-2 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-base font-semibold whitespace-nowrap text-white",children:["\ud83d\udc41\ufe0f ",m(a.totalViews)]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500 uppercase tracking-wider mt-1",children:"Views"})]}),(0,Lg.jsxs)("div",{className:"flex flex-col items-center min-w-[80px] px-3 py-2 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-base font-semibold whitespace-nowrap text-white",children:["\ud83d\udcac ",a.totalMentions]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500 uppercase tracking-wider mt-1",children:"Mentions"})]}),void 0!==a.noveltyRank&&(0,Lg.jsxs)("div",{className:"flex flex-col items-center min-w-[80px] px-3 py-2 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-base font-semibold whitespace-nowrap ".concat(f(a.noveltyRank)),children:["\u2728 ",a.noveltyRank,"/10"]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500 uppercase tracking-wider mt-1",children:"Novelty"})]}),void 0!==a.relevanceRank&&(0,Lg.jsxs)("div",{className:"flex flex-col items-center min-w-[80px] px-3 py-2 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-base font-semibold whitespace-nowrap ".concat(f(a.relevanceRank)),children:["\ud83c\udfaf ",a.relevanceRank,"/10"]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500 uppercase tracking-wider mt-1",children:"Relevance"})]})]}),(null===(t=a.entityVerification)||void 0===t?void 0:t.representsEntity)&&(0,Lg.jsxs)("div",{className:"px-3 py-3 rounded-lg border-l-4 ".concat(a.entityVerification.officiallyVerified?"bg-green-500/10 border-green-500":"bg-orange-500/10 border-orange-500"),children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[a.entityVerification.officiallyVerified?(0,Lg.jsxs)("span",{className:"text-green-400 text-sm font-semibold flex items-center gap-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-check-circle"}),"Verified ","kol"===a.entityVerification.entityType?"KOL":a.entityVerification.entityType?a.entityVerification.entityType.charAt(0).toUpperCase()+a.entityVerification.entityType.slice(1):"Entity"," Token"]}):(0,Lg.jsxs)("span",{className:"text-orange-400 text-sm font-semibold flex items-center gap-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle"}),"Unverified ","kol"===a.entityVerification.entityType?"KOL":a.entityVerification.entityType?a.entityVerification.entityType.charAt(0).toUpperCase()+a.entityVerification.entityType.slice(1):"Entity"," Token"]}),a.entityVerification.entityName&&(0,Lg.jsxs)("span",{className:"text-xs text-gray-400 bg-crypto-dark px-2 py-0.5 rounded-full",children:["Claims: ",a.entityVerification.entityName]})]}),a.entityVerification.verificationEvidence&&(0,Lg.jsx)("p",{className:"text-sm text-gray-300 leading-relaxed",children:a.entityVerification.verificationEvidence}),a.entityVerification.verificationUrl&&(0,Lg.jsxs)("a",{href:a.entityVerification.verificationUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300 mt-2",children:[(0,Lg.jsx)("i",{className:"fas fa-external-link-alt text-[10px]"}),"Official verification link"]})]}),a.tokenDescriptionAnalysis&&(0,Lg.jsxs)("div",{className:"px-4 py-4 bg-crypto-gray/30 rounded-lg border-l-4 border-crypto-accent",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Lg.jsx)("i",{className:"fas fa-file-alt text-crypto-accent text-sm"}),(0,Lg.jsx)("h4",{className:"text-sm font-semibold text-white",children:"Token Description"})]}),(0,Lg.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed pl-6",children:a.tokenDescriptionAnalysis})]}),a.socialActivityAnalysis&&(0,Lg.jsxs)("div",{className:"px-4 py-4 bg-crypto-gray/30 rounded-lg border-l-4 border-purple-500",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Lg.jsx)("i",{className:"fas fa-comments text-purple-400 text-sm"}),(0,Lg.jsx)("h4",{className:"text-sm font-semibold text-white",children:"Social Activity"})]}),(0,Lg.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed pl-6",children:a.socialActivityAnalysis})]}),a.noveltyAnalysis&&(0,Lg.jsxs)("div",{className:"px-4 py-4 bg-crypto-gray/30 rounded-lg border-l-4 border-yellow-500",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Lg.jsx)("i",{className:"fas fa-lightbulb text-yellow-400 text-sm"}),(0,Lg.jsx)("h4",{className:"text-sm font-semibold text-white",children:"Novelty Analysis"})]}),(0,Lg.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed pl-6",children:a.noveltyAnalysis})]}),a.mentions&&a.mentions.length>0&&(0,Lg.jsxs)("div",{className:"px-3 py-3 bg-crypto-gray/50 rounded-lg border border-gray-700",children:[(0,Lg.jsxs)("div",{className:"flex flex-wrap gap-3 items-center mb-2",children:[(0,Lg.jsxs)("a",{href:"https://x.com/".concat(a.mentions[0].accountHandle),target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline font-medium text-sm",children:["@",a.mentions[0].accountHandle]}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 bg-crypto-dark px-2 py-0.5 rounded-full",children:["Quality: ",a.mentions[0].accountQuality,"/10"]}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 bg-crypto-dark px-2 py-0.5 rounded-full",children:[m(a.mentions[0].viewCount)," views"]}),a.mentions[0].timestamp&&(0,Lg.jsx)("span",{className:"text-xs text-gray-500 bg-crypto-dark px-2 py-0.5 rounded-full",children:Eb(a.mentions[0].timestamp)})]}),(0,Lg.jsx)("a",{href:a.mentions[0].tweetUrl,target:"_blank",rel:"noopener noreferrer",className:"block text-sm text-gray-400 italic leading-relaxed hover:text-gray-300",children:h||a.mentions[0].tweetText.length<=150?a.mentions[0].tweetText:a.mentions[0].tweetText.substring(0,150)+"..."}),a.mentions[0].tweetText.length>150&&(0,Lg.jsx)("button",{onClick:()=>p(!h),className:"text-xs text-blue-400 hover:text-blue-300 mt-2 cursor-pointer",children:h?"Show less":"Show more"})]})]})]})},Cb=e=>{const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return n<60?"".concat(n,"m ago"):r<24?"".concat(r,"h ago"):i<7?"".concat(i,"d ago"):"".concat(Math.floor(i/7),"w ago")},Mb=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>
2=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toLocaleString(),Tb={promoting:{label:"Shilling",color:"text-red-400",bgColor:"bg-red-500/10",borderColor:"border-red-500/20",icon:"fas fa-thumbs-down",description:"Accounts actively shilling this token"},dissuading:{label:"Calling Out Scams",color:"text-green-400",bgColor:"bg-green-500/10",borderColor:"border-green-500/20",icon:"fas fa-thumbs-up",description:"Accounts calling out this token as a scam"},neutral:{label:"Neutral",color:"text-gray-400",bgColor:"bg-gray-500/10",borderColor:"border-gray-500/20",icon:"fas fa-comment",description:"Mentions without a clear stance"}},Pb=e=>{let{intent:t,tweets:n}=e;const r=Tb[t],i=(e=>{const t=new Map;for(const n of e){const e=t.get(n.authorHandle);(!e||n.engagement>e.engagement)&&t.set(n.authorHandle,n)}return[...t.values()]})(n),s=[...i].sort((e,t)=>t.authorFollowers-e.authorFollowers);return(0,Lg.jsxs)("div",{className:"".concat(r.bgColor," border ").concat(r.borderColor," rounded-lg p-4"),children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,Lg.jsx)("i",{className:"".concat(r.icon," ").concat(r.color)}),(0,Lg.jsx)("h4",{className:"font-semibold ".concat(r.color),children:r.label}),(0,Lg.jsxs)("span",{className:"text-gray-500 text-sm",children:["(",s.length," ",1===s.length?"account":"accounts",")"]})]}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs mb-3",children:r.description}),(0,Lg.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,Lg.jsxs)("div",{className:"flex items-start space-x-3 group",children:[(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 flex-wrap",children:[(0,Lg.jsxs)("a",{href:"https://x.com/".concat(e.authorHandle),target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-white hover:text-crypto-accent transition-colors",children:["@",e.authorHandle]}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500",children:[Mb(e.authorFollowers)," followers"]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-600",children:"\xb7"}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500",children:Cb(e.createdAt)})]}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mt-1 line-clamp-2",children:e.tweetText})]}),(0,Lg.jsx)("a",{href:e.tweetUrl,target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 opacity-60 hover:opacity-100 transition-opacity mt-1",title:"View on X",children:(0,Lg.jsx)("img",{src:"/x-logo/logo-white.png",alt:"X",className:"w-4 h-4"})})]},e.tweetId))})]})},Ob=e=>{let{mint:t}=e;const[n,i]=(0,r.useState)([]),[s,a]=(0,r.useState)(!0);if((0,r.useEffect)(()=>{(async()=>{try{var e;const n=Eg(),r=await Ng("".concat(n,"/api/shill-tweets/").concat(t));if(!r.ok)return;const s=await r.json();i(null!==(e=s.tweets)&&void 0!==e?e:[])}catch(n){}finally{a(!1)}})()},[t]),s||0===n.length)return null;const o=n.filter(e=>"promoting"===e.intent),l=n.filter(e=>"dissuading"===e.intent),c=n.filter(e=>"neutral"===e.intent);return(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl mb-6",children:[(0,Lg.jsxs)("h3",{className:"text-xl font-bold mb-4 flex items-center",children:[(0,Lg.jsx)("img",{src:"/x-logo/logo-white.png",alt:"X",className:"w-5 h-5 mr-2 opacity-60"}),"X Mentions",(0,Lg.jsxs)("span",{className:"ml-2 text-sm font-normal text-gray-500",children:[n.length," ",1===n.length?"tweet":"tweets"," tracked"]})]}),(0,Lg.jsxs)("div",{className:"space-y-4",children:[o.length>0&&(0,Lg.jsx)(Pb,{intent:"promoting",tweets:o}),l.length>0&&(0,Lg.jsx)(Pb,{intent:"dissuading",tweets:l}),c.length>0&&(0,Lg.jsx)(Pb,{intent:"neutral",tweets:c})]})]})},Ib=e=>{let{title:t,description:n,image:r,url:i,type:s="website"}=e;const a="@deepnets_ai";return(0,Lg.jsxs)(jn,{children:[(0,Lg.jsx)("title",{children:t}),(0,Lg.jsx)("meta",{name:"description",content:n}),(0,Lg.jsx)("meta",{property:"og:type",content:s}),(0,Lg.jsx)("meta",{property:"og:url",content:i}),(0,Lg.jsx)("meta",{property:"og:title",content:t}),(0,Lg.jsx)("meta",{property:"og:description",content:n}),(0,Lg.jsx)("meta",{property:"og:image",content:r}),(0,Lg.jsx)("meta",{property:"og:site_name",content:"Deepnets.ai"}),(0,Lg.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),(0,Lg.jsx)("meta",{property:"twitter:url",content:i}),(0,Lg.jsx)("meta",{property:"twitter:title",content:t}),(0,Lg.jsx)("meta",{property:"twitter:description",content:n}),(0,Lg.jsx)("meta",{property:"twitter:image",content:r}),a&&(0,Lg.jsx)("meta",{property:"twitter:site",content:a}),(0,Lg.jsx)("meta",{name:"robots",content:"index, follow"}),(0,Lg.jsx)("link",{rel:"canonical",href:i})]})},Lb=e=>{var t;let{src:n,uriMetadata:i,symbol:s,name:a="",sizeClass:o="w-12 h-12",className:l="",hoverPreview:c=!0}=e;const[u,d]=(0,r.useState)(()=>tb(n||(null===i||void 0===i?void 0:i.image))),[h,p]=(0,r.useState)(0),f=null!==(t=u[h])&&void 0!==t?t:null,m=h>=u.length,[g,y]=(0,r.useState)(null),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{d(tb(n||(null===i||void 0===i?void 0:i.image))),p(0)},[n,i]);const v=!f||m,b=c&&!!f&&!m,w=(s||"?").charAt(0).toUpperCase();return v?(0,Lg.jsx)("div",{className:"".concat(o," rounded-full bg-gray-700 flex items-center justify-center text-gray-300 font-semibold ").concat(l),title:a||s,children:w}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("img",{ref:x,className:"".concat(o," rounded-full bg-crypto-gray object-cover ").concat(l),src:f,alt:"".concat(a||s," logo"),onError:()=>p(e=>e+1),onMouseEnter:()=>{if(!b||!x.current)return;const e=x.current.getBoundingClientRect();y({x:e.left,y:e.top})},onMouseLeave:()=>y(null)}),g&&b&&Fa.createPortal((0,Lg.jsx)("div",{className:"fixed z-[9999] pointer-events-none",style:{left:g.x,top:g.y,transform:"translate(-10px, -10px)"},children:(0,Lg.jsx)("img",{className:"w-[300px] h-[300px] rounded-xl border-2 border-gray-600 shadow-2xl object-cover bg-crypto-gray",src:f,alt:"".concat(a||s," preview")})}),document.body)]})},Rb=e=>"HIGH"===e||"EXTREME"===e?"text-crypto-red":"MEDIUM"===e?"text-crypto-yellow":void 0;function Db(e){return!isFinite(e)||e<=0?"$0":e>=1e9?"$".concat((e/1e9).toFixed(2),"B"):e>=1e6?"$".concat((e/1e6).toFixed(2),"M"):e>=1e3?"$".concat((e/1e3).toFixed(1),"K"):"$".concat(e.toFixed(0))}const Bb=e=>{let{mint:t,symbol:n,chartUrl:i,riskLevel:s,onClose:a}=e;return(0,r.useEffect)(()=>{const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[]),(0,Lg.jsxs)("div",{className:"fixed inset-0 z-[60] bg-crypto-dark flex flex-col lg:hidden",children:[(0,Lg.jsxs)("div",{className:"flex-1 relative bg-black min-h-0",children:[(0,Lg.jsx)("iframe",{src:i,title:"".concat(n," chart"),className:"absolute inset-0 w-full h-full border-0",allow:"clipboard-write"}),(0,Lg.jsx)("button",{type:"button",onClick:a,"aria-label":"Close trade view",className:"absolute top-3 right-3 w-9 h-9 rounded-full bg-black/60 backdrop-blur text-white flex items-center justify-center hover:bg-black/80 transition-colors z-10 shadow-lg",style:{to
2p:"max(0.75rem, env(safe-area-inset-top))",right:"max(0.75rem, env(safe-area-inset-right))"},children:(0,Lg.jsx)("i",{className:"fas fa-times text-base"})})]}),(0,Lg.jsx)("div",{className:"bg-crypto-card border-t border-gray-700 overflow-y-auto flex-shrink-0",style:{height:"300px",paddingBottom:"env(safe-area-inset-bottom)"},children:(0,Lg.jsx)(bb,{tokenMint:t,tokenSymbol:n,riskLevel:s,compact:!0})})]})},Fb=e=>{let{children:t}=e;return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),t]})},Ub=e=>{let{children:t}=e;return(0,Lg.jsx)("main",{className:"flex-1 flex items-center justify-center text-gray-400",children:t})},zb=e=>{let{label:t,value:n,valueColor:r,to:i}=e;const s=(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-base font-semibold leading-tight ".concat(null!==r&&void 0!==r?r:"text-white"),children:n}),(0,Lg.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-gray-500 mt-0.5 flex items-center justify-between",children:[(0,Lg.jsx)("span",{children:t}),i&&(0,Lg.jsx)("i",{className:"fas fa-arrow-right text-[9px] opacity-0 group-hover:opacity-60 transition-opacity"})]})]});return i?(0,Lg.jsx)(mb,{to:i,className:"group bg-crypto-card border border-gray-800 hover:border-gray-600 rounded-xl px-3 py-2 transition-colors",children:s}):(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl px-3 py-2",children:s})},qb=e=>{let{level:t,warningCount:n,infoCount:r,onClick:i}=e;const s="OK"===t||"SAFE"===t,a=s?"text-crypto-accent bg-crypto-accent/10 border-crypto-accent/30":"RISKY"===t?"text-crypto-yellow bg-crypto-yellow/10 border-crypto-yellow/30":"text-crypto-red bg-crypto-red/10 border-crypto-red/30",o=s?"Clean":t,l=(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),o,n>0&&(0,Lg.jsxs)("span",{className:"text-[10px] opacity-80",children:["\xb7 ",n," ",1===n?"risk":"risks"]}),r>0&&(0,Lg.jsxs)("span",{className:"text-[10px] opacity-80",children:["\xb7 ",r," info"]})]}),c="inline-flex items-center gap-1.5 text-xs font-semibold px-2 py-0.5 rounded border ".concat(a);return i?(0,Lg.jsxs)("button",{type:"button",onClick:i,className:"".concat(c," hover:brightness-125 transition cursor-pointer"),title:"Tap for safety details",children:[l,(0,Lg.jsx)("i",{className:"fas fa-chevron-down text-[9px] opacity-70 ml-0.5"})]}):(0,Lg.jsx)("span",{className:c,children:l})},Wb=e=>{let{title:t,icon:n,color:r,items:i}=e;return i&&0!==i.length?(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-1.5 ".concat(r," mb-2"),children:[(0,Lg.jsx)("i",{className:"fas ".concat(n)}),t]}),(0,Lg.jsx)("ul",{className:"space-y-1",children:i.map((e,t)=>(0,Lg.jsxs)("li",{className:"text-gray-300 text-xs flex gap-1.5",children:[(0,Lg.jsx)("span",{className:"text-gray-600",children:"\xb7"}),(0,Lg.jsx)("span",{children:e})]},t))})]}):null};function Hb(e){const t=new Date(e),n=Math.floor((Date.now()-t.getTime())/1e3);if(n<60)return"".concat(n,"s ago");const r=Math.floor(n/60);if(r<60)return"".concat(r,"m ago");const i=Math.floor(r/60);if(i<24)return"".concat(i,"h ago");const s=Math.floor(i/24);return"".concat(s,"d ago")}function Kb(e){if(!e)return"5";const t=(Date.now()-new Date(e).getTime())/36e5;return t<2?"1":t<12?"5":t<48?"15":t<168?"60":"240"}const Vb=e=>{var t,n,i,s,a,l,c,u,d,h,p,f,m,g,y,x,v,b,w,_;let{chain:j}=e;const{mint:k}=pe(),[N]=vt(),S=he(),E=Kv(k),A=E&&null!==j&&void 0!==j?j:null,C=E&&!j?Xv(N.get("chain")):null,M=A?"?chain=".concat(A):"",[T,P]=(0,r.useState)(null),{isAuthenticated:O,user:I,refreshUser:L,openLogin:R}=Bg(),[D,B]=(0,r.useState)(null),[F,U]=(0,r.useState)(!0),[z,q]=(0,r.useState)(null),[W,H]=(0,r.useState)(!1),[K,V]=(0,r.useState)(null),$=(0,r.useRef)(!1),[Y,G]=(0,r.useState)(!1),[J,Z]=(0,r.useState)(!1),[Q,X]=(0,r.useState)(null),[ee,te]=(0,r.useState)(null),[ne,re]=(0,r.useState)(null),[ie,se]=(0,r.useState)(null),[ae,oe]=(0,r.useState)(()=>"undefined"!==typeof window&&"#swap"===window.location.hash),le=async()=>{if(k)if(O){G(!0);try{var e,t,n;const i=localStorage.getItem("deepnets_token"),s={"Content-Type":"application/json"};i&&(s.Authorization="Bearer ".concat(i));const a=await Ng("".concat(Eg(),"/api/request-token-safety-analysis"),{method:"POST",headers:s,body:JSON.stringify((0,o.A)({mint:k},E?{chain:null!==(e=Xv(null===D||void 0===D?void 0:D.chain))&&void 0!==e?e:A}:{}))});if(401===a.status)return localStorage.removeItem("deepnets_token"),L(),void R("token_page");if(402===a.status){var r;const e=await a.json().catch(()=>({}));return void alert("Insufficient credits. You need 1 but have ".concat(null!==(r=e.available)&&void 0!==r?r:0,"."))}if(!a.ok)throw new Error("HTTP ".concat(a.status));const l=await a.json(),c=null!==(t=l.creditsRemaining)&&void 0!==t?t:null;te(null!=c?c+1:null),X(null!==(n=l.requestId)&&void 0!==n?n:null),Z(!0),L()}catch(h$){alert("Failed to request research: ".concat(h$ instanceof Error?h$.message:String(h$)))}finally{G(!1)}}else R("token_page")};if((0,r.useEffect)(()=>
2{if(!k)return;let e=!1;return(async()=>{try{U(!0);const r={},i=localStorage.getItem("deepnets_token");if(i&&(r.Authorization="Bearer ".concat(i)),P(null),j&&!E)return void q("Not a valid token address for this chain.");if(j&&k!==k.toLowerCase())return void S(Yv(k,j),{replace:!0});if(C)return void S(Yv(k,C),{replace:!0});if(E&&!A){var t,n;const r=await Ng("".concat(Eg(),"/api/resolve-token?address=").concat(k));if(!r.ok)throw new Error("resolve HTTP ".concat(r.status));const i=null!==(t=null===(n=await r.json())||void 0===n?void 0:n.chains)&&void 0!==t?t:[];if(e)return;return 1===i.length?void S(Yv(k,i[0].chain),{replace:!0}):i.length>1?void P(i):void q("No trading pairs found for this address on Robinhood Chain, Base, Ethereum, BNB Chain or Arc.")}const s=await Ng("".concat(Eg(),"/api/token-safety/").concat(k).concat(M),{headers:r});if(404===s.status){const t=await s.json().catch(()=>({}));if(e)return;if(null!==t&&void 0!==t&&t.hint)return void H(!0)}if(!s.ok)throw new Error("safety HTTP ".concat(s.status));const a=await s.json();if(e)return;B(a)}catch(h$){e||q(h$ instanceof Error?h$.message:String(h$))}finally{e||U(!1)}})(),()=>{e=!0}},[k,M,C]),(0,r.useEffect)(()=>{if(!W||!k||!O||$.current)return;$.current=!0;let e=!1;return(async()=>{const t=localStorage.getItem("deepnets_token"),n={"Content-Type":"application/json"};t&&(n.Authorization="Bearer ".concat(t));let r=null;try{var i,s;const e=await Ng("".concat(Eg(),"/api/request-token-safety-analysis"),{method:"POST",headers:n,body:JSON.stringify((0,o.A)({mint:k,skipSocialResearch:!0},A?{chain:A}:{}))});e.ok&&(r=null!==(i=null===(s=await e.json())||void 0===s?void 0:s.requestId)&&void 0!==i?i:null)}catch(c){}const a=t?{Authorization:"Bearer ".concat(t)}:{},l=async()=>{const t=await Ng("".concat(Eg(),"/api/token-safety/").concat(k).concat(M),{headers:a});return!(!t.ok||e)&&(B(await t.json()),H(!1),!0)};for(let o=0;o<45&&!e;o++){await new Promise(e=>setTimeout(e,2e3));try{if(r){const t=await Ng("".concat(Eg(),"/api/request-status?requestId=").concat(r));if(t.ok){const n=await t.json();if("completed"===n.status)return void await l();if("failed"===n.status)return void(e||V(n.failureReason||"This token could not be analyzed."))}}else if(await l())return}catch(u){}}e||V("Analysis is taking longer than expected \u2014 please refresh in a moment.")})(),()=>{e=!0}},[W,O,k,M]),(0,r.useEffect)(()=>{if(!k||E)return;let e=!1;const t=Eg();return Ng("".concat(t,"/api/streamflow-locks/").concat(k)).then(e=>e.ok?e.json():null).then(t=>{var n;!e&&t&&re(null!==(n=t.totalLockedPercent)&&void 0!==n?n:0)}).catch(()=>{}),Ng("".concat(t,"/api/tibane-staking/").concat(k)).then(e=>e.ok?e.json():null).then(t=>{var n;!e&&t&&se(null!==(n=t.totalStakedPercent)&&void 0!==n?n:0)}).catch(()=>{}),()=>{e=!0}},[k,E]),F)return(0,Lg.jsx)(Fb,{children:(0,Lg.jsx)(Ub,{children:"Loading\u2026"})});if(T)return(0,Lg.jsx)(Fb,{children:(0,Lg.jsx)(Ub,{children:(0,Lg.jsxs)("div",{className:"flex flex-col items-center gap-3 text-gray-400 w-full max-w-md",children:[(0,Lg.jsx)("div",{className:"text-white font-medium",children:"This address trades on more than one chain"}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500 text-center",children:"Pick the chain to analyze. Scammers often deploy lookalikes at the same address on other chains, so check the one you mean."}),(0,Lg.jsx)("div",{className:"flex flex-col gap-2 w-full mt-1",children:T.map(e=>{var t,n,r,i;return(0,Lg.jsxs)("button",{onClick:()=>S(Yv(k,e.chain)),className:"flex items-center gap-3 w-full bg-crypto-card border border-gray-700 hover:border-gray-500 rounded-lg px-3 py-2 text-left transition",children:[(0,Lg.jsx)("span",{className:"text-[10px] font-semibold border px-1.5 py-0.5 rounded ".concat(null!==(t=null===(n=$v[e.chain])||void 0===n?void 0:n.badgeClass)&&void 0!==t?t:"text-gray-300 border-gray-600"),children:null!==(r=null===(i=$v[e.chain])||void 0===i?void 0:i.short)&&void 0!==r?r:e.chain}),(0,Lg.jsx)("span",{className:"text-white font-medium",children:e.symbol?"$".concat(e.symbol):e.chainName}),e.name&&(0,Lg.jsx)("span",{className:"text-gray-500 text-sm truncate",children:e.name}),(0,Lg.jsxs)("span",{className:"ml-auto text-xs text-gray-400 font-mono whitespace-nowrap",children:[Db(e.liquidityUsd)," liq"]})]},e.chain)})})]})})});if(W&&!z)return(0,Lg.jsx)(Fb,{children:(0,Lg.jsx)(Ub,{children:K?(0,Lg.jsxs)("div",{className:"flex flex-col items-center gap-3 text-gray-400 max-w-md text-center",children:[(0,Lg.jsx)("i",{className:"fas fa-triangle-exclamation text-3xl text-crypto-yellow"}),(0,Lg.jsx)("div",{className:"text-white font-medium",children:"Can't analyze this token yet"}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500",children:K})]}):O?(0,Lg.jsxs)("div",{className:"flex flex-col items-center gap-3 text-gray-400 max-w-md text-center",children:[(0,Lg.jsx)("i",{className:"fas fa-circle-notch fa-spin text-3xl text-crypto-accent"}),(0,Lg.jsx)("div",{className:"text-white font-medium",children:"Analyzing this token\u2026"}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500",children:"Running a quick safety scan \u2014 holders, distribution, and on-chain risks. This usually takes a few seconds."})]}):(0,Lg.jsxs)("div",{className:"flex flex-col items-center gap-3 text-gray-400 max-w-md text-center",children:[(0,Lg.jsx)("i",{className:"fas fa-magnifying-glass-chart text-3xl text-gray-500"}),(0,Lg.jsx)("div",{className:"text-white font-medium",children:"This token hasn't been analyzed yet."}),(0,Lg.jsx)("button",{onClick:()=>R("token_page"),className:"bg-crypto-accent text-black font-semibold rounded-lg px-4 py-2 hover:opacity-90",children:"Sign in to analyze it"})]})})});if(z||!D)return(0,Lg.jsx)(Fb,{children:(0,Lg.jsxs)(Ub,{children:["Failed to load: ",null!==z&&void 0!==z?z:"no data"]})});const ce=E?null!==(t=Xv(D.chain))&&void 0!==t?t:A:null,ue=ce?$v[ce]:null,de=ce?function(e,t,n){const r=$v[e];return r.gmgn?"https://www.gmgn.cc/kline/".concat(r.gmgn,"/").concat(t,"?theme=dark&interval=").concat(n,"&ref=9E9bbGF8"):"https://dexscreener.com/".concat(r.dexscreener,"/").concat(t,"?embed=1&loadChartSettings=0&trades=0&tabs=0&info=0&chartLeftToolbar=0&chartTheme=dark&theme=dark&chartStyle=1&chartType=usd&interval=15")}(ce,D.mint,Kb(D.tokenCreationDate)):"https://www.gmgn.cc/kline/sol/".concat(D.mint,"?theme=dark&interval=").concat(Kb(D.tokenCreationDate),"&ref=9E9bbGF8"),fe=Qv(D.mint,ce),me=D.overallSafetyLevel,ge="OK"===me||"SAFE"===me,ye=(e=>{switch(_b(e)){case"EXTREME":case"HIGH":return"crypto-red";case"MEDIUM":return"crypto-yellow";default:return"crypto-accent"}})(me),xe=null!==(n=null===(i=D.infoMessages)||void 0===i?void 0:i.length)&&void 0!==n?n:0,ve=(null!==(s=null===(a=D.warnings)||void 0===a?void 0:a.length)&&void 0!==s?s:0)+(null!==(l=null===(c=D.criticalRisks)||void 0===c?void 0:c.length)&&void 0!==l?l:0),be=D.tokenCreationDate?Hb(D.tokenCreationDate):null,we=null===(u=D.metadata)||void 0===u?void 0:u.description,_e=null===(d=D.metadata)||void 0===d?void 0:d.image;return(0,Lg.jsxs)(Fb,{children:[(0,Lg.jsx)(Ib,{title:"$".concat(D.tokenSymbol," \u2014 ").concat(ge?"Clean":me),description:we||"".concat(D.tokenName," token analysis on deepnets.ai"),image:_e||"https://deepnets.ai/logo512.png",url:"https://deepnets.ai".concat(Yv(D.mint,ce))}),(0,Lg.jsxs)("main",{className:"max-w-[1600px] w-full mx-auto px-4 py-3 space-y-2",children:[(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3",children:(0,Lg.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[minmax(0,1fr)_420px] gap-x-4 gap-y-3 items-start",children:[(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-start gap-4 min-w-0",children:[(0,Lg.jsx)(Lb,{src:_e,symbol:D.tokenSymbol,name:D.tokenName,sizeClass:"w-14 h-14",className:"flex-shrink-0"}),(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap",children:[(0,Lg.jsxs)("h1",{className:"text-2xl font-bold leading-tight",children:["$",D.tokenSymbol]}),(0,Lg.jsx)("span",{className:"text-gray-400 text-base",children:D.tokenName})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[(0,Lg.jsx)(qb,{level:me,warningCount:ve,infoCount:xe,onClick:ve>0||xe>0?()=>{const e=document.getElementById("safety-details");e&&(e.scrollIntoView({behavior:"smooth",block:"start"}),e.style.transition="box-shadow 0.25s ease",e.style.boxShadow="0 0 0 2px rgba(0, 255, 136, 0.6)",window.setTimeout(()=>{e.style.boxShadow=""},1200))}:void 0}),ue&&(0,Lg.jsx)("span",{className:"text-[10px] font-semibold border px-1.5 py-0.5 rounded ".concat(ue.badgeClass),title:"".concat(ue.name," token"),children:ue.short}),D.platform&&(0,Lg.jsx)("span",{className:"text-[10px] font-semibold text-gray-300 bg-gray-800 border border-gray-700 px-1.5 py-0.5 rounded",title:"Launched on ".concat(D.platform),children:D.platform}),D.isOnWatchlist&&((e,t)=>{const n=D.watchlistedAt?new Date(D.watchlistedAt):null,r=null!==(e=D.watchlistedAtMcapUsd)&&void 0!==e?e:null,i=null!==(t=D.watchlistMultiplier)&&void 0!==t?t:null,s=e=>"".concat(e.toFixed(e>=100?0:e>=10?1:2),"\xd7"),a=null!=i&&i>=2;return(0,Lg.jsxs)("span",{className:"relative group/wl",children:[(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-crypto-accent bg-crypto-accent/10 border border-crypto-accent/30 px-2 py-0.5 rounded cursor-help",children:["WATCHLIST",a&&(0,Lg.jsx)("span",{className:"text-green-400 font-mono",children:s(i)})]}),(n||null!=r)&&(0,Lg.jsxs)("span",{className:"absolute left-0 top-full mt-1 z-50 hidden group-hover/wl:block bg-crypto-dark border border-gray-600 rounded-lg p-2.5 text-left text-xs whitespace-nowrap shadow-xl min-w-[200px]",children:[n&&(0,Lg.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,Lg.jsx)("span",{className:"text-gray-500",children:"Added"}),(0,Lg.jsx)("span",{className:"text-white",children:n.toLocaleStr
2ing(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})})]}),null!=r&&(0,Lg.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,Lg.jsx)("span",{className:"text-gray-500",children:"Mcap then"}),(0,Lg.jsx)("span",{className:"text-white font-mono",children:Db(r)})]}),null!=i&&i>1&&(0,Lg.jsxs)("div",{className:"flex justify-between gap-3 mt-1 pt-1 border-t border-gray-700",children:[(0,Lg.jsx)("span",{className:"text-gray-500",children:"Now"}),(0,Lg.jsx)("span",{className:"text-green-400 font-medium",children:s(i)})]})]})]})})(),D.isSpotlighted&&(0,Lg.jsx)("span",{className:"text-[10px] font-semibold text-crypto-yellow bg-crypto-yellow/10 border border-crypto-yellow/30 px-1.5 py-0.5 rounded",children:"\u2605 SPOTLIGHT"}),D.charity&&(e=>{const t=D.charity.donationSharePct,n=D.charity.totalDonatedSol,r=["Charity coin \u2014 fees \u2192 ".concat(null!==(e=D.charity.name)&&void 0!==e?e:"charity"),null!=t?"".concat(t,"% of creator fees"):null,null!=n?"".concat(n.toFixed(2)," SOL donated to date"):null,D.charity.adminRevoked?"recipient locked (admin revoked)":null].filter(Boolean);return(0,Lg.jsxs)("button",{onClick:()=>{var e;null===(e=document.getElementById("charity-details"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},className:"inline-flex items-center gap-1 text-[10px] font-semibold text-pink-300 bg-pink-500/10 border border-pink-500/30 px-1.5 py-0.5 rounded hover:bg-pink-500/20 transition cursor-pointer",title:r.join(" \u2022 "),children:[(0,Lg.jsx)("i",{className:"fas fa-hand-holding-heart"}),"CHARITY"]})})(),null!=ne&&ne>0&&(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-semibold text-green-400 bg-green-500/10 border border-green-500/30 px-2 py-0.5 rounded",title:"Token supply locked in Streamflow vesting contracts",children:[(0,Lg.jsx)("i",{className:"fas fa-lock text-[9px]"}),ne.toFixed(1),"% locked"]}),null!=ie&&ie>0&&(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-semibold text-yellow-300 bg-yellow-500/10 border border-yellow-500/30 px-2 py-0.5 rounded",title:"Token supply staked via Tibane",children:[(0,Lg.jsx)("i",{className:"fas fa-gem text-[9px]"}),ie.toFixed(1),"% staked"]}),null!=D.burnPercent&&D.burnPercent>1&&(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-semibold text-orange-300 bg-orange-500/10 border border-orange-500/30 px-2 py-0.5 rounded",title:"Supply held at known burn addresses (incinerator + mint)",children:[(0,Lg.jsx)("i",{className:"fas fa-fire text-[9px]"}),D.burnPercent.toFixed(1),"% burned"]}),null!=D.totalMultisigPercent&&D.totalMultisigPercent>0&&(()=>{const e=1===D.multisigVaultCount&&D.multisigThreshold&&D.multisigMemberCount?" (".concat(D.multisigThreshold,"-of-").concat(D.multisigMemberCount,")"):D.multisigVaultCount&&D.multisigVaultCount>1?" across ".concat(D.multisigVaultCount," vaults"):"";return(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-semibold text-amber-300 bg-amber-500/10 border border-amber-500/30 px-2 py-0.5 rounded",title:"Token supply held in Squads V4 multisig vaults (threshold \u2265 2 \u2014 public shared-control wallets)".concat(e),children:[(0,Lg.jsx)("i",{className:"fas fa-shield-halved text-[9px]"}),D.totalMultisigPercent.toFixed(1),"% multisig",e]})})()]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-x-2 gap-y-1 text-[12px] text-gray-500 mt-1.5 flex-wrap",children:[(0,Lg.jsx)(wb,{text:D.mint,title:"Copy contract address",iconClassName:"text-[11px]",className:"font-mono text-[12px] text-gray-300 hover:text-white bg-crypto-dark/60 hover:bg-crypto-dark border border-gray-700 rounded-md px-2.5 py-1.5 active:scale-95 transition",children:(0,Lg.jsxs)("span",{children:[D.mint.slice(0,4),"\u2026",D.mint.slice(-4)]})}),(0,Lg.jsx)("a",{href:ue?"".concat(ue.explorer,"/token/").concat(D.mint):"https://solscan.io/token/".concat(D.mint),target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 p-1.5",title:ue?"View on ".concat(ue.name," explorer"):"View on Solscan",children:(0,Lg.jsx)("i",{className:"fas fa-external-link-alt text-[10px]"})}),be&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),(0,Lg.jsxs)("span",{children:["Created ",be]})]}),ue&&null!=D.totalLiquidityUsd&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),(0,Lg.jsxs)("span",{title:"DEX pool liquidity at analysis time",children:[Db(D.totalLiquidityUsd)," liquidity"]})]}),D.creator&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),(0,Lg.jsxs)("span",{children:["Creator ",(0,Lg.jsxs)(ft,{to:Gv(D.creator,ce),className:"font-mono text-blue-400 hover:text-blue-300",children:[D.creator.slice(0,ue?6:4),"\u2026",D.creator.slice(-4)]})]}),D.creatorFigure?(0,Lg.jsx)(Sb,{figureKey:D.creatorFigure.figureKey,displayName:
2D.creatorFigure.displayName,trustLevel:D.creatorFigure.trustLevel,confidence:D.creatorFigure.confidence,className:"text-[12px]"}):D.creatorLabel?(0,Lg.jsx)("span",{className:"text-[12px] text-gray-300 bg-gray-800 border border-gray-700 rounded px-1.5 py-0.5",children:D.creatorLabel}):null,"number"===typeof D.creatorTokenCount&&D.creatorTokenCount>0&&(0,Lg.jsxs)("span",{className:"text-gray-600",children:["(",D.creatorTokenCount," other token",1===D.creatorTokenCount?"":"s"," by this creator)"]})]})]})]})]}),we&&(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mt-2 line-clamp-2",children:we}),D.figureHolders&&D.figureHolders.length>0&&(0,Lg.jsxs)("div",{className:"mt-2 flex items-center gap-x-3 gap-y-1 flex-wrap text-sm",children:[(0,Lg.jsxs)("span",{className:"text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-users mr-1.5"}),"Known figures holding:"]}),D.figureHolders.map(e=>(0,Lg.jsx)(Sb,{figureKey:e.figureKey,displayName:e.displayName,trustLevel:e.trustLevel,confidence:e.confidence,percentage:e.percentage,sent:e.sent,tokenAccount:e.tokenAccount},e.figureKey))]}),(()=>{const e=Date.now()-new Date(D.timestamp).getTime()>36e5;return(0,Lg.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-800 flex items-center flex-wrap gap-3 text-[12px]",children:[(0,Lg.jsxs)("span",{className:"flex items-center gap-1.5 ".concat(e?"text-gray-300":"text-gray-500"),children:[(0,Lg.jsx)("i",{className:"fas fa-clock"}),"Analysis from ",(0,Lg.jsx)("span",{className:"font-medium",children:Hb(D.timestamp)}),e&&(0,Lg.jsx)("span",{className:"text-gray-500",children:"(may be outdated)"})]}),(0,Lg.jsx)("button",{onClick:le,disabled:Y,className:"px-2.5 py-1 font-medium rounded-lg border transition disabled:opacity-50 ".concat(e?"border-gray-600 text-gray-300 hover:text-white hover:border-gray-500":"border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600"),title:e?"Re-run safety + social research (costs 1 credit)":"Force a re-run even though this analysis is still fresh (costs 1 credit)",children:Y?"Requesting\u2026":D.hasSocialResearch||ue?"Refresh (1 credit)":"Full Research (1 credit)"}),(0,Lg.jsxs)(ft,{to:"".concat(Yv(D.mint,ce),"/safety-history"),className:"flex items-center gap-1.5 px-2.5 py-1 font-medium rounded-lg border border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600 transition",title:"View this token's past safety analyses",children:[(0,Lg.jsx)("i",{className:"fas fa-history"}),(0,Lg.jsx)("span",{children:"History"})]})]})})()]}),(0,Lg.jsxs)("div",{className:"flex flex-col-reverse lg:flex-col gap-3 min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap lg:justify-end",children:[(null===(h=D.metadata)||void 0===h?void 0:h.website)&&(0,Lg.jsx)("a",{href:D.metadata.website,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white px-1",title:"Website",children:(0,Lg.jsx)("i",{className:"fas fa-globe"})}),(null===(p=D.metadata)||void 0===p?void 0:p.twitter)&&(0,Lg.jsx)("a",{href:D.metadata.twitter,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white px-1",title:"Twitter",children:(0,Lg.jsx)("i",{className:"fab fa-x-twitter"})}),(null===(f=D.metadata)||void 0===f?void 0:f.telegram)&&(0,Lg.jsx)("a",{href:D.metadata.telegram,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white px-1",title:"Telegram",children:(0,Lg.jsx)("i",{className:"fab fa-telegram"})}),!ue&&D.isOnWatchlist&&!D.isSpotlighted&&ge&&(0,Lg.jsxs)("a",{href:"/?spotlight=open&mint=".concat(D.mint),className:"inline-flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded-lg border border-crypto-yellow/40 text-crypto-yellow hover:bg-crypto-yellow/10 transition-colors",title:"Sponsor this token as a Spotlight",children:[(0,Lg.jsx)("i",{className:"fas fa-star text-[10px]"}),"Spotlight It"]}),(0,Lg.jsx)(Nb,{mint:D.mint,tokenDetails:D,pagePath:Yv(D.mint,ce)})]}),D.researchGated?(0,Lg.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/5 p-3",children:(0,Lg.jsxs)("div",{className:"flex items-start gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-lock text-yellow-300 mt-0.5"}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0 text-xs",children:[(0,Lg.jsx)("div",{className:"font-semibold text-sm mb-0.5",children:"Holder research is locked"}),(0,Lg.jsx)("div",{className:"text-gray-500 mb-2",children:"2h gate after watchlisting, or Watcher+ tier."}),(0,Lg.jsx)("button",{onClick:le,disabled:Y,className:"px-3 py-1 text-xs font-semibold rounded border border-yellow-500/40 text-yellow-300 hover:bg-yellow-500/10 transition disabled:opacity-50",children:Y?"Unlocking\u2026":"Unlock (1 credit)"})]})]})}):(0,Lg.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,Lg.jsx)(zb,{label:"Holders",value:(null!==(m=D.totalHolders)&&void 0!==m?m:0).toLocaleStr
2ing(),to:fe}),(0,Lg.jsx)(zb,{label:"Top holder",value:"".concat((null!==(g=D.topHolderOwnership)&&void 0!==g?g:0).toFixed(1),"%"),valueColor:Rb(D.topHolderRiskLevel),to:fe}),(0,Lg.jsxs)(mb,{to:"".concat(Yv(D.mint,ce),"/network-graph"),onClick:()=>Og("network_graph_opened",{mint:D.mint,source:"v2_stats"}),className:"group bg-blue-500/5 border border-blue-500/30 hover:bg-blue-500/10 hover:border-blue-500/60 rounded-xl px-3 py-2 transition-colors",title:"View the funding-source graph for this token's holders",children:[(0,Lg.jsx)("div",{className:"text-base font-semibold leading-tight text-blue-300",children:(0,Lg.jsx)("i",{className:"fas fa-project-diagram"})}),(0,Lg.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-blue-300 mt-0.5 flex items-center justify-between",children:[(0,Lg.jsx)("span",{children:"Holder Graph"}),(0,Lg.jsx)("i",{className:"fas fa-arrow-right text-[9px] opacity-60 group-hover:translate-x-0.5 transition-transform"})]})]}),(0,Lg.jsx)(zb,{label:"Top 10",value:"".concat((null!==(y=D.topTenOwnership)&&void 0!==y?y:0).toFixed(1),"%"),valueColor:Rb(D.topTenHoldersRiskLevel),to:fe}),(0,Lg.jsx)(zb,{label:"Top network",value:D.topNetworkOwnership>0?"".concat(D.topNetworkOwnership.toFixed(1),"% / ").concat(D.topNetworkWalletCount):"\u2014",valueColor:Rb(D.topNetworkRiskLevel),to:fe}),(0,Lg.jsxs)(mb,{to:fe,className:"group bg-purple-500/5 border border-purple-500/30 hover:bg-purple-500/10 hover:border-purple-500/60 rounded-xl px-3 py-2 transition-colors",title:"Top wallets, funding networks, exchange distribution, rugger tags",children:[(0,Lg.jsx)("div",{className:"text-base font-semibold leading-tight text-purple-300",children:(0,Lg.jsx)("i",{className:"fas fa-users"})}),(0,Lg.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-purple-300 mt-0.5 flex items-center justify-between",children:[(0,Lg.jsx)("span",{children:"Full Analysis"}),(0,Lg.jsx)("i",{className:"fas fa-arrow-right text-[9px] opacity-60 group-hover:translate-x-0.5 transition-transform"})]})]})]})]})]})}),(0,Lg.jsxs)("div",{className:"grid grid-cols-1 gap-3 ".concat(ue?"":"lg:grid-cols-[minmax(0,1fr)_420px]"),children:[(0,Lg.jsx)("div",{className:"bg-crypto-card rounded-xl overflow-hidden min-w-0",children:(0,Lg.jsx)("iframe",{src:de,title:"Price Chart",className:"w-full h-[480px] border-0",allow:"clipboard-write"})}),!ue&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("button",{type:"button",onClick:()=>{var e;const t=null!==(e=null===I||void 0===I?void 0:I.walletAddress)&&void 0!==e?e:null;O&&!!t&&((0,gb.persistentPhantomWalletMatches)(t)||(0,yb.Qk)(t))?oe(!0):py("swap")||oe(!0)},className:"lg:hidden w-full border border-green-500 text-green-400 hover:bg-green-500/10 font-semibold text-base py-3 px-4 rounded-xl transition-colors flex items-center justify-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-arrow-right-arrow-left text-sm"}),"Trade $",D.tokenSymbol]}),(0,Lg.jsx)("div",{id:"swap",className:"scroll-mt-20 hidden lg:block",children:(0,Lg.jsx)(bb,{tokenMint:D.mint,tokenSymbol:D.tokenSymbol,riskLevel:D.overallSafetyLevel})})]})]}),(ve>0||xe>0)&&(0,Lg.jsxs)("div",{id:"safety-details",className:"bg-crypto-card border border-gray-800 rounded-xl p-3 scroll-mt-20",children:[(0,Lg.jsxs)("h2",{className:"font-semibold mb-2 flex items-center gap-2 text-sm",children:[(0,Lg.jsx)("i",{className:"fas ".concat(ge?"fa-check-circle":"fa-exclamation-triangle"," text-").concat(ye)}),"Safety details"]}),(0,Lg.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-3 text-sm [&>div]:flex-1 [&>div]:min-w-[180px]",children:[(0,Lg.jsx)(Wb,{title:"Critical",icon:"fa-circle-exclamation",color:"text-crypto-red",items:D.criticalRisks}),(0,Lg.jsx)(Wb,{title:"Warnings",icon:"fa-triangle-exclamation",color:"text-crypto-yellow",items:D.warnings}),(0,Lg.jsx)(Wb,{title:"Info",icon:"fa-info-circle",color:"text-blue-300",items:null!==(x=D.infoMessages)&&void 0!==x?x:[]})]}),(0,Lg.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-800 text-xs text-gray-500 flex items-center gap-3 flex-wrap",children:[(0,Lg.jsxs)("span",{children:["Analyzed ",Hb(D.timestamp)]}),(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),(0,Lg.jsx)("span",{children:D.isMintable?"\u26a0 mintable":ue?"supply fixed":"mint frozen"}),!ue&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),(0,Lg.jsx)("span",{children:D.isFreezable?"\u26a0 freezable":"no freeze authority"})]})]})]}),D.charity&&(null!=D.charity.totalDonatedSol||null!=D.charity.adminRevoked||D.charity.benef
2iciaryWallet)&&(0,Lg.jsxs)("div",{id:"charity-details",className:"bg-crypto-card border border-pink-500/20 rounded-xl p-3 scroll-mt-20",children:[(0,Lg.jsxs)("h2",{className:"font-semibold mb-2 flex items-center gap-2 text-sm",children:[(0,Lg.jsx)("i",{className:"fas fa-hand-holding-heart text-pink-400"}),"Charity"]}),(0,Lg.jsxs)("div",{className:"flex items-start gap-3 flex-wrap",children:[D.charity.logo&&(0,Lg.jsx)("img",{src:D.charity.logo,alt:null!==(v=D.charity.name)&&void 0!==v?v:"charity logo",className:"w-12 h-12 rounded bg-white flex-shrink-0 object-contain p-1",onError:e=>{e.target.style.display="none"}}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0 text-sm",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap",children:[D.charity.website?(0,Lg.jsx)("a",{href:D.charity.website,target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-pink-300 hover:text-pink-200",children:null!==(b=D.charity.name)&&void 0!==b?b:"Charity"}):(0,Lg.jsx)("span",{className:"font-semibold text-pink-300",children:null!==(w=D.charity.name)&&void 0!==w?w:"Charity"}),D.charity.country&&(0,Lg.jsx)("span",{className:"text-xs text-gray-500",children:D.charity.country})]}),(0,Lg.jsxs)("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-400",children:[null!=D.charity.donationSharePct&&(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"text-gray-500",children:"Fee share to charity:"})," ",(0,Lg.jsxs)("span",{className:"text-gray-200 font-medium",children:[D.charity.donationSharePct,"%"]})]}),null!=D.charity.totalDonatedSol&&(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"text-gray-500",children:"Donated to date:"})," ",(0,Lg.jsxs)("span",{className:"text-gray-200 font-medium",children:[D.charity.totalDonatedSol.toFixed(3)," SOL"]})]}),!0===D.charity.adminRevoked&&(0,Lg.jsxs)("span",{className:"text-green-400",title:"The creator has permanently given up the right to change the recipient.",children:[(0,Lg.jsx)("i",{className:"fas fa-lock mr-1 text-[10px]"}),"Recipient locked"]}),!1===D.charity.adminRevoked&&(0,Lg.jsxs)("span",{className:"text-yellow-400",title:"The creator can still change where the fees go.",children:[(0,Lg.jsx)("i",{className:"fas fa-unlock mr-1 text-[10px]"}),"Recipient not locked"]})]}),D.charity.charities&&D.charity.charities.length>1&&(0,Lg.jsxs)("div",{className:"mt-2 text-xs text-gray-500",children:["Multi-charity split:"," ",D.charity.charities.map((e,t)=>{var n;return(0,Lg.jsxs)("span",{children:[t>0&&", ",e.name," (",e.weight,"%)"]},null!==(n=e.slug)&&void 0!==n?n:t)})]}),(D.charity.beneficiaryWallet||D.charity.sharingConfigPda)&&(0,Lg.jsxs)("div",{className:"mt-2 text-[11px] text-gray-600 font-mono break-all",children:[D.charity.beneficiaryWallet&&(0,Lg.jsxs)("div",{children:["donation pool: ",D.charity.beneficiaryWallet]}),D.charity.sharingConfigPda&&(0,Lg.jsxs)("div",{children:["config PDA: ",D.charity.sharingConfigPda]})]})]})]})]}),k&&!ue&&(0,Lg.jsx)(Ab,{mint:k,onRequestResearch:le,requestingResearch:Y}),k&&!ue&&(0,Lg.jsx)(Ob,{mint:k}
2),D.liquidityAnalysis&&(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3",children:[(0,Lg.jsxs)("h2",{className:"font-semibold mb-2 flex items-center gap-2 text-sm",children:[(0,Lg.jsx)("i",{className:"fas fa-water text-blue-400"}),"Liquidity"]}),(0,Lg.jsx)("p",{className:"text-gray-300 text-sm",children:D.liquidityAnalysis})]})]}),(0,Lg.jsx)(_y,{}),(0,Lg.jsx)(Ny,{isOpen:J,requestId:Q,previousCredits:ee,currentCredits:null!==(_=null===I||void 0===I?void 0:I.credits)&&void 0!==_?_:null,onClose:()=>{Z(!1),X(null),te(null)},onSuccess:()=>{window.location.reload()},onError:e=>{alert("Analysis failed: ".concat(e))}}),ae&&!ue&&(0,Lg.jsx)(Bb,{mint:D.mint,symbol:D.tokenSymbol,chartUrl:de,riskLevel:D.overallSafetyLevel,onClose:()=>{oe(!1),"#swap"===window.location.hash&&window.history.replaceState(null,"",window.location.pathname+window.location.search)}})]})};const $b=function(){const{networkAddress:e}=pe(),[t,n]=(0,r.useState)([]),[i,s]=(0,r.useState)(null),[a,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(!1),[h,p]=(0,r.useState)(null),[f,m]=(0,r.useState)(1),[g,y]=(0,r.useState)(0),[x,v]=(0,r.useState)(0),b=20,[w,_]=(0,r.useState)("tokens"),[j,k]=(0,r.useState)([]),[N,S]=(0,r.useState)(!1),[E,A]=(0,r.useState)(null),[C,M]=(0,r.useState)(1),[T,P]=(0,r.useState)(0),[O,I]=(0,r.useState)(0),[L,R]=(0,r.useState)(!1),D=50,[B,F]=(0,r.useState)([]),[U,z]=(0,r.useState)(!1),[q,W]=(0,r.useState)(1),[H,K]=(0,r.useState)(0),[V,$]=(0,r.useState)(0),[Y,G]=(0,r.useState)(!1),[J,Z]=(0,r.useState)([]),[Q,X]=(0,r.useState)(!1),[ee,te]=(0,r.useState)(null),[ne,re]=(0,r.useState)(1),[ie,se]=(0,r.useState)(0),[ae,oe]=(0,r.useState)(0),[le,ce]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&ue(e,1)},[e]),(0,r.useEffect)(()=>{"created"===w&&e&&!Y&&he(e,1),"wallets"===w&&e&&!L&&me(e,1),"directFunded"===w&&e&&!le&&ye(e,1)},[w,e,Y,L,le]);const ue=async(e,t)=>{try{1===t?c(!0):d(!0);const r=await Ng("".concat(Eg(),"/api/network-details/").concat(e,"?page=").concat(t,"&limit=").concat(b));if(!r.ok)throw new Error("Failed to fetch network details");const i=await r.json();n(i.tokens||[]),y(i.totalTokens||0),m(i.tokensPage||1),v(i.tokensTotalPages||0),s(i.networkName||null),o(i)}catch(h$){p(h$ instanceof Error?h$.message:"An error occurred")}finally{c(!1),d(!1)}},de=t=>{e&&t>=1&&t<=x&&ue(e,t)},he=async(e,t)=>{try{z(!0);const n=await Ng("".concat(Eg(),"/api/network-details/").concat(e,"?tab=created&page=").concat(t,"&limit=").concat(b));if(!n.ok)throw new Error("Failed to fetch created tokens");const r=await n.json();F(r.tokens||[]),K(r.totalTokens||0),W(r.tokensPage||1),$(r.tokensTotalPages||0),G(!0)}catch(h$){}finally{z(!1)}},fe=t=>{e&&t>=1&&t<=V&&he(e,t)},me=async(e,t)=>{try{S(!0),A(null);const n=await Ng("".concat(Eg(),"/api/network-details/").concat(e,"/wallets?page=").concat(t,"&limit=").concat(D));if(!n.ok)throw new Error("Failed to fetch network wallets");const r=await n.json();k(r.wallets||[]),P(r.total||0),I(r.totalPages||0),M(r.page||1),R(!0)}catch(h$){A(h$ instanceof Error?h$.message:"An error occurred")}finally{S(!1)}},ge=t=>{e&&t>=1&&t<=O&&me(e,t)},ye=async(e,t)=>{try{X(!0),te(null);const n=await Ng("".concat(Eg(),"/api/wallet-details/").concat(e,"/children?page=").concat(t,"&limit=").concat(D));if(!n.ok)throw new Error("Failed to fetch directly funded wallets");const r=await n.json();Z(r.wallets||[]),se(r.total||0),oe(r.totalPages||0),re(r.page||1),ce(!0)}catch(h$){te(h$ instanceof Error?h$.message:"An error occurred")}finally{X(!1)}},xe=t=>{e&&t>=1&&t<=ae&&ye(e,t)},ve=e=>{let t;const n=new Date(e);if(isNaN(n.getTime())){const n=parseInt(e);t=!isNaN(n)&&n>0?new Date(n):new Date}else t=n;const r=(new Date).getTime()-t.getTime(),i=Math.floor(r/6e4),s=Math.floor(i/60),a=Math.floor(s/24);return a>0?"".concat(a,"d ago"):s>0?"".concat(s,"h ago"):i>0?"".concat(i,"m ago"):"now"},be=e=>e.toLocaleString("en-US"),we=e=>{var t;if(null!==(t=e.uriMetadata)&&void 0!==t&&t.image)return e.uriMetadata.image;const n=(e.symbol||"?").substring(0,4),r='<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="24" cy="24" r="24" fill="#374151"/>\n <text x="24" y="28" text-anchor="middle" fill="#9CA3AF" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">'.concat(n,"</text>\n </svg>");return"data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(r))))};if(l)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"max-w-7xl mx-auto px-6 py-8",children:(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsx)("div",{className:"text-gray-400",children:"Loading network details..."})})}),(0,Lg.jsx)(_y,{})]});if(h)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"max-w-7xl mx-auto px-6 py-8",children:(0,Lg.jsxs)("div",{className:"text-center py-12",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400 mb-4",children:["Failed to load network details: ",h]})]})}),(0,Lg.jsx)(_y,{})]});const _e="".concat(window.location.origin,"/network/").concat(e),je="Network ".concat(null===e||void 0===e?void 0:e.slice(0,4),"...").concat(null===e||void 0===e?void 0:e.slice(-4)," - Token Analysis | Deepnets.ai"),ke="View tokens where network ".concat(null===e||void 0===e?void 0:e.slice(0,4),"...").concat(null===e||void 0===e?void 0:e.slice(-4)," is the top network bundler.");if(null!==a&&void 0!==a&&a.isExchange){const t=a.exchangeName||i||"Known exchange";return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(Ib,{title:"".concat(t," (exchange) | Deepnets.ai"),description:"".concat(t," is a known exchange/bridge, not a wallet network."),image:"".concat(window.location.origin,"/logo192.png"),url:_e,type:"article"}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-6 py-8",children:[(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-4",children:"Exchange / Bridge"}),(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-lg p-6 border border-gray-700",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Lg.jsx)("i",{className:"fas fa-building-columns text-crypto-accent text-lg"}),(0,Lg.jsx)("span",{className:"text-xl font-semibold",children:t}),(0,Lg.jsx)("span",{className:"text-[11px] uppercase tracking-wide text-crypto-accent border border-crypto-accent/40 rounded px-1.5 py-0.5",children:"Exchange"})]}),(0,Lg.jsxs)("p",{className:"text-gray-300 leading-relaxed mb-5",children:["This address is a known exchange / bridge, not a coordinated wallet network. Many unrelated wallets are simply funded ",(0,Lg.jsx)("em",{children:"through"})," it, so it is not grouped or scored as a bundler network, and the wallets it funds are treated as independent."]}),(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Address"}),(0,Lg.jsx)("a",{href:"https://solscan.io/account/".concat(e),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-crypto-accent hover:text-crypto-accent/80 transition-colors break-all",children:e})]})]}),(0,Lg.jsx)(_y,{})]})}return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(Ib,{title:je,description:ke,image:"".concat(window.location.origin,"/logo192.png"),url:_e,type:"article"}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-7xl mx-auto px-6 py-8",children:[(0,Lg.jsxs)("div",{className:"mb-8",children:[(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-4",children:"Network Details"}),(0,Lg.jsx)("div",{className:"bg-crypto-card rounded-lg p-6 border border-gray-700 mb-6",children:(0,Lg.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Top Funding Wallet"}),(0,Lg.jsx)("a",{href:"https://solscan.io/account/".concat(e),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-crypto-accent hover:text-crypto-accent/80 transition-colors break-all",children:e})]}),i&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Network Name (derived from address)"}),(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 text-white",children:[(0,Lg.jsx)("i",{className:"fas fa-key text-crypto-accent"}),(0,Lg.jsx)("span",{className:"font-medium",children:i})]})]}),(null===a||void 0===a?void 0:a.totalNetworkSize)&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Total Network Size"}),(0,Lg.jsxs)("div",{className:"text-white font-semibold",children:[be(a.totalNetworkSize)," wallets"]})]}),(null===a||void 0===a?void 0:a.fundedWalletCount)&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Direct Funded Wallets"}),(0,Lg.jsxs)("div",{className:"text-white font-semibold",children:[be(a.fundedWalletCount)," wallets"]})]}),null!=(null===a||void 0===a?void 0:a.tokensCreatedCount)&&a.tokensCreatedCount>0&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Tokens Created"}),(0,Lg.jsxs)("div",{className:"text-white font-semibold",children:[be(a.tokensCreatedCount)," tokens"]})]}
2),(null===a||void 0===a?void 0:a.exchange)&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Original Funding Exchange"}),(0,Lg.jsx)("div",{className:"text-white font-semibold",children:a.exchange})]}),(null===a||void 0===a?void 0:a.fundingTxSignature)&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Original Funding Tx"}),(0,Lg.jsx)("div",{className:"text-white font-semibold",children:(0,Lg.jsxs)("a",{href:"https://solscan.io/tx/".concat(a.fundingTxSignature),target:"_blank",rel:"noopener noreferrer",className:"hover:text-blue-400 transition-colors",children:[a.fundingTxSignature.slice(0,6),"...",a.fundingTxSignature.slice(-4),(0,Lg.jsx)("i",{className:"fas fa-external-link-alt ml-1.5 text-xs text-gray-400"})]})})]}),(null===a||void 0===a?void 0:a.createdAt)&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Network Created"}),(0,Lg.jsxs)("div",{className:"text-white",children:[(0,Lg.jsx)("div",{className:"font-semibold",children:(Ne=a.createdAt,new Date(Ne).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",timeZoneName:"short"}))}),(0,Lg.jsx)("div",{className:"text-sm text-gray-400",children:ve(a.createdAt)})]})]})]})})]}),(0,Lg.jsxs)("div",{className:"flex items-center space-x-1 mb-6 bg-crypto-card rounded-lg p-1 border border-gray-700 w-fit",children:[(0,Lg.jsxs)("button",{onClick:()=>_("tokens"),className:"px-4 py-2 rounded-md text-sm font-medium transition-colors ".concat("tokens"===w?"bg-gray-700 text-white":"text-gray-400 hover:text-white hover:bg-gray-700"),children:[(0,Lg.jsx)("i",{className:"fas fa-coins mr-2"}),"Bundled ",g>0&&(0,Lg.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(",be(g),")"]})]}),(0,Lg.jsxs)("button",{onClick:()=>_("created"),className:"px-4 py-2 rounded-md text-sm font-medium transition-colors ".concat("created"===w?"bg-gray-700 text-white":"text-gray-400 hover:text-white hover:bg-gray-700"),children:[(0,Lg.jsx)("i",{className:"fas fa-paint-brush mr-2"}),"Created ",null!==a&&void 0!==a&&a.tokensCreatedCount?(0,Lg.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(",be(a.tokensCreatedCount),")"]}):null]}),(0,Lg.jsxs)("button",{onClick:()=>_("wallets"),className:"px-4 py-2 rounded-md text-sm font-medium transition-colors ".concat("wallets"===w?"bg-gray-700 text-white":"text-gray-400 hover:text-white hover:bg-gray-700"),children:[(0,Lg.jsx)("i",{className:"fas fa-project-diagram mr-2"}),"Network Wallets ",null!==a&&void 0!==a&&a.totalNetworkSize?(0,Lg.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(",be(a.totalNetworkSize),")"]}):null]}),(0,Lg.jsxs)("button",{onClick:()=>_("directFunded"),className:"px-4 py-2 rounded-md text-sm font-medium transition-colors ".concat("directFunded"===w?"bg-gray-700 text-white":"text-gray-400 hover:text-white hover:bg-gray-700"),children:[(0,Lg.jsx)("i",{className:"fas fa-share-alt mr-2"}),"Direct Funded ",le&&ie>0?(0,Lg.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(",be(ie),")"]}):null]})]}),"tokens"===w&&(0,Lg.jsx)(Lg.Fragment,{children:0===t.length?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsxs)("div",{className:"text-gray-400 mb-4",children:[(0,Lg.jsx)("i",{className:"fas fa-search text-4xl mb-2"}),(0,Lg.jsx)("p",{className:"text-lg",children:"No tokens found for this network"}),(0,Lg.jsx)("p",{className:"text-sm",children:"This network may not be a top network bundler for any recent tokens."})]})}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["Showing ",be((f-1)*b+1),"\u2013",be(Math.min(f*b,g))," of ",be(g)," token",1!==g?"s":""," bundled by this network"]}),u&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm",children:"Loading..."})]}),(0,Lg.jsx)("div",{className:"grid gap-4",children:t.map(e=>(0,Lg.jsx)("div",{className:"bg-crypto-card rounded-lg p-4 border border-gray-700",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Lg.jsx)("img",{src:we(e),alt:e.name,className:"w-12 h-12 rounded-full border-2 border-gray-700 object-cover flex-shrink-0",onError:t=>{const n=(e.symbol||"?").substring(0,4),r='<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="24" fill="#374151"/><text x="24" y="28" text-anchor="middle" fill="#9CA3AF" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">'.concat(n,"</text></svg>");t.target.src="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(r))))}}),(0,Lg.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 mb-1 flex-wrap",children:[(0,Lg.jsx)("a",{href:"/holder-analysis/".concat(e.mint,"/latest"),className:"text-2xl font-bold text-white hover:text-crypto-accent transition-colors",children:e.symbol||"???"}),(0,Lg.jsx)("a",{href:"/holder-analysis/".concat(e.mint,"/latest"),className:"text-sm text-gray-300 font-medium truncate hover:text-crypto-accent transition-colors",children:e.name||"Unknown Token"}),"both"===e.relationship&&(0,Lg.jsx)("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-full bg-purple-500/20 text-purple-400",children:"Also Created"})]}),(0,Lg.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between text-sm gap-2 md:gap-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-3 text-gray-400",children:[(0,Lg.jsxs)("span",{children:["Token created ",ve(e.createdAt)]}),(0,Lg.jsx)("span",{children:"\u2022"}),(0,Lg.jsxs)("a",{href:"https://solscan.io/token/".concat(e.mint),target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 font-mono transition-colors",title:"View on Solscan",children:[e.mint.slice(0,4),"...",e.mint.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.mint),className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors px-1",title:"Copy mint address",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between md:justify-end space-x-4",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsx)("a",{href:"https://pump.fun/".concat(e.mint),target:"_blank",rel:"noopener noreferrer",title:"View on Pump.fun",className:"opacity-60 hover:opacity-100 transition-opacity",children:(0,Lg.jsx)("img",{src:"/pumpfun.png",alt:"PumpFun",className:"w-4 h-4"})}),(0,Lg.jsx)("a",{href:"https://gmgn.ai/sol/token/".concat("9E9bbGF8","_").concat(e.mint),target:"_blank",rel:"noopener noreferrer",title:"View on GMGN",className:"opacity-60 hover:opacity-100 transition-opacity",children:(0,Lg.jsx)("img",{src:"/gmgn.svg",alt:"GMGN",className:"w-4 h-4"})})]}),(0,Lg.jsx)("div",{className:"flex items-center space-x-4",children:(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsxs)("div",{className:"text-lg font-bold ".concat(jb(e.networkPercentHeld)),children:[e.networkPercentHeld.toFixed(1),"%"]}),(0,Lg.jsxs)("div",{className:"text-xs text-gray-400",children:[e.networkWalletCount," wallet",1!==e.networkWalletCount?"s":""]})]})})]})]})]})]})},e.mint))}),x>1&&(0,Lg.jsxs)("div",{className:"flex items-center justify-center space-x-2 mt-6",children:[(0,Lg.jsx)("button",{onClick:()=>de(1),disabled:1===f||u,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-left"})}),(0,Lg.jsx)("button",{onClick:()=>de(f-1),disabled:1===f||u,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-left"})}),(0,Lg.jsxs)("span",{className:"px-4 py-2 text-sm text-gray-300",children:["Page ",f," of ",be(x)]}),(0,Lg.jsx)("button",{onClick:()=>de(f+1),disabled:f===x||u,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-right"})}),(0,Lg.jsx)("button",{onClick:()=>de(x),disabled:f===x||u,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-right"})})]})]})}),"created"===w&&(0,Lg.jsx)(Lg.Fragment,{children:U&&!Y?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsx)("div",{className:"text-gray-400",children:"Loading created tokens..."})}):0===B.length?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsxs)("div",{className:"text-gray-400 mb-4",children:[(0,Lg.jsx)("i",{className:"fas fa-paint-brush text-4xl mb-2"}),(0,Lg.jsx)("p",{className:"text-lg",children:"No tokens created by this network"})]})}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["Showing ",be((q-1)*b+1),"\u2013",be(Math.min(q*b,H))," of ",be(H)," token",1!==H?"s":""," created by this network"]}),U&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm",children:"Loading..."})]}),(0,Lg.jsx)("div",{className:"grid gap-4",children:B.map(e=>(0,Lg.jsx)("div",{className:"bg-crypto-card rounded-lg p-4 border border-gray-700",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Lg.jsx)("img",{src:we(e),alt:e.name,className:"w-12 h-12 rounded-full border-2 border-gray-700 object-cover flex-shrink-0",onError:t=>{const n=(e.symbol||"?").substring(0,4),r='<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="24" fill="#374151"/><text x="24" y="28" text-anchor="middle" fill="#9CA3AF" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">'.concat(n,"</text></svg>");t.target.src="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(r))))}}),(0,Lg.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center space-x-2 mb-1 flex-wrap",children:[(0,Lg.jsx)("a",{href:"/holder-analysis/".concat(e.mint,"/latest"),className:"text-2xl font-bold text-white hover:text-crypto-accent transition-colors",children:e.symbol||"???"}),(0,Lg.jsx)("a",{href:"/holder-analysis/".concat(e.mint,"/latest"),className:"text-sm text-gray-300 font-medium truncate hover:text-crypto-accent transition-colors",children:e.name||"Unknown Token"}),"both"===e.relationship&&(0,Lg.jsx)("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-full bg-red-500/20 text-red-400",children:"Also Bun
2dled"})]}),(0,Lg.jsxs)("div",{className:"flex items-center space-x-3 text-sm text-gray-400",children:[(0,Lg.jsxs)("span",{children:["Created ",ve(e.createdAt)]}),(0,Lg.jsx)("span",{children:"\u2022"}),(0,Lg.jsxs)("a",{href:"https://solscan.io/token/".concat(e.mint),target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 font-mono transition-colors",children:[e.mint.slice(0,4),"...",e.mint.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.mint),className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors px-1",title:"Copy mint address",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})]})]})},e.mint))}),V>1&&(0,Lg.jsxs)("div",{className:"flex items-center justify-center space-x-2 mt-6",children:[(0,Lg.jsx)("button",{onClick:()=>fe(1),disabled:1===q||U,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-left"})}),(0,Lg.jsx)("button",{onClick:()=>fe(q-1),disabled:1===q||U,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-left"})}),(0,Lg.jsxs)("span",{className:"px-4 py-2 text-sm text-gray-300",children:["Page ",q," of ",be(V)]}),(0,Lg.jsx)("button",{onClick:()=>fe(q+1),disabled:q===V||U,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-right"})}),(0,Lg.jsx)("button",{onClick:()=>fe(V),disabled:q===V||U,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-right"})})]})]})}),"wallets"===w&&(0,Lg.jsx)(Lg.Fragment,{children:N&&!L?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsx)("div",{className:"text-gray-400",children:"Loading wallets..."})}):E?(0,Lg.jsxs)("div",{className:"text-center py-12",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Failed to load wallets: ",E]})]}):0===j.length?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsxs)("div",{className:"text-gray-400 mb-4",children:[(0,Lg.jsx)("i",{className:"fas fa-wallet text-4xl mb-2"}),(0,Lg.jsx)("p",{className:"text-lg",children:"No wallets found for this network"})]})}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["Showing ",be((C-1)*D+1),"\u2013",be(Math.min(C*D,T))," of ",be(T)," wallets in this network"]}),N&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm",children:"Loading..."})]}),(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-700 rounded-xl overflow-hidden",children:(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet Address"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet Age"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400 hidden md:table-cell",children:"Funding Tx"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400 hidden lg:table-cell",children:"Funding Source"})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700",children:j.map(e=>(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsx)(ft,{to:"/wallet/".concat(e.address),className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:e.label||"".concat(e.address.slice(0,6),"...").concat(e.address.slice(-4))}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.address),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsx)("span",{className:"text-white font-medium text-sm",children:e.oldestTx?ve(e.olde
2stTx):"\u2014"})}),(0,Lg.jsx)("td",{className:"p-4 hidden md:table-cell",children:e.oldestTxSignature?(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsxs)("a",{href:"https://solscan.io/tx/".concat(e.oldestTxSignature),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[e.oldestTxSignature.slice(0,6),"...",e.oldestTxSignature.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.oldestTxSignature),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]}):(0,Lg.jsx)("span",{className:"text-gray-500 text-sm",children:"\u2014"})}),(0,Lg.jsx)("td",{className:"p-4 hidden lg:table-cell",children:e.fundingSource?(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsxs)("a",{href:"https://solscan.io/account/".concat(e.fundingSource),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[e.fundingSource.slice(0,6),"...",e.fundingSource.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.fundingSource),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]}):(0,Lg.jsx)("span",{className:"text-gray-500 text-sm",children:"Unknown"})})]},e.address))})]})})}),O>1&&(0,Lg.jsxs)("div",{className:"flex items-center justify-center space-x-2 mt-6",children:[(0,Lg.jsx)("button",{onClick:()=>ge(1),disabled:1===C||N,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-left"})}),(0,Lg.jsx)("button",{onClick:()=>ge(C-1),disabled:1===C||N,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-left"})}),(0,Lg.jsxs)("span",{className:"px-4 py-2 text-sm text-gray-300",children:["Page ",C," of ",be(O)]}),(0,Lg.jsx)("button",{onClick:()=>ge(C+1),disabled:C===O||N,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-right"})}),(0,Lg.jsx)("button",{onClick:()=>ge(O),disabled:C===O||N,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-right"})})]})]})}),"directFunded"===w&&(0,Lg.jsx)(Lg.Fragment,{children:Q&&!le?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsx)("div",{className:"text-gray-400",children:"Loading directly funded wallets..."})}):ee?(0,Lg.jsxs)("div",{className:"text-center py-12",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Failed to load wallets: ",ee]})]}):0===J.length?(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsxs)("div",{className:"text-gray-400 mb-4",children:[(0,Lg.jsx)("i",{className:"fas fa-share-alt text-4xl mb-2"}),(0,Lg.jsx)("p",{className:"text-lg",children:"No directly funded wallets found"}),(0,Lg.jsx)("p",{className:"text-sm",children:"This wallet hasn't directly funded any other wallets."})]})}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["Showing ",be((ne-1)*D+1),"\u2013",be(Math.min(ne*D,ie))," of ",be(ie)," directly funded wallets"]}),Q&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm",children:"Loading..."})]}),(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-700 rounded-xl overflow-hidden",children:(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet Address"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet Age"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400 hidden md:table-cell",children:"Funding Tx"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400 hidden lg:table-cell",children:"Tags"})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700",children:J.map(e=>(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsx)(ft,{to:"/wallet/".concat(e.address),className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:e.label||"".concat(e.address.slice(0,6),"...").concat(e.address.slice(-4))}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.address),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsx)("span",{className:"text-white font-medium text-sm",children:e.oldestTx?ve(e.olde
2stTx):"\u2014"})}),(0,Lg.jsx)("td",{className:"p-4 hidden md:table-cell",children:e.oldestTxSignature?(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsxs)("a",{href:"https://solscan.io/tx/".concat(e.oldestTxSignature),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[e.oldestTxSignature.slice(0,6),"...",e.oldestTxSignature.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.oldestTxSignature),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]}):(0,Lg.jsx)("span",{className:"text-gray-500 text-sm",children:"\u2014"})}),(0,Lg.jsx)("td",{className:"p-4 hidden lg:table-cell",children:e.tags&&e.tags.length>0?(0,Lg.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.map(e=>(0,Lg.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-700 text-gray-300 rounded-full",children:e},e))}):(0,Lg.jsx)("span",{className:"text-gray-500 text-sm",children:"\u2014"})})]},e.address))})]})})}),ae>1&&(0,Lg.jsxs)("div",{className:"flex items-center justify-center space-x-2 mt-6",children:[(0,Lg.jsx)("button",{onClick:()=>xe(1),disabled:1===ne||Q,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-left"})}),(0,Lg.jsx)("button",{onClick:()=>xe(ne-1),disabled:1===ne||Q,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-left"})}),(0,Lg.jsxs)("span",{className:"px-4 py-2 text-sm text-gray-300",children:["Page ",ne," of ",be(ae)]}),(0,Lg.jsx)("button",{onClick:()=>xe(ne+1),disabled:ne===ae||Q,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-right"})}),(0,Lg.jsx)("button",{onClick:()=>xe(ae),disabled:ne===ae||Q,className:"px-3 py-2 rounded-md text-sm bg-crypto-card border border-gray-700 text-gray-400 hover:text-white hover:border-gray-500 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-angle-double-right"})})]})]})})]}),(0,Lg.jsx)(_y,{})]});var Ne},Yb=e=>"confirmed"===e?"border-crypto-green/40 text-crypto-green":"probable"===e?"border-amber-400/40 text-amber-400":"border-gray-600 text-gray-400",Gb={research_pipeline:"deepnets",onchain_funding:"on-chain funding",onchain_deployer:"on-chain deploy",self_disclosed:"self
2-disclosed",vendor_label:"vendor",third_party_claim:"third-party",other:"other"},Jb={confirmed:3,probable:2,claimed:1},Zb=function(){const e=function(){var e;return null!==(e=[...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]].sort((e,t)=>(Jb[t.confidence||"claimed"]||0)-(Jb[e.confidence||"claimed"]||0))[0])&&void 0!==e?e:null}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return e?"vendor_label"===e.type&&e.vendor?e.vendor.toUpperCase():Gb[e.type]||e.type:""},Qb=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(e=>"".concat(Gb[e.type]||e.type).concat(e.vendor?" (".concat(e.vendor).concat(e.vendorValue?": ".concat(e.vendorValue):"",")"):""," \u2014 ").concat(e.confidence||"?")).join("\n")},Xb=e=>"high"===e?"text-crypto-green bg-crypto-green/10":"medium"===e?"text-crypto-yellow bg-crypto-yellow/10":"low"===e?"text-crypto-red bg-crypto-red/10":"text-gray-400 bg-gray-700/40";const ew=function(e){var t,n,i,s,a;let{chain:l}=e;const{walletAddress:c}=pe(),u=he(),[d,h]=(0,r.useState)(null),[p,f]=(0,r.useState)(!0),[m,g]=(0,r.useState)(null),[y,x]=(0,r.useState)({wallets:[],total:0,page:1,totalPages:0,loading:!1}),v=async(e,t)=>{x(e=>(0,o.A)((0,o.A)({},e),{},{loading:!0}));try{const n=await Ng("".concat(Eg(),"/api/wallet-details/").concat(e,"/children?page=").concat(t,"&limit=20").concat(l?"&chain=".concat(l):""));if(n.ok){const e=await n.json();x({wallets:e.wallets,total:e.total,page:e.page,totalPages:e.totalPages,loading:!1})}else x(e=>(0,o.A)((0,o.A)({},e),{},{loading:!1}))}catch(n){x(e=>(0,o.A)((0,o.A)({},e),{},{loading:!1}))}};(0,r.useEffect)(()=>{c&&(b(c),v(c,1))},[c,l]);const b=async e=>{try{f(!0);const t=await Ng("".concat(Eg(),"/api/wallet-details/").concat(e).concat(l?"?chain=".concat(l):""));if(!t.ok)throw new Error("Failed to fetch wallet details");const n=await t.json();if(!l&&n.chain)return void u(Gv(e,n.chain),{replace:!0});h(n)}catch(h$){g(h$ instanceof Error?h$.message:"An error occurred")}finally{f(!1)}},w=e=>{let t;const n=new Date(e);if(isNaN(n.getTime())){const n=parseInt(e);t=!isNaN(n)&&n>0?new Date(n):new Date}else t=n;const r=(new Date).getTime()-t.getTime(),i=Math.floor(r/6e4),s=Math.floor(i/60),a=Math.floor(s/24);return a>0?"".concat(a,"d ago"):s>0?"".concat(s,"h ago"):i>0?"".concat(i,"m ago"):"now"},_=e=>{navigator.clipboard.writeText(e)},j=e=>{var t;if(null!==(t=e.uriMetadata)&&void 0!==t&&t.image)return e.uriMetadata.image;const n=(e.symbol||"?").substring(0,4),r='<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="24" fill="#374151"/><text x="24" y="28" text-anchor="middle" fill="#9CA3AF" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">'.concat(n,"</text></svg>");return"data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(r))))},k=e=>e.toLocaleString("en-US");if(p)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"max-w-4xl mx-auto px-6 py-8",children:(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsx)("div",{className:"text-gray-400",children:"Loading wallet details..."})})}),(0,Lg.jsx)(_y,{})]});if(m||!d)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"max-w-4xl mx-auto px-6 py-8",children:(0,Lg.jsxs)("div",{className:"text-center py-12",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400 mb-4",children:["Failed to load wallet details: ",m]})]})}),(0,Lg.jsx)(_y,{})]});const N="".concat(window.location.origin).concat(Gv(null!==c&&void 0!==c?c:"",l)),S="Wallet ".concat(null===c||void 0===c?void 0:c.slice(0,4),"...").concat(null===c||void 0===c?void 0:c.slice(-4)," - Wallet Analysis | Deepnets.ai"),E="View detailed information about wallet ".concat(null===c||void 0===c?void 0:c.slice(0,4),"...").concat(null===c||void 0===c?void 0:c.slice(-4)," including funding sources and network connections."),A=d.topFundingNetwork&&d.topFundingNetwork!==c,C=null===(t=d.research)||void 0===t?void 0:t.figure;return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(Ib,{title:S,description:E,image:"".concat(window.location.origin,"/logo192.png"),url:N,type:"article"}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-6 sm:py-8 space-y-5 sm:space-y-6",children:[(0,Lg.jsxs)("section",{className:"bg-crypto-card rounded-xl border border-gray-700 overflow-hidden",children:[C&&
2(0,Lg.jsxs)("div",{className:"p-5 sm:p-6 border-b border-gray-800 bg-crypto-green/[0.03]",children:[(0,Lg.jsxs)("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,Lg.jsx)("div",{className:"w-11 h-11 rounded-full bg-crypto-green/15 flex items-center justify-center flex-shrink-0",children:(0,Lg.jsx)("i",{className:"fas fa-user-check text-crypto-green text-lg"})}),(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,Lg.jsx)("span",{className:"text-2xl font-bold text-white",children:C.displayName}),C.trustLevel&&(0,Lg.jsxs)("span",{className:"text-xs font-medium capitalize px-1.5 py-0.5 rounded ".concat(Xb(C.trustLevel)),children:[C.trustLevel," trust"]})]}),(0,Lg.jsxs)("div",{className:"text-xs text-gray-400 mt-0.5 capitalize",children:["Known figure",C.publicStature?" \xb7 ".concat(C.publicStature):""]})]})]}),(0,Lg.jsx)(ft,{to:"/figures/".concat(C.figureKey),className:"flex-shrink-0 text-sm font-medium text-crypto-accent hover:text-white bg-crypto-dark border border-gray-700 hover:border-crypto-accent rounded-lg px-3 py-1.5 transition",children:"View figure \u2192"})]}),d.research&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"mt-4 flex flex-wrap gap-x-5 gap-y-1.5 text-xs text-gray-400",children:[d.research.linkageStrength&&(0,Lg.jsxs)("span",{children:["Linkage ",(0,Lg.jsx)("span",{className:"text-gray-200 capitalize",children:d.research.linkageStrength})]}),d.research.confidence&&(0,Lg.jsxs)("span",{children:["Confidence ",(0,Lg.jsx)("span",{className:"text-gray-200 capitalize",children:d.research.confidence})]}),null!=d.research.deployedCount&&(0,Lg.jsxs)("span",{children:["Deployed ",(0,Lg.jsx)("span",{className:"text-gray-200",children:d.research.deployedCount})," coins"]}),d.research.discoveredViaCount>0&&(0,Lg.jsxs)("span",{children:["Tops ",(0,Lg.jsx)("span",{className:"text-gray-200",children:d.research.discoveredViaCount})," tokens"]})]}),(null===(n=d.research.mitigation)||void 0===n?void 0:n.mitigates)&&(0,Lg.jsxs)("div",{className:"mt-3 text-xs text-crypto-green bg-crypto-green/10 border border-crypto-green/20 rounded-lg px-3 py-2",children:[(0,Lg.jsx)("i",{className:"fas fa-shield-halved mr-1.5"}),"Concentration mitigated \u2014 public identity is reputational collateral (",d.research.mitigation.basis,d.research.mitigation.reviewRecommended?", review recommended":"",")"]})]})]}),(0,Lg.jsxs)("div",{className:"p-5 sm:p-6",children:[d.label&&!C&&(0,Lg.jsxs)("div",{className:"mb-3 flex items-center gap-2 flex-wrap",children:[(0,Lg.jsx)("span",{className:"text-xl font-bold text-white",children:d.label}),(null===(i=d.tags)||void 0===i?void 0:i.includes("fomo_trader"))&&(0,Lg.jsxs)("span",{className:"text-xs text-orange-300 bg-orange-500/10 border border-orange-500/40 rounded px-2 py-0.5 inline-flex items-center gap-1",title:"Social-trading account on fomo.family; the label is its FOMO handle",children:[(0,Lg.jsx)("i",{className:"fas fa-fire text-[10px]"})," FOMO trader"]})]}),(0,Lg.jsxs)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1.5 flex items-center gap-2",children:[C?"Wallet address":"Wallet",l&&(0,Lg.jsx)("span",{className:"normal-case tracking-normal text-[10px] font-semibold border px-1.5 py-0.5 rounded ".concat($v[l].badgeClass),children:$v[l].short})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,Lg.jsx)("a",{href:Zv("address",null!==c&&void 0!==c?c:"",l),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-sm sm:text-[15px] text-crypto-accent hover:text-crypto-accent/80 break-all",children:c}),(0,Lg.jsx)("button",{onClick:()=>_(c||""),className:"text-gray-400 hover:text-white flex-shrink-0",title:"Copy address",children:(0,Lg.jsx)("i",{className:"fas fa-copy"})}),(0,Lg.jsx)("a",{href:Zv("address",null!==c&&void 0!==c?c:"",l),target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 flex-shrink-0",title:l?"View on ".concat($v[l].name," explorer"):"View on Solscan",children:(0,Lg.jsx)("i",{className:"fas fa-external-link-alt text-xs"})})]}),d.snsDomains&&d.snsDomains.length>0&&(0,Lg.jsxs)("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[d.snsDomains.slice(0,10).map(e=>(0,Lg.jsx)("span",{className:"text-xs font-mono text-crypto-accent bg-crypto-dark border border-gray-700 rounded px-2 py-0.5",children:e},e)),d.snsDomains.length>10&&(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 self-center",children:["+",d.snsDomains.length-10," more"]})]})]})]}),(null===(s=d.research)||void 0===s?void 0:s.figureLinks)&&d.research.figureLinks.length>0&&(0,Lg.jsxs)("section",{className:"bg-crypto-card rounded-xl border border-gray-700 p-5 sm:p-6",children:[(0,Lg.jsxs)("h2",{className:"text-xs uppercase tracking-wide text-gray-500 mb-3",children:["Linked figures (",d.research.figureLinks.length,")"]}),(0,Lg.jsx)("div",{className:"space-y-2",children:d.research.figureLinks.map(e=>{const t=Zb(e.evidence);return(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,Lg.jsx)(ft,{to:"/figures/".concat(e.figureKey),className:"text-sm font-semibold text-crypto-accent hover:underline",children:e.displayName||e.figureKey}),(0,Lg.jsx)("span",{className:"text-[10px] px-1.5 py-px rounded border ".concat(Yb(e.confidence)),title:Qb(e.evidence),children:e.confidence}),t&&(0,Lg.jsxs)("span",{className:"text-[10px] text-gray-500",children:["via ",t]}),e.trustLevel&&(0,Lg.jsxs)("span",{className:"text-[10px] text-gray-500 capitalize",children:["\xb7 ",e.trustLevel," trust"]})]},e.figureKey)})})]}),d.tokensCreatedCount>0&&(0,Lg.jsxs)("section",{children:[(0,Lg.jsxs)("h2",{className:"text-lg font-bold mb-3 flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-coins text-crypto-accent"})," Coins Created",(0,Lg.jsxs)("span",{className:"text-sm font-normal text-gray-500",children:["(",k(d.tokensCreatedCount),")"]})]}),d.tokensCreated.length>0?(0,Lg.jsx)("div",{className:"space-y-3",children:d.tokensCreated.map(e=>(0,Lg.jsx)("div",{className:"bg-crypto-card rounded-xl p-4 border border-gray-700",children:(0,Lg.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,Lg.jsx)("img",{src:j(e),alt:e.name,className:"w-11 h-11 rounded-full border-2 border-gray-700 object-cover flex-shrink-0",onError:t=>{const n=(e.symbol||"?").substring(0,4),r='<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="24" fill="#374151"/><text x="24" y="28" text-anchor="middle" fill="#9CA3AF" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">'.concat(n,"</text></svg>");t.target.src="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(r))))}}),(0,Lg.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 mb-1 min-w-0",children:[(0,Lg.jsx)("a",{href:Yv(e.mint,l),className:"text-lg sm:text-xl font-bold text-white hover:text-crypto-accent transition-colors flex-shrink-0",children:e.symbol||"???"}),(0,Lg.jsx)("a",{href:Yv(e.mint,l),className:"text-sm text-gray-300 font-medium truncate hover:text-crypto-accent transition-colors",children:e.name||"Unknown Token"})]}),(0,Lg.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 text-sm",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 text-gray-400 min-w-0",children:[(0,Lg.jsx)("span",{className:"whitespace-nowrap",children:w(e.createdAt||"")}),(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2022"}),(0,Lg.jsxs)("a",{href:Zv("token",e.mint,l),target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 font-mono transition-colors",title:"View on explorer",children:[e.mint.slice(0,4),"...",e.mint.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>_(e.mint),className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",title:"Copy mint",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between sm:justify-end gap-4",children:[!l&&(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("a",{href:"https://pump.fun/".concat(e.mint),target:"_blank",rel:"noopener noreferrer",title:"View on Pump.fun",className:"opacity-60 hover:opacity-100 transition-opacity",children:(0,Lg.jsx)("img",{src:"/pumpfun.png",alt:"PumpFun",className:"w-4 h-4"})}),(0,Lg.jsx)("a",{href:"https://gmgn.ai/sol/token/".concat("9E9bbGF8","_").concat(e.mint),target:"_blank",rel:"noopener noreferrer",title:"View on GMGN",className:"opacity-60 hover:opacity-100 transition-opacity",children:(0,Lg.jsx)("img",{src:"/gmgn.svg",alt:"GMGN",className:"w-4 h-4"})})]}),e.networkPercentHeld>0&&(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsxs)("div",{className:"text-base font-bold ".concat(jb(e.networkPercentHeld)),children:[e.networkPercentHeld.toFixed(1),"%"]}),(0,Lg.jsxs)("div",{className:"text-xs text-gray-400",children:[e.networkWalletCount," wallet",1!==e.networkWalletCount?"s":""]})]})]})]})]})]})},e.mint))}):(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl p-5 border border-gray-700 text-sm text-gray-400",children:["This wallet created ",k(d.tokensCreatedCount)," token",1!==d.tokensCreatedCount?"s":"",", but details aren't available yet."]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsxs)("h2",{className:"text-lg font-bold mb-3 flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-hand-holding-dollar text-crypto-accent"})," Funding"]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl border border-gray-700 p-5 sm:p-6",children:[(0,Lg.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-4",children:[d.fundingSource&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Funded by"}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsxs)(ft,{to:d.topFundingSource&&d.fundingSource===d.topFundingSource?Jv(d.fundingSource,l):Gv(d.fundingSource,l),className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[d.fundingSource.slice(0,4),"...",d.fundingSource.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>_(d.fundingSource),className:"text-gray-400 hover:text-white transition-colors",title:"Copy funding source",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})]}),l&&null!=d.fundingAmount&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"First funding"}),(0,Lg.jsxs)("div",{className:"text-white font-semibold text-sm",children:[d.fundingAmount.toLocaleStr
2ing(void 0,{maximumFractionDigits:6})," ",null!==(a=d.fundingAsset)&&void 0!==a?a:""]}),d.funderIsContract&&(0,Lg.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"From a contract (DEX, bridge or router), so the trail stops here."})]}),l&&d.topFundingPending&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Network"}),(0,Lg.jsxs)("div",{className:"text-sm text-gray-300",children:[(0,Lg.jsx)("i",{className:"fas fa-circle-notch fa-spin text-xs mr-1.5"}),"Still tracing the funding chain to its root"]})]}),d.label&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Label"}),(0,Lg.jsx)("div",{className:"text-white font-semibold text-sm",children:d.label})]}),d.exchange&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:d.label?"Funded via":"Exchange"}),(0,Lg.jsx)("div",{className:"text-white font-semibold text-sm",children:d.exchange})]}),d.oldestTxSignature&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Funding tx"}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,Lg.jsxs)("a",{href:Zv("tx",d.oldestTxSignature,l),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[d.oldestTxSignature.slice(0,4),"...",d.oldestTxSignature.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>_(d.oldestTxSignature),className:"text-gray-400 hover:text-white transition-colors",title:"Copy tx",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})}),d.oldestTx&&(0,Lg.jsx)("span",{className:"text-xs text-gray-500",children:w(d.oldestTx)})]})]}),d.createdAt&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"First seen"}),(0,Lg.jsx)("div",{className:"text-white text-sm font-semibold",children:(M=d.createdAt,new Date(M).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",timeZoneName:"short"}))}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500",children:w(d.createdAt)})]})]}),d.networkInfo?(0,Lg.jsxs)("div",{className:"mt-5 pt-5 border-t border-gray-800",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between gap-2 flex-wrap mb-3",children:[(0,Lg.jsxs)("div",{className:"text-sm font-semibold text-white flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-project-diagram text-crypto-accent"})," Funding network"]}),(0,Lg.jsx)(ft,{to:Jv(d.networkInfo.address,l),className:"text-sm text-crypto-accent hover:text-white transition-colors",children:"View full network \u2192"})]}),(0,Lg.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-x-4 gap-y-3",children:[d.networkInfo.name&&(0,Lg.jsxs)("div",{className:"col-span-2 sm:col-span-1",children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Network"}),(0,Lg.jsxs)(ft,{to:Jv(d.networkInfo.address,l),className:"text-sm font-medium text-crypto-accent hover:text-crypto-accent/80 flex items-center gap-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-key text-xs"}),d.networkInfo.name]})]}),d.networkInfo.totalSize&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Size"}),(0,Lg.jsxs)("div",{className:"text-white text-sm font-semibold",children:[k(d.networkInfo.totalSize)," wallets"]})]}),d.networkInfo.exchange&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Exchange"}),(0,Lg.jsx)("div",{className:"text-white text-sm font-semibold",children:d.networkInfo.exchange})]}),d.networkInfo.createdAt&&(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Created"}),(0,Lg.jsx)("div",{className:"text-white text-sm font-semibold",children:new Date(d.networkInfo.createdAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})})]})]})]}):A?(0,Lg.jsxs)("div",{className:"mt-5 pt-5 border-t border-gray-800",children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wide text-gray-500 mb-1",children:"Top funding network"}),(0,Lg.jsxs)(ft,{to:Jv(d.topFundingNetwork,l),className:"text-sm text-crypto-accent hover:text-crypto-accent/80 flex items-center gap-1.5",children:[d.topFundingNetworkName&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("i",{className:"fas fa-key text-xs"}),d.topFundingNetworkName]}),(0,Lg.jsxs)("span",{className:"font-mono",children:[d.topFundingNetwork.slice(0,4),"...",d.topFundingNetwork.slice(-4)]}),(0,Lg.jsx)("span",{children:"\u2192"})]})]}):null]})]}),y.total>0&&(0,Lg.jsxs)("section",{children:[(0,Lg.jsxs)("h2",{className:"text-lg font-bold mb-3 flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-sitemap text-crypto-accent"})," Directly Funded Wallets",(0,Lg.jsxs)("span",{className:"text-sm font-normal text-gray-500",children:["(",k(y.total),")"]})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl border border-gray-700 overflow-hidden",children:[(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full min-w-[620px]",children:[(0,Lg.jsx)("thead",{children:(0,Lg.jsxs)("tr",{className:"border-b border-gray-700 text-left text-xs uppercase tracking-wide text-gray-500",children:[(0,Lg.jsx)("th",{className:"px-4 py-3 font-medium",children:"Address"}),(0,Lg.jsx)("th",{className:"px-4 py-3 font-medium",children:"Funding Tx"}),(0,Lg.jsx)("th",{className:"px-4 py-3 font-medium",children:"Created"}),(0,Lg.jsx)("th",{className:"px-4 py-3 font-medium",children:"Label"}),(0,Lg.jsx)("th",{className:"px-4 py-3 font-medium",children:"Funding Exchange"})]})}),(0,Lg.jsx)("tbody",{children:y.wallets.map(e=>(0,Lg.jsxs)("tr",{className:"border-b border-gray-700/50 hover:bg-gray-800/30 transition-colors",children:[(0,Lg.jsx)("td",{className:"px-4 py-3",children:(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsxs)(ft,{to:Gv(e.address,l),className:"font-mono text-crypto-accent hover:text-crypto-accent/80 transition-colors text-sm",children:[e.address.slice(0,6),"...",e.address.slice(-6)]}),(0,Lg.jsx)("button",{onClick:()=>_(e.address),className:"text-gray-400 hover:text-white transition-colors text-xs",title:"Copy address",children:(0,Lg.jsx)("i",{className:"fas fa-copy"})})]})}),(0,Lg.jsx)("td",{className:"px-4 py-3 text-sm",children:e.oldestTxSignature?(0,Lg.jsxs)("a",{href:Zv("tx",e.oldestTxSignature,l),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[e.oldestTxSignature.slice(0,4),"...",e.oldestTxSignature.slice(-4)]}):(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"})}),(0,Lg.jsx)("td",{className:"px-4 py-3 text-sm text-gray-400 whitespace-nowrap",children:e.createdAt?w(e.createdAt):"\u2014"}),(0,Lg.jsx)("td",{className:"px-4 py-3 text-sm",children:e.label?(0,Lg.jsx)("span",{className:"text-gray-300",children:e.label}):(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"})}),(0,Lg.jsx)("td",{className:"px-4 py-3 text-sm",children:e.exchange?(0,Lg.jsx)("span",{className:"text-yellow-400",children:e.exchange}):(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"})})]},e.address))})]})}),y.totalPages>1&&(0,Lg.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-gray-700",children:[(0,Lg.jsxs)("span",{className:"text-sm text-gray-400",children:["Page ",y.page," of ",y.totalPages]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("button",{onClick:()=>c&&v(c,y.page-1),disabled:y.page<=1||y.loading,className:"px-3 py-1 text-sm rounded bg-gray-700 hover:bg-gray-600 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"\u2190 Prev"}),(0,Lg.jsx)("button",{onClick:()=>c&&v(c,y.page+1),disabled:y.page>=y.totalPages||y.loading,className:"px-3 py-1 text-sm rounded bg-gray-700 hover:bg-gray-600 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Next \u2192"})]})]})]})]}),d.lastResearchedAt&&(0,Lg.jsxs)("p",{className:"text-xs text-gray-600",children:["Last researched ",w(d.lastResearchedAt),"."]})]}),(0,Lg.jsx)(_y,{})]});var M},tw=e=>{switch(e){case"creator":return"text-crypto-accent border-crypto-accent/40 bg-crypto-accent/10";case"owner":return"text-blue-400 border-blue-500/40 bg-blue-500/10";case"recipient":return"text-amber-400 border-amber-500/40 bg-amber-500/10";case"promoter":return"text-pink-400 border-pink-500/40 bg-pink-500/10";case"admin":return"text-teal-400 border-teal-500/40 bg-teal-500/10";case"insider":return"text-orange-400 border-orange-500/40 bg-orange-500/10";default:return"text-gray-400 border-gray-600 bg-gray-500/10"}},nw={DANGEROUS:"bg-red-500/20 text-red-400 border-red-500/30",RISKY:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",OK:"bg-green-500/20 text-green-400 border-green-500/30",SAFE:"bg-green-500/20 text-green-400 border-green-500/30"},rw=e=>{let{handle:t,displayName:n}=e;const[i,s]=(0,r.useState)(!1);return t&&!i?(0,Lg.jsx)("img",{src:"https://unavatar.io/twitter/".concat(encodeURIComponent(t),"?fallback=false"),alt:n,onError:()=>s(!0),className:"w-16 h-16 rounded-full object-cover border-2 border-crypto-green/40 flex-shrink-0 bg-crypto-dark"}):(0,Lg.jsx)("div",{className:"w-16 h-16 rounded-full bg-crypto-green/15 border-2 border-crypto-green/30 flex items-center justify-center flex-shrink-0",children:(0,Lg.jsx)("span",{className:"text-2xl font-bold text-crypto-green",children:(n||"?").charAt(0).toUpperCase()})})},iw=()=>{var e,t,n,i,s,a;const{key:o}=pe(),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(!0),[h,p]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{d(!0),p(null);try{const t=await Ng("".concat(Eg(),"/api/figures/").concat(o));if(404===t.status)return void(e||(p("notfound"),d(!1)));if(!t.ok)throw new Error("HTTP ".concat(t.status));const n=await t.json();e||c(n)}catch(d$){e||p(d$ instanceof Error?d$.message:"Failed to load figure")}finally{e||d(!1)}})(),()=>{e=!0}}
2,[o]),(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(Ib,{title:l?"".concat(l.displayName," \u2014 deepnets"):"Figure \u2014 deepnets",description:(null===l||void 0===l?void 0:l.summary)||(null===l||void 0===l?void 0:l.reputationSummary)||"Known-figure profile on deepnets.ai",image:"".concat(window.location.origin,"/logo192.png"),url:"".concat(window.location.origin,"/figures/").concat(o),type:"article"}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-4 sm:px-6 py-8 w-full",children:[u&&(0,Lg.jsx)("div",{className:"text-gray-400 py-16 text-center",children:"Loading figure\u2026"}),"notfound"===h&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("div",{className:"text-5xl mb-4",children:"\ud83d\udd75\ufe0f"}),(0,Lg.jsx)("h1",{className:"text-2xl font-bold mb-2",children:"Figure not found"}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["No researched figure matches ",(0,Lg.jsx)("span",{className:"font-mono",children:o}),"."]}),(0,Lg.jsx)(ft,{to:"/",className:"text-crypto-accent hover:underline mt-4 inline-block",children:"\u2190 Back home"})]}),h&&"notfound"!==h&&(0,Lg.jsxs)("div",{className:"text-crypto-red py-16 text-center",children:["Failed to load: ",h]}),l&&!u&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)(ft,{to:"/figures",className:"text-sm text-gray-400 hover:text-white inline-flex items-center gap-1.5 mb-4",children:[(0,Lg.jsx)("i",{className:"fas fa-arrow-left text-xs"})," All figures"]}),(0,Lg.jsxs)("div",{className:"flex items-start gap-4 mb-6",children:[(0,Lg.jsx)(rw,{handle:l.xHandle,displayName:l.displayName}),(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:(0,Lg.jsx)("h1",{className:"text-3xl font-bold",children:l.displayName})}),l.xHandle&&(0,Lg.jsxs)("a",{href:"https://x.com/".concat(l.xHandle),target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:underline text-sm mt-1 inline-flex items-center gap-1",children:[(0,Lg.jsx)("i",{className:"fab fa-x-twitter text-xs"}),"@",l.xHandle]}),l.aliases&&l.aliases.length>0&&(0,Lg.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,Lg.jsx)("span",{children:"also:"}),l.aliases.map(e=>{const t="dead"===e.status||"suspended"===e.status,n=(0,Lg.jsxs)(Lg.Fragment,{children:["@",e.handle,e.status&&"active"!==e.status?(0,Lg.jsxs)("span",{className:"text-gray-600",children:[" \xb7 ",e.status]}):null]});return t?(0,Lg.jsx)("span",{className:"text-gray-500 line-through decoration-gray-700",children:n},e.handle):(0,Lg.jsx)("a",{href:"https://x.com/".concat(e.handle),target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-crypto-accent hover:underline",children:n},e.handle)})]})]})]}),(l.summary||l.reputationSummary)&&(0,Lg.jsxs)("section",{className:"bg-crypto-card border border-gray-800 rounded-xl p-4 mb-4",children:[(0,Lg.jsx)("h2",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-2",children:"About"}),(0,Lg.jsx)("p",{className:"text-gray-200 text-sm leading-relaxed whitespace-pre-line",children:l.summary||l.reputationSummary})]}),(null===(e=l.notableControversies)||void 0===e?void 0:e.length)>0&&(0,Lg.jsxs)("section",{className:"bg-crypto-card border border-gray-800 rounded-xl p-4 mb-4",children:[(0,Lg.jsx)("h2",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-2",children:"Notable controversies"}),(0,Lg.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-300 space-y-1",children:l.notableControversies.map((e,t)=>(0,Lg.jsx)("li",{children:e},t))})]}),l.associatedTokens&&l.associatedTokens.length>0&&(()=>{const e=e=>e.relationships.every(e=>"owner"===e.relationship),t=[...l.associatedTokens].sort((t,n)=>{var r,i;const s=null!==(r=t.createdAt)&&void 0!==r?r:null,a=null!==(i=n.createdAt)&&void 0!==i?i:null;return null!=s&&null!=a?a-s:null!=s!==(null!=a)?null!=s?-1:1:Number(!!t.isCopycat)-Number(!!n.isCopycat)||Number(e(t))-Number(e(n))}),n=t.slice(0,40);return(0,Lg.jsxs)("section",{className:"bg-crypto-card border border-gray-800 rounded-xl p-4 mb-4",children:[(0,Lg.jsxs)("h2",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-3",children:["Associated tokens (",l.associatedTokensCapped?"100+":l.associatedTokens.length,")"]}),(0,Lg.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>{var t;return(0,Lg.jsxs)(ft,{to:"/token/".concat(e.mint),title:e.isCopycat&&e.copycatOf?"Copycat of ".concat(e.copycatOf):void 0,className:"flex items-center gap-1.5 bg-crypto-dark border rounded-full pl-2 pr-2.5 py-1 transition ".concat(e.isCopycat?"border-red-500/40 opacity-70 hover:opacity-100":"border-gray-700 hover:border-crypto-accent/60"),children:[(0,Lg.jsx)("div",{className:"w-5 h-5 rounded-full bg-gray-700 flex items-center justify-center text-[10px] text-gray-300 flex-shrink-0",children:(e.symbol||"?").charAt(0)}),(0,Lg.jsxs)("span",{className:"text-sm font-semibold text-white",children:["$",e.symbol||e.mint.slice(0,4)]}
2),e.isCopycat&&(0,Lg.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded border bg-red-500/20 text-red-400 border-red-500/40",children:"copycat"}),e.relationships.map(e=>(0,Lg.jsx)("span",{className:"text-[10px] capitalize px-1.5 py-0.5 rounded border ".concat(tw(e.relationship)),children:e.relationship},e.relationship)),e.safetyLevel&&(0,Lg.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded border ".concat(null!==(t=nw[e.safetyLevel])&&void 0!==t?t:"bg-gray-500/20 text-gray-400 border-gray-500/30"),children:e.safetyLevel})]},e.mint)})}),l.associatedTokens.length>n.length&&(0,Lg.jsxs)("p",{className:"text-[11px] text-gray-500 mt-2",children:["+",l.associatedTokens.length-n.length," more"]})]})})(),((null===(t=l.walletLinks)||void 0===t?void 0:t.length)||(null===(n=l.wallets)||void 0===n?void 0:n.length))>0&&(0,Lg.jsxs)("section",{className:"bg-crypto-card border border-gray-800 rounded-xl p-4 mb-4",children:[(0,Lg.jsxs)("h2",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-1",children:["Linked wallets (",null!==(i=null===(s=l.walletLinks)||void 0===s?void 0:s.length)&&void 0!==i?i:l.wallets.length,")"]}),l.walletCountByConfidence&&l.walletCountByConfidence.probable+l.walletCountByConfidence.claimed>0&&(0,Lg.jsxs)("p",{className:"text-[11px] text-gray-500 mb-3",children:[l.walletCountByConfidence.confirmed," confirmed \xb7 ",l.walletCountByConfidence.probable," probable \xb7 ",l.walletCountByConfidence.claimed," claimed"]}),(0,Lg.jsx)("div",{className:"space-y-2",children:null!==(a=l.walletLinks)&&void 0!==a&&a.length?l.walletLinks.map(e=>{const t=Zb(e.evidence);return(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,Lg.jsx)(ft,{to:"/wallet/".concat(e.address),className:"font-mono text-sm text-crypto-accent hover:underline break-all",children:e.address}),(0,Lg.jsx)("span",{className:"text-[10px] px-1.5 py-px rounded border ".concat(Yb(e.confidence)),title:Qb(e.evidence),children:e.confidence}),t&&(0,Lg.jsxs)("span",{className:"text-[10px] text-gray-500",children:["via ",t]})]},e.address)}):l.wallets.map(e=>(0,Lg.jsx)(ft,{to:"/wallet/".concat(e),className:"block font-mono text-sm text-crypto-accent hover:underline break-all",children:e},e))})]}),l.agentNotes&&l.agentNotes.length>0&&(0,Lg.jsxs)("section",{className:"bg-crypto-card border border-gray-800 rounded-xl p-4 mb-4",children:[(0,Lg.jsxs)("h2",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-3",children:["Notes (",l.agentNotes.length,")"]}),(0,Lg.jsx)("ul",{className:"space-y-2.5",children:l.agentNotes.map((e,t)=>(0,Lg.jsxs)("li",{className:"border-l-2 border-gray-700 pl-3",children:[(0,Lg.jsx)("p",{className:"text-sm text-gray-300 leading-relaxed",children:e.note}),e.at&&(0,Lg.jsx)("p",{className:"text-[11px] text-gray-600 mt-0.5",children:new Date(e.at).toLocaleDateString()})]},t))})]}),l.researchedAt&&(0,Lg.jsxs)("p",{className:"text-xs text-gray-600 mt-2",children:["Researched ",new Date(l.researchedAt).toLocaleDateString(),". Assessments are algorithmic and may be revised."]})]})]}),(0,Lg.jsx)(_y,{})]})},sw=e=>{let{handle:t,name:n}=e;const[i,s]=(0,r.useState)(!1);return t&&!i?(0,Lg.jsx)("img",{src:"https://unavatar.io/twitter/".concat(encodeURIComponent(t),"?fallback=false"),alt:n,onError:()=>s(!0),className:"w-11 h-11 rounded-full object-cover border border-gray-700 flex-shrink-0 bg-crypto-dark"}):(0,Lg.jsx)("div",{className:"w-11 h-11 rounded-full bg-crypto-accent/15 border border-crypto-accent/30 flex items-center justify-center flex-shrink-0",children:(0,Lg.jsx)("span",{className:"text-lg font-bold text-crypto-accent",children:(n||"?").charAt(0).toUpperCase()})})},aw=()=>{const[e,t]=(0,r.useState)([]),[n,i]=(0,r.useState)(!0),[s,a]=(0,r.useState)(null),[o,l]=(0,r.useState)("");(0,r.useEffect)(()=>{let e=!1;return(async()=>{i(!0),a(null);try{const n=await Ng("".concat(Eg(),"/api/figures"));if(!n.ok)throw new Error("HTTP ".concat(n.status));const r=await n.json();e||t(r.figures||[])}catch(d$){e||a(d$ instanceof Error?d$.message:"Failed to load figures")}finally{e||i(!1)}})(),()=>{e=!0}},[]);const c=(0,r.useMemo)(()=>{const t=o.trim().toLowerCase();return t?e.filter(e=>(e.displayName||"").toLowerCase().includes(t)||(e.xHandle||"").toLowerCase().includes(t)||(e.figureKey||"").toLowerCase().includes(t)||(e.aliases||[]).some(e=>(e.handle||"").toLowerCase().includes(t))):e},[e,o]);return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(Ib,{title:"Known Figures \u2014 deepnets",description:"Public-figure profiles behind Solana wallets and tokens: developers, influencers, and personalities identified by deepnets research.",image:"".concat(window.location.origin,"/logo192.png"),url:"".concat(window.location.origin,"/figures"),type:"website"}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-5xl mx-auto px-4 sm:px-6 py-8 w-full",children:[(0,Lg.jsxs)("div",{className:"mb-6",children:[(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-1",children:"Known Figures"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Public personas identified behind Solana wallets \u2014 developers, influencers, and personalities. Assessments are algorithmic and may be revised."})]}),(0,Lg.jsxs)("div",{className:"relative mb-6",children:[(0,Lg.jsx)("i",{className:"fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 text-sm"}),(0,Lg.jsx)("input",{type:"text",value:o,onChange:e=>l(e.target.value),placeholder:"Search by name or @handle\u2026",className:"w-full bg-crypto-gray border border-gray-700 rounded-lg pl-9 pr-3 py-2.5 text-sm text-white placeholder-gray-500 focus:outline-none focus:border-crypto-accent"})]}),n&&(0,Lg.jsx)("div",{className:"text-gray-400 py-16 text-center",children:"Loading figures\u2026"}),s&&(0,Lg.jsxs)("div",{className:"text-crypto-red py-16 text-center",children:["Failed to load: ",s]}),!n&&!s&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"text-xs text-gray-500 mb-3",children:[c.length," ",1===c.length?"figure":"figures",o&&" matching \u201c".concat(o,"\u201d")]}),(0,Lg.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:c.map(e=>(0,Lg.jsxs)(ft,{to:"/figures/".concat(e.figureKey),className:"bg-crypto-card border border-gray-800 rounded-xl p-4 hover:border-crypto-accent/60 transition flex flex-col",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,Lg.jsx)(sw,{handle:e.xHandle,name:e.displayName}),(0,Lg.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,Lg.jsx)("div",{className:"flex items-center gap-1.5",children:(0,Lg.jsx)("span",{className:"font-semibold truncate",children:e.displayName})}),e.xHandle&&(0,Lg.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:["@",e.xHandle]})]})]}),e.reputationSummary&&(0,Lg.jsx)("p",{className:"text-xs text-gray-400 leading-relaxed line-clamp-2 mb-3 flex-1",children:e.reputationSummary}),(0,Lg.jsx)("div",{className:"flex items-center gap-2 flex-wrap mt-auto",children:e.walletCount>0&&(0,Lg.jsxs)("span",{className:"text-[10px] text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-wallet mr-1"}),e.walletCount," ",1===e.walletCount?"wallet":"wallets"]})}),e.associatedTokens&&e.associatedTokens.length>0&&(0,Lg.jsxs)("div",{className:"flex items-center gap-1 flex-wrap mt-2",children:[e.associatedTokens.slice(0,4).map(e=>(0,Lg.jsxs)("span",{className:"text-[10px] text-gray-300 bg-crypto-dark border border-gray-700 rounded px-1.5 py-0.5",title:"".concat(e.relationship
2).concat("curated"===e.via?" \xb7 curated":""),children:["$",e.symbol||e.mint.slice(0,4)]},e.mint+e.relationship)),e.associatedTokens.length>4&&(0,Lg.jsxs)("span",{className:"text-[10px] text-gray-500",children:["+",e.associatedTokens.length-4]})]})]},e.figureKey))}),0===c.length&&(0,Lg.jsxs)("div",{className:"text-gray-500 py-16 text-center",children:["No figures match \u201c",o,"\u201d."]})]})]}),(0,Lg.jsx)(_y,{})]})},ow=()=>{const[e]=vt(),{refreshUser:t}=Bg(),n=e.get("session_id"),[i,s]=(0,r.useState)(n?"checking":"error"),[a,o]=(0,r.useState)(null),l=(0,r.useCallback)(async()=>{if(n){for(let i=0;i<15;i++){try{const r=await Ng("".concat(Eg(),"/api/stripe/session-status?session_id=").concat(encodeURIComponent(n))),i=await r.json().catch(()=>({}));var e;if(r.ok&&"complete"===i.status)return o(null!==(e=i.type)&&void 0!==e?e:null),s("success"),void(null===t||void 0===t||t());if(r.ok&&"expired"===i.status)return void s("incomplete")}catch(r){}await new Promise(e=>setTimeout(e,1500))}s("incomplete")}},[n,t]);(0,r.useEffect)(()=>
2{l()},[l]);const c="subscription"===a;return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 flex items-center justify-center px-4",children:(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-2xl p-8 max-w-sm w-full text-center",children:["checking"===i&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full mx-auto mb-4"}),(0,Lg.jsx)("h1",{className:"text-lg font-semibold",children:"Confirming your payment\u2026"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mt-2",children:"This only takes a moment."})]}),"success"===i&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-3",children:"\u2705"}),(0,Lg.jsx)("h1",{className:"text-xl font-bold mb-1",children:"Payment complete"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:c?"Your subscription is active \u2014 enjoy full access.":"Your credits have been added to your account."}),(0,Lg.jsx)(ft,{to:c?"/profile":"/profile/credits",className:"inline-block bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-medium px-6 py-2.5 rounded-lg transition-colors",children:c?"Go to your account":"View your credits"})]}),"incomplete"===i&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-3",children:"\ud83d\udd53"}),(0,Lg.jsx)("h1",{className:"text-xl font-bold mb-1",children:"Payment not completed"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:"No charge was made. You can try again anytime."}),(0,Lg.jsx)(ft,{to:"/profile/credits",className:"inline-block bg-gray-700 hover:bg-gray-600 text-white font-medium px-6 py-2.5 rounded-lg transition-colors",children:"Back to credits"})]}),"error"===i&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-3",children:"\u26a0\ufe0f"}),(0,Lg.jsx)("h1",{className:"text-xl font-bold mb-1",children:"Something went wrong"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:"We couldn't read this checkout session."}),(0,Lg.jsx)(ft,{to:"/profile/credits",className:"inline-block bg-gray-700 hover:bg-gray-600 text-white font-medium px-6 py-2.5 rounded-lg transition-colors",children:"Back to credits"})]})]})}),(0,Lg.jsx)(_y,{})]})},lw=()=>{const e=ce(),t=(0,r.useRef)(null),n=(0,r.useRef)(!1),i=(0,r.useCallback)(async()=>{try{const e=await fetch("/version.json?t=".concat(Date.now()),{cache:"no-store"});if(!e.ok)return null;const t=await e.json();return"string"===typeof(null===t||void 0===t?void 0:t.version)?t.version:null}catch(e){return null}},[]),s=(0,r.useCallback)(async()=>{const e=await i();return!!e&&(null===t.current?(t.current=e,!1):e!==t.current&&(n.current=!0,!0))},[i]);return(0,r.useEffect)(()=>{s();const e=setInterval(s,3e5),t=()=>{s().then(e=>{(e||n.current)&&window.location.reload()})},r=()=>{"visible"===document.visibilityState&&t()};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",r),()=>{clearInterval(e),window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",r)}},[s]),(0,r.useEffect)(()=>{n.current&&window.location.reload()},[e.pathname]),null},cw=[{to:"/profile",label:"Account",icon:"fa-user",end:!0},{to:"/profile/credits",label:"Credits",icon:"fa-coins",end:!1},{to:"/api-keys",label:"API Keys",icon:"fa-key",end:!1},{to:"/profile/security",label:"Security",icon:"fa-shield-halved",end:!1}],uw=()=>(0,Lg.jsx)("nav",{className:"mb-6 flex flex-wrap gap-1 border-b border-gray-800",children:cw.map(e=>{let{to:t,label:n,icon:r,end:i}=e;return(0,Lg.jsxs)(mt,{to:t,end:i,className:e=>{let{isActive:t}=e;return"flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px ".concat(t?"text-white border-crypto-accent":"text-gray-400 border-transparent hover:text-white hover:border-gray-700")},children:[(0,Lg.jsx)("i",{className:"fas ".concat(r," text-xs")}),n]},t)})}),dw=Eg(),hw=()=>{const{user:e,isAuthenticated:t,refreshUser:n,openLogin:i}=Bg();(0,r.useEffect)(()=>{t&&n()},[t]);const[s,a]=(0,r.useState)([]),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!1),[h,p]=(0,r.useState)(""),[f,m]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null),[x,v]=(0,r.useState)(!1),[b,w]=(0,r.useState)(null),_=()=>{const e=localStorage.getItem("deepnets_token");return e?{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}:{"Content-Type":"application/json"}},j=(0,r.useCallback)(async()=>
2{if(t){c(!0);try{const e=await Ng("".concat(dw,"/api/api-keys"),{headers:_()});if(e.ok){const t=await e.json();a(t)}}catch(e){console.error("Error fetching API keys:",e)}finally{c(!1)}}},[t]);(0,r.useEffect)(()=>{t&&j()},[t,j]);const k=async()=>{if(t&&h.trim()){d(!0);try{const e=await Ng("".concat(dw,"/api/api-keys"),{method:"POST",headers:_(),body:JSON.stringify({name:h.trim()})});if(e.ok){const t=await e.json();y(t.key),p(""),m(!1),j()}else{const t=await e.json();alert(t.error||"Failed to create API key")}}catch(e){console.error("Error creating API key:",e),alert("Failed to create API key")}finally{d(!1)}}},N=e=>{const t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return"just now";const n=Math.floor(t/60);if(n<60)return"".concat(n,"m ago");const r=Math.floor(n/60);if(r<24)return"".concat(r,"h ago");const i=Math.floor(r/24);return"".concat(i,"d ago")};if(!t)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12",children:(0,Lg.jsxs)("div",{className:"text-center",children:[(0,Lg.jsx)("svg",{className:"w-16 h-16 text-gray-600 mx-auto mb-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-3",children:"API Keys"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-8 max-w-md mx-auto",children:"Connect your wallet to create API keys for programmatic access to deepnets.ai research."}),(0,Lg.jsx)("button",{onClick:()=>i("api_keys_gate"),className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-3 rounded-lg font-medium transition-all",children:"Connect Wallet"}),(0,Lg.jsx)(ft,{to:"/",className:"block mt-4 text-gray-500 hover:text-white transition-colors text-sm",children:"\u2190 Back to home"})]})}),(0,Lg.jsx)(_y,{})]});const S=s.length<2,E=async()=>{try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(dw,"/api/stripe/create-checkout-session"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{}),body:JSON.stringify({tier:"deep_diver"})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to create checkout session")}const n=await t.json();window.location.href=n.url}catch(e){console.error("Subscription error:",e),alert(e instanceof Error?e.message:"Failed to start subscription")}};if(!Yg(null===e||void 0===e?void 0:e.tier)){const t=(null===e||void 0===e?void 0:e.dnetBalance)||0,n=Math.max(0,Ug.deep_diver-t);return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-4 sm:px-6 py-8 w-full",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold text-white mb-6",children:"Account"}),(0,Lg.jsx)(uw,{}),(0,Lg.jsxs)("div",{className:"text-center max-w-2xl mx-auto py-8",children:[(0,Lg.jsx)("div",{className:"text-5xl mb-4",children:"\ud83d\udd31"}),(0,Lg.jsx)("h2",{className:"text-2xl font-bold mb-3",children:"Deep Diver Required"}),(0,Lg.jsxs)("p",{className:"text-gray-400 mb-6",children:["API key access requires the Deep Diver tier. Hold ",Vg(Ug.deep_diver)," $DNET or subscribe ($",zg.deep_diver,"/mo) to unlock full programmatic access to deepnets.ai research."]}),t>0&&(0,Lg.jsxs)("p",{className:"text-gray-500 text-sm mb-4",children:["Your balance: ",Vg(t)," $DNET \u2014 need ",Vg(n)," more"]}),(0,Lg.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,Lg.jsx)("a",{href:qg,target:"_blank",rel:"noopener noreferrer",onClick:()=>Og("buy_dnet_clicked",{source:"api_keys_gate"}),className:"bg-purple-600 hover:bg-purple-500 text-white px-6 py-3 rounded-lg font-medium transition-colors",children:"Buy $DNET \u2192"}),(0,Lg.jsxs)("button",{onClick:E,className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-3 rounded-lg font-medium transition-colors",children:["Subscribe $",zg.deep_diver,"/mo"]})]}),(0,Lg.jsx)(ft,{to:"/tiers",className:"block mt-4 text-gray-500 hover:text-white transition-colors text-sm",children:"View all tiers \u2192"})]})]}),(0,Lg.jsx)(_y,{})]})}return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-4 sm:px-6 py-8 w-full",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold text-white mb-6",children:"Account"}),(0,Lg.jsx)(uw,{}),0===s.length&&(0,Lg.jsx)("div",{className:"mb-6 rounded-lg border border-yellow-500/40 bg-yellow-500/10 p-4",children:(0,Lg.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Lg.jsx)("span",{className:"text-yellow-300 mt-0.5",children:"\ud83d\udee1\ufe0f"}),(0,Lg.jsxs)("div",{className:"text-sm",children:[(0,Lg.jsx)("div",{className:"font-semibold text-yellow-200 mb-1",children:"API keys were reset for security"}),(0,Lg.jsxs)("p",{className:"text-gray-300",children:["On July 7, 2026 we resolved an infrastru
2cture issue that could have exposed API keys and, as a precaution, ",(0,Lg.jsx)("strong",{className:"text-white",children:"revoked all existing keys"}),". If you had a key it has stopped working \u2014 please generate a new one below and update your integrations. Sorry for the disruption."]})]})]})}),(0,Lg.jsxs)("div",{className:"flex items-start justify-between mb-6 gap-4",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white",children:"API Keys"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mt-1",children:["Access deepnets.ai programmatically at ",(0,Lg.jsx)("span",{className:"font-mono text-gray-300",children:"api.deepnets.ai"}),". Fresh token research costs 1 credit."," ",(0,Lg.jsx)(ft,{to:"/api-docs",className:"text-crypto-accent hover:text-white transition-colors",children:"View API docs \u2192"})]}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs mt-1",children:[s.length," / ",2," keys used",void 0!==(null===e||void 0===e?void 0:e.credits)&&(0,Lg.jsxs)("span",{className:"ml-3",children:["\xb7 ",e.credits," credits remaining"]})]})]}),S&&!f&&(0,Lg.jsx)("button",{onClick:()=>m(!0),className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-5 py-2.5 rounded-lg font-medium transition-all whitespace-nowrap",children:"+ New Key"})]}),g&&(0,Lg.jsx)("div",{className:"mb-6 bg-green-500/10 border border-green-500/30 rounded-lg p-5",children:(0,Lg.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Lg.jsxs)("div",{className:"flex-1",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Lg.jsx)("svg",{className:"w-5 h-5 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,Lg.jsx)("h3",{className:"font-semibold text-green-400",children:"API Key Created"})]}),(0,Lg.jsx)("p",{className:"text-gray-300 text-sm mb-3",children:"Copy your key now \u2014 you won't be able to see it again."}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("code",{"data-mask":!0,className:"bg-crypto-dark px-4 py-2 rounded-lg text-sm font-mono text-white break-all flex-1 select-all",children:g}),(0,Lg.jsx)("button",{onClick:()=>(async e=>{try{await navigator.clipboard.writeText(e),v(!0),setTimeout(()=>v(!1),2e3)}catch(t){const n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),v(!0),setTimeout(()=>v(!1),2e3)}})(g),className:"bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-lg transition-colors whitespace-nowrap",children:x?"\u2713 Copied":"Copy"})]})]}),(0,Lg.jsx)("button",{onClick:()=>y(null),className:"text-gray-500 hover:text-white ml-4",children:(0,Lg.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),f&&(0,Lg.jsxs)("div",{className:"mb-6 bg-crypto-gray/50 border border-gray-700 rounded-lg p-5",children:[(0,Lg.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Create New API Key"}),(0,Lg.jsxs)("div",{className:"flex gap-3",children:[(0,Lg.jsx)("input",{type:"text",value:h,onChange:e=>p(e.target.value),placeholder:"Key name (e.g. 'My Trading Bot')",className:"flex-1 bg-crypto-dark border border-gray-600 rounded-lg px-4 py-2.5 text-white placeholder-gray-500 focus:outline-none focus:border-crypto-accent transition-colors",onKeyDown:e=>"Enter"===e.key&&k(),autoFocus:!0,maxLength:50}),(0,Lg.jsx)("button",{onClick:k,disabled:u||!h.trim(),className:"bg-crypto-accent hover:bg-crypto-accent/80 disabled:opacity-50 disabled:cursor-not-allowed text-crypto-dark px-5 py-2.5 rounded-lg font-medium transition-all",children:u?"Creating...":"Create"}),(0,Lg.jsx)("button",{onClick:()=>{m(!1),p("")},className:"text-gray-400 hover:text-white px-3 transition-colors",children:"Cancel"})]})]}),l?(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-crypto-accent"}),(0,Lg.jsx)("p",{className:"mt-4 text-gray-400",children:"Loading API keys..."})]}):0===s.length?(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("svg",{className:"w-16 h-16 text-gray-700 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"No API Keys"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-6 max-w-sm mx-auto",children:"Create an API key to start querying token safety data programmatically."}),(0,Lg.jsx)("button",{onClick:()=>m(!0),className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-6 py-3 rounded-lg font-medium transition-all",children:"Create Your First Key"})]}):(0,Lg.jsx)("div",{className:"space-y-3",children:s.map(e=>{return(0,Lg.jsx)("div",{className:"bg-crypto-gray/50 border border-gray-700 rounded-lg p-5 hover:border-gray-600 transition-colors",children:(0,Lg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Lg.jsx)("h3",{className:"font-semibold text-lg truncate",children:e.name}),(0,Lg.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-500/10 text-green-400 border border-green-500/20",children:"Active"})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-4 mt-2 text-sm text-gray-400",children:[(0,Lg.jsx)("code",{className:"bg-crypto-dark px-2 py-0.5 rounded font-mono text-gray-300",children:e.key}),(0,Lg.jsxs)("span",{children:["Created ",(t=e.createdAt,new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}))]}),e.lastUsedAt&&(0,Lg.jsxs)("span",{children:["Last used ",N(e.lastUsedAt)]})]})]}),(0,Lg.jsx)("button",{onClick:()=>w({id:e._id,name:e.name}),className:"ml-4 text-gray-500 hover:text-red-400 transition-colors p-2",title:"Delete key",children:(0,Lg.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})},e._id);var t})}),(0,Lg.jsxs)("div",{className:"mt-12 bg-crypto-gray/30 border border-gray-700/50 rounded-lg p-6",children:[(0,Lg.jsx)("h3",{className:"font-semibold text-lg mb-3",children:"Qu
2ick Start"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-4",children:["Pass your API key in the ",(0,Lg.jsx)("code",{className:"text-gray-300 bg-crypto-dark px-1.5 py-0.5 rounded",children:"x-api-key"})," header. Existing token data is free. New research costs 1 credit."]}),(0,Lg.jsx)("div",{className:"bg-crypto-dark rounded-lg p-4 overflow-x-auto",children:(0,Lg.jsx)("pre",{className:"text-sm font-mono text-gray-300 whitespace-pre",children:'curl https://api.deepnets.ai/api/token-safety/YOUR_MINT_ADDRESS \\\n -H "x-api-key: YOUR_API_KEY"'})})]}),b&&(0,Lg.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>w(null)}),(0,Lg.jsx)("div",{className:"relative bg-crypto-gray border border-gray-700 rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",children:(0,Lg.jsxs)("div",{className:"text-center",children:[(0,Lg.jsx)("div",{className:"w-12 h-12 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,Lg.jsx)("svg",{className:"w-6 h-6 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}),(0,Lg.jsx)("h3",{className:"text-xl font-semibold text-white mb-2",children:"Delete API Key"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-1",children:"Are you sure you want to delete"}),(0,Lg.jsxs)("p",{className:"text-white font-medium mb-6",children:['"',b.name,'"?']}),(0,Lg.jsx)("p",{className:"text-gray-500 text-sm mb-6",children:"Any applications using this key will lose access immediately."}),(0,Lg.jsxs)("div",{className:"flex justify-center gap-3",children:[(0,Lg.jsx)("button",{onClick:()=>w(null),className:"bg-gray-700 hover:bg-gray-600 text-white px-5 py-2.5 rounded-lg font-medium transition-colors",children:"Cancel"}),(0,Lg.jsx)("button",{onClick:async()=>{if(b)try{(await Ng("".concat(dw,"/api/api-keys/").concat(b.id),{method:"DELETE",headers:_()})).ok?a(e=>e.filter(e=>e._id!==b.id)):alert("Failed to delete API key")}catch(e){console.error("Error deleting API key:",e),alert("Failed to delete API key")}finally{w(null)}},className:"bg-red-600 hover:bg-red-700 text-white px-5 py-2.5 rounded-lg font-medium transition-colors",children:"Delete Key"})]})]})})]})]}),(0,Lg.jsx)(_y,{})]})},pw="".concat(Eg(),"/api/agent-lab");function fw(){const e=localStorage.getItem("deepnets_token");return e?{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}:{"Content-Type":"application/json"}}async function mw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await Ng("".concat(pw).concat(e),(0,o.A)((0,o.A)({},t),{},{headers:(0,o.A)((0,o.A)({},fw()),t.headers||{})})),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((null===r||void 0===r?void 0:r.error)||"Request failed (".concat(n.status,")"));return r}const gw=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return null==e?"\u2014":"".concat((Math.round(e*10**t)/10**t).toString()," SOL")},yw=e=>null==e?"\u2014":e>=1e6?"$".concat((e/1e6).toFixed(2),"M"):e>=1e3?"$".concat((e/1e3).toFixed(1),"K"):"$".concat(e.toFixed(0)),xw=e=>e?new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):"",vw=e=>e?new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"",bw={trigger:"text-sky-300",filtered:"text-gray-500",budget_skipped:"text-gray-500",llm_start:"text-violet-300",tool_call:"text-gray-400",llm_message:"text-gray-300",decision:"text-white font-medium",order_placed:"text-amber-300",order_filled:"text-green-400",order_expired:"text-gray-500",order_cancelled:"text-gray-500",order_failed:"text-red-400",position_opened:"text-green-300",position_closed:"text-emerald-300",error:"text-red-400",info:"text-gray-400"},ww=e=>{let{children:t}=e;return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 max-w-6xl mx-auto px-4 sm:px-6 py-8 w-full",children:t}),(0,Lg.jsx)(_y,{})]})},_w=e=>
2{let{title:t,right:n,children:r,className:i=""}=e;return(0,Lg.jsxs)("section",{className:"bg-crypto-card border border-gray-700 rounded-xl p-5 ".concat(i),children:[(t||n)&&(0,Lg.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[t&&(0,Lg.jsx)("h2",{className:"text-sm uppercase tracking-wide text-gray-400",children:t}),n]}),r]})},jw=e=>{let{tone:t,children:n}=e;const r={green:"bg-green-500/10 text-green-300 border-green-500/40",amber:"bg-amber-500/10 text-amber-300 border-amber-500/40",red:"bg-red-500/10 text-red-300 border-red-500/40",gray:"bg-gray-500/10 text-gray-300 border-gray-600",violet:"bg-violet-500/10 text-violet-300 border-violet-500/40"}[t];return(0,Lg.jsx)("span",{className:"text-xs border rounded px-2 py-0.5 ".concat(r),children:n})},kw=e=>{let{children:t}=e;const{isAuthenticated:n,openLogin:i}=Bg(),[s,a]=(0,r.useState)("checking");return(0,r.useEffect)(()=>{n&&Ng("".concat(pw,"/status"),{headers:fw()}).then(e=>a(e.ok?"ok":403===e.status?"tier":"none")).catch(()=>a("none"))},[n]),n?"checking"===s?(0,Lg.jsx)(ww,{children:(0,Lg.jsx)("div",{className:"text-center py-20 text-gray-500",children:"Loading\u2026"})}):"tier"===s?(0,Lg.jsx)(ww,{children:(0,Lg.jsxs)("div",{className:"text-center py-20",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold mb-3",children:"Agent lab"}),(0,Lg.jsxs)("p",{className:"text-gray-400",children:["Trading agents require the Deep Diver tier. ",(0,Lg.jsx)(ft,{to:"/tiers",className:"text-crypto-accent",children:"View tiers"})]})]})}):"none"===s?(0,Lg.jsx)(ww,{children:(0,Lg.jsx)("div",{className:"text-center py-20 text-gray-500",children:"Not found."})}):(0,Lg.jsx)(Lg.Fragment,{children:t}):(0,Lg.jsx)(ww,{children:(0,Lg.jsxs)("div",{className:"text-center py-20",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"Agent lab"}),(0,Lg.jsx)("button",{onClick:()=>i("agent_lab"),className:"bg-crypto-accent text-crypto-dark px-6 py-3 rounded-lg font-medium",children:"Log in"})]})})},Nw=e=>{var t,n;let{status:i,reload:s}=e;const a=null===i||void 0===i?void 0:i.credentials,[o,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[p,f]=(0,r.useState)(!1),[m,g]=(0,r.useState)(null),y=async e=>{f(!0),g(null);try{await e(),s()}catch(d$){g(d$.message)}finally{f(!1)}},x="verified"===(null===a||void 0===a?void 0:a.status)?"green":"error"===(null===a||void 0===a?void 0:a.status)?"red":a?"amber":"gray",v=!a||"pending_api_key"===a.status||"revoked"===a.status||"error"===a.status||o;return(0,Lg.jsxs)(_w,{title:"GMGN wallet",right:(0,Lg.jsx)(jw,{tone:x,children:null!==(t=null===a||void 0===a||null===(n=a.status)||void 0===n?void 0:n.replace(/_/g," "))&&void 0!==t?t:"not connected"}),children:[(0,Lg.jsx)("p",{className:"text-sm text-gray-400 mb-4",children:"Live trades execute in your own GMGN hosted wallet. DeepNets never holds your wallet key or funds: it holds only a request-signing key that GMGN accepts from our server's IP, and withdrawals still need your GMGN 2FA. All agents trade on paper until you connect and switch one to live."}),"verified"===(null===a||void 0===a?void 0:a.status)&&(0,Lg.jsxs)("div",{className:"text-sm mb-3",children:["Wallet ",(0,Lg.jsx)("span",{className:"font-mono text-crypto-accent",children:a.walletSol})," \xb7 key ",a.apiKeyHint," \xb7 verified ",vw(a.verifiedAt)]}),(null===a||void 0===a?void 0:a.statusDetail)&&"verified"!==a.status&&(0,Lg.jsx)("div",{className:"text-sm text-amber-300 mb-3",children:a.statusDetail}),v&&(0,Lg.jsxs)("ol",{className:"space-y-3 text-sm list-decimal list-inside",children:[(0,Lg.jsxs)("li",{children:["Generate a signing key."," ",(0,Lg.jsx)("button",{disabled:p,onClick:()=>y(async()=>l(await mw("/credentials/init",{method:"POST"}))),className:"ml-2 bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded",children:o?"Regenerate":"Generate"})]}),o&&(0,Lg.jsxs)("li",{children:["Open ",(0,Lg.jsx)("a",{href:o.createApiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent underline",children:"GMGN API key creation"})," (the public key is pre-filled), whitelist IPv4 ",(0,Lg.jsx)("span",{className:"font-mono bg-gray-800 px-1 rounded",children:o.whitelistIpv4}),", and create the key."]}),(o||"pending_api_key"===(null===a||void 0===a?void 0:a.status)||"error"===(null===a||void 0===a?void 0:a.status))&&(0,Lg.jsxs)("li",{children:["Paste the API key and your GMGN Solana wallet address:",(0,Lg.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 mt-2",children:[(0,Lg.jsx)("input",{value:c,onChange:e=>u(e.target.value),placeholder:"GMGN API key",className:"flex-1 bg-crypto-dark border border-gray-600 rounded px-3 py-2 font-mono text-xs"}),(0,Lg.jsx)("input",{value:d,onChange:e=>h(e.target.value),placeholder:"GMGN Solana wallet address",className:"flex-1 bg-crypto-dark border border-gray-600 rounded px-3 py-2 font-mono text-xs"}),(0,Lg.jsx)("button",{disabled:p||!c||!d,onClick:()=>y(async()=>{await mw("/credentials/apply",{method:"POST",body:JSON.stringify({apiKey:c,walletSol:d})}),l(null)}),className:"bg-crypto-accent text-crypto-dark px-4 py-2 rounded font-medium disabled:opacity-40",children:"Connect"})]})]})]}),a&&"revoked"!==a.status&&(0,Lg.jsx)("button",{disabled:p,onClick:()=>{window.confirm("Revoke the signing key? All agents drop to paper mode. Also delete the key at gmgn.ai.")&&y(()=>mw("/credentials",{method:"DELETE"}))},className:"mt-4 text-xs text-red-400 hover:text-red-300",children:"Revoke key (kill switch)"}),m&&(0,Lg.jsx)("div",{className:"text-sm text-red-400 mt-3",children:m})]})},Sw=()=>{var e,t,n;const[i,s]=(0,r.useState)(null),[a,o]=(0,r.useState)([]),[l,c]=(0,r.useState)(null),u=he(),d=(0,r.useCallback)(async()=>{try{const[e,t]=await Promise.all([mw("/status"),mw("/agents")]);s(e),o(t),c(null)}catch(d$){c(d$.message)}},[]);return(0,r.useEffect)(()=>{d()},[d]),(0,Lg.jsx)(kw,{children:(0,Lg.jsxs)(ww,{children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold",children:"Agent lab"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Agents wake when a token joins the DeepNets watchlist, research it with Grok and DeepNets data, and trade on paper or through your GMGN wallet."})]}),(0,Lg.jsxs)("div",{className:"text-right text-xs text-gray-500",children:["Runner ",null!==i&&void 0!==i&&null!==(e=i.runner)&&void 0!==e&&e.online?(0,Lg.jsx)("span",{className:"text-green-400",children:"online"}):(0,Lg.jsx)("span",{className:"text-red-400",children:"offline"}),(null===i||void 0===i?void 0:i.runner)&&(0,Lg.jsxs)("div",{children:["Live trading ",i.runner.liveTradingEnabled?(0,Lg.jsx)("span",{className:"text-amber-300",children:"enabled"}):"disabled platform-wide"]})]})]}),l&&(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:l}),(0,Lg.jsxs)("div",{className:"grid gap-5",children:[(0,Lg.jsx)(Nw,{status:i,reload:d}),(0,Lg.jsx)(_w,{title:"Agents (".concat(a.length,"/").concat(null!==(t=null===i||void 0===i||null===(n=i.limits)||void 0===n?void 0:n.maxAgentsPerUser)&&void 0!==t?t:5,")"),right:(0,Lg.jsx)("button",{onClick:async()=>{try{const e=await mw("/agents",{method:"POST",body:JSON.stringify({name:"Agent ".concat(a.length+1)})});u("/lab/agents/".concat(e._id,"?tab=settings"))}catch(d$){c(d$.message)}},className:"bg-crypto-accent text-crypto-dark px-3 py-1.5 rounded text-sm font-medium",children:"New agent"}),children:0===a.length?(0,Lg.jsx)("p",{className:"text-gray-500 text-sm",children:"No agents yet."}):(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"text-gray-500 text-left",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"py-2",children:"Agent"}),(0,Lg.jsx)("th",{children:"Status"}),(0,Lg.jsx)("th",{children:"24h triggers"}),(0,Lg.jsx)("th",{children:"24h LLM runs"}),(0,Lg.jsx)("th",{children:"24h LLM cost"}),(0,Lg.jsx)("th",{children:"Open"}),(0,Lg.jsx)("th",{children:"Closed"}),(0,Lg.jsx)("th",{children:"Realized P&L"}),(0,Lg.jsx)("th",{children:"Win rate"})]})}),(0,Lg.jsx)("tbody",{children:a.map(e=>(0,Lg.jsxs)("tr",{className:"border-t border-gray-800 hover:bg-gray-800/40 cursor-pointer",onClick:()=>u("/lab/agents/".concat(e._id)),children:[(0,Lg.jsx)("td",{className:"py-2 font-medium",children:e.name}),(0,Lg.jsxs)("td",{className:"space-x-1",children:[e.enabled?(0,Lg.jsx)(jw,{tone:"green",children:"on"}):(0,Lg.jsx)(jw,{tone:"gray",children:"off"})," ","live"===e.mode?(0,Lg.jsx)(jw,{tone:"amber",children:"live"}):(0,Lg.jsx)(jw,{tone:"violet",children:"paper"})]}),(0,Lg.jsx)("td",{children:e.last24h.triggers}),(0,Lg.jsx)("td",{children:e.last24h.evaluated}),(0,Lg.jsxs)("td",{children:["$",e.last24h.llmUsd.toFixed(3)]}),(0,Lg.jsx)("td",{children:e.positions.open}),(0,Lg.jsx)("td",{children:e.positions.closed}),(0,Lg.jsx)("td",{className:e.positions.realizedPnlSol>=0?"text-green-400":"text-red-400",children:gw(e.positions.realizedPnlSol)}),(0,Lg.jsx)("td",{children:null==e.positions.winRate?"\u2014":"".concat(e.positions.winRate,"%")})]},e._id))})]})})})]})]})})},Ew=e=>{let{label:t,hint:n,children:r}=e;return(0,Lg.jsxs)("label",{className:"block text-sm",children:[(0,Lg.jsx)("span",{className:"text-gray-300",children:t}),n&&(0,Lg.jsx)("span",{className:"block text-xs text-gray-500",children:n}),(0,Lg.jsx)("div",{className:"mt-1",children:r})]})},Aw="w-full bg-crypto-dark border border-gray-600 rounded px-3 py-2 text-sm",Cw=e=>{let{value:t,onChange:n,placeholder:r="no limit",step:i}=e;return(0,Lg.jsx)("input",{type:"number",step:i,value:null!==t&&void 0!==t?t:"",placeholder:r,onChange:e=>n(""===e.target.value?null:Number(e.target.value)),className:Aw})},Mw=e=>{var t,n,i,s,a,o,l,c,u,d,h,p,f,m,g,y,x,v,b,w,_,j,k,N,S,E,A,C,M,T;let{agent:P,status:O,onSaved:I}=e;const[L,R]=(0,r.useState)(P),[D,B]=(0,r.useState)(!1),[F,U]=(0,r.useState)(null);(0,r.useEffect)(()=>R(P),[P]);const z=(e,t)=>R(n=>{const r=JSON.parse(JSON.stringify(n)),i=e.split(".");let s=r;for(const e of i.slice(0,-1)){var a,o;s=null!==(o=(a=s)[e])&&void 0!==o?o:a[e]={}}return s[i[i.length-1]]=t,r}),q=null!==(t=null===(n=L.filters)||void 0===n?void 0:n.allowedSafetyLevels)&&void 0!==t?t:["OK"],W="verified"===(null===O||void 0===O||null===(i=O.credentials)||void 0===i?void 0:i.status);return(0,Lg.jsxs)("div",{className:"grid gap-5",children:[(0,Lg.jsxs)(_w,{title:"Agent",children:[(0,Lg.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,Lg.jsx)(Ew,{label:"Name",children:(0,Lg.jsx)("input",{value:L.name||"",onChange:e=>z("name",e.target.value),className:Aw})}),(0,Lg.jsx)(Ew,{label:"Model",hint:"Grok model used for research and decisions",children:(0,Lg.jsx)("select",{value:L.model,onChange:e=>z("model",e.target.value),className:Aw,children:((null===O||void 0===O?void 0:O.models)||[]).map(e=>(0,Lg.jsx)("option",{children:e},e))})}),(0,Lg.jsx)(Ew,{label:"Enabled",hint:"Wake on every watchlist add",children:(0,Lg.jsxs)("label",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("input",{type:"checkbox",checked:!!L.enabled,onChange:e=>z("enabled",e.target.checked)})," ",(0,Lg.jsx)("span",{children:L.enabled?"On":"Off"})]})}),(0,Lg.jsx)(Ew,{label:"Mode",hint:W?"Paper fills against DeepNets prices;
2 live trades your GMGN wallet":"Connect a GMGN wallet to enable live",children:(0,Lg.jsxs)("select",{value:L.mode,onChange:e=>z("mode",e.target.value),className:Aw,children:[(0,Lg.jsx)("option",{value:"dry_run",children:"Paper"}),(0,Lg.jsx)("option",{value:"live",disabled:!W,children:"Live (GMGN)"})]})})]}),(0,Lg.jsx)(Ew,{label:"Strategy instructions",hint:"Your strategy in plain language. Appended to the agent's system prompt.",children:(0,Lg.jsx)("textarea",{value:L.instructions||"",onChange:e=>z("instructions",e.target.value),rows:5,maxLength:4e3,className:"".concat(Aw," font-mono"),placeholder:"e.g. Only buy tokens with a real website and active X account. Prefer limit entries 15% below after a hard pump."})})]}),(0,Lg.jsx)(_w,{title:"Filters \u2014 free checks before any LLM spend",children:(0,Lg.jsxs)("div",{className:"grid sm:grid-cols-3 gap-4",children:[(0,Lg.jsx)(Ew,{label:"Min market cap (USD)",children:(0,Lg.jsx)(Cw,{value:null===(s=L.filters)||void 0===s?void 0:s.minMarketCapUsd,onChange:e=>z("filters.minMarketCapUsd",e)})}),(0,Lg.jsx)(Ew,{label:"Max market cap (USD)",children:(0,Lg.jsx)(Cw,{value:null===(a=L.filters)||void 0===a?void 0:a.maxMarketCapUsd,onChange:e=>z("filters.maxMarketCapUsd",e)})}),(0,Lg.jsx)(Ew,{label:"Min liquidity (USD)",children:(0,Lg.jsx)(Cw,{value:null===(o=L.filters)||void 0===o?void 0:o.minLiquidityUsd,onChange:e=>z("filters.minLiquidityUsd",e)})}),(0,Lg.jsx)(Ew,{label:"Min holders",children:(0,Lg.jsx)(Cw,{value:null===(l=L.filters)||void 0===l?void 0:l.minHolders,onChange:e=>z("filters.minHolders",e)})}),(0,Lg.jsx)(Ew,{label:"Min 1h volume (USD)",children:(0,Lg.jsx)(Cw,{value:null===(c=L.filters)||void 0===c?void 0:c.minVolume1hUsd,onChange:e=>z("filters.minVolume1hUsd",e)})}),(0,Lg.jsx)(Ew,{label:"Token age (h), min / max",children:(0,Lg.jsxs)("div",{className:"flex gap-2",children:[(0,Lg.jsx)(Cw,{value:null===(u=L.filters)||void 0===u?void 0:u.minTokenAgeHours,onChange:e=>z("filters.minTokenAgeHours",e),placeholder:"min"}),(0,Lg.jsx)(Cw,{value:null===(d=L.filters)||void 0===d?void 0:d.maxTokenAgeHours,onChange:e=>z("filters.maxTokenAgeHours",e),placeholder:"max"})]})}),(0,Lg.jsx)(Ew,{label:"Max top holder %",children:(0,Lg.jsx)(Cw,{value:null===(h=L.filters)||void 0===h?void 0:h.maxTopHolderPct,onChange:e=>z("filters.maxTopHolderPct",e)})}),(0,Lg.jsx)(Ew,{label:"Max top-10 %",children:(0,Lg.jsx)(Cw,{value:null===(p=L.filters)||void 0===p?void 0:p.maxTop10Pct,onChange:e=>z("filters.maxTop10Pct",e)})}),(0,Lg.jsx)(Ew,{label:"Max funding-network %",hint:"Largest wallet cluster funded by one source",children:(0,Lg.jsx)(Cw,{value:null===(f=L.filters)||void 0===f?void 0:f.maxTopNetworkPct,onChange:e=>z("filters.maxTopNetworkPct",e)})}),(0,Lg.jsx)(Ew,{label:"Allowed safety verdicts",children:(0,Lg.jsx)("div",{className:"flex gap-3",children:["OK","RISKY","DANGEROUS"].map(e=>(0,Lg.jsxs)("label",{className:"flex items-center gap-1",children:[(0,Lg.jsx)("input",{type:"checkbox",checked:q.includes(e),onChange:t=>z("filters.allowedSafetyLevels",t.target.checked?[...q,e]:q.filter(t=>t!==e))}),e]},e))})}),(0,Lg.jsx)(Ew,{label:"Platforms",hint:"Comma-separated, e.g. pump.fun (blank = any)",children:(0,Lg.jsx)("input",{value:((null===(m=L.filters)||void 0===m?void 0:m.platforms)||[]).join(", "),onChange:e=>z("filters.platforms",e.target.value.split(",").map(e=>e.trim()).filter(Boolean)),className:Aw})})]})}),(0,Lg.jsx)(_w,{title:"Budget \u2014 caps on how often the agent runs and trades",children:(0,Lg.jsxs)("div",{className:"grid sm:grid-cols-3 gap-4",children:[(0,Lg.jsx)(Ew,{label:"Max LLM runs / hour",children:(0,Lg.jsx)(Cw,{value:null===(g=L.budget)||void 0===g?void 0:g.maxRunsPerHour,onChange:e=>z("budget.maxRunsPerHour",e)})}),(0,Lg.jsx)(Ew,{label:"Max LLM runs / day",children:(0,Lg.jsx)(Cw,{value:null===(y=L.budget)||void 0===y?void 0:y.maxRunsPerDay,onChange:e=>z("budget.maxRunsPerDay",e)})}),(0,Lg.jsx)(Ew,{label:"Max LLM spend / day (USD)",children:(0,Lg.jsx)(Cw,{step:"0.1",value:null===(x=L.budget)||void 0===x?void 0:x.maxLlmUsdPerDay,onChange:e=>z("budget.maxLlmUsdPerDay",e)})}),(0,Lg.jsx)(Ew,{label:"Max trades / day",children:(0,Lg.jsx)(Cw,{value:null===(v=L.budget)||void 0===v?void 0:v.maxTradesPerDay,onChange:e=>z("budget.maxTradesPerDay",e)})}),(0,Lg.jsx)(Ew,{label:"Max spend / day (SOL)",children:(0,Lg.jsx)(Cw,{step:"0.01",value:null===(b=L.budget)||void 0===b?void 0:b.maxDailySpendSol,onCh
2ange:e=>z("budget.maxDailySpendSol",e)})}),(0,Lg.jsx)(Ew,{label:"Re-evaluate same token after (min)",children:(0,Lg.jsx)(Cw,{value:null===(w=L.budget)||void 0===w?void 0:w.cooldownMinutesPerToken,onChange:e=>z("budget.cooldownMinutesPerToken",e)})})]})}),(0,Lg.jsx)(_w,{title:"Trading \u2014 sizing, entries and default exits",children:(0,Lg.jsxs)("div",{className:"grid sm:grid-cols-3 gap-4",children:[(0,Lg.jsx)(Ew,{label:"Max buy (SOL)",hint:"The agent sizes each buy as a fraction of this",children:(0,Lg.jsx)(Cw,{step:"0.01",value:null===(_=L.trade)||void 0===_?void 0:_.maxBuySol,onChange:e=>z("trade.maxBuySol",e)})}),(0,Lg.jsx)(Ew,{label:"Slippage %",children:(0,Lg.jsx)(Cw,{value:null===(j=L.trade)||void 0===j?void 0:j.slippagePct,onChange:e=>z("trade.slippagePct",e)})}),(0,Lg.jsx)(Ew,{label:"Anti-MEV",children:(0,Lg.jsxs)("label",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("input",{type:"checkbox",checked:!1!==(null===(k=L.trade)||void 0===k?void 0:k.antiMev),onChange:e=>z("trade.antiMev",e.target.checked)})," on"]})}),(0,Lg.jsx)(Ew,{label:"Take profit %",hint:"100 = sell at 2\xd7",children:(0,Lg.jsx)(Cw,{value:null===(N=L.trade)||void 0===N?void 0:N.takeProfitPct,onChange:e=>z("trade.takeProfitPct",e),placeholder:"none"})}),(0,Lg.jsx)(Ew,{label:"Stop loss %",hint:"The agent may tighten, never loosen",children:(0,Lg.jsx)(Cw,{value:null===(S=L.trade)||void 0===S?void 0:S.stopLossPct,onChange:e=>z("trade.stopLossPct",e),placeholder:"none"})}),(0,Lg.jsx)(Ew,{label:"Trailing stop %",hint:"From the peak after entry",children:(0,Lg.jsx)(Cw,{value:null===(E=L.trade)||void 0===E?void 0:E.trailingStopPct,onChange:e=>z("trade.trailingStopPct",e),placeholder:"none"})}),(0,Lg.jsx)(Ew,{label:"Max hold (hours)",children:(0,Lg.jsx)(Cw,{value:null===(A=L.trade)||void 0===A?void 0:A.maxHoldHours,onChange:e=>z("trade.maxHoldHours",e),placeholder:"none"})}),(0,Lg.jsx)(Ew,{label:"Allow limit entries",children:(0,Lg.jsxs)("label",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("input",{type:"checkbox",checked:!1!==(null===(C=L.trade)||void 0===C?void 0:C.allowLimitOrders),onChange:e=>z("trade.allowLimitOrders",e.target.checked)})," buy-the-dip orders"]})}),(0,Lg.jsx)(Ew,{label:"Limit: max discount % / max expiry (min)",children:(0,Lg.jsxs)("div",{className:"flex gap-2",children:[(0,Lg.jsx)(Cw,{value:null===(M=L.trade)||void 0===M?void 0:M.maxLimitDiscountPct,onChange:e=>z("trade.maxLimitDiscountPct",e)}),(0,Lg.jsx)(Cw,{value:null===(T=L.trade)||void 0===T?void 0:T.maxLimitExpiryMinutes,onChange:e=>z("trade.maxLimitExpiryMinutes",e)})]})})]})}),(0,Lg.jsxs)("div",{className:"flex items-center gap-4",children:[(0,Lg.jsx)("button",{disabled:D,onClick:async()=>{B(!0),U(null);try{const e=await mw("/agents/".concat(P._id),{method:"PATCH",body:JSON.stringify({name:L.name,enabled:L.enabled,mode:L.mode,model:L.model,instructions:L.instructions,filters:L.filters,budget:L.budget,trade:L.trade})});I(e),U("Saved")}catch(d$){U(d$.message)}finally{B(!1)}},className:"bg-crypto-accent text-crypto-dark px-6 py-2 rounded font-medium disabled:opacity-40",children:D?"Saving\u2026":"Save"}),F&&(0,Lg.jsx)("span",{className:"Saved"===F?"text-green-400 text-sm":"text-red-400 text-sm",children:F})]})]})},Tw=e=>{let{agentId:t}=e;const[n,i]=(0,r.useState)([]),[s,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(null),d=(0,r.useRef)(null),h=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let e=!1;const n=async()=>{try{const e=d.current?"?after=".concat(d.current):"",n=await mw("/agents/".concat(t,"/events").concat(e));n.length&&(d.current=n[n.length-1]._id,i(e=>[...e,...n].slice(-500)))}catch(r){}e||setTimeout(n,2e3)};return n(),()=>{e=!0}},[t]),(0,r.useEffect)(()=>{var e;s||null===(e=h.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[n,s]),(0,Lg.jsxs)("div",{className:"grid gap-5",children:[(0,Lg.jsx)(_w,{title:(0,Lg.jsxs)("span",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-400 animate-pulse"})," Live"]}),right:(0,Lg.jsx)("button",{onClick:()=>a(e=>!e),className:"text-xs text-gray-400 hover:text-white",children:s?"Resume auto-scroll":"Pause auto-scroll"}),children:(0,Lg.jsxs)("div",{className:"font-mono text-xs bg-black/40 rounded p-3 h-[28rem] overflow-y-auto space-y-1",onWheel:()=>a(!0),children:[0===n.length&&(0,Lg.jsx)("div",{className:"text-gray-500",children:"Waiting for the next watchlist add\u2026 (or run a test below)"}),n.map(e=>{var t;return(0,Lg.jsxs)("div",{className:"flex gap-3",children:[(0,Lg.jsx)("span",{className:"text-gray-600 shrink-0",children:xw(e.at)}),e.symbol||e.mint?(0,Lg.jsx)(ft,{to:"/token/".concat(e.mint),className:"text-crypto-accent shrink-0 w-20 truncate",children:e.symbol?"$".concat(e.symbol):null===(t=e.mint)||void 0===t?void 0:t.slice(0,6)}):(0,Lg.jsx)("span",{className:"w-20 shrink-0"}),(0,Lg.jsx)("span",{className:"".concat(bw[e.type]||"text-gray-300"," whitespace-pre-wrap break-words"),children:e.message})]},e._id)}),(0,Lg.jsx)("div",{ref:h})]})}),(0,Lg.jsxs)(_w,{title:"Test run",right:(0,Lg.jsx)("span",{className:"text-xs text-gray-500",children:"Always paper; counts toward the LLM budget"}),children:[(0,Lg.jsxs)("div",{className:"flex gap-2",children:[(0,Lg.jsx)("input",{value:o,onChange:e=>l(e.target.value.trim()),placeholder:"Token mint address",className:"".concat(Aw," font-mono")}),(0,Lg.jsx)("button",{disabled:!o,onClick:async()=>{u(null);try{await mw("/agents/".concat(t,"/test"),{method:"POST",body:JSON.stringify({mint:o})}),u("Queued \u2014 watch the live view")}catch(d$){u(d$.message)}}
2,className:"bg-gray-700 hover:bg-gray-600 px-4 rounded disabled:opacity-40",children:"Run"})]}),c&&(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mt-2",children:c})]})]})},Pw=e=>{let{agentId:t}=e;const[n,i]=(0,r.useState)([]),[s,a]=(0,r.useState)([]),o=(0,r.useCallback)(async()=>{const[e,n]=await Promise.all([mw("/agents/".concat(t,"/positions")),mw("/agents/".concat(t,"/orders"))]);i(e),a(n)},[t]);(0,r.useEffect)(()=>{o();const e=setInterval(o,15e3);return()=>clearInterval(e)},[o]);const l=n.filter(e=>"open"===e.status),c=n.filter(e=>"closed"===e.status),u=c.reduce((e,t)=>e+(t.pnlSol||0),0),d=s.filter(e=>"open"===e.status);return(0,Lg.jsxs)("div",{className:"grid gap-5",children:[(0,Lg.jsx)(_w,{title:"Open positions (".concat(l.length,")"),children:0===l.length?(0,Lg.jsx)("p",{className:"text-sm text-gray-500",children:"None."}):(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"text-gray-500 text-left",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"py-1",children:"Token"}),(0,Lg.jsx)("th",{children:"Venue"}),(0,Lg.jsx)("th",{children:"Cost"}),(0,Lg.jsx)("th",{children:"Entry"}),(0,Lg.jsx)("th",{children:"Last"}),(0,Lg.jsx)("th",{children:"Unrealized"}),(0,Lg.jsx)("th",{children:"Exits"}),(0,Lg.jsx)("th",{children:"Opened"})]})}),(0,Lg.jsx)("tbody",{children:l.map(e=>{var t,n,r,i;const s=100*(e.lastPriceUsd/e.entryPriceUsd-1);return(0,Lg.jsxs)("tr",{className:"border-t border-gray-800",children:[(0,Lg.jsx)("td",{className:"py-1",children:(0,Lg.jsxs)(ft,{to:"/token/".concat(e.mint),className:"text-crypto-accent",children:["$",e.symbol||e.mint.slice(0,6)]})}),(0,Lg.jsx)("td",{children:e.venue}),(0,Lg.jsx)("td",{children:gw(e.costSol)}),(0,Lg.jsxs)("td",{children:["$",e.entryPriceUsd.toPrecision(4)]}),(0,Lg.jsxs)("td",{children:["$",e.lastPriceUsd.toPrecision(4)]}),(0,Lg.jsxs)("td",{className:s>=0?"text-green-400":"text-red-400",children:[s>=0?"+":"",s.toFixed(1),"%"]}),(0,Lg.jsx)("td",{className:"text-xs text-gray-400",children:[null!=(null===(t=e.exits)||void 0===t?void 0:t.takeProfitPct)&&"TP +".concat(e.exits.takeProfitPct,"%"),null!=(null===(n=e.exits)||void 0===n?void 0:n.stopLossPct)&&"SL -".concat(e.exits.stopLossPct,"%"),null!=(null===(r=e.exits)||void 0===r?void 0:r.trailingStopPct)&&"trail ".concat(e.exits.trailingStopPct,"%"),null!=(null===(i=e.exits)||void 0===i?void 0:i.maxHoldHours)&&"".concat(e.exits.maxHoldHours,"h")].filter(Boolean).join(" \xb7 ")}),(0,Lg.jsx)("td",{children:vw(e.openedAt)})]},e._id)})})]})})}),d.length>0&&(0,Lg.jsx)(_w,{title:"Pending orders (".concat(d.length,")"),children:(0,Lg.jsx)("table",{className:"w-full text-sm",children:(0,Lg.jsx)("tbody",{children:d.map(e=>(0,Lg.jsxs)("tr",{className:"border-t border-gray-800",children:[(0,Lg.jsxs)("td",{className:"py-1",children:["$",e.symbol||e.mint.slice(0,6)]}),(0,Lg.jsxs)("td",{children:[e.venue," ",e.type," ",e.side]}),(0,Lg.jsx)("td",{children:gw(e.amountSol)}),(0,Lg.jsx)("td",{children:e.limitPriceUsd?"at $".concat(Number(e.limitPriceUsd).toPrecision(4)):""}),(0,Lg.jsxs)("td",{children:["expires ",vw(e.expiresAt)]}),(0,Lg.jsx)("td",{children:"paper"===e.venue&&(0,Lg.jsx)("button",{onClick:async()=>{await mw("/agents/".concat(t,"/orders/").concat(e._id,"/cancel"),{method:"POST"}),o()},className:"text-xs text-red-400",children:"Cancel"})})]},e._id))})})}),(0,Lg.jsx)(_w,{title:"Closed positions (".concat(c.length,")"),right:(0,Lg.jsxs)("span",{className:"text-sm ".concat(u>=0?"text-green-400":"text-red-400"),children:["Realized ",u>=0?"+":"",gw(u)]}),children:0===c.length?(0,Lg.jsx)("p",{className:"text-sm text-gray-500",children:"None yet."}):(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"text-gray-500 text-left",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"py-1",children:"Token"}),(0,Lg.jsx)("th",{children:"Cost"}),(0,Lg.jsx)("th",{children:"P&L"}),(0,Lg.jsx)("th",{children:"Reason"}),(0,Lg.jsx)("th",{children:"Opened"}),(0,Lg.jsx)("th",{children:"Closed"})]})}),(0,Lg.jsx)("tbody",{children:c.map(e=>(0,Lg.jsxs)("tr",{className:"border-t border-gray-800",children:[(0,Lg.jsx)("td",{className:"py-1",children:(0,Lg.jsxs)(ft,{to:"/token/".concat(e.mint),className:"text-crypto-accent",children:["$",e.symbol||e.mint.slice(0,6)]})}),(0,Lg.jsx)("td",{children:gw(e.costSol)}),(0,Lg.jsxs)("td",{className:(e.pnlSol||0)>=0?"text-green-400":"text-red-400",children:[(e.pnlSol||0)>=0?"+":"",gw(e.pnlSol)," (",(e.pnlPct||0).toFixed(1),"%)"]}),(0,Lg.jsx)("td",{className:"text-xs text-gray-400",children:e.closeReason}),(0,Lg.jsx)("td",{children:vw(e.openedAt)}),(0,Lg.jsx)("td",{children:vw(e.closedAt)})]},e._id))})]})})})]})},Ow=e=>{let{agentId:t}=e;const[n,i]=(0,r.useState)([]),[s,a]=(0,r.useState)(""),[o,l]=(0,r.useState)(null);return(0,r.useEffect)(()=>{mw("/agents/".concat(t,"/runs?limit=100").concat(s?"&status=".concat(s):"")).then(i).catch(()=>{})},[t,s]),(0,Lg.jsx)(_w,{title:"Run log",right:(0,Lg.jsxs)("select",{value:s,onChange:e=>a(e.target.value),className:"bg-crypto-dark border border-gray-600 rounded px-2 py-1 text-xs",children:[(0,Lg.jsx)("option",{value:"",children:"All"}),(0,Lg.jsx)("option",{value:"evaluated",children:"LLM runs"}),(0,Lg.jsx)("option",{value:"filtered",children:"Filtered"}),(0,Lg.jsx)("option",{value:"budget_skipped",children:"Budget skipped"}),(0,Lg.jsx)("option",{value:"error",children:"Errors"})]}),children:(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"text-gray-500 text-left",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"py-1",children:"Time"}),(0,Lg.jsx)("th",{children:"Token"}),(0,Lg.jsx)("th",{children:"Outcome"}),(0,Lg.jsx)("th",{children:"Detail"}),(0,Lg.jsx)("th",{children:"LLM"})]})}),(0,Lg.jsx)("tbody",{children:n.map(e=>{var t,n,i,s,a,c,u,d;return(0,Lg.jsxs)(r.Fragment,{children:[(0,Lg.jsxs)("tr",{className:"border-t border-gray-800 hover:bg-gray-800/40 cursor-pointer",onClick:async()=>l((null===o||void 0===o?void 0:o._id)===e._id?null:await mw("/runs/".concat(e._id))),children:[(0,Lg.jsx)("td",{className:"py-1 whitespace-nowrap",children:vw(e.createdAt)}),(0,Lg.jsx)("td",{children:(0,Lg.jsxs)(ft,{to:"/token/".concat(e.mint),onClick:e=>e.stopPropagation(),className:"text-crypto-accent",children:["$",e.symbol||e.mint.slice(0,6)]})}),(0,Lg.jsx)("td",{children:"evaluated"===e.status?"buy"===(null===(t=e.decision)||void 0===t?void 0:t.action)?(0,Lg.jsxs)(jw,{tone:"green",children:["buy \xb7 ",null===(n=e.execution)||void 0===n?void 0:n.status]}):(0,Lg.jsx)(jw,{tone:"gray",children:"skip"}):"error"===e.status?(0,Lg.jsx)(jw,{tone:"red",children:"error"}):(0,Lg.jsx)(jw,{tone:"gray",children:e.status.replace("_"," ")})}),(0,Lg.jsx)("td",{className:"text-xs text-gray-400 max-w-md truncate",children:(null===(i=e.decision)||void 0===i?void 0:i.reasoning)||(null===(s=e.filterFailures)||void 0===s?void 0:s.join("; "))||e.statusDetail||""}),(0,Lg.jsx)("td",{className:"text-xs text-gray-500 whitespace-nowrap",children:e.llm?"$".concat(null===(a=e.llm.estUsd)||void 0===a?void 0:a.toFixed(4)," \xb7 ").concat(e.llm.turns,"t"):""})]}),o&&o._id===e._id&&(0,Lg.jsx)("tr",{children:(0,Lg.jsxs)("td",{colSpan:5,className:"bg-black/30 p-3 text-xs",children:[o.decision&&(0,Lg.jsxs)("div",{className:"mb-2",children:[(0,Lg.jsx)("span",{className:"text-gray-400",children:"Decision:"})," ",o.decision.action," \xb7 size ",Math.round(100*o.decision.sizeFraction),"% \xb7 confidence ",o.decision.confidence," \xb7 entry ",null===(c=o.decision.entry)||void 0===c?void 0:c.type,null!==(u=o.decision.entry)&&void 0!==u&&u.limitDiscountPct?" \u2212".concat(o.decision.entry.limitDiscountPct,"%"):"",(0,Lg.jsx)("div",{className:"text-gray-300 mt-1 whitespace-pre-wrap",children:o.decision.reasoning}),(null===(d=o.decision.risks)||void 0===d?void 0:d.length)>0&&(0,Lg.jsxs)("div",{className:"text-amber-300 mt-1",children:["Risks: ",o.decision.risks.join("; ")]})]}),o.snapshot&&(0,Lg.jsxs)("div",{className:"text-gray-500 mb-2",children:["Snapshot: mcap ",yw(o.snapshot.marketCapUsd)," \xb7 liq ",
2yw(o.snapshot.liquidityUsd)," \xb7 ",o.snapshot.holders," holders \xb7 safety ",o.snapshot.safetyLevel," \xb7 age ",o.snapshot.ageHours,"h"]}),(0,Lg.jsx)("div",{className:"font-mono space-y-0.5",children:(o.events||[]).map(e=>(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("span",{className:"text-gray-600",children:xw(e.at)})," ",(0,Lg.jsx)("span",{className:bw[e.type]||"",children:e.message})]},e._id))})]})})]},e._id)})})]})})})},Iw=()=>{const{id:e}=pe(),t=he(),n=(0,r.useMemo)(()=>new URLSearchParams(window.location.search).get("tab")||"live",[]),[i,s]=(0,r.useState)(n),[a,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(null);(0,r.useEffect)(()=>{Promise.all([mw("/agents"),mw("/status")]).then(t=>{let[n,r]=t;u(r);const i=n.find(t=>t._id===e);i?l(i):h("Agent not found")}).catch(e=>h(e.message))},[e]);return(0,Lg.jsx)(kw,{children:(0,Lg.jsxs)(ww,{children:[(0,Lg.jsx)(ft,{to:"/lab/agents",className:"text-sm text-gray-400 hover:text-white",children:"\u2190 Agent lab"}),d&&(0,Lg.jsx)("div",{className:"text-red-400 mt-4",children:d}),a&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mt-3 mb-5 gap-4 flex-wrap",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold",children:a.name}),a.enabled?(0,Lg.jsx)(jw,{tone:"green",children:"on"}):(0,Lg.jsx)(jw,{tone:"gray",children:"off"}),"live"===a.mode?(0,Lg.jsx)(jw,{tone:"amber",children:"live"}):(0,Lg.jsx)(jw,{tone:"violet",children:"paper"})]}),(0,Lg.jsxs)("div",{className:"flex gap-2",children:[(0,Lg.jsx)("button",{onClick:async()=>{const e=await mw("/agents/".concat(a._id),{method:"PATCH",body:JSON.stringify({enabled:!a.enabled})});l((0,o.A)((0,o.A)({},a),e))},className:"bg-gray-700 hover:bg-gray-600 px-3 py-1.5 rounded text-sm",children:a.enabled?"Turn off":"Turn on"}),(0,Lg.jsx)("button",{onClick:async()=>{window.confirm("Delete ".concat(a.name,"? Open paper orders are cancelled."))&&(await mw("/agents/".concat(a._id),{method:"DELETE"}),t("/lab/agents"))},className:"text-red-400 hover:text-red-300 px-3 py-1.5 text-sm",children:"Delete"})]})]}),(0,Lg.jsx)("div",{className:"flex gap-1 border-b border-gray-700 mb-5",children:[["live","Live"],["positions","Positions"],["runs","Run log"],["settings","Settings"]].map(e=>{let[t,n]=e;return(0,Lg.jsx)("button",{onClick:()=>s(t),className:"px-4 py-2 text-sm ".concat(i===t?"border-b-2 border-crypto-accent text-white":"text-gray-400 hover:text-white"),children:n},t)})}),"live"===i&&(0,Lg.jsx)(Tw,{agentId:a._id}),"positions"===i&&(0,Lg.jsx)(Pw,{agentId:a._id}),"runs"===i&&(0,Lg.jsx)(Ow,{agentId:a._id}),"settings"===i&&(0,Lg.jsx)(Mw,{agent:a,status:c,onSaved:e=>l((0,o.A)((0,o.A)({},a),e))})]})]})})},Lw=e=>{let{address:t,chain:n,kind:r="wallet",className:i,onClick:s,children:a}=e;const o="network"===r?Jv(null!==t&&void 0!==t?t:"",n):Gv(null!==t&&void 0!==t?t:"",n);return(0,Lg.jsx)(ft,{to:o,className:i,onClick:s,children:a})},Rw=e=>{let{tokenDetails:t}=e;const[n,i]=(0,r.useState)(new Set),s=e=>{navigator.clipboard.writeText(e)},a=e=>{if(!e)return"Unknown";const t=new Date(e),n=new Date,r=Math.abs(n.getTime()-t.getTime()),i=Math.ceil(r/864e5);return i<30?"".concat(i,"d"):i<365?"".concat(Math.floor(i/30),"mo"):"".concat(Math.floor(i/365),"y")},o=e=>{const n=(e=>{var n;const r=parseFloat(e);if(isNaN(r))return r;const i=null!==(n=t.decimals)&&void 0!==n?n:6;return r/Math.pow(10,i)})(e);return isNaN(n)?e:n>=1e12?(n/1e12).toFixed(1)+"T":n>=1e9?(n/1e9).toFixed(1)+"B":n>=1e6?(n/1e6).toFixed(1)+"M":n>=1e3?(n/1e3).toFixed(1)+"K":n.toLocaleString()},l=[...t.networkBundles].sort((e,t)=>t.percentOwnership-e.percentOwnership),c=l.filter(e=>e.percentOwnership>=1).length,u=l.slice(0,Math.max(5,c));return(0,Lg.jsxs)("section",{className:"mb-8",children:[(0,Lg.jsx)("h2",{className:"text-2xl font-bold mb-4",children:"Funding Network Holdings"}),(0,Lg.jsx)("div",{className:"space-y-2",children:u.map((e,r)=>{const l="EXTREME"===(c=e.riskLevel)||"HIGH"===c?"crypto-red":"MEDIUM"===c?"crypto-yellow":"crypto-accent";var c;const u=(e=>"EXTREME"===e?"Extreme Risk":"HIGH"===e?"High Risk":"MEDIUM"===e?"Medium Risk":"Low Risk")(e.riskLevel),d=(e=>"EXTREME"===e||"HIGH"===e?"crypto-red/20":"MEDIUM"===e?"crypto-yellow/20":"crypto-accent/20")(e.riskLevel),h=n.has(e.address),p=e.accounts.slice(0,10),f=e.accounts.some(e=>e.streamflowLocked&&"0"!==e.streamflowLocked),m=e.accounts.some(e=>e.tibaneStaked&&"0"!==e.tibaneStaked);return(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-lg overflow-hidden",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-gray-700/20 transition-colors",onClick:()=>(e=>{const t=new Set(n);t.has(e)?t.delete(e):t.add(e),i(t)})(e.address),children:[(0,Lg.jsx)("div",{className:"w-6 h-6 bg-".concat(d," text-").concat(l," rounded flex-shrink-0 flex items-center justify-center text-xs font-bold"),children:r+1}),(0,Lg.jsx)(Lw,{address:e.address,chain:t.chain,kind:"network",onClick:e=>e.stopPropagation(),className:"text-white hover:text-crypto-accent transition-colors font-semibold truncate",children:e.name}),(0,Lg.jsx)("span",{className:"text-gray-600",children:"\xb7"}),(0,Lg.jsxs)("span",{className:"text-sm text-gray-400 whitespace-nowrap",children:[e.accounts.length," wallets"]}),f&&(0,Lg.jsx)("i",{className:"fas fa-lock text-blue-400 text-xs",title:"Includes Streamflow locked tokens"}),m&&(0,Lg.jsx)("i",{className:"fas fa-coins text-purple-400 text-xs",title:"Includes staked tokens via Tibane Labs"}),(0,Lg.jsx)("div",{className:"flex-1"}),(0,Lg.jsxs)("span",{className:"text-".concat(l," font-bold whitespace-nowrap"),children:[e.percentOwnership.toFixed(1),"%"]}),(0,Lg.jsx)("span",{className:"bg-".concat(d," text-").concat(l," px-2 py-0.5 rounded-full text-xs whitespace-nowrap"),children:u}),(0,Lg.jsx)("i",{className:"fas fa-chevron-".concat(h?"up":"down"," text-gray-400 text-xs w-3 text-center")})]}),h&&(0,Lg.jsxs)("div",{className:"border-t border-gray-700 p-4",children:[(0,Lg.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,Lg.jsxs)("span",{className:"text-sm text-gray-400",children:[Math.min(10,e.accounts.length)," out of ",e.accounts.length," network wallets shown"]})}),(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl overflow-hidden",children:(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"% Held"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Token Amount"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet Age"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Deep Funding Source"})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700",children:p.map(e=>{var n,r;return(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[e.figureName&&e.figureKey?"probable"===e.figureConfidence?(0,Lg.jsxs)(ft,{to:"/figures/".concat(e.figureKey),className:"text-sm font-semibold text-amber-400 hover:underline inline-flex items-center gap-1.5",title:"Probable identity (unconfirmed lead) \u2014 ".concat(e.figureName),children:[(0,Lg.jsx)("i",{className:"fas fa-user-tag text-xs text-amber-400"}),e.figureName,(0,Lg.jsx)("span",{className:"text-amber-400/70 text-[10px] font-normal",children:"?"})]}):(0,Lg.jsxs)(ft,{to:"/figures/".concat(e.figureKey),className:"text-sm font-semibold text-crypto-accent hover:underline inline-flex items-center gap-1.5",title:"Known figure: ".concat(e.figureName),children:[(0,Lg.jsx)("i",{className:"fas fa-user-check text-xs text-crypto-green"}),e.figureName]}):(0,Lg.jsx)(Lw,{address:e.walletAddress,chain:t.chain,className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:e.label||(e.walletAddress?"".concat(e.walletAddress.slice(0,6),"...").concat(e.walletAddress.slice(-4)):"Unknown")}),e.streamflowLocked&&"0"!==e.streamflowLocked&&(0,Lg.jsx)("span",{className:"text-blue-400",title:"Streamflow locked tokens",children:(0,Lg.jsx)("i",{className:"fas fa-lock text-xs"})}),(0,Lg.jsx)("button",{onClick:()=>
2s(e.walletAddress||""),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("span",{className:"font-bold ".concat(jb(e.percentage||0)),children:[(e.percentage||0)<.1?(e.percentage||0).toFixed(3):(e.percentage||0).toFixed(2),"%"]})}),(0,Lg.jsxs)("td",{className:"p-4",children:[(0,Lg.jsx)("span",{className:"text-white font-medium",children:o(e.tokenAmount)}),e.tibaneStaked&&"0"!==e.tibaneStaked&&(0,Lg.jsx)("div",{className:"text-xs text-purple-400 mt-0.5",children:(()=>{const t=parseFloat(e.tibaneStaked),n=parseFloat(e.tokenAmount);return"".concat((n>0?t/n*100:0).toFixed(0),"% staked")})()})]}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsx)("span",{className:"text-white font-medium",children:a(e.oldestTx)})}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsxs)(Lw,{address:e.topFundingSource,chain:t.chain,className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:[null===(n=e.topFundingSource)||void 0===n?void 0:n.slice(0,6),"...",null===(r=e.topFundingSource)||void 0===r?void 0:r.slice(-4)]}),(0,Lg.jsx)("button",{onClick:()=>s(e.topFundingSource||""),className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})})]},e.tokenAccountAddress)})})]})})})]})]},e.address)})})]})},Dw=e=>{let{tokenDetails:t}=e;const n=e=>{const n=(e=>{var n;const r=parseFloat(e);if(isNaN(r))return r;const i=null!==(n=t.decimals)&&void 0!==n?n:6;return r/Math.pow(10,i)})(e);return isNaN(n)?e:n>=1e12?(n/1e12).toFixed(1)+"T":n>=1e9?(n/1e9).toFixed(1)+"B":n>=1e6?(n/1e6).toFixed(1)+"M":n>=1e3?(n/1e3).toFixed(1)+"K":n.toLocaleString()},r=e=>{if(!e)return"Unknown";const t=new Date(e),n=new Date,r=Math.abs(n.getTime()-t.getTime()),i=Math.ceil(r/864e5);return i<365?"".concat(i,"d"):i<1095?"".concat(Math.floor(i/30),"mo"):"".concat(Math.floor(i/365),"y")},i=t.individualHolders.filter(e=>!e.isLiquidityPool),s=[...i].sort((e,t)=>t.percentage-e.percentage).slice(0,10);return(0,Lg.jsxs)("section",{className:"mb-8",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Lg.jsx)("h2",{className:"text-2xl font-bold",children:"Individual Holders"}),(0,Lg.jsx)("div",{className:"flex items-center space-x-4",children:(0,Lg.jsxs)("span",{className:"text-sm text-gray-400",children:["Showing top ",s.length," holders"]})})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl overflow-hidden",children:[(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Rank"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Wallet"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"% Held"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400",children:"Token Amount"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400 hidden lg:table-cell",children:"Wallet Age"}),(0,Lg.jsx)("th",{className:"text-left p-4 text-sm font-medium text-gray-400 hidden lg:table-cell",children:"Funding Source"})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700",children:s.map((e,i)=>{var s,a,o,l,c,u,d,h;const p=((e,t)=>0===e&&t>10?"crypto-red":t>5?"crypto-yellow":"gray-600")(i,e.percentage);return(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsx)("span",{className:"w-6 h-6 bg-".concat(p," rounded-full flex items-center justify-center text-xs font-bold text-white"),children:i+1})}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Lg.jsx)(Lw,{address:e.walletAddress,chain:t.chain,className:"font-mono text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:e.label||(e.walletAddress?"".concat(e.walletAddress.slice(0,6),"...").concat(e.walletAddress.slice(-4)):"Unknown")}),e.figureName&&e.figureKey&&(0,Lg.jsxs)("span",{className:"text-xs text-gray-500",children:["(",(0,Lg.jsxs)(ft,{to:"/figures/".concat(e.figureKey),className:"font-semibold hover:underline inline-flex items-center gap-1 ".concat("probable"===e.figureConfidence?"text-amber-400":"text-crypto-accent"),title:"probable"===e.figureConfidence?"Probable identity (unconfirmed lead) \u2014 ".concat(e.figureName):"Known figure: ".concat(e.figureName),children:[(0,Lg.jsx)("i",{className:"fas text-[10px] ".concat("probable"===e.figureConfidence?"fa-user-tag text-amber-400":"fa-user-check text-crypto-green")}),e.figureName,"probable"===e.figureConfidence?" ?":""]}),")"]}),e.streamflowLocked&&"0"!==e.streamflowLocked&&(0,Lg.jsx)("span",{className:"text-blue-400",title:"Streamflow locked tokens",children:(0,Lg.jsx)("i",{className:"fas fa-lock text-xs"})}),e.tibaneStaked&&"0"!==e.tibaneStaked&&(0,Lg.jsx)("span",{className:"text-purple-400",title:"Staked via Tibane Labs",children:(0,Lg.jsx)("i",{className:"fas fa-coins text-xs"})}),(null===(s=e.tags)||void 0===s?void 0:s.includes("multisig"))&&(0,Lg.jsxs)("span",{className:"text-amber-400 inline-flex items-center gap-1",title:e.multisigInfo?"Squads multisig \u2014 ".concat(e.multisigInfo.threshold,"-of-").concat(e.multisigInfo.memberCount," signers required"):"Squads multisig \u2014 shared-control wallet",children:[(0,Lg.jsx)("i",{className:"fas fa-shield-halved text-xs"}),e.multisigInfo&&(0,Lg.jsxs)("span",{className:"text-[10px] font-mono",children:[e.multisigInfo.threshold,"-of-",e.multisigInfo.memberCount]})]}),(null===(a=e.tags)||void 0===a?void 0:a.includes("kol"))&&(null!==(o=e.label)&&void 0!==o&&o.startsWith("@")?(0,Lg.jsx)("a",{href:"https://x.com/".concat(e.label.slice(1)),target:"_blank",rel:"noopener noreferrer",className:"text-pink-400 hover:text-pink-300 inline-flex items-center",title:"GMGN: KOL \u2014 ".concat(e.label," on X"),onClick:e=>e.stopPropagation(),children:(0,Lg.jsx)("i",{className:"fas fa-crown text-xs"})}):(0,Lg.jsx)("span",{className:"text-pink-400",title:"GMGN: KOL wallet",children:(0,Lg.jsx)("i",{className:"fas fa-crown text-xs"})})),(null===(l=e.tags)||void 0===l?void 0:l.includes("fomo_trader"))&&(0,Lg.jsx)("span",{className:"text-orange-400",title:"FOMO trader".concat(null!==(c=e.label)&&void 0!==c&&c.startsWith("@")?" \u2014 ".concat(e.label," on fomo.family"):""),children:(0,Lg.jsx)("i",{className:"fas fa-fire text-xs"})}),(null===(u=e.tags)||void 0===u?void 0:u.includes("smart_money"))&&(0,Lg.jsx)("span",{className:"text-teal-400",title:"GMGN: Smart money \u2014 statistically profitable track record",children:(0,Lg.jsx)("i",{className:"fas fa-brain text-xs"})}),(null===(d=e.tags)||void 0===d?void 0:d.includes("sniper"))&&(0,Lg.jsx)("span",{className:"text-red-400",title:"GMGN: Sniper on this token",children:(0,Lg.jsx)("i",{className:"fas fa-crosshairs text-xs"})}),(null===(h=e.tags)||void 0===h?void 0:h.includes("bundler"))&&(0,Lg.jsx)("span",{className:"text-orange-400",title:"GMGN: Bundler on this token",children:(0,Lg.jsx)("i",{className:"fas fa-layer-group text-xs"})}),(0,Lg.jsx)("button",{onClick:()=>{return t=e.walletAddress||"",void navigator.clipboard.writeText(t);var t},className:"text-gray-400 hover:text-white transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-copy text-xs"})})]})}),(0,Lg.jsx)("td",{className:"p-4",children:(0,Lg.jsxs)("span",{className:"font-bold ".concat("HIGH"===e.riskLevel||"EXTREME"===e.riskLevel?"text-crypto-red":"MEDIUM"===e.riskLevel?"text-crypto-yellow":jb(e.percentage||0)),title:e.riskLevel?"".concat(e.riskLevel," risk"):void 0,children:[(e.percentage||0)<.1?(e.percentage||0).toFixed(3):(e.percentage||0).toFixed(2),"%"]})}),(0,Lg.jsxs)("td",{className:"p-4",children:[(0,Lg.jsx)("span",{className:"text-white font-medium",children:n(e.tokenAmount)}),e.tibaneStaked&&"0"!==e.tibaneStaked&&(0,Lg.jsx)("div",{className:"text-xs text-purple-400 mt-0.5",children:(()=>{const t=parseFloat(e.tibaneStaked),n=parseFloat(e.tokenAmount);return"".concat((n>0?t/n*100:0).toFixed(0),"% staked")})()})]}),(0,Lg.jsx)("td",{className:"p-4 hidden lg:table-cell",children:(0,Lg.jsx)("span",{className:"text-white font-medium",children:r(e.olde
2stTx)})}),(0,Lg.jsx)("td",{className:"p-4 hidden lg:table-cell",children:(0,Lg.jsx)("span",{className:"text-white font-medium",children:e.exchange||"Unknown"})})]},e.walletAddress)})})]})}),(0,Lg.jsx)("div",{className:"p-4 border-t border-gray-700 flex items-center justify-between",children:(0,Lg.jsxs)("span",{className:"text-sm text-gray-400",children:["Showing ",s.length," of ",i.length," individual holders"]})})]})]})};function Bw(e,t){const n=Number(e)/Math.pow(10,t);return n>=1e9?"".concat((n/1e9).toFixed(2),"B"):n>=1e6?"".concat((n/1e6).toFixed(2),"M"):n>=1e3?"".concat((n/1e3).toFixed(2),"K"):n.toFixed(2)}function Fw(e){if(!e)return"\u2014";return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}const Uw=e=>{let{mint:t}=e;const[n,i]=(0,r.useState)(null),[s,a]=(0,r.useState)(!0),[o,l]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{let e=!1;return(async()=>{try{a(!0);const n=await Ng("".concat(Eg(),"/api/streamflow-locks/").concat(t));if(!n.ok)throw new Error;const r=await n.json();e||i(r)}catch(n){e||l(!0)}finally{e||a(!1)}})(),()=>{e=!0}},[t]),s||o||!n||0===n.activeStreamCount&&"0"===n.totalLocked||0===n.totalLockedPercent)return null;const{totalLockedPercent:c,activeStreamCount:u,totalLockedIn48hPercent:d,topStreams:h,decimals:p}=n;return(0,Lg.jsxs)("div",{className:"mb-6",children:[(0,Lg.jsxs)("h3",{className:"text-xl font-bold mb-4 flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-lock text-blue-400 mr-3"}),"Locked Supply",(0,Lg.jsxs)("a",{href:"https://app.streamflow.finance/token-dashboard/solana/mainnet/".concat(t),target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-sm font-normal text-blue-400 hover:text-blue-300 transition-colors",children:["via Streamflow ",(0,Lg.jsx)("i",{className:"fas fa-external-link-alt text-xs ml-1"})]})]}),(0,Lg.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Tokens Locked"}),(0,Lg.jsx)("div",{className:"text-white font-bold text-lg",children:Bw(n.totalLocked,p)})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"% of Total Supply"}),(0,Lg.jsxs)("div",{className:"text-blue-400 font-bold text-lg",children:[c.toFixed(2),"%"]})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Active Lock Streams"}),(0,Lg.jsx)("div",{className:"text-white font-bold text-lg",children:u})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Still Locked in 48h"}),(0,Lg.jsxs)("div",{className:"text-green-400 font-bold text-lg",children:[d.toFixed(2),"%"]})]})]}),h.length>0&&(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-xl overflow-hidden",children:[(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left p-3 text-sm font-medium text-gray-400",children:"Stream"}),(0,Lg.jsx)("th",{className:"text-right p-3 text-sm font-medium text-gray-400",children:"Locked Amount"}),(0,Lg.jsx)("th",{className:"text-right p-3 text-sm font-medium text-gray-400",children:"% Supply"}),(0,Lg.jsx)("th",{className:"text-right p-3 text-sm font-medium text-gray-400 hidden md:table-cell",children:"Unlocks"}),(0,Lg.jsx)("th",{className:"text-right p-3 text-sm font-medium text-gray-400 hidden sm:table-cell",children:"Status"})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700",children:h.map((e,t)=>(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"p-3",children:(0,Lg.jsx)("span",{className:"text-white text-sm font-medium",children:e.name&&e.name.replace(/\0/g,"").trim()?e.name.replace(/\0/g,"").trim():e.recipient?(0,Lg.jsxs)("a",{href:"/wallet/".concat(e.recipient),className:"text-blue-400 hover:text-blue-300 font-mono transition-colors",title:e.recipient,children:[e.recipient.slice(0,4),"...",e.recipient.slice(-4)]}):"Stream ".concat(t+1)})}),(0,Lg.jsx)("td",{className:"p-3 text-right",children:(0,Lg.jsx)("span",{className:"text-white text-sm",children:Bw(e.lockedAmount,p)})}),(0,Lg.jsx)("td",{className:"p-3 text-right",children:(0,Lg.jsxs)("span",{className:"text-blue-400 text-sm font-medium",children:[e.percentOfSupply.toFixed(2),"%"]})}),(0,Lg.jsx)("td",{className:"p-3 text-right hidden md:table-cell",children:(0,Lg.jsx)("span",{className:"text-gray-300 text-sm",children:Fw(e.unlockDate)})}),(0,Lg.jsx)("td",{className:"p-3 text-right hidden sm:table-cell",children:(0,Lg.jsx)("span",{className:"text-xs font-semibold px-2 py-1 rounded-full ".concat("locked"===e.status?"bg-blue-500/20 text-blue-400":"vesting"===e.status?"bg-yellow-500/20 text-yellow-400":"bg-gray-500/20 text-gray-400"),children:"locked"===e.status?"Locked":"vesting"===e.status?"Vesting":"Unlocked"})})]},t))})]})}),u>h.length&&(0,Lg.jsxs)("div",{className:"p-3 border-t border-gray-700 text-center text-sm text-gray-500",children:["Showing top ",h.length," of ",u," active lock streams"]}
2),(0,Lg.jsx)("div",{className:"p-3 border-t border-gray-700 text-center text-xs text-gray-600",children:"Lock data sourced from Streamflow Finance"})]})]})};function zw(e,t){const n=Number(e)/Math.pow(10,t);return n>=1e9?"".concat((n/1e9).toFixed(2),"B"):n>=1e6?"".concat((n/1e6).toFixed(2),"M"):n>=1e3?"".concat((n/1e3).toFixed(2),"K"):n.toFixed(2)}function qw(e){const t=e/86400;if(t>=1)return"".concat(t,"d");return"".concat((e/3600).toFixed(0),"h")}const Ww=e=>{let{mint:t}=e;const[n,i]=(0,r.useState)(null),[s,a]=(0,r.useState)(!0),[o,l]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{let e=!1;return(async()=>{try{a(!0);const n=await Ng("".concat(Eg(),"/api/tibane-staking/").concat(t));if(!n.ok)throw new Error;const r=await n.json();e||i(r)}catch(n){e||l(!0)}finally{e||a(!1)}})(),()=>{e=!0}},[t]),s||o||!n||0===n.stakerCount||0===n.totalStakedPercent)return null;const{totalStakedPercent:c,stakerCount:u,decimals:d,tauSeconds:h,poolAddress:p}=n;return(0,Lg.jsxs)("div",{className:"mb-6",children:[(0,Lg.jsxs)("h3",{className:"text-xl font-bold mb-4 flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-coins text-purple-400 mr-3"}),"Staked Supply",(0,Lg.jsxs)("a",{href:"https://www.tibane.net/staking/".concat(t),target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-sm font-normal text-purple-400 hover:text-purple-300 transition-colors",children:["via Tibane Labs ",(0,Lg.jsx)("i",{className:"fas fa-external-link-alt text-xs ml-1"})]})]}),(0,Lg.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Tokens Staked"}),(0,Lg.jsx)("div",{className:"text-white font-bold text-lg",children:zw(n.totalStaked,d)})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"% of Total Supply"}),(0,Lg.jsxs)("div",{className:"text-purple-400 font-bold text-lg",children:[c.toFixed(2),"%"]})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Active Stakers"}),(0,Lg.jsx)("div",{className:"text-white font-bold text-lg",children:u})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-700 rounded-lg p-4",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400 mb-1",children:"Time Constant (\u03c4)"}),(0,Lg.jsx)("div",{className:"text-purple-400 font-bold text-lg",children:qw(h)})]})]}),(0,Lg.jsxs)("div",{className:"text-center text-xs text-gray-600",children:["Staking data sourced from"," ",(0,Lg.jsx)("a",{href:"https://solscan.io/account/".concat(p),target:"_blank",rel:"noopener noreferrer",className:"text-purple-400/60 hover:text-purple-300 transition-colors",children:"on-chain pool"})," ","via Tibane Labs ChiefStaker program"]})]})},Hw=e=>{var t;let{required:n,feature:i,mint:s,onUnlock:a,children:o}=e;const{user:l,isAuthenticated:c,isLoading:u,openLogin:d,refreshUser:h}=Bg(),p=he(),[f,m]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null),x=!u&&(!c||!("watcher"===n?$g(null===l||void 0===l?void 0:l.tier):Yg(null===l||void 0===l?void 0:l.tier)));if((0,r.useEffect)(()=>{x&&Og("gate_shown",{feature:i,tier:n,mint:null!==s&&void 0!==s?s:null})},[x,i,n,s]),u)return(0,Lg.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})});const v="watcher"===n?$g(null===l||void 0===l?void 0:l.tier):Yg(null===l||void 0===l?void 0:l.tier);if(c&&v)return(0,Lg.jsx)(Lg.Fragment,{children:o});const b=null!==i&&void 0!==i?i:"this",w=Wg(n),_=Ug[n],j=zg[n],k=null!==(t=null===l||void 0===l?void 0:l.credits)&&void 0!==t?t:0,N=!!s&&c&&k>=1;return(0,Lg.jsx)("div",{className:"max-w-md mx-auto my-16 px-4 text-center",children:(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-8",children:[c?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-4",children:"deep_diver"===n?"\ud83d\udd31":"\ud83d\udc41\ufe0f"}),(0,Lg.jsxs)("h2",{className:"text-xl font-semibold text-white mb-2",children:[w," tier required"]}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-5",children:[b.charAt(0).toUpperCase()+b.slice(1)," is available to ",w," tier and above."]}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-1",children:["Upgrade to ",w," for unlimited access:"]}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs mb-4",children:["Hold ",Vg(_)," $DNET or subscribe ($",j,"/mo)."]}),(0,Lg.jsx)("div",{className:"flex justify-center mb-5",children:(0,Lg.jsx)(ft,{to:"/tiers",onClick:()=>Og("upgrade_from_gate_clicked",{source:"gate",feature:i,tier:n,mint:null!==s&&void 0!==s?s:null}),className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-medium px-6 py-2.5 rounded-lg transition-colors",children:"Compare plans"})}),s&&(0,Lg.jsxs)("div",{className:"border border-gray-700 rounded-lg p-4 bg-crypto-dark/40",children:[(0,Lg.jsx)("p",{className:"text-white text-sm font-medium mb-1",children:"Or just this token"}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs mb-3",children:["Burn 1 credit and ",b," stays unlocked for this token."," ",(0,Lg.jsxs)("span",{className:"text-gray-400",children:["You have ",k.toLocaleStr
2ing()," credit",1===k?"":"s","."]})]}),(0,Lg.jsx)("button",{onClick:async()=>{if(s){Og("credit_unlock_clicked",{feature:i,mint:s}),m(!0),y(null);try{const e=await Ng("".concat(Eg(),"/api/token-safety/").concat(s,"/unlock"),{method:"POST"});if(402===e.status)return void y("You don't have enough credits.");if(!e.ok){const t=await e.json().catch(()=>({}));return void y(t.error||"Unlock failed.")}await h(),Og("credit_unlock_succeeded",{feature:i,mint:s}),null===a||void 0===a||a()}catch(h$){y(h$ instanceof Error?h$.message:"Unlock failed.")}finally{m(!1)}}},disabled:f||!N,className:"w-full bg-gray-700 hover:bg-gray-600 disabled:bg-gray-800 disabled:text-gray-600 disabled:cursor-not-allowed text-white font-medium px-4 py-2 rounded-lg transition-colors text-sm",children:f?"Unlocking\u2026":N?"\ud83d\udd13 Burn 1 credit":"Not enough credits"}),g&&(0,Lg.jsx)("p",{className:"text-red-400 text-xs mt-2",children:g}),!N&&0===k&&(0,Lg.jsx)("p",{className:"text-gray-500 text-xs mt-2",children:(0,Lg.jsx)(ft,{to:"/profile/credits",className:"text-crypto-accent hover:underline",children:"Get credits"})})]})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-4",children:"\ud83d\udd10"}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Log in to continue"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-2",children:["Viewing ",b," requires an account."]}),(0,Lg.jsx)("p",{className:"text-crypto-accent text-xs mb-6",children:"\u2728 New accounts get 10 free credits \u2014 unlock this and other tokens with credits."}),(0,Lg.jsx)("button",{onClick:()=>{d("gate",void 0,{feature:i,tier:n})},className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-medium px-6 py-2.5 rounded-lg transition-colors",children:"Log In / Sign Up"})]}),(0,Lg.jsx)("div",{className:"mt-6",children:(0,Lg.jsx)("button",{onClick:()=>{s?p("/token/".concat(s)):window.history.length>1?p(-1):p("/")},className:"text-gray-500 hover:text-gray-300 text-sm transition-colors",children:"\u2190 Cancel"})})]})})},Kw=e=>"HIGH"===e||"EXTREME"===e?"text-crypto-red":"MEDIUM"===e?"text-crypto-yellow":void 0,Vw={Binance:.3398,Coinbase:.2208,FTX:.0606,Kraken:.0605,OKX:.0475,Bybit:.0474,KuCoin:.0417,MEXC:.0384,"Gate.io":.0246,Huobi:.0177,Bitget:.0105,Bitvavo:.0103,"Mayan Finance":.0087,"Crypto.com":.0087,HTX:.0074,FalconX:.0069,Robinhood:.0062,SwissBorg:.006,Bitstamp:.0058,Moonpay:.0052,CoinEx:.004,"Debridge Finance":.0034,Hyperunit:.0027,"FixedFloat Exchange":.0026,Revolut:.0023,"Change Hero":.0019,Bitfinex:.0014,"Genesis Account":.0012,Backpack:.0012,Rollbit:.0012,Rapira:.001,CoinWx:7e-4,"ChangeNow Exchange":7e-4,Upbit:6e-4,LBank:3e-4},$w=e=>{let{individualHolders:t,networkBundles:n,warning:r}=e;const i=new Map,s=e=>{var t;if(!e.exchange)return;const n=i.get(e.exchange)||{pct:0,walletCount:0};n.pct+=null!==(t=e.percentage)&&void 0!==t?t:0,n.walletCount+=1,i.set(e.exchange,n)},a=[...t,...(null!==n&&void 0!==n?n:[]).flatMap(e=>e.accounts)].sort((e,t)=>{var n,r;return(null!==(n=t.percentage)&&void 0!==n?n:0)-(null!==(r=e.percentage)&&void 0!==r?r:0)});for(const p of a.slice(5))s(p);const o=Array.from(i.values()).reduce((e,t)=>e+t.pct,0),l=Array.from(i.values()).reduce((e,t)=>e+t.walletCount,0);if(o<1||l<5)return(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3 text-sm text-gray-500",children:["Too few exchange-funded wallets to compare against baseline (",l," found)."]});const c=new Set([...Object.keys(Vw),...i.keys()]),u={};for(const[p,f]of i)u[p]=f.pct/o;const d=Array.from(c).map(e=>{var t,n;const r=null!==(t=u[e])&&void 0!==t?t:0,i=null!==(n=Vw[e])&&void 0!==n?n:0;return{name:e,actualPp:100*r,baselinePp:100*i,deltaPp:100*(r-i)}}).filter(e=>e.actualPp>=.5||e.deltaPp<=-3).sort((e,t)=>t.actualPp-e.actualPp||Math.abs(t.deltaPp)-Math.abs(e.deltaPp)).slice(0,12),h=!!r;return(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3",children:[(0,Lg.jsxs)("div",{className:"flex items-baseline justify-between gap-3 mb-2 flex-wrap",children:[(0,Lg.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-balance-scale text-blue-400"}),"Funding source vs baseline"]}),(0,Lg.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider ".concat(h?"text-crypto-yellow":"text-crypto-accent"),children:h?"\u26a0 Unusual":"\u2713 Looks organic"})]}),r&&(0,Lg.jsx)("p",{className:"text-xs text-yellow-300 bg-yellow-900/20 border border-yellow-700/40 rounded px-2 py-1.5 mb-3",children:r}),!r&&(0,Lg.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Each row shows how this token's exchange-funding distribution differs from the typical organic Solana token. Wider bars = more anomalous."}),(0,Lg.jsx)("div",{className:"space-y-1",children:d.map(e=>{const t=e.deltaPp>0,n=Math.abs(e.deltaPp)>=5,r=Math.min(Math.abs(e.deltaPp),30)/30*50,i=t?n?"bg-red-500/70":"bg-red-500/30":n?"bg-sky-500/60":"bg-sky-500/25",s=n?t?"text-red-300":"text-sky-300":"text-gray-500";return(0,Lg.jsxs)("div",{className:"grid grid-cols-[110px_44px_minmax(0,1fr)_70px] items-center gap-2 text-xs",children:[(0,Lg.jsx)("span",{className:"text-gray-300 truncate",title:"Actual ".concat(e.actualPp.toFixed(1),"% \xb7 Baseline ").concat(e.baselinePp.toFixed(1),"%"),children:e.name}),(0,Lg.jsxs)("span",{className:"text-right tabular-nums text-gray-400",title:"baseline ".concat(e.baselinePp.toFixed(1),"%"),children:[e.actualPp.toFixed(0),"%"]}),(0,Lg.jsxs)("div",{className:"relative h-4 bg-crypto-gray/40 rounded",children:[(0,Lg.jsx)("div",{className:"absolute top-0 bottom-0 w-px left-1/2 bg-gray-600"}),t?(0,Lg.jsx)("div",{className:"absolute top-0 bottom-0 left-1/2 ".concat(i," rounded-r"),style:{width:"".concat(r,"%")}}):(0,Lg.jsx)("div",{className:"absolute top-0 bottom-0 right-1/2 ".concat(i," rounded-l"),style:{width:"".concat(r,"%")}})]}),(0,Lg.jsxs)("span",{className:"text-right tabular-nums font-medium ".concat(s),children:[t?"+":"",e.deltaPp.toFixed(0),"pp"]})]},e.name)})}),(0,Lg.jsxs)("div",{className:"mt-3 pt-2 border-t border-gray-800 text-[11px] text-gray-500 flex items-center gap-3 flex-wrap",children:[(0,Lg.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,Lg.jsx)("span",{className:"w-2 h-2 rounded-sm bg-red-500/70"})," over-represented"]}),(0,Lg.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,Lg.jsx)("span",{className:"w-2 h-2 rounded-sm bg-sky-500/60"})," under-represented"]}),(0,Lg.jsx)("span",{className:"text-gray-600",children:"\xb7"}),(0,Lg.jsxs)("span",{children:[l," exchange-funded wallets anal
2yzed"]})]})]})},Yw=e=>{let{label:t,value:n,valueColor:r,to:i}=e;const s=(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-base font-semibold leading-tight ".concat(null!==r&&void 0!==r?r:"text-white"),children:n}),(0,Lg.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-gray-500 mt-0.5 flex items-center justify-between",children:[(0,Lg.jsx)("span",{children:t}),i&&(0,Lg.jsx)("i",{className:"fas fa-arrow-right text-[9px] opacity-0 group-hover:opacity-60 transition-opacity"})]})]});return i?(0,Lg.jsx)(ft,{to:i,className:"group bg-crypto-card border border-gray-800 hover:border-gray-600 rounded-xl px-3 py-2 transition-colors",children:s}):(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl px-3 py-2",children:s})};function Gw(e){var t,n,i,s,a,l,c,u,d,h,p,f;let{chain:m}=e;const{mint:g,timestamp:y}=pe(),[x,v]=(0,r.useState)(null),[b,w]=(0,r.useState)(!0),[_,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(!1),[S,E]=(0,r.useState)(null),[A,C]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(g)if(y)M(g,y);else{const e=window.location.pathname;if(e==="/holder-analysis/".concat(g)||m&&e==="/holder-analysis/".concat(m,"/").concat(g))return void window.location.replace(Qv(g,m));M(g,"latest")}},[g,y,m]);const M=async(e,t)=>{try{w(!0);const n=await Ng("".concat(Eg(),"/api/token-details/").concat(e,"/").concat(t).concat(m?"?chain=".concat(m):""));if(!n.ok)throw new Error("Failed to fetch token details");const r=await n.json();v(r)}catch(h$){j(h$ instanceof Error?h$.message:"An error occurred")}finally{w(!1)}},T=(0,r.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"manual";if(x){Og("holder_analysis_requested",{trigger:e,mint:x.mint});try{const t=localStorage.getItem("deepnets_token"),n={"Content-Type":"application/json"};t&&(n.Authorization="Bearer ".concat(t));const r=await Ng("".concat(Eg(),"/api/request-token-safety-analysis"),{method:"POST",headers:n,body:JSON.stringify((0,o.A)({mint:x.mint},m?{chain:m}:{}))});if(!r.ok)throw Og("holder_analysis_request_failed",{trigger:e,status:r.status}),new Error("Failed to request analysis (".concat(r.status,")"));const i=await r.json();E(i.requestId),N(!0)}catch(_){console.error("Error requesting analysis:",_),Og("holder_analysis_request_failed",{trigger:e,status:0}),"manual"===e&&alert("Failed to request analysis. Please try again.")}}},[x,m]);(0,r.useEffect)(()=>{if(!A&&!b)if(x&&!x.hasHolderAnalysis)C(!0),T("auto");else if(_&&g){C(!0);v({mint:g}),T("auto")}},[x,A,b,_,T,g]),(0,r.useEffect)(()=>{C(!1)},[g]);if(b)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"max-w-7xl mx-auto px-6 py-8",children:(0,Lg.jsx)("div",{className:"text-center py-12",children:(0,Lg.jsx)("div",{className:"text-gray-400",children:"Loading token details..."})})}),(0,Lg.jsx)(_y,{})]});if(_&&!x)return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"max-w-7xl mx-auto px-6 py-8",children:(0,Lg.jsxs)("div",{className:"text-center py-12",children:[(0,Lg.jsx)("div",{className:"text-red-400 mb-4",children:(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-4xl"})}),(0,Lg.jsxs)("p",{className:"text-gray-400 mb-4",children:["Failed to load token details: ",_]}),(0,Lg.jsx)("p",{className:"text-gray-500 mb-6",children:"This token may not exist yet or there may be an issue with our systems."}),(0,Lg.jsxs)("button",{onClick:()=>{v({mint:g||"",hasHolderAnalysis:!1}),j(null)},className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-search mr-2"}),"Try Requesting Analysis Anyway"]})]})}),(0,Lg.jsx)(_y,{})]});if(!x)return null;const P="".concat(window.location.origin).concat(Yv(x.mint,m)),O=x.name||"Unknown Token",I=x.symbol||(null===(t=x.mint)||void 0===t?void 0:t.slice(0,8))||"TOKEN",L="".concat(O," (").concat(I,") - Holder Analysis | Deepnets.ai"),R=x.hasHolderAnalysis?"Analyze ".concat(O," (").concat(I,") token details, holder distribution, risk assessment, and bundle networks. Created by ").concat(x.creatorNetwork||"Unknown"," with ").concat(x.networkPercentage,"% bundle ownership."):"View ".concat(O," (").concat(I,") token details. Holder analysis not yet available."),D=(null===(n=x.uriMetadata)||void 0===n?void 0:n.image)||x.uri||"".concat(window.location.origin,"/logo192.png"),B=e=>{window.location.href=Qv(x.mint,m,e)},F=()=>x.availableTimestamps&&x.timestamp?x.availableTimestamps.findIndex(e=>e===x.timestamp):-1,U=(null===(i=x.uriMetadata)||void 0===i?void 0:i.image)||null,z=x.networkBundles&&x.networkBundles.length>0?x.networkBundles[0]:null,q=null!==(s=null===(a=x.networkBundles)||void 0===a?void 0:a.length)&&void 0!==s?s:0,W=F(),H=x.availableTimestamps&&W<x.availableTimestamps.length-1,K=x.availableTimestamps&&W>0;return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(Ib,{title:L,description:R,image:D,url:P,type:"article"}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-[1600px] w-full mx-auto px-4 py-3 space-y-2 flex-1",children:[(0,Lg.jsxs)(ft,{to:Yv(x.mint,m),className:"text-sm text-gray-400 hover:text-crypto-accent transition-colors inline-flex items-center gap-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-arrow-left text-xs"}),"Back to Token Details"]}
2),(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[U?(0,Lg.jsx)("img",{src:U,alt:x.symbol,className:"w-10 h-10 rounded-full flex-shrink-0 bg-crypto-gray object-cover",onError:e=>{e.target.style.display="none"}}):(0,Lg.jsx)("div",{className:"w-10 h-10 rounded-full bg-crypto-gray flex items-center justify-center text-gray-500 font-bold flex-shrink-0",children:null!==(l=null===(c=x.symbol)||void 0===c?void 0:c[0])&&void 0!==l?l:"?"}),(0,Lg.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap min-w-0",children:[(0,Lg.jsxs)("h1",{className:"text-xl font-bold leading-tight",children:["$",x.symbol]}),(0,Lg.jsx)("span",{className:"text-gray-400 text-sm truncate",children:x.name}),(0,Lg.jsx)("span",{className:"text-[10px] font-semibold text-purple-300 bg-purple-500/10 border border-purple-500/30 px-1.5 py-0.5 rounded uppercase tracking-wide",children:"Holder Analysis"}),m&&(0,Lg.jsx)("span",{className:"text-[10px] font-semibold border px-1.5 py-0.5 rounded ".concat($v[m].badgeClass),children:$v[m].short})]})]}),x.creatorFigure&&(0,Lg.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[12px] text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-hammer text-[10px]"})," Created by",(0,Lg.jsx)(Sb,{figureKey:x.creatorFigure.figureKey,displayName:x.creatorFigure.displayName,trustLevel:x.creatorFigure.trustLevel,confidence:x.creatorFigure.confidence,className:"text-[12px]"})]}),x.timestamp&&(0,Lg.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-800 flex items-center flex-wrap gap-2 text-[12px]",children:[(0,Lg.jsxs)("span",{className:"flex items-center gap-1.5 text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-clock"}),"Analysis from ",(0,Lg.jsx)("span",{className:"font-medium",children:(e=>{let t;const n=new Date(e);if(isNaN(n.getTime())){const n=parseInt(e);t=!isNaN(n)&&n>0?new Date(n):new Date}else t=n;const r=(new Date).getTime()-t.getTime(),i=Math.floor(r/6e4),s=Math.floor(i/60),a=Math.floor(s/24);return a>0?"".concat(a,"d ago"):s>0?"".concat(s,"h ago"):i>0?"".concat(i,"m ago"):"now"})(x.timestamp)})]}),x.availableTimestamps&&x.availableTimestamps.length>1&&(0,Lg.jsxs)("span",{className:"flex items-center gap-1 ml-1",children:[(0,Lg.jsx)("button",{onClick:()=>{const e=F();e>=0&&e<x.availableTimestamps.length-1&&B(x.availableTimestamps[e+1])},disabled:!H,className:"px-1.5 py-0.5 rounded border border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600 disabled:opacity-40 disabled:cursor-not-allowed",title:"Older analysis",children:(0,Lg.jsx)("i",{className:"fas fa-chevron-left text-[10px]"})}),(0,Lg.jsx)("button",{onClick:()=>{const e=F();e>0&&B(x.availableTimestamps[e-1])},disabled:!K,className:"px-1.5 py-0.5 rounded border border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600 disabled:opacity-40 disabled:cursor-not-allowed",title:"Newer analysis",children:(0,Lg.jsx)("i",{className:"fas fa-chevron-right text-[10px]"})})]}),x.hasHolderAnalysis&&(0,Lg.jsx)("button",{onClick:()=>T("manual"),className:"px-2.5 py-1 font-medium rounded-lg border border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600 transition",title:x.hasSocialResearch?"Re-run safety + social research (costs 1 credit)":"Run full research incl. social data (costs 1 credit)",children:x.hasSocialResearch?"Refresh (1 credit)":"Full Research (1 credit)"}),(0,Lg.jsxs)("button",{onClick:()=>{if(!x.hasHolderAnalysis)return;const e=kb(x),t="https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(e),"&url=").concat(encodeURIComponent(P));window.open(t,"_blank","width=600,height=400")},disabled:!x.hasHolderAnalysis,className:"flex items-center gap-1.5 px-2.5 py-1 font-medium rounded-lg border border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600 disabled:opacity-40 transition",title:"Share on X",children:[(0,Lg.jsx)("i",{className:"fab fa-x-twitter"}),(0,Lg.jsx)("span",{children:"Share"})]}),(0,Lg.jsx)("button",{onClick:async()=>{try{await navigator.clipboard.writeText(P),alert("Link copied to clipboard!")}catch(h$){console.error("Failed to copy: ",h$)}},className:"flex items-center gap-1.5 px-2.5 py-1 font-medium rounded-lg border border-gray-700 text-gray-500 hover:text-gray-300 hover:border-gray-600 transition",title:"Copy page link",children:(0,Lg.jsx)("i",{className:"fas fa-link"})})]})]}),x.hasHolderAnalysis?(0,Lg.jsxs)(Lg.Fragment,{children:[z&&((e,t,n)=>{const r=null!==(e=null===(t=z.accounts)||void 0===t?void 0:t.length)&&void 0!==e?e:0,i=null!==(n=z.percentOwnership)&&void 0!==n?n:0;return(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3 flex items-center justify-between gap-3 flex-wrap",children:(0,Lg.jsxs)("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[(0,Lg.jsx)("i",{className:"fas fa-network-wired text-purple-400"}),(0,Lg.jsx)("span",{className:"text-gray-400",children:"Top network bundler:"}),(0,Lg.jsx)(Lw,{address:z.address,chain:m,kind:"network",className:"font-semibold text-crypto-accent hover:text-crypto-accent/80 truncate",children:z.name}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500",children:["\xb7 ",r," wallet",1===r?"":"s"," hold ",i.toFixed(1),"%"]})]})})})(),x.networkBundles&&x.individualHolders&&(0,Lg.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[auto_minmax(0,1fr)] gap-2 items-start",children:[(0,Lg.jsx)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-3",children:(0,Lg.jsxs)("div",{className:"grid grid-cols-2 gap-2 lg:w-[280px]",children:[(0,Lg.jsx)(Yw,{label:"Holders",value:(null!==(u=x.totalHolders)&&void 0!==u?u:0).toLocaleStr
2ing()}),(0,Lg.jsx)(Yw,{label:"Researched",value:"".concat((null!==(d=x.walletsAnalyzed)&&void 0!==d?d:0).toLocaleString())}),(0,Lg.jsx)(Yw,{label:"Top holder",value:"".concat((null!==(h=x.topHolderOwnership)&&void 0!==h?h:0).toFixed(1),"%"),valueColor:Kw(x.topHolderRiskLevel)}),(0,Lg.jsx)(Yw,{label:"Top 10",value:"".concat((null!==(p=x.topTenOwnership)&&void 0!==p?p:0).toFixed(1),"%"),valueColor:Kw(x.topTenHoldersRiskLevel)}),(0,Lg.jsx)(Yw,{label:"Top network",value:z?"".concat((null!==(f=z.percentOwnership)&&void 0!==f?f:0).toFixed(1),"%"):"\u2014",valueColor:z?Kw(z.riskLevel):void 0}),(0,Lg.jsx)(Yw,{label:"Networks",value:q.toString()}),(0,Lg.jsx)(Yw,{label:"Held by ruggers",value:null!=x.ruggerHoldingsPct?"".concat(x.ruggerHoldingsPct.toFixed(1),"%"):"\u2014",valueColor:null==x.ruggerHoldingsPct?void 0:x.ruggerHoldingsPct>=10?"text-crypto-red":x.ruggerHoldingsPct>=5?"text-crypto-yellow":void 0}),(0,Lg.jsx)(Yw,{label:"Avg wallet age",value:(V=x.averageWalletAge,null==V?"\u2014":V<60?"".concat(Math.round(V),"d"):V<730?"".concat(Math.round(V/30.4),"mo"):"".concat((V/365.25).toFixed(1),"y"))})]})}),(0,Lg.jsx)($w,{individualHolders:x.individualHolders,networkBundles:x.networkBundles,warning:x.exchangeDistributionWarning})]}),!m&&(0,Lg.jsx)(Uw,{mint:x.mint}),!m&&(0,Lg.jsx)(Ww,{mint:x.mint}),(0,Lg.jsx)(Rw,{tokenDetails:x}),(0,Lg.jsx)(Dw,{tokenDetails:x})]}):(0,Lg.jsxs)("div",{className:"bg-crypto-card border border-gray-800 rounded-xl p-6 flex flex-col items-center text-center",children:[(0,Lg.jsx)("i",{className:"fas fa-chart-line text-4xl text-gray-600 mb-3"}),(0,Lg.jsx)("p",{className:"text-base mb-1",children:"No recent holder analysis"}),(0,Lg.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:"We don't have a recent analysis for this token."}),(0,Lg.jsxs)("button",{onClick:()=>T("manual"),className:"bg-crypto-accent/10 hover:bg-crypto-accent/20 text-crypto-accent px-5 py-2 rounded-lg font-medium border border-crypto-accent/40 transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-search mr-2"}),"Request holder analysis"]})]})]}),(0,Lg.jsx)(_y,{}),(0,Lg.jsx)(Ny,{isOpen:k,requestId:S,onClose:()=>{N(!1),E(null)},onSuccess:()=>{window.location.reload()},onError:e=>{alert("Analysis failed: ".concat(e))}})]});var V}const Jw=function(e){let{chain:t}=e;const{mint:n}=pe(),{user:i,isAuthenticated:s,isLoading:a}=Bg(),[o,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(a)return;if(!s||!n)return void l(!0);let e=!1;return(async()=>{try{const t=await Ng("".concat(Eg(),"/api/research-unlock/").concat(n));if(e)return;if(t.ok){const e=await t.json();u(!!e.unlocked)}}finally{e||l(!0)}})(),()=>{e=!0}},[a,s,n]),a||s&&!o?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})}),(0,Lg.jsx)(_y,{})]}):$g(null===i||void 0===i?void 0:i.tier)||c?(0,Lg.jsx)(Gw,{chain:t}):(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1",children:(0,Lg.jsx)(Hw,{required:"watcher",feature:"full holder details",mint:n,onUnlock:()=>u(!0)})}),(0,Lg.jsx)(_y,{})]})},Zw=e=>{let{currentUsername:t,onSaved:n}=e;const[i,s]=(0,r.useState)(!1),[a,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)("idle"),[p,f]=(0,r.useState)(null),m=(0,r.useRef)(null),g=(0,r.useCallback)(()=>{const e=localStorage.getItem("deepnets_token");return(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})},[]);(0,r.useEffect)(()=>
2{l(null!==t&&void 0!==t?t:"")},[t]),(0,r.useEffect)(()=>{if(!i)return;const e=a.trim();return m.current&&window.clearTimeout(m.current),e?e.toLowerCase()===(null!==t&&void 0!==t?t:"").toLowerCase()?(h("idle"),void f(null)):(h("checking"),f(null),m.current=window.setTimeout(async()=>{try{const t=await Ng("".concat(Eg(),"/api/auth/username/available?q=").concat(encodeURIComponent(e))),n=await t.json();n.available?(h("available"),f(null)):"taken"===n.reason?(h("taken"),f("Taken")):(h("invalid"),f(n.message||"Invalid username"))}catch(t){h("idle"),f(null)}},400),()=>{m.current&&window.clearTimeout(m.current)}):(h("idle"),void f(null))},[a,i,t]);const y=i&&a.trim().length>=3&&("available"===d||"idle"===d)&&!c;return(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm text-gray-400 mb-1",children:"Username"}),i?(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("div",{className:"flex gap-2",children:[(0,Lg.jsx)("input",{type:"text",value:a,onChange:e=>l(e.target.value.replace(/\s+/g,"")),maxLength:20,autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,className:"flex-1 bg-crypto-dark border border-gray-700 rounded-lg px-3 py-1.5 text-white placeholder-gray-500 focus:outline-none focus:border-crypto-accent transition-colors text-sm font-mono",placeholder:"username"}),(0,Lg.jsx)("button",{onClick:async()=>{const e=a.trim().toLowerCase();if(e){u(!0),f(null);try{var t,r;const i=await Ng("".concat(Eg(),"/api/auth/username"),{method:"POST",headers:g(),body:JSON.stringify({username:e})});if(!i.ok){const e=await i.json().catch(()=>({}));throw new Error(e.error||"Failed to set username")}const a=await i.json();n(null!==(t=null===(r=a.user)||void 0===r?void 0:r.username)&&void 0!==t?t:e),s(!1),h("idle"),f(null)}catch(h$){h("invalid"),f(h$ instanceof Error?h$.message:"Failed to set username")}finally{u(!1)}}},disabled:!y,className:"px-3 py-1.5 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-medium rounded-lg transition-colors disabled:opacity-50 text-sm",children:c?"...":"Save"}),(0,Lg.jsx)("button",{onClick:()=>{s(!1),l(null!==t&&void 0!==t?t:""),h("idle"),f(null)},className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 text-white rounded-lg transition-colors text-sm",children:"\u2715"})]}),(0,Lg.jsxs)("div",{className:"mt-1 min-h-[1em] text-xs",children:["checking"===d&&(0,Lg.jsx)("span",{className:"text-gray-500",children:"Checking\u2026"}),"available"===d&&(0,Lg.jsx)("span",{className:"text-green-400",children:"Available"}),"taken"===d&&(0,Lg.jsx)("span",{className:"text-red-400",children:p}),"invalid"===d&&(0,Lg.jsx)("span",{className:"text-red-400",children:p})]})]}):(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"text-white text-sm font-mono",children:t?"@".concat(t):"Not set"}),(0,Lg.jsx)("button",{onClick:()=>s(!0),className:"text-gray-400 hover:text-crypto-accent transition-colors",children:(0,Lg.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})})})]})]})},Qw=()=>{const e=he(),{user:t,isAuthenticated:n,isLoading:i,linkWallet:s,linkEmail:a,refreshUser:l}=Bg(),{connected:c,publicKey:u}=Ca(),{setVisible:d}=Ba(),[h,p]=(0,r.useState)(""),[f,m]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[x,v]=(0,r.useState)(!1),[b,w]=(0,r.useState)(null),[_,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(!1),[S,E]=(0,r.useState)(!1),A=async()=>{if(window.confirm("Cancel your subscription?\n\nYou'll keep access until the end of your current billing period; after that you revert to whatever DNET-only tier you qualify for.")){E(!0),w(null);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/cancel"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to cancel subscription")}const n=await t.json();j(n.message||"Subscription scheduled to cancel."),await l()}catch(h$){w(h$ instanceof Error?h$.message:"Failed to cancel subscription")}finally{E(!1)}}},C=async()=>{N(!0),w(null);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/create-portal-session"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to create portal session")}const n=await t.json();window.location.href=n.url}catch(h$){w(h$ instanceof Error?h$.message:"Failed to open subscription portal")}finally{N(!1)}};(0,r.useEffect)(()=>{i||n||e("/")},[i,n,e]);const[M,T]=vt(),P=M.get("subscription");(0,r.useEffect)(()=>
2{if("success"===P||"canceled"===P){Og("success"===P?"stripe_checkout_completed":"stripe_checkout_canceled",{source:"profile_page"}),"success"===P&&l();const e=setTimeout(()=>{M.delete("subscription"),T(M,{replace:!0})},5e3);return()=>clearTimeout(e)}},[P,l,M,T]);const O=async()=>{if(c){y(!0),w(null);try{await s(),j("Wallet linked successfully!"),setTimeout(()=>j(null),3e3)}catch(h$){w(h$ instanceof Error?h$.message:"Failed to link wallet")}finally{y(!1)}}else d(!0)};(0,r.useEffect)(()=>{c&&u&&g&&O()},[c,u]);return i?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})}),(0,Lg.jsx)(_y,{})]}):t?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-8",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold text-white mb-6",children:"Account"}),(0,Lg.jsx)(uw,{}),b&&(0,Lg.jsx)("div",{className:"mb-4 p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-red-400 text-sm",children:b})}),_&&(0,Lg.jsx)("div",{className:"mb-4 p-3 bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-crypto-accent text-sm",children:_})}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6 mb-6",children:[(0,Lg.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Account Information"}),(0,Lg.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:[(0,Lg.jsx)(Zw,{currentUsername:t.username,onSaved:()=>l()}),(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm text-gray-400 mb-1",children:"Wallet"}),t.walletAddress?(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("code",{className:"text-white text-sm font-mono",children:(L=t.walletAddress,"".concat(L.slice(0,6),"...").concat(L.slice(-4)))}),(0,Lg.jsx)("button",{onClick:()=>{return e=t.walletAddress,navigator.clipboard.writeText(e),j("Copied to clipboard!"),void setTimeout(()=>j(null),2e3);var e},className:"text-gray-400 hover:text-crypto-accent transition-colors",title:"Copy full address",children:(0,Lg.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})]}):(0,Lg.jsx)("button",{onClick:O,disabled:g,className:"text-crypto-accent hover:text-crypto-accent/80 text-sm font-medium transition-colors disabled:opacity-50",children:g?"Linking...":"+ Link Wallet"})]}),(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm text-gray-400 mb-1",children:"Email"}),t.email?(0,Lg.jsx)("span",{className:"text-white text-sm",children:t.email}):x?(0,Lg.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),h.trim()){m(!0),w(null);try{await a(h.trim()),v(!1),p(""),j("Email linked successfully!"),setTimeout(()=>j(null),3e3)}catch(h$){w(h$ instanceof Error?h$.message:"Failed to link email")}finally{m(!1)}}},className:"flex gap-2",children:[(0,Lg.jsx)("input",{type:"email",value:h,onChange:e=>p(e.target.value),className:"flex-1 bg-crypto-dark border border-gray-700 rounded-lg px-3 py-1.5 text-white placeholder-gray-500 focus:outline-none focus:border-crypto-accent transition-colors text-sm",placeholder:"Enter email",required:!0}),(0,Lg.jsx)("button",{type:"submit",disabled:f,className:"px-3 py-1.5 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-medium rounded-lg transition-colors disabled:opacity-50 text-sm",children:f?"...":"Link"}),(0,Lg.jsx)("button",{type:"button",onClick:()=>v(!1),className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 text-white rounded-lg transition-colors text-sm",children:"\u2715"})]}):(0,Lg.jsx)("button",{onClick:()=>v(!0),className:"text-crypto-accent hover:text-crypto-accent/80 text-sm font-medium transition-colors",children:"+ Link Email"})]}),(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("label",{className:"block text-sm text-gray-400 mb-1",children:"Member Since"}),(0,Lg.jsx)("span",{className:"text-white text-sm",children:(I=t.createdAt,new Date(I).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}))})]})]})]}),(e=>{const n=t.tier||"free",r=Yg(n),i=t.subscription,s=!!i,a=!!i&&(!0===i.cancelAtPeriodEnd||!!i.cancelAt),o=(null===i||void 0===i?void 0:i.cancelAt)||(null===i||void 0===i?void 0:i.currentPeriodEnd)||null,l=o?new Date(o).toLocaleDateString():null;return(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"text-2xl",children:Kg(n)||"\ud83c\udf10"}),(0,Lg.jsx)("span",{className:"text-xl font-bold ".concat(Hg(n)),children:Wg(n)})]}),r?s?(0,Lg.jsx)("button",{onClick:C,disabled:k,className:"bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors disabled:opacity-50",children:k?"Loading\u2026":"Manage"}):(0,Lg.jsx)("button",{disabled:!0,className:"bg-gray-800 text-gray-500 px-4 py-2 rounded-lg text-sm font-medium cursor-not-allowed",title:"You're at the top tier",children:"Upgrade \u2192"}):(0,Lg.jsx)(ft,{to:"/tiers",className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:"Upgrade \u2192"})]}),s&&i&&l&&(0,Lg.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-3 text-xs text-gray-500",children:[(0,Lg.jsxs)("span",{children:["via ",Wg(i.tier)," subscription \xb7"," ",a?(0,Lg.jsxs)("span",{className:"text-amber-400",children:["canceling ",l]}):(0,Lg.jsxs)(Lg.Fragment,{children:["renews ",l]})]}
2),!a&&(0,Lg.jsx)("button",{onClick:A,disabled:S,className:"text-gray-500 hover:text-gray-300 underline-offset-2 hover:underline transition-colors disabled:opacity-50",children:S?"Canceling\u2026":"Cancel subscription"})]}),(null===(e=t.cryptoSubscription)||void 0===e?void 0:e.active)&&(0,Lg.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-3 text-xs text-gray-500",children:[(0,Lg.jsxs)("span",{children:["via ",Wg(t.cryptoSubscription.tier)," USDC subscription \xb7"," ","expires ",new Date(t.cryptoSubscription.currentPeriodEnd).toLocaleDateString()]}),(0,Lg.jsx)(ft,{to:"/tiers",className:"text-gray-500 hover:text-gray-300 underline-offset-2 hover:underline transition-colors",children:"Extend"})]})]})})()]}),(0,Lg.jsx)(_y,{})]}):null;var I,L};var Xw=n(6382).Buffer;const e_=(0,Sy.w3)([(0,Sy.u8)("instruction"),Py("amount"),(0,Sy.u8)("decimals")]);function t_(e,t,n,r,i){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Xy;const a=cx([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}],n,arguments.length>5&&void 0!==arguments[5]?arguments[5]:[]),o=Xw.alloc(e_.span);return e_.encode({instruction:ax.BurnChecked,amount:BigInt(r),decimals:i},o),new kn.fH({keys:a,programId:s,data:o})}const n_=new kn.J3("93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump"),r_=e=>{var t,n;let{onCreditsAdded:i}=e;const{publicKey:s,signTransaction:a}=Ca(),{setVisible:l}=Ba(),{user:c}=Bg(),u=null!==(t=null===c||void 0===c?void 0:c.walletAddress)&&void 0!==t?t:null,d=null!==(n=null===s||void 0===s?void 0:s.toBase58())&&void 0!==n?n:u,[h,p]=(0,r.useState)(null),[f,m]=(0,r.useState)(null),[g,y]=(0,r.useState)(!0),[x,v]=(0,r.useState)(0),[b,w]=(0,r.useState)(!1),[_,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(null),[S,E]=(0,r.useState)(null),[A,C]=(0,r.useState)(null),[M,T]=(0,r.useState)(null),P=(0,r.useCallback)(async()=>{try{y(!0),m(null);const e=await Ng("".concat(Eg(),"/api/burn/price"));if(!e.ok)throw new Error("Failed to fetch pricing");const t=await e.json();p(t)}catch(h$){m(h$ instanceof Error?h$.message:"Failed to load pricing")}finally{y(!1)}},[]),O=d,I=(0,r.useCallback)(async()=>{if(O)try{var e;const t=await Ng("".concat(Eg(),"/api/burn/dnet-balance/").concat(O));if(!t.ok)throw new Error("Failed to fetch balance");const n=await t.json();C(n.balance),T(null!==(e=n.held)&&void 0!==e?e:n.balance)}catch(t){C(e=>null!==e&&void 0!==e?e:0)}},[O]);(0,r.useEffect)(()=>{P();const e=setInterval(P,6e4);return()=>clearInterval(e)},[P]),(0,r.useEffect)(()=>{I()},[I]);const L=(0,r.useCallback)(async(e,t)=>{j("Sending transaction...");const n=await Ng("".concat(Eg(),"/api/burn/send-transaction"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transaction:e})});if(!n.ok){const e=await n.json();throw new Error(e.error||"Failed to send transaction")}const{signature:r}=await n.json();j("Verifying burn and granting credits...");const s=localStorage.getItem("deepnets_token"),a=await Ng("".concat(Eg(),"/api/burn/verify"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},s?{Authorization:"Bearer ".concat(s)}:{}),body:JSON.stringify({txSignature:r,expectedCredits:t})});if(!a.ok){const e=await a.json();throw new Error(e.error||"Verification failed")}const l=await a.json();E({credits:l.creditsGranted,txSignature:r}),j(null),I(),i()},[I,i]),R=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(R.current)return;if(!new URLSearchParams(window.location.search).has("phantom-tx-pending"))return;R.current=!0;const e=(0,gb.dj)("burn-credits");if(!e)return;const t=new URL(window.location.href);if(t.searchParams.delete("phantom-tx-pending"),window.history.replaceState({},"",t.toString()),e.error)return N(e.error.toLowerCase().includes("cancel")?"Transaction cancelled":e.error),void w(!1);if(!e.signedTransactionBase58)return N("Phantom returned no signed transaction"),void w(!1);const n=Number(e.params.credits)||0,r=Bs.A.decode(e.signedTransactionBase58),i=btoa(String.fromCharCode(...r));w(!0),N(null),E(null),L(i,n).catch(e=>{N((null===e||void 0===e?void 0:e.message)||"Burn failed"),j(null),w(!1)}).finally(()=>w(!1))},[L]);if(g)return(0,Lg.jsxs)("div",{className:"text-center py-4",children:[(0,Lg.jsx)("div",{className:"animate-spin w-6 h-6 border-2 border-crypto-accent border-t-transparent roun
2ded-full mx-auto mb-2"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Loading pricing..."})]});if(f)return(0,Lg.jsxs)("div",{className:"text-center py-4",children:[(0,Lg.jsx)("p",{className:"text-red-400 text-sm mb-2",children:"Could not load pricing"}),(0,Lg.jsx)("button",{onClick:P,className:"text-crypto-accent hover:text-crypto-accent/80 text-sm",children:"Try again"})]});if(!h)return null;const D=h.bundles[x];return(0,Lg.jsxs)("div",{className:"space-y-4",children:[(0,Lg.jsx)("div",{className:"space-y-2",children:h.bundles.map((e,t)=>(0,Lg.jsxs)("button",{onClick:()=>v(t),className:"w-full flex items-center justify-between p-3 rounded-lg border transition-colors text-left ".concat(x===t?"border-crypto-accent bg-crypto-accent/10":"border-gray-700 bg-crypto-dark hover:border-gray-600"),children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("span",{className:"text-white font-medium",children:e.label}),e.discount>0&&(0,Lg.jsxs)("span",{className:"ml-2 text-xs text-crypto-accent",children:["Save ",100*e.discount,"%"]})]}),(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsxs)("div",{className:"text-white font-mono text-sm",children:[e.totalTokens.toLocaleString()," DNET"]}),(0,Lg.jsxs)("div",{className:"text-gray-500 text-xs",children:["~$",e.totalUsd]})]})]},e.credits))}),(0,Lg.jsx)("button",{onClick:async()=>{if(!h)return;const e=h.bundles[x];if(!e)return;Og("buy_credits_clicked",{method:"burn",bundle:e.credits,amountUsd:e.totalUsd});if(!s&&(0,gb.persistentPhantomWalletMatches)(u))try{w(!0),N(null),j("Preparing burn transaction...");const t=new kn.J3(u),n=BigInt(e.totalTokens)*BigInt(10**6),r=null!==M&&void 0!==M?M:A;if(null!==r&&r<e.totalTokens)throw new Error("Insufficient unstaked $DNET. Need ".concat(e.totalTokens.toLocaleString()," but have ").concat(r.toLocaleString()," unstaked"));const i=t_(await sx(n_,t,!1,ex),n_,t,n,6,[],ex),s=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!s.ok)throw new Error("Could not fetch blockhash");const{blockhash:a}=await s.json(),o=(new kn.ZX).add(i);o.recentBlockhash=a,o.feePayer=t;const l=o.serialize({requireAllSignatures:!1}),c=Bs.A.encode(l);return void(0,gb.l3)({transactionBase58:c,operation:"burn-credits",params:{credits:e.credits},returnUrl:window.location.pathname+window.location.search})}catch(h$){return N((null===h$||void 0===h$?void 0:h$.message)||"Burn failed"),j(null),void w(!1)}if(!s&&!!u&&(0,yb.Qk)(u)){w(!0),N(null),E(null),j("Preparing burn transaction...");try{const t=new kn.J3(u),n=BigInt(e.totalTokens)*BigInt(10**6),r=null!==M&&void 0!==M?M:A;if(null!==r&&r<e.totalTokens)throw new Error("Insufficient unstaked $DNET. Need ".concat(e.totalTokens.toLocaleString()," but have ").concat(r.toLocaleString()," unstaked"));const i=t_(await sx(n_,t,!1,ex),n_,t,n,6,[],ex),s=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!s.ok)throw new Error("Could not fetch blockhash");const{blockhash:a}=await s.json(),o=(new kn.ZX).add(i);o.recentBlockhash=a,o.feePayer=t;const l=Bs.A.encode(o.serialize({requireAllSignatures:!1}));j("Approve in your wallet\u2026");const c=await(0,yb.wI)(l),d=btoa(String.fromCharCode(...c));await L(d,e.credits)}catch(h$){const t=(null===h$||void 0===h$?void 0:h$.message)||"Burn failed";N(t.toLowerCase().includes("reject")||t.toLowerCase().includes("cancel")?"Transaction cancelled":t),j(null)}finally{w(!1)}}else if(s&&a){w(!0),N(null),E(null),j("Preparing burn transaction...");try{const t=BigInt(e.totalTokens)*BigInt(10**6),n=null!==M&&void 0!==M?M:A;if(null!==n&&n<e.totalTokens)throw new Error("Insufficient unstaked $DNET. Need ".concat(e.totalTokens.toLocaleString()," but have ").concat(n.toLocaleString()," unstaked"));const r=t_(await sx(n_,s,!1,ex),n_,s,t,6,[],ex);j("Preparing transaction...");const i=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!i.ok)throw new Error("Could not fetch blockhash");const{blockhash:o}=await i.json(),l=(new kn.ZX).add(r);l.recentBlockhash=o,l.feePayer=s,j("Approve the burn in your wallet...");const c=(await a(l)).serialize().toString("base64");await L(c,e.credits)}catch(h$){var t,n;console.error("Burn error:",h$),null!==(t=h$.message)&&void 0!==t&&t.includes("User rejected")||null!==(n=h$.message)&&void 0!==n&&n.includes("rejected the request")?N("Transaction cancelled"):N(h$.message||"Burn failed"),j(null)}finally{w(!1)}}else{if(u)return void N("No active wallet session for signing. Sign out and sign in again with the wallet you want to burn from.");if(py())return;l(!0)}},disabled:b||!d,className:"w-full bg-orange-600 hover:bg-orange-500 disabled:bg-gray-700 disabled:text-gray-500 disabled:cursor-not-allowed text-white font-medium py-3 px-4 roun
2ded-lg transition-colors flex items-center justify-center space-x-2",children:b?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"animate-spin w-4 h-4 border-2 border-white border-t-transparent rounded-full"}),(0,Lg.jsx)("span",{children:_||"Processing..."})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{children:"\ud83d\udd25"}),(0,Lg.jsxs)("span",{children:["Burn ",null===D||void 0===D?void 0:D.totalTokens.toLocaleString()," DNET for ",null===D||void 0===D?void 0:D.credits," Credit",1!==(null===D||void 0===D?void 0:D.credits)?"s":""]})]})}),!d&&(0,Lg.jsx)("p",{className:"text-gray-500 text-xs text-center",children:"Connect your wallet to burn $DNET"}),k&&(0,Lg.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-red-400 text-sm",children:k})}),S&&(0,Lg.jsxs)("div",{className:"p-3 bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg",children:[(0,Lg.jsxs)("p",{className:"text-crypto-accent text-sm font-medium",children:["\ud83d\udd25 Burned! +",S.credits," credit",1!==S.credits?"s":""," added"]}),(0,Lg.jsx)("a",{href:"https://solscan.io/tx/".concat(S.txSignature),target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white text-xs mt-1 block transition-colors",children:"View transaction \u2192"})]}),(0,Lg.jsx)("p",{className:"text-gray-600 text-xs text-center",children:"Burned tokens are permanently removed from circulation. Price updates every 60 seconds."})]})},i_=Eg(),s_={signup_bonus:"Signup Bonus",purchase:"Purchase",holder_research:"Holder Research",social_research:"Social Research",api_call:"API Call",ai_task:"AI Task"},a_={signup_bonus:"bg-purple-500/20 text-purple-400 border-purple-500/30",purchase:"bg-blue-500/20 text-blue-400 border-blue-500/30",holder_research:"bg-orange-500/20 text-orange-400 border-orange-500/30",social_research:"bg-pink-500/20 text-pink-400 border-pink-500/30",api_call:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",ai_task:"bg-indigo-500/20 text-indigo-400 border-indigo-500/30"},o_=e=>{let{className:t=""}=e;const[n,i]=(0,r.useState)([]),[s,a]=(0,r.useState)(null),[o,l]=(0,r.useState)(!0),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(1),p=(0,r.useCallback)(async e=>{const t=localStorage.getItem("deepnets_token");if(!t)return u("Not authenticated"),void l(!1);try{l(!0),u(null);const n=await Ng("".concat(i_,"/api/credits/history?page=").concat(e,"&limit=10"),{headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"}});if(!n.ok)throw new Error("Failed to fetch credit history");const r=await n.json();i(r.transactions),a(r.pagination)}catch(h$){u(h$ instanceof Error?h$.message:"An error occurred")}finally{l(!1)}},[]);(0,r.useEffect)(()=>{p(d)},[d,p]);const f=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return o&&0===n.length?(0,Lg.jsx)("div",{className:"".concat(t),children:(0,Lg.jsx)("div",{className:"animate-pulse space-y-3",children:[...Array(5)].map((e,t)=>(0,Lg.jsx)("div",{className:"h-16 bg-gray-700/50 rounded-lg"},t))})}):c?(0,Lg.jsx)("div",{className:"".concat(t),children:(0,Lg.jsxs)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-center",children:[(0,Lg.jsx)("p",{className:"text-red-400",children:c}),(0,Lg.jsx)("button",{onClick:()=>p(d),className:"mt-2 text-sm text-red-300 hover:text-red-200 underline",children:"Try again"})]})}):0===n.length?(0,Lg.jsx)("div",{className:"".concat(t),children:(0,Lg.jsxs)("div",{className:"bg-gray-700/30 rounded-lg p-8 text-center",children:[(0,Lg.jsx)("svg",{className:"w-12 h-12 text-gray-600 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Lg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})}),(0,Lg.jsx)("p",{className:"text-gray-400",children:"No credit transactions yet"})]})}):(0,Lg.jsxs)("div",{className:"".concat(t),children:[(0,Lg.jsxs)("div",{className:"hidden sm:grid grid-cols-12 gap-4 px-4 py-2 text-xs font-medium text-gray-500 uppercase tracking-wider",children:[(0,Lg.jsx)("div",{className:"col-span-3",children:"Date"}),(0,Lg.jsx)("div",{className:"col-span-2",children:"Type"}),(0,Lg.jsx)("div",{className:"col-span-2 text-right",children:"Amount"}),(0,Lg.jsx)("div",{className:"col-span-2",children:"Category"}),(0,Lg.jsx)("div",{className:"col-span-3",children:"Description"})]}),(0,Lg.jsx)("div",{className:"space-y-2",children:n.map(e=>(0,Lg.jsxs)("div",{className:"bg-gray-700/30 hover:bg-gray-700/50 rounded-lg p-4 transition-colors",children:[(0,Lg.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Lg.jsxs)("span",{className:"text-lg font-semibold ".concat("addition"===e.type?"text-crypto-accent":"text-crypto-red"),children:["addition"===e.type?"+":"-",e.amount]}),(0,Lg.jsx)("span",{className:"px-2 py-0.5 text-xs rounded-full border ".concat(a_[e.category]||"bg-gray-500/20 text-gray-400 border-gray-500/30"),children:s_[e.category]||e.category})]}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:e.description}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs",children:f(e.createdAt)})]}),(0,Lg.jsxs)("div",{className:"hidden sm:grid grid-cols-12 gap-4 items-center",children:[(0,Lg.jsx)("div",{className:"col-span-3 text-gray-400 text-sm",children:f(e.createdAt)}),(0,Lg.jsx)("div",{className:"col-span-2",children:(0,Lg.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded ".concat("addition"===e.type?"bg-crypto-accent/20 text-crypto-accent":"bg-crypto-red/20 text-crypto-red"),children:"addition"===e.type?"Credit":"Usage"})}),(0,Lg.jsxs)("div",{className:"col-span-2 text-right font-semibold ".concat("addition"===e.type?"text-crypto-accent":"text-crypto-red"),children:["addition"===e.type?"+":"-",e.amount]}),(0,Lg.jsx)("div",{className:"col-span-2",children:(0,Lg.jsx)("span",{className:"px-2 py-0.5 text-xs rounded-full border ".concat(a_[e.category]||"bg-gray-500/20 text-gray-400 border-gray-500/30"),children:s_[e.category]||e.category})}),(0,Lg.jsx)("div",{className:"col-span-3 text-gray-400 text-sm truncate",title:e.description,children:e.description})]})]},e.id))}),s&&s.totalPages>1&&(0,Lg.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-gray-700",children:[(0,Lg.jsxs)("p",{className:"text-sm text-gray-500",children:["Showing ",(d-1)*s.limit+1," to"," ",Math.min(d*s.limit,s.totalCount)," of"," ",s.totalCount," transactions"]}),(0,Lg.jsxs)("div",{className:"flex gap-2",children:[(0,Lg.jsx)("button",{onClick:()=>h(e=>e-1),disabled:d<=1,className:"px-3 py-1 text-sm bg-gray-700 hover:bg-gray-600 disabled:bg-gray-800 disabled:text-gray-600 text-white rounded transition-colors",children:"Previous"}),(0,Lg.jsx)("button",{onClick:()=>h(e=>e+1),disabled:!s.hasMore,className:"px-3 py-1 text-sm bg-gray-700 hover:bg-gray-600 disabled:bg-gray-800 disabled:text-gray-600 text-white rounded transition-colors",children:"Next"})]})]})]})};function l_(e){return l_="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l_(e)}var c_,u_="dahlia",d_="https://js.stripe.com",h_="".concat(d_,"/").concat(u_,"/stripe.js"),p_=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,f_=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,m_="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",g_=function(e){return p_.test(e)||f_.test(e)},y_=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(h_).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n},x_=null,v_=null,b_=null,w_=function(e){return null!==x_?x_:(x_=new Promise(function(t,n){if("undefined"!==typeof window&&"undefined"!==typeof document)if(window.Stripe&&e&&console.warn(m_),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(d_,'"]')),t=0;t<e.length;t++){var n=e[t];if(g_(n.src))return n}return null}();if(r&&e)console.warn(m_);else if(r){if(r&&null!==b_&&null!==v_){var i;r.removeEventListener("load",b_),r.removeEventListener("error",v_),null===(i=r.parentNode)||void 0===i||i.removeChild(r),r=y_(e)}}else r=y_(e);b_=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}}(t,n),v_=function(e){return function(t){e(new Error("Failed to load Stripe.js",{cause:t}))}}(n),r.addEventListener("load",b_),r.addEventListener("error",v_)}catch(s){return void n(s)}else t(null)}),x_.catch(function(e){return x_=null,Promise.reject(e)}))}
2,__=!1,j_=function(){return c_||(c_=w_(null).catch(function(e){return c_=null,Promise.reject(e)}))};Promise.resolve().then(function(){return j_()}).catch(function(e){__||console.warn(e)});var k_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];__=!0;var r=Date.now();return j_().then(function(e){return function(e,t,n){if(null===e)return null;var r=t[0];if("string"!==typeof r)throw new Error("Expected publishable key to be of type string, got type ".concat(l_(r)," instead."));var i=r.match(/^pk_test/),s=function(e){return 3===e?"v3":e}(e.version),a=u_;i&&s!==a&&console.warn("Stripe.js@".concat(s," was loaded on the page, but @stripe/stripe-js@").concat("9.12.0"," expected Stripe.js@").concat(a,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var o=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"9.12.0",startTime:t})}(o,n),o}(e,t,r)})};const N_="pk_live_51SwEigK4ikRiTdCMXRRHcDN0bPLkryTwAfC3BuJo2AxmNAKRpjIS2EHI0Id1Hm5DTATnvrTvQYzmqhJrRZqDhfFK00cifLVP5s";let S_=null;n(4756);var E_=n(5173);function A_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C_(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M_(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 T_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M_(Object(n),!0).forEach(function(t){C_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,a,o=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O_(e){return O_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O_(e)}var I_=function(e,t,n){var i=!!n,s=r.useRef(n);r.useEffect(function(){s.current=n},[n]),r.useEffect(function(){if(!i||!e)return function(){};var n=function(){if(s.current)return s.current.apply(s,arguments)};return e.on(t,n),function(){e.off(t,n)}},[i,t,e,s])},L_=function(e){var t=r.useRef(e);return r.useEffect(function(){t.current=e},[e]),t.current},R_=function(e){return null!==e&&"object"===O_(e)},D_="[object Object]",B_=function e(t,n){if(!R_(t)||!R_(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var i=Object.prototype.toString.call(t)===D_;if(i!==(Object.prototype.toString.call(n)===D_))return!1;if(!i&&!r)return t===n;var s=Object.keys(t),a=Object.keys(n);if(s.length!==a.length)return!1;for(var o={},l=0;l<s.length;l+=1)o[s[l]]=!0;for(var c=0;c<a.length;c+=1)o[a[c]]=!0;var u=Object.keys(o);if(u.length!==s.length)return!1;var d=t,h=n;return u.every(function(t){return e(d[t],h[t])})},F_=function(e,t,n){return R_(e)?Object.keys(e).reduce(function(r,i){var s=!R_(t)||!B_(e[i],t[i]);return n.includes(i)?(s&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),r):s?T_(T_({},r||{}),{},C_({},i,e[i])):r},null):null},U_="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",z_=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U_;if(null===e||R_(t=e)&&"function"===typeof t.elements&&"function"===typeof t.createToken&&"function"===typeof t.createPaymentMethod&&"function"===typeof t.confirmCardPayment)return e;throw new Error(n)},q_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U_;if(function(e){return R_(e)&&"function"===typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return z_(e,t)})};var n=z_(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},W_=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"6.8.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.8.0",url:"https://stripe.com/docs/stripe-js/react"}))},H_=r.createContext(null);H_.displayName="ElementsContext";var K_=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e};E_.any,E_.object;E_.func.isRequired;var V_=r.createContext(null);V_.displayName="CheckoutContext";var $_=function(e){var t=r.useContext(V_),n=r.useContext(H_);if(t){if(n)throw new Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and <Elements> provider."));return t}return K_(n,e)},Y_=["mode"],G_=function(e,t,n){var i,s="".concat((i=e).charAt(0).toUpperCase()+i.slice(1),"Element"),a=t?function(e){$_
2("mounts <".concat(s,">"));var t=e.id,n=e.className;return r.createElement("div",{id:t,className:n})}:function(t){var n,i=t.id,a=t.className,o=t.options,l=void 0===o?{}:o,c=t.onBlur,u=t.onFocus,d=t.onReady,h=t.onChange,p=t.onEscape,f=t.onClick,m=t.onLoadError,g=t.onLoaderStart,y=t.onNetworksChange,x=t.onConfirm,v=t.onCancel,b=t.onShippingAddressChange,w=t.onShippingRateChange,_=t.onSavedPaymentMethodRemove,j=t.onSavedPaymentMethodUpdate,k=t.onAvailablePaymentMethodsChange,N=$_("mounts <".concat(s,">")),S="elements"in N?N.elements:null,E="checkoutState"in N?N.checkoutState:null,A="success"===(null===E||void 0===E?void 0:E.type)||"loading"===(null===E||void 0===E?void 0:E.type)?E.sdk:null,C=P_(r.useState(null),2),M=C[0],T=C[1],P=r.useRef(null),O=r.useRef(null);I_(M,"blur",c),I_(M,"focus",u),I_(M,"escape",p),I_(M,"click",f),I_(M,"loaderror",m),I_(M,"loaderstart",g),I_(M,"networkschange",y),I_(M,"confirm",x),I_(M,"cancel",v),I_(M,"shippingaddresschange",b),I_(M,"shippingratechange",w),I_(M,"savedpaymentmethodremove",_),I_(M,"savedpaymentmethodupdate",j),I_(M,"availablepaymentmethodschange",k),I_(M,"change",h),d&&(n="expressCheckout"===e?d:function(){d(M)}),I_(M,"ready",n),r.useLayoutEffect(function(){if(null===P.current&&null!==O.current&&(S||A)){var t=null;if(A){var n=A,r=A;switch(e){case"paymentForm":t=r.createForm(l);break;case"payment":t=n.createPaymentElement(l);break;case"address":if(!("mode"in l))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var i=l.mode,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(l,Y_);if("shipping"===i)t=n.createShippingAddressElement(a);else{if("billing"!==i)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=n.createBillingAddressElement(a)}break;case"expressCheckout":t=n.createExpressCheckoutElement(l);break;case"currencySelector":t=A.createCurrencySelectorElement();break;case"taxId":t=n.createTaxIdElement(l);break;case"contactDetails":t=n.createContactDetailsElement();break;case"terms":t=n.createTermsElement(l);break;default:throw new Error("<".concat(s,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else S&&(t=S.create(e,l));P.current=t,T(t),t&&t.mount(O.current)}},[S,A,l]);var I=L_(l);return r.useEffect(function(){if(P.current){var e=F_(l,I,["paymentRequest"]);e&&"update"in P.current&&P.current.update(e)}},[l,I]),r.useLayoutEffect(function(){return function(){if(P.current&&"function"===typeof P.current.destroy)try{P.current.destroy(),P.current=null}catch(e){}}},[]),r.createElement("div",{id:i,className:a,ref:O})};return a.propTypes={id:E_.string,className:E_.string,onChange:E_.func,onBlur:E_.func,onFocus:E_.func,onReady:E_.func,onEscape:E_.func,onClick:E_.func,onLoadError:E_.func,onLoaderStart:E_.func,onNetworksChange:E_.func,onConfirm:E_.func,onCancel:E_.func,onShippingAddressChange:E_.func,onShippingRateChange:E_.func,onSavedPaymentMethodRemove:E_.func,onSavedPaymentMethodUpdate:E_.func,onAvailablePaymentMethodsChange:E_.func,options:E_.object},a.displayName=s,a.__elementType=e,a},J_="undefined"===typeof window,Z_=r.createContext(null);Z_.displayName="EmbeddedCheckoutProviderContext";var Q_=function(){var e=r.useContext(Z_);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},X_=function(e){var t=e.stripe,n=e.options,i=e.children,s=r.useMemo(function(){return q_(t,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[t]),a=r.useRef(null),o=r.useRef(null),l=P_(r.useState({embeddedCheckout:null}),2),c=l[0],u=l[1];r.useEffect(function(){if(!o.current&&!a.current){var e=function(e){o.current||a.current||(o.current=e,a.current=o.current.createEmbeddedCheckoutPage(n).then(function(e){u({embeddedCheckout:e})}))};"async"!==s.tag||o.current||!n.clientSecret&&!n.fetchClientSecret?"sync"!==s.tag||o.current||!n.clientSecret&&!n.fetchClientSecret||e(s.stripe):s.stripePromise.then(function(t){t&&e(t)})}},[s,n,c,o]),r.useEffect(function(){return function(){c.embeddedCheckout?(a.current=null,c.embeddedCheckout.destroy()):a.current&&a.current.then(function(){a.current=null,c.embeddedCheckout&&c.embeddedCheckout.destroy()})}},[c.embeddedCheckout]),r.useEffect(function(){W_(o)}
2,[o]);var d=L_(t);r.useEffect(function(){null!==d&&d!==t&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[d,t]);var h=L_(n);return r.useEffect(function(){null!=h&&(null!=n?(void 0===n.clientSecret&&void 0===n.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=h.clientSecret&&n.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=h.fetchClientSecret&&n.fetchClientSecret!==h.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=h.onComplete&&n.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=h.onShippingDetailsChange&&n.onShippingDetailsChange!==h.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=h.onLineItemsChange&&n.onLineItemsChange!==h.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")):console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them."))},[h,n]),r.createElement(Z_.Provider,{value:c},i)},ej=J_?function(e){var t=e.id,n=e.className;return Q_(),r.createElement("div",{id:t,className:n})}:function(e){var t=e.id,n=e.className,i=Q_().embeddedCheckout,s=r.useRef(!1),a=r.useRef(null);return r.useLayoutEffect(function(){return!s.current&&i&&null!==a.current&&(i.mount(a.current),s.current=!0),function(){if(s.current&&i)try{i.unmount(),s.current=!1}catch(d$){}}},[i]),r.createElement("div",{ref:a,id:t,className:n})};G_("auBankAccount",J_),G_("card",J_),G_("cardNumber",J_),G_("cardExpiry",J_),G_("cardCvc",J_),G_("currencySelector",J_),G_("iban",J_),G_("payment",J_),G_("expressCheckout",J_),G_("paymentRequestButton",J_),G_("linkAuthentication",J_),G_("contactDetails",J_),G_("address",J_),G_("shippingAddress",J_),G_("paymentMethodMessaging",J_),G_("taxId",J_),G_("issuingCardNumberDisplay",J_),G_("issuingCardCvcDisplay",J_),G_("issuingCardExpiryDisplay",J_),G_("issuingCardPinDisplay",J_),G_("issuingCardCopyButton",J_),G_("terms",J_);const tj=e=>{let{fetchClientSecret:t,onClose:n,title:r="Checkout"}=e;const i=(S_||(S_=k_(N_)),S_);return i?(0,Lg.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-start justify-center overflow-y-auto py-8 px-4",children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:n}),(0,Lg.jsxs)("div",{className:"relative bg-crypto-gray border border-gray-700 rounded-2xl shadow-2xl w-full max-w-md",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-800",children:[(0,Lg.jsx)("span",{className:"text-sm font-semibold text-white",children:r}),(0,Lg.jsx)("button",{onClick:n,"aria-label":"Close checkout",className:"text-gray-400 hover:text-white w-8 h-8 flex items-center justify-center rounded-lg hover:bg-gray-800 transition-colors",children:(0,Lg.jsx)("i",{className:"fas fa-times"})})]}),(0,Lg.jsx)("div",{className:"p-2 bg-white rounded-b-2xl min-h-[360px]",children:(0,Lg.jsx)(X_,{stripe:i,options:{fetchClientSecret:t},children:(0,Lg.jsx)(ej,{})})})]})]}):null},nj=[{credits:1,discount:0,label:"1 Credit"},{credits:10,discount:.05,label:"10 Credits (5% off)"},{credits:50,discount:.1,label:"50 Credits (10% off)"},{credits:250,discount:.15,label:"250 Credits (15% off)"}],rj=e=>{let{onPurchaseStarted:t}=e;const[n,i]=(0,r.useState)(0),[s,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),d=nj[n],h=+(.15*d.credits*(1-d.discount)).toFixed(2),p=(0,r.useCallback)(async()=>{const e=await Ng("".concat(Eg(),"/api/stripe/create-credit-checkout"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({credits:d.credits,embedded:!0})}),n=await e.json().catch(()=>({}));if(!e.ok||!n.clientSecret){const t=new Error(n.error||"Checkout failed (HTTP ".concat(e.status,")"));throw Ig(t,{flow:"fiat_credit_checkout_embedded",bundle:d.credits,status:e.status}),t}return null===t||void 0===t||t(),n.clientSecret},[d.credits,t]);return(0,Lg.jsxs)("div",{className:"space-y-4",children:[(0,Lg.jsx)("div",{className:"space-y-2",children:nj.map((e,t)=>{const r=+(.15*e.credits*(1-e.discount)).toFixed(2);return(0,Lg.jsxs)("button",{onClick:()=>i(t),className:"w-full flex items-center justify-between p-3 rounded-lg border transition-colors text-left ".concat(n===t?"border-crypto-accent bg-crypto-accent/10":"border-gray-700 bg-crypto-dark hover:border-gray-600"),children:[(0,Lg.jsx)("div",{children:(0,Lg.jsx)("span",{className:"text-white font-medium",children:e.label})}),(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsxs)("div",{className:"text-white font-mono text-sm",children:["$",r.toFixed(2)]}),e.discount>0&&(0,Lg.jsxs)("div",{className:"text-crypto-accent text-xs",children:["Save ",Math.round(100*e.discount),"%"]})]})]},e.credits)})}),(0,Lg.jsx)("button",{onClick:async()=>{Og("buy_credits_clicked",{method:"fiat",bundle:d.credits,amountUsd:h}),u(!0)},disabled:s,className:"w-full bg-crypto-accent hover:bg-crypto-accent/80 disabled:bg-gray-700 disabled:text-gray-500 disabled:cursor-not-allowed text-crypto-dark font-medium py-3 px-4 roun
2ded-lg transition-colors flex items-center justify-center gap-2",children:s?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"animate-spin w-4 h-4 border-2 border-crypto-dark border-t-transparent rounded-full"}),(0,Lg.jsx)("span",{children:"Redirecting\u2026"})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{children:"\ud83d\udcb3"}),(0,Lg.jsxs)("span",{children:["Buy ",d.credits," Credit",1===d.credits?"":"s"," for $",h.toFixed(2)]})]})}),o&&(0,Lg.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-red-400 text-sm",children:o})}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs text-center",children:"Secure checkout via Stripe. Credits are granted automatically after payment."}),c&&(0,Lg.jsx)(tj,{title:"Buy ".concat(d.credits," Credit").concat(1===d.credits?"":"s"," \xb7 $").concat(h.toFixed(2)),fetchClientSecret:p,onClose:()=>u(!1)})]})},ij=e=>{var t,n;let{onCreditsAdded:i}=e;const{publicKey:s,signTransaction:a}=Ca(),{setVisible:l}=Ba(),{user:c}=Bg(),u=null!==(t=null===c||void 0===c?void 0:c.walletAddress)&&void 0!==t?t:null,d=null!==(n=null===s||void 0===s?void 0:s.toBase58())&&void 0!==n?n:u,[h,p]=(0,r.useState)(null),[f,m]=(0,r.useState)(null),[g,y]=(0,r.useState)(!0),[x,v]=(0,r.useState)(0),[b,w]=(0,r.useState)(!1),[_,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(null),[S,E]=(0,r.useState)(null),[A,C]=(0,r.useState)(null),[M,T]=(0,r.useState)(null),P=(0,r.useCallback)(async()=>{try{y(!0),m(null);const e=await Ng("".concat(Eg(),"/api/crypto-credits/price"));if(!e.ok)throw new Error("Failed to fetch pricing");p(await e.json())}catch(h$){m(h$ instanceof Error?h$.message:"Failed to load pricing")}finally{y(!1)}},[]);(0,r.useEffect)(()=>{P()},[P]);const O=d;(0,r.useEffect)(()=>{if(!O)return C(null),void T(null);let e=!1;return(async()=>{try{const t=await Ng("".concat(Eg(),"/api/crypto-credits/wallet-status/").concat(O));if(!t.ok)return;const n=await t.json();if(e)return;C(n.balanceUsdc),T(n.ataExists)}catch(t){}})(),()=>{e=!0}},[O]);const I=(0,r.useCallback)(async(e,t)=>{j("Sending transaction\u2026");const n=await Ng("".concat(Eg(),"/api/burn/send-transaction"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transaction:e})});if(!n.ok){const e=await n.json().catch(()=>({}));throw new Error(e.error||"Failed to send transaction")}const{signature:r}=await n.json();j("Verifying transfer and granting credits\u2026");const s=localStorage.getItem("deepnets_token"),a=await Ng("".concat(Eg(),"/api/crypto-credits/verify"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},s?{Authorization:"Bearer ".concat(s)}:{}),body:JSON.stringify({txSignature:r,expectedCredits:t})});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||"Verification failed")}const l=await a.json();E({credits:l.creditsGranted,txSignature:r}),j(null),i()},[i]),L=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(L.current)return;if(!new URLSearchParams(window.location.search).has("phantom-tx-pending"))return;L.current=!0;const e=(0,gb.dj)("buy-credits");if(!e)return;const t=new URL(window.location.href);if(t.searchParams.delete("phantom-tx-pending"),window.history.replaceState({},"",t.toString()),e.error)return N(e.error.toLowerCase().includes("cancel")?"Transaction cancelled":e.error),void w(!1);if(!e.signedTransactionBase58)return N("Phantom returned no signed transaction"),void w(!1);const n=Number(e.params.credits)||0,r=Bs.A.decode(e.signedTransactionBase58),i=btoa(String.fromCharCode(...r));w(!0),N(null),E(null),I(i,n).catch(e=>{const t=(null===e||void 0===e?void 0:e.message)||"Payment failed";t.includes("User rejected")||Ig(e,{flow:"crypto_credit_pay",credits:n}),N(t.includes("User rejected")?"Transaction cancelled":t),j(null)}).finally(()=>w(!1))},[I]);if(g)return(0,Lg.jsxs)("div",{className:"text-center py-4",children:[(0,Lg.jsx)("div",{className:"animate-spin w-6 h-6 border-2 border-crypto-accent border-t-transparent rounded-full mx-auto mb-2"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Loading pricing\u2026"})]});if(f)return(0,Lg.jsxs)("div",{className:"text-center py-4",children:[(0,Lg.jsx)("p",{className:"text-red-400 text-sm mb-2",children:"Could not load pricing"}),(0,Lg.jsx)("button",{onClick:P,className:"text-crypto-accent hover:text-crypto-accent/80 text-sm",children:"Try again"})]});if(!h)return null;const R=h.bundles[x],D=null!=A&&R&&A<R.totalUsdc,B=!1===M;return(0,Lg.jsxs)("div",{className:"space-y-4",children:[O&&null!=A&&(0,Lg.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg border ".concat(B||D?"bg-yellow-500/10 border-yellow-500/30 text-yellow-400":"bg-crypto-dark border-gray-700 text-gray-400"),children:B?"No USDC found in this wallet. Fun
2d it with USDC on Solana before paying.":"Wallet balance: ".concat(A.toFixed(2)," USDC")}),(0,Lg.jsx)("div",{className:"space-y-2",children:h.bundles.map((e,t)=>(0,Lg.jsxs)("button",{onClick:()=>v(t),className:"w-full flex items-center justify-between p-3 rounded-lg border transition-colors text-left ".concat(x===t?"border-crypto-accent bg-crypto-accent/10":"border-gray-700 bg-crypto-dark hover:border-gray-600"),children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("span",{className:"text-white font-medium",children:e.label}),e.discount>0&&(0,Lg.jsxs)("span",{className:"ml-2 text-xs text-crypto-accent",children:["Save ",Math.round(100*e.discount),"%"]})]}),(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsxs)("div",{className:"text-white font-mono text-sm",children:[e.totalUsdc.toFixed(2)," USDC"]}),(0,Lg.jsxs)("div",{className:"text-gray-500 text-xs",children:["~$",e.totalUsdc.toFixed(2)]})]})]},e.credits))}),(0,Lg.jsx)("button",{onClick:async()=>{if(!h)return;const e=h.bundles[x];if(!e)return;Og("buy_credits_clicked",{method:"crypto",bundle:e.credits,amountUsd:e.totalUsdc});if(!s&&(0,gb.persistentPhantomWalletMatches)(u))try{w(!0),N(null),E(null),j("Building transaction\u2026");const t=new kn.J3(u),n=new kn.J3(h.usdcMint),r=new kn.J3(h.payToUsdcAta),i=hx(await sx(n,t,!1,Xy),n,r,t,BigInt(e.totalUsdcAtomic),h.usdcDecimals,[],Xy),s=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!s.ok)throw new Error("Could not fetch blockhash");const{blockhash:a}=await s.json(),o=(new kn.ZX).add(i);o.recentBlockhash=a,o.feePayer=t;const l=Bs.A.encode(o.serialize({requireAllSignatures:!1}));return void(0,gb.l3)({transactionBase58:l,operation:"buy-credits",params:{credits:e.credits},returnUrl:window.location.pathname+window.location.search})}catch(h$){return N((null===h$||void 0===h$?void 0:h$.message)||"Payment failed"),j(null),void w(!1)}if(!s&&!!u&&(0,yb.Qk)(u)){w(!0),N(null),E(null),j("Building transaction\u2026");try{const t=new kn.J3(u),n=new kn.J3(h.usdcMint),r=new kn.J3(h.payToUsdcAta),i=hx(await sx(n,t,!1,Xy),n,r,t,BigInt(e.totalUsdcAtomic),h.usdcDecimals,[],Xy),s=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!s.ok)throw new Error("Could not fetch blockhash");const{blockhash:a}=await s.json(),o=(new kn.ZX).add(i);o.recentBlockhash=a,o.feePayer=t;const l=Bs.A.encode(o.serialize({requireAllSignatures:!1}));j("Approve in your wallet\u2026");const c=await(0,yb.wI)(l),d=btoa(String.fromCharCode(...c));await I(d,e.credits)}catch(h$){const t=(null===h$||void 0===h$?void 0:h$.message)||"Payment failed",n=t.includes("InvalidAccountData")||t.includes("invalid account data");t.toLowerCase().includes("reject")||t.toLowerCase().includes("cancel")?N("Transaction cancelled"):N(n?"No USDC found in this wallet. Fund it with USDC on Solana, then try again.":t),j(null)}finally{w(!1)}}else if(s&&a)if(u&&s.toBase58()!==u)N("Connected wallet doesn't match the wallet on your account (".concat(u.slice(0,4),"\u2026").concat(u.slice(-4),")"));else{w(!0),N(null),E(null),j("Building transaction\u2026");try{const t=new kn.J3(h.usdcMint),n=new kn.J3(h.payToUsdcAta),r=hx(await sx(t,s,!1,Xy),t,n,s,BigInt(e.totalUsdcAtomic),h.usdcDecimals,[],Xy);j("Preparing transaction\u2026");const i=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!i.ok)throw new Error("Could not fetch blockhash");const{blockhash:o}=await i.json(),l=(new kn.ZX).add(r);l.recentBlockhash=o,l.feePayer=s,j("Approve the USDC transfer in your wallet\u2026");const c=(await a(l)).serialize().toString("base64");await I(c,e.credits)}catch(h$){console.error("Crypto pay error:",h$);const t=(null===h$||void 0===h$?void 0:h$.message)||"Payment failed",n=t.includes("InvalidAccountData")||t.includes("invalid account data");t.includes("User rejected")||t.includes("rejected the request")?N("Transaction cancelled"):n?N("No USDC found in this wallet. Fund it with USDC on Solana, then try again."):t.toLowerCase().includes("insufficient")?N("".concat(t," \u2014 make sure your wallet has enough USDC and a small SOL balance for gas.")):N(t),j(null)}finally{w(!1)}}else{if(u)return void N("No active wallet session for signing. Sign out and sign in again with the wallet you want to pay from.");if(py())return;l(!0)}},disabled:b||!d||B||!!D,className:"w-full bg-crypto-accent hover:bg-crypto-accent/80 disabled:bg-gray-700 disabled:text-gray-500 disabled:cursor-not-allowed text-crypto-dark font-medium py-3 px-4 roun
2ded-lg transition-colors flex items-center justify-center gap-2",children:b?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"animate-spin w-4 h-4 border-2 border-crypto-dark border-t-transparent rounded-full"}),(0,Lg.jsx)("span",{children:_||"Processing\u2026"})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{children:"\ud83e\ude99"}),(0,Lg.jsxs)("span",{children:["Pay ",null===R||void 0===R?void 0:R.totalUsdc.toFixed(2)," USDC for ",null===R||void 0===R?void 0:R.credits," Credit",1!==(null===R||void 0===R?void 0:R.credits)?"s":""]})]})}),!d&&(0,Lg.jsx)("p",{className:"text-gray-500 text-xs text-center",children:"Connect your Solana wallet to pay with USDC"}),k&&(0,Lg.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-red-400 text-sm",children:k})}),S&&(0,Lg.jsxs)("div",{className:"p-3 bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg",children:[(0,Lg.jsxs)("p",{className:"text-crypto-accent text-sm font-medium",children:["\u2713 Paid! +",S.credits," credit",1!==S.credits?"s":""," added"]}),(0,Lg.jsx)("a",{href:"https://solscan.io/tx/".concat(S.txSignature),target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white text-xs mt-1 block transition-colors",children:"View transaction \u2192"})]}),(0,Lg.jsx)("p",{className:"text-gray-600 text-xs text-center",children:"USDC on Solana mainnet. You'll need a small SOL balance for the network fee (~$0.001)."})]})},sj=()=>{const e=he(),[t,n]=vt(),{user:i,isAuthenticated:s,isLoading:a,refreshUser:o}=Bg(),l=t.get("purchase"),[c,u]=(0,r.useState)(0),d=(0,r.useCallback)(()=>{o(),u(e=>e+1)},[o]);(0,r.useEffect)(()=>{if("success"===l||"canceled"===l){Og("success"===l?"stripe_credits_checkout_completed":"stripe_credits_checkout_canceled",{source:"credits_page"}),"success"===l&&d();const e=setTimeout(()=>{t.delete("purchase"),n(t,{replace:!0})},5e3);return()=>clearTimeout(e)}},[l,d,t,n]);const h=(0,r.useMemo)(()=>{var e;if(t.has("phantom-tx-pending")){const e=(0,gb.Rt)();if("buy-credits"===e)return"crypto";if("burn-credits"===e)return"burn"}return null!==i&&void 0!==i&&i.walletAddress?(null!==(e=null===i||void 0===i?void 0:i.dnetBalance)&&void 0!==e?e:0)>0?"burn":"crypto":"fiat"},[null===i||void 0===i?void 0:i.walletAddress,null===i||void 0===i?void 0:i.dnetBalance,t]),[p,f]=(0,r.useState)(h);return(0,r.useEffect)(()=>{f(h)},[h]),(0,r.useEffect)(()=>{a||s||e("/")},[a,s,e]),(0,r.useEffect)(()=>{Og("credits_page_viewed",{defaultMethod:h})},[h]),a?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})}),(0,Lg.jsx)(_y,{})]}):i?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-8",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold text-white mb-6",children:"Account"}),(0,Lg.jsx)(uw,{}),"success"===l&&(0,Lg.jsx)("div",{className:"mb-4 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-green-400 text-sm",children:"\u2713 Payment received. Your credits will appear within a few seconds."})}),"canceled"===l&&(0,Lg.jsx)("div",{className:"mb-4 p-3 bg-gray-700/40 border border-gray-600 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-gray-300 text-sm",children:"Checkout canceled \u2014 no charge was made."})}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6 mb-6",children:[(0,Lg.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,Lg.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Credits"}),(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsx)("div",{className:"text-2xl font-bold text-crypto-accent",children:i.credits.toLocaleString()}),(0,Lg.jsx)("p",{className:"text-gray-400 text-xs",children:"available"})]})]}),(0,Lg.jsxs)("div",{className:"border-t border-gray-700 pt-4",children:[(0,Lg.jsx)("div",{className:"flex bg-crypto-dark rounded-lg p-1 mb-5 border border-gray-700",children:[{id:"burn",label:"\ud83d\udd25 Burn $DNET"},{id:"crypto",label:"\ud83e\ude99 Crypto"},{id:"fiat",label:"\ud83d\udcb3 Card"}].map(e=>(0,Lg.jsx)("button",{onClick:()=>f(e.id),className:"flex-1 px-3 py-2 text-sm font-medium rounded-md transition-colors ".concat(p===e.id?"bg-crypto-gray text-white":"text-gray-400 hover:text-white"),children:e.label},e.id))}
2),"burn"===p&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)(r_,{onCreditsAdded:d}),(0,Lg.jsx)("p",{className:"text-center text-gray-500 text-xs mt-3",children:(0,Lg.jsx)(ft,{to:"/whitepaper",className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"Learn more about $DNET \u2192"})})]}),"crypto"===p&&(0,Lg.jsx)(ij,{onCreditsAdded:d}),"fiat"===p&&(0,Lg.jsx)(rj,{})]})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6",children:[(0,Lg.jsx)("h2",{className:"text-lg font-semibold text-white mb-4",children:"Credit History"}),(0,Lg.jsx)(o_,{},c)]})]}),(0,Lg.jsx)(_y,{})]}):null};function aj(){if("undefined"===typeof navigator)return"Web";const e=navigator.userAgent,t=/Mac/.test(e)?"Mac":/Windows/.test(e)?"Windows":/Android/.test(e)?"Android":/iPhone|iPad/.test(e)?"iOS Safari":/Linux/.test(e)?"Linux":"Web",n=/Edg\//.test(e)?"Edge":/Chrome\//.test(e)?"Chrome":/Firefox\//.test(e)?"Firefox":/Safari\//.test(e)?"Safari":"Browser";return"".concat(n," on ").concat(t)}function oj(e){try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}catch(t){return e}}const lj=()=>{const[e,t]=(0,r.useState)(null),[n,i]=(0,r.useState)(!1),[s,a]=(0,r.useState)(null),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(null),h=(0,r.useCallback)(()=>{const e=localStorage.getItem("deepnets_token");return(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})},[]),p=(0,r.useCallback)(async()=>{try{const e=await Ng("".concat(Eg(),"/api/auth/passkey"),{headers:h()});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error||"Failed to load passkeys (".concat(e.status,")"))}const n=await e.json();t(n.passkeys||[]),c(null)}catch(h$){c(h$ instanceof Error?h$.message:"Failed to load passkeys"),t([])}}
2,[h]);(0,r.useEffect)(()=>{p()},[p]);const f="undefined"!==typeof window&&"credentials"in navigator&&"create"in navigator.credentials;return(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6 mb-6",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Lg.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Passkeys"}),e&&(0,Lg.jsxs)("span",{className:"text-xs text-gray-400",children:[e.length," registered"]})]}),(0,Lg.jsx)("p",{className:"text-sm text-gray-400 mb-4",children:"Sign in without a wallet \u2014 Touch ID, Face ID, Windows Hello, or a security key. Syncs with your passkey manager (iCloud Keychain, 1Password, etc.). Also used by the Deepnets iOS app."}),null===e?(0,Lg.jsx)("div",{className:"text-sm text-gray-500",children:"Loading\u2026"}):0===e.length?(0,Lg.jsx)("div",{className:"text-sm text-gray-500 mb-4",children:"No passkeys yet. Add one to sign in faster next time."}):(0,Lg.jsx)("ul",{className:"space-y-2 mb-4",children:e.map(e=>(0,Lg.jsxs)("li",{className:"flex items-center justify-between bg-black/30 border border-gray-800 rounded-lg px-4 py-3",children:[(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsx)("div",{className:"text-white text-sm truncate",children:e.name||"Passkey"}),(0,Lg.jsxs)("div",{className:"text-xs text-gray-500",children:["Added ",oj(e.createdAt),e.lastUsedAt?" \xb7 Last used ".concat(oj(e.lastUsedAt)):""]})]}),(0,Lg.jsx)("button",{onClick:()=>(async e=>{a(e),c(null),d(null);try{const t=await Ng("".concat(Eg(),"/api/auth/passkey/").concat(encodeURIComponent(e)),{method:"DELETE",headers:h()});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to remove passkey")}d("Passkey removed."),await p()}catch(h$){c(h$ instanceof Error?h$.message:"Failed to remove passkey")}finally{a(null)}})(e.credentialId),disabled:s===e.credentialId,className:"text-xs text-red-400 hover:text-red-300 disabled:opacity-50 ml-4 shrink-0",children:s===e.credentialId?"Removing\u2026":"Remove"})]},e.credentialId))}),(0,Lg.jsx)("button",{onClick:async()=>{i(!0),c(null),d(null);try{const e=await Ng("".concat(Eg(),"/api/auth/passkey/register/begin"),{method:"POST",headers:h(),body:JSON.stringify({})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error||"Failed to start passkey registration")}const t=await e.json(),n=await sy({optionsJSON:t}),r=await Ng("".concat(Eg(),"/api/auth/passkey/register/complete"),{method:"POST",headers:h(),body:JSON.stringify((0,o.A)((0,o.A)({},n),{},{passkeyName:aj()}))});if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.error||"Failed to register passkey")}const i=await r.json();i.token&&localStorage.setItem("deepnets_token",i.token),d("Passkey added."),await p()}catch(h$){const t=h$ instanceof Error?h$.message:"Failed to add passkey";t.includes("cancel")||t.includes("timed out")?c("Cancelled."):c(t)}finally{i(!1)}},disabled:n||!f,className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-4 py-2 rounded-lg text-sm font-semibold disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Follow prompts on your device\u2026":"Add a passkey"}),!f&&(0,Lg.jsx)("p",{className:"text-xs text-yellow-500 mt-2",children:"This browser doesn't expose WebAuthn. Try a recent Chrome, Safari, Firefox, or Edge."}),l&&(0,Lg.jsx)("div",{className:"mt-4 text-sm text-red-400",children:l}),u&&(0,Lg.jsx)("div",{className:"mt-4 text-sm text-green-400",children:u})]})},cj=()=>{const e=he(),{isAuthenticated:t,isLoading:n}=Bg();return(0,r.useEffect)(()=>{n||t||e("/")},[n,t,e]),n?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})}),(0,Lg.jsx)(_y,{})]}):(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-8",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-bold text-white mb-6",children:"Account"}),(0,Lg.jsx)(uw,{}),(0,Lg.jsx)(lj,{})]}),(0,Lg.jsx)(_y,{})]})},uj=()=>{const[e]=vt(),t=he(),{verifyEmailToken:n}=Bg(),i=e.get("token")||"",[s,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(null);(0,r.useEffect)(()=>{Og("email_verify_opened",{hasToken:!!i})},[i]);return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 flex items-center justify-center px-4",children:(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-8 max-w-md w-full text-center",children:i?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-4",children:"\ud83d\udd10"}),(0,Lg.jsx)("h1",{className:"text-xl font-semibold text-white mb-2",children:"Sign in to deepnets.ai"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:"Click below to complete sign-in. This link can only be used once."}),(0,Lg.jsx)("button",{onClick:async()=>
2{if(i){a(!0),l(null);try{await n(i),t("/profile",{replace:!0})}catch(h$){const t=h$ instanceof Error?h$.message:"Sign-in failed";l(t),a(!1),Og("email_verify_failed",{reason:t.slice(0,80)})}}},disabled:s,className:"w-full bg-crypto-accent hover:bg-crypto-accent/80 disabled:opacity-50 text-crypto-dark font-medium py-2.5 px-5 rounded-lg transition-colors",children:s?"Signing in\u2026":"Sign In \u2192"}),o&&(0,Lg.jsx)("p",{className:"mt-4 text-red-400 text-sm",children:o})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"text-5xl mb-4",children:"\u26a0\ufe0f"}),(0,Lg.jsx)("h1",{className:"text-xl font-semibold text-white mb-2",children:"No token found"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:"This page expected a sign-in token in the URL."}),(0,Lg.jsx)(ft,{to:"/",className:"inline-block bg-gray-700 hover:bg-gray-600 text-white px-5 py-2.5 rounded-lg text-sm font-medium transition-colors",children:"Back to home"})]})})}),(0,Lg.jsx)(_y,{})]})},dj=()=>{const{isAuthenticated:e,pendingLoginRedirect:t,clearPendingLoginRedirect:n}=Bg(),i=he();return(0,r.useEffect)(()=>{if(e&&t){const e=t;n(),i(e)}},[e,t,n,i]),null},hj=()=>{const{pathname:e,hash:t}=ce(),n=r.useContext(se).navigationType;return(0,r.useEffect)(()=>{"POP"!==n&&(t||window.scrollTo(0,0))},[e,t,n]),null},pj=[{kind:"phantom-deeplink",name:"Phantom",badgeBg:"bg-purple-500",badgeText:"P"},{kind:"wc",walletId:"jupiter",autoReturns:!1,name:"Jupiter",badgeBg:"bg-emerald-500",badgeText:"J"},{kind:"bounce",id:"solflare",name:"Solflare",badgeBg:"bg-orange-500",badgeText:"S"},{kind:"bounce",id:"backpack",name:"Backpack",badgeBg:"bg-red-500",badgeText:"B"}],fj=()=>{const[e,t]=(0,r.useState)(!1),[i,s]=(0,r.useState)(void 0),[a,l]=(0,r.useState)(null),[,c]=(0,r.useState)(Date.now()),[u,d]=(0,r.useState)(!1),{loginWithSignedMessage:h}=Bg();(0,r.useEffect)(()=>{if(null===a||void 0===a||!a.waitStartedAt)return;const e=setInterval(()=>c(Date.now()),1e3);return()=>clearInterval(e)},[null===a||void 0===a?void 0:a.waitStartedAt]),(0,r.useEffect)(()=>(uy(e=>{s(e),l(null),d((0,gb.Xl)()),t(!0)}),()=>uy(null)),[]),(0,r.useEffect)(()=>{if(!e)return;const n=e=>{"Escape"!==e.key||null!==a&&void 0!==a&&a.status||t(!1)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,null===a||void 0===a?void 0:a.status]);const p=(0,r.useCallback)(e=>{Og("mobile_wallet_picker_choice",{wallet:e,method:"universal_link"}),window.location.href=hy(e,i)},[i]),f=(0,r.useCallback)(()=>{Og("mobile_wallet_picker_choice",{wallet:"phantom",method:"phantom_deeplink"});const e=i?"".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search,"#").concat(i):dy();(0,gb.Wn)({returnUrl:e,anchor:i})},[i]),m=(0,r.useCallback)(async e=>{l({walletLabel:e.name,badgeBg:e.badgeBg,badgeText:e.badgeText,status:"Opening ".concat(e.name,"\u2026"),error:null,waitStartedAt:null,autoReturns:e.autoReturns}),Og("mobile_wallet_picker_choice",{wallet:e.walletId,method:"phantom"===e.walletId?"phantom_walletconnect":"jupiter_walletconnect"});try{const r="Sign in to deepnets.ai\nTimestamp: ".concat((new Date).toISOString()),i=(new TextEncoder).encode(r),s="phantom"===e.walletId?(await n.e(289).then(n.bind(n,1289))).connectPhantomWCAndSignMessage:(await n.e(765).then(n.bind(n,8765))).connectJupiterAndSignMessage,{publicKey:a,signature:c}=await s(i,()=>{l(t=>t&&(0,o.A)((0,o.A)({},t),{},{status:e.autoReturns?"Approve in ".concat(e.name,"\u2026"):"Approve in ".concat(e.name,", then return to Safari"),waitStartedAt:Date.now()}))});l(e=>e&&(0,o.A)((0,o.A)({},e),{},{status:"Signing you in\u2026",waitStartedAt:null}));const u="phantom"===e.walletId?"phantom_walletconnect":"jupiter_walletconnect";await h(a,r,c,u),t(!1),l(null)}catch(h$){const n=(null===h$||void 0===h$?void 0:h$.message)||"".concat(e.name," sign-in failed");let r;r=n.toLowerCase().includes("rejected")||n.toLowerCase().includes("cancel")?"Cancelled in ".concat(e.name):n.toLowerCase().includes("timed out")?"Timed out \u2014 make sure ".concat(e.name," is installed and try again"):n,l(e=>e&&(0,o.A)((0,o.A)({},e),{},{status:"",error:r,waitStartedAt:null}))}},[h]);if(!e)return null;const g=!(null===a||void 0===a||!a.status),y=null!==a&&void 0!==a&&a.waitStartedAt?Math.floor((Date.now()-a.waitStartedAt)/1e3):0;return(0,Lg.jsxs)("div",{className:"fixed inset-0 z-[110] flex items-end sm:items-center justify-center",children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px]",onClick:()=>{g||t(!1)}}),(0,Lg.jsxs)("div",{className:"relative w-full sm:max-w-md bg-crypto-gray border border-gray-700 sm:rounded-xl rounded-t-xl shadow-2xl",children:[(0,Lg.jsxs)("div",{className:"p-5 border-b border-gray-800 flex items-start justify-between",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Open in your wallet"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-xs mt-1",children:"Pick your wallet \u2014 we'll handle the rest."})]}),(0,Lg.jsx)("button",{onClick:()=>{g||t(!1)},disabled:g,className:"text-gray-500 hover:text-white disabled:opacity-40 text-xl leading-none -mt-1",children:"\xd7"})]}),g&&a?(0,Lg.jsxs)("div",{className:"p-6 text-center",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-center mb-4",children:[(0,Lg.jsx)("div",{className:"w-9 h-9 rounded-full ".concat(a.badgeBg," flex items-center justify-center text-white font-bold mr-3"),children:a.badgeText}),(0,Lg.jsx)("div",{className:"animate-spin w-5 h-5 border-2 border-crypto-accent border-t-transparent roun
2ded-full"})]}),(0,Lg.jsx)("p",{className:"text-white font-medium mb-1",children:a.status}),a.waitStartedAt?(0,Lg.jsxs)(Lg.Fragment,{children:[!a.autoReturns&&(0,Lg.jsxs)("p",{className:"text-amber-400 text-xs font-medium",children:[a.walletLabel," doesn't switch back automatically \u2014 tap your Safari tab once you approve"]}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-[11px] mt-2",children:["Waiting \xb7 ",y,"s"]}),y>15&&!a.autoReturns&&(0,Lg.jsxs)("p",{className:"text-gray-600 text-[11px] mt-3 leading-snug",children:["iOS pauses Safari while you're in ",a.walletLabel,". The connection resumes within a few seconds of returning here."]})]}):(0,Lg.jsx)("p",{className:"text-gray-500 text-xs",children:"Hang tight\u2026"}),a.error&&(0,Lg.jsx)("p",{className:"text-red-400 text-xs mt-3",children:a.error})]}):(0,Lg.jsx)("div",{className:"p-3",children:pj.map(e=>{const t="wc"===e.kind?()=>m(e):"phantom-deeplink"===e.kind?f:()=>p(e.id),n="wc"===e.kind?e.autoReturns?"One-tap sign-in via WalletConnect":"Sign in directly \u2014 no app switch back needed":"phantom-deeplink"===e.kind?u?"Saved \u2014 skip connect, just sign":"Connect Phantom, then sign to log in":null,r="bounce"===e.kind?"Open \u2192":"phantom-deeplink"===e.kind&&u?"Sign in \u2192":"Connect \u2192";return(0,Lg.jsxs)("button",{onClick:t,disabled:g,className:"w-full flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-crypto-dark disabled:opacity-50 transition-colors text-left",children:[(0,Lg.jsx)("span",{className:"flex items-center justify-center w-9 h-9 rounded-full font-bold text-white ".concat(e.badgeBg),children:e.badgeText}),(0,Lg.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,Lg.jsx)("span",{className:"text-white font-medium block",children:e.name}),n&&(0,Lg.jsx)("span",{className:"text-xs block truncate text-gray-500",children:n})]}),(0,Lg.jsx)("span",{className:"text-crypto-accent text-xs whitespace-nowrap",children:r})]},e.name)})}),(0,Lg.jsx)("div",{className:"p-3 pt-0",children:(0,Lg.jsx)("button",{onClick:()=>{g||t(!1)},disabled:g,className:"w-full text-center text-xs text-gray-500 hover:text-gray-300 disabled:opacity-40 py-2",children:"Cancel"})})]})]})},mj=()=>{const[e]=vt(),t=he(),{loginWithSignedMessage:n}=Bg(),[i,s]=(0,r.useState)("Completing sign-in\u2026"),[a,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)("(pending)"),[h,p]=(0,r.useState)(!1),[f]=(0,r.useState)(()=>(0,gb.RZ)()),m=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(m.current)return;m.current=!0;const t=(0,gb.P_)(e);if(d(t.kind),"idle"===t.kind)return s("No sign-in in progress"),void o("Phantom returned but we have no record of the flow on this device. Most likely localStorage was cleared between hops.");if("rejected"===t.kind){if(t.txReturnUrl){const e=new URL(t.txReturnUrl,window.location.origin);return e.searchParams.set("phantom-tx-pending","1"),void window.location.replace(e.toString())}return o("Cancelled in Phantom"),void s("Sign-in cancelled")}if("error"===t.kind){if(t.txReturnUrl){const e=new URL(t.txReturnUrl,window.location.origin);return e.searchParams.set("phantom-tx-pending","1"),void window.location.replace(e.toString())}return o(t.message),void s("Sign-in failed")}if("sign-needed"===t.kind)return s("Connected to Phantom \u2014 sign a message to finish logging in"),void c(t.publicKey);if("login-ready"===t.kind)return s("Signing you in\u2026"),Og("login_completed",{method:"phantom_deeplink"}),void n(t.publicKey,t.message,t.signature,"phantom_deeplink").then(()=>{window.location.replace(t.returnUrl)}).catch(e=>{o((null===e||void 0===e?void 0:e.message)||"Login failed after Phantom sign"),s("Sign-in failed")});if("tx-signed"===t.kind){s("Sending transaction\u2026"),Og("phantom_tx_signed",{operation:t.operation});const e=new URL(t.returnUrl,window.location.origin);return e.searchParams.set("phantom-tx-pending","1"),void window.location.replace(e.toString())}},[]);const g=!a&&!l&&"idle"!==u;return(0,Lg.jsx)("div",{className:"min-h-screen bg-crypto-dark text-white flex items-center justify-center px-4",children:(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6 w-full max-w-sm shadow-2xl text-center",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-center mb-4",children:[(0,Lg.jsx)("div",{className:"w-9 h-9 rounded-full bg-purple-500 flex items-center justify-center text-white font-bold mr-3",children:"P"}),g&&(0,Lg.jsx)("div",{className:"animate-spin w-5 h-5 border-2 border-crypto-accent border-t-transparent roun
2ded-full"})]}),(0,Lg.jsx)("p",{className:"text-white font-medium",children:i}),a&&(0,Lg.jsx)("p",{className:"text-red-400 text-xs mt-3",children:a}),l&&!a&&(0,Lg.jsx)("button",{onClick:()=>{if(!l)return;s("Opening Phantom\u2026");const e=(new Date).toISOString(),t="Sign in to deepnets.ai\nTimestamp: ".concat(e),n=(new TextEncoder).encode(t);try{(0,gb.AX)(n,l)}catch(h$){o((null===h$||void 0===h$?void 0:h$.message)||"Could not start sign step"),s("Sign-in failed")}},className:"mt-5 w-full py-3 bg-purple-500 hover:bg-purple-400 text-white font-semibold rounded-lg transition-colors",children:"Sign in \u2192"}),(a||"idle"===u)&&(0,Lg.jsx)("button",{onClick:()=>t("/",{replace:!0}),className:"mt-4 w-full py-2 text-xs text-gray-400 hover:text-white",children:"Back to home"}),(0,Lg.jsxs)("button",{onClick:()=>p(e=>!e),className:"mt-6 text-[10px] text-gray-600 hover:text-gray-400",children:[h?"Hide":"Show"," diagnostics"]}),h&&(0,Lg.jsx)("pre",{className:"mt-2 text-left text-[10px] text-gray-500 bg-black/40 rounded p-2 overflow-x-auto whitespace-pre-wrap break-all",children:"result: ".concat(u,"\n").concat(Object.entries(f).map(e=>{let[t,n]=e;return"".concat(t,": ").concat(n)}).join("\n"),"\nparams: ").concat(Array.from(e.entries()).map(e=>{let[t,n]=e;return"".concat(t,"=").concat(n.slice(0,24),"\u2026")}).join("\n ")||"(none)")})]})})},gj=()=>(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12",children:[(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-8",children:"Terms of Service"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-8",children:"Last updated: March 9, 2026"}),(0,Lg.jsxs)("div",{className:"space-y-8 text-gray-300 leading-relaxed",children:[(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"1. Acceptance of Terms"}),(0,Lg.jsx)("p",{children:'By accessing or using deepnets.ai (the "Service"), operated by Percipio LLC ("we", "us", or "our"), you agree to be bound by these Terms of Service. If you do not agree to these terms, do not use the Service.'})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"2. Description of Service"}),(0,Lg.jsx)("p",{children:"Deepnets.ai provides blockchain token analysis, holder research, wallet network mapping, and related informational tools for the Solana ecosystem. The Service analyzes publicly available on-chain data and presents it in an accessible format."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"3. Not Financial Advice"}),(0,Lg.jsxs)("p",{children:[(0,Lg.jsx)("strong",{className:"text-white",children:"The Service is for informational purposes only."})," Nothing on deepnets.ai constitutes financial advice, investment advice, trading advice, or any other kind of professional advice. You should not treat any of the Service's content as such."]}),(0,Lg.jsx)("p",{className:"mt-2",children:"Risk scores, safety assessments, and analysis results are generated algorithmically and may be incomplete, inaccurate, or outdated. Always do your own research (DYOR) before making any trading or investment decisions."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"4. Accounts and Authentication"}),(0,Lg.jsx)("p",{children:"To access certain features, you must connect a Solana wallet. By connecting your wallet, you authenticate your identity through a cryptographic signature. You are responsible for maintaining the security of your wallet and any activity that occurs under your account."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"5. Credits"}),(0,Lg.jsx)("p",{children:"Certain features of the Service require credits. New accounts may receive a complimentary credit balance. Credits are non-transferable, non-refundable, and have no cash value. We reserve the right to modify credit pricing, availability, and the features that require credits at any time."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"6. Acceptable Use"}),(0,Lg.jsx)("p",{children:"You agree not to:"}),(0,Lg.jsxs)("ul",{className:"list-disc list-inside mt-2 space-y-1 text-gray-400",children:[(0,Lg.jsx)("li",{children:"Use the Service for any unlawful purpose"}),(0,Lg.jsx)("li",{children:"Attempt to gain unauthorized access to any part of the Service"}),(0,Lg.jsx)("li",{children:"Scrape, crawl, or use automated tools to extract data at scale without permission"}),(0,Lg.jsx)("li",{children:"Interfere with or disrupt the Service or its infrastru
2cture"}),(0,Lg.jsx)("li",{children:"Impersonate another person or entity"}),(0,Lg.jsx)("li",{children:"Use the Service to manipulate markets or facilitate fraud"})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"7. Intellectual Property"}),(0,Lg.jsx)("p",{children:"The Service, including its design, code, analysis algorithms, and original content, is owned by Percipio LLC. On-chain data analyzed by the Service is publicly available and not claimed as our intellectual property."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"8. Limitation of Liability"}),(0,Lg.jsx)("p",{children:"To the maximum extent permitted by law, Percipio LLC shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses resulting from:"}),(0,Lg.jsxs)("ul",{className:"list-disc list-inside mt-2 space-y-1 text-gray-400",children:[(0,Lg.jsx)("li",{children:"Your use or inability to use the Service"}),(0,Lg.jsx)("li",{children:"Any errors, inaccuracies, or omissions in the Service's analysis or data"}),(0,Lg.jsx)("li",{children:"Any trading or investment decisions made based on information from the Service"}),(0,Lg.jsx)("li",{children:"Unauthorized access to or alteration of your account"})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"9. Disclaimer of Warranties"}),(0,Lg.jsx)("p",{children:'The Service is provided "as is" and "as available" without warranties of any kind, either express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and non-infringement.'})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"10. Modifications"}),(0,Lg.jsx)("p",{children:"We reserve the right to modify these Terms at any time. Changes will be posted on this page with an updated date. Your continued use of the Service after changes constitutes acceptance of the revised Terms."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"11. Termination"}),(0,Lg.jsx)("p",{children:"We may suspend or terminate your access to the Service at any time, with or without cause, and with or without notice. Upon termination, any unused credits will be forfeited."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"12. Contact"}),(0,Lg.jsxs)("p",{children:["Questions about these Terms? Reach out via"," ",(0,Lg.jsx)("a",{href:"mailto:[email protected]",className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"[email protected]"}),"."]})]})]}),(0,Lg.jsxs)("div",{className:"mt-12 pt-8 border-t border-gray-800 flex justify-between",children:[(0,Lg.jsx)(ft,{to:"/",className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"\u2190 Back to home"}),(0,Lg.jsx)(ft,{to:"/privacy",className:"text-blue-400 hover:text-blue-300",children:"Privacy Policy \u2192"})]})]}),(0,Lg.jsx)(_y,{})]}),yj=()=>(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12",children:[(0,Lg.jsxs)("div",{className:"mb-8",children:[(0,Lg.jsx)("h1",{className:"text-4xl font-bold mb-2",children:"Deepnets Utility Token: $DNET"}),(0,Lg.jsx)("div",{className:"text-gray-500 text-sm",children:"Last updated: March 2026 \u2014 Added Optional Staking Pool for Long-Term Ecosystem Alignment section."})]}),(0,Lg.jsxs)("div",{className:"space-y-10 text-gray-300 leading-relaxed",children:[(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Abstract"}),(0,Lg.jsx)("p",{children:"$DNET is a pure utility token designed to power premium features on deepnets.ai, the platform dedicated to making the crypto trenches safe through real-time, AI-driven analysis of new tokens."}),(0,Lg.jsx)("p",{className:"mt-3",children:'Existing research remains completely free for everyone. New research triggers, priority alerts on "clean" tokens, and API access require burning $DNET. Every single token spent is permanently removed from circulation.'}),(0,Lg.jsx)("div",{className:"mt-4 p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Important:"})," $DNET is ",(0,Lg.jsx)("strong",{children:"not"})," an investment. It confers ",(0,Lg.jsx)("strong",{children:"zero"})," equity, ownership, dividends, or profit rights in deepnets.ai. Its only purpose is to unlock platform utility."]})})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"The Problem"}),(0,Lg.jsx)("p",{children:"The crypto trenches are dangerous. New tokens launch every minute. Most are scams, rugs, or honeypots. Retail traders and even experienced analysts lack affordable, real-time deep research. Building and running the necessary AI infrastru
2cture is expensive."}),(0,Lg.jsx)("p",{className:"mt-3",children:"Traditional subscription models exclude the very community that needs protection most. We needed a native, on-chain way to fund the mission while keeping core research open to all."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Our Solution: Deepnets.ai + $DNET"}),(0,Lg.jsx)("p",{children:'Deepnets.ai delivers production-grade token analysis (contract security, liquidity checks, holder distribution, social sentiment, and "clean token" scoring).'}),(0,Lg.jsx)("p",{className:"mt-3",children:"All historical reports and the public watchlist are free forever."}),(0,Lg.jsx)("p",{className:"mt-3",children:"To fund ongoing research and prevent abuse, we offer multiple access paths \u2014 $DNET burns for per-use credits, $DNET holding for permanent tier access, or conventional monthly subscriptions for those who prefer traditional payments:"}),(0,Lg.jsxs)("ul",{className:"mt-3 space-y-2 ml-6",children:[(0,Lg.jsxs)("li",{className:"flex items-start",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent mr-2",children:"\u2022"}),(0,Lg.jsx)("span",{children:"Burn $DNET \u2192 instantly receive credits."})]}),(0,Lg.jsxs)("li",{className:"flex items-start",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent mr-2",children:"\u2022"}),(0,Lg.jsx)("span",{children:"1 credit = 1 new research request (~$0.15 USD equivalent)."})]}),(0,Lg.jsxs)("li",{className:"flex items-start",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent mr-2",children:"\u2022"}),(0,Lg.jsx)("span",{children:"Hold $DNET \u2192 unlock tier access for as long as you hold."})]}),(0,Lg.jsxs)("li",{className:"flex items-start",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent mr-2",children:"\u2022"}),(0,Lg.jsx)("span",{children:"Subscribe monthly \u2192 conventional payment option ($10/mo Watcher, $150/mo Deep Diver)."})]}),(0,Lg.jsxs)("li",{className:"flex items-start",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent mr-2",children:"\u2022"}),(0,Lg.jsx)("span",{children:"Priority notifications when genuinely clean tokens hit the watchlist."})]}),(0,Lg.jsxs)("li",{className:"flex items-start",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent mr-2",children:"\u2022"}),(0,Lg.jsx)("span",{children:"API access for bots and power users."})]})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Traditional Subscriptions"}),(0,Lg.jsx)("p",{children:"For users who prefer conventional payments over token holdings, we offer monthly subscriptions:"}),(0,Lg.jsxs)("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h3",{className:"text-white font-semibold mb-2",children:"\ud83d\udc41\ufe0f Watcher \u2014 $10/mo"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Access to new research under 2 hours old. Priority watchlist alerts. No $DNET holding required."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h3",{className:"text-white font-semibold mb-2",children:"\ud83d\udd31 Deep Diver \u2014 $150/mo"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Everything in Watcher plus full API access for programmatic research. Ideal for traders and developers."})]})]}),(0,Lg.jsxs)("p",{className:"mt-4 text-gray-400 text-sm",children:["Subscriptions are an ",(0,Lg.jsx)("strong",{className:"text-white",children:"alternative"})," to $DNET holding, not a replacement. If you hold enough $DNET for a tier, you don't need to subscribe \u2014 your access is permanent as long as you hold. Both options are valid; choose what works best for you."]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"$DNET Token Utility & 100% Burn Mechanic"}),(0,Lg.jsxs)("div",{className:"space-y-4",children:[(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h3",{className:"text-white font-semibold mb-2",children:"\ud83d\udd25 100% Burn on Every Use"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"When you purchase credits, every $DNET is permanently burned. Supply shrinks with real platform usage. This creates deflationary pressure and aligns incentives."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h3",{className:"text-white font-semibold mb-2",children:"\ud83d\udcca Dynamic Pricing"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"The system always targets ~$0.15 USD per credit using real-time market data. You always know the exact USD cost before burning."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h3",{className:"text-white font-semibold mb-2",children:"\ud83d\udce6 Bundles & Perks"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Volume discounts, Monthly Unlimited option, and free daily credits for larger holders."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h3",{className:"text-white font-semibold mb-2",children:"\ud83d\udc8e Holder Benefits"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"The more the platform is used, the more supply is permanently removed, benef
2iting every holder."})]})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Optional Staking Pool for Long-Term Ecosystem Alignment"}),(0,Lg.jsxs)("p",{children:["As an additional, fully optional ecosystem feature, deepnets.ai has established a permissionless staking pool built on"," ",(0,Lg.jsx)("a",{href:"https://tibane.com",target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"Tibane Labs"})," ","infrastructure. This pool is a voluntary, time-weighted loyalty mechanism designed to recognize holders who maintain sustained commitment to the deepnets.ai ecosystem."]}),(0,Lg.jsx)("div",{className:"mt-4 p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Note:"})," This is ",(0,Lg.jsx)("strong",{children:"not"})," Solana protocol staking (i.e., delegating SOL to validators for network consensus). It is a custom, permissionless pool funded by redirecting a portion of the creator's own SOL fees. It does not alter the core utility or consumable nature of $DNET."]})}),(0,Lg.jsx)("h3",{className:"text-lg font-semibold text-white mt-6 mb-3",children:"How It Works"}),(0,Lg.jsxs)("div",{className:"space-y-4",children:[(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h4",{className:"text-white font-semibold mb-2",children:"Pool Funding"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"42% of the creator's personal creator-fee SOL (generated from $DNET trading volume) is directed into the staking pool. These are funds that would otherwise go to the creator \u2014 they are voluntarily redirected to the pool as a gesture of ecosystem alignment."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h4",{className:"text-white font-semibold mb-2",children:"Time-Weighted Staking"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Staking weight grows over time according to the formula:"}),(0,Lg.jsxs)("div",{className:"mt-2 p-3 bg-crypto-dark rounded font-mono text-sm text-crypto-accent",children:["weight = 1 \u2212 e",(0,Lg.jsx)("sup",{children:"\u2212age/\u03c4"})," \xa0\xa0where \u03c4 = 21 days"]}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mt-2",children:"Participants who stake for longer accumulate greater weight, and therefore a larger share of the pool. Early unstakers receive proportionally lower weight. This incentivizes long-term alignment and commitment rather than short-term participation."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h4",{className:"text-white font-semibold mb-2",children:"Zero Lockup, Zero Cooldown"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"There is no mandatory lockup period and no cooldown. Participants may unstake at any time. The time-weighted formula naturally differentiates between short-term and long-term participants without imposing restrictions."})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("h4",{className:"text-white font-semibold mb-2",children:"Permissionless & On-Chain"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"The pool operates on Tibane Labs' permissionless on-chain infrastructure. Staking and unstaking are executed directly via smart contract interactions \u2014 no intermediary or approval is required."})]})]}),(0,Lg.jsx)("div",{className:"mt-6 p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Important:"})," $DNET's primary and defining utility remains consumption via burning for platform features (research credits, priority alerts, API access). The staking pool is an additional, optional mechanism and does not change the token's status as a pure utility token with no equity, ownership, dividends, or profit rights. Participation in the staking pool does not create any new rights or entitlements beyond what is described
2in this section."]})})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Tokenomics (Fully Fair Launch)"}),(0,Lg.jsxs)("div",{className:"mb-4 p-4 bg-crypto-gray border border-crypto-accent/30 rounded-lg",children:[(0,Lg.jsx)("div",{className:"text-gray-400 text-sm mb-1",children:"Token Mint Address"}),(0,Lg.jsx)("a",{href:"https://pump.fun/coin/93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump",target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:text-crypto-accent/80 font-mono text-sm break-all transition-colors",children:"93VXFhKsGXsraivwdwAwoVXHKd4U1TFL64oQYpVjpump"})]}),(0,Lg.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("div",{className:"text-crypto-accent text-2xl font-bold",children:"1,000,000,000"}),(0,Lg.jsx)("div",{className:"text-gray-400 text-sm mt-1",children:"Total Supply (fixed)"})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("div",{className:"text-crypto-accent text-2xl font-bold",children:"pump.fun"}),(0,Lg.jsx)("div",{className:"text-gray-400 text-sm mt-1",children:"Launch Platform (Solana)"})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("div",{className:"text-crypto-accent text-2xl font-bold",children:"4.5%"}),(0,Lg.jsx)("div",{className:"text-gray-400 text-sm mt-1",children:"Founder Allocation (at creation)"})]}),(0,Lg.jsxs)("div",{className:"p-4 bg-crypto-gray border border-gray-700 rounded-lg",children:[(0,Lg.jsx)("div",{className:"text-crypto-accent text-2xl font-bold",children:"100%"}),(0,Lg.jsx)("div",{className:"text-gray-400 text-sm mt-1",children:"Fair Launch, Zero Pre-mine"})]})]}),(0,Lg.jsxs)("div",{className:"mt-4 space-y-2 text-gray-400 text-sm",children:[(0,Lg.jsxs)("p",{children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Liquidity:"})," Automatic graduation to PumpSwap with LP tokens burned."]}),(0,Lg.jsxs)("p",{children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Revenue for the Platform:"})," Creator fees from all trading volume (tiered by market cap). Of the creator-fee SOL, 42% is directed to the optional staking pool (see above) and the remainder supports platform operations. User burns go 100% to permanent reduction. Never to any team wallet."]}),(0,Lg.jsxs)("p",{children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Dev Tokens:"})," The founder allocation (4.5%) is"," ",(0,Lg.jsx)("strong",{className:"text-white",children:"locked"}),". These tokens cannot be sold or transferred until unlock conditions are met, ensuring long-term alignment with the community."]}),(0,Lg.jsx)("p",{className:"text-white font-semibold",children:"No Hidden Allocations. Dev tokens locked."})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"How It Works (User Flow)"}),(0,Lg.jsx)("div",{className:"space-y-3",children:["Connect Solana wallet on deepnets.ai.","See current $DNET balance and live credit pricing.","Choose credits or bundle \u2192 confirm exact burn amount (always ~$0.15 USD each).","Burn transaction \u2192 credits appear instantly + on-chain proof.","Trigger new research, get alerts, or use the API."].map((e,t)=>(0,Lg.jsxs)("div",{className:"flex items-start space-x-4",children:[(0,Lg.jsx)("div",{className:"flex-shrink-0 w-8 h-8 bg-crypto-accent text-crypto-dark rounded-full flex items-center justify-center font-bold text-sm",children:t+1}),(0,Lg.jsx)("p",{className:"pt-1",children:e})]},t))}),(0,Lg.jsx)("p",{className:"mt-4 text-crypto-accent font-medium",children:"All existing research stays free."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Legal & Important Disclaimers"}),(0,Lg.jsxs)("div",{className:"p-6 bg-crypto-gray border border-gray-700 rounded-lg space-y-3 text-gray-400 text-sm",children:[(0,Lg.jsx)("p",{children:"$DNET is a utility token for accessing features on deepnets.ai only."}),(0,Lg.jsxs)("p",{children:["It is ",(0,Lg.jsx)("strong",{className:"text-white",children:"not"})," an investment contract, security, or equity in deepnets.ai or any related entity."]}),(0,Lg.jsx)("p",{children:"There is no expectation of profit from the efforts of the team."}),(0,Lg.jsx)("p",{children:"Token value derives solely from demand for platform usage and may go to zero."}),(0,Lg.jsx)("p",{children:"Past performance is not indicative of future results."}),(0,Lg.jsx)("p",{children:"Deepnets.ai research is for informational purposes only, not financial advice. Always do your own research."}),(0,Lg.jsx)("p",{children:"Users in restricted jurisdictions should consult local regulations."}),(0,Lg.jsx)("p",{children:"By using $DNET you agree that it functions purely as a consumable access credential."}),(0,Lg.jsxs)("p",{className:"pt-2 border-t border-gray-600",children:[(0,Lg.jsx)("strong",{className:"text-white",children:"Regarding the Optional Staking Pool:"})," Participation in the staking pool is entirely voluntary and does not constitute an investment contract or create any expectation of profits derived from the efforts of others. The pool is funded solely by a voluntary redirection of the creator's personal creator-fee SOL. No guarantees are made regarding amounts received from the pool, which depen
2d entirely on trading volume, overall participation levels, and individual staking duration. The staking pool does not alter any of the disclaimers stated above. $DNET remains a pure utility token regardless of whether a holder chooses to participate in the pool."]})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:"Vision"}),(0,Lg.jsx)("p",{children:"We launched $DNET because we believe in the system. We are eating our own dogfood, burning our own tokens alongside users, and funding the mission through transparent creator fees and genuine utility."}),(0,Lg.jsx)("p",{className:"mt-3",children:"The trenches are safer when everyone has access to real research."}),(0,Lg.jsx)("p",{className:"mt-6 text-center text-xl font-bold text-crypto-accent",children:"Welcome to the safe side of the trenches."}),(0,Lg.jsxs)("p",{className:"mt-4 text-center text-gray-500",children:["deepnets.ai | ",(0,Lg.jsx)("strong",{className:"text-white",children:"$DNET"})," | Burn. Research. Protect."]})]})]})]}),(0,Lg.jsx)(_y,{})]}),xj=e=>{const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return n<60?"".concat(n,"m ago"):r<24?"".concat(r,"h ago"):"".concat(i,"d ago")},vj=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toLocaleString(),bj={promoting:{label:"Shilling",color:"text-red-400",bg:"bg-red-500/10",border:"border-red-500/30",icon:"fas fa-thumbs-down"},dissuading:{label:"Calling Out Scams",color:"text-green-400",bg:"bg-green-500/10",border:"border-green-500/30",icon:"fas fa-thumbs-up"},neutral:{label:"Neutral",color:"text-gray-400",bg:"bg-gray-500/10",border:"border-gray-500/30",icon:"fas fa-comment"}},wj={DANGEROUS:"bg-red-500/20 text-red-400 border-red-500/30",RISKY:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",OK:"bg-green-500/20 text-green-400 border-green-500/30",SAFE:"bg-green-500/20 text-green-400 border-green-500/30"};function _j(e,t,n,r,i){const s=null!=n&&r?"".concat(n.toFixed(0),"% of $").concat(t," supply is held by ").concat(r," wallets tracing to one operator."):"",a="https://deepnets.ai/token/".concat(i);return"promoting"===e?"\u26a0\ufe0f Heads up \u2014 this token looks risky. ".concat(s,"\n\nSee the full analysis: ").concat(a):"dissuading"===e?"\ud83d\udcaf This checks out. ".concat(s,"\n\nFull breakdown here: ").concat(a):"".concat(s,"\n\nAnalysis: ").concat(a)}const jj=["all","promoting","dissuading","neutral"],kj=["6","24","48","168"],Nj=()=>{const[e,t]=vt(),n=jj.includes(e.get("intent"))?e.get("intent"):"promoting",i=kj.includes(e.get("hours"))?e.get("hours"):"48",s=e.get("author")||"",[a,o]=(0,r.useState)([]),[l,c]=(0,r.useState)({total:0,promoting:0,dissuading:0,neutral:0}),[u,d]=(0,r.useState)(!0),[h,p]=(0,r.useState)(null),[f,m]=(0,r.useState)(n),[g,y]=(0,r.useState)(i),[x,v]=(0,r.useState)(s),b=(0,r.useCallback)((e,n,r)=>{const i={};"promoting"!==e&&(i.intent=e),"48"!==n&&(i.hours=n),r.trim()&&(i.author=r.trim()),t(i,{replace:!0})},[t]),w=async()=>{try{var e;d(!0),p(null);const t=Eg(),n=new URLSearchParams({hours:g,limit:"100"});"all"!==f&&n.set("intent",f),x.trim()&&n.set("author",x.trim());const r=await Ng("".concat(t,"/api/shill-activity?").concat(n));if(!r.ok)throw new Error("Failed to fetch activity");const i=await r.json();o(null!==(e=i.tweets)&&void 0!==e?e:[]),i.counts&&c(i.counts)}catch(h$){p(h$ instanceof Error?h$.message:"An error occurred")}finally{d(!1)}};(0,r.useEffect)(()=>{w()},[g,f]),(0,r.useEffect)(()=>{const e=setTimeout(()=>w(),400);return()=>clearTimeout(e)},[x]);const _=a,j=new Map;for(const r of a){const e=j.get(r.mint);var k;if(e)e.count++;else j.set(r.mint,{count:1,symbol:r.tokenSymbol||(null===(k=r.tokenSafety)||void 0===k?void 0:k.tokenSymbol)||"???"})}const N={all:l.total,promoting:l.promoting,dissuading:l.dissuading,neutral:l.neutral};return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-5xl mx-auto px-6 py-8",children:[(0,Lg.jsxs)("div",{className:"mb-8",children:[(0,Lg.jsxs)("h1",{className:"text-3xl font-bold mb-2 flex items-center",children:[(0,Lg.jsx)("i",{className:"fas fa-broadcast-tower text-crypto-accent mr-3"}),"Shill Tracker"]}),(0,Lg.jsx)("p",{className:"text-gray-400",children:"Real-time detection of accounts promoting tokens with concentrated wallet networks on X."})]}),(0,Lg.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-lg p-4 text-center",children:[(0,Lg.jsx)("div",{className:"text-2xl font-bold text-red-400",children:N.promoting}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Shilling"})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-lg p-4 text-center",children:[(0,Lg.jsx)("div",{className:"text-2xl font-bold text-green-400",children:N.dissuading}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Calling Out Scams"})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-lg p-4 text-center",children:[(0,Lg.jsx)("div",{className:"text-2xl font-bold text-white",children:j.size}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Tokens Mentioned"})]})]}),(0,Lg.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-6",children:[(0,Lg.jsxs)("div",{className:"relative",children:[(0,Lg.jsx)("i",{className:"fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 text-xs"}),(0,Lg.jsx)("input",{type:"text",value:x,onChange:e=>{v(e.target.value),b(f,g,e.target.value)},placeholder:"Search by handle...",className:"bg-crypto-gray border border-gray-700 rounded-lg pl-8 pr-3 py-2 text-sm text-white placeholder-gray-500 focus:outline-none focus:border-crypto-accent transition-colors w-48"})]}),(0,Lg.jsx)("div",{className:"flex bg-crypto-gray rounded-lg overflow-hidden border border-gray-700",children:["all","promoting","dissuading","neutral"].map(e=>(0,Lg.jsxs)("button",{onClick:()=>{m(e),b(e,g,x)},className:"px-4 py-2 text-sm font-medium transition-colors ".concat(f===e?"bg-crypto-accent text-crypto-dark":"text-gray-400 hover:text-white"),children:["all"===e?"All":"promoting"===e?"Shilling":"dissuading"===e?"Calling Out Scams":"Neutral",(0,Lg.jsxs)("span",{className:"ml-1 opacity-60",children:["(",N[e],")"]})]},e))}),(0,Lg.jsx)("div",{className:"flex bg-crypto-gray rounded-lg overflow-hidden border border-gray-700",children:[["6","6h"],["24","24h"],["48","48h"],["168","7d"]].map(e=>{let[t,n]=e;return(0,Lg.jsx)("button",{onClick:()=>{y(t),b(f,t,x)},className:"px-3 py-2 text-sm font-medium transition-colors ".concat(g===t?"bg-crypto-accent text-crypto-dark":"text-gray-400 hover:text-white"),children:n},t)})})]}),u&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("div",{className:"w-8 h-8 border-2 border-gray-600 border-t-crypto-accent rounded-full animate-spin mx-auto mb-4"}),(0,Lg.jsx)("p",{className:"text-gray-400",children:"Loading activity..."})]}),h&&!u&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-red-400 text-4xl mb-4"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-4",children:h}),(0,Lg.jsx)("button",{onClick:w,className:"bg-crypto-accent text-crypto-dark px-4 py-2 rounded-lg font-medium",children:"Retry"})]}),!u&&!h&&0===_.length&&(0,Lg.jsxs)("div",{className:"text-center py-16 text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-ghost text-4xl mb-4 block"}),"No activity found for this filter."]}),!u&&!h&&_.length>0&&(0,Lg.jsx)("div",{className:"space-y-3",children:_.map(e=>{var t,n,r;const i=bj[e.intent],s=e.tokenSafety,a=null!==(t=null===s||void 0===s?void 0:s.overallSafetyLevel)&&void 0!==t?t:"",o=null!==(n=wj[a])&&void 0!==n?n:"bg-gray-500/20 text-gray-400 border-gray-500/30",l=e.tokenSymbol||(null===s||void 0===s?void 0:s.tokenSymbol)||"???",c=null===s||void 0===s?void 0:s.topNetworkOwnership,u=null===s||void 0===s?void 0:s.topNetworkWalletCount;return(0,Lg.jsxs)("div",{className:"bg-crypto-card rounded-xl p-4 border ".concat(i.border," hover:border-gray-600 transition-colors"),children:[(0,Lg.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,Lg.jsxs)("span",{className:"flex items-center gap-1 text-xs font-medium px-2 py-1 rounded ".concat(i.bg," ").concat(i.color," flex-shrink-0"),children:[(0,Lg.jsx)("i",{className:i.icon}),i.label]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[null!=c&&c>0&&(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 flex-shrink-0",children:[c.toFixed(0),"% \xb7 ",u," wallets"]}),(0,Lg.jsxs)(ft,{to:"/token/".concat(e.mint),className:"flex items-center gap-2 bg-crypto-gray/80 rounded-full px-3 py-1 hover:bg-gray-700 transition-colors flex-shrink-0",children:[null!==s&&void 0!==s&&null!==(r=s.metadata)&&void 0!==r&&r.image?(0,Lg.jsx)("img",{src:s.metadata.image,alt:"",className:"w-5 h-5 rounded-full"}):(0,Lg.jsx)("div",{className:"w-5 h-5 rounded-full bg-gray-600 flex items-center justify-center text-[10px] text-gray-400",children:l.charAt(0)}),(0,Lg.jsxs)("span",{className:"text-sm font-bold text-white",children:["$",l]}),a&&(0,Lg.jsx)("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded border ".concat(o),children:a})]})]})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Lg.jsxs)("a",{href:"https://x.com/".concat(e.authorHandle),target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-white hover:text-crypto-accent transition-colors",children:["@",e.authorHandle]}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500",children:[vj(e.authorFollowers)," followers"]}),(0,Lg.jsx)("span",{className:"text-xs text-gray-600",children:"\xb7"}),(0,Lg.jsx)("span",{className:"text-xs text-gray-500",children:xj(e.createdAt)}),e.engagement>0&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-xs text-gray-600",children:"\xb7"}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-heart mr-1"}),e.engagement]})]})]}),(0,Lg.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Lg.jsx)("a",{href:e.tweetUrl,target:"_blank",rel:"noopener noreferrer",className:"block text-sm text-gray-300 hover:text-gray-200 transition-colors line-clamp-3 leading-relaxed flex-1",children:e.tweetText}),(0,Lg.jsxs)("a",{href:"https://twitter.com/intent/tweet?in_reply_to=".concat(e.tweetId,"&text=").concat(encodeURIComponent(_j(e.intent,l,c,u,e.mint))),target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-crypto-gray/80 border border-gray-700 text-xs text-gray-400 hover:text-white hover:border-gray-500 transition-colors mt-0.5",title:"Reply to this tweet",children:[(0,Lg.jsx)("i",{className:"fas fa-reply"}),"Reply"]})]})]},e.tweetId)})})]}),(0,Lg.jsx)(_y,{})]})},Sj=e=>"watcher"===e?"Watcher":"Deep Diver",Ej=e=>"watcher"===e?"\ud83d\udc41\ufe0f":"\ud83d\udd31",Aj=e=>{var t,n;let{tier:i,onPaid:s,onCancel:a}=e;const{publicKey:l,signTransaction:c}=Ca(),{setVisible:u}=Ba(),{user:d,refreshUser:h}=Bg(),p=null!==(t=null===d||void 0===d?void 0:d.walletAddress)&&void 0!==t?t:null,f=null!==(n=null===l||void 0===l?void 0:l.toBase58()
2)&&void 0!==n?n:p,[m,g]=(0,r.useState)(null),[y,x]=(0,r.useState)(null),[v,b]=(0,r.useState)(!0),[w,_]=(0,r.useState)(!1),[j,k]=(0,r.useState)(null),[N,S]=(0,r.useState)(null),[E,A]=(0,r.useState)(null);(0,r.useEffect)(()=>{N&&Og("crypto_sub_pay_failed",{tier:i,reason:N})},[N,i]);const[C,M]=(0,r.useState)(null),[T,P]=(0,r.useState)(null),O=(0,r.useCallback)(async()=>{try{b(!0),x(null);const e=await Ng("".concat(Eg(),"/api/crypto-sub/price"));if(!e.ok)throw new Error("Failed to fetch pricing");g(await e.json())}catch(h$){x(h$ instanceof Error?h$.message:"Failed to load pricing")}finally{b(!1)}},[]);(0,r.useEffect)(()=>{O()},[O]);const I=f;(0,r.useEffect)(()=>{if(!I)return M(null),void P(null);let e=!1;return(async()=>{try{const t=await Ng("".concat(Eg(),"/api/crypto-sub/wallet-status/").concat(I));if(!t.ok)return;const n=await t.json();if(e)return;M(n.balanceUsdc),P(n.ataExists)}catch(t){}})(),()=>{e=!0}},[I]);const L=(0,r.useCallback)(async e=>{k("Sending transaction\u2026");const t=await Ng("".concat(Eg(),"/api/burn/send-transaction"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transaction:e})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to send transaction")}const{signature:n}=await t.json();k("Verifying payment and activating subscription\u2026");const r=localStorage.getItem("deepnets_token"),a=await Ng("".concat(Eg(),"/api/crypto-sub/verify"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},r?{Authorization:"Bearer ".concat(r)}:{}),body:JSON.stringify({txSignature:n,tier:i})});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||"Verification failed")}const l=await a.json();A({currentPeriodEnd:l.currentPeriodEnd,extended:!!l.extended,txSignature:n}),k(null),Og("crypto_sub_pay_succeeded",{tier:i,extended:!!l.extended,txSignature:n}),await h(),null===s||void 0===s||s()},[i,h,s]),R=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(R.current)return;if(!new URLSearchParams(window.location.search).has("phantom-tx-pending"))return;R.current=!0;const e=(0,gb.dj)("buy-subscription");if(!e)return;const t=new URL(window.location.href);if(t.searchParams.delete("phantom-tx-pending"),t.searchParams.delete("tier"),window.history.replaceState({},"",t.toString()),e.error)return S(e.error.toLowerCase().includes("cancel")?"Transaction cancelled":e.error),void _(!1);if(!e.signedTransactionBase58)return S("Phantom returned no signed transaction"),void _(!1);const n=Bs.A.decode(e.signedTransactionBase58),r=btoa(String.fromCharCode(...n));_(!0),S(null),A(null),L(r).catch(e=>{const t=(null===e||void 0===e?void 0:e.message)||"Payment failed";t.includes("User rejected")||Ig(e,{flow:"crypto_subscription_pay"}),S(t.includes("User rejected")?"Transaction cancelled":t),k(null)}).finally(()=>_(!1))},[L]);if(v)return(0,Lg.jsxs)("div",{className:"text-center py-6",children:[(0,Lg.jsx)("div",{className:"animate-spin w-6 h-6 border-2 border-crypto-accent border-t-transparent rounded-full mx-auto mb-2"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Loading pricing\u2026"})]});if(y||!m)return(0,Lg.jsxs)("div",{className:"text-center py-6",children:[(0,Lg.jsx)("p",{className:"text-red-400 text-sm mb-2",children:"Could not load pricing"}),(0,Lg.jsx)("button",{onClick:O,className:"text-crypto-accent hover:text-crypto-accent/80 text-sm",children:"Try again"})]});const D=m.tiers[i],B=!1===T,F=null!=C&&D&&C<D.usdcMonthly,U=null===d||void 0===d?void 0:d.cryptoSubscription,z=!(null===U||void 0===U||!U.active),q=z&&(null===U||void 0===U?void 0:U.tier)===i;return(0,Lg.jsxs)("div",{className:"space-y-4",children:[(0,Lg.jsxs)("div",{className:"text-center",children:[(0,Lg.jsx)("div",{className:"text-3xl mb-1",children:Ej(i)}),(0,Lg.jsxs)("div",{className:"text-white font-semibold",children:[Sj(i)," \u2014 1 month"]}),(0,Lg.jsxs)("div",{className:"text-gray-400 text-sm",children:[D.usdcMonthly.toFixed(2)," USDC, no auto-renewal"]})]}),z&&(0,Lg.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg border bg-crypto-dark border-gray-700 text-gray-300",children:q?"Extends your current ".concat(Sj(U.tier)," crypto sub. Period will run through ").concat(new Date(new Date(U.currentPeriodEnd).getTime()+864e5*D.periodDays).toLocaleDateString(),"."):"You currently have an active ".concat(Sj(U.tier)," crypto sub through ").concat(new Date(U.currentPeriodEnd).toLocaleDateString(),". Paying for ").concat(Sj(i)," resets the peri
2od to ").concat(D.periodDays," days from now.")}),I&&null!=C&&(0,Lg.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg border ".concat(B||F?"bg-yellow-500/10 border-yellow-500/30 text-yellow-400":"bg-crypto-dark border-gray-700 text-gray-400"),children:B?"No USDC found in this wallet. Fund it with USDC on Solana before paying.":"Wallet balance: ".concat(C.toFixed(2)," USDC")}),(0,Lg.jsx)("button",{onClick:async()=>{if(!m)return;const e=m.tiers[i];if(!e)return;Og("crypto_sub_pay_clicked",{tier:i,amountUsd:e.usdcMonthly});if(!l&&(0,gb.persistentPhantomWalletMatches)(p))try{_(!0),S(null),A(null),k("Building transaction\u2026");const t=new kn.J3(p),n=new kn.J3(m.usdcMint),r=new kn.J3(m.payToUsdcAta),s=hx(await sx(n,t,!1,Xy),n,r,t,BigInt(e.usdcMonthlyAtomic),m.usdcDecimals,[],Xy),a=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!a.ok)throw new Error("Could not fetch blockhash");const{blockhash:o}=await a.json(),l=(new kn.ZX).add(s);l.recentBlockhash=o,l.feePayer=t;const c=Bs.A.encode(l.serialize({requireAllSignatures:!1})),u="/tiers?tier=".concat(i);return void(0,gb.l3)({transactionBase58:c,operation:"buy-subscription",params:{tier:i},returnUrl:u})}catch(h$){return S((null===h$||void 0===h$?void 0:h$.message)||"Payment failed"),k(null),void _(!1)}if(!l&&!!p&&(0,yb.Qk)(p)){_(!0),S(null),A(null),k("Building transaction\u2026");try{const t=new kn.J3(p),n=new kn.J3(m.usdcMint),r=new kn.J3(m.payToUsdcAta),i=hx(await sx(n,t,!1,Xy),n,r,t,BigInt(e.usdcMonthlyAtomic),m.usdcDecimals,[],Xy),s=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!s.ok)throw new Error("Could not fetch blockhash");const{blockhash:a}=await s.json(),o=(new kn.ZX).add(i);o.recentBlockhash=a,o.feePayer=t;const l=Bs.A.encode(o.serialize({requireAllSignatures:!1}));k("Approve in your wallet\u2026");const c=await(0,yb.wI)(l),u=btoa(String.fromCharCode(...c));await L(u)}catch(h$){const t=(null===h$||void 0===h$?void 0:h$.message)||"Payment failed",n=t.includes("InvalidAccountData")||t.includes("invalid account data");t.toLowerCase().includes("reject")||t.toLowerCase().includes("cancel")?S("Transaction cancelled"):S(n?"No USDC found in this wallet. Fund it with USDC on Solana, then try again.":t),k(null)}finally{_(!1)}}else if(l&&c)if(p&&l.toBase58()!==p)S("Connected wallet doesn't match the wallet on your account (".concat(p.slice(0,4),"\u2026").concat(p.slice(-4),")"));else{_(!0),S(null),A(null),k("Building transaction\u2026");try{const t=new kn.J3(m.usdcMint),n=new kn.J3(m.payToUsdcAta),r=hx(await sx(t,l,!1,Xy),t,n,l,BigInt(e.usdcMonthlyAtomic),m.usdcDecimals,[],Xy);k("Preparing transaction\u2026");const i=await Ng("".concat(Eg(),"/api/burn/blockhash"));if(!i.ok)throw new Error("Could not fetch blockhash");const{blockhash:s}=await i.json(),a=(new kn.ZX).add(r);a.recentBlockhash=s,a.feePayer=l,k("Approve the USDC payment in your wallet\u2026");const o=(await c(a)).serialize().toString("base64");await L(o)}catch(h$){console.error("Crypto sub pay error:",h$);const t=(null===h$||void 0===h$?void 0:h$.message)||"Payment failed",n=t.includes("InvalidAccountData")||t.includes("invalid account data");t.includes("User rejected")||t.includes("rejected the request")?S("Transaction cancelled"):n?S("No USDC found in this wallet. Fund it with USDC on Solana, then try again."):t.toLowerCase().includes("insufficient")?S("".concat(t," \u2014 make sure your wallet has enough USDC and a small SOL balance for gas.")):S(t),k(null)}finally{_(!1)}}else{if(p)return void S("No active wallet session for signing. Sign out and sign in again with the wallet you want to pay from.");if(py())return;u(!0)}},disabled:w||!f||B||!!F,className:"w-full bg-crypto-accent hover:bg-crypto-accent/80 disabled:bg-gray-700 disabled:text-gray-500 disabled:cursor-not-allowed text-crypto-dark font-medium py-3 px-4 rounded-lg transition-colors flex items-center justify-center gap-2",children:w?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"animate-spin w-4 h-4 border-2 border-crypto-dark border-t-transparent rounded-full"}),(0,Lg.jsx)("span",{children:j||"Processing\u2026"})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{children:"\ud83e\ude99"}),(0,Lg.jsxs)("span",{children:[q?"Extend":"Pay"," ",D.usdcMonthly.toFixed(2)," USDC for 1 month"]})]})}),!f&&(0,Lg.jsx)("p",{className:"text-gray-500 text-xs text-center",children:"Connect your Solana wallet to pay with USDC"}),N&&(0,Lg.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:(0,Lg.jsx)("p",{className:"text-red-400 text-sm",children:N})}),E&&(0,Lg.jsxs)("div",{className:"p-3 bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg",children:[(0,Lg.jsxs)("p",{className:"text-crypto-accent text-sm font-medium",children:["\u2713 ",E.extended?"".concat(Sj(i)," extended"):"".concat(Sj(i)," active")," until ",new Date(E.currentPeriodEnd).toLocaleDateString()]}),(0,Lg.jsx)("a",{href:"https://solscan.io/tx/".concat(E.txSignature),target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white text-xs mt-1 block transition-colors",children:"View transaction \u2192"})]}),a&&(0,Lg.jsx)("button",{onClick:a,className:"w-full text-xs text-gray-500 hover:text-gray-300 py-1",children:"\u2190 Back"}),(0,Lg.jsx)("p",{className:"text-gray-600 text-xs text-center",children:"USDC on Solana mainnet. You'll need a small SOL balance for the network fee (~$0.001). Pay again before the peri
2od ends to extend."})]})},Cj=e=>{var t;let{target:n,onClose:i,onSubscribe:s,subscribing:a,defaultShowCryptoPay:o=!1}=e;const{user:l}=Bg(),[c,u]=(0,r.useState)(o);if((0,r.useEffect)(()=>{u(o)},[n,o]),(0,r.useEffect)(()=>{n&&Og("upgrade_picker_shown",{tier:n})},[n]),(0,r.useEffect)(()=>{if(!n)return;const e=e=>{"Escape"===e.key&&i()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[n,i]),!n)return null;const d=null!==(t=null===l||void 0===l?void 0:l.dnetBalance)&&void 0!==t?t:0,h=Ug[n],p=zg[n],f=p,m=Wg(n),g=Kg(n),y="watcher"===n?$g(null===l||void 0===l?void 0:l.dnetTier):Yg(null===l||void 0===l?void 0:l.dnetTier),x=Math.max(0,h-d),v=d>0?"dnet":"card",b=e=>"w-full text-left rounded-lg border p-4 transition-colors ".concat(v===e?"border-crypto-accent/60 bg-crypto-accent/5 hover:bg-crypto-accent/10":"border-gray-700 bg-crypto-dark/40 hover:border-gray-500");return(0,Lg.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center px-4",children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px]",onClick:i}),(0,Lg.jsxs)("div",{className:"relative bg-crypto-gray border border-gray-700 rounded-xl w-full max-w-lg shadow-2xl",children:[(0,Lg.jsxs)("div",{className:"p-6 border-b border-gray-800 flex items-start justify-between",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("h2",{className:"text-xl font-bold text-white flex items-center gap-2",children:[(0,Lg.jsx)("span",{children:g})," ",c?"Pay USDC for ".concat(m):"Upgrade to ".concat(m)]}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mt-1",children:c?"One month, no auto-renewal.":"Choose how you'd like to pay."})]}),(0,Lg.jsx)("button",{onClick:i,className:"text-gray-500 hover:text-white p-1","aria-label":"Close",children:(0,Lg.jsx)("i",{className:"fas fa-times"})})]}),c?(0,Lg.jsx)("div",{className:"p-6",children:(0,Lg.jsx)(Aj,{tier:n,onCancel:()=>u(!1),onPaid:()=>{}})}):(0,Lg.jsxs)("div",{className:"p-6 space-y-3",children:[(0,Lg.jsx)("button",{onClick:()=>{Og("upgrade_picker_choice",{tier:n,method:"hold_dnet"}),Og("buy_dnet_clicked",{source:"upgrade_picker",tier:n}),window.open(qg,"_blank","noopener,noreferrer")},className:b("dnet"),disabled:y,children:(0,Lg.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("p",{className:"text-white font-medium",children:["Hold ",Vg(h)," $DNET"]}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-xs mt-1",children:["Perpetual ",m," access while you hold. No subscription, no recurring charge."]}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:y?"You already hold ".concat(Vg(d)," \u2014 qualifies."):d>0?"You hold ".concat(Vg(d),"."):"No $DNET in your wallet yet."})]}),(0,Lg.jsx)("span",{className:"text-crypto-accent text-sm font-medium whitespace-nowrap",children:y?"\u2713 Qualifies":"Buy ".concat(Vg(x)).concat(d>0?" more":""," $DNET \u2192")})]})}),(0,Lg.jsx)("button",{onClick:()=>{Og("upgrade_picker_choice",{tier:n,method:"crypto_monthly"}),u(!0)},className:b("crypto"),children:(0,Lg.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("p",{className:"text-white font-medium",children:"Pay monthly with USDC"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-xs mt-1",children:["30 days of ",m," for ",f," USDC on Solana. No auto-renew \u2014 pay again to extend."]})]}),(0,Lg.jsx)("span",{className:"text-crypto-accent text-sm font-medium whitespace-nowrap",children:"Pay \u2192"})]})}),(0,Lg.jsx)("button",{onClick:()=>{Og("upgrade_picker_choice",{tier:n,method:"card"}),s(n)},disabled:null!==a,className:b("card")+" disabled:opacity-50",children:(0,Lg.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("p",{className:"text-white font-medium",children:"Card subscription"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-xs mt-1",children:["$",p,"/mo via Stripe. Cancel anytime; you keep access through the end of the period."]})]}),(0,Lg.jsx)("span",{className:"text-crypto-accent text-sm font-medium whitespace-nowrap",children:a===n?"Loa
2ding\u2026":"Subscribe \u2192"})]})})]})]})]})},Mj=[{name:"Token details (safety, social, shillers)",free:!0,watcher:!0,deepDiver:!0},{name:"Performers list",free:!0,watcher:!0,deepDiver:!0},{name:"Historical research",free:!0,watcher:!0,deepDiver:!0},{name:"10 free signup credits",free:!0,watcher:!0,deepDiver:!0},{name:"Full holder details",free:"credit",watcher:!0,deepDiver:!0,highlight:!0},{name:"Holder graph",free:"credit",watcher:!0,deepDiver:!0,highlight:!0},{name:"Trending feed",free:!1,watcher:!0,deepDiver:!0,highlight:!0},{name:"Trade fee discount",free:!1,watcher:"33% off",deepDiver:"66% off",highlight:!0,note:"Standard platform fee is 0.75% on in-app swap volume."},{name:"Full API access",free:!1,watcher:!1,deepDiver:!0,highlight:!0}],Tj=e=>!0===e?(0,Lg.jsx)("span",{className:"text-green-400",children:"\u2713"}):"credit"===e?(0,Lg.jsx)("span",{className:"text-crypto-accent text-xs font-medium",title:"Burn 1 credit per token to unlock",children:"1 credit"}):"string"===typeof e?(0,Lg.jsx)("span",{className:"text-white text-sm font-medium",children:e}):(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"}),Pj=()=>{var e,t;const{user:n,isAuthenticated:i,refreshUser:s,openLogin:a}=Bg(),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1),[f,m]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[x,v]=(0,r.useState)(!1),[b,w]=(0,r.useState)(!1),[_,j]=(0,r.useState)(null),[k,N]=(0,r.useState)(null);(0,r.useEffect)(()=>{const e=new URLSearchParams(window.location.search);if(!e.has("phantom-tx-pending"))return;if("buy-subscription"!==(0,gb.Rt)())return;const t=e.get("tier");"watcher"!==t&&"deep_diver"!==t||(j(t),N(t))},[]);const S=async()=>{v(!0);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/resume"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to resume subscription")}await s()}catch(h$){alert(h$ instanceof Error?h$.message:"Failed to resume subscription")}finally{v(!1)}},E=e=>{Og("tier_card_clicked",{tier:e,source:"tiers_page",isAuthenticated:i}),i?j(e):a("tiers_page",void 0,{tier:e})};(0,r.useEffect)(()=>{i&&s()},[i]),(0,r.useEffect)(()=>{Og("tiers_page_viewed")},[]);const A=(null===n||void 0===n?void 0:n.tier)||"free",C="active"===(null===n||void 0===n||null===(e=n.subscription)||void 0===e?void 0:e.status),M=null===n||void 0===n||null===(t=n.subscription)||void 0===t?void 0:t.tier,T=null===n||void 0===n?void 0:n.subscription,P=!!T&&(!0===T.cancelAtPeriodEnd||!!T.cancelAt),O=(null===T||void 0===T?void 0:T.cancelAt)||(null===T||void 0===T?void 0:T.currentPeriodEnd)||null,I=O?new Date(O).toLocaleDateString():null,L=P?(null===n||void 0===n?void 0:n.dnetTier)||"free":null,R=!!L&&L!==A,D=(0,r.useCallback)(async()=>{if(!u)throw new Error("No tier selected");const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/create-checkout-session"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{}),body:JSON.stringify({tier:u,embedded:!0})}),n=await t.json().catch(()=>({}));if(!t.ok||!n.clientSecret){const e=new Error(n.error||"Failed to start checkout (HTTP ".concat(t.status,")"));throw Ig(e,{flow:"stripe_subscription_checkout_embedded",tier:u,status:t.status}),e}return n.clientSecret},[u]),B=async()=>{if(i){p(!0);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/create-portal-session"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to create portal session")}const n=await t.json();window.location.href=n.url}catch(e){console.error("Portal error:",e),alert(e instanceof Error?e.message:"Failed to open subscription portal")}finally{p(!1)}}};return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white relative",children:[(0,Lg.jsx)(ky,{}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-5xl mx-auto px-6 py-12 relative z-10",children:[(0,Lg.jsxs)("div",{className:"text-center mb-12",children:[(0,Lg.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Access Tiers"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-lg max-w-2xl mx-auto",children:"Unlock early alpha by holding $DNET or subscribing. Be the first to access new research on Deepnets watchlist tokens."}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-sm mt-3",children:["Hold ",Vg(Ug.watcher)," $DNET for Watcher or ",Vg(Ug.deep_diver)," for Deep Diver \u2014 or subscribe from $",zg.watcher,"/mo."]})]}),(0,Lg.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-12",children:[(0,Lg.jsxs)("div",{className:"relative rounded-xl border p-6 ".concat("free"===A?"border-gray-500 bg-gray-800/30":"border-gray-700 bg-crypto-gray"),children:["free"===A&&!R&&(0,Lg.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,Lg.jsx)("span",{className:"text-xs font-semibold bg-gray-600 text-gray-200 px-3 py-1 rounded-full",children:"Current"})}),R&&"free"===L&&(0,Lg.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,Lg.jsxs)("span",{className:"text-xs font-semibold bg-amber-500 text-amber-950 px-3 py-1 rounded-full whitespace-nowrap",children:["Starts ",I]})}),(0,Lg.jsxs)("div",{className:"text-center mb-6",children:[(0,Lg.jsx)("span",{className:"text-3xl",children:"\ud83c\udf10"}),(0,Lg.jsx)("h3",{className:"text-xl font-bold mt-2",children:"Free"}),(0,Lg.jsx)("p",{className:"text-gray-500 text-sm mt-1",children:"No hold required"}),(0,Lg.jsx)("p",{className:"text-2xl font-bold text-white mt-3",children:"$0"})]}),T&&"active"===T.status&&!P&&(0,Lg.jsx)("div",{className:"text-center -mt-2",children:(0,Lg.jsx)("button",{onClick:async()=>
2{if(window.confirm("Cancel your subscription?\n\nYou'll keep access until the end of your current billing period; after that you revert to whatever DNET-only tier you qualify for.")){w(!0);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/cancel"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to cancel subscription")}await s()}catch(h$){alert(h$ instanceof Error?h$.message:"Failed to cancel subscription")}finally{w(!1)}}},disabled:b,className:"text-xs text-gray-500 hover:text-gray-300 underline-offset-2 hover:underline transition-colors disabled:opacity-50",children:b?"Canceling\u2026":"Cancel subscription"})})]}),(0,Lg.jsxs)("div",{className:"rounded-xl border p-6 ".concat("watcher"===A?"border-crypto-accent bg-crypto-accent/5":"border-gray-700 bg-crypto-gray"," relative"),children:["watcher"===A&&(0,Lg.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,Lg.jsx)("span",{className:"text-xs font-semibold px-3 py-1 rounded-full whitespace-nowrap ".concat(R?"bg-amber-500 text-amber-950":"bg-crypto-accent text-crypto-dark"),children:R?"Canceling \xb7 ends ".concat(I):"Current"})}),R&&"watcher"===L&&"watcher"!==A&&(0,Lg.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,Lg.jsxs)("span",{className:"text-xs font-semibold bg-amber-500 text-amber-950 px-3 py-1 rounded-full whitespace-nowrap",children:["Starts ",I]})}),(0,Lg.jsxs)("div",{className:"text-center mb-6",children:[(0,Lg.jsx)("span",{className:"text-3xl",children:"\ud83d\udc41\ufe0f"}),(0,Lg.jsx)("h3",{className:"text-xl font-bold mt-2 text-crypto-accent",children:"Watcher"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mt-3",children:["Hold ",Vg(Ug.watcher)," $DNET"]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-center gap-3 my-3",children:[(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"}),(0,Lg.jsx)("span",{className:"text-gray-500 text-xs uppercase tracking-wider",children:"or"}),(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"})]}),(0,Lg.jsxs)("p",{className:"text-2xl font-bold text-white",children:["$",zg.watcher,(0,Lg.jsx)("span",{className:"text-sm font-normal text-gray-400",children:"/mo"})]})]}),"watcher"===A&&P&&(0,Lg.jsx)("button",{onClick:S,disabled:x,className:"w-full bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm disabled:opacity-50",children:x?"Resuming\u2026":"Renew Subscription"}),C&&"deep_diver"===M&&(0,Lg.jsx)("div",{className:"text-center mb-4",children:(0,Lg.jsx)("button",{onClick:async()=>{if(i&&window.confirm("Downgrade to Watcher ($10/mo)?\n\nYou'll keep Deep Diver access until the end of your current billing period, then switch to Watcher.")){y(!0);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/downgrade"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{}),body:JSON.stringify({tier:"watcher"})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to downgrade")}const n=await t.json();alert(n.message),await s()}catch(e){console.error("Downgrade error:",e),alert(e instanceof Error?e.message:"Failed to downgrade")}finally{y(!1)}}},disabled:g,className:"text-xs font-medium transition-colors disabled:opacity-50 ".concat(P?"w-full bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-semibold px-4 py-2.5 rounded-lg":"text-gray-400 hover:text-gray-300"),children:g?"Processing\u2026":P?"Upgrade to Watcher":"Downgrade to Watcher \u2192"})}),!$g(A)&&(0,Lg.jsxs)("div",{className:"text-center space-y-2",children:[C?(0,Lg.jsx)("button",{onClick:B,disabled:h,className:"w-full bg-gray-700 hover:bg-gray-600 text-white font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm disabled:opacity-50",children:h?"Loading\u2026":"Manage Subscription"}):(0,Lg.jsx)("button",{onClick:()=>E("watcher"),className:"w-full bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm",children:"Upgrade to Watcher"}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs",children:"Hold $DNET \xb7 Pay monthly with crypto \xb7 Card subscription"})]})]}),(0,Lg.jsxs)("div",{className:"relative rounded-xl border p-6 ".concat("deep_diver"===A?"border-purple-500 bg-purple-500/5":"border-gray-700 bg-crypto-gray"),children:["deep_diver"===A&&(0,Lg.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,Lg.jsx)("span",{className:"text-xs font-semibold px-3 py-1 rounded-full whitespace-nowrap ".concat(R?"bg-amber-500 text-amber-950":"bg-purple-500 text-white"),children:R?"Canceling \xb7 ends ".concat(I
2):"Current"})}),(0,Lg.jsxs)("div",{className:"text-center mb-6",children:[(0,Lg.jsx)("span",{className:"text-3xl",children:"\ud83d\udd31"}),(0,Lg.jsx)("h3",{className:"text-xl font-bold mt-2 text-purple-400",children:"Deep Diver"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mt-3",children:["Hold ",Vg(Ug.deep_diver)," $DNET"]}),(0,Lg.jsxs)("div",{className:"flex items-center justify-center gap-3 my-3",children:[(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"}),(0,Lg.jsx)("span",{className:"text-gray-500 text-xs uppercase tracking-wider",children:"or"}),(0,Lg.jsx)("span",{className:"text-gray-600",children:"\u2014"})]}),(0,Lg.jsxs)("p",{className:"text-2xl font-bold text-white",children:["$",zg.deep_diver,(0,Lg.jsx)("span",{className:"text-sm font-normal text-gray-400",children:"/mo"})]})]}),"deep_diver"===A&&P&&(0,Lg.jsx)("button",{onClick:S,disabled:x,className:"w-full bg-purple-600 hover:bg-purple-500 text-white font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm disabled:opacity-50",children:x?"Resuming\u2026":"Renew Subscription"}),!Yg(A)&&(0,Lg.jsxs)("div",{className:"text-center space-y-2",children:[C&&"watcher"===M?(0,Lg.jsx)("button",{onClick:async()=>{if(i&&window.confirm("Upgrade to Deep Diver ($150/mo)?\n\nYou'll be charged the prorated difference for the rest of this billing cycle. Your card on file will be charged immediately.")){m(!0);try{const e=localStorage.getItem("deepnets_token"),t=await Ng("".concat(Eg(),"/api/stripe/upgrade"),{method:"POST",headers:(0,o.A)({"Content-Type":"application/json"},e?{Authorization:"Bearer ".concat(e)}:{}),body:JSON.stringify({tier:"deep_diver"})});if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error||"Failed to upgrade")}await s(),alert("Upgraded to Deep Diver! \ud83d\udd31")}catch(e){console.error("Upgrade error:",e),alert(e instanceof Error?e.message:"Failed to upgrade")}finally{m(!1)}}},disabled:f,className:"w-full bg-purple-600 hover:bg-purple-500 text-white font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm disabled:opacity-50",children:f?"Upgrading\u2026":"Upgrade to Deep Diver"}):C?(0,Lg.jsx)("button",{onClick:B,disabled:h,className:"w-full bg-gray-700 hover:bg-gray-600 text-white font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm disabled:opacity-50",children:h?"Loading\u2026":"Manage Subscription"}):(0,Lg.jsx)("button",{onClick:()=>E("deep_diver"),className:"w-full bg-purple-600 hover:bg-purple-500 text-white font-semibold px-4 py-2.5 rounded-lg transition-colors text-sm",children:"Upgrade to Deep Diver"}),(0,Lg.jsx)("p",{className:"text-gray-500 text-xs",children:"Hold $DNET \xb7 Pay monthly with crypto \xb7 Card subscription"})]})]})]}),(0,Lg.jsx)("div",{className:"rounded-xl border border-gray-700 overflow-hidden mb-12",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{children:(0,Lg.jsxs)("tr",{className:"border-b border-gray-700 bg-crypto-gray",children:[(0,Lg.jsx)("th",{className:"text-left px-6 py-4 text-gray-400 font-medium text-sm",children:"Feature"}),(0,Lg.jsx)("th",{className:"text-center px-4 py-4 text-gray-400 font-medium text-sm",children:"Free"}),(0,Lg.jsx)("th",{className:"text-center px-4 py-4 text-crypto-accent font-medium text-sm",children:"\ud83d\udc41\ufe0f Watcher"}),(0,Lg.jsx)("th",{className:"text-center px-4 py-4 text-purple-400 font-medium text-sm",children:"\ud83d\udd31 Deep Diver"})]})}),(0,Lg.jsx)("tbody",{children:Mj.map((e,t)=>(0,Lg.jsxs)("tr",{className:"border-b border-gray-800 ".concat(e.highlight?"bg-purple-900/10":""),children:[(0,Lg.jsxs)("td",{className:"px-6 py-3 text-sm text-gray-300",children:[e.highlight&&(0,Lg.jsx)("span",{className:"text-purple-400 mr-1",children:"\u2605"}),e.name,e.note&&(0,Lg.jsx)("div",{className:"text-gray-500 text-xs mt-0.5",children:e.note})]}),(0,Lg.jsx)("td",{className:"text-center px-4 py-3",children:Tj(e.free)}),(0,Lg.jsx)("td",{className:"text-center px-4 py-3",children:Tj(e.watcher)}),(0,Lg.jsx)("td",{className:"text-center px-4 py-3",children:Tj(e.deepDiver)})]},t))})]})}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs text-center -mt-8 mb-12",children:[(0,Lg.jsx)("span",{className:"text-crypto-accent",children:"1 credit"})," = burn one credit to unlock that feature for a single token (one-time, permanent for that token)."]}),(0,Lg.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,Lg.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center",children:"FAQ"}),(0,Lg.jsxs)("div",{className:"space-y-4",children:[(0,Lg.jsxs)("div",{className:"bg-crypto-gray rounded-xl border border-gray-700 p-5",children:[(0,Lg.jsx)("h4",{className:"font-semibold mb-2",children:"What are my options for unlocking access?"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["You have two ways to unlock Watcher or Deep Diver access: ",(0,Lg.jsx)("strong",{className:"text-white",children:"hold $DNET"})," in your connected wallet for permanent access as long as you hold, or ",(0,Lg.jsx)("strong",{className:"text-white",children:"subscribe monthly"})," for a fixed fee. Either works \u2014 your choice."]})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray rounded-xl border border-gray-700 p-5",children:[(0,Lg.jsx)("h4",{className:"font-semibold mb-2",children:"Can I have both $DNET holdings and a subscription?"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Yes. If you have both, we take whichever gives you the higher tier. For example, if you hold enough $DNET for Watcher but also have a Deep Diver subscription, you'll have Deep Diver access."})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray rounded-xl border border-gray-700 p-5",children:[(0,Lg.jsx)("h4",{className:"font-semibold mb-2",children:"Can I still use credits without holding or subscribing?"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["Yes. Free users can burn 1 credit per token to unlock ",(0,Lg.jsx)("strong",{className:"text-white",children:"full holder details"})," or the ",(0,Lg.jsx)("strong",{className:"text-white",children:"holder graph"})," for that specific token \u2014 useful for the occasional deep look without committing to a tier. Watcher and Deep Diver get unlimited access to those without spending credits."]})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray rounded-xl border border-gray-700 p-5",children:[(0,Lg.jsx)("h4",{className:"font-semibold mb-2",children:"What if I sell my $DNET?"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Your tier is checked in real-time based on wallet balance. If your balance drops below the threshold, you'll revert to the appropriate tier (or your subscription tier, if active). No penalty \u2014 just rebuy when you want access back."})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray rounded-xl border border-gray-700 p-5",children:[(0,Lg.jsx)("h4",{className:"font-semibold mb-2",children:"Where do I buy $DNET?"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["$DNET is available on Jupiter and other Solana DEXes. Fixed 1B supply, 100% burn mechanics."," ",(0,Lg.jsx)("a",{href:qg,target:"_blank",rel:"noopener noreferrer",onClick:()=>Og("buy_dnet_clicked",{source:"tiers_page_faq"}),className:"text-crypto-accent hover:underline",children:"Buy on Jupiter \u2192"})]})]})]})]}),!$g(A)&&(0,Lg.jsx)("div",{className:"text-center mt-12",children:(0,Lg.jsx)("a",{href:qg,target:"_blank",rel:"noopener noreferrer",onClick:()=>Og("buy_dnet_clicked",{source:"tiers_page_cta"}),className:"inline-flex items-center gap-2 bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark font-bold px-8 py-3 rounded-lg text-lg transition-colors",children:"Buy $DNET and Start Watching \u2192"})})]}),(0,Lg.jsx)(_y,{}),(0,Lg.jsx)(Cj,{target:_,onClose:()=>{j(null),N(null)},onSubscribe:async e=>{i?(Og("subscribe_clicked",{tier:e,source:"tiers_page"}),d(e)):a("tiers_page",void 0,{tier:e})},subscribing:l,defaultShowCryptoPay:k===_&&null!==_}),u&&(0,Lg.jsx)(tj,{title:"Subscribe \xb7 ".concat("deep_diver"===u?"Deep Diver":"Watcher"),fetchClientSecret:D,onClose:()=>d(null)})]})},Oj=JSON.parse('{"capturedAt":1783655677022,"note":"Static sample snapshot bundled for the logged-out trending preview.","tokens":[{"address":"J5ZognFJEepsWsCQPmqVchvEvsUMomEkxd8LbMrH2J7","name":"Bullscan","symbol":"Bullscan","logo_uri":"https://cdn.dexscreener.com/cms/images/BFeKqxMRIV0u4eB7?width=800&height=800&quality=95&format=auto","price":0.000327664530724184,"market_cap":294212.76748886396,"fdv":0,"liquidity":47774.9707518044,"volume_5m_usd":2042.2334567715689,"volume_1h_usd":32928.62236850815,"volume_4h_usd":310228.5554867846,"volume_24h_usd":1858594.5286752158,"price_change_5m_percent":11.53133490666765,"price_change_1h_percent":24.790172999769055,"price_change_4h_percent":24.491809621351965,"price_change_24h_percent":3370.6638868803966,"trade_5m_count":62,"trade_1h_count":857,"trade_4h_count":6182,"trade_24h_count":35528,"volume_5m_change_percent":538.0279291647036,"volume_1h_change_percent":-63.00960215140766,"volume_4h_change_percent":-64.66840764031846,"volume_24h_change_percent":4075.766273289109,"unique_wallet_24h":5420,"unique_wallet_24h_change_percent":924.5746691871456,"buy_24h":19631,"sell_24h":15897,"holder":2213,"recent_listing_time":1783534324,"safetyLevel":"OK","trending_score_5m":101,"trending_score_1h":101,"trending_score_4h":104,"trending_score_24h":144,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.
20144248781768,"lockup_percent":0,"score_components_5m":{"volume":96,"acceleration":0,"txns":97,"priceFactor":1},"score_components_1h":{"volume":95,"acceleration":0,"txns":96,"priceFactor":1},"score_components_4h":{"volume":98,"acceleration":0,"txns":98,"priceFactor":1},"score_components_24h":{"volume":98,"acceleration":99,"txns":98,"wallets":99,"buyPressure":80,"priceFactor":1}},{"address":"4ko5tSr5o3H4v1sFtjTSd9MPUW7yx5AFCpkNPoL6pump","name":"febu","symbol":"febu","logo_uri":"https://cdn.dexscreener.com/cms/images/GgxFKmsyyxViS_VI?width=800&height=800&quality=95&format=auto","price":0.002122033403834776,"market_cap":2102328.58188993,"fdv":0,"liquidity":391577.8650273319,"volume_5m_usd":36578.775145928164,"volume_1h_usd":360258.009354031,"volume_4h_usd":841248.8295191529,"volume_24h_usd":3652630.4454590213,"price_change_5m_percent":4.7002848241581745,"price_change_1h_percent":56.28945551293737,"price_change_4h_percent":41.045353256342274,"price_change_24h_percent":293.00361105114473,"trade_5m_count":357,"trade_1h_count":3746,"trade_4h_count":12514,"trade_24h_count":53581,"volume_5m_change_percent":-43.893671414707164,"volume_1h_change_percent":225.24562794289076,"volume_4h_change_percent":-24.94262934746229,"volume_24h_change_percent":114.69129477446604,"unique_wallet_24h":7472,"unique_wallet_24h_change_percent":23.831620815379516,"buy_24h":26720,"sell_24h":26861,"holder":4258,"recent_listing_time":1783548118,"safetyLevel":"OK","trending_score_5m":105,"trending_score_1h":149,"trending_score_4h":104,"trending_score_24h":134,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.014034140019699999,"lockup_percent":0,"score_components_5m":{"volume":100,"acceleration":0,"txns":99,"priceFactor":1},"score_components_1h":{"volume":100,"acceleration":98,"txns":99,"priceFactor":1},"score_components_4h":{"volume":99,"acceleration":0,"txns":99,"priceFactor":1},"score_components_24h":{"volume":99,"acceleration":94,"txns":99,"wallets":100,"buyPressure":39,"priceFactor":1}},{"address":"gCETSgf89gXTMZGSDWamDvmjoxypsJL55rjf2o4pump","name":"The Faces of George Costanza","symbol":"GEORGE","logo_uri":"https://cdn.dexscreener.com/cms/images/oDRgas1ebUh4tiNN?width=800&height=800&quality=95&format=auto","price":0.00020222979090669444,"market_cap":200895.7845846556,"fdv":47711.2356452369,"liquidity":34722.67902485525,"volume_5m_usd":156.7527817317279,"volume_1h_usd":14892.818524324668,"volume_4h_usd":76254.76202129897,"volume_24h_usd":708553.9714344483,"price_change_5m_percent":-0.5183222810819046,"price_change_1h_percent":10.393551010686549,"price_change_4h_percent":-3.6249455024115376,"price_change_24h_percent":101.04170188839502,"trade_5m_count":8,"trade_1h_count":255,"trade_4h_count":1412,"trade_24h_count":9093,"volume_5m_change_percent":-50.38562788226438,"volume_1h_change_percent":21.376388299986935,"volume_4h_change_percent":-48.359794077856414,"volume_24h_change_percent":755.7264439567826,"unique_wallet_24h":1472,"unique_wallet_24h_change_percent":188.06262230919765,"buy_24h":4481,"sell_24h":4612,"holder":701,"recent_listing_time":1783445503,"safetyLevel":"OK","trending_score_5m":80,"trending_score_1h":134,"trending_score_4h":87,"trending_score_24h":126,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.000052150271,"lockup_percent":0,"score_components_5m":{"volume":76,"acceleration":0,"txns":79,"priceFactor":0.98},"score_components_1h":{"volume":90,"acceleration":89,"txns":87,"priceFactor":1},"score_components_4h":{"volume":89,"acceleration":0,"txns":86,"priceFactor":0.94},"score_components_24h":{"volume":93,"acceleration":98,"txns":89,"wallets":90,"buyPressure":33,"priceFactor":1}},{"address":"ACTjVqo7yeoDHExgLNhSXPV87pYqM8z2z8Xq9Y3ipump","name":"RobinDrop","symbol":"ROBINDROP","logo_uri":"https://cdn.dexscreener.com/cms/images/g7dHWhkBR4Hw-GMv?width=64&height=64&fit=crop&quality=95&format=auto","price":0.0000940158985179811,"market_cap":105104.71955941097,"fdv":0,"liquidity":29565.282249738422,"volume_5m_usd":9706.810069071747,"volume_1h_usd":109160.59970498574,"volume_4h_usd":840018.3341840156,"volume_24h_usd":840018.3341840156,"price_change_5m_percent":-15.147735672378392,"price_change_1h_percent":-10.694256928081687,"price_change_4h_percent":303.2694449428658,"price_change_24h_percent":303.2694449428658,"trade_5m_count":205,"trade_1h_count":3688,"trade_4h_count":23169,"trade_24h_count":23169,"volume_5m_change_percent":157.41686046337082,"volume_1h_change_percent":-54.77160285341899,"volume_4h_change_percent":0,"volume_24h_change_percent":0,"unique_wallet_24h":3215,"unique_wallet_24h_change_percent":0,"buy_24h":13989,"sell_24h":9180,"holder":1228,"recent_listing_time":1783644266,"safetyLevel":"OK","trending_score_5m":72,"trending_score_1h":81,"trending_score_4h":105,"trending_score_24h":114,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.
20150651349025,"lockup_percent":0,"score_components_5m":{"volume":99,"acceleration":99,"txns":99,"priceFactor":0.48},"score_components_1h":{"volume":99,"acceleration":0,"txns":99,"priceFactor":0.77},"score_components_4h":{"volume":99,"acceleration":0,"txns":100,"priceFactor":1},"score_components_24h":{"volume":95,"acceleration":0,"txns":96,"wallets":97,"buyPressure":95,"priceFactor":1}},{"address":"9zgqrEUAAz5hrTAaqFdGKVLNjHYLHXmgRoVCw74apump","name":"Pumpfunscape","symbol":"Pscape","logo_uri":"https://cdn.dexscreener.com/cms/images/VymrkEwi9bV70gDj?width=800&height=800&quality=95&format=auto","price":0.00002525329236324872,"market_cap":25658.07370816119,"fdv":10605.41886371712,"liquidity":5659.222340746287,"volume_5m_usd":122.08495588951136,"volume_1h_usd":6974.048394990371,"volume_4h_usd":12216.57438291656,"volume_24h_usd":71962.19289861374,"price_change_5m_percent":-2.354727389044241,"price_change_1h_percent":56.912800726893884,"price_change_4h_percent":64.00065309798781,"price_change_24h_percent":153.2246937124478,"trade_5m_count":4,"trade_1h_count":95,"trade_4h_count":191,"trade_24h_count":1014,"volume_5m_change_percent":2.8060241714599177,"volume_1h_change_percent":512.9020611380863,"volume_4h_change_percent":39.67327146773195,"volume_24h_change_percent":1249.2435823498888,"unique_wallet_24h":301,"unique_wallet_24h_change_percent":119.7080291970803,"buy_24h":617,"sell_24h":397,"holder":152,"recent_listing_time":1783460914,"safetyLevel":"OK","trending_score_5m":71,"trending_score_1h":129,"trending_score_4h":110,"trending_score_24h":113,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.0006201860566,"lockup_percent":0,"score_components_5m":{"volume":73,"acceleration":0,"txns":72,"priceFactor":0.92},"score_components_1h":{"volume":84,"acceleration":99,"txns":74,"priceFactor":1},"score_components_4h":{"volume":72,"acceleration":84,"txns":62,"priceFactor":1},"score_components_24h":{"volume":67,"acceleration":99,"txns":54,"wallets":64,"buyPressure":95,"priceFactor":1}},{"address":"J5bTgnS76LGWt7rQuSi29NCCsT6JqLLxXcPSDGk1pump","name":"a wAlKiNg sPazTic","symbol":"SPAZ","logo_uri":"https://cdn.dexscreener.com/cms/images/G732IsLzNOPeiNAf?width=800&height=800&quality=95&format=auto","price":0.0001636247994192892,"market_cap":162059.69613677752,"fdv":57656.1847288159,"liquidity":29510.998977462605,"volume_5m_usd":637.6236133209017,"volume_1h_usd":10846.475566505025,"volume_4h_usd":25799.723224530335,"volume_24h_usd":167560.30622562862,"price_change_5m_percent":1.485559943060764,"price_change_1h_percent":30.426635166014194,"price_change_4h_percent":117.14892892000918,"price_change_24h_percent":115.56763656008249,"trade_5m_count":9,"trade_1h_count":156,"trade_4h_count":617,"trade_24h_count":3001,"volume_5m_change_percent":26.497668864146117,"volume_1h_change_percent":56.68901613465561,"volume_4h_change_percent":-29.844861444419163,"volume_24h_change_percent":115.70542020655064,"unique_wallet_24h":543,"unique_wallet_24h_change_percent":-3.893805309734513,"buy_24h":1420,"sell_24h":1581,"holder":366,"recent_listing_time":1783436915,"safetyLevel":"OK","trending_score_5m":90,"trending_score_1h":132,"trending_score_4h":84,"trending_score_24h":108,"locked_percent":12.208104574797968,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.0313888586364,"lockup_percent":12.208104574797968,"score_components_5m":{"volume":87,"acceleration":0,"txns":81,"priceFactor":1},"score_components_1h":{"volume":88,"acceleration":93,"txns":82,"priceFactor":1},"score_components_4h":{"volume":80,"acceleration":0,"txns":80,"priceFactor":1},"score_components_24h":{"volume":81,"acceleration":95,"txns":75,"wallets":74,"buyPressure":16,"priceFactor":1}},{"address":"G6cHLEwYHyZJXBhKpSWMU6RUtcq9HM9UTn2cTEdKpump","name":"ARROW","symbol":"ARROW","logo_uri":"https://cdn.dexscreener.com/cms/images/j1ARADbMVPoPDu77","price":0.00030861577233476964,"market_cap":319824.96847973147,"fdv":160163.29633613073,"liquidity":45052.03492532699,"volume_5m_usd":1610.7590260614147,"volume_1h_usd":32077.643017519204,"volume_4h_usd":121176.1370739363,"volume_24h_usd":1588792.2519390855,"price_change_5m_percent":-1.378478280250136,"price_change_1h_percent":-2.8037390892479768,"price_change_4h_percent":-26.58354889719896,"price_change_24h_percent":1906.874325437363,"trade_5m_count":53,"trade_1h_count":921,"trade_4h_count":3589,"trade_24h_count":36884,"volume_5m_change_percent":110.0839268362191,"volume_1h_change_percent":84.69707883158752,"volume_4h_change_percent":8.953677659441324,"volume_24h_change_percent":0,"unique_wallet_24h":6408,"unique_wallet_24h_change_percent":0,"buy_24h":18628,"sell_24h":18256,"holder":2173,"recent_listing_time":1783569359,"safetyLevel":"OK","trending_score_5m":96,"trending_score_1h":135,"trending_score_4h":74,"trending_score_24h":107,"locked_percent":49.9756536456533,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":49.9756536456533,"score_components_5m":{"volume":95,"acceleration":0,"txns":95,"priceFactor":0.95},"score_components_1h":{"volume":95,"acceleration":95,"txns":97,"priceFactor":0.94},"score_components_4h":{"volume":93,"acceleration":77,"txns":95,"priceFactor":0.55},"score_components_24h":{"volume":98,"acceleration":0,"txns":98,"wallets":100,"buyPressure":45,"priceFactor":1}},{"address":"3grmULXrnQyN2A5LFStKFeSQsWvZjzNDsDVVLknFpump","name":"CASHCAT","symbol":"CASHCAT","logo_uri":"https://cdn.dexscreener.com/cms/images/PRccNm2ZIzhS5led","price":0.0002927197916102343,"market_cap":294381.5117242505,"fdv":0,"liquidity":41527.60975736526,"volume_5m_usd":1433.1166274502714,"volume_1h_usd":21968.350593587114,"volume_4h_usd":241916.99943072285,"volume_24h_usd":498095.28133946686,"price_change_5m_percent":-1.6285532645081053,"price_change_1h_percent":-20.04915143054135,"price_change_4h_percent":-50.4733085163238,"price_change_24h_percent":2306.518525544044,"trade_5m_count":36,"trade_1h_count":610,"trade_4h_count":4609,"trade_24h_count":10060,"volume_5m_change_percent":-32.92907484585575,"volume_1h_change_percent":-63.42893993449598,"volume_4h_change_percent":27.250653579958982,"volume_24h_change_percent":0,"unique_wallet_24h":1342,"unique_wallet_24h_change_percent":0,"buy_24h":5654,"sell_24h":4406,"holder":503,"recent_listing_time":1783614536,"safetyLevel":"OK","trending_score_5m":93,"trending_score_1h":56,"trending_score_4h":21,"trending_score_24h":107,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":0,"score_components_5m":{"volume":95,"acceleration":0,"txns":92,"priceFactor":0.94},"score_components_1h":{"volume":92,"acceleration":0,"txns":94,"priceFactor":0.5
27},"score_components_4h":{"volume":97,"acceleration":81,"txns":96,"priceFactor":0.15},"score_components_24h":{"volume":91,"acceleration":0,"txns":89,"wallets":89,"buyPressure":84,"priceFactor":1}},{"address":"2cEc8AKGjjCeYNXod2f9aPuSdoSihzK6Br6ceCwvpump","name":"CloudMiningUS","symbol":"CLOUD","logo_uri":"https://cdn.dexscreener.com/cms/images/SSouUddJwjJ7gzGh?width=64&height=64&fit=crop&quality=95&format=auto","price":0.00004688742665769231,"market_cap":44320.801134919944,"fdv":12971.049105131322,"liquidity":15954.921027348199,"volume_5m_usd":649.7740963351537,"volume_1h_usd":17571.846543751937,"volume_4h_usd":119107.2160088188,"volume_24h_usd":168067.96915337324,"price_change_5m_percent":7.2233394172639755,"price_change_1h_percent":-0.45957145676184,"price_change_4h_percent":-7.5237084970954715,"price_change_24h_percent":465.0934175491699,"trade_5m_count":35,"trade_1h_count":584,"trade_4h_count":5871,"trade_24h_count":6417,"volume_5m_change_percent":5.078645096149413,"volume_1h_change_percent":17.975626151809685,"volume_4h_change_percent":143.2708003023565,"volume_24h_change_percent":0,"unique_wallet_24h":1274,"unique_wallet_24h_change_percent":0,"buy_24h":3832,"sell_24h":2585,"holder":361,"recent_listing_time":1783639640,"safetyLevel":"OK","trending_score_5m":95,"trending_score_1h":135,"trending_score_4h":123,"trending_score_24h":104,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":0,"score_components_5m":{"volume":88,"acceleration":0,"txns":92,"priceFactor":1},"score_components_1h":{"volume":91,"acceleration":88,"txns":94,"priceFactor":0.99},"score_components_4h":{"volume":93,"acceleration":93,"txns":97,"priceFactor":0.87},"score_components_24h":{"volume":81,"acceleration":0,"txns":86,"wallets":88,"buyPressure":93,"priceFactor":1}},{"address":"ED1f7Hh3GqAkGuTvvqs6HQhEAFVmSHEGAMaSZjM6pump","name":"Unicorn Bull","symbol":"UBULL","logo_uri":"https://cdn.dexscreener.com/cms/images/3Ag1XHvKwCgzyF96","price":0.000012296576766709981,"market_cap":12213.880966233883,"fdv":23596.50069384355,"liquidity":3298.8377456679846,"volume_5m_usd":94.93776156150238,"volume_1h_usd":3851.029120200627,"volume_4h_usd":6479.5923792806525,"volume_24h_usd":121857.10158459318,"price_change_5m_percent":-1.1079300912189136,"price_change_1h_percent":13.469906138374604,"price_change_4h_percent":19.019118819984833,"price_change_24h_percent":3.8585963587719174,"trade_5m_count":30,"trade_1h_count":132,"trade_4h_count":301,"trade_24h_count":6334,"volume_5m_change_percent":-72.10825787107521,"volume_1h_change_percent":893.9297325581945,"volume_4h_change_percent":-33.521206916982315,"volume_24h_change_percent":0,"unique_wallet_24h":1247,"unique_wallet_24h_change_percent":0,"buy_24h":3918,"sell_24h":2416,"holder":319,"recent_listing_time":1783608114,"safetyLevel":"OK","trending_score_5m":78,"trending_score_1h":83,"trending_score_4h":69,"trending_score_24h":102,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":0,"score_components_5m":{"volume":70,"acceleration":0,"txns":91,"priceFactor":0.96},"score_components_1h":{"volume":78,"acceleration":0,"txns":78,"priceFactor":1},"score_components_4h":{"volume":63,"acceleration":0,"txns":70,"priceFactor":1},"score_components_24h":{"volume":77,"acceleration":0,"txns":86,"wallets":88,"buyPressure":97,"priceFactor":1}},{"address":"2dAt9BMxpNDnzBo32VuR8MXEypVzuZwQj3ZCn8xVpump","name":"Sped","symbol":"Sped","logo_uri":"https://cdn.dexscreener.com/cms/images/GZcSo94hVVFyOa58?width=64&height=64&fit=crop&quality=95&format=auto","price":0.00004558162989742301,"market_cap":45677.108207665784,"fdv":11613.184159009556,"liquidity":16992.768010141528,"volume_5m_usd":6.752268263078394,"volume_1h_usd":6308.347480663265,"volume_4h_usd":97202.70096551492,"volume_24h_usd":515670.1345684636,"price_change_5m_percent":0,"price_change_1h_percent":-7.536963689028011,"price_change_4h_percent":-48.79972778012483,"price_change_24h_percent":541.4838576101932,"trade_5m_count":15,"trade_1h_count":208,"trade_4h_count":3121,"trade_24h_count":10283,"volume_5m_change_percent":-97.18785981542896,"volume_1h_change_percent":-57.47939926173874,"volume_4h_change_percent":-76.68836565432154,"volume_24h_change_percent":0,"unique_wallet_24h":1651,"unique_wallet_24h_change_percent":0,"buy_24h":5381,"sell_24h":4902,"holder":473,"recent_listing_time":1783622692,"safetyLevel":"OK","trending_score_5m":71,"trending_score_1h":74,"trending_score_4h":17,"trending_score_24h":102,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":0,"score_components_5m":{"volume":56,"acceleration":0,"txns":86,"priceFactor":1},"score_components_1h":{"volume":83,"acceleration":0,"txns":84,"priceFactor":0.84},"score_components_4h":{"volume":91,"acceleration":0,"txns":93,"priceFactor":0.17},"score_components_24h":{"volume":91,"acceleration":0,"txns":90,"wallets":91,"buyPressure":63,"priceFactor":1}},{"address":"At61gkq6FjEeBXbW6FYxNDZqWZ151PWR1HQJvfRapump","name":"anomaly","symbol":"nom","logo_uri":"https://ipfs.io/ipfs/bafkreidkhy73kfpeh3nmzub7r657l5drg6zymzeydr4rxtlceas4s3n6be","price":0.000010922981252254941,"market_cap":7061.426698885269,"fdv"
2:12827.642890031297,"liquidity":6334.514208272296,"volume_5m_usd":929.6925644743797,"volume_1h_usd":2182.360452044948,"volume_4h_usd":127708.32559924989,"volume_24h_usd":142685.4017740897,"price_change_5m_percent":32.86299886809266,"price_change_1h_percent":45.899646007420344,"price_change_4h_percent":-25.80189079458897,"price_change_24h_percent":102.16482097428663,"trade_5m_count":19,"trade_1h_count":145,"trade_4h_count":4817,"trade_24h_count":5827,"volume_5m_change_percent":157.51029323555642,"volume_1h_change_percent":-64.90506892427067,"volume_4h_change_percent":752.6919681011493,"volume_24h_change_percent":0,"unique_wallet_24h":1152,"unique_wallet_24h_change_percent":0,"buy_24h":3438,"sell_24h":2389,"holder":185,"recent_listing_time":1783639518,"safetyLevel":"OK","trending_score_5m":95,"trending_score_1h":78,"trending_score_4h":81,"trending_score_24h":101,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":0,"score_components_5m":{"volume":92,"acceleration":0,"txns":87,"priceFactor":1},"score_components_1h":{"volume":71,"acceleration":0,"txns":81,"priceFactor":1},"score_components_4h":{"volume":94,"acceleration":99,"txns":97,"priceFactor":0.56},"score_components_24h":{"volume":79,"acceleration":0,"txns":85,"wallets":87,"buyPressure":91,"priceFactor":1}},{"address":"8LZKRa3f23CrCTwLFRY9jQWRjFQwGiuP46Mk9jytpump","name":"Marvin the Martian","symbol":"MARVIN","logo_uri":"https://cdn.dexscreener.com/cms/images/EBJlbkRSjKJ5DLGj?width=800&height=800&quality=95&format=auto","price":0.0001664315484945598,"market_cap":150633.1687278351,"fdv":0,"liquidity":43062.31002030176,"volume_5m_usd":48.142808483279325,"volume_1h_usd":3320.679921312312,"volume_4h_usd":20142.050706955673,"volume_24h_usd":122997.92046311795,"price_change_5m_percent":1.670287532174407,"price_change_1h_percent":-6.919514039740421,"price_change_4h_percent":-36.3122134096321,"price_change_24h_percent":-4.160514443144591,"trade_5m_count":5,"trade_1h_count":105,"trade_4h_count":392,"trade_24h_count":1562,"volume_5m_change_percent":-52.83529857289467,"volume_1h_change_percent":-9.974502492318047,"volume_4h_change_percent":-55.34432955421891,"volume_24h_change_percent":5.317487178030853,"unique_wallet_24h":399,"unique_wallet_24h_change_percent":2.3076923076923075,"buy_24h":837,"sell_24h":725,"holder":638,"recent_listing_time":1782768360,"safetyLevel":"OK","trending_score_5m":69,"trending_score_1h":66,"trending_score_4h":30,"trending_score_24h":100,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":8.9431545451105,"lockup_percent":0,"score_components_5m":{"volume":66,"acceleration":0,"txns":74,"priceFactor":1},"score_components_1h":{"volume":78,"acceleration":0,"txns":76,"priceFactor":0.85},"score_components_4h":{"volume":78,"acceleration":0,"txns":75,"priceFactor":0.38},"score_components_24h":{"volume":78,"acceleration":79,"txns":66,"wallets":70,"buyPressure":71,"priceFactor":0.95}},{"address":"DyLoY6pFZbtci38FuGf89a5JwofbiC1Co7o5kq4Xpump","name":" GPT Strawberry","symbol":"SOLBERRY","logo_uri":"https://cdn.dexscreener.com/cms/images/jjLTTnMPFzdel4Yl?width=64&height=64&fit=crop&quality=95&format=auto","price":0.000020014649864065425,"market_cap":17187.209027555888,"fdv":31453.327147066306,"liquidity":11014.383085323369,"volume_5m_usd":943.4822608456907,"volume_1h_usd":26655.47953246856,"volume_4h_usd":118144.01562541557,"volume_24h_usd":118144.01562541557,"price_change_5m_percent":18.97660788934493,"price_change_1h_percent":-27.49868379080869,"price_change_4h_percent":123.84182096583613,"price_change_24h_percent":123.84182096583613,"trade_5m_count":23,"trade_1h_count":981,"trade_4h_count":5064,"trade_24h_count":5064,"volume_5m_change_percent":-63.68982623220284,"volume_1h_change_percent":-70.86467805607016,"volume_4h_change_percent":0,"volume_24h_change_percent":0,"unique_wallet_24h":973,"unique_wallet_24h_change_percent":0,"buy_24h":2913,"sell_24h":2151,"holder":297,"recent_listing_time":1783649852,"safetyLevel":"OK","trending_score_5m":96,"trending_score_1h":42,"trending_score_4h":99,"trending_score_24h":98,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.
20000225740583,"lockup_percent":0,"score_components_5m":{"volume":92,"acceleration":0,"txns":89,"priceFactor":1},"score_components_1h":{"volume":93,"acceleration":0,"txns":98,"priceFactor":0.42},"score_components_4h":{"volume":93,"acceleration":0,"txns":97,"priceFactor":1},"score_components_24h":{"volume":76,"acceleration":0,"txns":82,"wallets":84,"buyPressure":88,"priceFactor":1}},{"address":"FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump","name":"three.ws","symbol":"three","logo_uri":"https://cdn.dexscreener.com/cms/images/j22gRd6Z2GowwOvM","price":0.0012838595537360512,"market_cap":1320717.902901935,"fdv":0,"liquidity":290769.3395741531,"volume_5m_usd":6192.375079284855,"volume_1h_usd":102627.29413588298,"volume_4h_usd":313453.1770686865,"volume_24h_usd":688484.3038574603,"price_change_5m_percent":-2.4744765531036257,"price_change_1h_percent":-10.757134704727903,"price_change_4h_percent":18.85474291529217,"price_change_24h_percent":2.025352082154906,"trade_5m_count":409,"trade_1h_count":7242,"trade_4h_count":17068,"trade_24h_count":65302,"volume_5m_change_percent":253.76834130596092,"volume_1h_change_percent":-41.167894907099594,"volume_4h_change_percent":430.43715213632214,"volume_24h_change_percent":109.0745326891818,"unique_wallet_24h":4034,"unique_wallet_24h_change_percent":40.55749128919861,"buy_24h":46029,"sell_24h":19273,"holder":14699,"recent_listing_time":1777441309,"safetyLevel":"OK","trending_score_5m":91,"trending_score_1h":53,"trending_score_4h":98,"trending_score_24h":96,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.030844298535856365,"lockup_percent":0,"score_components_5m":{"volume":98,"acceleration":100,"txns":100,"priceFactor":0.92},"score_components_1h":{"volume":99,"acceleration":0,"txns":100,"priceFactor":0.77},"score_components_4h":{"volume":99,"acceleration":97,"txns":99,"priceFactor":1},"score_components_24h":{"volume":93,"acceleration":94,"txns":99,"wallets":98,"buyPressure":99,"priceFactor":1}},{"address":"FrtbBAaSZksfh4oV46E7Pvb43QiiUmYLD3dcGS6gpump","name":"RIBBIT ZYGO THE FROG ","symbol":"RIBBIT","logo_uri":"https://cdn.dexscreener.com/cms/images/vEX0kJo6063DVp7W","price":0.00004246076685081844,"market_cap":42031.976875769156,"fdv":5557.6765449737795,"liquidity":15597.434077476353,"volume_5m_usd":545.1967611730383,"volume_1h_usd":12481.855949842871,"volume_4h_usd":109302.73283672433,"volume_24h_usd":117413.90526739892,"price_change_5m_percent":1.0201518151683024,"price_change_1h_percent":-31.33402083979085,"price_change_4h_percent":189.01765405333703,"price_change_24h_percent":339.98922069227723,"trade_5m_count":19,"trade_1h_count":270,"trade_4h_count":3443,"trade_24h_count":3443,"volume_5m_change_percent":-24.788417172621845,"volume_1h_change_percent":-48.61927827432503,"volume_4h_change_percent":1247.557751618822,"volume_24h_change_percent":0,"unique_wallet_24h":778,"unique_wallet_24h_change_percent":0,"buy_24h":1990,"sell_24h":1453,"holder":216,"recent_listing_time":1783639821,"safetyLevel":"OK","trending_score_5m":92,"trending_score_1h":32,"trending_score_4h":143,"trending_score_24h":96,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0,"lockup_percent":0,"score_components_5m":{"volume":86,"acceleration":0,"txns":87,"priceFactor":1},"score_components_1h":{"volume":89,"acceleration":0,"txns":88,"priceFactor":0.33},"score_components_4h":{"volume":92,"acceleration":99,"txns":94,"priceFactor":1},"score_components_24h":{"volume":76,"acceleration":0,"txns":78,"wallets":80,"buyPressure":88,"priceFactor":1}},{"address":"Hxxn5yVPP3wEUF8mJJR88cTCJeAT82kKE1aYTTaDpump","name":"vibeshift","symbol":"vibeshift","logo_uri":"https://cdn.dexscreener.com/cms/images/nugM1Pim9dOpEdjp?width=800&height=800&quality=95&format=auto","price":0.00042107568370369677,"market_cap":419309.0607071943,"fdv":315831.56527915894,"liquidity":54688.40835992829,"volume_5m_usd":45.92148491047985,"volume_1h_usd":1546.0389651868031,"volume_4h_usd":5062.2617239053825,"volume_24h_usd":70145.3480960216,"price_change_5m_percent":-0.19657521725106397,"price_change_1h_percent":-0.8424407205295517,"price_change_4h_percent":1.3544269803506233,"price_change_24h_percent":26.177322912683636,"trade_5m_count":0,"trade_1h_count":24,"trade_4h_count":75,"trade_24h_count":986,"volume_5m_change_percent":-58.519597447168024,"volume_1h_change_percent":-29.9733773919809,"volume_4h_change_percent":-64.25163340267672,"volume_24h_change_percent":124.96430376938275,"unique_wallet_24h":182,"unique_wallet_24h_change_percent":-42.76729559748428,"buy_24h":506,"sell_24h":480,"holder":497,"recent_listing_time":1782950693,"safetyLevel":"OK","trending_score_5m":0,"trending_score_1h":60,"trending_score_4h":55,"trending_score_24h":94,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.
20008662119593000001,"lockup_percent":0,"score_components_5m":{"volume":65,"acceleration":0,"txns":0,"priceFactor":0.99},"score_components_1h":{"volume":63,"acceleration":0,"txns":53,"priceFactor":0.98},"score_components_4h":{"volume":59,"acceleration":0,"txns":42,"priceFactor":1},"score_components_24h":{"volume":67,"acceleration":95,"txns":54,"wallets":42,"buyPressure":54,"priceFactor":1}},{"address":"9qwxahBxcgKyn5X7kZvkN7qxKZg6pkVD8Lo4URtopump","name":"chicken shrimp","symbol":"CS","logo_uri":"https://cdn.dexscreener.com/cms/images/kdKJoEOmNh56SJsw?width=800&height=800&quality=95&format=auto","price":0.00007934393341420678,"market_cap":79512.75507667374,"fdv":214657.4647998045,"liquidity":30817.08567195327,"volume_5m_usd":9.673463198488822,"volume_1h_usd":3615.6133532741087,"volume_4h_usd":9301.439529206542,"volume_24h_usd":111958.77174940436,"price_change_5m_percent":-0.16892367452448334,"price_change_1h_percent":0.19402005043032705,"price_change_4h_percent":-15.515893215883711,"price_change_24h_percent":49.381208737972344,"trade_5m_count":13,"trade_1h_count":78,"trade_4h_count":360,"trade_24h_count":2825,"volume_5m_change_percent":-21.53512079679339,"volume_1h_change_percent":5.805314784043611,"volume_4h_change_percent":-73.85491418998117,"volume_24h_change_percent":108.76974196699362,"unique_wallet_24h":586,"unique_wallet_24h_change_percent":32.27990970654628,"buy_24h":1438,"sell_24h":1387,"holder":3565,"recent_listing_time":1781729592,"safetyLevel":"OK","trending_score_5m":55,"trending_score_1h":92,"trending_score_4h":42,"trending_score_24h":88,"locked_percent":3.0417829192668404,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.0105745623234,"lockup_percent":3.0417829192668404,"score_components_5m":{"volume":58,"acceleration":0,"txns":84,"priceFactor":0.99},"score_components_1h":{"volume":78,"acceleration":87,"txns":72,"priceFactor":1},"score_components_4h":{"volume":69,"acceleration":0,"txns":73,"priceFactor":0.74},"score_components_24h":{"volume":75,"acceleration":93,"txns":74,"wallets":75,"buyPressure":51,"priceFactor":1}},{"address":"75mJwS94NPUm2z5UZ2WhubEzxD1y9U9Hee34LqEupump","name":"La Esok Sekolah","symbol":"SEKOLAH","logo_uri":"https://cdn.dexscreener.com/cms/images/d766c15020ffaa99891ed0600c9aa05144660a98e880acc1c78a67306af44b1c?width=800&height=800&quality=95&format=auto","price":0.000039470826770232435,"market_cap":45081.09611592772,"fdv":8149.885294257258,"liquidity":16334.81456615578,"volume_5m_usd":757.1731720047617,"volume_1h_usd":14999.645326185655,"volume_4h_usd":53052.05192697512,"volume_24h_usd":260720.88715768504,"price_change_5m_percent":-13.402611341276424,"price_change_1h_percent":-18.953803846856225,"price_change_4h_percent":187.06131621901014,"price_change_24h_percent":520.7909672001974,"trade_5m_count":14,"trade_1h_count":327,"trade_4h_count":1110,"trade_24h_count":5778,"volume_5m_change_percent":273.0418045672699,"volume_1h_change_percent":-48.77273074493856,"volume_4h_change_percent":362.51313139716024,"volume_24h_change_percent":2831.753881765816,"unique_wallet_24h":1025,"unique_wallet_24h_change_percent":713.4920634920635,"buy_24h":3254,"sell_24h":2524,"holder":288,"recent_listing_time":1755010296,"safetyLevel":"OK","trending_score_5m":34,"trending_score_1h":37,"trending_score_4h":89,"trending_score_24h":88,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.00007231152705272229,"lockup_percent":0,"score_components_5m":{"volume":90,"acceleration":0,"txns":85,"priceFactor":0.54},"score_components_1h":{"volume":90,"acceleration":0,"txns":89,"priceFactor":0.6},"score_components_4h":{"volume":86,"acceleration":97,"txns":84,"priceFactor":1},"score_components_24h":{"volume":87,"acceleration":99,"txns":84,"wallets":85,"buyPressure":84,"priceFactor":1}},{"address":"2SX3prnhH7b147eiMqooiD9tq4NYy598reVZwUam9iq5","name":"happi cat","symbol":"happi","logo_uri":"https://cdn.dexscreener.com/cms/images/aqJMwRUB5dpsgoXl?width=800&height=800&quality=95&format=auto","price":0.00006150347208674719,"market_cap":45591.409278870786,"fdv":8361.176957292158,"liquidity":17156.263497793072,"volume_5m_usd":1493.6118939963073,"volume_1h_usd":5366.258590600664,"volume_4h_usd":14008.927694798214,"volume_24h_usd":127222.26304170983,"price_change_5m_percent":12.048445853427955,"price_change_1h_percent":58.4934822632493,"price_change_4h_percent":110.14149885388223,"price_change_24h_percent":23.594336440348865,"trade_5m_count":4,"trade_1h_count":68,"trade_4h_count":296,"trade_24h_count":3350,"volume_5m_change_percent":0,"volume_1h_change_percent":59.45944316441144,"volume_4h_change_percent":38.876890954965035,"volume_24h_change_percent":-70.1124441563583,"unique_wallet_24h":543,"unique_wallet_24h_change_percent":-54.331370899915896,"buy_24h":1698,"sell_24h":1652,"holder":394,"recent_listing_time":1783471147,"safetyLevel":"OK","trending_score_5m":92,"trending_score_1h":123,"trending_score_4h":114,"trending_score_24h":86,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.
20176019316714,"lockup_percent":0,"score_components_5m":{"volume":95,"acceleration":0,"txns":72,"priceFactor":1},"score_components_1h":{"volume":81,"acceleration":94,"txns":70,"priceFactor":1},"score_components_4h":{"volume":74,"acceleration":83,"txns":69,"priceFactor":1},"score_components_24h":{"volume":78,"acceleration":0,"txns":77,"wallets":74,"buyPressure":47,"priceFactor":1}},{"address":"FaL1PFQhNo4JAGaQKSnKurWeNtpexqEAduQjR4H6pump","name":"deflock","symbol":"DeFlock","logo_uri":"https://cdn.dexscreener.com/cms/images/2GM8crmQcfoH1AoV?width=800&height=800&quality=95&format=auto","price":0.00011025962623535131,"market_cap":110514.05957065712,"fdv":85035.01365529024,"liquidity":26450.768902915806,"volume_5m_usd":12.409487281906031,"volume_1h_usd":5019.482279538424,"volume_4h_usd":73504.13326647929,"volume_24h_usd":118465.68181542674,"price_change_5m_percent":-0.17548578431605708,"price_change_1h_percent":-13.826356220562422,"price_change_4h_percent":4.034216851703054,"price_change_24h_percent":35.8756663354567,"trade_5m_count":6,"trade_1h_count":124,"trade_4h_count":1845,"trade_24h_count":5690,"volume_5m_change_percent":-76.63450019077892,"volume_1h_change_percent":-3.443501721227846,"volume_4h_change_percent":63.48221010772998,"volume_24h_change_percent":0,"unique_wallet_24h":774,"unique_wallet_24h_change_percent":59.25925925925926,"buy_24h":2810,"sell_24h":2880,"holder":470,"recent_listing_time":1783078296,"safetyLevel":"OK","trending_score_5m":68,"trending_score_1h":59,"trending_score_4h":132,"trending_score_24h":86,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.0028761995851,"lockup_percent":0,"score_components_5m":{"volume":60,"acceleration":0,"txns":76,"priceFactor":0.99},"score_components_1h":{"volume":80,"acceleration":0,"txns":78,"priceFactor":0.71},"score_components_4h":{"volume":88,"acceleration":87,"txns":88,"priceFactor":1},"score_components_24h":{"volume":77,"acceleration":0,"txns":84,"wallets":80,"buyPressure":34,"priceFactor":1}},{"address":"9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump","name":"Fartcoin ","symbol":"Fartcoin ","logo_uri":"https://cdn.dexscreener.com/cms/images/9af5672845c89585e9ff1e3b26a640090324aa4d92222052d1043e60ef8182de?width=800&height=800&quality=95&format=auto","price":0.148834996264372,"market_cap":149036192.0099145,"fdv":203387783.26017004,"liquidity":9548493.17173986,"volume_5m_usd":3534.9254702705757,"volume_1h_usd":351181.5689276344,"volume_4h_usd":1185502.8924857266,"volume_24h_usd":4861766.269554065,"price_change_5m_percent":-0.14300899504107634,"price_change_1h_percent":0.8433221208456391,"price_change_4h_percent":1.874786092230168,"price_change_24h_percent":3.6985277980396263,"trade_5m_count":79,"trade_1h_count":2561,"trade_4h_count":11650,"trade_24h_count":53990,"volume_5m_change_percent":-97.07671221597552,"volume_1h_change_percent":21.149730080963646,"volume_4h_change_percent":79.34775819891085,"volume_24h_change_percent":2.4570336100505648,"unique_wallet_24h":3627,"unique_wallet_24h_change_percent":11.703110563597166,"buy_24h":26596,"sell_24h":27394,"holder":161045,"recent_listing_time":1729231505,"safetyLevel":"OK","trending_score_5m":68,"trending_score_1h":96,"trending_score_4h":96,"trending_score_24h":85,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.00036242618909908063,"lockup_percent":0,"score_components_5m":{"volume":97,"acceleration":0,"txns":98,"priceFactor":1},"score_components_1h":{"volume":100,"acceleration":88,"txns":99,"priceFactor":1},"score_components_4h":{"volume":100,"acceleration":88,"txns":99,"priceFactor":1},"score_components_24h":{"volume":100,"acceleration":78,"txns":99,"wallets":98,"buyPressure":33,"priceFactor":1}},{"address":"5vAExw5RGMqsxUTUoX2UByh1vi4U4UoLL4fguaMEpump","name":"Dat Bih Gah","symbol":"DATBIHGAH","logo_uri":"https://cdn.dexscreener.com/cms/images/zoByWecRWZAlCXgC","price":0.00013129281810303335,"market_cap":132574.59059776436,"fdv":0,"liquidity":45907.1930318841,"volume_5m_usd":717.2809351880971,"volume_1h_usd":9538.13385056431,"volume_4h_usd":64029.44464084112,"volume_24h_usd":178412.91017674858,"price_change_5m_percent":0.4615617863783122,"price_change_1h_percent":-0.7928799814791141,"price_change_4h_percent":48.670457274875105,"price_change_24h_percent":182.21124690606996,"trade_5m_count":49,"trade_1h_count":368,"trade_4h_count":1925,"trade_24h_count":5950,"volume_5m_change_percent":3.075790269782347,"volume_1h_change_percent":-15.626488642931472,"volume_4h_change_percent":56.14690315003153,"volume_24h_change_percent":4712.385746743817,"unique_wallet_24h":1700,"unique_wallet_24h_change_percent":2781.35593220339,"buy_24h":3061,"sell_24h":2889,"holder":1522,"recent_listing_time":1780157434,"safetyLevel":"OK","trending_score_5m":64,"trending_score_1h":60,"trending_score_4h":87,"trending_score_24h":84,"locked_percent":0.
203145613571861835,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.0301117362383,"lockup_percent":0.03145613571861835,"score_components_5m":{"volume":89,"acceleration":0,"txns":95,"priceFactor":1},"score_components_1h":{"volume":86,"acceleration":0,"txns":89,"priceFactor":0.98},"score_components_4h":{"volume":87,"acceleration":86,"txns":89,"priceFactor":1},"score_components_24h":{"volume":82,"acceleration":100,"txns":85,"wallets":92,"buyPressure":55,"priceFactor":1}},{"address":"J8PSdNP3QewKq2Z1JJJFDMaqF7KcaiJhR7gbr5KZpump","name":"Tung Tung Tung Sahur","symbol":"TripleT","logo_uri":"https://cdn.dexscreener.com/cms/images/r5ILkoKqtVrSUIIR?width=800&height=800&quality=95&format=auto","price":0.020577636484896574,"market_cap":20384874.87300966,"fdv":20199.570750304854,"liquidity":1319638.2666331932,"volume_5m_usd":4772.36295121684,"volume_1h_usd":186008.77837571283,"volume_4h_usd":1889552.3770925107,"volume_24h_usd":2716492.1715525957,"price_change_5m_percent":1.031059956691603,"price_change_1h_percent":-8.373995114494528,"price_change_4h_percent":40.98947139810394,"price_change_24h_percent":67.20636911883928,"trade_5m_count":82,"trade_1h_count":1329,"trade_4h_count":7740,"trade_24h_count":13865,"volume_5m_change_percent":-52.50287982437496,"volume_1h_change_percent":-85.28742969222014,"volume_4h_change_percent":1268.996653770984,"volume_24h_change_percent":39.70348671672738,"unique_wallet_24h":2220,"unique_wallet_24h_change_percent":4.029990627928772,"buy_24h":6755,"sell_24h":7110,"holder":12229,"recent_listing_time":1771921733,"safetyLevel":"OK","trending_score_5m":68,"trending_score_1h":57,"trending_score_4h":99,"trending_score_24h":83,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.001158692463163497,"lockup_percent":0,"score_components_5m":{"volume":98,"acceleration":0,"txns":98,"priceFactor":1},"score_components_1h":{"volume":99,"acceleration":0,"txns":98,"priceFactor":0.82},"score_components_4h":{"volume":100,"acceleration":99,"txns":98,"priceFactor":1},"score_components_24h":{"volume":99,"acceleration":86,"txns":92,"wallets":95,"buyPressure":26,"priceFactor":1}},{"address":"7AJ9sdZW6Sodb8ajnEkESeWtQVVHyZ4Gg85H3c1Ypump","name":"The Rizz Bull","symbol":"Rizzler","logo_uri":"https://cdn.dexscreener.com/cms/images/ALdFj3-jvz_VfihQ","price":0.0001060246205716623,"market_cap":98650.08639280472,"fdv":30037.884431714992,"liquidity":25125.94197377304,"volume_5m_usd":20.349958349456315,"volume_1h_usd":2374.204340556145,"volume_4h_usd":26472.00276972483,"volume_24h_usd":112963.95328081868,"price_change_5m_percent":1.3133134698936768,"price_change_1h_percent":1.3598570002971624,"price_change_4h_percent":-26.651247656943895,"price_change_24h_percent":41.63672182012157,"trade_5m_count":532,"trade_1h_count":9724,"trade_4h_count":47766,"trade_24h_count":75182,"volume_5m_change_percent":-93.45165793256692,"volume_1h_change_percent":22.884599291622617,"volume_4h_change_percent":-17.715048351802317,"volume_24h_change_percent":-65.17615021134011,"unique_wallet_24h":830,"unique_wallet_24h_change_percent":-55.424274973147156,"buy_24h":24199,"sell_24h":50983,"holder":1243,"recent_listing_time":1783296082,"safetyLevel":"OK","trending_score_5m":80,"trending_score_1h":128,"trending_score_4h":51,"trending_score_24h":83,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.010245445311031156,"lockup_percent":0,"score_components_5m":{"volume":63,"acceleration":0,"txns":100,"priceFactor":1},"score_components_1h":{"volume":74,"acceleration":89,"txns":100,"priceFactor":1},"score_components_4h":{"volume":81,"acceleration":0,"txns":100,"priceFactor":0.55},"score_components_24h":{"volume":76,"acceleration":0,"txns":100,"wallets":82,"buyPressure":0,"priceFactor":1}},{"address":"4SnKwnz6DyagftnFqdxsvWvehrcbEDhxmmXNQk2Jpump","name":"Free Joby","symbol":"Joby","logo_uri":"https://cdn.dexscreener.com/cms/images/qxjVI03LToRSxlUo?width=800&height=800&quality=95&format=auto","price":0.0028534563252350415,"market_cap":2853437.4044927116,"fdv":15092.657929237552,"liquidity":202097.09832891182,"volume_5m_usd":0,"volume_1h_usd":2015.3997122051164,"volume_4h_usd":26433.650708717796,"volume_24h_usd":364863.7876515591,"price_change_5m_percent":0,"price_change_1h_percent":-3.868774265335187,"price_change_4h_percent":-8.182819417600095,"price_change_24h_percent":-3.7260808899289533,"trade_5m_count":36,"trade_1h_count":424,"trade_4h_count":2017,"trade_24h_count":13350,"volume_5m_change_percent":-100,"volume_1h_change_percent":-76.91159141194738,"volume_4h_change_percent":-34.231224352343375,"volume_24h_change_percent":26.104439899977017,"unique_wallet_24h":939,"unique_wallet_24h_change_percent":4.565701559020044,"buy_24h":6855,"sell_24h":6495,"holder":2161,"recent_listing_time":1781218093,"safetyLevel":"OK","trending_score_5m":24,"trending_score_1h":52,"trending_score_4h":53,"trending_score_24h":82,"locked_percent":6.27668154053546,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.
20006530265649999999,"lockup_percent":6.27668154053546,"score_components_5m":{"volume":0,"acceleration":0,"txns":92,"priceFactor":1},"score_components_1h":{"volume":71,"acceleration":0,"txns":91,"priceFactor":0.92},"score_components_4h":{"volume":81,"acceleration":0,"txns":90,"priceFactor":0.86},"score_components_24h":{"volume":90,"acceleration":84,"txns":92,"wallets":84,"buyPressure":55,"priceFactor":0.95}},{"address":"EpVHyKK8oxcLmp2C2NhAos1oDxgBNriw3wSLSozYpump","name":"Grand Theft Auto VI","symbol":"GTAVI","logo_uri":"https://cdn.dexscreener.com/cms/images/3LJ7K2S-7KAQUmVT?width=800&height=800&quality=95&format=auto","price":0.0005594650235804643,"market_cap":557950.9439097774,"fdv":0,"liquidity":89662.78056589443,"volume_5m_usd":206.66460208382193,"volume_1h_usd":16647.796652475277,"volume_4h_usd":31585.95265920393,"volume_24h_usd":106414.09578556394,"price_change_5m_percent":0.42072733603477674,"price_change_1h_percent":1.4131946602306698,"price_change_4h_percent":-6.464208496928167,"price_change_24h_percent":-1.694007733685963,"trade_5m_count":5,"trade_1h_count":259,"trade_4h_count":331,"trade_24h_count":1179,"volume_5m_change_percent":-76.30832057176755,"volume_1h_change_percent":64.059141090249,"volume_4h_change_percent":47.13862264653908,"volume_24h_change_percent":12.36911831668114,"unique_wallet_24h":363,"unique_wallet_24h_change_percent":-20.044052863436125,"buy_24h":621,"sell_24h":558,"holder":5625,"recent_listing_time":1781787935,"safetyLevel":"OK","trending_score_5m":62,"trending_score_1h":108,"trending_score_4h":85,"trending_score_24h":82,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.013106026756800393,"lockup_percent":0,"score_components_5m":{"volume":79,"acceleration":0,"txns":74,"priceFactor":1},"score_components_1h":{"volume":91,"acceleration":94,"txns":87,"priceFactor":1},"score_components_4h":{"volume":82,"acceleration":84,"txns":72,"priceFactor":0.89},"score_components_24h":{"volume":75,"acceleration":81,"txns":58,"wallets":68,"buyPressure":67,"priceFactor":0.98}},{"address":"8J69rbLTzWWgUJziFY8jeu5tDwEPBwUz4pKBMr5rpump","name":"Wojak ","symbol":"WOJAK","logo_uri":"https://cdn.dexscreener.com/cms/images/f0ebdab5680465e3a019b96338970c8de8c20a5bac31b46cd2cb92ad1bcf107d?width=800&height=800&quality=95&format=auto","price":0.003292286492888358,"market_cap":3273388.776006053,"fdv":4866692.854738332,"liquidity":553996.6014383518,"volume_5m_usd":160.9948211257988,"volume_1h_usd":6700.846958430853,"volume_4h_usd":90275.51007829425,"volume_24h_usd":284771.08492156933,"price_change_5m_percent":0.6349188477090947,"price_change_1h_percent":-1.5244377338367068,"price_change_4h_percent":8.713631168069888,"price_change_24h_percent":13.560853988398122,"trade_5m_count":13,"trade_1h_count":135,"trade_4h_count":1204,"trade_24h_count":3482,"volume_5m_change_percent":55.900384801708356,"volume_1h_change_percent":-87.90735583754626,"volume_4h_change_percent":202.1184698571201,"volume_24h_change_percent":9.69976908761033,"unique_wallet_24h":631,"unique_wallet_24h_change_percent":-18.36998706338939,"buy_24h":1873,"sell_24h":1609,"holder":17828,"recent_listing_time":1762128688,"safetyLevel":"OK","trending_score_5m":55,"trending_score_1h":56,"trending_score_4h":90,"trending_score_24h":81,"locked_percent":0.10001223347741472,"staked_percent":0,"multisig_percent":4.809397937426983,"multisig_vault_count":1,"multisig_threshold":3,"multisig_member_count":5,"burn_percent":0.0014327734217677668,"lockup_percent":4.909410170904398,"score_components_5m":{"volume":76,"acceleration":0,"txns":84,"priceFactor":1},"score_components_1h":{"volume":84,"acceleration":0,"txns":79,"priceFactor":0.97},"score_components_4h":{"volume":90,"acceleration":93,"txns":85,"priceFactor":1},"score_components_24h":{"volume":88,"acceleration":80,"txns":78,"wallets":77,"buyPressure":74,"priceFactor":1}},{"address":"GPhTkYJKJaY5yhRAVTAjprEuGEsBgdfXNYZ3WHYUpump","name":"Kiri","symbol":"Kiri","logo_uri":"https://cdn.dexscreener.com/cms/images/WRqMnt8YFoss55tv?width=64&height=64&fit=crop&quality=95&format=auto","price":0.00001999232309898976,"market_cap":16653.203989297726,"fdv":10361.15414681891,"liquidity":3964.4858813940014,"volume_5m_usd":924.6166314771126,"volume_1h_usd":5742.295438646729,"volume_4h_usd":25955.057555563908,"volume_24h_usd":31324.93625230183,"price_change_5m_percent":1
27.437163693009314,"price_change_1h_percent":108.51383294024659,"price_change_4h_percent":90.15732565299203,"price_change_24h_percent":38.307593879344545,"trade_5m_count":14,"trade_1h_count":122,"trade_4h_count":690,"trade_24h_count":2262,"volume_5m_change_percent":-6.091937880960753,"volume_1h_change_percent":22.55898087434767,"volume_4h_change_percent":383.345323448945,"volume_24h_change_percent":0,"unique_wallet_24h":474,"unique_wallet_24h_change_percent":38.19241982507289,"buy_24h":1307,"sell_24h":955,"holder":120,"recent_listing_time":1783550941,"safetyLevel":"OK","trending_score_5m":93,"trending_score_1h":125,"trending_score_4h":128,"trending_score_24h":81,"locked_percent":0,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":9.496000000000001e-10,"lockup_percent":0,"score_components_5m":{"volume":91,"acceleration":0,"txns":85,"priceFactor":1},"score_components_1h":{"volume":82,"acceleration":89,"txns":77,"priceFactor":1},"score_components_4h":{"volume":80,"acceleration":97,"txns":81,"priceFactor":1},"score_components_24h":{"volume":52,"acceleration":0,"txns":70,"wallets":71,"buyPressure":88,"priceFactor":1}},{"address":"949aaReg5QnEKbde41BBj5Z45uU2Y8yhB4bZaif4pump","name":"Decentral","symbol":"DECENTRAL","logo_uri":"https://cdn.dexscreener.com/cms/images/rlk9Dv2ti-A6hOtz?width=800&height=800&quality=95&format=auto","price":0.000026859184419136966,"market_cap":48845.675865085344,"fdv":17285.36604227668,"liquidity":13020.225697990167,"volume_5m_usd":162.74200649429315,"volume_1h_usd":1960.4765641501251,"volume_4h_usd":5596.784037527939,"volume_24h_usd":105253.03338524766,"price_change_5m_percent":0,"price_change_1h_percent":-20.49273874867191,"price_change_4h_percent":-13.469703132672063,"price_change_24h_percent":18.687485115487895,"trade_5m_count":2,"trade_1h_count":39,"trade_4h_count":104,"trade_24h_count":2334,"volume_5m_change_percent":-16.42619485621772,"volume_1h_change_percent":140.8756426652593,"volume_4h_change_percent":-23.6535470608645,"volume_24h_change_percent":2.43350381907982,"unique_wallet_24h":521,"unique_wallet_24h_change_percent":-5.2727272727272725,"buy_24h":1087,"sell_24h":1247,"holder":311,"recent_listing_time":1782929169,"safetyLevel":"OK","trending_score_5m":72,"trending_score_1h":38,"trending_score_4h":46,"trending_score_24h":80,"locked_percent":2.8845330308010295,"staked_percent":0,"multisig_percent":0,"multisig_vault_count":null,"multisig_threshold":null,"multisig_member_count":null,"burn_percent":0.00047209326029999996,"lockup_percent":2.8845330308010295,"score_components_5m":{"volume":77,"acceleration":0,"txns":59,"priceFactor":1},"score_components_1h":{"volume":70,"acceleration":0,"txns":61,"priceFactor":0.56},"score_components_4h":{"volume":62,"acceleration":0,"txns":49,"priceFactor":0.77},"score_components_24h":{"volume":74,"acceleration":77,"txns":71,"wallets":73,"buyPressure":14,"priceFactor":1}}]}'),Ij={score:{view:"trending",defaultDir:"desc"},price:{view:"price",defaultDir:"desc"},change:{view:"gainers",defaultDir:"desc"},volume:{view:"volume",defaultDir:"desc"},txns:{view:"txns",defaultDir:"desc"},mcap:{view:"market_cap",defaultDir:"desc"},liquidity:{view:"liquidity",defaultDir:"desc"},holders:{view:"holders",defaultDir:"desc"},age:{view:"new_tokens",defaultDir:"desc"},lockup:{view:"lockup",defaultDir:"desc"}},Lj=Object.fromEntries(Object.entries(Ij).map(e=>{let[t,{view:n}]=e;return[n,t]})),Rj=Eg(),Dj=[{sort:"score",label:"Trending"}],Bj=[{key:"5m",label:"5m"},{key:"1h",label:"1h"},{key:"4h",label:"4h"},{key:"24h",label:"24h"}];function Fj(e){return e>=1e9?"$".concat((e/1e9).toFixed(2),"B"):e>=1e6?"$".concat((e/1e6).toFixed(2),"M"):e>=1e3?"$".concat((e/1e3).toFixed(1),"K"):e>=1?"$".concat(e.toFixed(2)):e>0?"$".concat(e.toPrecision(3)):"$0"}function Uj(e){return e>=1?"$".concat(e.toFixed(2)):e>=.01?"$".concat(e.toFixed(4)):e>0?"$".concat(e.toPrecision(3)):"$0"}const zj=e=>{let{value:t}=e;if(t>=.01||t<=0)return(0,Lg.jsx)(Lg.Fragment,{children:Uj(t)});const n=t.toFixed(20),r=n.match(/^0\.(0+)/);if(!r||r[1].length<4)return(0,Lg.jsx)(Lg.Fragment,{children:Uj(t)});const i=r[1].length,s=2+i,a=n.slice(s,s+4).replace(/0+$/,"");return(0,Lg.jsxs)("span",{children:["$0.0",(0,Lg.jsx)("sub",{className:"text-[0.8em]",children:i}),a]})};function qj(e){return"".concat(e>=0?"+":"").concat(e.toFixed(1),"%")}function Wj(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>
2=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toLocaleString()}function Hj(e){if(!e)return"\u2014";const t=Date.now()-1e3*e,n=Math.floor(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return n<60?"".concat(n,"m"):r<24?"".concat(r,"h"):"".concat(i,"d")}function Kj(e){const t=Math.floor((Date.now()-e)/1e3);return t<5?"just now":t<60?"".concat(t,"s ago"):"".concat(Math.floor(t/60),"m ago")}function Vj(e,t){return{"5m":e.volume_5m_usd,"1h":e.volume_1h_usd,"4h":e.volume_4h_usd,"24h":e.volume_24h_usd}[t]}function $j(e,t){return{"5m":e.price_change_5m_percent,"1h":e.price_change_1h_percent,"4h":e.price_change_4h_percent,"24h":e.price_change_24h_percent}[t]}function Yj(e,t){return{"5m":e.trade_5m_count,"1h":e.trade_1h_count,"4h":e.trade_4h_count,"24h":e.trade_24h_count}[t]}function Gj(e,t){return{"5m":e.trending_score_5m,"1h":e.trending_score_1h,"4h":e.trending_score_4h,"24h":e.trending_score_24h}[t]}const Jj={minLiquidity:"",maxLiquidity:"",minMcap:"",maxMcap:"",minHolders:"",maxHolders:"",minVolume:"",maxVolume:"",minLockup:"",maxLockup:""};function Zj(e){return Object.values(e).some(e=>""!==e)}const Qj=e=>{let{filters:t,onChange:n,onClose:i}=e;const[s,a]=(0,r.useState)(t),l=(e,t)=>a(n=>(0,o.A)((0,o.A)({},n),{},{[e]:t}));return(0,Lg.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-24",onClick:i,children:[(0,Lg.jsx)("div",{className:"absolute inset-0 bg-black/60"}),(0,Lg.jsxs)("div",{className:"relative bg-crypto-dark border border-gray-700 rounded-xl p-5 w-full max-w-sm shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Lg.jsx)("h3",{className:"text-lg font-bold",children:"Filter"}),(0,Lg.jsx)("button",{onClick:i,className:"text-gray-400 hover:text-white text-xl leading-none",children:"\xd7"})]}),(0,Lg.jsx)("div",{className:"space-y-3",children:[["Liquidity","minLiquidity","maxLiquidity","K"],["Market Cap","minMcap","maxMcap","K"],["Holders","minHolders","maxHolders",""],["Volume","minVolume","maxVolume","K"],["Lockup","minLockup","maxLockup","%"]].map(e=>{let[t,n,r,i]=e;return(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsx)("span",{className:"text-sm text-gray-400 w-20 flex-shrink-0",children:t}),(0,Lg.jsxs)("div",{className:"flex-1 flex gap-2",children:[(0,Lg.jsx)("input",{type:"number",placeholder:"Min",value:s[n],onChange:e=>l(n,e.target.value),className:"w-full bg-crypto-gray border border-gray-700 rounded-lg px-2 py-1.5 text-sm text-white focus:outline-none focus:border-crypto-accent"}),(0,Lg.jsx)("input",{type:"number",placeholder:"Max",value:s[r],onChange:e=>l(r,e.target.value),className:"w-full bg-crypto-gray border border-gray-700 rounded-lg px-2 py-1.5 text-sm text-white focus:outline-none focus:border-crypto-accent"})]}),i&&(0,Lg.jsx)("span",{className:"text-xs text-gray-500 w-4",children:i})]},t)})}),(0,Lg.jsxs)("div",{className:"flex gap-2 mt-5",children:[(0,Lg.jsx)("button",{onClick:()=>{Og("trending_filter_applied",{fields:Object.entries(s).filter(e=>{let[,t]=e;return""!==t}).map(e=>{let[t]=e;return t}),fieldCount:Object.values(s).filter(e=>""!==e).length}),n(s),i()},className:"flex-1 bg-crypto-accent text-crypto-dark py-2 rounded-lg font-medium text-sm hover:brightness-110 transition",children:"Apply"}),(0,Lg.jsx)("button",{onClick:()=>{Og("trending_filter_cleared"),n(Jj),i()},className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-white border border-gray-700 transition",children:"Clear"})]})]})]})},Xj=new Date("2026-05-28T23:59:59Z"),ek=Oj,tk=()=>(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("div",{className:"relative flex-1",children:[(0,Lg.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none select-none blur-[1.5px] opacity-55 max-h-[calc(100vh-4rem)] overflow-hidden",children:(0,Lg.jsx)(nk,{preview:ek})}),(0,Lg.jsx)("div",{className:"absolute inset-0 z-30 flex items-start justify-center px-4 pt-10 sm:pt-16 bg-crypto-dark/50 backdrop-blur-[1px]",children:(0,Lg.jsxs)("div",{className:"w-full max-w-md",children:[(0,Lg.jsx)(Hw,{required:"watcher",feature:"live trending"}),(0,Lg.jsx)("p",{className:"text-center text-xs text-gray-500 mt-3",children:"The table behind this is an old sample snapshot \u2014 log in for the live feed."})]})})]}),(0,Lg.jsx)(_y,{})]}),nk=e=>{var t,n,i,s;let{preview:a}=e;const[o,l]=vt(),c=o.get("range")||"24h",u=parseInt(o.get("page")||"1",10),d=o.get("view")||"trending",h=o.get("dir")||"",p=parseFloat(o.get("maxAge")||""),f=!isNaN(p)&&p>0,m=Lj[d]||"score",g=h||(null===(t=Ij[m])||void 0===t?void 0:t.defaultDir)||"desc",[y,x]=(0,r.useState)(Jj),[v,b]=(0,r.useState)(!1),[w,_]=(0,r.useState)(null!==(n=null===a||void 0===a?void 0:a.tokens)&&void 0!==n?n:[]),[j,k]=(0,r.useState)(null!==(i=null===a||void 0===a?void 0:a.tokens.length)&&void 0!==i?i:0),[N,S]=(0,r.useState)(!1),[E,A]=(0,r.useState)(null!==(s=null===a||void 0===a?void 0:a.capturedAt)&&void 0!==s?s:0),[C,M]=(0,r.useState)(!a),[T,P]=(0,r.useState)(null),[,O]=(0,r.useState)(0);(0,r.useEffect)(()=>{const e=setInterval(()=>O(e=>e+1),5e3);return()=>clearInterval(e)},[]);const I=(0,r.useCallback)(e=>{l(t=>{const n=new URLSearchParams(t);for(const[r,i]of Object.entries(e))i?n.set(r,i):n.delete(r);return n},{replace:!0})},[l]),L=(0,r.useCallback)(e=>{I({page:e>1?String(e):""})},[I]),R=(0,r.useCallback)(e=>{const{view:t,defaultDir:n}=Ij[e];if(Og("trending_sorted",{column:e,wasActive:m===e}),m===e){const e="desc"===g?"asc":"desc";I({view:t,dir:e===n?"":e,page:""})}else I({view:t,dir:"",page:""})},[m,g,I]),D=(0,r.useRef)(!!a),B=(0,r.useCallback)(async()=>
2{if(!a){D.current||M(!0),P(null);try{var e;const t=new URLSearchParams({view:d});"24h"!==c&&t.set("range",c),u>1&&t.set("page",String(u)),h&&h!==(null===(e=Ij[m])||void 0===e?void 0:e.defaultDir)&&t.set("dir",h),y.minLiquidity&&t.set("minLiquidity",String(1e3*parseFloat(y.minLiquidity))),y.maxLiquidity&&t.set("maxLiquidity",String(1e3*parseFloat(y.maxLiquidity))),y.minMcap&&t.set("minMcap",String(1e3*parseFloat(y.minMcap))),y.maxMcap&&t.set("maxMcap",String(1e3*parseFloat(y.maxMcap))),y.minHolders&&t.set("minHolders",y.minHolders),y.maxHolders&&t.set("maxHolders",y.maxHolders),y.minVolume&&t.set("minVolume",String(1e3*parseFloat(y.minVolume))),y.maxVolume&&t.set("maxVolume",String(1e3*parseFloat(y.maxVolume))),y.minLockup&&t.set("minLockupPercent",y.minLockup),y.maxLockup&&t.set("maxLockupPercent",y.maxLockup),f&&t.set("maxAgeHours",String(p));const n=await Ng("".concat(Rj,"/api/trending?").concat(t));if(!n.ok)throw new Error("HTTP ".concat(n.status));const r=await n.json();_(r.tokens),k(r.totalFiltered),S(r.hasNext),A(r.cachedAt),D.current=!0}catch(h$){D.current||P(h$ instanceof Error?h$.message:String(h$))}finally{M(!1)}}},[d,c,u,h,m,y,f,p,a]);(0,r.useEffect)(()=>{B()},[B]);const F=(0,r.useRef)(B);F.current=B,(0,r.useEffect)(()=>{if(a)return;const e=setInterval(()=>{F.current()},1e4);return()=>clearInterval(e)},[a]);const U=w,z=e=>{let{col:t}=e;return(0,Lg.jsx)("span",{className:"ml-0.5 inline-block w-3 text-center",children:m===t?"desc"===g?"\u25bc":"\u25b2":""})},q=e=>"py-1 px-3 text-xs font-medium whitespace-nowrap cursor-pointer select-none transition-colors bg-crypto-dark ".concat(m===e?"text-crypto-accent":"text-gray-500 hover:text-gray-300"),W=(0,Lg.jsxs)("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 py-2",children:[a&&(0,Lg.jsxs)("div",{className:"mb-2 flex items-center gap-2 rounded-lg border border-yellow-600/40 bg-yellow-600/10 px-3 py-2 text-xs text-yellow-200/90",children:[(0,Lg.jsx)("i",{className:"fas fa-clock-rotate-left"}),(0,Lg.jsxs)("span",{children:["Old sample snapshot from ",new Date(a.capturedAt).toLocaleDateString()," \u2014 not live. Log in to see the live trending feed."]})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-3 mb-1.5 flex-wrap",children:[(0,Lg.jsx)("div",{className:"flex gap-1",children:Dj.map(e=>(0,Lg.jsxs)("button",{onClick:()=>R(e.sort),className:"px-3 py-1 rounded-lg text-xs font-medium transition-colors ".concat(m===e.sort?"bg-crypto-accent text-crypto-dark":"bg-crypto-gray text-gray-400 hover:text-white border border-gray-700"),children:[e.label,(0,Lg.jsx)(z,{col:e.sort})]},e.sort))}),(0,Lg.jsx)("div",{className:"w-px h-4 bg-gray-700"}),(0,Lg.jsx)("div",{className:"flex gap-1",children:Bj.map(e=>(0,Lg.jsx)("button",{onClick:()=>{Og("trending_range_changed",{range:e.key}),I({range:"24h"===e.key?"":e.key,page:""})},className:"px-2.5 py-1 rounded text-xs font-medium transition-colors ".concat(c===e.key?"bg-crypto-accent/20 text-crypto-accent border border-crypto-accent/40":"bg-crypto-gray text-gray-400 hover:text-white border border-gray-700"),children:e.label},e.key))}),(0,Lg.jsxs)("button",{onClick:()=>{Og("trending_filter_opened",{hasActiveFilters:Zj(y)}),b(!0)},className:"flex items-center gap-1.5 px-2.5 py-1 rounded text-xs font-medium border transition-colors ".concat(Zj(y)?"bg-crypto-accent/20 text-crypto-accent border-crypto-accent/40":"bg-crypto-gray text-gray-400 hover:text-white border-gray-700"),children:[(0,Lg.jsx)("i",{className:"fas fa-filter text-[10px]"})," Filter",Zj(y)&&(0,Lg.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-crypto-accent"})]}),(0,Lg.jsx)("button",{onClick:()=>I({maxAge:f?"":String(24),page:""}),title:"Show only tokens younger than ".concat(24,"h"),className:"px-2.5 py-1 rounded text-xs font-medium border transition-colors ".concat(f?"bg-crypto-accent/20 text-crypto-accent border-crypto-accent/40":"bg-crypto-gray text-gray-400 hover:text-white border-gray-700"),children:"New Tokens"}),(0,Lg.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[j>0&&!C&&(0,Lg.jsxs)("span",{className:"text-xs text-gray-500",children:[j," tokens"]}),a?(0,Lg.jsx)("span",{className:"text-xs text-yellow-500/80",children:"sample snapshot"}):E>0?(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 flex items-center",children:[(0,Lg.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-green-500 mr-1 animate-pulse"}),Kj(E)]}):null]})]}),v&&(0,Lg.jsx)(Qj,{filters:y,onChange:x,onClose:()=>b(!1)}),T&&!C&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-red-400 text-4xl mb-4 block"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-4",children:T}),(0,Lg.jsx)("button",{onClick:B,className:"bg-crypto-accent text-crypto-dark px-4 py-2 rounded-lg font-medium hover:brightness-110 transition",children:"Retry"})]}),C&&(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl overflow-hidden",children:(0,Lg.jsx)("div",{className:"overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsx)("tr",{children:["Token","MCap","Price","Age","Lockup %","".concat(c," %"),"Vol ".concat(c),"Txns ".concat(c),"Liquidity","Holders"].map(e=>(0,Lg.jsx)("th",{className:"text-left py-1 px-3 text-xs font-medium text-gray-500 whitespace-nowrap",children:e},e))})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700/50",children:Array.from({length:20}).map((e,t)=>(0,Lg.jsx)("tr",{className:"animate-pulse",children:Array.from({length:9}).map((e,t)=>(0,Lg.jsx)("td",{className:"py-1 px-3",children:(0,Lg.jsx)("div",{className:"h-4 w-12 bg-gray-700 rounded"})},t))},t))})]})})}),!C&&!T&&0===U.length&&(0,Lg.jsxs)("div",{className:"text-center py-16 text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-ghost text-4xl mb-4 block"}),(0,Lg.jsx)("p",{children:"No tokens found. Try adjusting your filters."})]}),!C&&!T&&U.length>0&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-t-xl overflow-auto max-h-[calc(100vh-160px)]",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700 sticky top-0 z-10",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left py-1 px-3 text-xs font-medium text-gray-500 bg-crypto-dark",children:"Token"}),(0,Lg.jsxs)("th",{className:"text-right bg-crypto-dark ".concat(q("mcap")),onClick:()=>
2R("mcap"),children:["MCap",(0,Lg.jsx)(z,{col:"mcap"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("price")),onClick:()=>R("price"),children:["Price",(0,Lg.jsx)(z,{col:"price"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("age")),onClick:()=>R("age"),children:["Age",(0,Lg.jsx)(z,{col:"age"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("lockup")),onClick:()=>R("lockup"),title:"% of supply not immediately liquid: locked (Streamflow vesting), staked (Tibane), or held in multisig vaults. Reduces immediate-dump risk; not a guarantee of safety.",children:["Lockup %",(0,Lg.jsx)(z,{col:"lockup"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("change")),onClick:()=>R("change"),children:[c," %",(0,Lg.jsx)(z,{col:"change"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("volume")),onClick:()=>R("volume"),children:["Vol ",c,(0,Lg.jsx)(z,{col:"volume"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("txns")),onClick:()=>R("txns"),children:["Txns ",c,(0,Lg.jsx)(z,{col:"txns"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("liquidity")),onClick:()=>R("liquidity"),children:["Liquidity",(0,Lg.jsx)(z,{col:"liquidity"})]}),(0,Lg.jsxs)("th",{className:"text-right ".concat(q("holders")),onClick:()=>R("holders"),children:["Holders",(0,Lg.jsx)(z,{col:"holders"})]})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700/50",children:U.map((e,t)=>{var n,r,i,s;const a=function(e,t){return{"5m":e.score_components_5m,"1h":e.score_components_1h,"4h":e.score_components_4h,"24h":e.score_components_24h}[t]}(e,c),o="24h"===c?{volume:30,acceleration:20,txns:20,wallets:15,buyPressure:15}:{volume:45,acceleration:30,txns:25};return(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"py-1 px-3",children:(0,Lg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Lg.jsxs)("div",{className:"relative group/score flex-shrink-0",children:[(0,Lg.jsx)(ft,{to:"/token/".concat(e.address),children:(0,Lg.jsx)(Lb,{src:e.logo_uri,symbol:e.symbol,name:e.name,sizeClass:"w-9 h-9"})}),a&&(()=>{const t=Vj(e,c),n=function(e,t){return{"5m":e.volume_5m_change_percent,"1h":e.volume_1h_change_percent,"4h":e.volume_4h_change_percent,"24h":e.volume_24h_change_percent}[t]}(e,c),r=Yj(e,c),i=e.buy_24h+e.sell_24h,s=i>0?(e.buy_24h/i*100).toFixed(0):"50";return(0,Lg.jsxs)("div",{className:"absolute left-0 top-full mt-1 z-50 hidden group-hover/score:block bg-crypto-dark border border-gray-600 rounded-lg p-3 text-left text-xs whitespace-nowrap shadow-xl min-w-[240px]",children:[(0,Lg.jsxs)("div",{className:"text-gray-400 font-normal mb-2",children:["Trending Score: ",Gj(e,c)," (",c,")"]}),(0,Lg.jsxs)("table",{className:"w-full font-normal",children:[(0,Lg.jsx)("thead",{children:(0,Lg.jsxs)("tr",{className:"text-gray-500",children:[(0,Lg.jsx)("th",{className:"text-left pb-1",children:"Signal"}),(0,Lg.jsx)("th",{className:"text-right pb-1",children:"Raw"}),(0,Lg.jsx)("th",{className:"text-right pb-1",children:"%ile"}),(0,Lg.jsx)("th",{className:"text-right pb-1",children:"Wt"})]})}),(0,Lg.jsxs)("tbody",{className:"text-white",children:[(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"text-gray-400 pr-3 py-0.5",children:"Volume"}),(0,Lg.jsx)("td",{className:"text-right",children:Fj(t)}),(0,Lg.jsx)("td",{className:"text-right text-crypto-accent",children:a.volume}),(0,Lg.jsxs)("td",{className:"text-right text-gray-500",children:[o.volume,"%"]})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"text-gray-400 pr-3 py-0.5",children:"Vol \u0394%"}),(0,Lg.jsx)("td",{className:"text-right",children:null!=n?"".concat(n>0?"+":"").concat(Number(n).toFixed(0),"%"):"\u2014"}),(0,Lg.jsx)("td",{className:"text-right text-crypto-accent",children:a.acceleration}),(0,Lg.jsxs)("td",{className:"text-right text-gray-500",children:[o.acceleration,"%"]})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"text-gray-400 pr-3 py-0.5",children:"Txns"}),(0,Lg.jsx)("td",{className:"text-right",children:Wj(r)}),(0,Lg.jsx)("td",{className:"text-right text-crypto-accent",children:a.txns}),(0,Lg.jsxs)("td",{className:"text-right text-gray-500",children:[o.txns,"%"]})]}),void 0!==a.wallets&&(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"text-gray-400 pr-3 py-0.5",children:"Wallets"}),(0,Lg.jsx)("td",{className:"text-right",children:Wj(e.unique_wallet_24h)}),(0,Lg.jsx)("td",{className:"text-right text-crypto-accent",children:a.wallets}),(0,Lg.jsxs)("td",{className:"text-right text-gray-500",children:[o.wallets,"%"]})]}),void 0!==a.buyPressure&&(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"text-gray-400 pr-3 py-0.5",children:"Buy %"}),(0,Lg.jsxs)("td",{className:"text-right",children:[s,"%"]}),(0,Lg.jsx)("td",{className:"text-right text-crypto-accent",children:a.buyPressure}),(0,Lg.jsxs)("td",{className:"text-right text-gray-500",children:[o.buyPressure,"%"]})]})]})]}),void 0!==a.priceFactor&&(()=>{const t="5m"===c?e.price_change_5m_percent:"1h"===c?e.price_change_1h_percent:"4h"===c?e.price_change_4h_percent:e.price_change_24h_percent,n=null!=t?"".concat(t>0?"+":"").concat(t.toFixed(0),"%"):"\u2014",r=a.priceFactor<.5?"text-red-400":a.priceFactor<1?"text-yellow-400":"text-gray-400";return(0,Lg.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-700 text-[11px] flex justify-between text-gray-500",children:[(0,Lg.jsx)("span",{children:"Price \u0394% (multiplier)"}),(0,Lg.jsxs)("span",{className:"text-white",children:[n," ",(0,Lg.jsxs)("span",{className:r,children:["\xd7",a.priceFactor.toFixed(2)]})]})]})})()]})})()]}),(0,Lg.jsxs)(ft,{to:"/token/".concat(e.address),className:"min-w-0 group",children:[(0,Lg.jsx)("span",{className:"text-sm font-medium text-white group-hover:text-crypto-accent transition-colors truncate block max-w-[140px]",children:e.name}),(0,Lg.jsxs)("span",{className:"text-xs text-gray-500 inline-flex items-center",children:["$",e.symbol,e.charityName&&(0,Lg.jsx)("i",{className:"fas fa-hand-holding-heart text-pink-400 ml-1.5",title:"Charity coin \u2014 fees routed via ".concat(null!==(n=e.charityDonationSource)&&void 0!==n?n:"donate.gg"," (listed on donate.gg)")}),(0,Lg.jsx)(jy,{locked:e.locked_percent,staked:e.staked_percent,multisig:e.multisig_percent,burned:e.burn_percent,multisigVaultCount:e.multisig_vault_count,multisigThreshold:e.multisig_threshold,multisigMemberCount:e.multisig_member_count})]})]})]})}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-gray-300 whitespace-nowrap",children:Fj(e.market_cap)}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-white font-mono whitespace-nowrap",children:(0,Lg.jsx)(zj,{value:e.price})}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-gray-500 whitespace-nowrap",children:Hj(e.recent_listing_time)}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right whitespace-nowrap ".concat((null!==(r=e.lockup_percent)&&void 0!==r?r:0)>0?"text-gray-300":"text-gray-600"),children:(null!==(i=e.lockup_percent)&&void 0!==i?i:0)>0?"".concat((null!==(s=e.lockup_percent)&&void 0!==s?s:0).toFixed(1),"%"):"\u2014"}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right font-mono whitespace-nowrap ".concat($j(e,c)>=0?"text-green-400":"text-red-400"),children:qj($j(e,c))}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-gray-300 whitespace-nowrap",children:Fj(Vj(e,c))}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-gray-300 whitespace-nowrap",children:Wj(Yj(e,c))}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-gray-300 whitespace-nowrap",children:Fj(e.liquidity)}),(0,Lg.jsx)("td",{className:"py-1 px-3 text-sm text-right text-gray-300 whitespace-nowrap",children:Wj(e.holder)})]},e.address)})})]})}),(0,Lg.jsxs)("div",{className:"flex items-center justify-between py-1 px-3 bg-crypto-gray border border-gray-700 border-t-0 rounded-b-xl",children:[(0,Lg.jsxs)("button",{onClick:()=>L(u-1),disabled:u<=1,className:"px-3 py-1.5 text-sm rounded-lg bg-crypto-dark border border-gray-700 text-gray-400 hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-chevron-left mr-1"})," Prev"]}),(0,Lg.jsxs)("span",{className:"text-sm text-gray-500",children:["Page ",u]}
2),(0,Lg.jsxs)("button",{onClick:()=>L(u+1),disabled:!N,className:"px-3 py-1.5 text-sm rounded-lg bg-crypto-dark border border-gray-700 text-gray-400 hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:["Next ",(0,Lg.jsx)("i",{className:"fas fa-chevron-right ml-1"})]})]})]})]});return a?W:(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),W,(0,Lg.jsx)(_y,{})]})},rk=()=>{const{user:e,isAuthenticated:t,isLoading:n}=Bg(),r=Date.now()<Xj.getTime();return n?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})}),(0,Lg.jsx)(_y,{})]}):r||t&&$g(null===e||void 0===e?void 0:e.tier)?(0,Lg.jsx)(nk,{}):(0,Lg.jsx)(tk,{})},ik=e=>{var t;let{identityKey:n}=e;const[i,s]=(0,r.useState)(null),[a,o]=(0,r.useState)(!0),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)("supply"),h=(0,r.useCallback)(async()=>{o(!0),c(null);try{const e=await Ng("".concat(Eg(),"/api/identity-factors/").concat(n,"?sort=").concat(u,"&limit=100"));if(!e.ok)throw new Error("Server returned ".concat(e.status));const t=await e.json();s(t)}catch(h$){c(h$ instanceof Error?h$.message:String(h$))}finally{o(!1)}},[n,u]);(0,r.useEffect)(()=>{h()},[h]);const p=(null===i||void 0===i?void 0:i.identitySymbol)||n,f="".concat(p,"factor \u2014 how ").concat(p," coded is each token");return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(jn,{children:(0,Lg.jsxs)("title",{children:[f," | deepnets.ai"]})}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-5xl mx-auto px-4 py-6",children:[(0,Lg.jsxs)("div",{className:"mb-6 flex items-center gap-4",children:[(null===i||void 0===i?void 0:i.identityImage)&&(0,Lg.jsx)("img",{src:i.identityImage,alt:"$".concat(p),className:"w-20 h-20 rounded-full bg-gray-700 border border-gray-700 object-cover flex-shrink-0",onError:e=>{e.target.style.display="none"}}),(0,Lg.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Lg.jsxs)("h1",{className:"text-3xl font-bold mb-1",children:[(0,Lg.jsxs)("span",{className:"text-crypto-accent",children:["$",p]}),"factor"]}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm",children:["How ",p," coded is each watchlist token \u2014 ranked by the percentage of each token's supply held by wallets that also hold $",p,"."]}),i&&(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs mt-1",children:["Based on a snapshot of ",(null===(t=i.identityTotalHolders)||void 0===t?void 0:t.toLocaleString())||"?"," $",p," holders",i.identitySnapshotAt&&(0,Lg.jsxs)(Lg.Fragment,{children:[" taken ",new Date(i.identitySnapshotAt).toLocaleString()]}),". Only showing tokens with \u2265 ",i.filters.minHolderCount," overlapping holders and \u2265 ",i.filters.minAnalyzed," analyzed target holders."]})]})]}),(0,Lg.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,Lg.jsx)("span",{className:"text-xs text-gray-500",children:"Sort by:"}),(0,Lg.jsx)("button",{onClick:()=>d("supply"),className:"px-3 py-1.5 text-xs rounded-lg border transition-colors ".concat("supply"===u?"bg-crypto-accent/20 border-crypto-accent text-crypto-accent":"bg-crypto-gray border-gray-700 text-gray-400 hover:text-white"),children:"Supply %"}),(0,Lg.jsx)("button",{onClick:()=>d("count"),className:"px-3 py-1.5 text-xs rounded-lg border transition-colors ".concat("count"===u?"bg-crypto-accent/20 border-crypto-accent text-crypto-accent":"bg-crypto-gray border-gray-700 text-gray-400 hover:text-white"),children:"Holder Count"})]}),a&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm py-8 text-center",children:"Loading\u2026"}),l&&!a&&(0,Lg.jsxs)("div",{className:"text-red-400 text-sm py-8 text-center",children:["Failed to load: ",l]}),!a&&!l&&i&&i.items.length>0&&(0,Lg.jsx)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl overflow-hidden",children:(0,Lg.jsxs)("table",{className:"w-full",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left p-2 sm:p-3 text-xs font-medium text-gray-500 w-8 sm:w-12",children:"#"}),(0,Lg.jsx)("th",{className:"text-left p-2 sm:p-3 text-xs font-medium text-gray-500",children:"Token"}),(0,Lg.jsxs)("th",{className:"text-right p-2 sm:p-3 text-xs font-medium text-gray-500 whitespace-nowrap",children:["$",p,"s hold"]}),(0,Lg.jsxs)("th",{className:"text-right p-2 sm:p-3 text-xs font-medium text-gray-500 whitespace-nowrap hidden sm:table-cell",children:["Overlapping",(0,Lg.jsx)("br",{}),"holders"]}),(0,Lg.jsxs)("th",{className:"text-right p-2 sm:p-3 text-xs font-medium text-gray-500 whitespace-nowrap hidden md:table-cell",children:["% of $",p," holders",(0,Lg.jsx)("br",{}),"in this token"]})]})}),(0,Lg.jsx)("tbody",{className:"divide-y divide-gray-700/50",children:i.items.map((e,t)=>{var n,r;const i=null===(n=e.uriMetadata)||void 0===n?void 0:n.image;return(0,Lg.jsxs)("tr",{className:"hover:bg-crypto-dark/50 transition-colors",children:[(0,Lg.jsx)("td",{className:"p-2 sm:p-3 text-sm text-gray-500 font-mono",children:t+1}),(0,Lg.jsx)("td",{className:"p-2 sm:p-3",children:(0,Lg.jsxs)(ft,{to:"/token/".concat(e.mint),className:"flex items-center gap-2 sm:gap-3 group",children:[i?(0,Lg.jsx)("img",{src:i,alt:"",className:"w-8 h-8 rounded-full bg-gray-700 flex-shrink-0",onError:e=>{e.target.style.display="none"}}):(0,Lg.jsx)("div",{className:"w-8 h-8 rounded-full bg-gray-700 flex items-center justify-center text-xs text-gray-400 flex-shrink-0",children:(null===(r=e.symbol)||void 0===r?void 0:r.charAt(0))||"?"}),(0,Lg.jsxs)("div",{className:"min-w-0",children:[(0,Lg.jsx)("div",{className:"text-sm font-medium text-white group-hover:text-crypto-accent transition-colors truncate max-w-[100px] sm:max-w-[200px]",children:e.name||"Unknown"}),(0,Lg.jsxs)("div",{className:"text-xs text-gray-500 truncate max-w-[100px] sm:max-w-[200px]",children:["$",e.symbol]})]})]})}),(0,Lg.jsxs)("td",{className:"p-2 sm:p-3 text-right whitespace-nowrap",children:[(0,Lg.jsxs)("div",{className:"text-lg font-semibold text-crypto-accent",children:[e.holderSupplyPct.toFixed(2),"%"]}),(0,Lg.jsxs)("div",{className:"text-xs text-gray-500",children:["of ",e.targetHoldersAnalyzed," analyzed"]})]}),(0,Lg.jsx)("td",{className:"p-2 sm:p-3 text-right text-sm text-gray-300 font-mono whitespace-nowrap hidden sm:table-cell",children:e.holderCount}),(0,Lg.jsxs)("td",{className:"p-2 sm:p-3 text-right text-sm text-gray-400 font-mono whitespace-nowrap hidden md:table-cell",children:[e.holderSharePct.toFixed(2),"%"]})]},e.mint)})})]})}),!a&&!l&&i&&0===i.items.length&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm py-8 text-center",children:"No tokens match the current filters."})]}),(0,Lg.jsx)(_y,{})]})};function sk(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=sk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ak(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sk(e))&&(r&&(r+=" "),r+=t);return r}var ok=n(7820),lk=n.n(ok),ck=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i]},uk=n(7770),dk=n.n(uk),hk=e=>0===e?0:e>0?1:-1,pk=e=>"number"==typeof e&&e!=+e,fk=e=>"string"===typeof e&&e.indexOf("%")===e.length-1,mk=e=>("number"===typeof e||e instanceof Number)&&!pk(e),gk=e=>mk(e)||"string"===typeof e,yk=0,xk=e=>{var t=++yk;return"".concat(e||"").concat(t)},vk=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!mk(e)&&"string"!==typeof e)return r;if(fk(e)){if(null==t)return r;var s=e.indexOf("%");n=t*parseFloat(e.slice(0,s))/100}
2else n=+e;return pk(n)&&(n=r),i&&null!=t&&n>t&&(n=t),n},bk=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1};function wk(e,t,n){return mk(e)&&mk(t)?e+n*(t-e):t}var _k=e=>null===e||"undefined"===typeof e,jk=e=>_k(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),kk=(e,t,n)=>{var{width:r="100%",height:i="100%",aspect:s,maxHeight:a}=n,o=fk(r)?e:Number(r),l=fk(i)?t:Number(i);return s&&s>0&&(o?l=o/s:l&&(o=l*s),a&&l>a&&(l=a)),{calculatedWidth:o,calculatedHeight:l}},Nk={width:0,height:0,overflow:"visible"},Sk={width:0,overflowX:"visible"},Ek={height:0,overflowY:"visible"},Ak={},Ck=e=>{var{width:t,height:n}=e,r=fk(t),i=fk(n);return r&&i?Nk:r?Sk:i?Ek:Ak};function Mk(e){return Number.isFinite(e)}function Tk(e){return"number"===typeof e&&e>0&&Number.isFinite(e)}function Pk(){return Pk=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},Pk.apply(null,arguments)}function Ok(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 Ik(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ok(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ok(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lk(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rk=(0,r.createContext)({width:-1,height:-1});function Dk(e){var{children:t,width:n,height:i}=e,s=(0,r.useMemo)(()=>({width:n,height:i}),[n,i]);return n<=0||i<=0?null:r.createElement(Rk.Provider,{value:s},t)}var Bk=()=>(0,r.useContext)(Rk),Fk=(0,r.forwardRef)((e,t)=>{var{aspect:n,initialDimension:i={width:-1,height:-1},width:s,height:a,minWidth:o=0,minHeight:l,maxHeight:c,children:u,debounce:d=0,id:h,className:p,onResize:f,style:m={}}=e,g=(0,r.useRef)(null),y=(0,r.useRef)();y.current=f,(0,r.useImperativeHandle)(t,()=>g.current);var[x,v]=(0,r.useState)({containerWidth:i.width,containerHeight:i.height}),b=(0,r.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,r.useEffect)(()=>{var e=e=>{var t,{width:n,height:r}=e[0].contentRect;b(n,r),null===(t=y.current)||void 0===t||t.call(y,n,r)};d>0&&(e=lk()(e,d,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=g.current.getBoundingClientRect();return b(n,r),t.observe(g.current),()=>{t.disconnect()}},[b,d]);var{containerWidth:w,containerHeight:_}=x;ck(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:j,calculatedHeight:k}=kk(w,_,{width:s,height:a,aspect:n,maxHeight:c});return ck(j>0||k>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",j,k,s,a,o,l,n),r.createElement("div",{id:h?"".concat(h):void 0,className:ak("recharts-responsive-container",p),style:Ik(Ik({},m),{},{width:s,height:a,minWidth:o,minHeight:l,maxHeight:c}),ref:g},r.createElement("div",{style:Ck({width:s,height:a})},r.createElement(Dk,{width:j,height:k},u)))}),Uk=(0,r.forwardRef)((e,t)=>{var n=Bk();if(Tk(n.width)&&Tk(n.height))return e.children;var{width:i,height:s}=function(e){var{width:t,height:n,aspect:r}=e,i=t,s=n;return void 0===i&&void 0===s?(i="100%",s="100%"):void 0===i?i=r&&r>0?void 0:"100%":void 0===s&&(s=r&&r>0?void 0:"100%"),{width:i,height:s}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=kk(void 0,void 0,{width:i,height:s,aspect:e.aspect,maxHeight:e.maxHeight});return mk(a)&&mk(o)?r.createElement(Dk,{width:a,height:o},e.children):r.createElement(Fk,Pk({},e,{width:i,height:s,ref:t}))}),zk=Symbol.for("immer-nothing"),qk=Symbol.for("immer-draftable"),Wk=Symbol.for("immer-state");function Hk(e){throw new Error("[Immer] minified error nr: ".concat(e,". Full error at: https://bit.ly/3cXEKWf"))}var Kk=Object.getPrototypeOf;function Vk(e){return!!e&&!!e[Wk]}function $k(e){var t;return!!e&&(Jk(e)||Array.isArray(e)||!!e[qk]||!(null===(t=e.constructor)||void 0===t||!t[qk])||tN(e)||nN(e))}var Yk=Object.prototype.constructor.toString(),Gk=new WeakMap;function Jk(e){if(!e||"object"!==typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;
2if("function"!==typeof n)return!1;let r=Gk.get(n);return void 0===r&&(r=Function.toString.call(n),Gk.set(n,r)),r===Yk}function Zk(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(0===Qk(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function Qk(e){const t=e[Wk];return t?t.type_:Array.isArray(e)?1:tN(e)?2:nN(e)?3:0}function Xk(e,t){return 2===Qk(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function eN(e,t,n){const r=Qk(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function tN(e){return e instanceof Map}function nN(e){return e instanceof Set}function rN(e){return e.copy_||e.base_}function iN(e,t){if(tN(e))return new Map(e);if(nN(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Jk(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Wk];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Kk(e),t)}{const t=Kk(e);if(null!==t&&n)return(0,o.A)({},e);const r=Object.create(t);return Object.assign(r,e)}}function sN(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return oN(e)||Vk(e)||!$k(e)||(Qk(e)>1&&Object.defineProperties(e,{set:aN,add:aN,clear:aN,delete:aN}),Object.freeze(e),t&&Object.values(e).forEach(e=>sN(e,!0))),e}var aN={value:function(){Hk(2)}};function oN(e){return null===e||"object"!==typeof e||Object.isFrozen(e)}var lN,cN={};function uN(e){const t=cN[e];return t||Hk(0),t}function dN(){return lN}function hN(e,t){t&&(uN("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pN(e){fN(e),e.drafts_.forEach(gN),e.drafts_=null}function fN(e){e===lN&&(lN=e.parent_)}function mN(e){return lN={drafts_:[],parent_:lN,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function gN(e){const t=e[Wk];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function yN(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Wk].modified_&&(pN(t),Hk(4)),$k(e)&&(e=xN(t,e),t.parent_||bN(t,e)),t.patches_&&uN("Patches").generateReplacementPatches_(n[Wk].base_,e,t.patches_,t.inversePatches_)):e=xN(t,n,[]),pN(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zk?e:void 0}function xN(e,t,n){if(oN(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Wk];if(!i)return Zk(t,(r,s)=>vN(e,i,t,r,s,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return bN(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let s=t,a=!1;3===i.type_&&(s=new Set(t),t.clear(),a=!0),Zk(s,(r,s)=>vN(e,i,t,r,s,n,a),r),bN(e,t,!1),n&&e.patches_&&uN("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function vN(e,t,n,r,i,s,a){if(null==i)return;if("object"!==typeof i&&!a)return;const o=oN(i);if(!o||a){if(Vk(i)){const a=xN(e,i,s&&t&&3!==t.type_&&!Xk(t.assigned_,r)?s.concat(r):void 0);if(eN(n,r,a),!Vk(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if($k(i)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===i&&o)return;xN(e,i),t&&t.scope_.parent_||"symbol"===typeof r||!(tN(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||bN(e,i)}}}function bN(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&sN(t,n)}var wN={get(e,t){if(t===Wk)return e;const n=rN(e);if(!Xk(n,t))return function(e,t,n){var r;const i=kN(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!$k(r)?r:r===jN(e.base_,t)?(SN(e),e.copy_[t]=EN(r,e)):r},has:(e,t)=>t in rN(e),ownKeys:e=>Reflect.ownKeys(rN(e)),set(e,t,n){const r=kN(rN(e),t);if(null!==r&&void 0!==r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=jN(rN(e),t),i=null===r||void 0===r?void 0:r[Wk];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}(n,r)&&(void 0!==n||Xk(e.base_,t)))return!0;SN(e),NN(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==jN(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,SN(e),NN(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=rN(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Hk(11)},getPrototypeOf:e=>Kk(e.base_),setPrototypeOf(){Hk(12)}},_N={};function jN(e,t){const n=e[Wk];return(n?rN(n):e)[t]}function kN(e,t){if(!(t in e))return;let n=Kk(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Kk(n)}}function NN(e){e.modified_||(e.modified_=!0,e.parent_&&NN(e.parent_))}function SN(e){e.copy_||(e.copy_=iN(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Zk(wN,(e,t)=>{_N[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),_N.deleteProperty=function(e,t){return _N.set.call(this,e,t,void 0)},_N.set=function(e,t,n){return wN.set.call(this,e[0],t,n,e[0])};function EN(e,t){const n=tN(e)?uN("MapSet").proxyMap_(e,t):nN(e)?uN("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:dN(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=wN;n&&(i=[r],s=_N);const{revoke:a,proxy:o}=Proxy.revocable(i,s);return r.draft_=o,r.revoke_=a,o}(e,t);return(t?t.scope_:dN()).drafts_.push(n),n}function AN(e){return Vk(e)||Hk(10),CN(e)}function CN(e){if(!$k(e)||oN(e))return e;const t=e[Wk];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=iN(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=iN(e,!0);return Zk(n,(e,t)=>{eN(n,e,CN(t))},r),t&&(t.finalized_=!1),n}var MN=new class{constructor(e){var t=this;this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"===typeof e&&"function"!==typeof t){const n=t;t=e;const r=this;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n;for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return r.produce(e,e=>t.call(this,e,...s))}}let r;if("function"!==typeof t&&Hk(6),void 0!==n&&"function"!==typeof n&&Hk(7),$k(e)){const i=mN(this),s=EN(e,void 0);let a=!0;try{r=t(s),a=!1}finally{a?pN(i):fN(i)}return hN(i,n),yN(r,i)}if(!e||"object"!==typeof e){if(r=t(e),void 0===r&&(r=e),r===zk&&(r=void 0),this.autoFreeze_&&sN(r,!0),n){const t=[],i=[];uN("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}Hk(1)},this.produceWithPatches=(e,n)=>{if("function"===typeof e)return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.produceWithPatches(n,t=>e(t,...i))};let r,i;const s=this.produce(e,n,(e,t)=>{r=e,i=t});return[s,r,i]},"boolean"===typeof(null===e||void 0===e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"===typeof(null===e||void 0===e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"===typeof(null===e||void 0===e?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){$k(e)||Hk(8),Vk(e)&&(e=AN(e));const t=mN(this),n=EN(e,void 0);return n[Wk].isManual_=!0,fN(t),n}finishDraft(e,t){const n=e&&e[Wk];n&&n.isManual_||Hk(9);const{scope_:r}=n;return hN(r,t),yN(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>
2-1&&(t=t.slice(n+1));const r=uN("Patches").applyPatches_;return Vk(e)?r(e,t):this.produce(e,e=>r(e,t))}},TN=MN.produce,PN=MN.setUseStrictIteration.bind(MN);function ON(e){return"Minified Redux error #".concat(e,"; visit https://redux.js.org/Errors?code=").concat(e," for the full message or use the non-minified dev environment for full errors. ")}var IN=(()=>"function"===typeof Symbol&&Symbol.observable||"@@observable")(),LN=()=>Math.random().toString(36).substring(7).split("").join("."),RN={INIT:"@@redux/INIT".concat(LN()),REPLACE:"@@redux/REPLACE".concat(LN()),PROBE_UNKNOWN_ACTION:()=>"@@redux/PROBE_UNKNOWN_ACTION".concat(LN())};function DN(e){if("object"!==typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function BN(e,t,n){if("function"!==typeof e)throw new Error(ON(2));if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(ON(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(ON(1));return n(BN)(e,t)}let r=e,i=t,s=new Map,a=s,o=0,l=!1;
2function c(){a===s&&(a=new Map,s.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error(ON(3));return i}function d(e){if("function"!==typeof e)throw new Error(ON(4));if(l)throw new Error(ON(5));let t=!0;c();const n=o++;return a.set(n,e),function(){if(t){if(l)throw new Error(ON(6));t=!1,c(),a.delete(n),s=null}}}function h(e){if(!DN(e))throw new Error(ON(7));if("undefined"===typeof e.type)throw new Error(ON(8));if("string"!==typeof e.type)throw new Error(ON(17));if(l)throw new Error(ON(9));try{l=!0,i=r(i,e)}finally{l=!1}return(s=a).forEach(e=>{e()}),e}h({type:RN.INIT});return{dispatch:h,subscribe:d,getState:u,replaceReducer:function(e){if("function"!==typeof e)throw new Error(ON(10));r=e,h({type:RN.REPLACE})},[IN]:function(){const e=d;return{subscribe(t){if("object"!==typeof t||null===t)throw new Error(ON(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[IN](){return this}}}}}function FN(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const r=t[s];0,"function"===typeof e[r]&&(n[r]=e[r])}const r=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if("undefined"===typeof n(void 0,{type:RN.INIT}))throw new Error(ON(12));if("undefined"===typeof n(void 0,{type:RN.PROBE_UNKNOWN_ACTION()}))throw new Error(ON(13))})}(n)}catch(d$){i=d$}return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(i)throw i;let s=!1;const a={};for(let i=0;i<r.length;i++){const o=r[i],l=n[o],c=e[o],u=l(c,t);if("undefined"===typeof u){t&&t.type;throw new Error(ON(14))}a[o]=u,s=s||u!==c}return s=s||r.length!==Object.keys(e).length,s?a:e}}function UN(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?e=>e:1===t.length?t[0]:t.reduce((e,t)=>function(){return e(t(...arguments))})}function zN(e){return DN(e)&&"type"in e&&"string"===typeof e.type}function qN(e){return t=>{let{dispatch:n,getState:r}=t;return t=>i=>"function"===typeof i?i(n,r,e):t(i)}}var WN=qN(),HN=qN;n(2285);const KN=["reducerPath"];var VN="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?UN:UN.apply(null,arguments)};"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function $N(e,t){function n(){if(t){let n=t(...arguments);if(!n)throw new Error(qS(0));return(0,o.A)((0,o.A)({type:e,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:e,payload:arguments.length<=0?void 0:arguments[0]}}return n.toString=()=>"".concat(e),n.type=e,n.match=t=>zN(t)&&t.type===e,n}var YN=class e extends Array{constructor(){super(...arguments),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return super.concat.apply(this,t)}prepend(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 1===n.length&&Array.isArray(n[0])?new e(...n[0].concat(this)):new e(...n.concat(this))}};function GN(e){return $k(e)?TN(e,()=>{}):e}function JN(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var ZN="RTK_autoBatch",QN=()=>e=>({payload:e,meta:{[ZN]:!0}}),XN=e=>t=>{setTimeout(t,e)},eS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"raf"};return t=>function(){const n=t(...arguments);let r=!0,i=!1,s=!1;const a=new Set,o="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:XN(10):"callback"===e.type?e.queueNotification:XN(e.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){const t=n.subscribe(()=>r&&e());return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){try{var t;return r=!(null!==e&&void 0!==e&&null!==(t=e.meta)&&void 0!==t&&t[ZN]),i=!r,i&&(s||(s=!0,o(l))),n.dispatch(e)}finally{r=!0}}})}};function tS(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=null!==e&&void 0!==e?e:{};let s=new YN;return t&&(function(e){return"boolean"===typeof e}(t)?s.push(WN):s.push(HN(t.extraArgument))),s},{reducer:n,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:a,enhancers:l}=e||{};let c,u;if("function"===typeof n)c=n;else{if(!DN(n))throw new Error(qS(1));c=FN(n)}u="function"===typeof r?r(t):t();let d=UN;i&&(d=VN((0,o.A)({trace:!1},"object"===typeof i&&i)));const h=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>(n,r)=>{const i=e(n,r);let s=()=>{throw new Error(ON(15))};const a={getState:i.getState,dispatch:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s(e,...n)}},l=t.map(e=>e(a));return s=UN(...l)(i.dispatch),(0,o.A)((0,o.A)({},i),{},{dispatch:s})}}(...u),p=(e=>function(t){const{autoBatch:n=!0}=null!==t&&void 0!==t?t:{};let r=new YN(e);return n&&r.push(eS("object"===typeof n?n:void 0)),r})(h);return BN(c,a,d(..."function"===typeof l?l(p):p()))}function nS(e){const t={},n=[];let r;const i={addCase(e,n){const r="string"===typeof e?e:e.type;if(!r)throw new Error(qS(28));if(r in t)throw new Error(qS(29));return t[r]=n,i},addAsyncThunk:(e,r)=>
2(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(r=e,i)};return e(i),[t,n,r]}PN(!1);var rS=function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e};var iS=Symbol.for("rtk-slice-createasyncthunk");function sS(e,t){return"".concat(e,"/").concat(t)}function aS(){var e;let{creators:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=null===t||void 0===t||null===(e=t.asyncThunk)||void 0===e?void 0:e[iS];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(qS(11));const i=("function"===typeof e.reducers?e.reducers(function(){function e(e,t){return(0,o.A)({_reducerDefinitionType:"asyncThunk",payloadCreator:e},t)}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name](){return e(...arguments)}}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(e,t){const n="string"===typeof e?e:e.type;if(!n)throw new Error(qS(12));if(n in l.sliceCaseReducersByType)throw new Error(qS(13));return l.sliceCaseReducersByType[n]=t,c},addMatcher:(e,t)=>(l.sliceMatchers.push({matcher:e,reducer:t}),c),exposeAction:(e,t)=>(l.actionCreators[e]=t,c),exposeCaseReducer:(e,t)=>(l.sliceCaseReducersByName[e]=t,c)};function u(){const[t={},n=[],r]="function"===typeof e.extraReducers?nS(e.extraReducers):[e.extraReducers],i=(0,o.A)((0,o.A)({},t),l.sliceCaseReducersByType);return function(e,t){let n,[r,i,s]=nS(t);if(function(e){return"function"===typeof e}(e))n=()=>GN(e());else{const t=GN(e);n=()=>t}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n(),t=arguments.length>1?arguments[1]:void 0,a=[r[t.type],...i.filter(e=>{let{matcher:n}=e;return n(t)}).map(e=>{let{reducer:t}=e;return t})];return 0===a.filter(e=>!!e).length&&(a=[s]),a.reduce((e,n)=>{if(n){if(Vk(e)){const r=n(e,t);return void 0===r?e:r}if($k(e))return TN(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return a.getInitialState=n,a}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of l.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}s.forEach(r=>{const s=i[r],a={reducerName:r,type:sS(t,r),createNotation:"function"===typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(s)?function(e,t,n){let r,i,{type:s,reducerName:a,createNotation:o}=e;if("reducer"in t){if(o&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(t))throw new Error(qS(17));r=t.reducer,i=t.prepare}else r=t;n.addCase(s,r).exposeCaseReducer(a,r).exposeAction(a,i?$N(s,i):$N(s))}(a,s,c):function(e,t,n,r){let{type:i,reducerName:s}=e;if(!r)throw new Error(qS(18));const{payloadCreator:a,fulfilled:o,pending:l,rejected:c,settled:u,options:d}=t,h=r(i,a,d);n.exposeAction(s,h),o&&n.addCase(h.fulfilled,o);l&&n.addCase(h.pending,l);c&&n.addCase(h.rejected,c);u&&n.addMatcher(h.settled,u);n.exposeCaseReducer(s,{fulfilled:o||cS,pending:l||cS,rejected:c||cS,settled:u||cS})}(a,s,c,n)});const d=e=>e,h=new Map,p=new WeakMap;let f;function m(e,t){return f||(f=u()),f(e,t)}function g(){return f||(f=u()),f.getInitialState()}function y(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){let i=e[t];return"undefined"===typeof i&&n&&(i=JN(p,r,g)),i}function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;const r=JN(h,n,()=>new WeakMap);return JN(r,t,()=>{const r={};for(const[s,a]of Object.entries(null!==(i=e.selectors)&&void 0!==i?i:{})){var i;r[s]=oS(a,t,()=>JN(p,t,g),n)}return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const x=(0,o.A)((0,o.A)({name:t,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g},y(r)),{},{injectInto(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reducerPath:n}=t,i=(0,a.A)(t,KN);const s=null!==n&&void 0!==n?n:r;return e.inject({reducerPath:s,reducer:m},i),(0,o.A)((0,o.A)({},x),y(s,!0))}});return x}}function oS(e,t,n,r){function i(i){let s=t(i);"undefined"===typeof s&&r&&(s=n());for(var a=arguments.length,o=new Array(a>1?a-1:0),l=1;l<a;l++)o[l-1]=arguments[l];return e(s,...o)}return i.unwrapped=e,i}var lS=aS();function cS(){}var uS="listener",dS="completed",hS="cancelled",pS="task-".concat(hS),fS="task-".concat(dS),mS="".concat(uS,"-").concat(hS),gS="".concat(uS,"-").concat(dS),yS=class{constructor(e){(0,jt.A)(this,"name","TaskAbortError"),(0,jt.A)(this,"message",void 0),this.code=e,this.message="".concat("task"," ").concat(hS," (reason: ").concat(e,")")}},xS=(e,t)=>{if("function"!==typeof e)throw new TypeError(qS(32))},vS=()=>{},bS=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vS;return e.catch(t),e},wS=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),_S=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},jS=e=>{if(e.aborted){const{reason:t}=e;throw new yS(t)}};function kS(e,t){let n=vS;return new Promise((r,i)=>{const s=()=>i(new yS(e.reason));e.aborted?s():(n=wS(e,s),t.finally(()=>n()).then(r,i))}).finally(()=>{n=vS})}var NS=e=>t=>bS(kS(e,t).then(t=>(jS(e),t))),SS=e=>{const t=NS(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:ES}=Object,AS={},CS="listenerMiddleware",MS=(e,t)=>(n,r)=>{xS(n);const i=new AbortController;var s;s=i,wS(e,()=>_S(s,e.reason));const a=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof yS?"cancelled":"rejected",error:n}}finally{null===t||void 0===t||t()}})(async()=>{jS(e),jS(i.signal);const t=await n({pause:NS(i.signal),delay:SS(i.signal),signal:i.signal});return jS(i.signal),t},()=>_S(i,fS));return null!==r&&void 0!==r&&r.autoJoin&&t.push(a.catch(vS)),{result:NS(e)(a),cancel(){_S(i,pS)}}},TS=(e,t)=>(n,r)=>bS((async(n,r)=>{jS(t);let i=()=>{};const s=[new Promise((t,r)=>{let s=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{s(),r()}})];null!=r&&s.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await kS(t,Promise.race(s));return jS(t),e}finally{i()}})(n,r)),PS=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:s}=e;if(t)i=$N(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(qS(21));return xS(s),{predicate:i,type:t,effect:s}},OS=ES(e=>{const{type:t,predicate:n,effect:r}=PS(e);return{id:rS(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(qS(22))}}},{withTypes:()=>OS}),IS=(e,t)=>{const{type:n,effect:r,predicate:i}=PS(t);return Array.from(e.values()).find(e=>("string"===typeof n?e.type===n:e.predicate===i)&&e.effect===r)},LS=e=>
2{e.pending.forEach(e=>{_S(e,mS)})},RS=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},DS=ES($N("".concat(CS,"/add")),{withTypes:()=>DS}),BS=$N("".concat(CS,"/removeAll")),FS=ES($N("".concat(CS,"/remove")),{withTypes:()=>FS}),US=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.error("".concat(CS,"/error"),...t)},zS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map,n=new Map,{extra:r,onError:i=US}=e;xS(i);const s=e=>{var n;return(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),null!==t&&void 0!==t&&t.cancelActive&&LS(e)}))(null!==(n=IS(t,e))&&void 0!==n?n:OS(e))};ES(s,{withTypes:()=>s});const a=e=>{const n=IS(t,e);return n&&(n.unsubscribe(),e.cancelActive&&LS(n)),!!n};ES(a,{withTypes:()=>a});const o=async(e,a,o,l)=>{const c=new AbortController,u=TS(s,c.signal),d=[];try{e.pending.add(c),(e=>{var t;const r=null!==(t=n.get(e))&&void 0!==t?t:0;n.set(e,r+1)})(e),await Promise.resolve(e.effect(a,ES({},o,{getOriginalState:l,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:SS(c.signal),pause:NS(c.signal),extra:r,signal:c.signal,fork:MS(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==c&&(_S(e,mS),n.delete(e))})},cancel:()=>{_S(c,mS),e.pending.delete(c)},throwIfCancelled:()=>{jS(c.signal)}})))}catch(h){h instanceof yS||RS(i,h,{raisedBy:"effect"})}finally{await Promise.all(d),_S(c,gS),(e=>{var t;const r=null!==(t=n.get(e))&&void 0!==t?t:1;1===r?n.delete(e):n.set(e,r-1)})(e),e.pending.delete(c)}},l=((e,t)=>()=>{for(const e of t.keys())LS(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!zN(r))return n(r);if(DS.match(r))return s(r.payload);if(BS.match(r))return void l();if(FS.match(r))return a(r.payload);let c=e.getState();const u=()=>{if(c===AS)throw new Error(qS(23));return c};let d;try{if(d=n(r),t.size>0){const n=e.getState(),s=Array.from(t.values());for(const t of s){let s=!1;try{s=t.predicate(r,n,c)}catch(h){s=!1,RS(i,h,{raisedBy:"predicate"})}s&&o(t,r,e,u)}}}finally{c=AS}return d},startListening:s,stopListening:a,clearListeners:l}};Symbol.for("rtk-state-proxy-original");function qS(e){return"Minified Redux Toolkit error #".concat(e,"; visit https://redux-toolkit.js.org/Errors?code=").concat(e," for the full message or use the non-minified dev environment for full errors. ")}function WS(e,t){if(t){var n=Number.parseInt(t,10);if(!pk(n))return null===e||void 0===e?void 0:e[n]}}var HS=lS({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),KS=HS.reducer,{createEventEmitter:VS}=HS.actions;n(7237);function $S(e){e()}var YS={notify(){},get:()=>[]};function GS(e,t){let n,r=YS,i=0,s=!1;function a(){c.onStateChange&&c.onStateChange()}function o(){i++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){$S(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function l(){i--,n&&0===i&&(n(),n=void 0,r.clear(),r=YS)}const c={addNestedSub:function(e){o();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return s},trySubscribe:function(){s||(s=!0,o())},tryUnsubscribe:function(){s&&(s=!1,l())},getListeners:()=>r};return c}var JS=(()=>!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement))(),ZS=(()=>"undefined"!==typeof navigator&&"ReactNative"===navigator.product)(),QS=(()=>JS||ZS?r.useLayoutEffect:r.useEffect)();Object.defineProperty,Object.getOwnPropertyNames,Object.getOwnPropertySymbols,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.prototype;var XS=Symbol.for("react-redux-context"),eE="undefined"!==typeof globalThis?globalThis:{};function tE(){var e;if(!r.createContext)return{};const t=null!==(e=eE[XS])&&void 0!==e?e:eE[XS]=new Map;let n=t.get(r.createContext);return n||(n=r.createContext(null),t.set(r.createContext,n)),n}var nE=tE();var rE=function(e){const{children:t,context:n,serverState:i,store:s}=e,a=r.useMemo(()=>{const e=GS(s);return{store:s,subscription:e,getServerState:i?()=>i:void 0}},[s,i]),o=r.useMemo(()=>s.getState(),[s]);QS(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==s.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);const l=n||nE;return r.createElement(l.Provider,{value:a},t)};var iE=Symbol.for("immer-nothing"),sE=Symbol.for("immer-draftable"),aE=Symbol.for("immer-state");function oE(e){throw new Error("[Immer] minified error nr: ".concat(e,". Full error at: https://bit.ly/3cXEKWf"))}var lE=Object.getPrototypeOf;function cE(e){return!!e&&!!e[aE]}function uE(e){var t;return!!e&&(pE(e)||Array.isArray(e)||!!e[sE]||!(null===(t=e.constructor)||void 0===t||!t[sE])||xE(e)||vE(e))}var dE=Object.prototype.constructor.toString(),hE=new WeakMap;function pE(e){if(!e||"object"!==typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;
vendor: 5,597 bytes, line 2
2if("function"!==typeof n)return!1;let r=hE.get(n);return void 0===r&&(r=Function.toString.call(n),hE.set(n,r)),r===dE}function fE(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(0===mE(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function mE(e){const t=e[aE];return t?t.type_:Array.isArray(e)?1:xE(e)?2:vE(e)?3:0}function gE(e,t){return 2===mE(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yE(e,t,n){const r=mE(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function xE(e){return e instanceof Map}function vE(e){return e instanceof Set}function bE(e){return e.copy_||e.base_}function wE(e,t){if(xE(e))return new Map(e);if(vE(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=pE(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[aE];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],s=t[i];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(lE(e),t)}{const t=lE(e);if(null!==t&&n)return(0,o.A)({},e);const r=Object.create(t);return Object.assign(r,e)}}function _E(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return kE(e)||cE(e)||!uE(e)||(mE(e)>1&&Object.defineProperties(e,{set:jE,add:jE,clear:jE,delete:jE}),Object.freeze(e),t&&Object.values(e).forEach(e=>_E(e,!0))),e}var jE={value:function(){oE(2)}};function kE(e){return null===e||"object"!==typeof e||Object.isFrozen(e)}var NE,SE={};function EE(e){const t=SE[e];return t||oE(0),t}function AE(){return NE}function CE(e,t){t&&(EE("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ME(e){TE(e),e.drafts_.forEach(OE),e.drafts_=null}function TE(e){e===NE&&(NE=e.parent_)}function PE(e){return NE={drafts_:[],parent_:NE,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function OE(e){const t=e[aE];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function IE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[aE].modified_&&(ME(t),oE(4)),uE(e)&&(e=LE(t,e),t.parent_||DE(t,e)),t.patches_&&EE("Patches").generateReplacementPatches_(n[aE].base_,e,t.patches_,t.inversePatches_)):e=LE(t,n,[]),ME(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iE?e:void 0}function LE(e,t,n){if(kE(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[aE];if(!i)return fE(t,(r,s)=>RE(e,i,t,r,s,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return DE(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let s=t,a=!1;3===i.type_&&(s=new Set(t),t.clear(),a=!0),fE(s,(r,s)=>RE(e,i,t,r,s,n,a),r),DE(e,t,!1),n&&e.patches_&&EE("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function RE(e,t,n,r,i,s,a){if(null==i)return;if("object"!==typeof i&&!a)return;const o=kE(i);if(!o||a){if(cE(i)){const a=LE(e,i,s&&t&&3!==t.type_&&!gE(t.assigned_,r)?s.concat(r):void 0);if(yE(n,r,a),!cE(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if(uE(i)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===i&&o)return;LE(e,i),t&&t.scope_.parent_||"symbol"===typeof r||!(xE(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||DE(e,i)}}}function DE(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_E(t,n)}var BE={get(e,t){if(t===aE)return e;const n=bE(e);if(!gE(n,t))return function(e,t,n){var r;const i=zE(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!uE(r)?r:r===UE(e.base_,t)?(WE(e),e.copy_[t]=HE(r,e)):r},has:(e,t)=>t in bE(e),ownKeys:e=>Reflect.ownKeys(bE(e)),set(e,t,n){const r=zE(bE(e),t);if(null!==r&&void 0!==r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=UE(bE(e),t),i=null===r||void 0===r?void 0:r[aE];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}(n,r)&&(void 0!==n||gE(e.base_,t)))return!0;WE(e),qE(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==UE(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,WE(e),qE(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=bE(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){oE(11)},getPrototypeOf:e=>lE(e.base_),setPrototypeOf(){oE(12)}},FE={};function UE(e,t){const n=e[aE];return(n?bE(n):e)[t]}function zE(e,t){if(!(t in e))return;let n=lE(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=lE(n)}}function qE(e){e.modified_||(e.modified_=!0,e.parent_&&qE(e.parent_))}function WE(e){e.copy_||(e.copy_=wE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}fE(BE,(e,t)=>{FE[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),FE.deleteProperty=function(e,t){return FE.set.call(this,e,t,void 0)},FE.set=function(e,t,n){return BE.set.call(this,e[0],t,n,e[0])};function HE(e,t){const n=xE(e)?EE("MapSet").proxyMap_(e,t):vE(e)?EE("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:AE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=BE;
2n&&(i=[r],s=FE);const{revoke:a,proxy:o}=Proxy.revocable(i,s);return r.draft_=o,r.revoke_=a,o}(e,t);return(t?t.scope_:AE()).drafts_.push(n),n}function KE(e){if(!uE(e)||kE(e))return e;const t=e[aE];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=wE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=wE(e,!0);return fE(n,(e,t)=>{yE(n,e,KE(t))},r),t&&(t.finalized_=!1),n}var VE=new class{constructor(e){var t=this;this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"===typeof e&&"function"!==typeof t){const n=t;t=e;const r=this;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n;for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return r.produce(e,e=>t.call(this,e,...s))}}let r;if("function"!==typeof t&&oE(6),void 0!==n&&"function"!==typeof n&&oE(7),uE(e)){const i=PE(this),s=HE(e,void 0);let a=!0;try{r=t(s),a=!1}finally{a?ME(i):TE(i)}return CE(i,n),IE(r,i)}if(!e||"object"!==typeof e){if(r=t(e),void 0===r&&(r=e),r===iE&&(r=void 0),this.autoFreeze_&&_E(r,!0),n){const t=[],i=[];EE("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}oE(1)},this.produceWithPatches=(e,n)=>{if("function"===typeof e)return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return t.produceWithPatches(n,t=>e(t,...i))};let r,i;const s=this.produce(e,n,(e,t)=>{r=e,i=t});return[s,r,i]},"boolean"===typeof(null===e||void 0===e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"===typeof(null===e||void 0===e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"===typeof(null===e||void 0===e?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){uE(e)||oE(8),cE(e)&&(e=function(e){cE(e)||oE(10);return KE(e)}(e));const t=PE(this),n=HE(e,void 0);return n[aE].isManual_=!0,TE(t),n}finishDraft(e,t){const n=e&&e[aE];n&&n.isManual_||oE(9);const{scope_:r}=n;return CE(r,t),IE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=EE("Patches").applyPatches_;return cE(e)?r(e,t):this.produce(e,e=>r(e,t))}};VE.produce;var $E={active:!1,index:null,dataKey:void 0,coordinate:void 0},YE=lS({name:"tooltip",initialState:{itemInteraction:{click:$E,hover:$E},axisInteraction:{click:$E,hover:$E},keyboardInteraction:$E,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:QN()},removeTooltipEntrySettings:{reducer(e,t){var n=AN(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:QN()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:GE,removeTooltipEntrySettings:JE,setTooltipSettingsState:ZE,setActiveMouseOverItemIndex:QE,mouseLeaveItem:XE,mouseLeaveChart:eA,setActiveClickItemIndex:tA,setMouseOverAxisIndex:nA,setMouseClickAxisIndex:rA,setSyncInteraction:iA,setKeyboardInteraction:sA}=YE.actions,aA=YE.reducer,oA=lS({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;null!=n&&(e.dataStartIndex=n),null!=r&&(e.dataEndIndex=r)}}}),{setChartData:lA,setDataStartEndIndexes:cA,setComputedData:uA}=oA.actions,dA=oA.reducer,hA=lS({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,s;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left
2=null!==(s=t.payload.left)&&void 0!==s?s:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:pA,setLayout:fA,setChartSize:mA,setScale:gA}=hA.actions,yA=hA.reducer;function xA(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"expected a function, instead received ".concat(typeof e);if("function"!==typeof e)throw new TypeError(t)}var vA=e=>Array.isArray(e)?e:[e];function bA(e){const t=Array.isArray(e[0])?e[0]:e;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"expected all items to be functions, instead received the following types: ";if(!e.every(e=>"function"===typeof e)){const n=e.map(e=>"function"===typeof e?"function ".concat(e.name||"unnamed","()"):typeof e).join(", ");throw new TypeError("".concat(t,"[").concat(n,"]"))}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}Symbol(),Object.getPrototypeOf({});var wA="undefined"!==typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function _A(){return{s:0,v:void 0,o:null,p:null}}function jA(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,s=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"===typeof n||"object"===typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=_A(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=_A(),e.set(n,t)):t=r}}const o=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),s++,r){var c,u,d;const e=null!==(c=null===(u=i)||void 0===u||null===(d=u.deref)||void 0===d?void 0:d.call(u))&&void 0!==c?c:i;null!=e&&r(e,l)&&(l=e,0!==s&&s--);i="object"===typeof l&&null!==l||"function"===typeof l?new wA(l):l}return o.s=1,o.v=l,l}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function kA(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 i="function"===typeof e?{memoize:e,memoizeOptions:n}:e,s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let r,s=0,a=0,l={},c=t.pop();"object"===typeof c&&(l=c,c=t.pop()),xA(c,"createSelector expects an output function after the inputs, but received: [".concat(typeof c,"]"));const u=(0,o.A)((0,o.A)({},i),l),{memoize:d,memoizeOptions:h=[],argsMemoize:p=jA,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,g=vA(h),y=vA(f),x=bA(t),v=d(function(){return s++,c.apply(null,arguments)},...g);const b=p(function(){a++;const e=function(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}(x,arguments);return r=v.apply(null,e),r},...y);return Object.assign(b,{resultFunc:c,memoizedResultFunc:v,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>r,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(s,{withTypes:()=>s}),s}var NA=kA(jA),SA=Object.assign(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NA;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"expected an object, instead received ".concat(typeof e);if("object"!==typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ".concat(typeof e));const n=Object.keys(e),r=t(n.map(t=>e[t]),function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((e,t,r)=>(e[n[r]]=t,e),{})});return r},{withTypes:()=>SA}),EA=n(8443),AA=(0,r.createContext)(null),CA=e=>e,MA=()=>{var e=(0,r.useContext)(AA);return e?e.store.dispatch:CA},TA=()=>{},PA=()=>TA,OA=(e,t)=>e===t;function IA(e){var t=(0,r.useContext)(AA);return(0,EA.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:PA,t?t.store.getState:TA,t?t.store.getState:TA,t?e:TA,OA)}var LA=n(3821),RA=n.n(LA),DA=e=>e.legend.settings;NA([e=>e.legend.payload,DA],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?RA()(r,n):r});function BA(e,t){if((i=e.length)>1)for(var n,r,i,s=1,a=e[t[0]],o=a.length;s<i;++s)for(r=a,a=e[t[s]],n=0;n<o;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}Array.prototype.slice;function FA(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function UA(e){return function(){return e}}function zA(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function qA(e,t){return e[t]}function WA(e){const t=[];return t.key=e,t}function HA(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 KA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?HA(Object(n),!0).forEach(function(t){VA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $A=Math.PI/180,YA=e=>180*e/Math.PI,GA=(e,t,n,r)=>({x:e+Math.cos(-$A*r)*n,y:t+Math.sin(-$A*r)*n}),JA=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},ZA=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:s}=t,a=((e,t)=>{var{x:n,y:r}=e,{x:i,y:s}=t;return Math.sqrt((n-i)**2+(r-s)**2)})({x:n,y:r},{x:i,y:s});if(a<=0)return{radius:a,angle:0};var o=(n-i)/a,l=Math.acos(o);return r>s&&(l=2*Math.PI-l),{radius:a,angle:YA(l),angleInRadian:l}},QA=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),s=Math.floor(r/360);return e+360*Math.min(i,s)},XA=(e,t)=>{var{x:n,y:r}=e,{radius:i,angle:s}=ZA({x:n,y:r},t),{innerRadius:a,outerRadius:o}=t;if(i<a||i>o)return null;if(0===i)return null;var l,{startAngle:c,endAngle:u}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),s=Math.min(r,i);return{startAngle:t-360*s,endAngle:n-360*s}})(t),d=s;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;l=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;l=d>=u&&d<=c}return l?KA(KA({},t),{},{radius:i,angle:QA(d,t)}):null};function eC(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function tC(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 nC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tC(Object(n),!0).forEach(function(t){rC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iC(e,t,n){return _k(e)||_k(t)?n:gk(t)?dk()(e,t,n):"function"===typeof t?t(e):n}var sC=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,aC=1e-4,oC={sign:e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,s=0,a=0;a<t;++a){var o=pk(e[a][n][1])?e[a][n][0]:e[a][n][1];o>=0?(e[a][n][0]=i,e[a][n][1]=i+o,i=e[a][n][1]):(e[a][n][0]=s,e[a][n][1]=s+o,s=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,s=0,a=e[0].length;s<a;++s){for(i=n=0;n<r;++n)i+=e[n][s][1]||0;if(i)for(n=0;n<r;++n)e[n][s][1]/=i}BA(e,t)}},none:BA,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],s=i.length;r<s;++r){for(var a=0,o=0;a<n;++a)o+=e[a][r][1]||0;i[r][1]+=i[r][0]=-o/2}BA(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,s=0,a=1;a<r;++a){for(var o=0,l=0,c=0;o<i;++o){for(var u=e[t[o]],d=u[a][1]||0,h=(d-(u[a-1][1]||0))/2,p=0;p<o;++p){var f=e[t[p]];h+=(f[a][1]||0)-(f[a-1][1]||0)}l+=d,c+=h*d}n[a-1][1]+=n[a-1][0]=s,l&&(s-=c/l)}n[a-1][1]+=n[a-1][0]=s,BA(e,t)}},positive:e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,s=0;s<t;++s){var a=pk(e[s][n][1])?e[s][n][0]:e[s][n][1];a>=0?(e[s][n][0]=i,e[s][n][1]=i+a,i=e[s][n][1]):(e[s][n][0]=0,e[s][n][1]=0)}}},lC=(e,t,n)=>{var r=oC[n],i=function(){var e=UA([]),t=zA,n=BA,r=qA;function i(i){var s,a,o=Array.from(e.apply(this,arguments),WA),l=o.length,c=-1;for(const e of i)for(s=0,++c;s<l;++s)(o[s][c]=[0,+r(e,o[s].key,c,i)]).data=e;for(s=0,a=FA(t(o));s<l;++s)o[a[s]].index=s;return n(o,a),o}return i.keys=function(t){return arguments.length?(e="function"===typeof t?t:UA(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"===typeof e?e:UA(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?zA:"function"===typeof e?e:UA(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?BA:e,i):n},i}().keys(t).value((e,t)=>+iC(e,t,0)).order(zA).offset(r);return i(e)};var cC=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,i)=>{var s=e[i],{stackedData:a}=s,o=a.reduce((e,r)=>{var i=(e=>{var t=e.flat(2).filter(mk);return[Math.min(...t),Math.max(...t)]})(eC(r,t,n));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},uC=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dC=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;function hC(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:s}=e;return nC(nC({},t),{},{dataKey:n,payload:r,value:i,name:s})}
vendor: 10,779 bytes, line 2
2function pC(e,t){return e?String(e):"string"===typeof t?t:void 0}var fC=e=>e.layout.width,mC=e=>e.layout.height,gC=e=>e.layout.scale,yC=e=>e.layout.margin,xC=NA(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),vC=NA(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),bC="data-recharts-item-index",wC="data-recharts-item-data-key";function _C(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 jC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_C(Object(n),!0).forEach(function(t){kC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var NC=NA([fC,mC,yC,e=>e.brush.height,function(e){return vC(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"===typeof t.width?t.width:60),0)},function(e){return vC(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"===typeof t.width?t.width:60),0)},function(e){return xC(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return xC(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},DA,e=>e.legend.size],(e,t,n,r,i,s,a,o,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+s},d=jC(jC({},{top:(n.top||0)+a,bottom:(n.bottom||0)+o}),u),h=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:s,verticalAlign:a,layout:o}=t;if(("vertical"===o||"horizontal"===o&&"middle"===a)&&"center"!==s&&mk(e[s]))return nC(nC({},e),{},{[s]:e[s]+(r||0)});if(("horizontal"===o||"vertical"===o&&"center"===s)&&"middle"!==a&&mk(e[a]))return nC(nC({},e),{},{[a]:e[a]+(i||0)})}return e})(d,l,c);var p=e-d.left-d.right,f=t-d.top-d.bottom;return jC(jC({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(f,0)})}),SC=NA(NC,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),EC=(NA(fC,mC,(e,t)=>({x:0,y:0,width:e,height:t})),(0,r.createContext)(null)),AC=()=>null!=(0,r.useContext)(EC),CC=e=>e.brush,MC=NA([CC,NC,yC],(e,t,n)=>({height:e.height,x:mk(e.x)?e.x:t.left,y:mk(e.y)?e.y:t.top+t.height+t.brushBottom-((null===n||void 0===n?void 0:n.bottom)||0),width:mk(e.width)?e.width:t.width})),TC=()=>{var e,t=AC(),n=IA(SC),r=IA(MC),i=null===(e=IA(CC))||void 0===e?void 0:e.padding;return t&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},PC={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},OC=e=>e.layout.layoutType,IC=()=>IA(OC),LC=e=>{var t=MA(),n=AC(),{width:i,height:s}=e,a=Bk(),o=i,l=s;return a&&(o=a.width>0?a.width:i,l=a.height>0?a.height:s),(0,r.useEffect)(()=>{!n&&Tk(o)&&Tk(l)&&t(mA({width:o,height:l}))},[t,n,o,l]),null},RC=n(9859),DC=n.n(RC);var BC=n(4402),FC=n(5186);function UC(){var e,t,n=(0,FC.A)().unknown(void 0),r=n.domain,i=n.range,s=0,a=1,o=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<s,h=d?a:s,p=d?s:a;e=(p-h)/Math.max(1,n-l+2*c),o&&(e=Math.floor(e)),h+=(p-h-e*(n-l))*u,t=e*(1-l),o&&(h=Math.round(h),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),s=new Array(i);++r<i;)s[r]=e+r*n;return s}(n).map(function(t){return h+e*t});return i(d?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([s,a]=e,s=+s,a=+a,d()):[s,a]},n.rangeRound=function(e){return[s,a]=e,s=+s,a=+a,o=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(o=!!e,d()):o},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return UC(r(),[s,a]).round(o).paddingInner(l).paddingOuter(c).align(u)},BC.C.apply(d(),arguments)}function zC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return zC(t())},e}function qC(){return zC(UC.apply(null,arguments).paddingInner(1))}const WC=Math.sqrt(50),HC=Math.sqrt(10),KC=Math.sqrt(2);function VC(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=WC?10:s>=HC?5:s>=KC?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?VC(e,t,2*n):[o,l,c]}function $C(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,s,a]=r?VC(t,e,n):VC(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function YC(e,t,n){return VC(e=+e,t=+t,n=+n)[2]}function GC(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?YC(t,e,n):YC(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function JC(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ZC(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function QC(e){let t,n,r;function i(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(i<s){if(0!==t(r,r))return s;do{const t=i+s>>>1;n(e[t],r)<0?i=t+1:s=t}while(i<s)}return i}return 2!==e.length?(t=JC,n=(t,n)=>JC(e(t),n),r=(t,n)=>e(t)-n):(t=e===JC||e===ZC?e:XC,n=e,r=e),{left:i,center:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=i(e,t,n,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length)-1);return s>n&&r(e[s-1],t)>-r(e[s],t)?s-1:s},right:function(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(i<s){if(0!==t(r,r))return s;do{const t=i+s>>>1;n(e[t],r)<=0?i=t+1:s=t}while(i<s)}return i}}}function XC(){return 0}function eM(e){return null===e?NaN:+e}const tM=QC(JC),nM=tM.right,rM=(tM.left,QC(eM).center,nM);var iM=n(5206),sM=n(5365);function aM(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,s=new Array(i),a=new Array(r);for(n=0;n<i;++n)s[n]=pM(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=s[n](e);return a}}function oM(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}var lM=n(10);function cM(e,t){var n,r={},i={};for(n in null!==e&&"object"===typeof e||(e={}),null!==t&&"object"===typeof t||(t={}),t)n in e?r[n]=pM(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var uM=n(7162),dM=n(8419);function hM(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(s){for(n=0;n<r;++n)i[n]=e[n]*(1-s)+t[n]*s;return i}}function pM(e,t){var n,r=typeof t;return null==t||"boolean"===r?(0,dM.A)(t):("number"===r?lM.A:"string"===r?(n=(0,iM.Ay)(t))?(t=n,sM.Ay):uM.A:t instanceof iM.Ay?sM.Ay:t instanceof Date?oM:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?hM:Array.isArray(t)?aM:"function"!==typeof t.valueOf&&"function"!==typeof t.toString||isNaN(t)?cM:lM.A)(e,t)}function fM(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function mM(e){return+e}var gM=[0,1];function yM(e){return e}function xM(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function vM(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=xM(i,r),s=n(a,s)):(r=xM(r,i),s=n(s,a)),function(e){return s(r(e))}}function bM(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=xM(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(t){var n=rM(e,t,1,r)-1;return s[n](i[n](t))}}function wM(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _M(){var e,t,n,r,i,s,a=gM,o=gM,l=pM,c=yM;function u(){var e=Math.min(a.length,o.length);return c!==yM&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?bM:vM,i=s=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),o,l)))(e(c(t)))}return d.invert=function(n){return c(t((s||(s=r(o,a.map(e),lM.A)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,mM),u()):a.slice()},d.range=function(e){return arguments.length?(o=Array.from(e),u()):o.slice()},d.rangeRound=function(e){return o=Array.from(e),l=fM,u()},d.clamp=function(e){return arguments.length?(c=!!e||yM,u()):c!==yM},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function jM(){return _M()(yM,yM)}var kM,NM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function SM(e){if(!(t=NM.exec(e)))throw new Error("invalid format: "+e);var t;return new EM({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function EM(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function AM(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function CM(e){return(e=AM(Math.abs(e)))?e[1]:NaN}function MM(e,t){var n=AM(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}SM.prototype=EM.prototype,EM.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?""
vendor: 2,062 bytes, line 2
2:Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const TM={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>MM(100*e,t),r:MM,s:function(e,t){var n=AM(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(kM=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+AM(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function PM(e){return e}var OM,IM,LM,RM=Array.prototype.map,DM=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function BM(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?PM:(t=RM.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,s=[],a=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(e.substring(i-=o,i+o)),!((l+=o+1)>r));)o=t[a=(a+1)%t.length];return s.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?PM:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(RM.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"\u2212":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=SM(e)).fill,n=e.align,d=e.sign,h=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,x=e.type;"n"===x?(m=!0,x="g"):TM[x]||(void 0===g&&(g=12),y=!0,x="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var v="$"===h?i:"#"===h&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",b="$"===h?s:/[%p]/.test(x)?l:"",w=TM[x],_=/[defgprs%]/.test(x);function j(e){var i,s,l,h=v,j=b;if("c"===x)j=w(e)+j,e="";else{var k=(e=+e)<0||1/e<0;
vendor: 4,374 bytes, line 2
2if(e=isNaN(e)?u:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==d&&(k=!1),h=(k?"("===d?d:c:"-"===d||"("===d?"":d)+h,j=("s"===x?DM[8+kM/3]:"")+j+(k&&"("===d?")":""),_)for(i=-1,s=e.length;++i<s;)if(48>(l=e.charCodeAt(i))||l>57){j=(46===l?a+e.slice(i+1):e.slice(i))+j,e=e.slice(0,i);break}}m&&!p&&(e=r(e,1/0));var N=h.length+e.length+j.length,S=N<f?new Array(f-N+1).join(t):"";switch(m&&p&&(e=r(S+e,S.length?f-j.length:1/0),S=""),n){case"<":e=h+e+j+S;break;case"=":e=h+S+e+j;break;case"^":e=S.slice(0,N=S.length>>1)+h+e+j+S.slice(N);break;default:e=S+h+e+j}return o(e)}return g=void 0===g?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),j.toString=function(){return e+""},j}return{format:d,formatPrefix:function(e,t){var n=d(((e=SM(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(CM(t)/3))),i=Math.pow(10,-r),s=DM[8+r/3];return function(e){return n(i*e)+s}}}}function FM(e,t,n,r){var i,s=GC(e,t,n);switch((r=SM(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(CM(t)/3)))-CM(Math.abs(e)))}(s,a))||(r.precision=i),LM(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,CM(t)-CM(e))+1}(s,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-CM(Math.abs(e)))}(s))||(r.precision=i-2*("%"===r.type))}return IM(r)}function UM(e){var t=e.domain;return e.ticks=function(e){var n=t();return $C(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return FM(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,s=t(),a=0,o=s.length-1,l=s[a],c=s[o],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=o,o=i);u-- >0;){if((i=YC(l,c,n))===r)return s[a]=l,s[o]=c,t(s);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function zM(){var e=jM();return e.copy=function(){return wM(e,zM())},BC.C.apply(e,arguments),UM(e)}function qM(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,mM),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return qM(e).unknown(t)},e=arguments.length?Array.from(e,mM):[0,1],UM(n)}function WM(e,t){var n,r=0,i=(e=e.slice()).length-1,s=e[r],a=e[i];return a<s&&(n=r,r=i,i=n,n=s,s=a,a=n),e[r]=t.floor(s),e[i]=t.ceil(a),e}function HM(e){return Math.log(e)}function KM(e){return Math.exp(e)}function VM(e){return-Math.log(-e)}function $M(e){return-Math.exp(-e)}function YM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function GM(e){return(t,n)=>-e(-t,n)}function JM(e){const t=e(HM,KM),n=t.domain;let r,i,s=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(s),i=function(e){return 10===e?YM:e===Math.E?Math.exp:t=>Math.pow(e,t)}(s),n()[0]<0?(r=GM(r),i=GM(i),e(VM,$M)):e(HM,KM),t}return t.base=function(e){return arguments.length?(s=+e,a()):s},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],o=t[t.length-1];const l=o<a;l&&([a,o]=[o,a]);let c,u,d=r(a),h=r(o);const p=null==e?10:+e;let f=[];if(!(s%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),a>0){for(;d<=h;++d)for(c=1;c<s;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>o)break;f.push(u)}}else for(;d<=h;++d)for(c=s-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>o)break;f.push(u)}2*f.length<p&&(f=$C(a,o,p))}else f=$C(d,h,Math.min(h-d,p)).map(i);return l?f.reverse():f},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===s?"s":","),"function"!==typeof n&&(s%1||null!=(n=SM(n)).precision||(n.trim=!0),n=IM(n)),e===1/0)return n;const a=Math.max(1,s*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*s<s-.5&&(t*=s),t<=a?n(e):""}},t.nice=()=>n(WM(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function ZM(){const e=JM(_M()).domain([1,10]);return e.copy=()=>wM(e,ZM()).base(e.base()),BC.C.apply(e,arguments),e}
vendor: 15,069 bytes, line 2
2function QM(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function XM(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function eT(e){var t=1,n=e(QM(t),XM(t));return n.constant=function(n){return arguments.length?e(QM(t=+n),XM(t)):t},UM(n)}function tT(){var e=eT(_M());return e.copy=function(){return wM(e,tT()).constant(e.constant())},BC.C.apply(e,arguments)}function nT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rT(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iT(e){return e<0?-e*e:e*e}function sT(e){var t=e(yM,yM),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(yM,yM):.5===n?e(rT,iT):e(nT(n),nT(1/n)):n},UM(t)}function aT(){var e=sT(_M());return e.copy=function(){return wM(e,aT()).exponent(e.exponent())},BC.C.apply(e,arguments),e}function oT(){return aT.apply(null,arguments).exponent(.5)}function lT(e){return Math.sign(e)*e*e}function cT(){var e,t=jM(),n=[0,1],r=!1;function i(n){var i=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(i)?e:r?Math.round(i):i}return i.invert=function(e){return t.invert(lT(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((n=Array.from(e,mM)).map(lT)),i):n.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(r=!!e,i):r},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return cT(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},BC.C.apply(i,arguments),UM(i)}OM=BM({thousands:",",grouping:[3],currency:["$",""]}),IM=OM.format,LM=OM.formatPrefix;var uT=n(1963),dT=n(3305);function hT(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:JC;if(e===JC)return pT;if("function"!==typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}function pT(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function fT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,i=arguments.length>4?arguments[4]:void 0;if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?pT:hT(i);r>n;){if(r-n>600){const s=r-n+1,a=t-n+1,o=Math.log(s),l=.5*Math.exp(2*o/3),c=.5*Math.sqrt(o*l*(s-l)/s)*(a-s/2<0?-1:1);fT(e,t,Math.max(n,Math.floor(t-a*l/s+c)),Math.min(r,Math.floor(t+(s-a)*l/s+c)),i)}const s=e[t];let a=n,o=r;for(mT(e,n,t),i(e[r],s)>0&&mT(e,n,r);a<o;){for(mT(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}0===i(e[n],s)?mT(e,n,o):(++o,mT(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function mT(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function gT(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let n of e)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return(0,dT.A)(e);if(t>=1)return(0,uT.A)(e);var r,i=(r-1)*t,s=Math.floor(i),a=(0,uT.A)(fT(e,s).subarray(0,s+1));return a+((0,dT.A)(e.subarray(s+1))-a)*(i-s)}}function yT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eM;if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,s=Math.floor(i),a=+n(e[s],s,e);return a+(+n(e[s+1],s+1,e)-a)*(i-s)}}function xT(){var e,t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);for(r=new Array(i-1);++e<i;)r[e-1]=yT(t,e/i);return s}function s(t){return null==t||isNaN(t=+t)?e:n[rM(r,t)]}return s.invertExtent=function(e){var i=n.indexOf(e);return i<0?[NaN,NaN]:[i>0?r[i-1]:t[0],i<r.length?r[i]:t[t.length-1]]},s.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(JC),i()},s.range=function(e){return arguments.length?(n=Array.from(e),i()):n.slice()},s.unknown=function(t){return arguments.length?(e=t,s):e},s.quantiles=function(){return r.slice()},s.copy=function(){return xT().domain(t).range(n).unknown(e)},BC.C.apply(s,arguments)}function vT(){var e,t=0,n=1,r=1,i=[.5],s=[0,1];function a(t){return null!=t&&t<=t?s[rM(i,t,0,r)]:e}function o(){var e=-1;for(i=new Array(r);++e<r;)i[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,o()):[t,n]},a.range=function(e){return arguments.length?(r=(s=Array.from(e)).length-1,o()):s.slice()},a.invertExtent=function(e){var a=s.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return vT().domain([t,n]).range(s).unknown(e)},BC.C.apply(UM(a),arguments)}function bT(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[rM(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return bT().domain(t).range(n).unknown(e)},BC.C.apply(i,arguments)}const wT=1e3,_T=6e4,jT=36e5,kT=864e5,NT=6048e5,ST=2592e6,ET=31536e6,AT=new Date,CT=new Date;function MT(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,s)=>{const a=[];if(n=i.ceil(n),s=null==s?1:Math.floor(s),!(n<r)||!(s>0))return a;let o;do{a.push(o=new Date(+n)),t(n,s),e(n)}while(o<n&&n<r);return a},i.filter=n=>MT(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(AT.setTime(+t),CT.setTime(+r),e(AT),e(CT),Math.floor(n(AT,CT))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const TT=MT(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);TT.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?MT(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):TT:null);TT.range;const PT=MT(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*wT)},(e,t)=>(t-e)/wT,e=>e.getUTCSeconds()),OT=(PT.range,MT(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wT)},(e,t)=>{e.setTime(+e+t*_T)},(e,t)=>(t-e)/_T,e=>e.getMinutes())),IT=(OT.range,MT(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*_T)},(e,t)=>(t-e)/_T,e=>e.getUTCMinutes())),LT=(IT.range,MT(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wT-e.getMinutes()*_T)},(e,t)=>{e.setTime(+e+t*jT)},(e,t)=>(t-e)/jT,e=>e.getHours())),RT=(LT.range,MT(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*jT)},(e,t)=>(t-e)/jT,e=>e.getUTCHours())),DT=(RT.range,MT(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_T)/kT,e=>e.getDate()-1)),BT=(DT.range,MT(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/kT,e=>e.getUTCDate()-1)),FT=(BT.range,MT(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/kT,e=>Math.floor(e/kT)));FT.range;function UT(e){return MT(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_T)/NT)}const zT=UT(0),qT=UT(1),WT=UT(2),HT=UT(3),KT=UT(4),VT=UT(5),$T=UT(6);zT.range,qT.range,WT.range,HT.range,KT.range,VT.range,$T.range;function YT(e){return MT(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/NT)}const GT=YT(0),JT=YT(1),ZT=YT(2),QT=YT(3),XT=YT(4),eP=YT(5),tP=YT(6),nP=(GT.range,JT.range,ZT.range,QT.range,XT.range,eP.range,tP.range,MT(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),rP=(nP.range,MT(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),iP=(rP.range,MT(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));iP.every=e=>isFinite(e=Math.floor(e))&&e>0?MT(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null;iP.range;const sP=MT(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());sP.every=e=>isFinite(e=Math.floor(e))&&e>0?MT(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null;sP.range;function aP(e,t,n,r,i,s){const a=[[PT,1,wT],[PT,5,5e3],[PT,15,15e3],[PT,30,3e4],[s,1,_T],[s,5,3e5],[s,15,9e5],[s,30,18e5],[i,1,jT],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,kT],[r,2,1728e5],[n,1,NT],[t,1,ST],[t,3,7776e6],[e,1,ET]];function o(t,n,r){const i=Math.abs(n-t)/r,s=QC(e=>{let[,,t]=e;return t}).right(a,i);if(s===a.length)return e.every(GC(t/ET,n/ET,r));if(0===s)return TT.every(Math.max(GC(t,n,r),1));const[o,l]=a[i/a[s-1][2]<a[s][2]/i?s-1:s];return o.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"===typeof n.range?n:o(e,t,n),s=i?i.range(e,+t+1):[];return r?s.reverse():s},o]}const[oP,lP]=aP(sP,rP,GT,FT,RT,IT),[cP,uP]=aP(iP,nP,zT,DT,LT,OT);function dP(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function hP(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pP(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var fP,mP,gP,yP={"-":"",_:" ",0:"0"},xP=/^\s*\d+/,vP=/^%/,bP=/[\\^$*+?|[\]().{}]/g;function wP(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function _P(e){return e.replace(bP,"\\$&")}function jP(e){return new RegExp("^(?:"+e.map(_P).join("|")+")","i")}function kP(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function NP(e,t,n){var r=xP.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function SP(e,t,n){var r=xP.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function EP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function AP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function CP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function MP(e,t,n){var r=xP.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function TP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function PP(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function OP(e,t,n){var r=xP.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function IP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function LP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function RP(e,t,n){var r=xP.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function DP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function BP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function FP(e,t,n){var r=xP.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function UP(e,t,n){var r=xP.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zP(e,t,n){var r=xP.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qP(e,t,n){var r=vP.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function WP(e,t,n){var r=xP.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function HP(e,t,n){var r=xP.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function KP(e,t){return wP(e.getDate(),t,2)}function VP(e,t){return wP(e.getHours(),t,2)}function $P(e,t){return wP(e.getHours()%12||12,t,2)}function YP(e,t){return wP(1+DT.count(iP(e),e),t,3)}function GP(e,t){return wP(e.getMilliseconds(),t,3)}function JP(e,t){return GP(e,t)+"000"}function ZP(e,t){return wP(e.getMonth()+1,t,2)}function QP(e,t){return wP(e.getMinutes(),t,2)}function XP(e,t){return wP(e.getSeconds(),t,2)}function eO(e){var t=e.getDay();return 0===t?7:t}function tO(e,t){return wP(zT.count(iP(e)-1,e),t,2)}function nO(e){var t=e.getDay();return t>=4||0===t?KT(e):KT.ceil(e)}function rO(e,t){return e=nO(e),wP(KT.count(iP(e),e)+(4===iP(e).getDay()),t,2)}function iO(e){return e.getDay()}function sO(e,t){return wP(qT.count(iP(e)-1,e),t,2)}function aO(e,t){return wP(e.getFullYear()%100,t,2)}function oO(e,t){return wP((e=nO(e)).getFullYear()%100,t,2)}function lO(e,t){return wP(e.getFullYear()%1e4,t,4)}function cO(e,t){var n=e.getDay();return wP((e=n>=4||0===n?KT(e):KT.ceil(e)).getFullYear()%1e4,t,4)}function uO(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+wP(t/60|0,"0",2)+wP(t%60,"0",2)}function dO(e,t){return wP(e.getUTCDate(),t,2)}function hO(e,t){return wP(e.getUTCHours(),t,2)}function pO(e,t){return wP(e.getUTCHours()%12||12,t,2)}function fO(e,t){return wP(1+BT.count(sP(e),e),t,3)}function mO(e,t){return wP(e.getUTCMilliseconds(),t,3)}function gO(e,t){return mO(e,t)+"000"}function yO(e,t){return wP(e.getUTCMonth()+1,t,2)}function xO(e,t){return wP(e.getUTCMinutes(),t,2)}function vO(e,t){return wP(e.getUTCSeconds(),t,2)}function bO(e){var t=e.getUTCDay();return 0===t?7:t}function wO(e,t){return wP(GT.count(sP(e)-1,e),t,2)}function _O(e){var t=e.getUTCDay();return t>=4||0===t?XT(e):XT.ceil(e)}function jO(e,t){return e=_O(e),wP(XT.count(sP(e),e)+(4===sP(e).getUTCDay()),t,2)}function kO(e){return e.getUTCDay()}function NO(e,t){return wP(JT.count(sP(e)-1,e),t,2)}function SO(e,t){return wP(e.getUTCFullYear()%100,t,2)}function EO(e,t){return wP((e=_O(e)).getUTCFullYear()%100,t,2)}function AO(e,t){return wP(e.getUTCFullYear()%1e4,t,4)}function CO(e,t){var n=e.getUTCDay();return wP((e=n>=4||0===n?XT(e):XT.ceil(e)).getUTCFullYear()%1e4,t,4)}function MO(){return"+0000"}function TO(){return"%"}function PO(e){return+e}function OO(e){return Math.floor(+e/1e3)}function IO(e){return new Date(e)}function LO(e){return e instanceof Date?+e:+new Date(+e)}function RO(e,t,n,r,i,s,a,o,l,c){var u=jM(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),x=c("%b %
2d"),v=c("%B"),b=c("%Y");function w(e){return(l(e)<e?p:o(e)<e?f:a(e)<e?m:s(e)<e?g:r(e)<e?i(e)<e?y:x:n(e)<e?v:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,LO)):h().map(IO)},u.ticks=function(t){var n=h();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=h();return e&&"function"===typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?h(WM(n,e)):u},u.copy=function(){return wM(u,RO(e,t,n,r,i,s,a,o,l,c))},u}function DO(){return BC.C.apply(RO(cP,uP,iP,nP,zT,DT,LT,OT,PT,mP).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function BO(){return BC.C.apply(RO(oP,lP,sP,rP,GT,BT,RT,IT,PT,gP).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function FO(){var e,t,n,r,i,s=0,a=1,o=yM,l=!1;function c(t){return null==t||isNaN(t=+t)?i:o(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),c):[o(0),o(1)]}}return c.domain=function(i){return arguments.length?([s,a]=i,e=r(s=+s),t=r(a=+a),n=e===t?0:1/(t-e),c):[s,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(o=e,c):o},c.range=u(pM),c.rangeRound=u(fM),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(s),t=i(a),n=e===t?0:1/(t-e),c}}function UO(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zO(){var e=UM(FO()(yM));return e.copy=function(){return UO(e,zO())},BC.K.apply(e,arguments)}function qO(){var e=JM(FO()).domain([1,10]);return e.copy=function(){return UO(e,qO()).base(e.base())},BC.K.apply(e,arguments)}function WO(){var e=eT(FO());return e.copy=function(){return UO(e,WO()).constant(e.constant())},BC.K.apply(e,arguments)}function HO(){var e=sT(FO());return e.copy=function(){return UO(e,HO()).exponent(e.exponent())},BC.K.apply(e,arguments)}function KO(){return HO.apply(null,arguments).exponent(.5)}function VO(){var e=[],t=yM;
vendor: 2,326 bytes, line 2
2function n(n){if(null!=n&&!isNaN(n=+n))return t((rM(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(JC),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>gT(e,r/t))},n.copy=function(){return VO(t).domain(e)},BC.K.apply(n,arguments)}function $O(){var e,t,n,r,i,s,a,o=0,l=.5,c=1,u=1,d=yM,h=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+s(e))-t)*(u*e<u*t?r:i),d(h?Math.max(0,Math.min(1,e)):e))}function f(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,d=function(e,t){void 0===t&&(t=e,e=pM);for(var n=0,r=t.length-1,i=t[0],s=new Array(r<0?0:r);n<r;)s[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return s[t](e-t)}}(e,[n,r,i]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([o,l,c]=a,e=s(o=+o),t=s(l=+l),n=s(c=+c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p):[o,l,c]},p.clamp=function(e){return arguments.length?(h=!!e,p):h},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=f(pM),p.rangeRound=f(fM),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return s=a,e=a(o),t=a(l),n=a(c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function YO(){var e=UM($O()(yM));return e.copy=function(){return UO(e,YO())},BC.K.apply(e,arguments)}function GO(){var e=JM($O()).domain([.1,1,10]);return e.copy=function(){return UO(e,GO()).base(e.base())},BC.K.apply(e,arguments)}function JO(){var e=eT($O());return e.copy=function(){return UO(e,JO()).constant(e.constant())},BC.K.apply(e,arguments)}function ZO(){var e=sT($O());return e.copy=function(){return UO(e,ZO()).exponent(e.exponent())},BC.K.apply(e,arguments)}function QO(){return ZO.apply(null,arguments).exponent(.5)}function XO(e){return null!=e}!function(e){fP=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=jP(i),u=kP(i),d=jP(s),h=kP(s),p=jP(a),f=kP(a),m=jP(o),g=kP(o),y=jP(l),x=kP(l),v={a:function(e){return a[e.getDay()]},A:function(e){return s[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return o[e.getMonth()]}
2,c:null,d:KP,e:KP,f:JP,g:oO,G:cO,H:VP,I:$P,j:YP,L:GP,m:ZP,M:QP,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:PO,s:OO,S:XP,u:eO,U:tO,V:rO,w:iO,W:sO,x:null,X:null,y:aO,Y:lO,Z:uO,"%":TO},b={a:function(e){return a[e.getUTCDay()]},A:function(e){return s[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return o[e.getUTCMonth()]},c:null,d:dO,e:dO,f:gO,g:EO,G:CO,H:hO,I:pO,j:fO,L:mO,m:yO,M:xO,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:PO,s:OO,S:vO,u:bO,U:wO,V:jO,w:kO,W:NO,x:null,X:null,y:SO,Y:AO,Z:MO,"%":TO},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:LP,e:LP,f:zP,g:TP,G:MP,H:DP,I:DP,j:RP,L:UP,m:IP,M:BP,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:OP,Q:WP,s:HP,S:FP,u:SP,U:EP,V:AP,w:NP,W:CP,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:TP,Y:MP,Z:PP,"%":qP};function _(e,t){return function(n){var r,i,s,a=[],o=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++o<c;)37===e.charCodeAt(o)&&(a.push(e.slice(l,o)),null!=(i=yP[r=e.charAt(++o)])?r=e.charAt(++o):i="e"===r?" ":"0",(s=t[r])&&(r=s(n,i)),a.push(r),l=o+1);return a.push(e.slice(l,o)),a.join("")}}function j(e,t){return function(n){var r,i,s=pP(1900,void 0,1);if(k(s,e,n+="",0)!=n.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(1e3*s.s+("L"in s?s.L:0));if(t&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+12*s.p),void 0===s.m&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(i=(r=hP(pP(s.y,0,1))).getUTCDay(),r=i>4||0===i?JT.ceil(r):JT(r),r=BT.offset(r,7*(s.V-1)),s.y=r.getUTCFullYear(),s.m=r.getUTCMonth(),s.d=r.getUTCDate()+(s.w+6)%7):(i=(r=dP(pP(s.y,0,1))).getDay(),r=i>4||0===i?qT.ceil(r):qT(r),r=DT.offset(r,7*(s.V-1)),s.y=r.getFullYear(),s.m=r.getMonth(),s.d=r.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),i="Z"in s?hP(pP(s.y,0,1)).getUTCDay():dP(pP(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(i+5)%7:s.w+7*s.U-(i+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,hP(s)):dP(s)}}function k(e,t,n,r){for(var i,s,a=0,o=t.length,l=n.length;a<o;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(s=w[i in yP?t.charAt(a++):i])||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=_(n,v),v.X=_(r,v),v.c=_(t,v),b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),{format:function(e){var t=_(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=j(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=_(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=j(e+="",!0);return t.toString=function(){return e},t}}}(e),mP=fP.format,fP.parse,gP=fP.utcFormat,fP.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var eI=e=>e.chartData,tI=NA([eI],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),nI=(e,t,n,r)=>r?tI(e):eI(e);function rI(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(Mk(t)&&Mk(n))return!0}return!1}function iI(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function sI(e,t){if(t&&"function"!==typeof e&&Array.isArray(e)&&2===e.length){var n,r,[i,s]=e;if(Mk(i))n=i;else if("function"===typeof i)return;if(Mk(s))r=s;else if("function"===typeof s)return;var a=[n,r];if(rI(a))return a}}var aI=n(8210),oI=n.n(aI),lI=e=>e,cI={"@@functional/placeholder":!0},uI=e=>e===cI,dI=e=>function t(){return 0===arguments.length||1===arguments.length&&uI(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},hI=(e,t)=>1===e?t:dI(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=r.filter(e=>e!==cI).length;return s>=e?t(...r):hI(e-s,dI(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var s=r.map(e=>uI(e)?n.shift():e);return t(...s,...n)}))}),pI=e=>hI(e.length,e),fI=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},mI=pI((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(e=>t[e]).map(e)),gI=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),yI=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return t&&i.every((e,n)=>{var r;return e===(null===(r=t)||void 0===r?void 0:r[n])}
2)?n:(t=i,n=e(...i))}};function xI(e){return 0===e?1:Math.floor(new(oI())(e).abs().log(10).toNumber())+1}function vI(e,t,n){for(var r=new(oI())(e),i=0,s=[];r.lt(t)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}pI((e,t,n)=>{var r=+e;return r+n*(+t-r)}),pI((e,t,n)=>{var r=t-+e;return(n-e)/(r=r||1/0)}),pI((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var bI=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},wI=(e,t,n)=>{if(e.lte(0))return new(oI())(0);var r=xI(e.toNumber()),i=new(oI())(10).pow(r),s=e.div(i),a=1!==r?.05:.1,o=new(oI())(Math.ceil(s.div(a).toNumber())).add(n).mul(a).mul(i);return t?new(oI())(o.toNumber()):new(oI())(Math.ceil(o.toNumber()))},_I=(e,t,n)=>{var r=new(oI())(1),i=new(oI())(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new(oI())(10).pow(xI(e)-1),i=new(oI())(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new(oI())(Math.floor(e)))}else 0===e?i=new(oI())(Math.floor((t-1)/2)):n||(i=new(oI())(Math.floor(e)));var a=Math.floor((t-1)/2),o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return lI;var r=t.reverse(),i=r[0],s=r.slice(1);return function(){return s.reduce((e,t)=>t(e),i(...arguments))}}(mI(e=>i.add(new(oI())(e-a).mul(r)).toNumber()),fI);return o(0,t)},jI=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new(oI())(0),tickMin:new(oI())(0),tickMax:new(oI())(0)};var s,a=wI(new(oI())(t).sub(e).div(n-1),r,i);s=e<=0&&t>=0?new(oI())(0):(s=new(oI())(e).add(t).div(2)).sub(new(oI())(s).mod(a));var o=Math.ceil(s.sub(e).div(a).toNumber()),l=Math.ceil(new(oI())(t).sub(s).div(a).toNumber()),c=o+l+1;return c>n?jI(e,t,n,r,i+1):(c<n&&(l=t>0?l+(n-c):l,o=t>0?o:o+(n-c)),{step:a,tickMin:s.sub(new(oI())(o).mul(a)),tickMax:s.add(new(oI())(l).mul(a))})};var kI=yI(function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=Math.max(r,2),[a,o]=bI([t,n]);if(a===-1/0||o===1/0){var l=o===1/0?[a,...fI(0,r-1).map(()=>1/0)]:[...fI(0,r-1).map(()=>-1/0),o];return t>n?gI(l):l}if(a===o)return _I(a,r,i);var{step:c,tickMin:u,tickMax:d}=jI(a,o,s,i,0),h=vI(u,d.add(new(oI())(.1).mul(c)),c);return t>n?gI(h):h}),NI=yI(function(e,t){var[n,r]=e,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[s,a]=bI([n,r]);if(s===-1/0||a===1/0)return[n,r];if(s===a)return[s];var o=Math.max(t,2),l=wI(new(oI())(a).sub(s).div(o-1),i,0),c=[...vI(new(oI())(s),new(oI())(a),l),a];return!1===i&&(c=c.map(e=>Math.round(e))),n>r?gI(c):c}),SI=e=>e.rootProps.stackOffset,EI=e=>e.options.chartName,AI=e=>e.rootProps.syncId,CI=e=>e.rootProps.syncMethod,MI=e=>e.options.eventEmitter,TI=0,PI="auto",OI=!0,II=!1,LI=!0,RI=0,DI="auto",BI=!0,FI=5,UI=(e,t)=>{if(e&&t)return null!==e&&void 0!==e&&e.reversed?[t[1],t[0]]:t},zI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:TI,includeHidden:!1,name:void 0,reversed:!1,scale:PI,tick:OI,tickCount:void 0,ticks:void 0,type:"category",unit:void 0},qI={allowDataOverflow:II,allowDecimals:!1,allowDuplicatedCategory:LI,dataKey:void 0,domain:void 0,id:RI,includeHidden:!1,name:void 0,reversed:!1,scale:DI,tick:BI,tickCount:FI,ticks:void 0,type:"number",unit:void 0},WI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:TI,includeHidden:!1,name:void 0,reversed:!1,scale:PI,tick:OI,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},HI={allowDataOverflow:II,allowDecimals:!1,allowDuplicatedCategory:LI,dataKey:void 0,domain:void 0,id:RI,includeHidden:!1,name:void 0,reversed:!1,scale:DI,tick:BI,tickCount:FI,ticks:void 0,type:"category",unit:void 0},KI=(e,t)=>null!=e.polarAxis.angleAxis[t]?e.polarAxis.angleAxis[t]:"radial"===e.layout.layoutType?WI:zI,VI=(e,t)=>null!=e.polarAxis.radiusAxis[t]?e.polarAxis.radiusAxis[t]:"radial"===e.layout.layoutType?HI:qI,$I=e=>e.polarOptions,YI=NA([fC,mC,NC],JA),GI=NA([$I,YI],(e,t)=>{if(null!=e)return vk(e.innerRadius,t,0)}),JI=NA([$I,YI],(e,t)=>{if(null!=e)return vk(e.outerRadius,t,.8*t)}),ZI=NA([$I],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]}),QI=(NA([KI,ZI],UI),NA([YI,GI,JI],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]})),XI=(NA([VI,QI],UI),NA([OC,$I,GI,JI,fC,mC],(e,t,n,r,i,s)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:a,cy:o,startAngle:l,endAngle:c}=t;return{cx:vk(a,i,i/2),cy:vk(o,s,s/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}})),eL=(e,t)=>t,tL=(e,t,n)=>n;function nL(e){return null===e||void 0===e?void 0:e.id}var rL=e=>{var t=OC(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},iL=e=>e.tooltip.settings.axisId,sL=e=>{var t=rL(e),n=iL(e);
2return _L(e,t,n)},aL=NA([sL],e=>null===e||void 0===e?void 0:e.dataKey);function oL(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:s}=n,a=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var o=nL(e);n.forEach((t,n)=>{var r,l=null==s||i?n:String(iC(t,s,null)),c=iC(t,e.dataKey,0);r=a.has(l)?a.get(l):{},Object.assign(r,{[o]:c}),a.set(l,r)})}}),Array.from(a.values())}function lL(e){return null!=e.stackId&&null!=e.dataKey}var cL=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function uL(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}function dL(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 hL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dL(Object(n),!0).forEach(function(t){pL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fL=[0,"auto"],mL={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},gL=(e,t)=>{var n=((e,t)=>e.cartesianAxis.xAxis[t])(e,t);return null==n?mL:n},yL={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:fL,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:60},xL=(e,t)=>{var n=((e,t)=>e.cartesianAxis.yAxis[t])(e,t);return null==n?yL:n},vL={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},bL=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?vL:n},wL=(e,t,n)=>{switch(t){case"xAxis":return gL(e,n);case"yAxis":return xL(e,n);case"zAxis":return bL(e,n);case"angleAxis":return KI(e,n);case"radiusAxis":return VI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},_L=(e,t,n)=>{switch(t){case"xAxis":return gL(e,n);case"yAxis":return xL(e,n);case"angleAxis":return KI(e,n);case"radiusAxis":return VI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},jL=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function kL(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var NL=NA([eL,tL],kL),SL=(e,t,n)=>e.filter(n).filter(e=>!0===(null===t||void 0===t?void 0:t.includeHidden)||!e.hide),EL=NA([e=>e.graphicalItems.cartesianItems,wL,NL],SL,{memoizeOptions:{resultEqualityCheck:uL}}),AL=NA([EL],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(lL)),CL=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),ML=NA([EL],CL),TL=e=>e.map(e=>e.data).filter(Boolean).flat(1),PL=NA([EL],TL,{memoizeOptions:{resultEqualityCheck:uL}}),OL=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},IL=NA([PL,nI],OL),LL=(e,t,n)=>null!=(null===t||void 0===t?void 0:t.dataKey)?e.map(e=>({value:iC(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:iC(e,t)}))):e.map(e=>({value:e})),RL=NA([IL,wL,EL],LL);function DL(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function BL(e){if(gk(e)||e instanceof Date){var t=Number(e);if(Mk(t))return t}}function FL(e){if(Array.isArray(e)){var t=[BL(e[0]),BL(e[1])];return rI(t)?t:void 0}var n=BL(e);if(null!=n)return[n,n]}function UL(e){return e.map(BL).filter(XO)}var zL=NA([AL,nI,sL],oL),qL=(e,t,n)=>{var r=t.reduce((e,t)=>
2(null==t.stackId||(null==e[t.stackId]&&(e[t.stackId]=[]),e[t.stackId].push(t)),e),{});return Object.fromEntries(Object.entries(r).map(t=>{var[r,i]=t,s=i.map(nL);return[r,{stackedData:lC(e,s,n),graphicalItems:i}]}))},WL=NA([zL,AL,SI],qL),HL=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:s}=t;if(null==r&&"zAxis"!==n){var a=cC(e,i,s);if(null==a||0!==a[0]||0!==a[1])return a}},KL=NA([wL],e=>e.allowDataOverflow),VL=e=>{var t;if(null==e||!("domain"in e))return fL;if(null!=e.domain)return e.domain;if(null!=e.ticks){if("number"===e.type){var n=UL(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null===e||void 0===e?void 0:e.domain)&&void 0!==t?t:fL},$L=NA([wL],VL),YL=NA([$L,KL],sI),GL=NA([WL,eI,eL,YL],HL,{memoizeOptions:{resultEqualityCheck:cL}}),JL=e=>e.errorBars,ZL=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},QL=(e,t,n,r,i)=>{var s,a;if(n.length>0&&e.forEach(e=>{n.forEach(n=>{var o,l,c=null===(o=r[n.id])||void 0===o?void 0:o.filter(e=>DL(i,e)),u=iC(e,null!==(l=t.dataKey)&&void 0!==l?l:n.dataKey),d=function(e,t,n){return!n||"number"!==typeof t||pk(t)?[]:n.length?UL(n.flatMap(n=>{var r,i,s=iC(e,n.dataKey);if(Array.isArray(s)?[r,i]=s:r=i=s,Mk(r)&&Mk(i))return[t-r,t+i]})):[]}(e,u,c);if(d.length>=2){var h=Math.min(...d),p=Math.max(...d);(null==s||h<s)&&(s=h),(null==a||p>a)&&(a=p)}var f=FL(u);null!=f&&(s=null==s?f[0]:Math.min(s,f[0]),a=null==a?f[1]:Math.max(a,f[1]))})}),null!=(null===t||void 0===t?void 0:t.dataKey)&&e.forEach(e=>{var n=FL(iC(e,t.dataKey));null!=n&&(s=null==s?n[0]:Math.min(s,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),Mk(s)&&Mk(a))return[s,a]},XL=NA([IL,wL,ML,JL,eL],QL,{memoizeOptions:{resultEqualityCheck:cL}});function eR(e){var{value:t}=e;if(gk(t)||t instanceof Date)return t}var tR=e=>e.referenceElements.dots,nR=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),rR=NA([tR,eL,tL],nR),iR=e=>e.referenceElements.areas,sR=NA([iR,eL,tL],nR),aR=e=>e.referenceElements.lines,oR=NA([aR,eL,tL],nR),lR=(e,t)=>{var n=UL(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},cR=NA(rR,eL,lR),uR=(e,t)=>{var n=UL(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},dR=NA([sR,eL],uR),hR=(e,t)=>{var n=UL(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},pR=NA(oR,eL,hR),fR=NA(cR,pR,dR,(e,t,n)=>ZL(e,n,t)),mR=(e,t,n,r,i,s,a,o)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"===typeof e&&null!=t)try{var r=e(t,n);if(rI(r))return iI(r,t,n)}catch(p){}if(Array.isArray(e)&&2===e.length){var i,s,[a,o]=e;if("auto"===a)null!=t&&(i=Math.min(...t));else if(mk(a))i=a;else if("function"===typeof a)try{null!=t&&(i=a(null===t||void 0===t?void 0:t[0]))}catch(f){}else if("string"===typeof a&&uC.test(a)){var l=uC.exec(a);if(null==l||null==t)i=void 0;else{var c=+l[1];i=t[0]-c}}else i=null===t||void 0===t?void 0:t[0];if("auto"===o)null!=t&&(s=Math.max(...t));else if(mk(o))s=o;else if("function"===typeof o)try{null!=t&&(s=o(null===t||void 0===t?void 0:t[1]))}catch(m){}else if("string"===typeof o&&dC.test(o)){var u=dC.exec(o);if(null==u||null==t)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=null===t||void 0===t?void 0:t[1];var h=[i,s];if(rI(h))return null==t?h:iI(h,t,n)}}}(t,"vertical"===a&&"xAxis"===o||"horizontal"===a&&"yAxis"===o?ZL(r,s,i):ZL(s,i),e.allowDataOverflow),gR=NA([wL,$L,YL,GL,XL,fR,OC,eL],mR,{memoizeOptions:{resultEqualityCheck:cL}}),yR=[0,1],xR=(e,t,n,r,i,s,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var{dataKey:o,type:l}=e,c=sC(t,s);return c&&null==o?DC()(0,n.length):"category"===l?((e,t,n)=>{var r=e.map(eR).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&bk(r))?DC()(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,c):"expand"===i?yR:a}},vR=NA([wL,OC,IL,RL,SI,eL,gR],xR),bR=(e,n,r,i,s)=>{if(null!=e){var{scale:a,type:o}=e;
2if("auto"===a)return"radial"===n&&"radiusAxis"===s?"band":"radial"===n&&"angleAxis"===s?"linear":"category"===o&&i&&(i.indexOf("LineChart")>=0||i.indexOf("AreaChart")>=0||i.indexOf("ComposedChart")>=0&&!r)?"point":"category"===o?"band":"linear";if("string"===typeof a){var l="scale".concat(jk(a));return l in t?l:"point"}}},wR=NA([wL,OC,jL,EI,eL],bR);function _R(e,n,r,i){if(null!=r&&null!=i){if("function"===typeof e.scale)return e.scale.copy().domain(r).range(i);var s=function(e){if(null!=e){if(e in t)return t[e]();var n="scale".concat(jk(e));return n in t?t[n]():void 0}}(n);if(null!=s){var a=s.domain(r).range(i);return(e=>{var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-aC,s=Math.max(r[0],r[1])+aC,a=e(t[0]),o=e(t[n-1]);(a<i||a>s||o<i||o>s)&&e.domain([t[0],t[n-1]])}})(a),a}}}var jR=(e,t,n)=>{var r=VL(t);if("auto"===n||"linear"===n)return null!=t&&t.tickCount&&Array.isArray(r)&&("auto"===r[0]||"auto"===r[1])&&rI(e)?kI(e,t.tickCount,t.allowDecimals):null!=t&&t.tickCount&&"number"===t.type&&rI(e)?NI(e,t.tickCount,t.allowDecimals):void 0},kR=NA([vR,_L,wR],jR),NR=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null===e||void 0===e?void 0:e.type)&&rI(t)&&Array.isArray(n)&&n.length>0){var i=t[0],s=n[0],a=t[1],o=n[n.length-1];return[Math.min(i,s),Math.max(a,o)]}return t},SR=NA([wL,vR,kR,eL],NR),ER=NA(RL,wL,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(UL(e.map(e=>e.value))).sort((e,t)=>e-t);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(0===i)return 1/0;for(var s=0;s<r.length-1;s++){var a=r[s+1]-r[s];n=Math.min(n,a)}return n/i}}),AR=NA(ER,OC,e=>e.rootProps.barCategoryGap,NC,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!Mk(e))return 0;var s="vertical"===t?r.height:r.width;if("gap"===i)return e*s/2;if("no-gap"===i){var a=vk(n,e*s),o=e*s/2;return o-a-(o-a)/s*a}return 0}),CR=NA(gL,(e,t)=>{var n=gL(e,t);return null==n||"string"!==typeof n.padding?0:AR(e,"xAxis",t,n.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:i}=e;return"string"===typeof i?{left:t,right:t}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+t,right:(null!==(r=i.right)&&void 0!==r?r:0)+t}}),MR=NA(xL,(e,t)=>{var n=xL(e,t);return null==n||"string"!==typeof n.padding?0:AR(e,"yAxis",t,n.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:i}=e;return"string"===typeof i?{top:t,bottom:t}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+t}}),TR=NA([NC,CR,MC,CC,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:s}=r;return i?[s.left,n.width-s.right]:[e.left+t.left,e.left+e.width-t.right]}),PR=NA([NC,OC,MR,MC,CC,(e,t,n)=>n],(e,t,n,r,i,s)=>{var{padding:a}=i;return s?[r.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),OR=(e,t,n,r)=>{var i;switch(t){case"xAxis":return TR(e,n,r);case"yAxis":return PR(e,n,r);case"zAxis":return null===(i=bL(e,n))||void 0===i?void 0:i.range;case"angleAxis":return ZI(e);case"radiusAxis":return QI(e,n);default:return}},IR=NA([wL,OR],UI),LR=NA([wL,wR,SR,IR],_R);NA([EL,JL,eL],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>DL(n,e)));function RR(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var DR=(e,t)=>t,BR=(e,t,n)=>n,FR=NA(xC,DR,BR,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(RR)),UR=NA(vC,DR,BR,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(RR)),zR=(e,t)=>({width:e.width,height:t.height}),qR=(NA(NC,gL,zR),NA(mC,NC,FR,DR,BR,(e,t,n,r,i)=>{var s,a={};return n.forEach(n=>{var o=zR(t,n);null==s&&(s=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var l="top"===r&&!i||"bottom"===r&&i;a[n.id]=s-Number(l)*o.height,s+=(l?-1:1)*o.height}),a})),WR=NA(fC,NC,UR,DR,BR,(e,t,n,r,i)=>{var s,a={};return n.forEach(n=>{var o=((e,t)=>({width:"number"===typeof t.width?t.width:60,height:e.height}))(t,n);null==s&&(s=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var l="left"===r&&!i||"right"===r&&i;a[n.id]=s-Number(l)*o.width,s+=(l?-1:1)*o.width}),a}),HR=(NA([NC,gL,(e,t)=>{var n=gL(e,t);if(null!=n)return qR(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null===n||void 0===n?void 0:n[r];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),NA([NC,xL,(e,t)=>{var n=xL(e,t);if(null!=n)return WR(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null===n||void 0===n?void 0:n[r];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),NA(NC,xL,(e,t)=>({width:"number"===typeof t.width?t.width:60,height:e.height})),(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:i,type:s,dataKey:a}=n,o=sC(e,r),l=t.map(e=>e.value);return a&&o&&"category"===s&&i&&bk(l)?l:void 0}}),KR=NA([OC,RL,wL,eL],HR),VR=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:i,scale:s}=n;return!sC(e,r)||"number"!==i&&"auto"===s?void 0:t.map(e=>e.value)}},$R=NA([OC,RL,_L,eL],VR),YR=(NA([OC,(e,t,n)=>{switch(t){case"xAxis":return gL(e,n);case"yAxis":return xL(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},wR,LR,KR,$R,OR,kR,eL],(e,t,n,r,i,s,a,o,l)=>{if(null==t)return null;var c=sC(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:s,duplicateDomain:i,isCategorical:c,niceTicks:o,range:a,realScaleType:n,scale:r}}),NA([OC,_L,wR,LR,kR,OR,KR,$R,eL],(e,t,n,r,i,s,a,o,l)=>{if(null!=t&&null!=r){var c=sC(e,l),{type:u,ticks:d,tickCount:h}=t,p="scaleBand"===n&&"function"===typeof r.bandwidth?r.bandwidth()/2:2,f="category"===u&&r.bandwidth?r.bandwidth()/p:0;f="angleAxis"===l&&null!=s&&s.length>=2?2*hk(s[0]-s[1])*f:f;var m=d||i;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e;return{index:t,coordinate:r(n)+f,value:e,offset:f}}).filter(e=>!pk(e.coordinate)):c&&o?o.map((e,t)=>({coordinate:r(e)+f,value:e,index:t,offset:f})):r.ticks?r.ticks(h).map(e=>({coordinate:r(e)+f,value:e,offset:f})):r.domain().map((e,t)=>({coordinate:r(e)+f,value:a?a[e]:e,index:t,offset:f}))}}),NA([OC,_L,LR,OR,KR,$R,eL],(e,t,n,r,i,s,a)=>
2{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var o=sC(e,a),{tickCount:l}=t,c=0;return c="angleAxis"===a&&(null===r||void 0===r?void 0:r.length)>=2?2*hk(r[0]-r[1])*c:c,o&&s?s.map((e,t)=>({coordinate:n(e)+c,value:e,index:t,offset:c})):n.ticks?n.ticks(l).map(e=>({coordinate:n(e)+c,value:e,offset:c})):n.domain().map((e,t)=>({coordinate:n(e)+c,value:i?i[e]:e,index:t,offset:c}))}}),NA(wL,LR,(e,t)=>{if(null!=e&&null!=t)return hL(hL({},e),{},{scale:t})}),NA([wL,wR,vR,IR],_R)),GR=(NA((e,t,n)=>bL(e,n),YR,(e,t)=>{if(null!=e&&null!=t)return hL(hL({},e),{},{scale:t})}),NA([OC,xC,vC],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}})),JR=e=>e.options.defaultTooltipEventType,ZR=e=>e.options.validateTooltipEventTypes;function QR(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function XR(e,t){return QR(t,JR(e),ZR(e))}var eD=(e,t)=>{var n,r=Number(t);if(!pk(r)&&null!=t)return r>=0?null===e||void 0===e||null===(n=e[r])||void 0===n?void 0:n.value:void 0};function tD(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 nD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tD(Object(n),!0).forEach(function(t){rD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iD=(e,t,n,r)=>{if(null==t)return $E;var i=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==i)return $E;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var s=!0===e.settings.active;if(null!=i.index){if(s)return nD(nD({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return nD(nD({},$E),{},{coordinate:i.coordinate})},sD=(e,t)=>{var n=null===e||void 0===e?void 0:e.index;if(null==n)return null;var r=Number(n);if(!Mk(r))return n;var i=1/0;return t.length>0&&(i=t.length-1),String(Math.max(0,Math.min(r,i)))},aD=(e,t,n,r,i,s,a,o)=>{if(null!=s&&null!=o){var l=a[0],c=null==l?void 0:o(l.positions,s);if(null!=c)return c;var u=null===i||void 0===i?void 0:i[Number(s)];if(u)return"horizontal"===n?{x:u.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:u.coordinate}}},oD=(e,t,n,r)=>{return"axis"===t?e.tooltipItemPayloads:0===e.tooltipItemPayloads.length?[]:null==(i="hover"===n?e.itemInteraction.hover.dataKey:e.itemInteraction.click.dataKey)&&null!=r?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.dataKey)===i});var i},lD=e=>e.options.tooltipPayloadSearcher,cD=e=>e.tooltip;function uD(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 dD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uD(Object(n),!0).forEach(function(t){hD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEac
2h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pD=(e,t,n,r,i,s,a)=>{if(null!=t&&null!=s){var{chartData:o,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,h,p,{dataDefinedOnItem:f,settings:m}=n,g=function(e,t){return null!=e?e:t}(f,o),y=Array.isArray(g)?eC(g,c,u):g,x=null!==(d=null===m||void 0===m?void 0:m.dataKey)&&void 0!==d?d:r,v=null===m||void 0===m?void 0:m.nameKey;(h=r&&Array.isArray(y)&&!Array.isArray(y[0])&&"axis"===a?function(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"===typeof t?t(e):dk()(e,t))===n)}(y,r,i):s(y,t,l,v),Array.isArray(h))?h.forEach(t=>{var n=dD(dD({},m),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push(hC({tooltipEntrySettings:n,dataKey:t.dataKey,payload:t.payload,value:iC(t.payload,t.dataKey),name:t.name}))}):e.push(hC({tooltipEntrySettings:m,dataKey:x,payload:h,value:iC(h,x),name:null!==(p=iC(h,v))&&void 0!==p?p:null===m||void 0===m?void 0:m.name}));return e},[])}},fD=NA([sL,OC,jL,EI,rL],bR),mD=NA([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),gD=NA([rL,iL],kL),yD=NA([mD,sL,gD],SL,{memoizeOptions:{resultEqualityCheck:uL}}),xD=NA([yD],e=>e.filter(lL)),vD=NA([yD],TL,{memoizeOptions:{resultEqualityCheck:uL}}),bD=NA([vD,eI],OL),wD=NA([xD,eI,sL],oL),_D=NA([bD,sL,yD],LL),jD=NA([sL],VL),kD=NA([sL],e=>e.allowDataOverflow),ND=NA([jD,kD],sI),SD=NA([yD],e=>e.filter(lL)),ED=NA([wD,SD,SI],qL),AD=NA([ED,eI,rL,ND],HL),CD=NA([yD],CL),MD=NA([bD,sL,CD,JL,rL],QL,{memoizeOptions:{resultEqualityCheck:cL}}),TD=NA([tR,rL,iL],nR),PD=NA([TD,rL],lR),OD=NA([iR,rL,iL],nR),ID=NA([OD,rL],uR),LD=NA([aR,rL,iL],nR),RD=NA([LD,rL],hR),DD=NA([PD,RD,ID],ZL),BD=NA([sL,jD,ND,AD,MD,DD,OC,rL],mR),FD=NA([sL,OC,bD,_D,SI,rL,BD],xR),UD=NA([FD,sL,fD],jR),zD=NA([sL,FD,UD,rL],NR),qD=e=>{var t=rL(e),n=iL(e);return OR(e,t,n,!1)},WD=NA([sL,qD],UI),HD=NA([sL,fD,zD,WD],_R),KD=NA([OC,_D,sL,rL],HR),VD=NA([OC,_D,sL,rL],VR),$D=NA([OC,sL,fD,HD,qD,KD,VD,rL],(e,t,n,r,i,s,a,o)=>{if(t){var{type:l}=t,c=sC(e,o);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===l&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===o&&null!=i&&(null===i||void 0===i?void 0:i.length)>=2?2*hk(i[0]-i[1])*d:d,c&&a?a.map((e,t)=>({coordinate:r(e)+d,value:e,index:t,offset:d})):r.domain().map((e,t)=>({coordinate:r(e)+d,value:s?s[e]:e,index:t,offset:d}))}}}),YD=NA([JR,ZR,e=>e.tooltip.settings],(e,t,n)=>QR(n.shared,e,t)),GD=e=>e.tooltip.settings.trigger,JD=e=>e.tooltip.settings.defaultIndex,ZD=NA([cD,YD,GD,JD],iD),QD=NA([ZD,bD],sD),XD=NA([$D,QD],eD),eB=NA([ZD],e=>{if(e)return e.dataKey}),tB=NA([cD,YD,GD,JD],oD),nB=NA([fC,mC,OC,NC,$D,JD,tB,lD],aD),rB=NA([ZD,nB],(e,t)=>null!==e&&void 0!==e&&e.coordinate?e.coordinate:t),iB=NA([ZD],e=>e.active),sB=NA([tB,QD,eI,aL,XD,lD,YD],pD),aB=(NA([sB],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}}),(e,t)=>t),oB=(e,t,n)=>n,lB=(e,t,n,r)=>r,cB=NA($D,e=>RA()(e,e=>e.coordinate)),uB=NA([cD,aB,oB,lB],iD),dB=NA([uB,bD],sD),hB=NA([cD,aB,oB,lB],oD),pB=NA([fC,mC,OC,NC,$D,lB,hB,lD],aD),fB=NA([uB,pB],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),mB=NA($D,dB,eD),gB=NA([hB,dB,eI,aL,mB,lD,aB],pD),yB=NA([uB],e=>({isActive:e.active,activeIndex:e.index})),xB=NA([(e,t)=>t,OC,XI,rL,WD,$D,cB,NC],(e,t,n,r,i,s,a,o)=>{if(e&&t&&r&&i&&s){var l=function(e,t,n,r,i){return"horizontal"===n||"vertical"===n?e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height?{x:e,y:t}:null:r?XA({x:e,y:t},r):null}(e.chartX,e.chartY,t,n,o);if(l){var c=((e,t)=>"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius)(l,t),u=((e,t,n,r,i)=>{var s,a=-1,o=null!==(s=null===t||void 0===t?void 0:t.length)&&void 0!==s?s:0;if(o<=1||null==e)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<o;l++){var c=l>0?n[l-1].coordinate:n[o-1].coordinate,u=n[l].coordinate,d=l>=o-1?n[0].coordinate:n[l+1].coordinate,h=void 0;if(hk(u-c)!==hk(d-u)){var p=[];if(hk(d-u)===hk(i[1]-i[0])){h=d;var f=u+i[1]-i[0];p[0]=Math.min(f,(f+c)/2),p[1]=Math.max(f,(f+c)/2)}else{h=c;var m=d+i[1]-i[0];p[0]=Math.min(u,(m+u)/2),p[1]=Math.max(u,(m+u)/2)}var g=[Math.min(u,(h+u)/2),Math.max(u,(h+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){({index:a}=n[l]);break}}else{var y=Math.min(c,d),x=Math.max(c,d);if(e>(y+u)/2&&e<=(x+u)/2){({index:a}=n[l]);break}}}else if(t)for(var v=0;v<o;v++)if(0===v&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v>0&&v<o-1&&e>(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===o-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){({index:a}=t[v]);break}return a})(c,a,s,r,i),d=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("horizontal"===e)return{x:i.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:i.coordinate};if("centric"===e){var s=i.coordinate,{radius:a}=r;return nC(nC(nC({},r),GA(r.cx,r.cy,a,s)),{},{angle:s,radius:a})}var o=i.coordinate,{angle:l}=r;return nC(nC(nC({},r),GA(r.cx,r.cy,o,l)),{},{angle:l,radius:o})}return{x:0,y:0}})(t,s,u,l);return{activeIndex:String(u),activeCoordinate:d}}}}),vB=e=>
2{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},bB=$N("mouseClick"),wB=zS();wB.startListening({actionCreator:bB,effect:(e,t)=>{var n=e.payload,r=xB(t.getState(),vB(n));null!=(null===r||void 0===r?void 0:r.activeIndex)&&t.dispatch(rA({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var _B=$N("mouseMove"),jB=zS();function kB(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}function NB(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 SB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NB(Object(n),!0).forEach(function(t){EB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EB(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}jB.startListening({actionCreator:_B,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=XR(r,r.tooltip.settings.shared),s=xB(r,vB(n));"axis"===i&&(null!=(null===s||void 0===s?void 0:s.activeIndex)?t.dispatch(nA({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate})):t.dispatch(eA()))}});var AB=lS({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:QN()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:QN()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:QN()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:QN()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:QN()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:QN()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var s=i.widthHistory||[];if(3===s.length&&s[0]===s[2]&&r===s[1]&&r!==i.width&&Math.abs(r-s[0])<=1)return;var a=[...s,r].slice(-3);e.yAxis[n]=SB(SB({},e.yAxis[n]),{},{width:r,widthHistory:a})}}}}),{addXAxis:CB,removeXAxis:MB,addYAxis:TB,removeYAxis:PB,addZAxis:OB,removeZAxis:IB,updateYAxisWidth:LB}=AB.actions,RB=AB.reducer,DB=lS({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:QN()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=AN(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:QN()},removeCartesianGraphicalItem:{reducer(e,t){var n=AN(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:QN()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:QN()},removePolarGraphicalItem:{reducer(e,t){var n=AN(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:QN()}}}),{addCartesianGraphicalItem:BB,replaceCartesianGraphicalItem:FB,removeCartesianGraphicalItem:UB,addPolarGraphicalItem:zB,removePolarGraphicalItem:qB}=DB.actions,WB=DB.reducer,HB=lS({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=AN(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=AN(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=AN(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:KB,removeDot:VB,addArea:$B,removeArea:YB,addLine:GB,removeLine:JB}=HB.actions,ZB=HB.reducer,QB={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},XB=lS({name:"brush",initialState:QB,reducers:{setBrushSettings:(e,t)=>null==t.payload?QB:t.payload}}),{setBrushSettings:eF}=XB.actions,tF=XB.reducer,nF=lS({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height}
2,setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:QN()},removeLegendPayload:{reducer(e,t){var n=AN(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:QN()}}}),{setLegendSize:rF,setLegendSettings:iF,addLegendPayload:sF,removeLegendPayload:aF}=nF.actions,oF=nF.reducer,lF={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},cF=lS({name:"rootProps",initialState:lF,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:lF.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),uF=cF.reducer,{updateOptions:dF}=cF.actions,hF=lS({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:pF,removeRadiusAxis:fF,addAngleAxis:mF,removeAngleAxis:gF}=hF.actions,yF=hF.reducer,xF=lS({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:vF}=xF.actions,bF=xF.reducer,wF=$N("keyDown"),_F=$N("focus"),jF=zS();jF.startListening({actionCreator:wF,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip,i=e.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var s=Number(sD(r,bD(n))),a=$D(n);if("Enter"!==i){var o=s+("ArrowRight"===i?1:-1)*("left-to-right"===GR(n)?1:-1);if(!(null==a||o>=a.length||o<0)){var l=pB(n,"axis","hover",String(o));t.dispatch(sA({active:!0,activeIndex:o.toString(),activeDataKey:void 0,activeCoordinate:l}))}}else{var c=pB(n,"axis","hover",String(r.index));t.dispatch(sA({active:!r.active,activeIndex:r.index,activeDataKey:r.dataKey,activeCoordinate:c}))}}}}}),jF.startListening({actionCreator:_F,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var i=pB(n,"axis","hover",String("0"));t.dispatch(sA({activeDataKey:void 0,active:!0,activeIndex:"0",activeCoordinate:i}))}}}});var kF=$N("externalEvent"),NF=zS();NF.startListening({actionCreator:kF,effect:(e,t)=>{if(null!=e.payload.handler){var n=t.getState(),r={activeCoordinate:rB(n),activeDataKey:eB(n),activeIndex:QD(n),activeLabel:XD(n),activeTooltipIndex:QD(n),isTooltipActive:iB(n)};e.payload.handler(r,e.payload.reactEvent)}}});var SF=NA([cD],e=>e.tooltipItemPayloads),EF=NA([SF,lD,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(e=>e.settings.dataKey===r);if(null!=i){var{positions:s}=i;if(null!=s)return t(s,n)}}),AF=$N("touchMove"),CF=zS();CF.startListening({actionCreator:AF,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=XR(r,r.tooltip.settings.shared);if("axis"===i){var s=xB(r,vB({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));null!=(null===s||void 0===s?void 0:s.activeIndex)&&t.dispatch(nA({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate}))}else if("item"===i){var a,o=n.touches[0],l=document.elementFromPoint(o.clientX,o.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(bC),u=null!==(a=l.getAttribute(wC))&&void 0!==a?a:void 0,d=EF(t.getState(),c,u);t.dispatch(QE({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var MF=lS({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?i:e))},removeErrorBar:(e,t)=>
2{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==r.dataKey||e.direction!==r.direction))}}}),{addErrorBar:TF,replaceErrorBar:PF,removeErrorBar:OF}=MF.actions,IF=MF.reducer,LF=!1,RF=!("undefined"!==typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout),DF=FN({brush:tF,cartesianAxis:RB,chartData:dA,errorBars:IF,graphicalItems:WB,layout:yA,legend:oF,options:KS,polarAxis:yF,polarOptions:bF,referenceElements:ZB,rootProps:uF,tooltip:aA});function BF(e){var{preloadedState:t,children:n,reduxStoreName:i}=e,s=AC(),a=(0,r.useRef)(null);if(s)return n;null==a.current&&(a.current=function(e){return tS({reducer:DF,preloadedState:e,middleware:e=>e({serializableCheck:!1}).concat([wB.middleware,jB.middleware,jF.middleware,NF.middleware,CF.middleware]),enhancers:e=>{var t=e;return"function"===typeof e&&(t=e()),t.concat(eS({type:"raf"}))},devTools:LF&&{serialize:{replacer:kB},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(t,i));var o=AA;return r.createElement(rE,{context:o,store:a.current},n)}var FF=e=>{var{chartData:t}=e,n=MA(),i=AC();return(0,r.useEffect)(()=>i?()=>{}:(n(lA(t)),()=>{n(lA(void 0))}),[t,n,i]),null};function UF(e){var{layout:t,margin:n}=e,i=MA(),s=AC();return(0,r.useEffect)(()=>{s||(i(fA(t)),i(pA(n)))},[i,s,t,n]),null}function zF(e){var t=MA();return(0,r.useEffect)(()=>{t(dF(e))},[t,e]),null}function qF(e){var t=MA();return(0,r.useEffect)(()=>{t(vF(e))},[t,e]),null}var WF=()=>IA(e=>e.rootProps.accessibilityLayer),HF=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function KF(e){return"string"===typeof e&&HF.includes(e)}var VF=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
2dering","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","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","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","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function $F(e){return"string"===typeof e&&VF.includes(e)}function YF(e){return"string"===typeof e&&e.startsWith("data-")}function GF(e){var t=Object.entries(e).filter(e=>{var[t]=e;return $F(t)||YF(t)});return Object.fromEntries(t)}function JF(e){return null==e?null:(0,r.isValidElement)(e)&&"object"===typeof e.props&&null!==e.props?GF(e.props):"object"!==typeof e||Array.isArray(e)?null:GF(e)}function ZF(e){var t=Object.entries(e).filter(e=>{var[t]=e;return $F(t)||YF(t)||KF(t)});return Object.fromEntries(t)}var QF=["children","width","height","viewBox","className","style","title","desc"];function XF(){return XF=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},XF.apply(null,arguments)}var eU=(0,r.forwardRef)((e,t)=>{var{children:n,width:i,height:s,viewBox:a,className:o,style:l,title:c,desc:u}=e,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,QF),h=a||{width:i,height:s,x:0,y:0},p=ak("recharts-surface",o);return r.createElement("svg",XF({},ZF(d),{className:p,width:i,height:s,style:l,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height),ref:t}),r.createElement("title",null,c),r.createElement("desc",null,u),n)}),tU=["children"];function nU(){return nU=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},nU.apply(null,arguments)}var rU={width:"100%",height:"100%",display:"block"},iU=(0,r.forwardRef)((e,t)=>{var n=IA(fC),i=IA(mC),s=WF();if(!Tk(n)||!Tk(i))return null;var a,o,{children:l,otherAttributes:c,title:u,desc:d}=e;return a="number"===typeof c.tabIndex?c.tabIndex:s?0:void 0,o="string"===typeof c.role?c.role:s?"application":void 0,r.createElement(eU,nU({},c,{title:u,desc:d,role:o,tabIndex:a,width:n,height:i,style:rU,ref:t}),l)}),sU=e=>{var{children:t}=e,n=IA(MC);if(!n)return null;var{width:i,height:s,y:a,x:o}=n;return r.createElement(eU,{width:i,height:s,x:o,y:a},t)},aU=(0,r.forwardRef)((e,t)=>{var{children:n}=e,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,tU);return AC()?r.createElement(sU,null,n):r.createElement(iU,nU({ref:t},i),n)});var oU=new(n(8499)),lU="recharts.syncEvent.tooltip",cU="recharts.syncEvent.brush";function uU(e){return e.tooltip.syncInteraction}var dU=["x","y"];function hU(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 pU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?hU(Object(n),!0).forEach(function(t){fU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mU=()=>{};function gU(){var e=IA(AI),t=IA(MI),n=MA(),i=IA(CI),s=IA($D),a=IC(),o=TC(),l=IA(e=>e.rootProps.className);(0,r.useEffect)(()=>{if(null==e)return mU;var r=(r,l,c)=>{var u;if(t!==c&&e===r)if("index"!==i){if(null!=s){var d;if("function"===typeof i){var h={activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate},p=i(s,h);d=s[p]}else"value"===i&&(d=s.find(e=>String(e.value)===l.payload.label));var{coordinate:f}=l.payload;if(null!=d&&!1!==l.payload.active&&null!=f&&null!=o){var{x:m,y:g}=f,y=Math.min(m,o.x+o.width),x=Math.min(g,o.y+o.height),v={x:"horizontal"===a?d.coordinate:y,y:"horizontal"===a?x:d.coordinate},b=iA({active:l.payload.active,coordinate:v,dataKey:l.payload.dataKey,index:String(d.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox});n(b)}else n(iA({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}))}}else if(o&&null!==l&&void 0!==l&&null!==(u=l.payload)&&void 0!==u&&u.coordinate&&l.payload.sourceViewBox){var w=l.payload.coordinate,{x:_,y:j}=w,k=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(w,dU),{x:N,y:S,width:E,height:A}=l.payload.sourceViewBox,C=pU(pU({},k),{},{x:o.x+(E?(_-N)/E:0)*o.width,y:o.y+(A?(j-S)/A:0)*o.height});n(pU(pU({},l),{},{payload:pU(pU({},l.payload),{},{coordinate:C})}))}else n(l)};return oU.on(lU,r),()=>{oU.off(lU,r)}},[l,n,t,e,i,s,a,o])}function yU(){var e=MA();(0,r.useEffect)(()=>{e(VS())},[e]),gU(),function(){var e=IA(AI),t=IA(MI),n=MA();(0,r.useEffect)(()=>{if(null==e)return mU;var r=(r,i,s)=>{t!==s&&e===r&&n(cA(i))};return oU.on(cU,r),()=>{oU.off(cU,r)}},[n,t,e])}()}function xU(e,t,n,i,s,a){var o=IA(n=>((e,t,n)=>{if(null!=t){var r=cD(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),l=IA(MI),c=IA(AI),u=IA(CI),d=IA(uU),h=null===d||void 0===d?void 0:d.active,p=TC();(0,r.useEffect)(()=>{if(!h&&null!=c&&null!=l){var e=iA({active:a,coordinate:n,dataKey:o,index:s,label:"number"===typeof i?String(i):i,sourceViewBox:p});oU.emit(lU,c,e,l)}},[h,n,o,s,i,l,c,u,a,p])}var vU=(0,r.createContext)(null),bU=(0,r.createContext)(null);function wU(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 _U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wU(Object(n),!0).forEach(function(t){jU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kU(){return kU=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},kU.apply(null,arguments)}var NU=()=>(yU(),null);function SU(e){if("number"===typeof e)return e;if("string"===typeof e){var t=parseFloat(e);
2if(!Number.isNaN(t))return t}return 0}var EU=(0,r.forwardRef)((e,t)=>{var n,i,s=(0,r.useRef)(null),[a,o]=(0,r.useState)({containerWidth:SU(null===(n=e.style)||void 0===n?void 0:n.width),containerHeight:SU(null===(i=e.style)||void 0===i?void 0:i.height)}),l=(0,r.useCallback)((e,t)=>{o(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),c=(0,r.useCallback)(e=>{if("function"===typeof t&&t(e),null!=e){var{width:n,height:r}=e.getBoundingClientRect();l(n,r);var i=new ResizeObserver(e=>{var{width:t,height:n}=e[0].contentRect;l(t,n)});i.observe(e),s.current=i}},[t,l]);return(0,r.useEffect)(()=>()=>{var e=s.current;null!=e&&e.disconnect()},[l]),r.createElement(r.Fragment,null,r.createElement(LC,{width:a.containerWidth,height:a.containerHeight}),r.createElement("div",kU({ref:c},e)))}),AU=(0,r.forwardRef)((e,t)=>{var{width:n,height:i}=e,[s,a]=(0,r.useState)({containerWidth:SU(n),containerHeight:SU(i)}),o=(0,r.useCallback)((e,t)=>{a(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=(0,r.useCallback)(e=>{if("function"===typeof t&&t(e),null!=e){var{width:n,height:r}=e.getBoundingClientRect();o(n,r)}},[t,o]);return r.createElement(r.Fragment,null,r.createElement(LC,{width:s.containerWidth,height:s.containerHeight}),r.createElement("div",kU({ref:l},e)))}),CU=(0,r.forwardRef)((e,t)=>{var{width:n,height:i}=e;return r.createElement(r.Fragment,null,r.createElement(LC,{width:n,height:i}),r.createElement("div",kU({ref:t},e)))}),MU=(0,r.forwardRef)((e,t)=>{var{width:n,height:i}=e;return fk(n)||fk(i)?r.createElement(AU,kU({},e,{ref:t})):r.createElement(CU,kU({},e,{ref:t}))});var TU=(0,r.forwardRef)((e,t)=>{var{children:n,className:i,height:s,onClick:a,onContextMenu:o,onDoubleClick:l,onMouseDown:c,onMouseEnter:u,onMouseLeave:d,onMouseMove:h,onMouseUp:p,onTouchEnd:f,onTouchMove:m,onTouchStart:g,style:y,width:x,responsive:v,dispatchTouchEvents:b=!0}=e,w=(0,r.useRef)(null),_=MA(),[j,k]=(0,r.useState)(null),[N,S]=(0,r.useState)(null),E=function(){var e=MA(),[t,n]=(0,r.useState)(null),i=IA(gC);return(0,r.useEffect)(()=>{if(null!=t){var n=t.getBoundingClientRect().width/t.offsetWidth;Mk(n)&&n!==i&&e(gA(n))}},[t,e,i]),n}(),A=Bk(),C=(null===A||void 0===A?void 0:A.width)>0?A.width:x,M=(null===A||void 0===A?void 0:A.height)>0?A.height:s,T=(0,r.useCallback)(e=>{E(e),"function"===typeof t&&t(e),k(e),S(e),null!=e&&(w.current=e)},[E,t,k,S]),P=(0,r.useCallback)(e=>{_(bB(e)),_(kF({handler:a,reactEvent:e}))},[_,a]),O=(0,r.useCallback)(e=>{_(_B(e)),_(kF({handler:u,reactEvent:e}))},[_,u]),I=(0,r.useCallback)(e=>{_(eA()),_(kF({handler:d,reactEvent:e}))},[_,d]),L=(0,r.useCallback)(e=>{_(_B(e)),_(kF({handler:h,reactEvent:e}))},[_,h]),R=(0,r.useCallback)(()=>{_(_F())},[_]),D=(0,r.useCallback)(e=>{_(wF(e.key))},[_]),B=(0,r.useCallback)(e=>{_(kF({handler:o,reactEvent:e}))},[_,o]),F=(0,r.useCallback)(e=>{_(kF({handler:l,reactEvent:e}))},[_,l]),U=(0,r.useCallback)(e=>{_(kF({handler:c,reactEvent:e}))},[_,c]),z=(0,r.useCallback)(e=>{_(kF({handler:p,reactEvent:e}))},[_,p]),q=(0,r.useCallback)(e=>{_(kF({handler:g,reactEvent:e}))},[_,g]),W=(0,r.useCallback)(e=>{b&&_(AF(e)),_(kF({handler:m,reactEvent:e}))},[_,b,m]),H=(0,r.useCallback)(e=>{_(kF({handler:f,reactEvent:e}))},[_,f]),K=function(e){return!0===e?EU:MU}(v);return r.createElement(vU.Provider,{value:j},r.createElement(bU.Provider,{value:N},r.createElement(K,{width:null!==C&&void 0!==C?C:null===y||void 0===y?void 0:y.width,height:null!==M&&void 0!==M?M:null===y||void 0===y?void 0:y.height,className:ak("recharts-wrapper",i),style:_U({position:"relative",cursor:"default",width:C,height:M},y),onClick:P,onContextMenu:B,onDoubleClick:F,onFocus:R,onKeyDown:D,onMouseDown:U,onMouseEnter:O,onMouseLeave:I,onMouseMove:L,onMouseUp:z,onTouchEnd:H,onTouchMove:W,onTouchStart:q,ref:T},r.createElement(NU,null),n)))}),PU=NA([NC],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),OU=NA([PU,fC,mC],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),IU=(0,r.createContext)(void 0),LU=e=>{var{children:t}=e,[n]=(0,r.useState)("".concat(xk("recharts"),"-clip")),i=IA(OU);if(null==i)return null;var{x:s,y:a,width:o,height:l}=i;return r.createElement(IU.Provider,{value:n},r.createElement("defs",null,r.createElement("clipPath",{id:n},r.createElement("rect",{x:s,y:a,height:l,width:o}))),t)},RU=["width","height","responsive","children","className","style","compact","title","desc"];var DU=(0,r.forwardRef)((e,t)=>{var{width:n,height:i,responsive:s,children:a,className:o,style:l,compact:c,title:u,desc:d}=e,h=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,RU),p=GF(h);return c?r.createElement(r.Fragment,null,r.createElement(LC,{width:n,height:i}),r.createElement(aU,{otherAttributes:p,title:u,desc:d},a)):r.createElement(TU,{className:o,style:l,width:n,height:i,responsive:s,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},r.createElement(aU,{otherAttributes:p,title:u,desc:d,ref:t},r.createElement(LU,null,a)))});function BU(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 FU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UU(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
vendor: 19,385 bytes, line 2
2t%2?BU(Object(n),!0).forEach(function(t){FU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var zU=["layout"];function qU(){return qU=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},qU.apply(null,arguments)}var WU={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1},HU=(0,r.forwardRef)(function(e,t){var n,i=UU(e.categoricalChartProps,WU),{layout:s}=i,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(i,zU),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u}=e,d={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,eventEmitter:void 0};return r.createElement(BF,{preloadedState:{options:d},reduxStoreName:null!==(n=i.id)&&void 0!==n?n:o},r.createElement(FF,{chartData:i.data}),r.createElement(UF,{layout:s,margin:i.margin}),r.createElement(zF,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),r.createElement(qF,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),r.createElement(DU,qU({},a,{ref:t})))}),KU=["item"],VU={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},$U=(0,r.forwardRef)((e,t)=>{var n=UU(e,VU);return r.createElement(HU,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:KU,tooltipPayloadSearcher:WS,categoricalChartProps:n,ref:t})}),YU=e=>e.graphicalItems.polarItems,GU=NA([eL,tL],kL),JU=NA([YU,wL,GU],SL),ZU=NA([JU],TL),QU=NA([ZU,tI],OL),XU=NA([QU,wL,JU],LL),ez=(NA([QU,wL,JU],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>{var r;return{value:iC(e,null!==(r=t.dataKey)&&void 0!==r?r:n.dataKey),errorDomain:[]}})).filter(Boolean):null!=(null===t||void 0===t?void 0:t.dataKey)?e.map(e=>({value:iC(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]}))),()=>{}),tz=NA([QU,wL,JU,JL,eL],QL),nz=NA([wL,$L,YL,ez,tz,ez,OC,eL],mR),rz=NA([wL,OC,QU,XU,SI,eL,nz],xR),iz=NA([rz,wL,wR],jR);NA([wL,rz,iz,eL],NR);function sz(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 az(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sz(Object(n),!0).forEach(function(t){oz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oz(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lz=NA([YU,(e,t)=>t],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),cz=[],uz=(e,t,n)=>0===(null===n||void 0===n?void 0:n.length)?cz:n,dz=NA([tI,lz,uz],(e,t,n)=>{var r,{chartData:i}=e;if(null!=t&&((r=null!=(null===t||void 0===t?void 0:t.data)&&t.data.length>0?t.data:i)&&r.length||null==n||(r=n.map(e=>az(az({},t.presentationProps),e.props))),null!=r))return r}),hz=NA([dz,lz,uz],(e,t,n)=>{if(null!=e&&null!=t)return e.map((e,r)=>{var i,s,a=iC(e,t.nameKey,t.name);return s=null!==n&&void 0!==n&&null!==(i=n[r])&&void 0!==i&&null!==(i=i.props)&&void 0!==i&&i.fill?n[r].props.fill:"object"===typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:pC(a,t.dataKey),color:s,payload:e,type:t.legendType}})}),pz=NA([dz,lz,uz,NC],(e,t,n,r)=>{if(null!=t&&null!=e)return function(e){var t,n,r,{pieSettings:i,displayedData:s,cells:a,offset:o}=e,{cornerRadius:l,startAngle:c,endAngle:u,dataKey:d,nameKey:h,tooltipType:p}=i,f=Math.abs(i.minAngle),m=MK(c,u),g=Math.abs(m),y=s.length<=1?0:null!==(t=i.paddingAngle)&&void 0!==t?t:0,x=s.filter(e=>0!==iC(e,d,0)).length,v=g-x*f-(g>=360?x:x-1)*y,b=s.reduce((e,t)=>{var n=iC(t,d,0);return e+(mk(n)?n:0)},0);b>0&&(n=s.map((e,t)=>{var n,s=iC(e,d,0),u=iC(e,h,t),g=CK(i,o,e),x=(mk(s)?s:0)/b,w=jK(jK({},e),a&&a[t]&&a[t].props),_=(n=t?r.endAngle+hk(m)*y*(0!==s?1:0):c)+hk(m)*((0!==s?f:0)+x*v),j=(n+_)/2,k=(g.innerRadius+g.outerRadius)/2,N=[{name:u,value:s,payload:w,dataKey:d,type:p}],S=GA(g.cx,g.cy,k,j);return r=jK(jK(jK(jK({},i.presentationProps),{},{percent:x,cornerRadius:l,name:u,tooltipPayload:N,midAngle:j,middleRadius:k,tooltipPosition:S},w),g),{},{value:s,startAngle:n,endAngle:_,payload:w,paddingAngle:hk(m)*y})}));return n}({offset:r,pieSettings:t,displayedData:e,cells:n})}),fz=["children","className"];function mz(){return mz=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},mz.apply(null,arguments)}var gz,yz,xz,vz,bz,wz,_z,jz,kz,Nz,Sz,Ez,Az,Cz,Mz=r.forwardRef((e,t)=>{var{children:n,className:i}=e,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,fz),a=ak("recharts-layer",i);return r.createElement("g",mz({className:a},ZF(s),{ref:t}),n)});function Tz(){}function Pz(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Oz(e){this._context=e}function Iz(e){this._context=e}function Lz(e){this._context=e}Oz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Pz(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Pz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Iz.prototype={areaStart:Tz,areaEnd:Tz,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Pz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Lz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Pz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class Rz{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function Dz(e){this._context=e}function Bz(e){this._context=e}function Fz(e){return new Bz(e)}function Uz(e){return e<0?-1:1}function zz(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(Uz(s)+Uz(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function qz(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Wz(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function Hz(e){this._context=e}function Kz(e){this._context=new Vz(e)}function Vz(e){this._context=e}function $z(e){this._context=e}function Yz(e){var t,n,r=e.length-1,i=new Array(r),s=new Array(r),a=new Array(r);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/s[t-1],s[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function Gz(e,t){this._context=e,this._t=t}function Jz(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Dz.prototype={areaStart:Tz,areaEnd:Tz,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Bz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},Hz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wz(this,this._t0,qz(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wz(this,qz(this,n=zz(this,e,t)),n);break;default:Wz(this,this._t0,n=zz(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Kz.prototype=Object.create(Hz.prototype)).point=function(e,t){Hz.prototype.point.call(this,t,e)},Vz.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}},$z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Yz(e),i=Yz(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Gz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const Zz=Math.PI,Qz=2*Zz,Xz=1e-6,eq=Qz-Xz;function tq(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class nq{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?tq:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error("invalid digits: ".concat(e));if(t>15)return tq;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append(gz||(gz=Jz(["M",",",""])),this._x0=this._x1=+e,this._y0=this._y1=+t)}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append(yz||(yz=Jz(["Z"]))))}lineTo(e,t){this._append(xz||(xz=Jz(["L",",",""])),this._x1=+e,this._y1=+t)}quadraticCurveTo(e,t,n,r){this._append(vz||(vz=Jz(["Q",",",",",",",""])),+e,+t,this._x1=+n,this._y1=+r)}bezierCurveTo(e,t,n,r,i,s){this._append(bz||(bz=Jz(["C",",",",",",",",",",",""])),+e,+t,+n,+r,this._x1=+i,this._y1=+s)}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: ".concat(i));let s=this._x1,a=this._y1,o=n-e,l=r-t,c=s-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append(wz||(wz=Jz(["M",",",""])),this._x1=e,this._y1=t);else if(d>Xz)if(Math.abs(u*o-l*c)>Xz&&i){let h=n-s,p=r-a,f=o*o+l*l,m=h*h+p*p,g=Math.sqrt(f),y=Math.sqrt(d),x=i*Math.tan((Zz-Math.acos((f+d-m)/(2*g*y)))/2),v=x/y,b=x/g;Math.abs(v-1)>Xz&&this._append(jz||(jz=Jz(["L",",",""])),e+v*c,t+v*u),this._append(kz||(kz=Jz(["A",",",",0,0,",",",",",""])),i,i,+(u*h>c*p),this._x1=e+b*o,this._y1=t+b*l)}else this._append(_z||(_z=Jz(["L",",",""])),this._x1=e,this._y1=t);else;}arc(e,t,n,r,i,s){if(e=+e,t=+t,s=!!s,(n=+n)<0)throw new Error("negative radius: ".concat(n));let a=n*Math.cos(r),o=n*Math.sin(r),l=e+a,c=t+o,u=1^s,d=s?r-i:i-r;null===this._x1?this._append(Nz||(Nz=Jz(["M",",",""])),l,c):(Math.abs(this._x1-l)>Xz||Math.abs(this._y1-c)>Xz)&&this._append(Sz||(Sz=Jz(["L",",",""])),l,c),n&&(d<0&&(d=d%Qz+Qz),d>eq?this._append(Ez||(Ez=Jz(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,u,e-a,t-o,n,n,u,this._x1=l,this._y1=c):d>Xz&&this._append(Az||(Az=Jz(["A",",",",0,",",",",",",",""])),n,n,+(d>=Zz),u,this._x1=e+n*Math.cos(i),this._y1=t+n*Math.sin(i)))}rect(e,t,n,r){this._append(Cz||(Cz=Jz(["M",",","h","v","h","Z"])),this._x0=this._x1=+e,this._y0=this._y1=+t,n=+n,+r,-n)}toString(){return this._}}function rq(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError("invalid digits: ".concat(n));t=e}return e},()=>new nq(t)}function iq(e){return e[0]}function sq(e){return e[1]}function aq(e,t){var n=UA(!0),r=null,i=Fz,s=null,a=rq(o);function o(o){var l,c,u,d=(o=FA(o)).length,h=!1;for(null==r&&(s=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=o[l],l,o))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(c,l,o),+t(c,l,o));if(u)return s=null,u+""||null}return e="function"===typeof e?e:void 0===e?iq:UA(e),t="function"===typeof t?t:void 0===t?sq:UA(t),o.x=function(t){return arguments.length?(e="function"===typeof t?t:UA(+t),o):e},o.y=function(e){return arguments.length?(t="function"===typeof e?e:UA(+e),o):t},o.defined=function(e){return arguments.length?(n="function"===typeof e?e:UA(!!e),o):n},o.curve=function(e){return arguments.length?(i=e,null!=r&&(s=i(r)),o):i},o.context=function(e){return arguments.length?(null==e?r=s=null:s=i(r=e),o):r},o}function oq(e,t,n){var r=null,i=UA(!0),s=null,a=Fz,o=null,l=rq(c);function c(c){var u,d,h,p,f,m=(c=FA(c)).length,g=!1,y=new Array(m),x=new Array(m);for(null==s&&(o=a(f=l())),u=0;u<=m;++u){if(!(u<m&&i(p=c[u],u,c))===g)if(g=!g)d=u,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),h=u-1;h>=d;--h)o.point(y[h],x[h]);o.lineEnd(),o.areaEnd()}g&&(y[u]=+e(p,u,c),x[u]=+t(p,u,c),o.point(r?+r(p,u,c):y[u],n?+n(p,u,c):x[u]))}if(f)return o=null,f+""||null}function u(){return aq().defined(i).curve(a).context(s)}return e="function"===typeof e?e:void 0===e?iq:UA(+e),t="function"===typeof t?t:UA(void 0===t?0:+t),n="function"===typeof n?n:void 0===n?sq:UA(+n),c.x=function(t){return arguments.length?(e="function"===typeof t?t:UA(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"===typeof t?t:UA(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:UA(+e),c):r},c.y=function(e){return arguments.length?(t="function"===typeof e?e:UA(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"===typeof e?e:UA(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"===typeof e?e:UA(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"===typeof e?e:UA(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=s&&(o=a(s)),c):a},c.context=function(e){return arguments.length?(null==e?s=o=null:o=a(s=e),c):s},c}function lq(){return lq=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},lq.apply(null,arguments)}function cq(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 uq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?cq(Object(n),!0).forEach(function(t){dq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hq={curveBasisClosed:function(e){return new Iz(e)},curveBasisOpen:function(e){return new Lz(e)},curveBasis:function(e){return new Oz(e)},curveBumpX:function(e){return new Rz(e,!0)},curveBumpY:function(e){return new Rz(e,!1)},curveLinearClosed:function(e){return new Dz(e)},curveLinear:Fz,curveMonotoneX:function(e){return new Hz(e)},curveMonotoneY:function(e){return new Kz(e)},curveNatural:function(e){return new $z(e)},curveStep:function(e){return new Gz(e,.5)},curveStepAfter:function(e){return new Gz(e,1)},curveStepBefore:function(e){return new Gz(e,0)}},pq=e=>Mk(e.x)&&Mk(e.y),fq=e=>e.x,mq=e=>e.y,gq=e=>{var t,{type:n="linear",points:r=[],baseLine:i,layout:s,connectNulls:a=!1}=e,o=((e,t)=>{if("function"===typeof e)return e;var n="curve".concat(jk(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?hq[n]||Fz:hq["".concat(n).concat("vertical"===t?"Y":"X")]})(n,s),l=a?r.filter(pq):r;if(Array.isArray(i)){var c=a?i.filter(e=>pq(e)):i,u=l.map((e,t)=>uq(uq({},e),{},{base:c[t]}));return t="vertical"===s?oq().y(mq).x1(fq).x0(e=>e.base.x):oq().x(fq).y1(mq).y0(e=>e.base.y),t.defined(pq).curve(o),t(u)}return(t="vertical"===s&&mk(i)?oq().y(mq).x1(fq).x0(i):mk(i)?oq().x(fq).y1(mq).y0(i):aq().x(fq).y(mq)).defined(pq).curve(o),t(l)},yq=e=>{var{className:t,points:n,path:i,pathRef:s}=e;if((!n||!n.length)&&!i)return null;var a=n&&n.length?gq(e):i;return r.createElement("path",lq({},GF(e),((e,t)=>{if(!e||"function"===typeof e||"boolean"===typeof e)return null;var n=e;if((0,r.isValidElement)(e)&&(n=e.props),"object"!==typeof n&&"function"!==typeof n)return null;var i={};return Object.keys(n).forEach(e=>{KF(e)&&(i[e]=t||(t=>n[e](n,t)))}),i})(e),{className:ak("recharts-curve",t),d:null===a?void 0:a,ref:s}))};function xq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vq(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 bq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vq(Object(n),!0).forEach(function(t){wq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _q=bq({},{cacheSize:2e3,enableCache:!0}),jq=new class{constructor(e){xq(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(_q.cacheSize),kq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Nq="recharts_measurement_span";var Sq=(e,t)=>{try{var n=document.getElementById(Nq);n||((n=document.createElement("span")).setAttribute("id",Nq),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,kq,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(i){return{width:0,height:0}}},Eq=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e||null===e||RF)return{width:0,height:0};if(!_q.enableCache)return Sq(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",s=t.fontStyle||"",a=t.letterSpacing||"",o=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(s,"|").concat(a,"|").concat(o)}(e,t),r=jq.get(n);if(r)return r;var i=Sq(e,t);return jq.set(n,i),i},Aq=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Cq=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Tq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Pq={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},Oq=Object.keys(Pq),Iq="NaN";class Lq{static parse(e){var t,[,n,r]=null!==(t=Tq.exec(e))&&void 0!==t?t:[];return new Lq(parseFloat(n),null!==r&&void 0!==r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,pk(e)&&(this.unit=""),""===t||Mq.test(t)||(this.num=NaN,this.unit=""),Oq.includes(t)&&(this.num=function(e,t){return e*Pq[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new Lq(NaN,""):new Lq(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new Lq(NaN,""):new Lq(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new Lq(NaN,""):new Lq(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new Lq(NaN,""):new Lq(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return pk(this.num)}}function Rq(e){if(e.includes(Iq))return Iq;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,s]=null!==(n=Aq.exec(t))&&void 0!==n?n:[],a=Lq.parse(null!==r&&void 0!==r?r:""),o=Lq.parse(null!==s&&void 0!==s?s:""),l="*"===i?a.multiply(o):a.divide(o);if(l.isNaN())return Iq;t=t.replace(Aq,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,h]=null!==(c=Cq.exec(t))&&void 0!==c?c:[],p=Lq.parse(null!==u&&void 0!==u?u:""),f=Lq.parse(null!==h&&void 0!==h?h:""),m="+"===d?p.add(f):p.subtract(f);if(m.isNaN())return Iq;t=t.replace(Cq,m.toString())}return t}var Dq=/\(([^()]*)\)/;function Bq(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=Dq.exec(n));){var[,r]=t;n=n.replace(Dq,Rq(r))}return n}(t),t=Rq(t)}function Fq(e){var t=function(e){try{return Bq(e)}catch(t){return Iq}}(e.slice(5,-1));return t===Iq?"":t}var Uq=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],zq=["dx","dy","angle","className","breakAll"];function qq(){return qq=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},qq.apply(null,arguments)}function Wq(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Hq=/[ \f\n\r\t\v\u2028\u2029]+/,Kq=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];return _k(t)||(i=n?t.toString().split(""):t.toString().split(Hq)),{wordsWithComputedWidth:i.map(e=>({word:e,width:Eq(e,r).width})),spaceWidth:n?0:Eq("\xa0",r).width}}catch(s){return null}},Vq=e=>[{words:_k(e)?[]:e.toString().split(Hq)}],$q=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:s,maxLines:a}=e;
2if((t||n)&&!RF){var o=Kq({breakAll:s,children:r,style:i});if(!o)return Vq(r);var{wordsWithComputedWidth:l,spaceWidth:c}=o;return((e,t,n,r,i)=>{var{maxLines:s,children:a,style:o,breakAll:l}=e,c=mk(s),u=a,d=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((e,t)=>{var{word:s,width:a}=t,o=e[e.length-1];if(o&&(null==r||i||o.width+a+n<Number(r)))o.words.push(s),o.width+=a+n;else{var l={words:[s],width:a};e.push(l)}return e},[])},h=d(t),p=e=>e.reduce((e,t)=>e.width>t.width?e:t);if(!c||i)return h;if(!(h.length>s||p(h).width>Number(r)))return h;for(var f,m=e=>{var t=u.slice(0,e),n=Kq({breakAll:l,style:o,children:t+"\u2026"}).wordsWithComputedWidth,i=d(n);return[i.length>s||p(i).width>Number(r),i]},g=0,y=u.length-1,x=0;g<=y&&x<=u.length-1;){var v=Math.floor((g+y)/2),b=v-1,[w,_]=m(b),[j]=m(v);if(w||j||(g=v+1),w&&j&&(y=v-1),!w&&j){f=_;break}x++}return f||h})({breakAll:s,children:r,maxLines:a,style:i},l,c,t,n)}return Vq(r)},Yq="#808080",Gq=(0,r.forwardRef)((e,t)=>{var{x:n=0,y:i=0,lineHeight:s="1em",capHeight:a="0.71em",scaleToFit:o=!1,textAnchor:l="start",verticalAnchor:c="end",fill:u=Yq}=e,d=Wq(e,Uq),h=(0,r.useMemo)(()=>$q({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:o,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,o,d.style,d.width]),{dx:p,dy:f,angle:m,className:g,breakAll:y}=d,x=Wq(d,zq);if(!gk(n)||!gk(i)||0===h.length)return null;var v,b=n+(mk(p)?p:0),w=i+(mk(f)?f:0);switch(c){case"start":v=Fq("calc(".concat(a,")"));break;case"middle":v=Fq("calc(".concat((h.length-1)/2," * -").concat(s," + (").concat(a," / 2))"));break;default:v=Fq("calc(".concat(h.length-1," * -").concat(s,")"))}var _=[];if(o){var j=h[0].width,{width:k}=d;_.push("scale(".concat(mk(k)?k/j:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(b,", ").concat(w,")")),_.length&&(x.transform=_.join(" ")),r.createElement("text",qq({},ZF(x),{ref:t,x:b,y:w,className:ak("recharts-text",g),textAnchor:l,fill:u.includes("url")?Yq:u}),h.map((e,t)=>{var n=e.words.join(y?"":" ");return r.createElement("tspan",{x:b,dy:0===t?v:s,key:"".concat(n,"-").concat(t)},n)}))});Gq.displayName="Text";var Jq=e=>null;Jq.displayName="Cell";var Zq=n(2086),Qq=e=>"string"===typeof e?e:e?e.displayName||e.name||"Component":"",Xq=null,eW=null,tW=e=>{if(e===Xq&&Array.isArray(eW))return eW;var t=[];return r.Children.forEach(e,e=>{_k(e)||((0,Zq.isFragment)(e)?t=t.concat(tW(e.props.children)):t.push(e))}),eW=t,Xq=e,t};function nW(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>Qq(e)):[Qq(t)],tW(e).forEach(e=>{var t=dk()(e,"type.displayName")||dk()(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}var rW=n(9397),iW=n.n(rW),sW=n(8801);function aW(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 oW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aW(Object(n),!0).forEach(function(t){lW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
2var cW=(e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","),uW=(e,t)=>Object.keys(t).reduce((n,r)=>oW(oW({},n),{},{[r]:e(r,t[r])}),{});function dW(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 hW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dW(Object(n),!0).forEach(function(t){pW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fW=(e,t,n)=>e+(t-e)*n,mW=e=>{var{from:t,to:n}=e;return t!==n},gW=(e,t,n)=>{var r=uW((t,n)=>{if(mW(n)){var[r,i]=e(n.from,n.to,n.velocity);return hW(hW({},n),{},{from:r,velocity:i})}return n},t);return n<1?uW((e,t)=>mW(t)?hW(hW({},t),{},{velocity:fW(t.velocity,r[e].velocity,n),from:fW(t.from,r[e].from,n)}):t,t):gW(e,r,n-1)};function yW(e,t,n,r,i,s){var a,o=r.reduce((n,r)=>hW(hW({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{a||(a=r);var u=(r-a)/n.dt;o=gW(n,o,u),i(hW(hW(hW({},e),t),uW((e,t)=>t.from,o))),a=r,Object.values(o).filter(mW).length&&(l=s.setTimeout(c))};return()=>(l=s.setTimeout(c),()=>{l()})}const xW=(e,t,n,r,i,s)=>{var a,o,l=(a=e,o=t,[Object.keys(a),Object.keys(o)].reduce((e,t)=>e.filter(e=>t.includes(e))));return!0===n.isStepper?yW(e,t,n,l,i,s):function(e,t,n,r,i,s,a){var o,l=null,c=i.reduce((n,r)=>hW(hW({},n),{},{[r]:[e[r],t[r]]}),{}),u=i=>{o||(o=i);var d=(i-o)/r,h=uW((e,t)=>
2fW(...t,n(d)),c);if(s(hW(hW(hW({},e),t),h)),d<1)l=a.setTimeout(u);else{var p=uW((e,t)=>fW(...t,n(1)),c);s(hW(hW(hW({},e),t),p))}};return()=>(l=a.setTimeout(u),()=>{l()})}(e,t,n,r,l,i,s)};var vW=1e-4,bW=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],wW=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),_W=(e,t)=>n=>{var r=bW(e,t);return wW(r,n)},jW=function(){for(var e,t,n,r,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];if(1===s.length)switch(s[0]){case"linear":[e,n,t,r]=[0,0,1,1];break;case"ease":[e,n,t,r]=[.25,.1,.25,1];break;case"ease-in":[e,n,t,r]=[.42,0,1,1];break;case"ease-out":[e,n,t,r]=[.42,0,.58,1];break;case"ease-in-out":[e,n,t,r]=[0,0,.58,1];break;default:var o=s[0].split("(");"cubic-bezier"===o[0]&&4===o[1].split(")")[0].split(",").length&&([e,n,t,r]=o[1].split(")")[0].split(",").map(e=>parseFloat(e)))}else 4===s.length&&([e,n,t,r]=s);var l,c,u=_W(e,t),d=_W(n,r),h=(l=e,c=t,e=>{var t=[...bW(l,c).map((e,t)=>e*t).slice(1),0];return wW(t,e)}),p=e=>e>1?1:e<0?0:e,f=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=u(n)-t,s=h(n);if(Math.abs(i-t)<vW||s<vW)return d(n);n=p(n-i/s)}return d(n)};return f.isStepper=!1,f},kW=e=>{if("string"===typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return jW(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,i=(e,i,s)=>{var a=s+(-(e-i)*t-s*n)*r/1e3,o=s*r/1e3+e;return Math.abs(o-i)<vW&&Math.abs(a)<vW?[i,0]:[o,a]};return i.isStepper=!0,i.dt=r,i}();default:if("cubic-bezier"===e.split("(")[0])return jW(e)}return"function"===typeof e?e:null};class NW{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=s=>{s-n>=t?e(s):"function"===typeof requestAnimationFrame&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r)}}}function SW(){return function(e){var t=()=>null,n=!1,r=null,i=s=>{if(!n){if(Array.isArray(s)){if(!s.length)return;var a=s,[o,...l]=a;return"number"===typeof o?void(r=e.setTimeout(i.bind(null,l),o)):(i(o),void(r=e.setTimeout(i.bind(null,l))))}"string"===typeof s&&t(s),"object"===typeof s&&t(s),"function"===typeof s&&s()}};return{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}(new NW)}var EW=(0,r.createContext)(SW);var AW={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},CW={t:0},MW={t:1};function TW(e){var t=UU(e,AW),{isActive:n,canBegin:i,duration:s,easing:a,begin:o,onAnimationEnd:l,onAnimationStart:c,children:u}=t,d=function(e,t){var n=(0,r.useContext)(EW);return(0,r.useMemo)(()=>null!==t&&void 0!==t?t:n(e),[e,t,n])}(t.animationId,t.animationManager),[h,p]=(0,r.useState)(n?CW:MW),f=(0,r.useRef)(null);return(0,r.useEffect)(()=>{n||p(MW)},[n]),(0,r.useEffect)(()=>{if(!n||!i)return sW.l;var e=xW(CW,MW,kW(a),s,p,d.getTimeoutController());return d.start([c,o,()=>{f.current=e()},s,l]),()=>{d.stop(),f.current&&f.current(),l()}},[n,i,s,a,o,c,l,d]),u(h.t)}function PW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=(0,r.useRef)(xk(t)),i=(0,r.useRef)(e);return i.current!==e&&(n.current=xk(t),i.current=e),n.current}var OW=["radius"],IW=["radius"];function LW(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 RW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LW(Object(n),!0).forEach(function(t){DW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BW(){return BW=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},BW.apply(null,arguments)}function FW(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var UW=(e,t,n,r,i)=>{var s,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=i[d]>a?a:i[d];s="M".concat(e,",").concat(t+o*u[0]),u[0]>0&&(s+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),s+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(s+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+o*u[1])),s+="L ".concat(e+n,",").concat(t+r-o*u[2]),u[2]>0&&(s+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),s+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(s+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-o*u[3])),s+="Z"}else if(a>0&&i===+i&&i>0){var h=Math.min(a,i);s="M ".concat(e,",").concat(t+o*h,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+l*h,",").concat(t,"\n L ").concat(e+n-l*h,",").concat(t,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+n,",").concat(t+o*h,"\n L ").concat(e+n,",").concat(t+r-o*h,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+n-l*h,",").concat(t+r,"\n L ").concat(e+l*h,",").concat(t+r,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e,",").concat(t+r-o*h," Z")}else s="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return s},zW={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qW=e=>{var t=UU(e,zW),n=(0,r.useRef)(null),[i,s]=(0,r.useState)(-1);(0,r.useEffect)(()=>
2{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&s(e)}catch(t){}},[]);var{x:a,y:o,width:l,height:c,radius:u,className:d}=t,{animationEasing:h,animationDuration:p,animationBegin:f,isAnimationActive:m,isUpdateAnimationActive:g}=t,y=(0,r.useRef)(l),x=(0,r.useRef)(c),v=(0,r.useRef)(a),b=(0,r.useRef)(o),w=PW((0,r.useMemo)(()=>({x:a,y:o,width:l,height:c,radius:u}),[a,o,l,c,u]),"rectangle-");if(a!==+a||o!==+o||l!==+l||c!==+c||0===l||0===c)return null;var _=ak("recharts-rectangle",d);if(!g){var j=ZF(t),{radius:k}=j,N=FW(j,OW);return r.createElement("path",BW({},N,{radius:"number"===typeof u?u:void 0,className:_,d:UW(a,o,l,c,u)}))}var S=y.current,E=x.current,A=v.current,C=b.current,M="0px ".concat(-1===i?1:i,"px"),T="".concat(i,"px 0px"),P=cW(["strokeDasharray"],p,"string"===typeof h?h:void 0);return r.createElement(TW,{animationId:w,key:w,canBegin:i>0,duration:p,easing:h,isActive:g,begin:f},e=>{var i,s=wk(S,l,e),d=wk(E,c,e),h=wk(A,a,e),p=wk(C,o,e);n.current&&(y.current=s,x.current=d,v.current=h,b.current=p),i=m?e>0?{transition:P,strokeDasharray:T}:{strokeDasharray:M}:{strokeDasharray:T};var f=ZF(t),{radius:g}=f,w=FW(f,IW);return r.createElement("path",BW({},w,{radius:"number"===typeof u?u:void 0,className:_,d:UW(h,p,s,d,u),ref:n,style:RW(RW({},i),t.style)}))})};function WW(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 HW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WW(Object(n),!0).forEach(function(t){KW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VW(){return VW=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},VW.apply(null,arguments)}var $W=(e,t,n,r,i)=>{var s,a=n-r;return s="M ".concat(e,",").concat(t),s+="L ".concat(e+n,",").concat(t),s+="L ".concat(e+n-a/2,",").concat(t+i),s+="L ".concat(e+n-a/2-r,",").concat(t+i),s+="L ".concat(e,",").concat(t," Z")},YW={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},GW=e=>{var t=UU(e,YW),{x:n,y:i,upperWidth:s,lowerWidth:a,height:o,className:l}=t,{animationEasing:c,animationDuration:u,animationBegin:d,isUpdateAnimationActive:h}=t,p=(0,r.useRef)(null),[f,m]=(0,r.useState)(-1),g=(0,r.useRef)(s),y=(0,r.useRef)(a),x=(0,r.useRef)(o),v=(0,r.useRef)(n),b=(0,r.useRef)(i),w=PW(e,"trapezoid-");if((0,r.useEffect)(()=>{if(p.current&&p.current.getTotalLength)try{var e=p.current.getTotalLength();e&&m(e)}catch(t){}},[]),n!==+n||i!==+i||s!==+s||a!==+a||o!==+o||0===s&&0===a||0===o)return null;var _=ak("recharts-trapezoid",l);if(!h)return r.createElement("g",null,r.createElement("path",VW({},ZF(t),{className:_,d:$W(n,i,s,a,o)})));var j=g.current,k=y.current,N=x.current,S=v.current,E=b.current,A="0px ".concat(-1===f?1:f,"px"),C="".concat(f,"px 0px"),M=cW(["strokeDasharray"],u,c);return r.createElement(TW,{animationId:w,key:w,canBegin:f>0,duration:u,easing:c,isActive:h,begin:d},e=>{var l=wk(j,s,e),c=wk(k,a,e),u=wk(N,o,e),d=wk(S,n,e),h=wk(E,i,e);p.current&&(g.current=l,y.current=c,x.current=u,v.current=d,b.current=h);var f=e>0?{transition:M,strokeDasharray:C}:{strokeDasharray:A};return r.createElement("path",VW({},ZF(t),{className:_,d:$W(d,h,l,c,u),ref:p,style:HW(HW({},f),t.style)}
vendor: 4,806 bytes, line 2
2))})};function JW(){return JW=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},JW.apply(null,arguments)}var ZW=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:s,isExternal:a,cornerRadius:o,cornerIsExternal:l}=e,c=o*(a?1:-1)+r,u=Math.asin(o/c)/$A,d=l?i:i+s*u,h=l?i-s*u:i;return{center:GA(t,n,c,d),circleTangency:GA(t,n,r,d),lineTangency:GA(t,n,c*Math.cos(u*$A),h),theta:u}},QW=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:s,endAngle:a}=e,o=((e,t)=>hk(t-e)*Math.min(Math.abs(t-e),359.999))(s,a),l=s+o,c=GA(t,n,i,s),u=GA(t,n,i,l),d="M ".concat(c.x,",").concat(c.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(s>l),",\n ").concat(u.x,",").concat(u.y,"\n ");if(r>0){var h=GA(t,n,r,s),p=GA(t,n,r,l);d+="L ".concat(p.x,",").concat(p.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(s<=l),",\n ").concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},XW={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},eH=e=>{var t=UU(e,XW),{cx:n,cy:i,innerRadius:s,outerRadius:a,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:h}=t;if(a<s||u===d)return null;var p,f=ak("recharts-sector",h),m=a-s,g=vk(o,m,0,!0);return p=g>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:s,forceCornerRadius:a,cornerIsExternal:o,startAngle:l,endAngle:c}=e,u=hk(c-l),{circleTangency:d,lineTangency:h,theta:p}=ZW({cx:t,cy:n,radius:i,angle:l,sign:u,cornerRadius:s,cornerIsExternal:o}),{circleTangency:f,lineTangency:m,theta:g}=ZW({cx:t,cy:n,radius:i,angle:c,sign:-u,cornerRadius:s,cornerIsExternal:o}),y=o?Math.abs(l-c):Math.abs(l-c)-p-g;if(y<0)return a?"M ".concat(h.x,",").concat(h.y,"\n a").concat(s,",").concat(s,",0,0,1,").concat(2*s,",0\n a").concat(s,",").concat(s,",0,0,1,").concat(2*-s,",0\n "):QW({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var x="M ".concat(h.x,",").concat(h.y,"\n A").concat(s,",").concat(s,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,"\n A").concat(i,",").concat(i,",0,").concat(+(y>180),",").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(s,",").concat(s,",0,0,").concat(+(u<0),",").concat(m.x,",").concat(m.y,"\n ");if(r>0){var{circleTangency:v,lineTangency:b,theta:w}=ZW({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:s,cornerIsExternal:o}),{circleTangency:_,lineTangency:j,theta:k}=ZW({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:s,cornerIsExternal:o}),N=o?Math.abs(l-c):Math.abs(l-c)-w-k;if(N<0&&0===s)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(j.x,",").concat(j.y,"\n A").concat(s,",").concat(s,",0,0,").concat(+(u<0),",").concat(_.x,",").concat(_.y,"\n A").concat(r,",").concat(r,",0,").concat(+(N>180),",").concat(+(u>0),",").concat(v.x,",").concat(v.y,"\n A").concat(s,",").concat(s,",0,0,").concat(+(u<0),",").concat(b.x,",").concat(b.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x})({cx:n,cy:i,innerRadius:s,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):QW({cx:n,cy:i,innerRadius:s,outerRadius:a,startAngle:u,endAngle:d}),r.createElement("path",JW({},ZF(t),{className:f,d:p}))};Math.abs,Math.atan2;const tH=Math.cos,nH=(Math.max,Math.min,Math.sin),rH=Math.sqrt,iH=Math.PI,sH=2*iH;const aH={draw(e,t){const n=rH(t/iH);e.moveTo(n,0),e.arc(0,0,n,0,sH)}},oH={draw(e,t){const n=rH(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},lH=rH(1/3),cH=2*lH,uH={draw(e,t){const n=rH(t/cH),r=n*lH;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},dH={draw(e,t){const n=rH(t),r=-n/2;e.rect(r,r,n,n)}},hH=nH(iH/10)/nH(7*iH/10),pH=nH(sH/10)*hH,fH=-tH(sH/10)*hH,mH={draw(e,t){const n=rH(.8908130915292852*t),r=pH*n,i=fH*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const t=sH*s/5,a=tH(t),o=nH(t);e.lineTo(o*n,-a*n),e.lineTo(a*r-o*i,o*r+a*i)}e.closePath()}},gH=rH(3),yH={draw(e,t){const n=-rH(t/(3*gH));e.moveTo(0,2*n),e.lineTo(-gH*n,-n),e.lineTo(gH*n,-n),e.closePath()}},xH=-.5,vH=rH(3)/2,bH=1/rH(12),wH=3*(bH/2+1),_H={draw(e,t){const n=rH(t/wH),r=n/2,i=n*bH,s=r,a=n*bH+n,o=-s,l=a;e.moveTo(r,i),e.lineTo(s,a),e.lineTo(o,l),e.lineTo(xH*r-vH*i,vH*r+xH*i),e.lineTo(xH*s-vH*a,vH*s+xH*a),e.lineTo(xH*o-vH*l,vH*o+xH*l),e.lineTo(xH*r+vH*i,xH*i-vH*r),e.lineTo(xH*s+vH*a,xH*a-vH*s),e.lineTo(xH*o+vH*l,xH*l
2-vH*o),e.closePath()}};rH(3),rH(3);var jH=["type","size","sizeType"];function kH(){return kH=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},kH.apply(null,arguments)}function NH(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 SH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NH(Object(n),!0).forEach(function(t){EH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AH={symbolCircle:aH,symbolCross:oH,symbolDiamond:uH,symbolSquare:dH,symbolStar:mH,symbolTriangle:yH,symbolWye:_H},CH=Math.PI/180,MH=e=>{var{type:t="circle",size:n=64,sizeType:i="area"}=e,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,jH),a=SH(SH({},s),{},{type:t,size:n,sizeType:i}),o="circle";"string"===typeof t&&(o=t);var{className:l,cx:c,cy:u}=a,d=ZF(a);return c===+c&&u===+u&&n===+n?r.createElement("path",kH({}
2,d,{className:ak("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(jk(e));return AH[t]||aH})(o),t=function(e,t){let n=null,r=rq(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"===typeof e?e:UA(e||aH),t="function"===typeof t?t:UA(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"===typeof t?t:UA(t),i):e},i.size=function(e){return arguments.length?(t="function"===typeof e?e:UA(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*CH;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(n,i,o)),r=t();if(null!==r)return r})()})):null};MH.registerSymbol=(e,t)=>{AH["symbol".concat(jk(e))]=t};var TH=["option","shapeType","propTransformer","activeClassName","isActive"];function PH(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 OH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PH(Object(n),!0).forEach(function(t){IH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LH(e,t){return OH(OH({},t),e)}function RH(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return r.createElement(qW,n);case"trapezoid":return r.createElement(GW,n);case"sector":return r.createElement(eH,n);case"symbols":if(function(e){return"symbols"===e}(t))return r.createElement(MH,n);break;default:return null}}function DH(e){var t,{option:n,shapeType:i,propTransformer:s=LH,activeClassName:a="recharts-active-shape",isActive:o}=e,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,TH);if((0,r.isValidElement)(n))t=(0,r.cloneElement)(n,OH(OH({},l),function(e){return(0,r.isValidElement)(e)?e.props:e}(n)));else if("function"===typeof n)t=n(l);else if(iW()(n)&&"boolean"!==typeof n){var c=s(n,l);t=r.createElement(RH,{shapeType:i,elementProps:c})}else{var u=l;t=r.createElement(RH,{shapeType:i,elementProps:u})}return o?r.createElement(Mz,{className:a},t):t}function BH(e){var{fn:t,args:n}=e,i=MA(),s=AC();return(0,r.useLayoutEffect)(()=>{if(!s){var e=t(n);return i(GE(e)),()=>{i(JE(e))}}},[t,n,i,s]),null}var FH,UH=()=>{};function zH(e){var{legendPayload:t}=e,n=MA(),i=IA(OC);return(0,r.useLayoutEffect)(()=>"centric"!==i&&"radial"!==i?UH:(n(sF(t)),()=>{n(aF(t))}),[n,i,t]),null}var qH=null!==(FH=i["useId".toString()])&&void 0!==FH?FH:()=>{var[e]=r.useState(()=>xk("uid-"));return e};var WH=(0,r.createContext)(void 0),HH=e=>{var{id:t,type:n,children:i}=e,s=function(e,t){var n=qH();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(n),t);return r.createElement(WH.Provider,{value:s},i(s))};function KH(e){var t=MA();return(0,r.useLayoutEffect)(()=>(t(zB(e)),()=>{t(qB(e))}),[t,e]),null}var VH=n(356),$H=n.n(VH),YH=["labelRef"];function GH(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 JH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?GH(Object(n),!0).forEach(function(t){ZH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QH(){return QH=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},QH.apply(null,arguments)}var XH=(0,r.createContext)(null),eK=()=>{var e=(0,r.useContext)(XH),t=TC();return e||t},tK=(0,r.createContext)(null),nK=()=>{var e=(0,r.useContext)(tK),t=IA(XI);return e||t},rK=e=>null!=e&&"function"===typeof e,iK=(e,t,n,i,s)=>{var a,o,{offset:l,className:c}=e,{cx:u,cy:d,innerRadius:h,outerRadius:p,startAngle:f,endAngle:m,clockWise:g}=s,y=(h+p)/2,x=((e,t)=>hk(t-e)*Math.min(Math.abs(t-e),360))(f,m),v=x>=0?1:-1;switch(t){case"insideStart":a=f+v*l,o=g;break;case"insideEnd":a=m-v*l,o=!g;break;case"end":a=m+v*l,o=g;break;default:throw new Error("Unsupported position ".concat(t))}o=x<=0?o:!o;var b=GA(u,d,y,a),w=GA(u,d,y,a+359*(o?1:-1)),_="M".concat(b.x,",").concat(b.y,"\n A").concat(y,",").concat(y,",0,1,").concat(o?0:1,",\n ").concat(w.x,",").concat(w.y),j=_k(e.id)?xk("recharts-radial-line-"):e.id;return r.createElement("text",QH({},i,{dominantBaseline:"central",className:ak("recharts-radial-bar-label",c)}),r.createElement("defs",null,r.createElement("path",{id:j,d:_})),r.createElement("textPath",{xlinkHref:"#".concat(j)},n))},sK=e=>"cx"in e&&mk(e.cx),aK={offset:5};function oK(e){var t=UU(e,aK),{viewBox:n,position:i,value:s,children:a,content:o,className:l="",textBreakAll:c,labelRef:u}=t,d=nK(),h=eK(),p=n||("center"===i?h:null!==d&&void 0!==d?d:h);if(!p||_k(s)&&_k(a)&&!(0,r.isValidElement)(o)&&"function"!==typeof o)return null;var f,m=JH(JH({},t),{},{viewBox:p});if((0,r.isValidElement)(o)){var{labelRef:g}=m,y=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(m,YH);return(0,r.cloneElement)(o,y)}if("function"===typeof o){if(f=(0,r.createElement)(o,m),(0,r.isValidElement)(f))return f}else f=(e=>{var{value:t,formatter:n}=e,r=_k(e.children)?t:e.children;return"function"===typeof n?n(r):r})(t);var x=sK(p),v=ZF(t);if(x&&("insideStart"===i||"insideEnd"===i||"end"===i))return iK(t,i,f,v,p);var b=x?((e,t,n)=>{var{cx:r,cy:i,innerRadius:s,outerRadius:a,startAngle:o,endAngle:l}=e,c=(o+l)/2;if("outside"===n){var{x:u,y:d}=GA(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var h=(s+a)/2,{x:p,y:f}=GA(r,i,h,c);return{x:p,y:f,textAnchor:"middle",verticalAnchor:"middle"}})(p,t.offset,t.position):((e,t)=>{var n,{parentViewBox:r,offset:i,position:s}=e;null==r||sK(r)||(n=r);var{x:a,y:o,width:l,height:c}=t,u=c>=0?1:-1,d=u*i,h=u>0?"end":"start",p=u>0?"start":"end",f=l>=0?1:-1,m=f*i,g=f>0?"end":"start",y=f>0?"start":"end";if("top"===s)return JH(JH({},{x:a+l/2,y:o-u*i,textAnchor:"middle",verticalAnchor:h}),n?{height:Math.max(o-n.y,0),width:l}:{});if("bottom"===s)return JH(JH({},{x:a+l/2,y:o+c+d,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(o+c),0),width:l}:{});if("left"===s){var x={x:a-m,y:o+c/2,textAnchor:g,verticalAnchor:"middle"};return JH(JH({},x),n?{width:Math.max(x.x-n.x,0),height:c}:{})}if("right"===s){var v={x:a+l+m,y:o+c/2,textAnchor:y,verticalAnchor:"middle"};return JH(JH({},v),n?{width:Math.max(n.x+n.width-v.x,0),height:c}:{})}var b=n?{width:l,height:c}:{};return"insideLeft"===s?JH({x:a+m,y:o+c/2,textAnchor:y,verticalAnchor:"middle"},b):"insideRight"===s?JH({x:a+l-m,y:o+c/2,textAnchor:g,verticalAnchor:"middle"},b):"insideTop"===s?JH({x:a+l/2,y:o+d,textAnchor:"middle",verticalAnchor:p},b):"insideBottom"===s?JH({x:a+l/2,y:o+c-d,textAnchor:"middle",verticalAnchor:h},b):"insideTopLeft"===s?JH({x:a+m,y:o+d,textAnchor:y,verticalAnchor:p},b):"insideTopRight"===s?JH({x:a+l-m,y:o+d,textAnchor:g,verticalAnchor:p},b):"insideBottomLeft"===s?JH({x:a+m,y:o+c-d,textAnchor:y,verticalAnchor:h},b):"insideBottomRight"===s?JH({x:a+l-m,y:o+c-d,textAnchor:g,verticalAnchor:h},b):s&&"object"===typeof s&&(mk(s.x)||fk(s.x))&&(mk(s.y)||fk(s.y))?JH({x:a+vk(s.x,l),y:o+vk(s.y,c),textAnchor:"end",verticalAnchor:"end"},b):JH({x:a+l/2,y:o+c/2,textAnchor:"middle",verticalAnchor:"middle"},b)})(t,p);return r.createElement(Gq,QH({ref:u,className:ak("recharts-label",l)},v,b,{breakAll:c}),f)}oK.displayName="Label";var lK=["valueAccessor"],cK=["dataKey","clockWise","id","textBreakAll"];function uK(){return uK=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},uK.apply(null,arguments)}function dK(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var hK=e=>Array.isArray(e.value)?$H()(e.value):e.value,pK=(0,r.createContext)(void 0),fK=(pK.Provider,(0,r.createContext)(void 0)),mK=fK.Provider;function gK(e){var{valueAccessor:t=hK}=e,n=dK(e,lK),{dataKey:i,clockWise:s,id:a,textBreakAll:o}=n,l=dK(n,cK),c=(0,r.useContext)(pK),u=(0,r.useContext)(fK),d=c||u;return d&&d.length?r.createElement(Mz,{className:"recharts-label-list"},d.map((e,s)=>{var c,u=_k(i)?t(e,s):iC(e&&e.payload,i),d=_k(a)?{}:{id:"".concat(a,"-").concat(s)};return r.createElement(oK,uK({key:"label-".concat(s)},ZF(e),l,d,{fill:null!==(c=n.fill)&&void 0!==c?c:e.fill,parentViewBox:e.parentViewBox,value:u,textBreakAll:o,viewBox:e.viewBox,index:s}))})):null}function yK(e){var{label:t}=e;return t?!0===t?r.createElement(gK,{key:"labelList-implicit"}):r.isValidElement(t)||rK(t)?r.createElement(gK,{key:"labelList-implicit",content:t}):"object"===typeof t?r.createElement(gK,uK({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}gK.displayName="LabelList";var xK=["onMouseEnter","onClick","onMouseLeave"],vK=["id"],bK=["id"];function wK(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _K(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 jK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?_K(Object(n),!0).forEach(function(t){kK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_K(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NK(){return NK=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},NK.apply(null,arguments)}function SK(e){var t=(0,r.useMemo)(()=>nW(e.children,Jq),[e.children]),n=IA(n=>hz(n,e.id,t));return null==n?null:r.createElement(zH,{legendPayload:n})}function EK(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:s,fill:a,name:o,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(e=>e.tooltipPayload),positions:r.map(e=>e.tooltipPosition),settings:{stroke:i,strokeWidth:s,fill:a,dataKey:t,nameKey:n,name:pC(o,t),hide:l,type:c,color:a,unit:""}}}var AK=(e,t)=>e>t?"start":e<t?"end":"middle",CK=(e,t,n)=>{var{top:r,left:i,width:s,height:a}=t,o=JA(s,a),l=i+vk(e.cx,s,s/2),c=r+vk(e.cy,a,a/2),u=vk(e.innerRadius,o,0),d=((e,t,n)=>vk("function"===typeof t?t(e):t,n,.8*n))(n,e.outerRadius,o);return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:e.maxRadius||Math.sqrt(s*s+a*a)/2}},MK=(e,t)=>hk(t-e)*Math.min(Math.abs(t-e),360);function TK(e){var{sectors:t,props:n,showLabels:i}=e,{label:s,labelLine:a,dataKey:o}=n;if(!i||!s||!t)return null;var l=GF(n),c=JF(s),u=JF(a),d="object"===typeof s&&"offsetRadius"in s&&"number"===typeof s.offsetRadius&&s.offsetRadius||20,h=t.map((e,t)=>{var n=(e.startAngle+e.endAngle)/2,i=GA(e.cx,e.cy,e.outerRadius+d,n),h=jK(jK(jK(jK({},l),e),{},{stroke:"none"},c),{},{index:t,textAnchor:AK(i.x,e.cx)},i),p=jK(jK(jK(jK({},l),e),{},{fill:"none",stroke:e.fill},u),{},{index:t,points:[GA(e.cx,e.cy,e.outerRadius,n),i],key:"line"});return r.createElement(Mz,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},a&&((e,t)=>{if(r.isValidElement(e))return r.cloneElement(e,t);if("function"===typeof e)return e(t);var n=ak("recharts-pie-label-line","boolean"!==typeof e?e.className:"");return r.createElement(yq,NK({},t,{type:"linear",className:n}))})(a,p),((e,t,n)=>{if(r.isValidElement(e))return r.cloneElement(e,t);var i=n;if("function"===typeof e&&(i=e(t),r.isValidElement(i)))return i;var s=ak("recharts-pie-label-text",function(e){return e&&"object"===typeof e&&"className"in e&&"string"===typeof e.className?e.className:""}(e));return r.createElement(Gq,NK({},t,{alignmentBaseline:"middle",className:s}),i)})(s,h,iC(e,o)))});return r.createElement(Mz,{className:"recharts-pie-labels"},h)}function PK(e){var{sectors:t,props:n,showLabels:i}=e,{label:s}=n;return"object"===typeof s&&null!=s&&"position"in s?r.createElement(yK,{label:s}):r.createElement(TK,{sectors:t,props:n,showLabels:i})}function OK(e){var{sectors:t,activeShape:n,inactiveShape:i,allOtherPieProps:s}=e,a=IA(QD),{onMouseEnter:o,onClick:l,onMouseLeave:c}=s,u=wK(s,xK),d=((e,t)=>{var n=MA();return(r,i)=>s=>{null===e||void 0===e||e(r,i,s),n(QE({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}})(o,s.dataKey),h=(e=>{var t=MA();return(n,r)=>i=>{null===e||void 0===e||e(n,r,i),t(XE())}})(c),p=((e,t)=>{var n=MA();return(r,i)=>s=>{null===e||void 0===e||e(r,i,s),n(tA({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}})(l,s.dataKey);return null==t||0===t.length?null:r.createElement(r.Fragment,null,t.map((e,o)=>{if(0===(null===e||void 0===e?void 0:e.startAngle)&&0===(null===e||void 0===e?void 0:e.endAngle)&&1!==t.length)return null;var l=n&&String(o)===a,c=l?n:a?i:null,f=jK(jK({},e),{},{stroke:e.stroke,tabIndex:-1,[bC]:o,[wC]:s.dataKey});return r.createElement(Mz,NK({key:"sector-".concat(null===e||void 0===e?void 0:e.startAngle,"-").concat(null===e||void 0===e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(o),tabIndex:-1,
2className:"recharts-pie-sector"},((e,t,n)=>{if(null===e||"object"!==typeof e&&"function"!==typeof e)return null;var r=null;return Object.keys(e).forEach(i=>{var s=e[i];KF(i)&&"function"===typeof s&&(r||(r={}),r[i]=((e,t,n)=>r=>(e(t,n,r),null))(s,t,n))}),r})(u,e,o),{onMouseEnter:d(e,o),onMouseLeave:h(e,o),onClick:p(e,o)}),r.createElement(DH,NK({option:c,isActive:l,shapeType:"sector"},f)))}))}function IK(e){var{showLabels:t,sectors:n,children:i}=e,s=(0,r.useMemo)(()=>t&&n?n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[n,t]);return r.createElement(mK,{value:t?s:void 0},i)}function LK(e){var{props:t,previousSectorsRef:n}=e,{sectors:i,isAnimationActive:s,animationBegin:a,animationDuration:o,animationEasing:l,activeShape:c,inactiveShape:u,onAnimationStart:d,onAnimationEnd:h}=t,p=PW(t,"recharts-pie-"),f=n.current,[m,g]=(0,r.useState)(!1),y=(0,r.useCallback)(()=>{"function"===typeof h&&h(),g(!1)},[h]),x=(0,r.useCallback)(()=>{"function"===typeof d&&d(),g(!0)},[d]);return r.createElement(IK,{showLabels:!m,sectors:i},r.createElement(TW,{animationId:p,begin:a,duration:o,isActive:s,easing:l,onAnimationStart:x,onAnimationEnd:y,key:p},e=>{var s=[],a=i&&i[0],o=null===a||void 0===a?void 0:a.startAngle;return null===i||void 0===i||i.forEach((t,n)=>{var r=f&&f[n],i=n>0?dk()(t,"paddingAngle",0):0;if(r){var a=wk(r.endAngle-r.startAngle,t.endAngle-t.startAngle,e),l=jK(jK({},t),{},{startAngle:o+i,endAngle:o+a+i});s.push(l),o=l.endAngle}else{var{endAngle:c,startAngle:u}=t,d=wk(0,c-u,e),h=jK(jK({},t),{},{startAngle:o+i,endAngle:o+d+i});s.push(h),o=h.endAngle}}),n.current=s,r.createElement(Mz,null,r.createElement(OK,{sectors:s,activeShape:c,inactiveShape:u,allOtherPieProps:t}))}),r.createElement(PK,{showLabels:!m,sectors:i,props:t}),t.children)}var RK={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!RF,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function DK(e){var{id:t}=e,n=wK(e,vK),{hide:i,className:s,rootTabIndex:a}=e,o=(0,r.useMemo)(()=>nW(e.children,Jq),[e.children]),l=IA(e=>pz(e,t,o)),c=(0,r.useRef)(null),u=ak("recharts-pie",s);return i||null==l?(c.current=null,r.createElement(Mz,{tabIndex:a,className:u})):r.createElement(r.Fragment,null,r.createElement(BH,{fn:EK,args:jK(jK({},e),{},{sectors:l})}),r.createElement(Mz,{tabIndex:a,className:u},r.createElement(LK,{props:jK(jK({},n),{},{sectors:l}),previousSectorsRef:c})))}function BK(e){var t=UU(e,RK),{id:n}=t,i=wK(t,bK),s=GF(i);return r.createElement(HH,{id:n,type:"pie"},e=>r.createElement(r.Fragment,null,r.createElement(KH,{type:"pie",id:e,data:i.data,dataKey:i.dataKey,hide:i.hide,angleAxisId:0,radiusAxisId:0,name:i.name,nameKey:i.nameKey,tooltipType:i.tooltipType,legendType:i.legendType,fill:i.fill,cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,paddingAngle:i.paddingAngle,minAngle:i.minAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius,cornerRadius:i.cornerRadius,presentationProps:s,maxRadius:t.maxRadius}),r.createElement(SK,NK({},i,{id:e})),r.createElement(DK,NK({},i,{id:e}))))}function FK(){return FK=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},FK.apply(null,arguments)}function UK(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 zK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UK(Object(n),!0).forEach(function(t){qK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
2function qK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WK(e){return Array.isArray(e)&&gk(e[0])&&gk(e[1])?e.join(" ~ "):e}BK.displayName="Pie";var HK=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:i={},labelStyle:s={},payload:a,formatter:o,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:h,accessibilityLayer:p=!1}=e,f=zK({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),m=zK({margin:0},s),g=!_k(d),y=g?d:"",x=ak("recharts-default-tooltip",c),v=ak("recharts-tooltip-label",u);g&&h&&void 0!==a&&null!==a&&(y=h(d,a));var b=p?{role:"status","aria-live":"assertive"}:{};return r.createElement("div",FK({className:x,style:f},b),r.createElement("p",{className:v,style:m},r.isValidElement(y)?y:"".concat(y)),(()=>{if(a&&a.length){var e=(l?RA()(a,l):a).map((e,n)=>{if("none"===e.type)return null;var s=e.formatter||o||WK,{value:l,name:c}=e,u=l,d=c;if(s){var h=s(l,c,e,n,a);if(Array.isArray(h))[u,d]=h;else{if(null==h)return null;u=h}}var p=zK({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i);return r.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:p},gk(d)?r.createElement("span",{className:"recharts-tooltip-item-name"},d):null,gk(d)?r.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,r.createElement("span",{className:"recharts-tooltip-item-value"},u),r.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return r.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},KK="recharts-tooltip-wrapper",VK={visibility:"hidden"};function $K(e){var{coordinate:t,translateX:n,translateY:r}=e;return ak(KK,{["".concat(KK,"-right")]:mk(n)&&t&&mk(t.x)&&n>=t.x,["".concat(KK,"-left")]:mk(n)&&t&&mk(t.x)&&n<t.x,["".concat(KK,"-bottom")]:mk(r)&&t&&mk(t.y)&&r>=t.y,["".concat(KK,"-top")]:mk(r)&&t&&mk(t.y)&&r<t.y})}function YK(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:s,reverseDirection:a,tooltipDimension:o,viewBox:l,viewBoxDimension:c}=e;if(s&&mk(s[r]))return s[r];var u=n[r]-o-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var h=l[r];return null==h?0:a[r]?u<h?Math.max(d,h):Math.max(u,h):null==c?0:d+o>h+c?Math.max(u,h):Math.max(d,h)}function GK(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 JK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GK(Object(n),!0).forEach(function(t){ZK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class QK extends r.PureComponent{constructor(){super(...arguments),ZK(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),ZK(this,"handleKeyDown",e=>{var t,n,r,i;"Escape"===e.key&&this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(t=null===(n=this.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==t?t:0,y:null!==(r=null===(i=this.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==r?r:0}})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,t;this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}render(){var{active:e,allowEscapeViewBox:t,animationDuration:n,animationEasing:i,children:s,coordinate:a,hasPayload:o,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:h,viewBox:p,wrapperStyle:f,lastBoundingBox:m,innerRef:g,hasPortalFromProps:y}
2=this.props,{cssClasses:x,cssProperties:v}=function(e){var t,n,r,{allowEscapeViewBox:i,coordinate:s,offsetTopLeft:a,position:o,reverseDirection:l,tooltipBox:c,useTranslate3d:u,viewBox:d}=e;return t=c.height>0&&c.width>0&&s?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=YK({allowEscapeViewBox:i,coordinate:s,key:"x",offsetTopLeft:a,position:o,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=YK({allowEscapeViewBox:i,coordinate:s,key:"y",offsetTopLeft:a,position:o,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):VK,{cssProperties:t,cssClasses:$K({translateX:n,translateY:r,coordinate:s})}}({allowEscapeViewBox:t,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:m.height,width:m.width},useTranslate3d:h,viewBox:p}),b=y?{}:JK(JK({transition:l&&e?"transform ".concat(n,"ms ").concat(i):void 0},v),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&o?"visible":"hidden",position:"absolute",top:0,left:0}),w=JK(JK({},b),{},{visibility:!this.state.dismissed&&e&&o?"visible":"hidden"},f);return r.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:x,style:w,ref:g},s)}}var XK=n(4332),eV=n.n(XK);var tV=["x","y","top","left","width","height","className"];function nV(){return nV=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},nV.apply(null,arguments)}function rV(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 iV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sV=(e,t,n,r,i,s)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(s,",").concat(t,"h").concat(n),aV=e=>{var{x:t=0,y:n=0,top:i=0,left:s=0,width:a=0,height:o=0,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,tV),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rV(Object(n),!0).forEach(function(t){iV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:t,y:n,top:i,left:s,width:a,height:o},c);return mk(t)&&mk(n)&&mk(a)&&mk(o)&&mk(i)&&mk(s)?r.createElement("path",nV({},ZF(u),{className:ak("recharts-cross",l),d:sV(t,n,a,o,i,s)})):null};function oV(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:s}=e;return{points:[GA(t,n,r,i),GA(t,n,r,s)],cx:t,cy:n,radius:r,startAngle:i,endAngle:s}}function lV(e,t,n){var r,i,s,a;if("horizontal"===e)s=r=t.x,i=n.top,a=n.top+n.height;
2else if("vertical"===e)a=i=t.y,r=n.left,s=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return oV(t);var{cx:o,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,h=GA(o,l,c,d),p=GA(o,l,u,d);r=h.x,i=h.y,s=p.x,a=p.y}return[{x:r,y:i},{x:s,y:a}]}function cV(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 uV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cV(Object(n),!0).forEach(function(t){dV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hV=()=>{var e=IA(sL),t=IA($D),n=IA(HD);return((e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=RA()(t,e=>e.coordinate),s=1/0,a=1,o=i.length;a<o;a++){var l=i[a],c=i[a-1];s=Math.min((l.coordinate||0)-(c.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0})(uV(uV({},e),{},{scale:n}),t)};function pV(){return pV=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},pV.apply(null,arguments)}function fV(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 mV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fV(Object(n),!0).forEach(function(t){gV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yV(e){var t,n,{coordinate:i,payload:s,index:a,offset:o,tooltipAxisBandSize:l,layout:c,cursor:u,tooltipEventType:d,chartName:h}=e,p=i,f=s,m=a;if(!u||!p||"ScatterChart"!==h&&"axis"!==d)return null;if("ScatterChart"===h)t=p,n=aV;else if("BarChart"===h)t=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(c,p,o,l),n=qW;else if("radial"===c){var{cx:g,cy:y,radius:x,startAngle:v,endAngle:b}=oV(p);t={cx:g,cy:y,startAngle:v,endAngle:b,innerRadius:x,outerRadius:x},n=eH}else t={points:lV(c,p,o)},n=yq;var w="object"===typeof u&&"className"in u?u.className:void 0,_=mV(mV(mV(mV({stroke:"#ccc",pointerEvents:"none"},o),t),JF(u)),{},{payload:f,payloadIndex:m,className:ak("recharts-tooltip-cursor",w)});return(0,r.isValidElement)(u)?(0,r.cloneElement)(u,_):(0,r.createElement)(n,_)}function xV(e){var t=hV(),n=(()=>{var e;return null!==(e=IA(NC))&&void 0!==e?e:PC})(),i=IC(),s=IA(EI);return r.createElement(yV,pV({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:i,tooltipAxisBandSize:t,chart
2Name:s}))}function vV(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 bV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vV(Object(n),!0).forEach(function(t){wV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _V(e){return e.dataKey}var jV=[],kV={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!RF,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function NV(e){var t=UU(e,kV),{active:n,allowEscapeViewBox:i,animationDuration:s,animationEasing:a,content:o,filterNull:l,isAnimationActive:c,offset:u,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:f,wrapperStyle:m,cursor:g,shared:y,trigger:x,defaultIndex:v,portal:b,axisId:w}=t,_=MA(),j="number"===typeof v?String(v):v;(0,r.useEffect)(()=>{_(ZE({shared:y,trigger:x,axisId:w,active:n,defaultIndex:j}))},[_,y,x,w,n,j]);var k=TC(),N=WF(),S=function(e){return IA(t=>XR(t,e))}(y),{activeIndex:E,isActive:A}=IA(e=>yB(e,S,x,j)),C=IA(e=>gB(e,S,x,j)),M=IA(e=>mB(e,S,x,j)),T=IA(e=>fB(e,S,x,j)),P=C,O=(0,r.useContext)(vU),I=null!==n&&void 0!==n?n:A,[L,R]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=(0,r.useState)({height:0,left:0,top:0,width:0}),i=(0,r.useCallback)(e=>{if(null!=e){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>1||Math.abs(i.left-t.left)>1||Math.abs(i.top-t.top)>1||Math.abs(i.width-t.width)>1)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,i]}([P,I]),D="axis"===S?M:void 0;xU(S,x,T,D,E,I);var B=null!==b&&void 0!==b?b:O;if(null==B)return null;var F=null!==P&&void 0!==P?P:jV;I||(F=jV),l&&F.length&&(F=function(e,t,n){return!0===t?eV()(e,n):"function"===typeof t?eV()(e,t):e}(P.filter(e=>null!=e.value&&(!0!==e.hide||t.includeHidden)),d,_V));var U=F.length>0,z=r.createElement(QK,{allowEscapeViewBox:i,animationDuration:s,animationEasing:a,isAnimationActive:c,active:I,coordinate:T,hasPayload:U,offset:u,position:h,reverseDirection:p,useTranslate3d:f,viewBox:k,wrapperStyle:m,lastBoundingBox:L,innerRef:R,hasPortalFromProps:Boolean(b)},function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):"function"===typeof e?r.createElement(e,t):r.createElement(HK,t)}(o,bV(bV({},t),{},{payload:F,label:D,active:I,coordinate:T,accessibilityLayer:N})));return r.createElement(r.Fragment,null,(0,Fa.createPortal)(z,B),I&&r.createElement(xV,{cursor:g,tooltipEventType:S,coordinate:T,payload:P,index:E}))}const SV=["#4a3f8a","#2d6b4f","#8a6d2a","#8a2e2e","#2a5f6b","#6b2d6b","#7a4a1a","#1f4f6b","#5a2d5a","#2d5a2d"],EV=e=>{let{holderDistribution:t,exchangeDistributionWarning:n}=e;const i=t.length<=10?t:[...t.slice(0,9),{name:"Other",value:t.slice(9).reduce((e,t)=>e+t.value,0),walletCount:t.slice(9).reduce((e,t)=>e+t.walletCount,0),holdingsPercentage:t.slice(9).reduce((e,t)=>e+t.holdingsPercentage,0)}],s=e=>{let{active:t,payload:n}=e;if(t&&n&&n.length){const e=n[0].payload;return(0,Lg.jsxs)("div",{className:"bg-crypto-dark border border-gray-600 rounded-lg p-3 shadow-lg",children:[(0,Lg.jsx)("p",{className:"text-white font-medium",children:e.name}),(0,Lg.jsx)("p",{className:"text-gray-300",children:"Wallet Count: ".concat(e.walletCount)}),(0,Lg.jsx)("p",{className:"text-gray-300",children:"Holdings: ".concat(e.holdingsPercentage.toFixed(2),"%")})]})}return null};return(0,Lg.jsx)("section",{className:"mb-8",children:(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-6",children:[(0,Lg.jsx)("h3",{className:"text-lg font-semibold mb-4 text-center",children:"Funding Source Distribution"}),n&&(0,Lg.jsxs)("div",{className:"mb-3 px-3 py-2 bg-yellow-900/30 border border-yellow-700/50 rounded-lg flex items-start gap-2",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-yellow-400 mt-0.5 text-xs"}),(0,Lg.jsx)("span",{className:"text-yellow-300 text-xs",children:n})]}),i.length>0?(0,Lg.jsxs)("div",{className:"flex items-start gap-6 justify-center",children:[(0,Lg.jsx)("div",{className:"flex-shrink-0",style:{width:180,height:180},children:(0,Lg.jsx)(Uk,{width:"100%",height:"100%",children:(0,Lg.jsxs)($U,{children:[(0,Lg.jsx)(BK,{data:i,cx:"50%",cy:"50%",labelLine:!1,outerRadius:80,fill:"#8884d8",dataKey:"value",isAnimationActive:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:s,holdingsPercentage:a}=e;if(a<5)return null;const o=Math.PI/180,l=i+.75*(s-i),c=t+l*Math.cos(-r*o),u=n+l*Math.sin(-r*o);return(0,Lg.jsx)("text",{x:c,y:u,fill:"#e5e5e5",textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,children:"".concat(a.toFixed(0),"%")})},children:i.map((e,t)=>(0,Lg.jsx)(Jq,{fill:SV[t%SV.length],stroke:"#888888",strokeWidth:1},"cell-".concat(t)))}),(0,Lg.jsx)(NV,{content:(0,Lg.jsx)(s,{})})]})})}),(0,Lg.jsx)("div",{className:"pt-1 grid gap-x-4 gap-y-1 items-center",style:{gridTemplateColumns:"auto minmax(0, max-content) max-content"},children:i.map((e,t)=>(0,Lg.jsxs)(r.Fragment,{children:[(0,Lg.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm",style:{backgroundColor:SV[t%SV.length]}}),(0,Lg.jsx)("span",{className:"text-gray-300 text-xs truncate",children:e.name.split(" (")[0]}),(0,Lg.jsxs)("span",{className:"text-white font-medium text-xs text-right tabular-nums",children:[e.holdingsPercentage.toFixed(0),"%"]})]},t))})]}):(0,Lg.jsx)("div",{className:"text-center text-gray-400 py-8",children:"No distribution data available"})]})})},AV=Eg(),CV={OK:"text-green-400",RISKY:"text-yellow-400",DANGEROUS:"text-red-400"},MV={OK:"border-green-500/30 bg-green-500/5",RISKY:"border-yellow-500/30 bg-yellow-500/5",DANGEROUS:"border-red-500/30 bg-red-500/5"};
2function TV(e){return new Date(e).toLocaleString()}function PV(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return n<1?"just now":n<60?"".concat(n,"m ago"):r<24?"".concat(r,"h ago"):"".concat(i,"d ago")}function OV(e){return null==e?"\u2014":"".concat(e.toFixed(1),"%")}const IV=e=>{var t,n;let{chain:i}=e;const{mint:s}=pe(),[a,o]=(0,r.useState)([]),[l,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{s&&(async()=>{c(!0),d(null);try{const e={},t=localStorage.getItem("deepnets_token");t&&(e.Authorization="Bearer ".concat(t));const n=await Ng("".concat(AV,"/api/token-safety-history/").concat(s).concat(i?"?chain=".concat(i):""),{headers:e});if(401===n.status||403===n.status)return void p(!0);if(!n.ok)throw new Error("HTTP ".concat(n.status));const r=await n.json();o(r.history||[])}catch(h$){d(h$ instanceof Error?h$.message:String(h$))}finally{c(!1)}})()},[s,i]);const f=(null===(t=a[0])||void 0===t?void 0:t.tokenName)||(null===s||void 0===s?void 0:s.slice(0,8))||"",m=(null===(n=a[0])||void 0===n?void 0:n.tokenSymbol)||"";return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-6",children:[(0,Lg.jsx)("div",{className:"mb-6",children:(0,Lg.jsxs)(ft,{to:s?Yv(s,i):"/",className:"text-sm text-gray-400 hover:text-crypto-accent transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-arrow-left mr-1"})," Back to ",f," ",m&&"($".concat(m,")")]})}),(0,Lg.jsx)("h1",{className:"text-xl font-bold mb-1",children:"Safety Analysis History"}),(0,Lg.jsxs)("p",{className:"text-sm text-gray-400 mb-6",children:[f," ",m&&(0,Lg.jsxs)("span",{className:"text-gray-500",children:["(",m,")"]}),(0,Lg.jsx)("span",{className:"ml-2 text-gray-600 text-xs font-mono",children:s})]}),l&&(0,Lg.jsx)("div",{className:"space-y-4",children:Array.from({length:3}).map((e,t)=>(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-4 animate-pulse",children:[(0,Lg.jsx)("div",{className:"h-5 w-32 bg-gray-700 rounded mb-3"}),(0,Lg.jsx)("div",{className:"h-4 w-48 bg-gray-700 rounded mb-2"}),(0,Lg.jsx)("div",{className:"h-4 w-64 bg-gray-700 rounded"})]},t))}),h&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("i",{className:"fas fa-lock text-gray-600 text-4xl mb-4 block"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-2",children:"Watcher tier required to view safety history"}),(0,Lg.jsx)(ft,{to:"/tiers",className:"text-crypto-accent hover:underline text-sm",children:"View tiers"})]}),u&&!l&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-red-400 text-4xl mb-4 block"}),(0,Lg.jsx)("p",{className:"text-gray-400",children:u})]}),!l&&!u&&!h&&0===a.length&&(0,Lg.jsxs)("div",{className:"text-center py-16 text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-clipboard-list text-4xl mb-4 block"}),(0,Lg.jsx)("p",{children:"No safety analysis history found for this token."})]}),!l&&!h&&a.length>0&&(0,Lg.jsx)("div",{className:"space-y-4",children:a.map((e,t)=>(0,Lg.jsxs)("div",{className:"border rounded-xl p-4 ".concat(MV[e.overallSafetyLevel]||"border-gray-700 bg-crypto-gray"),children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Lg.jsx)("div",{className:"flex items-center gap-3",children:(0,Lg.jsx)("span",{className:"text-lg font-bold ".concat(CV[e.overallSafetyLevel]||"text-gray-400"),children:e.overallSafetyLevel})}),(0,Lg.jsxs)("div",{className:"text-right",children:[(0,Lg.jsx)("div",{className:"text-sm text-gray-400",children:PV(e.timestamp)}),(0,Lg.jsx)("div",{className:"text-xs text-gray-600",children:TV(e.timestamp)})]})]}),e.criticalRisks.length>0&&(0,Lg.jsx)("div",{className:"mb-2",children:e.criticalRisks.map((e,t)=>(0,Lg.jsxs)("div",{className:"text-sm text-red-400 flex items-start gap-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-circle mt-0.5 text-xs"})," ",e]},t))}),e.warnings.length>0&&(0,Lg.jsx)("div",{className:"mb-2",children:e.warnings.map((e,t)=>(0,Lg.jsxs)("div",{className:"text-sm text-yellow-400/80 flex items-start gap-1.5",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle mt-0.5 text-xs"})," ",e]},t))}),(0,Lg.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 mt-3 text-xs text-gray-400",children:[null!=e.totalHolders&&(0,Lg.jsxs)("span",{children:["Holders: ",(0,Lg.jsx)("span",{className:"text-gray-300",children:e.totalHolders})]}),null!=e.topHolderOwnership&&(0,Lg.jsxs)("span",{children:["Top holder: ",(0,Lg.jsx)("span",{className:"text-gray-300",children:OV(e.topHolderOwnership)})]}),null!=e.topTenOwnership&&(0,Lg.jsxs)("span",{children:["Top 10: ",(0,Lg.jsx)("span",{className:"text-gray-300",children:OV(e.topTenOwnership)})]}),null!=e.ruggerHoldingsPct&&(0,Lg.jsxs)("span",{children:["Ruggers: ",(0,Lg.jsx)("span",{className:e.ruggerHoldingsPct>=10?"text-red-400":e.ruggerHoldingsPct>=5?"text-yellow-400":"text-gray-300",children:OV(e.ruggerHoldingsPct)})]}),null!=e.topNetworkOwnership&&e.topNetworkOwnership>0&&(0,Lg.jsxs)("span",{children:["Network: ",(0,Lg.jsxs)("span",{className:"text-gray-300",children:[OV(e.topNetworkOwnership)," (",e.topNetworkWalletCount," wallets)",e.topNetworkBundlerName&&(0,Lg.jsxs)(Lg.Fragment,{children:[" \u2014 ",(0,Lg.jsx)("span",{className:"text-gray-400 italic",children:e.topNetworkBundlerName})]})]})]}),e.exchangeDistributionTag&&(0,Lg.jsxs)("span",{children:["Exchange dist: ",(0,Lg.jsx)("span",{className:"text-yellow-400/80",children:e.exchangeDistributionTag.replace(/_/g," ")})]}),e.isMintable&&(0,Lg.jsx)("span",{className:"text-red-400",children:"Mintable"}),e.isFreezable&&(0,Lg.jsx)("span",{className:"text-red-400",children:"Freezable"})]}),e.holderDistribution&&e.holderDistribution.length>0&&(0,Lg.jsx)("div",{className:"mt-4",children:(0,Lg.jsx)(EV,{holderDistribution:e.holderDistribution,exchangeDistributionWarning:e.exchangeDistributionWarning})})]},t))})]}),(0,Lg.jsx)(_y,{})]})},LV=()=>(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12",children:[(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-8",children:"Privacy Policy"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-8",children:"Last updated: March 18, 2026"}),(0,Lg.jsxs)("div",{className:"space-y-8 text-gray-300 leading-relaxed",children:[(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"1. Introduction"}),(0,Lg.jsx)("p",{children:'This Privacy Policy describes how deepnets.ai, operated by Percipio LLC ("we", "us", or "our"), collects, uses, and protects information when you use our website and services (the "Service"). We are committed to protecting your privacy and being transparent about what data we collect.'})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"2. Information We Collect"}),(0,Lg.jsx)("h3",{className:"text-lg font-medium text-gray-200 mt-4 mb-2",children:"Blockchain Data"}),(0,Lg.jsx)("p",{children:"We analyze publicly available on-chain data from the Solana blockchain, including wallet addresses, token transactions, holder distributions, and funding relationships. This data is inherently public and accessible to anyone on the blockchain."}),(0,Lg.jsx)("h3",{className:"text-lg font-medium text-gray-200 mt-4 mb-2",children:"Account Information"}),(0,Lg.jsx)("p",{children:"If you create an account, we collect your wallet address for authentication via Solana wallet signature. We do not collect email addresses, names, or other personal information during account creation."}),(0,Lg.jsx)("h3",{className:"text-lg font-medium text-gray-200 mt-4 mb-2",children:"Usage Data"}),(0,Lg.jsx)("p",{children:"We collect anonymized usage data including page views, API requests, and general traffic patterns to understand how the Service is used and to improve it. This data is not linked to individual users."}),(0,Lg.jsx)("h3",{className:"text-lg font-medium text-gray-200 mt-4 mb-2",children:"API Keys"}),(0,Lg.jsx)("p",{children:"If you use our public API, we issue and store API keys associated with your account. API usage (request counts, endpoints accessed) is logged for rate limiting and abuse prevention."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"3. Bot Protection"}),(0,Lg.jsxs)("p",{children:["We use"," ",(0,Lg.jsx)("a",{href:"https://www.cloudflare.com/products/turnstile/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"Cloudflare Turnstile"})," ","to protect our services from automated abuse. Turnstile may collect interaction data, browser characteristics, and cookies to distinguish humans from bots. This data is processed by Cloudflare in accordance with their"," ",(0,Lg.jsx)("a",{href:"https://www.cloudflare.com/privacypolicy/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"Privacy Policy"}),"."]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"4. Analytics"}),(0,Lg.jsx)("p",{children:"We may use privacy-focused analytics services to understand traffic patterns and usage. These services do not use cookies for tracking and do not collect personally identifiable information."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"5. Cookies"}),(0,Lg.jsx)("p",{children:"We use minimal cookies necessary for the operation of the Service, including session tokens for authenticated users. We do not use advertising or third-party tracking cookies. Cloudflare Turnstile may set cookies as part of its bot detection functionality."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"6. Data Sharing"}),(0,Lg.jsx)("p",{children:"We do not sell, trade, or rent your personal information to third parties. We may share data with:"}),(0,Lg.jsxs)("ul",{className:"list-disc list-inside mt-2 space-y-1 text-gray-400",children:[(0,Lg.jsx)("li",{children:"Cloudflare \u2014 for bot protection and content delivery"}
2),(0,Lg.jsx)("li",{children:"Infrastructure providers \u2014 for hosting and service delivery"}),(0,Lg.jsx)("li",{children:"Law enforcement \u2014 when required by law or to protect our rights"})]})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"7. Data Retention"}),(0,Lg.jsx)("p",{children:"Usage logs are retained for a limited period for operational purposes and then deleted. Account data is retained as long as your account is active. Blockchain data analysis results are retained to provide the Service."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"8. Security"}),(0,Lg.jsx)("p",{children:"We implement reasonable security measures to protect information, including encrypted connections (HTTPS), signed session tokens, and rate limiting. However, no method of transmission over the internet is 100% secure."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"9. Your Rights"}),(0,Lg.jsx)("p",{children:"You may request deletion of your account and associated data by contacting us. Since the Service primarily analyzes publicly available blockchain data, we cannot delete on-chain data that exists on the Solana blockchain."})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"10. Changes to This Policy"}),(0,Lg.jsx)("p",{children:'We may update this Privacy Policy from time to time. Changes will be reflected by updating the "Last updated" date at the top of this page. Your continued use of the Service after changes constitutes acceptance of the updated policy.'})]}),(0,Lg.jsxs)("section",{children:[(0,Lg.jsx)("h2",{className:"text-xl font-semibold text-white mb-3",children:"11. Contact"}),(0,Lg.jsxs)("p",{children:["If you have questions about this Privacy Policy, please reach out via our"," ",(0,Lg.jsx)("a",{href:"https://x.com/i/chat/group_join/g2050256478343213064/QYTP6iN6Q6",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"XChat group"})," ","or contact us at"," ",(0,Lg.jsx)("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300",children:"[email protected]"}),"."]})]})]}),(0,Lg.jsx)("div",{className:"mt-12 pt-8 border-t border-gray-800",children:(0,Lg.jsx)(ft,{to:"/terms",className:"text-blue-400 hover:text-blue-300",children:"Terms of Service \u2192"})})]}),(0,Lg.jsx)(_y,{})]}),RV=(0,r.lazy)(()=>Promise.all([n.e(185),n.e(275)]).then(n.bind(n,6275))),DV=e=>{let{chain:t}=e;const{mint:n}=pe(),i=he(),[s,a]=(0,r.useState)(null),[o,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(!n)return;let e=!1;return(async()=>{try{u(!0),l(null);const r=await Ng("".concat(Eg(),"/api/token/").concat(n,"/holder-graph").concat(t?"?chain=".concat(t):""));if(!r.ok)throw new Error("HTTP ".concat(r.status));const i=await r.json();e||a(i)}catch(h$){e||l(h$ instanceof Error?h$.message:String(h$))}finally{e||u(!1)}})(),()=>{e=!0}},[n,t]);const d=(0,r.useMemo)(()=>e=>{const n="holder"===e.type?e.walletAddress:"network"===e.type?e.address:null;n&&i("holder"===e.type?Gv(n,t):Jv(n,t))},[i,t]);return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 py-6 flex flex-col",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsxs)("h1",{className:"text-2xl font-bold flex items-baseline gap-3",children:[null!==s&&void 0!==s&&s.symbol?(0,Lg.jsxs)("span",{children:["$",s.symbol]}):(0,Lg.jsx)("span",{className:"text-gray-500",children:"Loading\u2026"}),(0,Lg.jsx)("span",{className:"text-base text-gray-400 font-normal",children:"Holder network"})]}),s&&(0,Lg.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["Showing top ",s.counts.holdersShown.toLocaleString(),null!=s.counts.holdersTotal&&(0,Lg.jsxs)(Lg.Fragment,{children:[" of ",(0,Lg.jsx)("span",{className:"text-gray-300",children:s.counts.holdersTotal.toLocaleStr
2ing()})," holders"]})," ","(researched ",s.counts.holdersResearched.toLocaleString(),") \xb7"," ",s.counts.networks," funding networks \xb7"," ",s.counts.edges," edges"]})]}),n&&(0,Lg.jsx)(ft,{to:Yv(n,t),className:"text-sm text-crypto-accent hover:text-crypto-accent/80 transition-colors",children:"\u2190 Back to token"})]}),(0,Lg.jsxs)("div",{className:"flex-1 min-h-[600px] bg-black/40 border border-gray-800 rounded-xl overflow-hidden relative",children:[c&&(0,Lg.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400 text-sm",children:[(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin mr-2"})," Loading graph\u2026"]}),o&&!c&&(0,Lg.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center text-red-400 text-sm",children:["Failed to load graph: ",o]}),s&&!c&&!o&&(0,Lg.jsx)(r.Suspense,{fallback:(0,Lg.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400 text-sm",children:[(0,Lg.jsx)("i",{className:"fas fa-spinner fa-spin mr-2"})," Loading graph engine\u2026"]}),children:(0,Lg.jsx)(RV,{data:s,onNodeClick:d})})]}),s&&(0,Lg.jsxs)("div",{className:"mt-4 flex flex-wrap gap-4 text-xs text-gray-500",children:[(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-white mr-1.5 align-middle"}),"token"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full mr-1.5 align-middle",style:{background:"rgb(55,85,190)"}}),"funding network"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-red-400 mr-1.5 align-middle"}),"risky network"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-blue-400 mr-1.5 align-middle"}),"holder"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-green-400 mr-1.5 align-middle"}),"locked"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-yellow-400 mr-1.5 align-middle"}),"staked"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-red-400 mr-1.5 align-middle"}),"risky holder (rugger-tagged or \u226510% of supply)"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-pink-400 mr-1.5 align-middle"}),"KOL (GMGN)"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-teal-400 mr-1.5 align-middle"}),"smart money (GMGN)"]}),(0,Lg.jsxs)("span",{children:[(0,Lg.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-orange-400 mr-1.5 align-middle"}),"FOMO trader"]}),(0,Lg.jsx)("span",{className:"ml-auto text-gray-600",children:"Click a holder or network to drill in."})]})]}),(0,Lg.jsx)(_y,{})]})},BV=e=>{let{chain:t}=e;const{mint:n}=pe(),{user:i,isAuthenticated:s,isLoading:a}=Bg(),[o,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(a)return;if(!s||!n)return void l(!0);let e=!1;return(async()=>{try{const t=await Ng("".concat(Eg(),"/api/research-unlock/").concat(n));if(e)return;if(t.ok){const e=await t.json();u(!!e.unlocked)}}finally{e||l(!0)}})(),()=>{e=!0}},[a,s,n]),a||s&&!o?(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,Lg.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-crypto-accent border-t-transparent rounded-full"})}),(0,Lg.jsx)(_y,{})]}):$g(null===i||void 0===i?void 0:i.tier)||c?(0,Lg.jsx)(DV,{chain:t}):(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("main",{className:"flex-1",children:(0,Lg.jsx)(Hw,{required:"watcher",feature:"the holder graph",mint:n,onUnlock:()=>u(!0)})}),(0,Lg.jsx)(_y,{})]})},FV=e=>{let{children:t}=e;return(0,Lg.jsx)("pre",{className:"bg-crypto-dark border border-gray-800 rounded-lg p-4 overflow-x-auto text-sm font-mono text-gray-200",children:(0,Lg.jsx)("code",{children:t})})},UV=()=>(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsxs)(jn,{children:[(0,Lg.jsx)("title",{children:"API Docs \u2014 Deepnets.ai"}),(0,Lg.jsx)("meta",{name:"description",content:"Deepnets public API at api.deepnets.ai \u2014 authenticate with an API key, or pay per
2call in USDC via x402. Either works on the same base URL."})]}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12 w-full",children:[(0,Lg.jsx)("h1",{className:"text-3xl font-bold mb-3",children:"API Documentation"}),(0,Lg.jsx)("p",{className:"text-gray-400 mb-6",children:"One base URL, two authentication methods. Use whichever fits \u2014 your choice is per-request, not account-wide."}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray/40 border border-crypto-accent/30 rounded-lg px-6 py-5 mb-8",children:[(0,Lg.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-gray-500 mb-1",children:"Base URL"}),(0,Lg.jsx)("div",{className:"font-mono text-xl md:text-2xl text-crypto-accent font-semibold break-all",children:"https://api.deepnets.ai"})]}),(0,Lg.jsxs)("div",{className:"grid md:grid-cols-2 gap-5 mb-10",children:[(0,Lg.jsxs)("div",{className:"bg-crypto-gray/40 border border-gray-800 rounded-lg p-6 flex flex-col",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wider text-gray-500 mb-3",children:[(0,Lg.jsx)("span",{children:"\ud83d\udd11"}),(0,Lg.jsx)("span",{children:"Option A \u2014 API key"})]}),(0,Lg.jsxs)("div",{className:"font-semibold text-white mb-2",children:["Send ",(0,Lg.jsx)("code",{className:"font-mono text-crypto-accent",children:"x-api-key"})]}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-4 flex-1",children:"Sign in, generate a key, include it on every request. Reads are included with your key; requests that trigger fresh research cost 1 credit."}),(0,Lg.jsx)(ft,{to:"/api-keys",className:"inline-block text-crypto-accent hover:text-white text-sm font-medium",children:"Manage API keys \u2192"})]}),(0,Lg.jsxs)("div",{className:"bg-crypto-gray/40 border border-gray-800 rounded-lg p-6 flex flex-col",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wider text-gray-500 mb-3",children:[(0,Lg.jsx)("span",{children:"\ud83d\udcb8"}),(0,Lg.jsx)("span",{children:"Option B \u2014 Pay per call (x402)"})]}),(0,Lg.jsxs)("div",{className:"font-semibold text-white mb-2",children:["Send ",(0,Lg.jsx)("code",{className:"font-mono text-crypto-accent",children:"X-PAYMENT"})]}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-4 flex-1",children:["No account. Pay each call in USDC on Solana via the"," ",(0,Lg.jsx)("a",{href:"https://x402.org",target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:text-white",children:"x402 protocol"}),". The Coinbase-hosted facilitator sponsors SOL gas \u2014 USDC is all you need."]}),(0,Lg.jsx)("a",{href:"https://x402.org",target:"_blank",rel:"noopener noreferrer",className:"inline-block text-crypto-accent hover:text-white text-sm font-medium",children:"About x402 \u2192"})]})]}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-3",children:"How the server decides"}),(0,Lg.jsx)("div",{className:"bg-crypto-gray/40 border border-gray-800 rounded-lg overflow-hidden mb-10",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark text-gray-400 uppercase text-xs",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Your request includes\u2026"}),(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Treated as"})]})}),(0,Lg.jsxs)("tbody",{className:"divide-y divide-gray-800",children:[(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-xs text-gray-300",children:"x-api-key"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"API-key flow (x402 is skipped)"})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-xs text-gray-300",children:"X-PAYMENT"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"x402 flow \u2014 facilitator verifies + settles, handler runs"})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-xs text-gray-300",children:"Both"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"API-key takes precedence; no payment is charged"})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-300",children:"Neither, priced endpoint"}),(0,Lg.jsxs)("td",{className:"px-5 py-3 text-gray-400",children:[(0,Lg.jsx)("code",{className:"font-mono text-xs",children:"402 Payment Required"})," with a ",(0,Lg.jsx)("code",{className:"font-mono text-xs",children:"PAYMENT-REQUIRED"})," header"]})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-300",children:"Neither, unpriced endpoint"}),(0,Lg.jsxs)("td",{className:"px-5 py-3 text-gray-400",children:[(0,Lg.jsx)("code",{className:"font-mono text-xs",children:"401"})," \u2014 API key required (x402 doesn't cover these)"]})]})]})]})}),(0,Lg.jsxs)("div",{className:"bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg p-5 mb-10 flex items-center justify-between gap-4",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"font-semibold text-white mb-1",children:"Full endpoint reference"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Schemas, parameters, response shapes, and every route \u2014 hosted on the API."})]}),(0,Lg.jsx)("a",{href:"https://api.deepnets.ai/docs",target:"_blank",rel:"noopener noreferrer",className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-5 py-2.5 rounded-lg font-medium whitespace-nowrap",children:"Open full docs \u2192"})]}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-3",children:"x402 Pricing"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-4",children:["Per-call USDC pricing on Solana mainnet. Payments go to the deepnets treasury"," ",(0,Lg.jsx)("span",{className:"font-mono text-xs text-gray-300 break-all",children:"Bn7sLNmcL9ru5kt9gNwVn8e8Sx912dBTxiUBNiwjbiY8"}),"."]}),(0,Lg.jsx)("div",{className:"bg-crypto-gray/40 border border-gray-800 rounded-lg overflow-hidden mb-10",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark text-gray-400 uppercase text-xs",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Tier"}),(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Price"}),(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Endpoints"})]})}),(0,Lg.jsxs)("tbody",{className:"divide-y divide-gray-800",children:[(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-medium text-white",children:"Basic"}),(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-gray-200",children:"$0.01"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"token-safety, watchlist, trending, flagged-tokens, social-research, streamflow-locks, tibane-staking, token-safety-history, token stats + holder-graph, wallet-details, network-details"})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-medium text-white",children:"Holder analysis"}),(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-gray-200",children:"$0.15"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"/api/token-details?mint=\u2026, /api/holder-analysis?mint=\u2026"})]})]})]})}),(0,Lg.jsxs)("p",{className:"text-gray-500 text-xs mb-10",children:["Some endpoints (e.g. ",(0,Lg.jsx)("code",{className:"font-mono",children:"POST /api/request-token-safety-analysis"}),") only accept API keys \u2014 they trigger multi-second research jobs that don't fit the x402 in-band settlement model. Unpriced endpoints always require an API key."]}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-3",children:"Examples"}),(0,Lg.jsxs)("div",{className:"mb-6",children:[(0,Lg.jsx)("div",{className:"text-gray-400 text-sm mb-2",children:"API key:"}),(0,Lg.jsx)(FV,{children:"curl -H \"x-api-key: YOUR_KEY\" \\\n 'https://api.deepnets.ai/api/token-safety?mint=<MINT>'"})]}),(0,Lg.jsxs)("div",{className:"mb-6",children:[(0,Lg.jsxs)("div",{className:"text-gray-400 text-sm mb-2",children:["EVM tokens and wallets \u2014 pass the 0x address plus ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"chain"})," ","(",(0,Lg.jsx)("code",{className:"text-gray-300",children:"robinhood"}),", ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"base"}),","," ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"ethereum"}),", ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"bsc"}),","," ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"arc"}
2),") to token-safety, token-safety-history, holder-analysis, holder-graph and wallet-details. Omit ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"chain"})," for Solana."]}),(0,Lg.jsx)(FV,{children:"curl -H \"x-api-key: YOUR_KEY\" 'https://api.deepnets.ai/api/token-safety?mint=0x532f27101965dd16442e59d40670faf5ebb142e4&chain=base'"})]}),(0,Lg.jsxs)("div",{className:"mb-10",children:[(0,Lg.jsxs)("div",{className:"text-gray-400 text-sm mb-2",children:["x402 \u2014 first request returns ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"402 Payment Required"})," with a"," ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"PAYMENT-REQUIRED"})," header. Any x402-capable client signs a USDC transfer and retries with ",(0,Lg.jsx)("code",{className:"text-gray-300",children:"X-PAYMENT"}),":"]}),(0,Lg.jsx)(FV,{children:"# Inspect the 402:\ncurl -i 'https://api.deepnets.ai/api/token-safety?mint=<MINT>'\n\n# Or from Node \u2014 uses @x402/core/client + @solana/kit to handle\n# the 402 \u2192 sign \u2192 retry dance automatically."})]}),(0,Lg.jsxs)("div",{className:"text-center text-gray-500 text-sm pt-4 border-t border-gray-800",children:["Questions?"," ",(0,Lg.jsx)("a",{href:"mailto:[email protected]",className:"text-crypto-accent hover:text-white",children:"[email protected]"})]})]}),(0,Lg.jsx)(_y,{})]}),zV="https://agentcash.dev",qV=e=>{let{children:t}=e;return(0,Lg.jsx)("pre",{className:"bg-crypto-dark border border-gray-800 rounded-lg p-4 overflow-x-auto text-sm font-mono text-gray-200",children:(0,Lg.jsx)("code",{children:t})})},WV=e=>{let{icon:t,color:n,title:r,children:i}=e;return(0,Lg.jsxs)("div",{className:"bg-crypto-gray/40 border border-gray-800 rounded-lg p-5",children:[(0,Lg.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-lg mb-3 ".concat(n),children:(0,Lg.jsx)("i",{className:"fas ".concat(t," text-sm")})}),(0,Lg.jsx)("div",{className:"font-semibold text-white mb-1",children:r}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:i})]})},HV=()=>(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white flex flex-col",children:[(0,Lg.jsxs)(jn,{children:[(0,Lg.jsx)("title",{children:"For Agents \u2014 Deepnets.ai"}),(0,Lg.jsx)("meta",{name:"description",content:"Deepnets.ai for AI agents: pay-per-call Solana token safety at $0.01, no accounts, powered by x402 and Coinbase's facilitator. Plug into Claude, Codex, or any x402-capable agent."})]}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"flex-1 max-w-4xl mx-auto px-6 py-12 w-full",children:[(0,Lg.jsxs)("div",{className:"mb-10",children:[(0,Lg.jsxs)("div",{className:"inline-flex items-center gap-2 px-2.5 py-1 rounded-md text-xs font-semibold bg-crypto-accent/10 border border-crypto-accent/30 text-crypto-accent mb-4",children:[(0,Lg.jsx)("i",{className:"fas fa-bolt text-[10px]"}),"NEW \u2014 x402 PAYMENTS LIVE"]}),(0,Lg.jsx)("h1",{className:"text-3xl md:text-4xl font-bold mb-3",children:"Deepnets for AI Agents"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-lg leading-relaxed",children:["Stop your agents from trading rugs. Pay ",(0,Lg.jsx)("span",{className:"text-white font-medium",children:"$0.01"})," per token-safety check, settled on-chain in a single call. No signup, no API keys, no credit top-ups \u2014 just USDC on Solana via the"," ",(0,Lg.jsx)("a",{href:"https://x402.org",target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:text-white",children:"x402 protocol"}),"."]})]}),(0,Lg.jsxs)("div",{className:"bg-gradient-to-br from-crypto-accent/15 via-crypto-gray/40 to-crypto-gray/40 border border-crypto-accent/40 rounded-xl p-6 mb-10",children:[(0,Lg.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4 flex-wrap",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"text-xs uppercase tracking-wider text-gray-400 mb-1",children:"30-second setup"}),(0,Lg.jsx)("h2",{className:"text-xl font-bold text-white",children:"Add Deepnets to your agent with AgentCash"})]}),(0,Lg.jsx)("a",{href:zV,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-crypto-accent hover:text-white font-medium whitespace-nowrap",children:"agentcash.dev \u2192"})]}),(0,Lg.jsxs)("p",{className:"text-gray-300 text-sm mb-4",children:[(0,Lg.jsx)("a",{href:zV,target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:text-white",children:"AgentCash"}
2)," ","is the simplest way to wire an x402-paid API into Claude, Codex, or any agent runtime \u2014 one balance, every API on the internet. They're even"," ",(0,Lg.jsx)("span",{className:"text-white font-medium",children:"funding new sign-ups with starter cash"}),", so you can try Deepnets without spending anything of your own."]}),(0,Lg.jsx)(qV,{children:"npx agentcash add https://api.deepnets.ai"}),(0,Lg.jsx)("div",{className:"text-xs text-gray-500 mt-3",children:"That's it. Your agent now knows how to call Deepnets and the payments settle automatically from your AgentCash balance."})]}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Why agents like this"}),(0,Lg.jsxs)("div",{className:"grid md:grid-cols-3 gap-4 mb-10",children:[(0,Lg.jsxs)(WV,{icon:"fa-shield-halved",color:"bg-green-500/15 text-green-300",title:"Pre-flight rug detection",children:["Before your trading bot buys, hit ",(0,Lg.jsx)("code",{className:"font-mono text-xs",children:"/api/token-safety?mint=\u2026"}),". 1\xa2 to skip a DANGEROUS or RISKY token saves a lot more than 1\xa2."]}),(0,Lg.jsx)(WV,{icon:"fa-layer-group",color:"bg-blue-500/15 text-blue-300",title:"Wallet-network checks",children:"Pull the funding graph behind a token's holders. Insider clusters, sybil wallets, and exchange-funded bundles, all as structured JSON."}),(0,Lg.jsxs)(WV,{icon:"fa-list-check",color:"bg-purple-500/15 text-purple-300",title:"Never waste cycles",children:["Poll the curated ",(0,Lg.jsx)("code",{className:"font-mono text-xs",children:"/api/watchlist"})," so your agent only looks at high-volume tokens that already passed a safety screen."]})]}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-3",children:"Pricing"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm mb-4",children:"USDC on Solana mainnet. Payments go to the deepnets treasury. The facilitator (Coinbase CDP) sponsors SOL gas, so a USDC balance is all you need."}),(0,Lg.jsx)("div",{className:"bg-crypto-gray/40 border border-gray-800 rounded-lg overflow-hidden mb-10",children:(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"bg-crypto-dark text-gray-400 uppercase text-xs",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Tier"}),(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Price"}),(0,Lg.jsx)("th",{className:"text-left px-5 py-3",children:"Endpoints"})]})}),(0,Lg.jsxs)("tbody",{className:"divide-y divide-gray-800",children:[(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-medium text-white whitespace-nowrap",children:"Basic read"}),(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-gray-200",children:"$0.01"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"token-safety, watchlist, trending, flagged-tokens, social-research, streamflow-locks, tibane-staking, token-safety-history, token stats + holder-graph, wallet-details, network-details"})]}),(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("td",{className:"px-5 py-3 font-medium text-white whitespace-nowrap",children:"Holder analysis"}),(0,Lg.jsx)("td",{className:"px-5 py-3 font-mono text-gray-200",children:"$0.15"}),(0,Lg.jsx)("td",{className:"px-5 py-3 text-gray-400",children:"/api/token-details?mint=\u2026, /api/holder-analysis?mint=\u2026 \u2014 full holder + network breakdown"})]})]})]})}),(0,Lg.jsx)("h2",{className:"text-xl font-semibold mb-3",children:"Prefer a raw x402 client?"}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mb-4",children:["If your agent already speaks x402, point it at"," ",(0,Lg.jsx)("code",{className:"font-mono text-crypto-accent",children:"https://api.deepnets.ai"}),". The first unpaid request returns ",(0,Lg.jsx)("code",{className:"font-mono text-xs text-gray-300",children:"402 Payment Required"})," with a ",(0,Lg.jsx)("code",{className:"font-mono text-xs text-gray-300",children:"PAYMENT-REQUIRED"})," header; your client signs a USDC transfer and retries with ",(0,Lg.jsx)("code",{className:"font-mono text-xs text-gray-300",children:"X-PAYMENT"}),"."]}),(0,Lg.jsx)(qV,{children:"# Inspect the 402:\ncurl -i 'https://api.deepnets.ai/api/token-safety?mint=<MINT>'\n\n# From Node \u2014 @x402/core/client + @solana/kit handle the\n# 402 \u2192 sign \u2192 retry dance automatically."}),(0,Lg.jsxs)("div",{className:"bg-crypto-accent/10 border border-crypto-accent/30 rounded-lg p-5 mt-10 flex items-center justify-between gap-4 flex-wrap",children:[(0,Lg.jsxs)("div",{children:[(0,Lg.jsx)("div",{className:"font-semibold text-white mb-1",children:"Full endpoint reference"}),(0,Lg.jsx)("p",{className:"text-gray-400 text-sm",children:"Schemas, response shapes, every route. Also covers the API-key path if you prefer a deepnets account."})]}),(0,Lg.jsx)(ft,{to:"/api-docs",className:"bg-crypto-accent hover:bg-crypto-accent/80 text-crypto-dark px-5 py-2.5 rounded-lg font-medium whitespace-nowrap",children:"API docs \u2192"})]}),(0,Lg.jsxs)("div",{className:"text-center text-gray-500 text-sm pt-8 mt-8 border-t border-gray-800",children:["Building something? Drop us a line at"," ",(0,Lg.jsx)("a",{href:"mailto:[email protected]",className:"text-crypto-accent hover:text-white",children:"[email protected]"})]})]}),(0,Lg.jsx)(_y,{})]}),KV=e=>{const t=Date.now()-new Date(e).getTime(),n=t/864e5;return n<1?"".concat((t/36e5).toFixed(1),"h"):n<30?"".concat(n.toFixed(1),"d"):"".concat((n/30).toFixed(1),"mo")},VV=e=>null!=e&&isFinite(e)?e>=1e9?"$".concat((e/1e9).toFixed(2),"B"):e>=1e6?"$".concat((e/1e6).toFixed(2),"M"):e>=1e3?"$".concat((e/1e3).toFixed(1),"K"):"$".concat(e.toFixed(2)):"\u2014",$V=e=>"".concat(e>=10?e.toFixed(1):e.toFixed(2),"\xd7"),YV=e=>{let{level:t="DANGEROUS",title:n="living_dangerously"}=e;const[i,s]=(0,r.useState)(null),[a,o]=(0,r.useState)(!0),[l,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!1;return o(!0),s(null),(async()=>{try{const n=await Ng("".concat(Eg(),"/api/internal/living-dangerously?level=").concat(t));if(!n.ok)throw new Error("HTTP ".concat(n.status));const r=await n.json();e||s(r)}catch(d$){e||c((null===d$||void 0===d$?void 0:d$.message)||"Failed to load")}finally{e||o(!1)}})(),()=>{e=!0}},[t]),(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-7xl mx-auto px-4 py-6",children:[(0,Lg.jsxs)("div",{className:"mb-4",children:[(0,Lg.jsx)("h1",{className:"text-2xl font-semibold",children:n}),(0,Lg.jsxs)("p",{className:"text-gray-400 text-sm mt-1",children:["Tokens we classified ",t," 3\u201330 days ago that are still trading ",(0,Lg.jsx)("em",{children:"and"})," currently above their classification-time price. Sorted most-recent classification first. Slow load (Birdeye fan-out)."]})]}),a&&(0,Lg.jsx)("div",{className:"text-gray-400 text-sm py-12 text-center",children:"Loading\u2026 (typically 5\u201315s)"}),l&&(0,Lg.jsxs)("div",{className:"text-red-400 text-sm py-12 text-center",children:["Error: ",l]}),i&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"text-xs text-gray-500 mb-3",children:[i.count," up \xb7 ",i.al
2iveCandidates," alive \xb7 ",i.pricedCandidates," priced \xb7 ",i.sampledCandidates," ",i.level," classifications sampled (3\u201330d). Alive \u2260 priced: low-liquidity tokens with no trades in 1h are filtered (post-event liquidity rugs)."]}),(0,Lg.jsxs)("div",{className:"overflow-x-auto",children:[(0,Lg.jsxs)("table",{className:"w-full text-sm",children:[(0,Lg.jsx)("thead",{className:"text-gray-400 text-xs uppercase border-b border-gray-700",children:(0,Lg.jsxs)("tr",{children:[(0,Lg.jsx)("th",{className:"text-left py-2 pr-3",children:"Token"}),(0,Lg.jsx)("th",{className:"text-right py-2 px-3",children:"Multiplier"}),(0,Lg.jsx)("th",{className:"text-right py-2 px-3",children:"Liquidity"}),(0,Lg.jsx)("th",{className:"text-left py-2 px-3",children:"Flag"}),(0,Lg.jsx)("th",{className:"text-left py-2 px-3",children:"Critical risks"}),(0,Lg.jsx)("th",{className:"text-right py-2 pl-3",children:"Classified"})]})}),(0,Lg.jsx)("tbody",{children:i.tokens.map(e=>(0,Lg.jsxs)("tr",{className:"border-b border-gray-800 hover:bg-gray-800/40",children:[(0,Lg.jsxs)("td",{className:"py-3 pr-3",children:[(0,Lg.jsx)(ft,{to:"/token/".concat(e.mint),className:"text-crypto-accent hover:underline",children:e.symbol||e.mint.slice(0,6)}),e.name&&(0,Lg.jsx)("div",{className:"text-gray-500 text-xs truncate max-w-xs",children:e.name})]}),(0,Lg.jsx)("td",{className:"py-3 px-3 text-right font-mono text-green-400",children:$V(e.multiplier)}),(0,Lg.jsx)("td",{className:"py-3 px-3 text-right font-mono",children:VV(e.liquidityUsd)}),(0,Lg.jsx)("td",{className:"py-3 px-3 text-yellow-400 text-xs",children:e.flag||"\u2014"}),(0,Lg.jsx)("td",{className:"py-3 px-3 text-xs text-gray-300 max-w-md",children:(e.criticalRisks||[]).slice(0,2).join(" \xb7 ")||(e.warnings||[]).slice(0,2).join(" \xb7 ")||"\u2014"}),(0,Lg.jsxs)("td",{className:"py-3 pl-3 text-right text-gray-400 text-xs",children:[KV(e.classifiedAt)," ago"]})]},e.mint))})]}),0===i.tokens.length&&(0,Lg.jsx)("div",{className:"text-gray-500 text-sm py-12 text-center",children:"No DANGEROUS tokens currently above their classification price."})]})]})]}),(0,Lg.jsx)(_y,{})]})},GV=Eg(),JV={verified:{chip:"border-crypto-green/40 bg-crypto-green/10 text-crypto-green",icon:"fa-check",label:"Verified"},refuted:{chip:"border-crypto-red/40 bg-crypto-red/10 text-crypto-red",icon:"fa-xmark",label:"Refuted"},unresolved:{chip:"border-crypto-yellow/40 bg-crypto-yellow/10 text-crypto-yellow",icon:"fa-question",label:"Unresolved"}},ZV={culture:"border-crypto-accent/30 text-crypto-accent",provenance:"border-blue-400/30 text-blue-300",correction:"border-crypto-yellow/30 text-crypto-yellow",ideology:"border-purple-400/30 text-purple-300",community:"border-teal-400/30 text-teal-300"};function QV(e){if(!e)return"";const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}const XV=/(\*\*[^*]+\*\*|`[^`]+`|\*[^*\n]+\*|https?:\/\/[^\s)]+)/g,e$=e=>e.split(XV).filter(Boolean).map((e,t)=>e.startsWith("**")&&e.endsWith("**")?(0,Lg.jsx)("strong",{className:"font-semibold text-white",children:e.slice(2,-2)},t):e.startsWith("`")&&e.endsWith("`")?(0,Lg.jsx)("code",{className:"font-mono text-xs bg-black/40 border border-gray-700 rounded px-1 py-0.5 text-gray-300 break-all",children:e.slice(1,-1)},t):e.startsWith("*")&&e.endsWith("*")&&e.length>2?(0,Lg.jsx)("em",{className:"italic text-gray-300",children:e.slice(1,-1)},t):e.startsWith("http")?(0,Lg.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-crypto-accent hover:underline break-all",children:e},t):(0,Lg.jsx)(r.Fragment,{children:e},t)),t$=e=>/^\s*\|.*\|\s*$/.test(e),n$=e=>/^\s*\|[\s|:-]+\|\s*$/.test(e),r$=e=>e.trim().replace(/^\||\|$/g,"").split("|").map(e=>e.trim()),i$=e=>{let{text:t}=e;const n=t.split("\n"),r=[];let i=0,s=0;for(;i<n.length;){const e=n[i];if(!e.trim()){i++;continue}const t=e.match(/^\s*\*\*\*\s*(.+?)\s*\*\*\*\s*$/);if(t){r.push((0,Lg.jsx)("h3",{className:"text-[11px] font-bold tracking-[0.12em] uppercase text-crypto-accent/90 mt-6 mb-2",children:t[1].replace(/\*\*/g,"")},s++)),i++;continue}if(t$(e)){const e=[];for(;i<n.length&&t$(n[i]);)n$(n[i])||e.push(r$(n[i])),i++;const[t,...a]=e;r.push((0,Lg.jsx)("div",{className:"my-3 overflow-x-auto",children:(0,Lg.jsxs)("table",{className:"text-sm min-w-full border border-gray-700 rounded",children:[t&&(0,Lg.jsx)("thead",{children:(0,Lg.jsx)("tr",{className:"bg-black/30",children:t.map((e,t)=>(0,Lg.jsx)("th",{className:"text-left font-semibold text-gray-300 px-3 py-1.5 border-b border-gray-700 whitespace-nowrap",children:e$(e)},t))})}),(0,Lg.jsx)("tbody",{children:a.map((e,t)=>(0,Lg.jsx)("tr",{className:"border-b border-gray-800 last:border-0",children:e.map((e,t)=>(0,Lg.jsx)("td",{className:"px-3 py-1.5 text-gray-400 align-top",children:e$(e)},t))},t))})]})},s++));continue}const a=/^\s*(?:[-\u2022]|\d+[.)])\s+/;if(a.test(e)){const e=[];for(;i<n.length&&a.test(n[i]);)e.push(n[i].replace(a,"")),i++;r.push((0,Lg.jsx)("ul",{className:"my-2 space-y-1 pl-1",children:e.map((e,t)=>(0,Lg.jsxs)("li",{className:"text-sm text-gray-400 leading-relaxed flex gap-2",children:[(0,Lg.jsx)("span",{className:"text-gray-600 select-none",children:"\xb7"}),(0,Lg.jsx)("span",{children:e$(e)})]},t))},s++));continue}const o=[];for(;i<n.length&&n[i].trim()&&!t$(n[i])&&!a.test(n[i])&&!/^\s*\*\*\*\s*.+\s*\*\*\*\s*$/.test(n[i]);)o.push(n[i]),i++;r.push((0,Lg.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed my-2",children:e$(o.join(" "))},s++))}return(0,Lg.jsx)(Lg.Fragment,{children:r})},s$=e=>{var t;let{claim:n}=e;const r=null!==(t=JV[n.status])&&void 0!==t?t:JV.unresolved;return(0,Lg.jsxs)("div",{className:"border border-gray-700 rounded-lg p-3 bg-black/20",children:[(0,Lg.jsxs)("div",{className:"flex items-start gap-2 flex-wrap",children:[(0,Lg.jsxs)("span",{className:"shrink-0 inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide border rounded px-1.5 py-0.5 ".concat(r.chip),children:[(0,Lg.jsx)("i",{className:"fas ".concat(r.icon)})," ",r.label]}),n.source&&(0,Lg.jsx)("span",{className:"shrink-0 text-[10px] uppercase tracking-wide text-gray-500 border border-gray-700 rounded px-1.5 py-0.5",children:"prior-note"===n.source?"deepnets (prior note)":n.source}),n.checkedAt&&(0,Lg.jsxs)("span",{className:"shrink-0 text-[10px] text-gray-600 py-0.5",children:["checked ",n.checkedAt]})]}),(0,Lg.jsx)("p",{className:"text-sm text-gray-200 mt-2",children:e$(n.statement)}),n.method&&(0,Lg.jsx)("p",{className:"text-xs text-gray-500 mt-1.5 leading-relaxed",children:e$(n.method)}),n.evidenceUrl&&(0,Lg.jsxs)("a",{href:n.evidenceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-crypto-accent hover:underline mt-1.5 inline-block break-all",children:[(0,Lg.jsx)("i",{className:"fas fa-link mr-1"}),n.evidenceUrl]})]})},a$=()=>{var e;const{mint:t}=pe(),[n,i]=(0,r.useState)(null),[s,a]=(0,r.useState)(!0),[o,l]=(0,r.useState)(null);(0,r.useEffect)(()=>
2{if(!t)return;let e=!1;return(async()=>{a(!0),l(null);try{const n=await Ng("".concat(GV,"/api/token-culture/").concat(t));if(!n.ok)throw new Error("HTTP ".concat(n.status));const r=await n.json();e||i(r)}catch(h$){e||l(h$ instanceof Error?h$.message:String(h$))}finally{e||a(!1)}})(),()=>{e=!0}},[t]);const c=(null===n||void 0===n?void 0:n.tokenName)||(null===t||void 0===t?void 0:t.slice(0,8))||"",u=(null===n||void 0===n?void 0:n.tokenSymbol)||"",d=null===n||void 0===n?void 0:n.claimCounts,h=d?d.verified+d.refuted+d.unresolved:0;return(0,Lg.jsxs)("div",{className:"min-h-screen bg-crypto-dark text-white",children:[(0,Lg.jsxs)(jn,{children:[(0,Lg.jsx)("title",{children:"Culture research \xb7 ".concat(c).concat(u?" ($".concat(u,")"):"")}),(0,Lg.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,Lg.jsx)(by,{}),(0,Lg.jsxs)("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-6",children:[(0,Lg.jsx)("div",{className:"mb-6",children:(0,Lg.jsxs)(ft,{to:"/token/".concat(t),className:"text-sm text-gray-400 hover:text-crypto-accent transition-colors",children:[(0,Lg.jsx)("i",{className:"fas fa-arrow-left mr-1"})," Back to ",c," ",u&&"($".concat(u,")")]})}),(0,Lg.jsx)("h1",{className:"text-xl font-bold mb-1",children:"Culture Research"}),(0,Lg.jsxs)("p",{className:"text-sm text-gray-400 mb-4",children:[c," ",u&&(0,Lg.jsxs)("span",{className:"text-gray-500",children:["(",u,")"]}),(0,Lg.jsx)("span",{className:"ml-2 text-gray-600 text-xs font-mono break-all",children:t})]}),!s&&!o&&(null===n||void 0===n||null===(e=n.summary)||void 0===e?void 0:e.text)&&(0,Lg.jsxs)("section",{className:"border border-gray-700 bg-crypto-card rounded-xl p-4 sm:p-5 mb-6",children:[(0,Lg.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-[0.12em] text-crypto-accent/90 mb-2",children:"What this is"}),(0,Lg.jsx)("div",{className:"text-[15px] leading-relaxed [&>p]:text-gray-200 [&>p]:text-[15px]",children:(0,Lg.jsx)(i$,{text:n.summary.text})}),n.summary.updatedAt&&(0,Lg.jsxs)("div",{className:"text-[11px] text-gray-600 mt-3 pt-2 border-t border-gray-800",children:["Current as of ",QV(n.summary.updatedAt)]})]}),(0,Lg.jsx)("p",{className:"text-xs text-gray-500 border border-gray-800 rounded-lg p-3 mb-6 leading-relaxed",children:"Hand-written research into what a token\u2019s community actually is \u2014 where the meme came from, who holds it, and what its members say. Revised over time rather than scored once, so later notes correct earlier ones and the newest is shown first. Separate from the automated social scan on the token page, which measures mention volume and sentiment."}),s&&(0,Lg.jsx)("div",{className:"space-y-4",children:Array.from({length:2}).map((e,t)=>(0,Lg.jsxs)("div",{className:"bg-crypto-gray border border-gray-700 rounded-xl p-4 animate-pulse",children:[(0,Lg.jsx)("div",{className:"h-4 w-40 bg-gray-700 rounded mb-3"}),(0,Lg.jsx)("div",{className:"h-3 w-full bg-gray-700 rounded mb-2"}),(0,Lg.jsx)("div",{className:"h-3 w-5/6 bg-gray-700 rounded mb-2"}),(0,Lg.jsx)("div",{className:"h-3 w-2/3 bg-gray-700 rounded"})]},t))}),o&&!s&&(0,Lg.jsxs)("div",{className:"text-center py-16",children:[(0,Lg.jsx)("i",{className:"fas fa-exclamation-triangle text-crypto-red text-4xl mb-4 block"}),(0,Lg.jsx)("p",{className:"text-gray-400",children:o})]}),!s&&!o&&n&&0===n.notes.length&&(0,Lg.jsxs)("div",{className:"text-center py-16 text-gray-500",children:[(0,Lg.jsx)("i",{className:"fas fa-book text-4xl mb-4 block"}),(0,Lg.jsx)("p",{children:"No culture research recorded for this token yet."}),(0,Lg.jsx)("p",{className:"text-xs text-gray-600 mt-2",children:"Coverage is deliberately partial \u2014 absence here is not a finding about the token."})]}),!s&&!o&&n&&n.notes.length>0&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-6 text-xs",children:[(0,Lg.jsxs)("span",{className:"text-gray-500",children:[n.noteCount," ",1===n.noteCount?"note":"notes"]}),h>0&&d&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),["verified","refuted","unresolved"].filter(e=>d[e]>0).map(e=>(0,Lg.jsxs)("span",{className:"inline-flex items-center gap-1 border rounded px-1.5 py-0.5 ".concat(JV[e].chip),children:[(0,Lg.jsx)("i",{className:"fas ".concat(JV[e].icon)})," ",d[e]," ",JV[e].label.toLowerCase()]},e))]}),n.updatedAt&&(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("span",{className:"text-gray-700",children:"\xb7"}),(0,Lg.jsxs)("span",{className:"text-gray-600",children:["updated ",QV(n.updatedAt)]})]})]}),(0,Lg.jsx)("div",{className:"space-y-5",children:n.notes.map((e,t)=>(0,Lg.jsxs)("article",{className:"bg-crypto-card border border-gray-700 rounded-xl p-4 sm:p-5",children:[(0,Lg.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-3 flex-wrap",children:[(0,Lg.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e.theme&&(0,Lg.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide border rounded px-1.5 py-0.5 ".concat(ZV[e.theme]||"border-gray-600 text-gray-400"),children:e.theme}),0===t&&n.notes.length>1&&(0,Lg.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-500 border border-gray-700 rounded px-1.5 py-0.5",children:"current"})]}),e.addedAt&&(0,Lg.jsx)("span",{className:"text-xs text-gray-600",children:QV(e.addedAt)})]}),e.claims.length>0&&(0,Lg.jsx)("div",{className:"space-y-2 mb-4",children:e.claims.map((e,t)=>(0,Lg.jsx)(s$,{claim:e},t))}
2),(0,Lg.jsx)(i$,{text:e.analysis}),e.assessment&&(0,Lg.jsxs)("div",{className:"mt-4 pt-3 border-t border-gray-800",children:[(0,Lg.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-[0.12em] text-gray-500 mb-1",children:"Assessment"}),(0,Lg.jsx)("div",{className:"opacity-90",children:(0,Lg.jsx)(i$,{text:e.assessment})})]}),e.tags.length>0&&(0,Lg.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-4",children:e.tags.map((e,t)=>(0,Lg.jsx)("span",{className:"text-[10px] text-gray-500 bg-black/30 border border-gray-800 rounded px-1.5 py-0.5",children:e},t))}),e.references.length>0&&(0,Lg.jsxs)("details",{className:"mt-3",children:[(0,Lg.jsxs)("summary",{className:"text-xs text-gray-500 cursor-pointer hover:text-gray-400 select-none",children:[e.references.length," ",1===e.references.length?"source":"sources"]}),(0,Lg.jsx)("ul",{className:"mt-2 space-y-1",children:e.references.map((e,t)=>(0,Lg.jsx)("li",{children:(0,Lg.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-crypto-accent hover:underline break-all",children:e})},t))})]})]},t))})]})]}),(0,Lg.jsx)(_y,{})]})},o$=Eg(),l$=()=>{const{user:e,isAuthenticated:t,isLoading:n,requestLogin:i}=Bg(),[s]=vt(),a=(s.get("code")||"").trim(),[o,l]=(0,r.useState)("idle"),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(null),p=(0,r.useCallback)(async()=>{const e=localStorage.getItem("deepnets_token");if(e){l("confirming"),u(null);try{var t;const n=await Ng("".concat(o$,"/api/telegram/link/confirm"),{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({code:a})}),r=await n.json().catch(()=>({}));if(!n.ok)return l("error"),void u((null===r||void 0===r?void 0:r.error)||"Could not link your Telegram account.");h(null!==(t=null===r||void 0===r?void 0:r.telegramUsername)&&void 0!==t?t:null),l("success")}catch(n){l("error"),u("Network error. Please try again.")}}},[a]);(0,r.useEffect)(()=>{a&&t&&"idle"===o&&p()},[a,t,o,p]);return(0,Lg.jsxs)("div",{className:"app-container",children:[(0,Lg.jsx)(by,{}),(0,Lg.jsx)("div",{className:"ct-wrap",children:(0,Lg.jsxs)("div",{className:"ct-card",children:[(0,Lg.jsx)("h1",{className:"ct-title",children:"Connect Telegram"}),t&&(null===e||void 0===e?void 0:e.walletAddress)&&(0,Lg.jsxs)("p",{className:"ct-sub",children:["Signed in as ",e.walletAddress.slice(0,4),"\u2026",e.walletAddress.slice(-4)]}),a?n?(0,Lg.jsx)("p",{className:"ct-msg",children:"Loading\u2026"}):t?"confirming"===o||"idle"===o?(0,Lg.jsx)("p",{className:"ct-msg",children:"Linking your Telegram account\u2026"}):"success"===o?(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsxs)("p",{className:"ct-msg ct-success",children:["\u2713 Telegram linked",d?" as @".concat(d):"","."]}),(0,Lg.jsxs)("p",{className:"ct-msg",children:["Head back to ",(0,Lg.jsx)("strong",{children:"@deepnetsbot"})," and send"," ",(0,Lg.jsx)("code",{children:"/safety <mint or $ticker>"})," to get a full report."]}),(0,Lg.jsx)(ft,{className:"ct-btn",to:"/",children:"Done"})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("p",{className:"ct-msg ct-error",children:c}),(0,Lg.jsx)("button",{className:"ct-btn",onClick:p,children:"Try again"})]}):(0,Lg.jsxs)(Lg.Fragment,{children:[(0,Lg.jsx)("p",{className:"ct-msg",children:"Sign in with the wallet on your deepnets account to finish linking Telegram."}),(0,Lg.jsx)("button",{className:"ct-btn",onClick:()=>i("/connect/telegram?code=".concat(encodeURIComponent(a))),children:"Sign in"})]}):(0,Lg.jsxs)("p",{className:"ct-msg ct-error",children:["Missing link code. Open Telegram, send ",(0,Lg.jsx)("code",{children:"/link"})," to"," ",(0,Lg.jsx)("strong",{children:"@deepnetsbot"}),", and tap the link it gives you."]})]})}),(0,Lg.jsx)(_y,{}),(0,Lg.jsx)("style",{children:"\n .ct-wrap { display: flex; justify-content: center; padding: 48px 16px; }\n .ct-card { max-width: 480px; width: 100%; background: var(--card-bg, #14161c);\n border: 1px solid var(--border, #262a33); border-radius: 12px; padding: 28px; }\n .ct-title { margin: 0 0 4px; font-size: 22px; }\n .ct-sub { margin: 0 0 16px; opacity: 0.7; font-size: 13px; }\n .ct-msg { margin: 12px 0; line-height: 1.5; }\n .ct-success { color: #36d399; }\n .ct-error { color: #f87272; }\n .ct-btn { display: inline-block; margin-top: 12px; padding: 10px 18px;\n background: #2f6fed; color: #fff; border: none; border-radius: 8px;\n font-size: 14px; cursor: pointer; text-decoration: none; }\n .ct-btn:hover { background: #2a63d4; }\n "})]})};ng||"undefined"!==typeof window&&(Qm.init(Xm,{api_host:eg,ui_host:"https://us.posthog.com",person_profiles:"always",capture_pageview:"history_change",autocapture:!0,capture_exceptions:!0,sanitize_properties:ag,session_recording:{maskAllInputs:!0,maskTextSelector:"[data-mask], .wallet-address, .token-mint"}}),ng=!0);const c$=function(){const e=(0,r.useMemo)(()=>(0,kn.Kw)("mainnet-beta"),[]),t=(0,r.useMemo)(()=>[new Ja,new jo],[]);return(0,Lg.jsxs)(gn,{children:[(0,Lg.jsx)(jn,{defaultTitle:"Deepnets.ai",children:(0,Lg.jsx)("title",{children:"Deepnets.ai"})}),(0,Lg.jsx)(Sn,{endpoint:e,children:(0,Lg.jsx)(Ia,{wallets:t,autoConnect:!1,children:(0,Lg.jsx)(Ya,{children:(0,Lg.jsx)(Fg,{children:(0,Lg.jsxs)(ht,{children:[(0,Lg.jsx)(hj,{}),(0,Lg.jsx)(dj,{}),(0,Lg.jsx)(lw,{}),(0,Lg.jsx)(fj,{}),(0,Lg.jsxs)(Pe,{children:[(0,Lg.jsx)(Me,{path:"/",element:(0,Lg.jsx)(pb,{})}),(0,Lg.jsx)(Me,{path:"/network/:networkAddress",element:(0,Lg.jsx)($b,{})}),(0,Lg.jsx)(Me,{path:"/wallet/:walletAddress",element:(0,Lg.jsx)(ew,{})}),(0,Lg.jsx)(Me,{path:"/figures",element:(0,Lg.jsx)(aw,{})}),(0,Lg.jsx)(Me,{path:"/checkout/return",element:(0,Lg.jsx)(ow,{})}),(0,Lg.jsx)(Me,{path:"/figures/:key",element:(0,Lg.jsx)(iw,{})}),(0,Lg.jsx)(Me,{path:"/token/:mint",element:(0,Lg.jsx)(Vb,{})}),(0,Lg.jsx)(Me,{path:"/token/:mint/safety-history",element:(0,Lg.jsx)(IV,{})}),(0,Lg.jsx)(Me,{path:"/token/:mint/network-graph",element:(0,Lg.jsx)(BV,{})}),Vv.flatMap(e=>[(0,Lg.jsx)(Me,{path:"/token/".concat(e,"/:mint"),element:(0,Lg.jsx)(Vb,{chain:e},e)},e),(0,Lg.jsx)(Me,{path:"/holder-analysis/".concat(e,"/:mint"),element:(0,Lg.jsx)(Jw,{chain:e},e)},"".concat(e,"-holders")),(0,Lg.jsx)(Me,{path:"/holder-analysis/".concat(e,"/:mint/:timestamp"),element:(0,Lg.jsx)(Jw,{chain:e},e)},"".concat(e,"-holders-ts")),(0,Lg.jsx)(Me,{path:"/token/".concat(e,"/:mint/network-graph"),element:(0,Lg.jsx)(BV,{chain:e},e)},"".concat(e,"-graph")),(0,Lg.jsx)(Me,{path:"/wallet/".concat(e,"/:walletAddress"),element:(0,Lg.jsx)(ew,{chain:e},e)},"".concat(e,"-wallet")),(0,Lg.jsx)(Me,{path:"/token/".concat(e,"/:mint/safety-history"),element:(0,Lg.jsx)(IV,{chain:e},e)},"".concat(e,"-history"))]),(0,Lg.jsx)(Me,{path:"/api-keys",element:(0,Lg.jsx)(hw,{})}),(0,Lg.jsx)(Me,{path:"/lab/agents",element:(0,Lg.jsx)(Sw,{})}),(0,Lg.jsx)(Me,{path:"/lab/agents/:id",element:(0,Lg.jsx)(Iw,{})}),(0,Lg.jsx)(Me,{path:"/api-docs",element:(0,Lg.jsx)(UV,{})}),(0,Lg.jsx)(Me,{path:"/agents",element:(0,Lg.jsx)(HV,{})}),(0,Lg.jsx)(Me,{path:"/token/:mint/culture",element:(0,Lg.jsx)(a$,{})}),(0,Lg.jsx)(Me,{path:"/living-dangerously",element:(0,Lg.jsx)(YV,{level:"DANGEROUS",title:"living_dangerously"})}),(0,Lg.jsx)(Me,{path:"/living-riskily",element:(0,Lg.jsx)(YV,{level:"RISKY",title:"living_riskily"})}),(0,Lg.jsx)(Me,{path:"/profile",element:(0,Lg.jsx)(Qw,{})}),(0,Lg.jsx)(Me,{path:"/profile/credits",element:(0,Lg.jsx)(sj,{})}),(0,Lg.jsx)(Me,{path:"/profile/security",element:(0,Lg.jsx)(cj,{})}),(0,Lg.jsx)(Me,{path:"/terms",element:(0,Lg.jsx)(gj,{})}),(0,Lg.jsx)(Me,{path:"/privacy",element:(0,Lg.jsx)(LV,{})}),(0,Lg.jsx)(Me,{path:"/whitepaper",element:(0,Lg.jsx)(yj,{})}),(0,Lg.jsx)(Me,{path:"/shill-tracker",element:(0,Lg.jsx)(Nj,{})}),(0,Lg.jsx)(Me,{path:"/tiers",element:(0,Lg.jsx)(Pj,{})}),(0,Lg.jsx)(Me,{path:"/trending",element:(0,Lg.jsx)(rk,{})}),(0,Lg.jsx)(Me,{path:"/uncfactor",element:(0,Lg.jsx)(ik,{identityKey:"unc"})}),(0,Lg.jsx)(Me,{path:"/connect/telegram",element:(0,Lg.jsx)(l$,{})}),(0,Lg.jsx)(Me,{path:"/auth/verify",element:(0,Lg.jsx)(uj,{})}),(0,Lg.jsx)(Me,{path:"/auth/phantom-callback",element:(0,Lg.jsx)(mj,{})}),(0,Lg.jsx)(Me,{path:"/holder-analysis/:mint",element:(0,Lg.jsx)(Jw,{})}),(0,Lg.jsx)(Me,{path:"/holder-analysis/:mint/:timestamp",element:(0,Lg.jsx)(Jw,{})})]})]})})})})})]})},u$=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,6453)).then(t=>{let{getCLS:n,getFID:r,getFCP:i,getLCP:s,getTTFB:a}=t;n(e),r(e),i(e),s(e),a(e)})};s.createRoot(document.getElementById("root")).render((0,Lg.jsx)(r.StrictMode,{children:(0,Lg.jsx)(c$,{})}
2)),u$(),jg().catch(()=>{}),window.addEventListener("pageshow",e=>{e.persisted&&window.location.reload()});try{const e=Eg(),t=JSON.stringify({page:window.location.pathname,referrer:document.referrer||null});navigator.sendBeacon("".concat(e,"/api/pageview"),new Blob([t],{type:"application/json"}))}catch(Uo){}})()})(); 3//# sourceMappingURL=main.25318e63.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.