PageSourceSearch

https://trends.fun/assets/appkit-ui-assets-BzNbQDZ1.js

js trends.fun collected 2026-10-07 21:49:35 UTC 1,978,977 bytes, 9,952 lines download raw bytes

1var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ec(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zI(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}function AB(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var FI={exports:{}},mr=FI.exports={},xo,_o;function nb(){throw new Error("setTimeout has not been defined")}function ib(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?xo=setTimeout:xo=nb}catch{xo=nb}try{typeof clearTimeout=="function"?_o=clearTimeout:_o=ib}catch{_o=ib}})();function qI(t){if(xo===setTimeout)return setTimeout(t,0);if((xo===nb||!xo)&&setTimeout)return xo=setTimeout,setTimeout(t,0);try{return xo(t,0)}catch{try{return xo.call(null,t,0)}catch{return xo.call(this,t,0)}}}function PB(t){if(_o===clearTimeout)return clearTimeout(t);if((_o===ib||!_o)&&clearTimeout)return _o=clearTimeout,clearTimeout(t);try{return _o(t)}catch{try{return _o.call(null,t)}catch{return _o.call(this,t)}}}var Ta=[],fh=!1,zl,n2=-1;function TB(){!fh||!zl||(fh=!1,zl.length?Ta=zl.concat(Ta):n2=-1,Ta.length&&HI())}function HI(){if(!fh){var t=qI(TB);fh=!0;for(var e=Ta.length;e;){for(zl=Ta,Ta=[];++n2<e;)zl&&zl[n2].run();n2=-1,e=Ta.length}zl=null,fh=!1,PB(t)}}mr.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Ta.push(new VI(t,e)),Ta.length===1&&!fh&&qI(HI)};function VI(t,e){this.fun=t,this.array=e}VI.prototype.run=function(){this.fun.apply(null,this.array)};mr.title="browser";mr.browser=!0;mr.env={};mr.argv=[];mr.version="";mr.versions={};function tc(){}mr.on=tc;mr.addListener=tc;mr.once=tc;mr.off=tc;mr.removeListener=tc;mr.removeAllListeners=tc;mr.emit=tc;mr.prependListener=tc;mr.prependOnceListener=tc;mr.listeners=function(t){return[]};mr.binding=function(t){throw new Error("process.binding is not supported")};mr.cwd=function(){return"/"};mr.chdir=function(t){throw new Error("process.chdir is not supported")};mr.umask=function(){return 0};var OB=FI.exports;const sr=AB(OB);var i2={exports:{}},NB=i2.exports,M8;function kB(){return M8||(M8=1,function(t,e){(function(r,n){t.exports=n()})(NB,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",u="week",d="month",h="quarter",f="year",g="date",p="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var C=["th","st","nd","rd"],x=T%100;return"["+T+(C[(x-20)%10]||C[x]||C[0])+"]"}},v=function(T,C,x){var B=String(T);return!B||B.length>=C?T:""+Array(C+1-B.length).join(x)+T},E={s:v,z:function(T){var C=-T.utcOffset(),x=Math.abs(C),B=Math.floor(x/60),R=x%60;return(C<=0?"+":"-")+v(B,2,"0")+":"+v(R,2,"0")},m:function T(C,x){if(C.date()<x.date())return-T(x,C);var B=12*(x.year()-C.year())+(x.month()-C.month()),R=C.clone().add(B,d),M=x-R<0,U=C.clone().add(B+(M?-1:1),d);return+(-(B+(x-R)/(M?R-U:U-R))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:d,y:f,w:u,d:l,D:g,h:c,m:a,s:o,ms:s,Q:h}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},I="en",_={};_[I]=b;var A="$isDayjsObject",P=function(T){return T instanceof k||!(!T||!T[A])},y=function T(C,x,B){var R;if(!C)return I;if(typeof C=="string"){var M=C.toLowerCase();_[M]&&(R=M),x&&(_[M]=x,R=M);var U=C.split("-");if(!R&&U.length>1)return T(U[0])}else{var z=C.name;_[z]=C,R=z}return!B&&R&&(I=R),R||!B&&I},O=function(T,C){if(P(T))return T.clone();var x=typeof C=="object"?C:{};return x.date=T,x.args=arguments,new k(x)},S=E;S.l=y,S.i=P,S.w=function(T,C){return O(T,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var k=function(){function T(x){this.$L=y(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[A]=!0}var C=T.prototype;return C.parse=function(x){this.$d=function(B){var R=B.date,M=B.utc;if(R===null)return new Date(NaN);if(S.u(R))return new Date;if(R instanceof Date)return new Date(R);
vendor: 1,369 bytes, line 1
1if(typeof R=="string"&&!/Z$/i.test(R)){var U=R.match(w);if(U){var z=U[2]-1||0,H=(U[7]||"0").substring(0,3);return M?new Date(Date.UTC(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,H)):new Date(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,H)}}return new Date(R)}(x),this.init()},C.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},C.$utils=function(){return S},C.isValid=function(){return this.$d.toString()!==p},C.isSame=function(x,B){var R=O(x);return this.startOf(B)<=R&&R<=this.endOf(B)},C.isAfter=function(x,B){return O(x)<this.startOf(B)},C.isBefore=function(x,B){return this.endOf(B)<O(x)},C.$g=function(x,B,R){return S.u(x)?this[B]:this.set(R,x)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(x,B){var R=this,M=!!S.u(B)||B,U=S.p(x),z=function(ae,be){var Ce=S.w(R.$u?Date.UTC(R.$y,be,ae):new Date(R.$y,be,ae),R);return M?Ce:Ce.endOf(l)},H=function(ae,be){return S.w(R.toDate()[ae].apply(R.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(be)),R)},Y=this.$W,V=this.$M,G=this.$D,re="set"+(this.$u?"UTC":"");switch(U){case f:return M?z(1,0):z(31,11);case d:return M?z(1,V):z(0,V+1);case u:var de=this.$locale().weekStart||0,ce=(Y<de?Y+7:Y)-de;
vendor: 5,130 bytes, line 1
1return z(M?G-ce:G+(6-ce),V);case l:case g:return H(re+"Hours",0);case c:return H(re+"Minutes",1);case a:return H(re+"Seconds",2);case o:return H(re+"Milliseconds",3);default:return this.clone()}},C.endOf=function(x){return this.startOf(x,!1)},C.$set=function(x,B){var R,M=S.p(x),U="set"+(this.$u?"UTC":""),z=(R={},R[l]=U+"Date",R[g]=U+"Date",R[d]=U+"Month",R[f]=U+"FullYear",R[c]=U+"Hours",R[a]=U+"Minutes",R[o]=U+"Seconds",R[s]=U+"Milliseconds",R)[M],H=M===l?this.$D+(B-this.$W):B;if(M===d||M===f){var Y=this.clone().set(g,1);Y.$d[z](H),Y.init(),this.$d=Y.set(g,Math.min(this.$D,Y.daysInMonth())).$d}else z&&this.$d[z](H);return this.init(),this},C.set=function(x,B){return this.clone().$set(x,B)},C.get=function(x){return this[S.p(x)]()},C.add=function(x,B){var R,M=this;x=Number(x);var U=S.p(B),z=function(V){var G=O(M);return S.w(G.date(G.date()+Math.round(V*x)),M)};if(U===d)return this.set(d,this.$M+x);if(U===f)return this.set(f,this.$y+x);if(U===l)return z(1);if(U===u)return z(7);var H=(R={},R[a]=n,R[c]=i,R[o]=r,R)[U]||1,Y=this.$d.getTime()+x*H;return S.w(Y,this)},C.subtract=function(x,B){return this.add(-1*x,B)},C.format=function(x){var B=this,R=this.$locale();if(!this.isValid())return R.invalidDate||p;var M=x||"YYYY-MM-DDTHH:mm:ssZ",U=S.z(this),z=this.$H,H=this.$m,Y=this.$M,V=R.weekdays,G=R.months,re=R.meridiem,de=function(be,Ce,ze,Qe){return be&&(be[Ce]||be(B,M))||ze[Ce].slice(0,Qe)},ce=function(be){return S.s(z%12||12,be,"0")},ae=re||function(be,Ce,ze){var Qe=be<12?"AM":"PM";return ze?Qe.toLowerCase():Qe};return M.replace(m,function(be,Ce){return Ce||function(ze){switch(ze){case"YY":return String(B.$y).slice(-2);case"YYYY":return S.s(B.$y,4,"0");case"M":return Y+1;case"MM":return S.s(Y+1,2,"0");case"MMM":return de(R.monthsShort,Y,G,3);case"MMMM":return de(G,Y);case"D":return B.$D;case"DD":return S.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return de(R.weekdaysMin,B.$W,V,2);case"ddd":return de(R.weekdaysShort,B.$W,V,3);case"dddd":return V[B.$W];case"H":return String(z);case"HH":return S.s(z,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return ae(z,H,!0);case"A":return ae(z,H,!1);case"m":return String(H);case"mm":return S.s(H,2,"0");case"s":return String(B.$s);case"ss":return S.s(B.$s,2,"0");case"SSS":return S.s(B.$ms,3,"0");case"Z":return U}return null}(be)||U.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(x,B,R){var M,U=this,z=S.p(B),H=O(x),Y=(H.utcOffset()-this.utcOffset())*n,V=this-H,G=function(){return S.m(U,H)};switch(z){case f:M=G()/12;break;case d:M=G();break;case h:M=G()/3;break;case u:M=(V-Y)/6048e5;break;case l:M=(V-Y)/864e5;break;case c:M=V/i;break;case a:M=V/n;break;case o:M=V/r;break;default:M=V}return R?M:S.a(M)},C.daysInMonth=function(){return this.endOf(d).$D},C.$locale=function(){return _[this.$L]},C.locale=function(x,B){if(!x)return this.$L;var R=this.clone(),M=y(x,B,!0);return M&&(R.$L=M),R},C.clone=function(){return S.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},T}(),L=k.prototype;return O.prototype=L,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",l],["$M",d],["$y",f],["$D",g]].forEach(function(T){L[T[1]]=function(C){return this.$g(C,T[0],T[1])}}),O.extend=function(T,C){return T.$i||(T(C,k,O),T.$i=!0),O},O.locale=y,O.isDayjs=P,O.unix=function(T){return O(1e3*T)},O.en=_[I],O.Ls=_,O.p={},O})}(i2)),i2.exports}var RB=kB();const ph=ec(RB);var s2={exports:{}},BB=s2.exports,U8;function DB(){return U8||(U8=1,function(t,e){(function(r,n){t.exports=n()})(BB,function(){return function(r,n,i){r=r||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,u,d,h){return s.fromToBase(l,u,d,h)}i.en.relativeTime=o,s.fromToBase=function(l,u,d,h,f){for(var g,p,w,m=d.$locale().relativeTime||o,b=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],v=b.length,E=0;E<v;E+=1){var I=b[E];I.d&&(g=h?i(l).diff(d,I.d,!0):d.diff(l,I.d,!0));var _=(r.rounding||Math.round)(Math.abs(g));if(w=g>0,_<=I.r||!I.r){_<=1&&E>0&&(I=b[E-1]);var A=m[I.l];f&&(_=f(""+_)),p=typeof A=="string"?A.replace("%d",_):A(_,u,I.l,w);break}}if(u)return p;var P=w?m.future:m.past;return typeof P=="function"?P(p):P.replace("%s",p)},s.to=function(l,u){return a(l,u,this,!0)},s.from=function(l,u){return a(l,u,this)};var c=function(l){return l.$u?i.utc():i()};s.toNow=function(l){return this.to(c(this),l)},s.fromNow=function(l){return this.from(c(this),l)}}})}(s2)),s2.exports}var LB=DB();const MB=ec(LB);var o2={exports:{}},UB=o2.exports,j8;function jB(){return j8||(j8=1,function(t,e){(function(r,n){t.exports=n()})(UB,function(){return function(r,n,i){i.updateLocale=function(s,o){var a=i.Ls[s];
1if(a)return(o?Object.keys(o):[]).forEach(function(c){a[c]=o[c]}),a}}})}(o2)),o2.exports}var zB=jB();const FB=ec(zB),qB="modulepreload",HB=function(t){return"/"+t},z8={},J=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){let o=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=o(r.map(l=>{if(l=HB(l),l in z8)return;z8[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":qB,u||(h.as="script"),h.crossOrigin="",h.href=l,c&&h.setAttribute("nonce",c),document.head.appendChild(h),u)return new Promise((f,g)=>{h.addEventListener("load",f),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},he=globalThis||void 0||self;var k6={},_w={};_w.byteLength=KB;_w.toByteArray=GB;_w.fromByteArray=XB;var To=[],ss=[],VB=typeof Uint8Array<"u"?Uint8Array:Array,qm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var gd=0,WB=qm.length;gd<WB;++gd)To[gd]=qm[gd],ss[qm.charCodeAt(gd)]=gd;ss[45]=62;ss[95]=63;function WI(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function KB(t){var e=WI(t),r=e[0],n=e[1];return(r+n)*3/4-n}function ZB(t,e,r){return(e+r)*3/4-r}function GB(t){var e,r=WI(t),n=r[0],i=r[1],s=new VB(ZB(t,n,i)),o=0,a=i>0?n-4:n,c;for(c=0;c<a;c+=4)e=ss[t.charCodeAt(c)]<<18|ss[t.charCodeAt(c+1)]<<12|ss[t.charCodeAt(c+2)]<<6|ss[t.charCodeAt(c+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=ss[t.charCodeAt(c)]<<2|ss[t.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=ss[t.charCodeAt(c)]<<10|ss[t.charCodeAt(c+1)]<<4|ss[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function YB(t){return To[t>>18&63]+To[t>>12&63]+To[t>>6&63]+To[t&63]}function JB(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(YB(n));return i.join("")}function XB(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(JB(t,o,o+s>a?a:o+s));return n===1?(e=t[r-1],i.push(To[e>>2]+To[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(To[e>>10]+To[e>>4&63]+To[e<<2&63]+"=")),i.join("")}var R6={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */R6.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,l=c>>1,u=-7,d=r?i-1:0,h=r?-1:1,f=t[e+d];for(d+=h,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=s*256+t[e+d],d+=h,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=n;u>0;o=o*256+t[e+d],d+=h,u-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(f?-1:1)*o*Math.pow(2,s-n)};R6.write=function(t,e,r,n,i,s){var o,a,c,l=s*8-i-1,u=(1<<l)-1,d=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,g=n?1:-1,p=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?e+=h/c:e+=h*Math.pow(2,1-d),e*c>=2&&(o++,c/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(e*c-1)*Math.pow(2,i),o=o+d):(a=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;t[r+f]=a&255,f+=g,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[r+f]=o&255,f+=g,o/=256,l-=8);t[r+f-g]|=p*128};/*!
2 * The buffer module from node.js, for the browser.
3 *
4 * @author   Feross Aboukhadijeh <https://feross.org>
5 * @license  MIT
6 */(function(t){const e=_w,r=R6,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=I,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function c(){try{const j=new s(1),$={foo:function(){return 42}};return Object.setPrototypeOf($,s.prototype),Object.setPrototypeOf(j,$),j.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(j){if(j>
vendor: 20,279 bytes, line 6
6i)throw new RangeError('The value "'+j+'" is invalid for option "size"');const $=new s(j);return Object.setPrototypeOf($,u.prototype),$}function u(j,$,N){if(typeof j=="number"){if(typeof $=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(j)}return d(j,$,N)}u.poolSize=8192;function d(j,$,N){if(typeof j=="string")return p(j,$);if(o.isView(j))return m(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(mi(j,o)||j&&mi(j.buffer,o)||typeof a<"u"&&(mi(j,a)||j&&mi(j.buffer,a)))return b(j,$,N);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const F=j.valueOf&&j.valueOf();if(F!=null&&F!==j)return u.from(F,$,N);const K=v(j);if(K)return K;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return u.from(j[Symbol.toPrimitive]("string"),$,N);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}u.from=function(j,$,N){return d(j,$,N)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function h(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function f(j,$,N){return h(j),j<=0?l(j):$!==void 0?typeof N=="string"?l(j).fill($,N):l(j).fill($):l(j)}u.alloc=function(j,$,N){return f(j,$,N)};function g(j){return h(j),l(j<0?0:E(j)|0)}u.allocUnsafe=function(j){return g(j)},u.allocUnsafeSlow=function(j){return g(j)};function p(j,$){if((typeof $!="string"||$==="")&&($="utf8"),!u.isEncoding($))throw new TypeError("Unknown encoding: "+$);const N=_(j,$)|0;let F=l(N);const K=F.write(j,$);return K!==N&&(F=F.slice(0,K)),F}function w(j){const $=j.length<0?0:E(j.length)|0,N=l($);for(let F=0;F<$;F+=1)N[F]=j[F]&255;return N}function m(j){if(mi(j,s)){const $=new s(j);return b($.buffer,$.byteOffset,$.byteLength)}return w(j)}function b(j,$,N){if($<0||j.byteLength<$)throw new RangeError('"offset" is outside of buffer bounds');if(j.byteLength<$+(N||0))throw new RangeError('"length" is outside of buffer bounds');let F;return $===void 0&&N===void 0?F=new s(j):N===void 0?F=new s(j,$):F=new s(j,$,N),Object.setPrototypeOf(F,u.prototype),F}function v(j){if(u.isBuffer(j)){const $=E(j.length)|0,N=l($);return N.length===0||j.copy(N,0,0,$),N}if(j.length!==void 0)return typeof j.length!="number"||pd(j.length)?l(0):w(j);if(j.type==="Buffer"&&Array.isArray(j.data))return w(j.data)}function E(j){if(j>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return j|0}function I(j){return+j!=j&&(j=0),u.alloc(+j)}u.isBuffer=function($){return $!=null&&$._isBuffer===!0&&$!==u.prototype},u.compare=function($,N){if(mi($,s)&&($=u.from($,$.offset,$.byteLength)),mi(N,s)&&(N=u.from(N,N.offset,N.byteLength)),!u.isBuffer($)||!u.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===N)return 0;let F=$.length,K=N.length;for(let te=0,ie=Math.min(F,K);te<ie;++te)if($[te]!==N[te]){F=$[te],K=N[te];break}return F<K?-1:K<F?1:0},u.isEncoding=function($){switch(String($).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}},u.concat=function($,N){if(!Array.isArray($))throw new TypeError('"list" argument must be an Array of Buffers');if($.length===0)return u.alloc(0);let F;if(N===void 0)for(N=0,F=0;F<$.length;++F)N+=$[F].length;const K=u.allocUnsafe(N);let te=0;for(F=0;F<$.length;++F){let ie=$[F];if(mi(ie,s))te+ie.length>K.length?(u.isBuffer(ie)||(ie=u.from(ie)),ie.copy(K,te)):s.prototype.set.call(K,ie,te);else if(u.isBuffer(ie))ie.copy(K,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=ie.length}return K};function _(j,$){if(u.isBuffer(j))return j.length;if(o.isView(j)||mi(j,o))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const N=j.length,F=arguments.length>2&&arguments[2]===!0;if(!F&&N===0)return 0;let K=!1;for(;;)switch($){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":return fd(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N*2;case"hex":return N>>>1;case"base64":return z0(j).length;default:if(K)return F?-1:fd(j).length;$=(""+$).toLowerCase(),K=!0}}u.byteLength=_;function A(j,$,N){let F=!1;if(($===void 0||$<0)&&($=0),$>this.length||((N===void 0||N>this.length)&&(N=this.length),N<=0)||(N>>>=0,$>>>=0,N<=$))return"";for(j||(j="utf8");;)switch(j){case"hex":return H(this,$,N);case"utf8":case"utf-8":return B(this,$,N);case"ascii":return U(this,$,N);case"latin1":case"binary":return z(this,$,N);case"base64":return x(this,$,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,$,N);default:if(F)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),F=!0}}u.prototype._isBuffer=!0;function P(j,$,N){const F=j[$];j[$]=j[N],j[N]=F}u.prototype.swap16=function(){const $=this.length;if($%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let N=0;N<$;N+=2)P(this,N,N+1);return this},u.prototype.swap32=function(){const $=this.length;if($%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let N=0;N<$;N+=4)P(this,N,N+3),P(this,N+1,N+2);return this},u.prototype.swap64=function(){const $=this.length;if($%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let N=0;N<$;N+=8)P(this,N,N+7),P(this,N+1,N+6),P(this,N+2,N+5),P(this,N+3,N+4);return this},u.prototype.toString=function(){const $=this.length;return $===0?"":arguments.length===0?B(this,0,$):A.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function($){if(!u.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$?!0:u.compare(this,$)===0},u.prototype.inspect=function(){let $="";const N=t.INSPECT_MAX_BYTES;return $=this.toString("hex",0,N).replace(/(.{2})/g,"$1 ").trim(),this.length>N&&($+=" ... "),"<Buffer "+$+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function($,N,F,K,te){if(mi($,s)&&($=u.from($,$.offset,$.byteLength)),!u.isBuffer($))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(N===void 0&&(N=0),F===void 0&&(F=$?$.length:0),K===void 0&&(K=0),te===void 0&&(te=this.length),N<0||F>$.length||K<0||te>this.length)throw new RangeError("out of range index");if(K>=te&&N>=F)return 0;if(K>=te)return-1;if(N>=F)return 1;if(N>>>=0,F>>>=0,K>>>=0,te>>>=0,this===$)return 0;let ie=te-K,Je=F-N;const or=Math.min(ie,Je),er=this.slice(K,te),ar=$.slice(N,F);for(let Bt=0;Bt<or;++Bt)if(er[Bt]!==ar[Bt]){ie=er[Bt],Je=ar[Bt];break}return ie<Je?-1:Je<ie?1:0};function y(j,$,N,F,K){if(j.length===0)return-1;if(typeof N=="string"?(F=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,pd(N)&&(N=K?0:j.length-1),N<0&&(N=j.length+N),N>=j.length){if(K)return-1;N=j.length-1}else if(N<0)if(K)N=0;else return-1;if(typeof $=="string"&&($=u.from($,F)),u.isBuffer($))return $.length===0?-1:O(j,$,N,F,K);if(typeof $=="number")return $=$&255,typeof s.prototype.indexOf=="function"?K?s.prototype.indexOf.call(j,$,N):s.prototype.lastIndexOf.call(j,$,N):O(j,[$],N,F,K);throw new TypeError("val must be string, number or Buffer")}function O(j,$,N,F,K){let te=1,ie=j.length,Je=$.length;if(F!==void 0&&(F=String(F).toLowerCase(),F==="ucs2"||F==="ucs-2"||F==="utf16le"||F==="utf-16le")){if(j.length<2||$.length<2)return-1;te=2,ie/=2,Je/=2,N/=2}function or(ar,Bt){return te===1?ar[Bt]:ar.readUInt16BE(Bt*te)}let er;if(K){let ar=-1;for(er=N;er<ie;er++)if(or(j,er)===or($,ar===-1?0:er-ar)){if(ar===-1&&(ar=er),er-ar+1===Je)return ar*te}else ar!==-1&&(er-=er-ar),ar=-1}else for(N+Je>ie&&(N=ie-Je),er=N;er>=0;er--){let ar=!0;for(let Bt=0;Bt<Je;Bt++)if(or(j,er+Bt)!==or($,Bt)){ar=!1;break}if(ar)return er}return-1}u.prototype.includes=function($,N,F){return this.indexOf($,N,F)!==-1},u.prototype.indexOf=function($,N,F){return y(this,$,N,F,!0)},u.prototype.lastIndexOf=function($,N,F){return y(this,$,N,F,!1)};function S(j,$,N,F){N=Number(N)||0;const K=j.length-N;F?(F=Number(F),F>K&&(F=K)):F=K;const te=$.length;F>te/2&&(F=te/2);let ie;for(ie=0;ie<F;++ie){const Je=parseInt($.substr(ie*2,2),16);if(pd(Je))return ie;j[N+ie]=Je}return ie}function k(j,$,N,F){return yl(fd($,j.length-N),j,N,F)}function L(j,$,N,F){return yl(j0($),j,N,F)}function T(j,$,N,F){return yl(z0($),j,N,F)}function C(j,$,N,F){return yl(dg($,j.length-N),j,N,F)}u.prototype.write=function($,N,F,K){if(N===void 0)K="utf8",F=this.length,N=0;else if(F===void 0&&typeof N=="string")K=N,F=this.length,N=0;else if(isFinite(N))N=N>>>0,isFinite(F)?(F=F>>>0,K===void 0&&(K="utf8")):(K=F,F=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const te=this.length-N;if((F===void 0||F>te)&&(F=te),$.length>0&&(F<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ie=!1;for(;;)switch(K){case"hex":return S(this,$,N,F);case"utf8":case"utf-8":return k(this,$,N,F);case"ascii":case"latin1":case"binary":return L(this,$,N,F);case"base64":return T(this,$,N,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,$,N,F);default:if(ie)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ie=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(j,$,N){return $===0&&N===j.length?e.fromByteArray(j):e.fromByteArray(j.slice($,N))}function B(j,$,N){N=Math.min(j.length,N);const F=[];let K=$;for(;K<N;){const te=j[K];let ie=null,Je=te>239?4:te>223?3:te>191?2:1;if(K+Je<=N){let or,er,ar,Bt;switch(Je){case 1:te<128&&(ie=te);break;case 2:or=j[K+1],(or&192)===128&&(Bt=(te&31)<<6|or&63,Bt>127&&(ie=Bt));break;case 3:or=j[K+1],er=j[K+2],(or&192)===128&&(er&192)===128&&(Bt=(te&15)<<12|(or&63)<<6|er&63,Bt>2047&&(Bt<55296||Bt>57343)&&(ie=Bt));break;case 4:or=j[K+1],er=j[K+2],ar=j[K+3],(or&192)===128&&(er&192)===128&&(ar&192)===128&&(Bt=(te&15)<<18|(or&63)<<12|(er&63)<<6|ar&63,Bt>65535&&Bt<1114112&&(ie=Bt))}}ie===null?(ie=65533,Je=1):ie>65535&&(ie-=65536,F.push(ie>>>10&1023|55296),ie=56320|ie&1023),F.push(ie),K+=Je}return M(F)}const R=4096;function M(j){const $=j.length;if($<=R)return String.fromCharCode.apply(String,j);let N="",F=0;for(;F<$;)N+=String.fromCharCode.apply(String,j.slice(F,F+=R));return N}function U(j,$,N){let F="";N=Math.min(j.length,N);for(let K=$;K<N;++K)F+=String.fromCharCode(j[K]&127);return F}function z(j,$,N){let F="";N=Math.min(j.length,N);for(let K=$;K<N;++K)F+=String.fromCharCode(j[K]);return F}function H(j,$,N){const F=j.length;(!$||$<0)&&($=0),(!N||N<0||N>F)&&(N=F);let K="";for(let te=$;te<N;++te)K+=zm[j[te]];return K}function Y(j,$,N){const F=j.slice($,N);let K="";for(let te=0;te<F.length-1;te+=2)K+=String.fromCharCode(F[te]+F[te+1]*256);return K}u.prototype.slice=function($,N){const F=this.length;$=~~$,N=N===void 0?F:~~N,$<0?($+=F,$<0&&($=0)):$>F&&($=F),N<0?(N+=F,N<0&&(N=0)):N>F&&(N=F),N<$&&(N=$);const K=this.subarray($,N);return Object.setPrototypeOf(K,u.prototype),K};function V(j,$,N){if(j%1!==0||j<0)throw new RangeError("offset is not uint");if(j+$>N)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function($,N,F){$=$>>>0,N=N>>>0,F||V($,N,this.length);let K=this[$],te=1,ie=0;for(;++ie<N&&(te*=256);)K+=this[$+ie]*te;return K},u.prototype.readUintBE=u.prototype.readUIntBE=function($,N,F){$=$>>>0,N=N>>>0,F||V($,N,this.length);let K=this[$+--N],te=1;for(;N>0&&(te*=256);)K+=this[$+--N]*te;return K},u.prototype.readUint8=u.prototype.readUInt8=function($,N){return $=$>>>0,N||V($,1,this.length),this[$]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function($,N){return $=$>>>0,N||V($,2,this.length),this[$]|this[$+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function($,N){return $=$>>>0,N||V($,2,this.length),this[$]<<8|this[$+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function($,N){return $=$>>>0,N||V($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function($,N){return $=$>>>0,N||V($,4,this.length),this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])},u.prototype.readBigUInt64LE=so(function($){$=$>>>0,$n($,"offset");const N=this[$],F=this[$+7];(N===void 0||F===void 0)&&ml($,this.length-8);const K=N+this[++$]*2**8+this[++$]*2**16+this[++$]*2**24,te=this[++$]+this[++$]*2**8+this[++$]*2**16+F*2**24;return BigInt(K)+(BigInt(te)<<BigInt(32))}),u.prototype.readBigUInt64BE=so(function($){$=$>>>0,$n($,"offset");const N=this[$],F=this[$+7];(N===void 0||F===void 0)&&ml($,this.length-8);const K=N*2**24+this[++$]*2**16+this[++$]*2**8+this[++$],te=this[++$]*2**24+this[++$]*2**16+this[++$]*2**8+F;return(BigInt(K)<<BigInt(32))+BigInt(te)}),u.prototype.readIntLE=function($,N,F){$=$>>>0,N=N>>>0,F||V($,N,this.length);let K=this[$],te=1,ie=0;for(;++ie<N&&(te*=256);)K+=this[$+ie]*te;return te*=128,K>=te&&(K-=Math.pow(2,8*N)),K},u.prototype.readIntBE=function($,N,F){$=$>>>0,N=N>>>0,F||V($,N,this.length);let K=N,te=1,ie=this[$+--K];for(;K>0&&(te*=256);)ie+=this[$+--K]*te;return te*=128,ie>=te&&(ie-=Math.pow(2,8*N)),ie},u.prototype.readInt8=function($,N){return $=$>>>0,N||V($,1,this.length),this[$]&128?(255-this[$]+1)*-1:this[$]},u.prototype.readInt16LE=function($,N){$=$>>>0,N||V($,2,this.length);const F=this[$]|this[$+1]<<8;return F&32768?F|4294901760:F},u.prototype.readInt16BE=function($,N){$=$>>>0,N||V($,2,this.length);const F=this[$+1]|this[$]<<8;return F&32768?F|4294901760:F},u.prototype.readInt32LE=function($,N){return $=$>>>0,N||V($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},u.prototype.readInt32BE=function($,N){return $=$>>>0,N||V($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},u.prototype.readBigInt64LE=so(function($){$=$>>>0,$n($,"offset");const N=this[$],F=this[$+7];(N===void 0||F===void 0)&&ml($,this.length-8);const K=this[$+4]+this[$+5]*2**8+this[$+6]*2**16+(F<<24);return(BigInt(K)<<BigInt(32))+BigInt(N+this[++$]*2**8+this[++$]*2**16+this[++$]*2**24)}),u.prototype.readBigInt64BE=so(function($){$=$>>>0,$n($,"offset");const N=this[$],F=this[$+7];(N===void 0||F===void 0)&&ml($,this.length-8);const K=(N<<24)+this[++$]*2**16+this[++$]*2**8+this[++$];return(BigInt(K)<<BigInt(32))+BigInt(this[++$]*2**24+this[++$]*2**16+this[++$]*2**8+F)}),u.prototype.readFloatLE=function($,N){return $=$>>>0,N||V($,4,this.length),r.read(this,$,!0,23,4)},u.prototype.readFloatBE=function($,N){return $=$>>>0,N||V($,4,this.length),r.read(this,$,!1,23,4)},u.prototype.readDoubleLE=function($,N){return $=$>>>0,N||V($,8,this.length),r.read(this,$,!0,52,8)},u.prototype.readDoubleBE=function($,N){return $=$>>>0,N||V($,8,this.length),r.read(this,$,!1,52,8)};function G(j,$,N,F,K,te){if(!u.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if($>K||$<te)throw new RangeError('"value" argument is out of bounds');if(N+F>j.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function($,N,F,K){if($=+$,N=N>>>0,F=F>>>0,!K){const Je=Math.pow(2,8*F)-1;G(this,$,N,F,Je,0)}let te=1,ie=0;for(this[N]=$&255;++ie<F&&(te*=256);)this[N+ie]=$/te&255;return N+F},u.prototype.writeUintBE=u.prototype.writeUIntBE=function($,N,F,K){if($=+$,N=N>>>0,F=F>>>0,!K){const Je=Math.pow(2,8*F)-1;G(this,$,N,F,Je,0)}let te=F-1,ie=1;for(this[N+te]=$&255;--te>=0&&(ie*=256);)this[N+te]=$/ie&255;return N+F},u.prototype.writeUint8=u.prototype.writeUInt8=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,1,255,0),this[N]=$&255,N+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,2,65535,0),this[N]=$&255,this[N+1]=$>>>8,N+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,2,65535,0),this[N]=$>>>8,this[N+1]=$&255,N+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,4,4294967295,0),this[N+3]=$>>>24,this[N+2]=$>>>16,this[N+1]=$>>>8,this[N]=$&255,N+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,4,4294967295,0),this[N]=$>>>24,this[N+1]=$>>>16,this[N+2]=$>>>8,this[N+3]=$&255,N+4};function re(j,$,N,F,K){Qt($,F,K,j,N,7);let te=Number($&BigInt(4294967295));j[N++]=te,te=te>>8,j[N++]=te,te=te>>8,j[N++]=te,te=te>>8,j[N++]=te;let ie=Number($>>BigInt(32)&BigInt(4294967295));return j[N++]=ie,ie=ie>>8,j[N++]=ie,ie=ie>>8,j[N++]=ie,ie=ie>>8,j[N++]=ie,N}function de(j,$,N,F,K){Qt($,F,K,j,N,7);let te=Number($&BigInt(4294967295));j[N+7]=te,te=te>>8,j[N+6]=te,te=te>>8,j[N+5]=te,te=te>>8,j[N+4]=te;let ie=Number($>>BigInt(32)&BigInt(4294967295));return j[N+3]=ie,ie=ie>>8,j[N+2]=ie,ie=ie>>8,j[N+1]=ie,ie=ie>>8,j[N]=ie,N+8}u.prototype.writeBigUInt64LE=so(function($,N=0){return re(this,$,N,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=so(function($,N=0){return de(this,$,N,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function($,N,F,K){if($=+$,N=N>>>0,!K){const or=Math.pow(2,8*F-1);G(this,$,N,F,or-1,-or)}let te=0,ie=1,Je=0;for(this[N]=$&255;++te<F&&(ie*=256);)$<0&&Je===0&&this[N+te-1]!==0&&(Je=1),this[N+te]=($/ie>>0)-Je&255;return N+F},u.prototype.writeIntBE=function($,N,F,K){if($=+$,N=N>>>0,!K){const or=Math.pow(2,8*F-1);G(this,$,N,F,or-1,-or)}let te=F-1,ie=1,Je=0;for(this[N+te]=$&255;--te>=0&&(ie*=256);)$<0&&Je===0&&this[N+te+1]!==0&&(Je=1),this[N+te]=($/ie>>0)-Je&255;return N+F},u.prototype.writeInt8=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,1,127,-128),$<0&&($=255+$+1),this[N]=$&255,N+1},u.prototype.writeInt16LE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,2,32767,-32768),this[N]=$&255,this[N+1]=$>>>8,N+2},u.prototype.writeInt16BE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,2,32767,-32768),this[N]=$>>>8,this[N+1]=$&255,N+2},u.prototype.writeInt32LE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,4,2147483647,-2147483648),this[N]=$&255,this[N+1]=$>>>8,this[N+2]=$>>>16,this[N+3]=$>>>24,N+4},u.prototype.writeInt32BE=function($,N,F){return $=+$,N=N>>>0,F||G(this,$,N,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),this[N]=$>>>24,this[N+1]=$>>>16,this[N+2]=$>>>8,this[N+3]=$&255,N+4},u.prototype.writeBigInt64LE=so(function($,N=0){return re(this,$,N,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=so(function($,N=0){return de(this,$,N,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ce(j,$,N,F,K,te){if(N+F>j.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function ae(j,$,N,F,K){return $=+$,N=N>>>0,K||ce(j,$,N,4),r.write(j,$,N,F,23,4),N+4}u.prototype.writeFloatLE=function($,N,F){return ae(this,$,N,!0,F)},u.prototype.writeFloatBE=function($,N,F){return ae(this,$,N,!1,F)};function be(j,$,N,F,K){return $=+$,N=N>>>0,K||ce(j,$,N,8),r.write(j,$,N,F,52,8),N+8}u.prototype.writeDoubleLE=function($,N,F){return be(this,$,N,!0,F)},u.prototype.writeDoubleBE=function($,N,F){return be(this,$,N,!1,F)},u.prototype.copy=function($,N,F,K){if(!u.isBuffer($))throw new TypeError("argument should be a Buffer");if(F||(F=0),!K&&K!==0&&(K=this.length),N>=$.length&&(N=$.length),N||(N=0),K>0&&K<F&&(K=F),K===F||$.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),$.length-N<K-F&&(K=$.length-N+F);const te=K-F;return this===$&&typeof s.prototype.copyWithin=="function"?this.copyWithin(N,F,K):s.prototype.set.call($,this.subarray(F,K),N),te},u.prototype.fill=function($,N,F,K){if(typeof $=="string"){if(typeof N=="string"?(K=N,N=0,F=this.length):typeof F=="string"&&(K=F,F=this.length),K!==void 0&&typeof K!="str
6ing")throw new TypeError("encoding must be a string");if(typeof K=="string"&&!u.isEncoding(K))throw new TypeError("Unknown encoding: "+K);if($.length===1){const ie=$.charCodeAt(0);(K==="utf8"&&ie<128||K==="latin1")&&($=ie)}}else typeof $=="number"?$=$&255:typeof $=="boolean"&&($=Number($));if(N<0||this.length<N||this.length<F)throw new RangeError("Out of range index");if(F<=N)return this;N=N>>>0,F=F===void 0?this.length:F>>>0,$||($=0);let te;if(typeof $=="number")for(te=N;te<F;++te)this[te]=$;else{const ie=u.isBuffer($)?$:u.from($,K),Je=ie.length;if(Je===0)throw new TypeError('The value "'+$+'" is invalid for argument "value"');for(te=0;te<F-N;++te)this[te+N]=ie[te%Je]}return this};const Ce={};function ze(j,$,N){Ce[j]=class extends N{constructor(){super(),Object.defineProperty(this,"message",{value:$.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${j}]`,this.stack,delete this.name}get code(){return j}set code(K){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:K,writable:!0})}toString(){return`${this.name} [${j}]: ${this.message}`}}}ze("ERR_BUFFER_OUT_OF_BOUNDS",function(j){return j?`${j} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ze("ERR_INVALID_ARG_TYPE",function(j,$){return`The "${j}" argument must be of type number. Received type ${typeof $}`},TypeError),ze("ERR_OUT_OF_RANGE",function(j,$,N){let F=`The value of "${j}" is out of range.`,K=N;return Number.isInteger(N)&&Math.abs(N)>2**32?K=Qe(String(N)):typeof N=="bigint"&&(K=String(N),(N>BigInt(2)**BigInt(32)||N<-(BigInt(2)**BigInt(32)))&&(K=Qe(K)),K+="n"),F+=` It must be ${$}. Received ${K}`,F},RangeError);function Qe(j){let $="",N=j.length;const F=j[0]==="-"?1:0;for(;N>=F+4;N-=3)$=`_${j.slice(N-3,N)}${$}`;return`${j.slice(0,N)}${$}`}function vt(j,$,N){$n($,"offset"),(j[$]===void 0||j[$+N]===void 0)&&ml($,j.length-(N+1))}function Qt(j,$,N,F,K,te){if(j>N||j<$){const ie=typeof $=="bigint"?"n":"";let Je;throw $===0||$===BigInt(0)?Je=`>= 0${ie} and < 2${ie} ** ${(te+1)*8}${ie}`:Je=`>= -(2${ie} ** ${(te+1)*8-1}${ie}) and < 2 ** ${(te+1)*8-1}${ie}`,new Ce.ERR_OUT_OF_RANGE("value",Je,j)}vt(F,K,te)}function $n(j,$){if(typeof j!="number")throw new Ce.ERR_INVALID_ARG_TYPE($,"number",j)}function ml(j,$,N){throw Math.floor(j)!==j?($n(j,N),new Ce.ERR_OUT_OF_RANGE("offset","an integer",j)):$<0?new Ce.ERR_BUFFER_OUT_OF_BOUNDS:new Ce.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${$}`,j)}const jm=/[^+/0-9A-Za-z-_]/g;function ug(j){if(j=j.split("=")[0],j=j.trim().replace(jm,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function fd(j,$){$=$||1/0;let N;const F=j.length;let K=null;const te=[];for(let ie=0;ie<F;++ie){if(N=j.charCodeAt(ie),N>55295&&N<57344){if(!K){if(N>56319){($-=3)>-1&&te.push(239,191,189);continue}else if(ie+1===F){($-=3)>-1&&te.push(239,191,189);continue}K=N;continue}if(N<56320){($-=3)>-1&&te.push(239,191,189),K=N;continue}N=(K-55296<<10|N-56320)+65536}else K&&($-=3)>-1&&te.push(239,191,189);if(K=null,N<128){if(($-=1)<0)break;te.push(N)}else if(N<2048){if(($-=2)<0)break;te.push(N>>6|192,N&63|128)}else if(N<65536){if(($-=3)<0)break;te.push(N>>12|224,N>>6&63|128,N&63|128)}else if(N<1114112){if(($-=4)<0)break;te.push(N>>18|240,N>>12&63|128,N>>6&63|128,N&63|128)}else throw new Error("Invalid code point")}return te}function j0(j){const $=[];for(let N=0;N<j.length;++N)$.push(j.charCodeAt(N)&255);return $}function dg(j,$){let N,F,K;const te=[];for(let ie=0;ie<j.length&&!(($-=2)<0);++ie)N=j.charCodeAt(ie),F=N>>8,K=N%256,te.push(K),te.push(F);return te}function z0(j){return e.toByteArray(ug(j))}function yl(j,$,N,F){let K;for(K=0;K<F&&!(K+N>=$.length||K>=j.length);++K)$[K+N]=j[K];return K}function mi(j,$){return j instanceof $||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===$.name}function pd(j){return j!==j}const zm=function(){const j="0123456789abcdef",$=new Array(256);for(let N=0;N<16;++N){const F=N*16;for(let K=0;K<16;++K)$[F+K]=j[N]+j[K]}return $}();function so(j){return typeof BigInt>"u"?Fm:j}function Fm(){throw new Error("BigInt not supported")}})(k6);const Oe=k6.Buffer,FEe=k6.Buffer,KI="2.33.1";let F0={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:`viem@${KI}`}
6,se=class sb extends Error{constructor(e,r={}){var a;const n=(()=>{var c;return r.cause instanceof sb?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),i=r.cause instanceof sb&&r.cause.docsPath||r.docsPath,s=(a=F0.getDocsUrl)==null?void 0:a.call(F0,{...r,docsPath:i}),o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...F0.version?[`Version: ${F0.version}`]:[]].join(`
7`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=KI}walk(e){return ZI(this,e)}};function ZI(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?ZI(t.cause,e):e?null:t}const gr=(t,e,r)=>JSON.stringify(t,(n,i)=>typeof i=="bigint"?i.toString():i,r),QB=t=>t,cp=t=>t;class tu extends se{constructor({body:e,cause:r,details:n,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[s&&`Status: ${s}`,`URL: ${cp(o)}`,e&&`Request body: ${gr(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=o}}class B6 extends se{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${cp(n)}`,`Request body: ${gr(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data}}class F8 extends se{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${cp(r)}`,`Request body: ${gr(e)}`],name:"TimeoutError"})}}const eD=-1;class hi extends se{constructor(e,{code:r,docsPath:n,metaMessages:i,name:s,shortMessage:o}){super(o,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof B6?e.code:r??eD}}class zi extends hi{constructor(e,r){super(e,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class o1 extends hi{constructor(e){super(e,{code:o1.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class a1 extends hi{constructor(e){super(e,{code:a1.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(a1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c1 extends hi{constructor(e,{method:r}={}){super(e,{code:c1.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(c1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});
vendor: 4,630 bytes, lines 7-9
7class l1 extends hi{constructor(e){super(e,{code:l1.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
8`)})}}Object.defineProperty(l1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class lu extends hi{constructor(e){super(e,{code:lu.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(lu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class uu extends hi{constructor(e){super(e,{code:uu.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
9`)})}}Object.defineProperty(uu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class u1 extends hi{constructor(e){super(e,{code:u1.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(u1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class d1 extends hi{constructor(e){super(e,{code:d1.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(d1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ch extends hi{constructor(e){super(e,{code:Ch.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ch,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Fl extends hi{constructor(e,{method:r}={}){super(e,{code:Fl.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Fl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class xh extends hi{constructor(e){super(e,{code:xh.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(xh,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class h1 extends hi{constructor(e){super(e,{code:h1.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(h1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class ru extends zi{constructor(e){super(e,{code:ru.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(ru,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class f1 extends zi{constructor(e){super(e,{code:f1.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(f1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class p1 extends zi{constructor(e,{method:r}={}){super(e,{code:p1.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(p1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class g1 extends zi{constructor(e){super(e,{code:g1.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(g1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class w1 extends zi{constructor(e){super(e,{code:w1.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(w1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class m1 extends zi{constructor(e){super(e,{code:m1.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(m1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class _h extends zi{constructor(e){super(e,{code:_h.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(_h,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class y1 extends zi{constructor(e){super(e,{code:y1.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(y1,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class b1 extends zi{constructor(e){super(e,{code:b1.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(b1,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});
9class v1 extends zi{constructor(e){super(e,{code:v1.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(v1,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class E1 extends zi{constructor(e){super(e,{code:E1.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(E1,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class C1 extends zi{constructor(e){super(e,{code:C1.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(C1,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Sh extends zi{constructor(e){super(e,{code:Sh.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Sh,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class tD extends hi{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}let GI=class extends se{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}};class rD extends se{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class nD extends se{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let iD=class extends se{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}},YI=class extends se{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},JI=class extends se{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};class q8 extends se{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${e} ${n} long.`,{name:"InvalidBytesLengthError"})}}function Oa(t,{dir:e,size:r=32}={}){return typeof t=="string"?Vc(t,{dir:e,size:r}):sD(t,{dir:e,size:r})}function Vc(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new JI({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function sD(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new JI({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const s=e==="right";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}function Ws(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function lr(t){return Ws(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function Na(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let i=0;i<r.length-1&&r[e==="left"?i:r.length-i-1].toString()==="0";i++)n++;return r=e==="left"?r.slice(n):r.slice(0,r.length-n),typeof t=="string"?(r.length===1&&e==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}const oD=new TextEncoder;function p0(t,e={}){return typeof t=="number"||typeof t=="bigint"?cD(t,e):typeof t=="boolean"?aD(t,e):Ws(t)?hs(t,e):nu(t,e)}function aD(t,e={}){const r=new Uint8Array(1);return r[0]=Number(t),typeof e.size=="number"?(Es(r,{size:e.size}),Oa(r,{size:e.size})):r}const Qo={zero:48,nine:57,A:65,F:70,a:97,f:102};function H8(t){if(t>=Qo.zero&&t<=Qo.nine)return t-Qo.zero;if(t>=Qo.A&&t<=Qo.F)return t-(Qo.A-10);if(t>=Qo.a&&t<=Qo.f)return t-(Qo.a-10)}function hs(t,e={}){let r=t;e.size&&(Es(r,{size:e.size}),r=Oa(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){const c=H8(n.charCodeAt(a++)),l=H8(n.charCodeAt(a++));if(c===void 0||l===void 0)throw new se(`Invalid byte sequence ("${n[a-2]}${n[a-1]}" in "${n}").`);s[o]=c*16+l}return s}function cD(t,e){const r=Ee(t,e);return hs(r)}function nu(t,e={}){const r=oD.encode(t);return typeof e.size=="number"?(Es(r,{size:e.size}),Oa(r,{dir:"right",size:e.size})):r}function Es(t,{size:e}){if(lr(t)>
9e)throw new iD({givenSize:lr(t),maxSize:e})}function Ni(t,e={}){const{signed:r}=e;e.size&&Es(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return n<=s?n:n-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function lD(t,e={}){let r=t;if(e.size&&(Es(r,{size:e.size}),r=Na(r)),Na(r)==="0x00")return!1;if(Na(r)==="0x01")return!0;throw new nD(r)}function Ks(t,e={}){return Number(Ni(t,e))}function KEe(t,e={}){let r=hs(t);return e.size&&(Es(r,{size:e.size}),r=Na(r,{dir:"right"})),new TextDecoder().decode(r)}const uD=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Uo(t,e={}){return typeof t=="number"||typeof t=="bigint"?Ee(t,e):typeof t=="string"?du(t,e):typeof t=="boolean"?D6(t,e):Or(t,e)}function D6(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(Es(r,{size:e.size}),Oa(r,{size:e.size})):r}function Or(t,e={}){let r="";for(let i=0;i<t.length;i++)r+=uD[t[i]];const n=`0x${r}`;return typeof e.size=="number"?(Es(n,{size:e.size}),Oa(n,{dir:"right",size:e.size})):n}function Ee(t,e={}){const{signed:r,size:n}=e,i=BigInt(t);let s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&r?-s-1n:0;if(s&&i>s||i<o){const c=typeof t=="bigint"?"n":"";throw new GI({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}const a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?Oa(a,{size:n}):a}const dD=new TextEncoder;function du(t,e={}){const r=dD.encode(t);return Or(r,e)}let lp=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const hg=new lp(8192);function hD(t,{enabled:e=!0,id:r}){if(!e||!r)return t();if(hg.get(r))return hg.get(r);const n=t().finally(()=>hg.delete(r));return hg.set(r,n),n}async function I2(t){return new Promise(e=>setTimeout(e,t))}function ob(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof e=="function"?e({count:a,error:l}):e;u&&await I2(u),o({count:a+1})};try{const l=await t();i(l)}catch(l){if(a<r&&await n({count:a,error:l}))return c({error:l});s(l)}};o()})}function fD(t,e={}){return async(r,n={})=>{var d;const{dedupe:i=!1,methods:s,retryDelay:o=150,retryCount:a=3,uid:c}={...e,...n},{method:l}=r;if((d=s==null?void 0:s.exclude)!=null&&d.includes(l))throw new Fl(new Error("method not supported"),{method:l});if(s!=null&&s.include&&!s.include.includes(l))throw new Fl(new Error("method not supported"),{method:l});const u=i?du(`${c}.${gr(r)}`):void 0;return hD(()=>ob(async()=>{try{return await t(r)}catch(h){const f=h;switch(f.code){case o1.code:throw new o1(f);case a1.code:throw new a1(f);case c1.code:throw new c1(f,{method:r.method});case l1.code:throw new l1(f);case lu.code:throw new lu(f);case uu.code:throw new uu(f);case u1.code:throw new u1(f);case d1.code:throw new d1(f);case Ch.code:throw new Ch(f);case Fl.code:throw new Fl(f,{method:r.method});case xh.code:throw new xh(f);case h1.code:throw new h1(f);case ru.code:throw new ru(f);case f1.code:throw new f1(f);case p1.code:throw new p1(f);case g1.code:throw new g1(f);case w1.code:throw new w1(f);case m1.code:throw new m1(f);case _h.code:throw new _h(f);case y1.code:throw new y1(f);case b1.code:throw new b1(f);case v1.code:throw new v1(f);case E1.code:throw new E1(f);case C1.code:throw new C1(f);case Sh.code:throw new Sh(f);case 5e3:throw new ru(f);default:throw h instanceof se?h:new tD(f)}}},{delay:({count:h,error:f})=>{var g;if(f&&f instanceof tu){const p=(g=f==null?void 0:f.headers)==null?void 0:g.get("Retry-After");if(p!=null&&p.match(/\d/))return Number.parseInt(p)*1e3}return~~(1<<h)*o},retryCount:a,shouldRetry:({error:h})=>pD(h)}),{enabled:i,id:u})}}function pD(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===xh.code||t.code===lu.code:t instanceof tu&&t.status?t.status===403||t.status===408||t.status===4
913||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}const gD="1.0.8";let Fi=class ab extends Error{constructor(e,r={}){var o;const n=r.cause instanceof ab?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,i=r.cause instanceof ab&&r.cause.docsPath||r.docsPath,s=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${gD}`].join(`
10`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}};function rc(t,e){const r=t.exec(e);return r==null?void 0:r.groups}const XI=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,QI=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,e$=/^\(.+?\).*?$/,V8=/^tuple(?<array>(\[(\d*)\])*)$/;function cb(t){let e=t.type;if(V8.test(t.type)&&"components"in t){e="(";const r=t.components.length;for(let i=0;i<r;i++){const s=t.components[i];e+=cb(s),i<r-1&&(e+=", ")}const n=rc(V8,t.type);return e+=`)${(n==null?void 0:n.array)??""}`,cb({...t,type:e})}return"indexed"in t&&t.indexed&&(e=`${e}
10 indexed`),t.name?`${e} ${t.name}`:e}function q0(t){let e="";const r=t.length;for(let n=0;n<r;n++){const i=t[n];e+=cb(i),n!==r-1&&(e+=", ")}return e}function $2(t){var e;return t.type==="function"?`function ${t.name}(${q0(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${(e=t.outputs)!=null&&e.length?` returns (${q0(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${q0(t.inputs)})`:t.type==="error"?`error ${t.name}(${q0(t.inputs)})`:t.type==="constructor"?`constructor(${q0(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?`fallback() external${t.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const t$=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function wD(t){return t$.test(t)}function mD(t){return rc(t$,t)}const r$=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function yD(t){return r$.test(t)}function bD(t){return rc(r$,t)}const n$=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function vD(t){return n$.test(t)}function ED(t){return rc(n$,t)}const i$=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function L6(t){return i$.test(t)}function CD(t){return rc(i$,t)}const s$=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function xD(t){return s$.test(t)}function _D(t){return rc(s$,t)}const o$=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function SD(t){return o$.test(t)}function ID(t){return rc(o$,t)}const $D=/^receive\(\) external payable$/;function AD(t){return $D.test(t)}const PD=new Set(["indexed"]),lb=new Set(["calldata","memory","storage"]);class TD extends Fi{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class OD extends Fi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class ND extends Fi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class kD extends Fi{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class RD extends Fi{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class BD extends Fi{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class DD extends Fi{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class LD extends Fi{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class g0 extends Fi{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class MD extends Fi{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class UD extends Fi{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class jD extends Fi{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class zD extends Fi{constructor({current:e,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function FD(t,e,r){let n="";if(r)for(const i of Object.entries(r)){if(!i)continue;let s="";for(const o of i[1])s+=`[${o.type}${o.name?`:${o.name}`:""}]`;n+=`(${i[0]}{${s}})`}return e?`${e}:${t}${n}`:t}const Hm=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function ub(t,e={}){if(vD(t))return qD(t,e);if(yD(t))return HD(t,e);if(wD(t))return VD(t,e);if(xD(t))return WD(t,e);if(SD(t))return KD(t);if(AD(t))return{type:"receive",stateMutability:"payable"};throw new MD({signature:t})}function qD(t,e={}){const r=ED(t);if(!r)throw new g0({signature:t,type:"function"});const n=Fs(r.parameters),i=[],s=n.length;for(let a=0;a<s;a++)i.push(hu(n[a],{modifiers:lb,structs:e,type:"function"}));const o=[];if(r.returns){const a=Fs(r.returns),c=a.length;for(let l=0;l<c;l++)o.push(hu(a[l],{modifiers:lb,structs:e,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:i,outputs:o}}function HD(t,e={}){const r=bD(t);if(!r)throw new g0({signature:t,type:"event"});const n=Fs(r.parameters),i=[],s=n.length;for(let o=0;o<s;o++)i.push(hu(n[o],{modifiers:PD,structs:e,type:"event"}));return{name:r.name,type:"event",inputs:i}}function VD(t,e={}){const r=mD(t);if(!r)throw new g0({signature:t,type:"error"});const n=Fs(r.parameters),i=[],s=n.length;for(let o=0;o<s;o++)i.push(hu(n[o],{structs:e,type:"error"}));return{name:r.name,type:"error",inputs:i}}function WD(t,e={}){const r=_D(t);if(!r)throw new g0({signature:t,type:"constructor"});const n=Fs(r.parameters),i=[],s=n.length;for(let o=0;o<s;o++)i.push(hu(n[o],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:i}}function KD(t){const e=ID(t);if(!e)throw new g0({signature:t,type:"fallback"});return{type:"fallback",stateMutability:e.stateMutability??"nonpayable"}}const ZD=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,GD=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,YD=/^u?int$/;function hu(t,e){var d,h;const r=FD(t,e==null?void 0:e.type,e==null?void 0:e.structs);if(Hm.has(r))return Hm.get(r);const n=e$.test(t),i=rc(n?GD:ZD,t);if(!i)throw new kD({param:t});if(i.name&&XD(i.name))throw new RD({param:t,name:i.name});const s=i.name?{name:i.name}:{},o=i.modifier==="indexed"?{indexed:!0}:{},a=(e==null?void 0:e.structs)??{};let c,l={};if(n){c="tuple";const f=Fs(i.type),g=[],p=f.length;for(let w=0;w<p;w++)g.push(hu(f[w],{structs:a}));l={components:g}}else if(i.type in a)c="tuple",l={components:a[i.type]};else if(YD.test(i.type))c=`${i.type}256`;else if(c=i.type,(e==null?void 0:e.type)!=="struct"&&!a$(c))throw new ND({type:c});if(i.modifier){if(!((h=(d=e==null?void 0:e.modifiers)==null?void 0:d.has)!=null&&h.call(d,i.modifier)))throw new BD({param:t,type:e==null?void 0:e.type,modifier:i.modifier});if(lb.has(i.modifier)&&!QD(c,!!i.array))throw new DD({param:t,type:e==null?void 0:e.type,modifier:i.modifier})}const u={type:`${c}${i.array??""}`,...s,...o,...l};return Hm.set(r,u),u}function Fs(t,e=[],r="",n=0){const i=t.trim().length;for(let s=0;s<i;s++){const o=t[s],a=t.slice(s+1);switch(o){case",":return n===0?Fs(a,[...e,r.trim()]):Fs(a,e,`${r}${o}`,n);case"(":return Fs(a,e,`${r}${o}`,n+1);case")":return Fs(a,e,`${r}${o}`,n-1);default:return Fs(a,e,`${r}${o}`,n)}}if(r==="")return e;if(n!==0)throw new zD({current:r,depth:n});return e.push(r.trim()),e}function a$(t){return t==="address"||t==="bool"||t==="function"||t==="string"||XI.test(t)||QI.test(t)}const JD=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function XD(t){return t==="address"||t==="bool"||t==="function"||t==="string"||t==="tuple"||XI.test(t)||QI.test(t)||JD.test(t)}function QD(t,e){return e||t==="bytes"||t==="string"||t==="tuple"}function c$(t){const e={},r=t.length;for(let o=0;o<r;o++){const a=t[o];if(!L6(a))continue;const c=CD(a);if(!c)throw new g0({signature:a,type:"struct"});const l=c.properties.split(";"),u=[],d=l.length;for(let h=0;h<d;h++){const g=l[h].trim();if(!g)continue;const p=hu(g,{type:"struct"});u.push(p)}if(!u.length)throw new UD({signature:a});e[c.name]=u}const n={},i=Object.entries(e),s=i.length;for(let o=0;o<s;o++){const[a,c]=i[o];n[a]=l$(c,e)}return n}const eL=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function l$(t,e,r=new Set){const n=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];if(e$.test(o.type))n.push(o);
10else{const c=rc(eL,o.type);if(!(c!=null&&c.type))throw new LD({abiParameter:o});const{array:l,type:u}=c;if(u in e){if(r.has(u))throw new jD({type:u});n.push({...o,type:`tuple${l??""}`,components:l$(e[u]??[],e,new Set([...r,u]))})}else if(a$(u))n.push(o);else throw new OD({type:u})}}return n}function u$(t){const e=c$(t),r=[],n=t.length;for(let i=0;i<n;i++){const s=t[i];L6(s)||r.push(ub(s,e))}return r}function W8(t){let e;if(typeof t=="string")e=ub(t);else{const r=c$(t),n=t.length;for(let i=0;i<n;i++){const s=t[i];if(!L6(s)){e=ub(s,r);break}}}if(!e)throw new TD({signature:t});return e}const wd=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function M6(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function x1(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Zs(t,...e){if(!M6(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function tL(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");x1(t.outputLen),x1(t.blockLen)}function Ih(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function d$(t,e){Zs(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function rL(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function $h(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Vm(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function oo(t,e){return t<<32-e|t>>>e}const nL=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function iL(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function sL(t){for(let e=0;e<t.length;e++)t[e]=iL(t[e]);return t}const K8=nL?t=>t:sL,h$=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",oL=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function _1(t){if(Zs(t),h$)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=oL[t[r]];return e}const ea={_0:48,_9:57,A:65,F:70,a:97,f:102};function Z8(t){if(t>=ea._0&&t<=ea._9)return t-ea._0;if(t>=ea.A&&t<=ea.F)return t-(ea.A-10);if(t>=ea.a&&t<=ea.f)return t-(ea.a-10)}function U6(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(h$)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=Z8(t.charCodeAt(s)),a=Z8(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function aL(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Sw(t){return typeof t=="string"&&(t=aL(t)),Zs(t),t}function ql(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Zs(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let j6=class{};function f$(t){const e=n=>t().update(Sw(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function cL(t=32){if(wd&&typeof wd.getRandomValues=="function")return wd.getRandomValues(new Uint8Array(t));if(wd&&typeof wd.randomBytes=="function")return Uint8Array.from(wd.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const z6=BigInt(0),db=BigInt(1);function A2(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function fg(t){const e=t.toString(16);return e.length&1?"0"+e:e}function p$(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?z6:BigInt("0x"+t)}function Iw(t){return p$(_1(t))}function g$(t){return Zs(t),p$(_1(Uint8Array.from(t).reverse()))}function F6(t,e){return U6(t.toString(16).padStart(e*2,"0"))}function w$(t,e){return F6(t,e).reverse()}function os(t,e,r){let n;if(typeof e=="string")try{n=U6(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(M6(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}const Wm=t=>typeof t=="bigint"&&z6<=t;
vendor: 4,833 bytes, lines 10-11
10function lL(t,e,r){return Wm(t)&&Wm(e)&&Wm(r)&&e<=t&&t<r}function uL(t,e,r,n){if(!lL(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function dL(t){let e;for(e=0;t>z6;t>>=db,e+=1);return e}const $w=t=>(db<<BigInt(t))-db;function hL(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");const n=f=>new Uint8Array(f),i=f=>Uint8Array.of(f);let s=n(t),o=n(t),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},l=(...f)=>r(o,s,...f),u=(f=n(0))=>{o=l(i(0),f),s=l(),f.length!==0&&(o=l(i(1),f),s=l())},d=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const g=[];for(;f<e;){s=l();const p=s.slice();g.push(p),f+=s.length}return ql(...g)};return(f,g)=>{c(),u(f);let p;for(;!(p=g(d()));)u();return c(),p}}function q6(t,e,r={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function n(i,s,o){const a=t[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${c}`)}Object.entries(e).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function G8(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const fL="0.1.1";function pL(){return fL}let yr=class hb extends Error{constructor(e,r={}){const n=(()=>{var c;if(r.cause instanceof hb){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),i=r.cause instanceof hb&&r.cause.docsPath||r.docsPath,o=`https://oxlib.sh${i??""}`,a=[e||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||i?["",n?`Details: ${n}`:void 0,i?`See: ${o}`:void 0]:[]].filter(c=>typeof c=="string").join(`
11`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${pL()}`}),this.cause=r.cause,this.details=n,this.docs=o,this.docsPath=i,this.shortMessage=e}walk(e){return m$(this,e)}};function m$(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?m$(t.cause,e):e?null:t}const gL="#__bigint";function wL(t,e,r){return JSON.stringify(t,(n,i)=>typeof i=="bigint"?i.toString()+gL:i,r)}function mL(t,e){if(J8(t)>e)throw new $L({givenSize:J8(t),maxSize:e})}const ta={zero:48,nine:57,A:65,F:70,a:97,f:102};function Y8(t){if(t>=ta.zero&&t<=ta.nine)return t-ta.zero;if(t>=ta.A&&t<=ta.F)return t-(ta.A-10);if(t>=ta.a&&t<=ta.f)return t-(ta.a-10)}function yL(t,e={}){const{dir:r,size:n=32}=e;if(n===0)return t;if(t.length>n)throw new AL({size:t.length,targetSize:n,type:"Bytes"});const i=new Uint8Array(n);for(let s=0;s<n;s++){const o=r==="right";i[o?s:n-s-1]=t[o?s:t.length-s-1]}return i}function H6(t,e){if(fs(t)>e)throw new kL({givenSize:fs(t),maxSize:e})}function bL(t,e){if(typeof e=="number"&&e>0&&e>fs(t)-1)throw new C$({offset:e,position:"start",size:fs(t)})}function vL(t,e,r){if(typeof e=="number"&&typeof r=="number"&&fs(t)!==r-e)throw new C$({offset:r,position:"end",size:fs(t)})}function y$(t,e={}){const{dir:r,size:n=32}=e;if(n===0)return t;const i=t.replace("0x","");if(i.length>n*2)throw new RL({size:Math.ceil(i.length/2),targetSize:n,type:"Hex"});return`0x${i[r==="right"?"padEnd":"padStart"](n*2,"0")}`}const EL=new TextEncoder;function CL(t){return t instanceof Uint8Array?t:typeof t=="string"?_L(t):xL(t)}function xL(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function _L(t,e={}){const{size:r}=e;let n=t;r&&(H6(t,r),n=pu(t,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);const s=i.length/2,o=new Uint8Array(s);for(let a=0,c=0;a<s;a++){const l=Y8(i.charCodeAt(c++)),u=Y8(i.charCodeAt(c++));if(l===void 0||u===void 0)throw new yr(`Invalid byte sequence ("${i[c-2]}${i[c-1]}" in "${i}").`);o[a]=l*16+u}return o}function SL(t,e={}){const{size:r}=e,n=EL.encode(t);return typeof r=="number"?(mL(n,r),IL(n,r)):n}function IL(t,e){return yL(t,{dir:"right",size:e})}function J8(t){return t.length}let $L=class extends yr{constructor({givenSize:e,maxSize:r}
11){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},AL=class extends yr{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const PL=new TextEncoder,TL=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function OL(t,e={}){const{strict:r=!1}=e;if(!t)throw new X8(t);if(typeof t!="string")throw new X8(t);if(r&&!/^0x[0-9a-fA-F]*$/.test(t))throw new Q8(t);if(!t.startsWith("0x"))throw new Q8(t)}function jo(...t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function b$(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(H6(r,e.size),fu(r,e.size)):r}function v$(t,e={}){let r="";for(let i=0;i<t.length;i++)r+=TL[t[i]];const n=`0x${r}`;return typeof e.size=="number"?(H6(n,e.size),pu(n,e.size)):n}function Tn(t,e={}){const{signed:r,size:n}=e,i=BigInt(t);let s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&r?-s-1n:0;if(s&&i>s||i<o){const l=typeof t=="bigint"?"n":"";throw new E$({max:s?`${s}${l}`:void 0,min:`${o}${l}`,signed:r,size:n,value:`${t}${l}`})}const c=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?fu(c,n):c}function V6(t,e={}){return v$(PL.encode(t),e)}function fu(t,e){return y$(t,{dir:"left",size:e})}function pu(t,e){return y$(t,{dir:"right",size:e})}function W6(t,e,r,n={}){const{strict:i}=n;bL(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return i&&vL(s,e,r),s}function fs(t){return Math.ceil((t.length-2)/2)}function NL(t,e={}){const{strict:r=!1}=e;try{return OL(t,{strict:r}),!0}catch{return!1}}let E$=class extends yr{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number \`${s}\` is not in safe${i?` ${i*8}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${r}\` to \`${e}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}};class X8 extends yr{constructor(e){super(`Value \`${typeof e=="object"?wL(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class Q8 extends yr{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}let kL=class extends yr{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}};class C$ extends yr{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}let RL=class extends yr{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}};function BL(t){return{address:t.address,amount:Tn(t.amount),index:Tn(t.index),validatorIndex:Tn(t.validatorIndex)}}function x$(t){return{...typeof t.baseFeePerGas=="bigint"&&{baseFeePerGas:Tn(t.baseFeePerGas)},...typeof t.blobBaseFee=="bigint"&&{blobBaseFee:Tn(t.blobBaseFee)},...typeof t.feeRecipient=="string"&&{feeRecipient:t.feeRecipient}
11,...typeof t.gasLimit=="bigint"&&{gasLimit:Tn(t.gasLimit)},...typeof t.number=="bigint"&&{number:Tn(t.number)},...typeof t.prevRandao=="bigint"&&{prevRandao:Tn(t.prevRandao)},...typeof t.time=="bigint"&&{time:Tn(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(BL)}}}function wr(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}const fb=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],pb=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],_$=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],S$=[..._$,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],DL=[..._$,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],e9=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t9=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],r9=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],tCe=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],LL="0x82ad56cb",I$="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b
11602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",ML="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",UL="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
11603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";class gb extends se{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class jL extends se{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class zL extends se{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
12`),{name:"ChainNotFoundError"})}}class $$ extends se{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}const A$={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},P$={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},FL={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Gs(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new QL(t.type);return`${t.name}(${Aw(t.inputs,{includeName:e})})`}function Aw(t,{includeName:e=!1}={}){return t?t.map(r=>qL(r,{includeName:e})).join(e?", ":","):""}function qL(t,{includeName:e}){return t.type.startsWith("tuple")?`(${Aw(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class HL extends se{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
13`),{docsPath:e,name:"AbiConstructorNotFoundError"})}}class n9 extends se{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
14`),{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class T$ extends se{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`
15`),{metaMessages:[`Params: (${Aw(r,{includeName:!0})})`,`Data:   ${e} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class up extends se{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class VL extends se{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(`
16`),{name:"AbiEncodingArrayLengthMismatchError"})}}class WL extends se{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${lr(r)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class O$ extends se{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(`
17`),{name:"AbiEncodingLengthMismatchError"})}}class KL extends se{constructor(e,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
18`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}}class i9 extends se{constructor(e,{docsPath:r}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
19`),{docsPath:r,name:"AbiErrorNotFoundError"})}}class N$ extends se{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(`
20`),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class ZL extends se{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class k$ extends se{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(`
21`),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}}class s9 extends se{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
22`),{docsPath:r,name:"AbiEventNotFoundError"})}}class Ah extends se{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
23`),{docsPath:r,name:"AbiFunctionNotFoundError"})}}class R$ extends se{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
24`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}}class GL extends se{constructor(e,{docsPath:r}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(`
25`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}}class YL extends se{constructor(e,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${Gs(e.abiItem)}\`, and`,`\`${r.type}\` in \`${Gs(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let B$=class extends se{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}};class S1 extends se{constructor({abiItem:e,data:r,params:n,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(`
26`),{metaMessages:[`Params: (${Aw(n,{includeName:!0})})`,`Data:   ${r} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=i}}class Pw extends se{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Gs(e,{includeName:!0})}".`].join(`
27`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class JL extends se{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
28`),{docsPath:r,name:"InvalidAbiEncodingType"})}}class XL extends se{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
29`),{docsPath:r,name:"InvalidAbiDecodingType"})}}let D$=class extends se{constructor(e){super([`Value "${e}" is not a valid array.`].join(`
30`),{name:"InvalidArrayError"})}};class QL extends se{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
31`),{name:"InvalidDefinitionTypeError"})}}class eM extends se{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}function Ph(t,e,r,{strict:n}={}
31){return Ws(t,{strict:!1})?P2(t,e,r,{strict:n}):U$(t,e,r,{strict:n})}function L$(t,e){if(typeof e=="number"&&e>0&&e>lr(t)-1)throw new YI({offset:e,position:"start",size:lr(t)})}function M$(t,e,r){if(typeof e=="number"&&typeof r=="number"&&lr(t)!==r-e)throw new YI({offset:r,position:"end",size:lr(t)})}function U$(t,e,r,{strict:n}={}){L$(t,e);const i=t.slice(e,r);return n&&M$(i,e,r),i}function P2(t,e,r,{strict:n}={}){L$(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&M$(i,e,r),i}const pg=BigInt(2**32-1),o9=BigInt(32);function tM(t,e=!1){return e?{h:Number(t&pg),l:Number(t>>o9&pg)}:{h:Number(t>>o9&pg)|0,l:Number(t&pg)|0}}function rM(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=tM(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const nM=(t,e,r)=>t<<r|e>>>32-r,iM=(t,e,r)=>e<<r|t>>>32-r,sM=(t,e,r)=>e<<r-32|t>>>64-r,oM=(t,e,r)=>t<<r-32|e>>>64-r,aM=BigInt(0),H0=BigInt(1),cM=BigInt(2),lM=BigInt(7),uM=BigInt(256),dM=BigInt(113),j$=[],z$=[],F$=[];for(let t=0,e=H0,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],j$.push(2*(5*n+r)),z$.push((t+1)*(t+2)/2%64);let i=aM;for(let s=0;s<7;s++)e=(e<<H0^(e>>lM)*dM)%uM,e&cM&&(i^=H0<<(H0<<BigInt(s))-H0);F$.push(i)}const q$=rM(F$,!0),hM=q$[0],fM=q$[1],a9=(t,e,r)=>r>32?sM(t,e,r):nM(t,e,r),c9=(t,e,r)=>r>32?oM(t,e,r):iM(t,e,r);function pM(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=a9(l,u,1)^r[a],h=c9(l,u,1)^r[a+1];for(let f=0;f<50;f+=10)t[o+f]^=d,t[o+f+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=z$[o],c=a9(i,s,a),l=c9(i,s,a),u=j$[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=hM[n],t[1]^=fM[n]}$h(r)}let gM=class H$ extends j6{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,x1(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=rL(this.state)}clone(){return this._cloneInto()}keccak(){K8(this.state32),pM(this.state32,this.rounds),K8(this.state32),this.posOut=0,this.pos=0}update(e){Ih(this),e=Sw(e),Zs(e);const{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Ih(this,!1),Zs(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return x1(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(d$(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,$h(this.state)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new H$(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const wM=(t,e,r)=>f$(()=>new gM(e,t,r)),V$=wM(1,136,256/8);function an(t,e){const r=e||"hex",n=V$(Ws(t,{strict:!1})?p0(t):t);return r==="bytes"?n:Uo(n)}const mM=t=>an(p0(t));function yM(t){return mM(t)}function bM(t){let e=!0,r="",n=0,i="",s=!1;for(let o=0;o<t.length;o++){const a=t[o];if(["(",")",","].includes(a)&&(e=!0),a==="("&&n++,a===")"&&n--,!!e){if(n===0){if(a===" "&&["event","function",""].includes(i))i="";else if(i+=a,a===")"){s=!0;break}continue}if(a===" "){t[o-1]!==","&&r!==","&&r!==",("&&(r="",e=!1);continue}i+=a,r+=a}}if(!s)throw new se("Unable to normalize signature.");return i}const vM=t=>{const e=typeof t=="string"?t:$2(t);return bM(e)};function W$(t){return yM(vM(t))}const dp=t=>Ph(W$(t),0,4);let Ma=class extends se{constructor({address:e}){super(`Address "${e}
31" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}};const EM=/^0x[a-fA-F0-9]{40}$/,Km=new lp(8192);function ki(t,e){const{strict:r=!0}=e??{},n=`${t}.${r}`;if(Km.has(n))return Km.get(n);const i=EM.test(t)?t.toLowerCase()===t?!0:r?hp(t)===t:!0:!1;return Km.set(n,i),i}const Zm=new lp(8192);function hp(t,e){if(Zm.has(`${t}.${e}`))return Zm.get(`${t}.${e}`);const r=t.substring(2).toLowerCase(),n=an(nu(r),"bytes"),i=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return Zm.set(`${t}.${e}`,s),s}function K$(t,e){if(!ki(t,{strict:!1}))throw new Ma({address:t});return hp(t,e)}class l9 extends se{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Z$ extends se{constructor({length:e,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class CM extends se{constructor({count:e,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const xM={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new CM({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Z$({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new l9({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new l9({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function K6(t,{recursiveReadLimit:e=8192}={}){const r=Object.create(xM);return r.bytes=t,r.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}function _M(t,e={}){typeof e.size<"u"&&Es(t,{size:e.size});const r=Or(t,e);return Ni(r,e)}function SM(t,e={}){let r=t;if(typeof e.size<"u"&&(Es(r,{size:e.size}),r=Na(r)),r.length>1||r[0]>1)throw new rD(r);return!!r[0]}function ka(t,e={}){typeof e.size<"u"&&Es(t,{size:e.size});const r=Or(t,e);return Ks(r,e)}function IM(t,e={}){let r=t;return typeof e.size<"u"&&(Es(r,{size:e.size}),r=Na(r,{dir:"right"})),new TextDecoder().decode(r)}function Ri(t){return typeof t[0]=="string"?sl(t):$M(t)}function $M(t){let e=0;for(const i of t)e+=i.length;
31const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function sl(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}const AM=/^(.*)\[([0-9]*)\]$/,G$=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Z6=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function nc(t,e){if(t.length!==e.length)throw new O$({expectedLength:t.length,givenLength:e.length});const r=PM({params:t,values:e}),n=Y6(r);return n.length===0?"0x":n}function PM({params:t,values:e}){const r=[];for(let n=0;n<t.length;n++)r.push(G6({param:t[n],value:e[n]}));return r}function G6({param:t,value:e}){const r=J6(t.type);if(r){const[n,i]=r;return OM(e,{length:n,param:{...t,type:i}})}if(t.type==="tuple")return DM(e,{param:t});if(t.type==="address")return TM(e);if(t.type==="bool")return kM(e);if(t.type.startsWith("uint")||t.type.startsWith("int")){const n=t.type.startsWith("int"),[,,i="256"]=Z6.exec(t.type)??[];return RM(e,{signed:n,size:Number(i)})}if(t.type.startsWith("bytes"))return NM(e,{param:t});if(t.type==="string")return BM(e);throw new JL(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Y6(t){let e=0;for(let s=0;s<t.length;s++){const{dynamic:o,encoded:a}=t[s];o?e+=32:e+=lr(a)}const r=[],n=[];let i=0;for(let s=0;s<t.length;s++){const{dynamic:o,encoded:a}=t[s];o?(r.push(Ee(e+i,{size:32})),n.push(a),i+=lr(a)):r.push(a)}return Ri([...r,...n])}function TM(t){if(!ki(t))throw new Ma({address:t});return{dynamic:!1,encoded:Vc(t.toLowerCase())}}function OM(t,{length:e,param:r}){const n=e===null;if(!Array.isArray(t))throw new D$(t);if(!n&&t.length!==e)throw new VL({expectedLength:e,givenLength:t.length,type:`${r.type}[${e}]`});let i=!1;const s=[];for(let o=0;o<t.length;o++){const a=G6({param:r,value:t[o]});a.dynamic&&(i=!0),s.push(a)}if(n||i){const o=Y6(s);if(n){const a=Ee(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?Ri([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Ri(s.map(({encoded:o})=>o))}}function NM(t,{param:e}){const[,r]=e.type.split("bytes"),n=lr(t);if(!r){let i=t;return n%32!==0&&(i=Vc(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Ri([Vc(Ee(n,{size:32})),i])}}if(n!==Number.parseInt(r))throw new WL({expectedSize:Number.parseInt(r),value:t});return{dynamic:!1,encoded:Vc(t,{dir:"right"})}}function kM(t){if(typeof t!="boolean")throw new se(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Vc(D6(t))}}function RM(t,{signed:e,size:r=256}){if(typeof r=="number"){const n=2n**(BigInt(r)-(e?1n:0n))-1n,i=e?-n-1n:0n;if(t>n||t<i)throw new GI({max:n.toString(),min:i.toString(),signed:e,size:r/8,value:t.toString()})}return{dynamic:!1,encoded:Ee(t,{size:32,signed:e})}}function BM(t){const e=du(t),r=Math.ceil(lr(e)/32),n=[];for(let i=0;i<r;i++)n.push(Vc(Ph(e,i*32,(i+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Ri([Vc(Ee(lr(e),{size:32})),...n])}}function DM(t,{param:e}){let r=!1;const n=[];for(let i=0;i<e.components.length;i++){const s=e.components[i],o=Array.isArray(t)?i:s.name,a=G6({param:s,value:t[o]});n.push(a),a.dynamic&&(r=!0)}return{dynamic:r,encoded:r?Y6(n):Ri(n.map(({encoded:i})=>i))}}function J6(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function fp(t,e){const r=typeof e=="string"?hs(e):e,n=K6(r);if(lr(r)===0&&t.length>0)throw new up;if(lr(e)&&lr(e)<32)throw new T$({data:typeof e=="string"?e:Or(e),params:t,size:lr(e)});let i=0;const s=[];for(let o=0;o<t.length;++o){const a=t[o];n.setPosition(i);const[c,l]=gh(n,a,{staticPosition:0});i+=l,s.push(c)}return s}function gh(t,e,{staticPosition:r}){const n=J6(e.type);if(n){const[i,s]=n;return MM(t,{...e,type:s},{length:i,staticPosition:r})}if(e.type==="tuple")return FM(t,e,{staticPosition:r});if(e.type==="address")return LM(t);if(e.type==="bool")return UM(t);if(e.type.startsWith("bytes"))return jM(t,e,{staticPosition:r});if(e.type.startsWith("uint")||e.type.startsWith("int"))return zM(t,e);if(e.type==="string")return qM(t,{staticPosition:r});throw new XL(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const u9=32,wb=32;function LM(t){const e=t.readBytes(32);return[hp(Or(U$(e,-20))),32]}function MM(t,e,{length:r,staticPosition:n}){if(!r){const o=ka(t.readBytes(wb)),a=n+o,c=a+u9;t.setPosition(a);const l=ka(t.readBytes(u9)),u=I1(e);let d=0;const h=[];for(let f=0;f<l;++f){t.setPosition(c+(u?f*32:d));const[g,p]=gh(t,e,{staticPosition:c});d+=p,h.push(g)}return t.setPosition(n+32),[h,32]}if(I1(e)){const o=ka(t.readBytes(wb)),a=n+o,c=[];for(let l=0;l<r;++l){t.setPosition(a+l*32);const[u]=gh(t,e,{staticPosition:a});c.push(u)}return t.setPosition(n+32),[c,32]}let i=0;const s=[];for(let o=0;o<r;++o){const[a,c]=gh(t,e,{staticPosition:n+i});i+=c,s.push(a)}return[s,i]}function UM(t){return[SM(t.readBytes(32),{size:32}),32]}function jM(t,e,{staticPosition:r}){const[n,i]=e.type.split("bytes");if(!i){const o=ka(t.readBytes(32));t.setPosition(r+o);const a=ka(t.readBytes(32));if(a===0)return t.setPosition(r+32),["0x",32];const c=t.readBytes(a);return t.setPosition(r+32),[Or(c),32]}return[Or(t.readBytes(Number.parseInt(i),32)),32]}function zM(t,e){const r=e.type.startsWith("int"),n=Number.parseInt(e.type.split("int")[1]||"256"),i=t.readBytes(32);return[n>48?_M(i,{signed:r}):ka(i,{signed:r}),32]}function FM(t,e,{staticPosition:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),i=n?[]:{};let s=0;if(I1(e)){const o=ka(t.readBytes(wb)),a=r+o;for(let c=0;c<e.components.length;++c){const l=e.components[c];t.setPosition(a+s);const[u,d]=gh(t,l,{staticPosition:a});s+=d,i[n?c:l==null?void 0:l.name]=u}return t.setPosition(r+32),[i,32]}for(let o=0;o<e.components.length;++o){const a=e.components[o],[c,l]=gh(t,a,{staticPosition:r});i[n?o:a==null?void 0:a.name]=c,s+=l}return[i,s]}function qM(t,{staticPosition:e}){const r=ka(t.readBytes(32)),n=e+r;t.setPosition(n);const i=ka(t.readBytes(32));if(i===0)return t.setPosition(e+32),["",32];const s=t.readBytes(i,32),o=IM(Na(s));return t.setPosition(e+32),[o,32]}function I1(t){var n;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;
31if(e==="tuple")return(n=t.components)==null?void 0:n.some(I1);const r=J6(t.type);return!!(r&&I1({...t,type:r[1]}))}function Y$(t){const{abi:e,data:r}=t,n=Ph(r,0,4);if(n==="0x")throw new up;const s=[...e||[],P$,FL].find(o=>o.type==="error"&&n===dp(Gs(o)));if(!s)throw new N$(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?fp(s.inputs,Ph(r,4)):void 0,errorName:s.name}}function J$({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,s)=>`${n&&i.name?`${i.name}: `:""}${typeof e[s]=="object"?gr(e[s]):e[s]}`).join(", ")})`}const Tw=W$;function ju(t){const{abi:e,args:r=[],name:n}=t,i=Ws(n,{strict:!1}),s=e.filter(a=>i?a.type==="function"?dp(a)===n:a.type==="event"?Tw(a)===n:!1:"name"in a&&a.name===n);if(s.length===0)return;if(s.length===1)return s[0];let o;for(const a of s){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((l,u)=>{const d="inputs"in a&&a.inputs[u];return d?mb(l,d):!1})){if(o&&"inputs"in o&&o.inputs){const l=X$(a.inputs,o.inputs,r);if(l)throw new YL({abiItem:a,type:l[0]},{abiItem:o,type:l[1]})}o=a}}return o||s[0]}function mb(t,e){const r=typeof t,n=e.type;switch(n){case"address":return ki(t,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>mb(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>mb(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function X$(t,e,r){for(const n in t){const i=t[n],s=e[n];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return X$(i.components,s.components,r[n]);const o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?ki(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?ki(r[n],{strict:!1}):!1)return o}}const Q$={gwei:9,wei:18},HM={ether:-9,wei:9};function Ow(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,s]=[r.slice(0,r.length-e),r.slice(r.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}function X6(t,e="wei"){return Ow(t,Q$[e])}function ci(t,e="wei"){return Ow(t,HM[e])}class VM extends se{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class WM extends se{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function d9(t){return t.reduce((e,{slot:r,value:n})=>`${e}        ${r}: ${n}
32`,"")}function KM(t){return t.reduce((e,{address:r,...n})=>{let i=`${e}    ${r}:
33`;return n.nonce&&(i+=`      nonce: ${n.nonce}
34`),n.balance&&(i+=`      balance: ${n.balance}
35`),n.code&&(i+=`      code: ${n.code}
36`),n.state&&(i+=`      state:
37`,i+=d9(n.state)),n.stateDiff&&(i+=`      stateDiff:
38`,i+=d9(n.stateDiff)),i},`  State Override:
39`).slice(0,-1)}function pp(t){const e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>`  ${`${n}:`.padEnd(r+1)}  ${i}`).join(`
40`)}class ZM extends se{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
41`),{name:"FeeConflictError"})}}class GM extends se{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",pp(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class YM extends se{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:h}){var g;const f=pp({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:r==null?void 0:r.address,to:d,value:typeof h<"u"&&`${X6(h)} ${((g=i==null?void 0:i.nativeCurrency)==null?void 0:g.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ci(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ci(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ci(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",f].filter(
41Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class eA extends se{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){let o="Transaction";n&&s!==void 0&&(o=`Transaction at block time "${n}" at index "${s}"`),e&&s!==void 0&&(o=`Transaction at block hash "${e}" at index "${s}"`),r&&s!==void 0&&(o=`Transaction at block number "${r}" at index "${s}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class tA extends se{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class JM extends se{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}class rA extends se{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:h,stateOverride:f}){var w;const g=r?wr(r):void 0;let p=pp({from:g==null?void 0:g.address,to:d,value:typeof h<"u"&&`${X6(h)} ${((w=i==null?void 0:i.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ci(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ci(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ci(l)} gwei`,nonce:u});f&&(p+=`
42${KM(f)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class XM extends se{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:s,functionName:o,sender:a}){const c=ju({abi:r,args:n,name:o}),l=c?J$({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,u=c?Gs(c,{includeName:!0}):void 0,d=pp({address:i&&QB(i),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}}class yb extends se{constructor({abi:e,data:r,functionName:n,message:i}){let s,o,a,c;if(r&&r!=="0x")try{o=Y$({abi:e,data:r});const{abiItem:u,errorName:d,args:h}=o;if(d==="Error")c=h[0];else if(d==="Panic"){const[f]=h;c=A$[f]}else{const f=u?Gs(u,{includeName:!0}):void 0,g=u&&h?J$({abiItem:u,args:h,includeFunctionName:!1,includeName:!1}):void 0;a=[f?`Error: ${f}`:"",g&&g!=="()"?`       ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${g}`:""]}}catch(u){s=u}else i&&(c=i);let l;s instanceof N$&&(l=s.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(`
43`):`The contract function "${n}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.raw=r,this.reason=c,this.signature=l}}class QM extends se{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class eU extends se{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class Nw extends se{constructor({data:e,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}const Gm="/docs/contract/decodeFunctionResult";function zu(t){const{abi:e,args:r,functionName:n,data:i}=t;let s=e[0];if(n){const a=ju({abi:e,args:r,name:n});if(!a)throw new Ah(n,{docsPath:Gm});s=a}if(s.type!=="function")throw new Ah(void 0,{docsPath:Gm});if(!s.outputs)throw new R$(s.name,{docsPath:Gm});const o=fp(s.outputs,i);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const Ym="/docs/contract/encodeDeployData";function kw(t){const{abi:e,args:r,bytecode:n}=t;if(!r||r.length===0)return n;const i=e.find(o=>"type"in o&&o.type==="constructor");if(!i)throw new HL({docsPath:Ym});if(!("inputs"in i))throw new n9({docsPath:Ym});if(!i.inputs||i.inputs.length===0)throw new n9({docsPath:Ym});const s=nc(i.inputs,r);return sl([n,s])}const h9="/docs/contract/encodeFunctionData";function tU(t){const{abi:e,args:r,functionName:n}=t;let i=e[0];if(n){const s=ju({abi:e,args:r,name:n});if(!s)throw new Ah(n,{docsPath:h9});i=s}if(i.type!=="function")throw new Ah(void 0,{docsPath:h9});return{abi:[i],functionName:dp(Gs(i))}}function Cs(t){const{args:e}=t,{abi:r,functionName:n}=(()=>{var a;return t.abi.length===1&&((a=t.functionName)!=null&&a.startsWith("0x"))?t:tU(t)})(),i=r[0],s=n,o="inputs"in i&&i.inputs?nc(i.inputs,e??[]):void 0;return sl([s,o??"0x"])}function w0({blockNumber:t,chain:e,contract:r}){var i;const n=(i=e==null?void 0:e.contracts)==null?void 0:i[r];if(!n)throw new gb({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new gb({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class Hl extends se{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(Hl,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Hl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class T2 extends se{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ci(r)}
43 gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(T2,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class bb extends se{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ci(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(bb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class vb extends se{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(vb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Eb extends se{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
44`),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(Eb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Cb extends se{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(Cb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class xb extends se{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
45`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(xb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class _b extends se{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(_b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Sb extends se{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Sb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Ib extends se{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Ib,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class O2 extends se{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ci(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ci(n)} gwei`:""}).`].join(`
46`),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(O2,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class gp extends se{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function Rw(t,e){const r=(t.details||"").toLowerCase(),n=t instanceof se?t.walk(i=>(i==null?void 0:i.code)===Hl.code):t;return n instanceof se?new Hl({cause:t,message:n.details}):Hl.nodeMessage.test(r)?new Hl({cause:t,message:t.details}):T2.nodeMessage.test(r)?new T2({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):bb.nodeMessage.test(r)?new bb({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}
46):vb.nodeMessage.test(r)?new vb({cause:t,nonce:e==null?void 0:e.nonce}):Eb.nodeMessage.test(r)?new Eb({cause:t,nonce:e==null?void 0:e.nonce}):Cb.nodeMessage.test(r)?new Cb({cause:t,nonce:e==null?void 0:e.nonce}):xb.nodeMessage.test(r)?new xb({cause:t}):_b.nodeMessage.test(r)?new _b({cause:t,gas:e==null?void 0:e.gas}):Sb.nodeMessage.test(r)?new Sb({cause:t,gas:e==null?void 0:e.gas}):Ib.nodeMessage.test(r)?new Ib({cause:t}):O2.nodeMessage.test(r)?new O2({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new gp({cause:t})}function nA(t,{docsPath:e,...r}){const n=(()=>{const i=Rw(t,r);return i instanceof gp?t:i})();return new rA(n,{docsPath:e,...r})}function Bw(t,{format:e}){if(!e)return{};const r={};function n(s){const o=Object.keys(s);for(const a of o)a in t&&(r[a]=t[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&n(s[a])}const i=e(t||{});return n(i),r}const rU={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function m0(t){const e={};return typeof t.authorizationList<"u"&&(e.authorizationList=nU(t.authorizationList)),typeof t.accessList<"u"&&(e.accessList=t.accessList),typeof t.blobVersionedHashes<"u"&&(e.blobVersionedHashes=t.blobVersionedHashes),typeof t.blobs<"u"&&(typeof t.blobs[0]!="string"?e.blobs=t.blobs.map(r=>Or(r)):e.blobs=t.blobs),typeof t.data<"u"&&(e.data=t.data),typeof t.from<"u"&&(e.from=t.from),typeof t.gas<"u"&&(e.gas=Ee(t.gas)),typeof t.gasPrice<"u"&&(e.gasPrice=Ee(t.gasPrice)),typeof t.maxFeePerBlobGas<"u"&&(e.maxFeePerBlobGas=Ee(t.maxFeePerBlobGas)),typeof t.maxFeePerGas<"u"&&(e.maxFeePerGas=Ee(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<"u"&&(e.maxPriorityFeePerGas=Ee(t.maxPriorityFeePerGas)),typeof t.nonce<"u"&&(e.nonce=Ee(t.nonce)),typeof t.to<"u"&&(e.to=t.to),typeof t.type<"u"&&(e.type=rU[t.type]),typeof t.value<"u"&&(e.value=Ee(t.value)),e}function nU(t){return t.map(e=>({address:e.address,r:e.r?Ee(BigInt(e.r)):e.r,s:e.s?Ee(BigInt(e.s)):e.s,chainId:Ee(e.chainId),nonce:Ee(e.nonce),...typeof e.yParity<"u"?{yParity:Ee(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:Ee(e.v)}:{}}))}function Q6(){let t=()=>{},e=()=>{};return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}}const Jm=new Map;function iA({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){const s=async()=>{const u=c();o();const d=u.map(({args:h})=>h);d.length!==0&&t(d).then(h=>{i&&Array.isArray(h)&&h.sort(i);for(let f=0;f<u.length;f++){const{resolve:g}=u[f];g==null||g([h[f],h])}}).catch(h=>{for(let f=0;f<u.length;f++){const{reject:g}=u[f];g==null||g(h)}})},o=()=>Jm.delete(e),a=()=>c().map(({args:u})=>u),c=()=>Jm.get(e)||[],l=u=>Jm.set(e,[...c(),u]);return{flush:o,async schedule(u){const{promise:d,resolve:h,reject:f}=Q6();return(r==null?void 0:r([...a(),u]))&&s(),c().length>0?(l({args:u,resolve:h,reject:f}),d):(l({args:u,resolve:h,reject:f}),setTimeout(s,n),d)}}}function f9(t){if(!(!t||t.length===0))return t.reduce((e,{slot:r,value:n})=>{if(r.length!==66)throw new q8({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new q8({size:n.length,targetSize:66,type:"hex"});return e[r]=n,e},{})}function iU(t){const{balance:e,nonce:r,state:n,stateDiff:i,code:s}=t,o={};if(s!==void 0&&(o.code=s),e!==void 0&&(o.balance=Ee(e)),r!==void 0&&(o.nonce=Ee(r)),n!==void 0&&(o.state=f9(n)),i!==void 0){if(o.state)throw new WM;o.stateDiff=f9(i)}return o}function ev(t){if(!t)return;const e={};for(const{address:r,...n}of t){if(!ki(r,{strict:!1}))throw new Ma({address:r});if(e[r])throw new VM({address:r});e[r]=iU(n)}return e}const sU=2n**256n-1n;function Fu(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:s}=t,o=e?wr(e):void 0;if(o&&!ki(o.address))throw new Ma({address:o.address});if(s&&!ki(s))throw new Ma({address:s});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new ZM;if(n&&n>sU)throw new T2({maxFeePerGas:n});if(i&&n&&i>n)throw new O2({maxFeePerGas:n,maxPriorityFeePerGas:i})}async function wp(t,e){var L,T,C,x;const{account:r=t.account,authorizationList:n,batch:i=!!((L=t.batch)!=null&&L.multicall),blockNumber:s,blockTag:o=t.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:l,code:u,data:d,factory:h,factoryData:f,gas:g,gasPrice:p,maxFeePerBlobGas:w,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:v,to:E,value:
46I,stateOverride:_,...A}=e,P=r?wr(r):void 0;if(u&&(h||f))throw new se("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&E)throw new se("Cannot provide both `code` & `to` as parameters.");const y=u&&d,O=h&&f&&E&&d,S=y||O,k=y?cU({code:u,data:d}):O?lU({data:d,factory:h,factoryData:f,to:E}):d;try{Fu(e);const R=(typeof s=="bigint"?Ee(s):void 0)||o,M=l?x$(l):void 0,U=ev(_),z=(x=(C=(T=t.chain)==null?void 0:T.formatters)==null?void 0:C.transactionRequest)==null?void 0:x.format,Y=(z||m0)({...Bw(A,{format:z}),from:P==null?void 0:P.address,accessList:a,authorizationList:n,blobs:c,data:k,gas:g,gasPrice:p,maxFeePerBlobGas:w,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:v,to:S?void 0:E,value:I});if(i&&oU({request:Y})&&!U&&!M)try{return await aU(t,{...Y,blockNumber:s,blockTag:o})}catch(re){if(!(re instanceof $$)&&!(re instanceof gb))throw re}const V=(()=>{const re=[Y,R];return U&&M?[...re,U,M]:U?[...re,U]:M?[...re,{},M]:re})(),G=await t.request({method:"eth_call",params:V});return G==="0x"?{data:void 0}:{data:G}}catch(B){const R=uU(B),{offchainLookup:M,offchainLookupSignature:U}=await J(async()=>{const{offchainLookup:z,offchainLookupSignature:H}=await Promise.resolve().then(()=>bU);return{offchainLookup:z,offchainLookupSignature:H}},void 0);if(t.ccipRead!==!1&&(R==null?void 0:R.slice(0,10))===U&&E)return{data:await M(t,{data:R,to:E})};throw S&&(R==null?void 0:R.slice(0,10))==="0x101bb98d"?new eU({factory:h}):nA(B,{...e,account:P,chain:t.chain})}}function oU({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(LL)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function aU(t,e){var p;const{batchSize:r=1024,wait:n=0}=typeof((p=t.batch)==null?void 0:p.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:s=t.experimental_blockTag??"latest",data:o,multicallAddress:a,to:c}=e;let l=a;if(!l){if(!t.chain)throw new $$;l=w0({blockNumber:i,chain:t.chain,contract:"multicall3"})}const d=(typeof i=="bigint"?Ee(i):void 0)||s,{schedule:h}=iA({id:`${t.uid}.${d}`,wait:n,shouldSplitBatch(w){return w.reduce((b,{data:v})=>b+(v.length-2),0)>r*2},fn:async w=>{const m=w.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),b=Cs({abi:fb,args:[m],functionName:"aggregate3"}),v=await t.request({method:"eth_call",params:[{data:b,to:l},d]});return zu({abi:fb,args:[m],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:f,success:g}]=await h({data:o,to:c});if(!g)throw new Nw({data:f});return f==="0x"?{data:void 0}:{data:f}}function cU(t){const{code:e,data:r}=t;return kw({abi:u$(["constructor(bytes, bytes)"]),bytecode:I$,args:[e,r]})}function lU(t){const{data:e,factory:r,factoryData:n,to:i}=t;return kw({abi:u$(["constructor(address, bytes, address, bytes)"]),bytecode:ML,args:[i,e,r,n]})}function uU(t){var r;if(!(t instanceof se))return;const e=t.walk();return typeof(e==null?void 0:e.data)=="object"?(r=e.data)==null?void 0:r.data:e.data}class dU extends se{constructor({callbackSelector:e,cause:r,data:n,extraData:i,sender:s,urls:o}){var a;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(a=r.metaMessages)!=null&&a.length?"":[],"Offchain Gateway Call:",o&&["  Gateway URL(s):",...o.map(c=>`    ${cp(c)}`)],`  Sender: ${s}`,`  Data: ${n}`,`  Callback selector: ${e}`,`  Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class hU extends se{constructor({result:e,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${cp(r)}`,`Response: ${gr(e)}`],name:"OffchainLookupResponseMalformedError"})}}class fU extends se{constructor({sender:e,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}function mp(t,e){if(!ki(t,{strict:!1}))throw new Ma({address:t});if(!ki(e,{strict:!1}))throw new Ma({address:e});return t.toLowerCase()===e.toLowerCase()}function pU(t){const{abi:e,data:r}=t,n=Ph(r,0,4),i=e.find(s=>s.type==="function"&&n===dp(Gs(s)));if(!i)throw new GL(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:i.name,args:"inputs"in i&&i.inputs&&i.inputs.length>0?fp(i.inputs,Ph(r,4)):void 0}}const Xm="/docs/contract/encodeErrorResult";function p9(t){const{abi:e,errorName:r,args:n}=t;let i=e[0];if(r){const c=ju({abi:e,args:n,name:r});if(!c)throw new i9(r,{docsPath:Xm});i=c}if(i.type!=="error")throw new i9(void 0,{docsPath:Xm});const s=Gs(i),o=dp(s);let a="0x";if(n&&n.length>0){if(!i.inputs)throw new KL(i.name,{docsPath:Xm});a=nc(i.inputs,n)}return sl([o,a])}const Qm="/docs/contract/encodeFunctionResult";function gU(t){const{abi:e,functionName:r,result:n}=t;let i=e[0];if(r){const o=ju({abi:e,name:r});if(!o)throw new Ah(r,{docsPath:Qm});i=o}if(i.type!=="function")throw new Ah(void 0,{docsPath:Qm});if(!i.outputs)throw new R$(i.name,{docsPath:Qm});const s=(()=>
46{if(i.outputs.length===0)return[];if(i.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new D$(n)})();return nc(i.outputs,s)}const Dw="x-batch-gateway:true";async function sA(t){const{data:e,ccipRequest:r}=t,{args:[n]}=pU({abi:pb,data:e}),i=[],s=[];return await Promise.all(n.map(async(o,a)=>{try{s[a]=o.urls.includes(Dw)?await sA({data:o.data,ccipRequest:r}):await r(o),i[a]=!1}catch(c){i[a]=!0,s[a]=wU(c)}})),gU({abi:pb,functionName:"query",result:[i,s]})}function wU(t){return t.name==="HttpRequestError"&&t.status?p9({abi:pb,errorName:"HttpError",args:[t.status,t.shortMessage]}):p9({abi:[P$],errorName:"Error",args:["shortMessage"in t?t.shortMessage:t.message]})}const mU="0x556f1830",oA={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function yU(t,{blockNumber:e,blockTag:r,data:n,to:i}){const{args:s}=Y$({data:n,abi:[oA]}),[o,a,c,l,u]=s,{ccipRead:d}=t,h=d&&typeof(d==null?void 0:d.request)=="function"?d.request:aA;try{if(!mp(i,o))throw new fU({sender:o,to:i});const f=a.includes(Dw)?await sA({data:c,ccipRequest:h}):await h({data:c,sender:o,urls:a}),{data:g}=await wp(t,{blockNumber:e,blockTag:r,data:Ri([l,nc([{type:"bytes"},{type:"bytes"}],[f,u])]),to:i});return g}catch(f){throw new dU({callbackSelector:l,cause:f,data:n,extraData:u,sender:o,urls:a})}}async function aA({data:t,sender:e,urls:r}){var i;let n=new Error("An unknown error occurred.");for(let s=0;s<r.length;s++){const o=r[s],a=o.includes("{data}")?"GET":"POST",c=a==="POST"?{data:t,sender:e}:void 0,l=a==="POST"?{"Content-Type":"application/json"}:{};try{const u=await fetch(o.replace("{sender}",e.toLowerCase()).replace("{data}",t),{body:JSON.stringify(c),headers:l,method:a});let d;if((i=u.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?d=(await u.json()).data:d=await u.text(),!u.ok){n=new tu({body:c,details:d!=null&&d.error?gr(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Ws(d)){n=new hU({result:d,url:o});continue}return d}catch(u){n=new tu({body:c,details:u.message,url:o})}}throw n}const bU=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:aA,offchainLookup:yU,offchainLookupAbiItem:oA,offchainLookupSignature:mU},Symbol.toStringTag,{value:"Module"}));function cA({chain:t,currentChainId:e}){if(!t)throw new zL;if(e!==t.id)throw new jL({chain:t,currentChainId:e})}function sCe(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}function vU(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n&&a.abort()},r)),i(await t({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(e),s(a)}finally{clearTimeout(o)}})()})}function EU(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const g9=EU();function CU(t,e={}){return{async request(r){var d;const{body:n,onRequest:i=e.onRequest,onResponse:s=e.onResponse,timeout:o=e.timeout??1e4}=r,a={...e.fetchOptions??{},...r.fetchOptions??{}},{headers:c,method:l,signal:u}=a;try{const h=await vU(async({signal:g})=>{const p={...a,body:Array.isArray(n)?gr(n.map(v=>({jsonrpc:"2.0",id:v.id??g9.take(),...v}))):gr({jsonrpc:"2.0",id:n.id??g9.take(),...n}),headers:{"Content-Type":"application/json",...c},method:l||"POST",signal:u||(o>0?g:null)},w=new Request(t,p),m=await(i==null?void 0:i(w,p))??{...p,url:t};return await fetch(m.url??t,m)},{errorInstance:new F8({body:n,url:t}),timeout:o,signal:!0});s&&await s(h);let f;if((d=h.headers.get("Content-Type"))!=null&&d.startsWith("application/json"))f=await h.json();else{f=await h.text();try{f=JSON.parse(f||"{}")}catch(g){if(h.ok)throw g;f={error:f}}}if(!h.ok)throw new tu({body:n,details:gr(f.error)||h.statusText,headers:h.headers,status:h.status,url:t});return f}catch(h){throw h instanceof tu||h instanceof F8?h:new tu({body:n,cause:h,url:t})}}}}class xU extends se{constructor({domain:e}){super(`Invalid domain "${gr(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class _U extends se{constructor({primaryType:e,types:r}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class SU extends se{constructor({type:e}){super(`Struct type "${e}
46" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function IU(t){const{domain:e={},message:r,primaryType:n}=t,i={EIP712Domain:pA({domain:e}),...t.types};fA({domain:e,message:r,primaryType:n,types:i});const s=["0x1901"];return e&&s.push($U({domain:e,types:i})),n!=="EIP712Domain"&&s.push(lA({data:r,primaryType:n,types:i})),an(Ri(s))}function $U({domain:t,types:e}){return lA({data:t,primaryType:"EIP712Domain",types:e})}function lA({data:t,primaryType:e,types:r}){const n=uA({data:t,primaryType:e,types:r});return an(n)}function uA({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],i=[AU({primaryType:e,types:r})];for(const s of r[e]){const[o,a]=hA({types:r,name:s.name,type:s.type,value:t[s.name]});n.push(o),i.push(a)}return nc(n,i)}function AU({primaryType:t,types:e}){const r=Uo(PU({primaryType:t,types:e}));return an(r)}function PU({primaryType:t,types:e}){let r="";const n=dA({primaryType:t,types:e});n.delete(t);const i=[t,...Array.from(n).sort()];for(const s of i)r+=`${s}(${e[s].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function dA({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),i=n==null?void 0:n[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(const s of e[i])dA({primaryType:s.type,types:e},r);return r}function hA({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},an(uA({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},an(n)];if(r==="string")return[{type:"bytes32"},an(Uo(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),s=n.map(o=>hA({name:e,type:i,types:t,value:o}));return[{type:"bytes32"},an(nc(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:r},n]}function TU(t){const{domain:e,message:r,primaryType:n,types:i}=t,s=(c,l)=>{const u={...l};for(const d of c){const{name:h,type:f}=d;f==="address"&&(u[h]=u[h].toLowerCase())}return u},o=i.EIP712Domain?e?s(i.EIP712Domain,e):{}:{},a=(()=>{if(n!=="EIP712Domain")return s(i[n],r)})();return gr({domain:o,message:a,primaryType:n,types:i})}function fA(t){const{domain:e,message:r,primaryType:n,types:i}=t,s=(o,a)=>{for(const c of o){const{name:l,type:u}=c,d=a[l],h=u.match(Z6);if(h&&(typeof d=="number"||typeof d=="bigint")){const[p,w,m]=h;Ee(d,{signed:w==="int",size:Number.parseInt(m)/8})}if(u==="address"&&typeof d=="string"&&!ki(d))throw new Ma({address:d});const f=u.match(G$);if(f){const[p,w]=f;if(w&&lr(d)!==Number.parseInt(w))throw new B$({expectedSize:Number.parseInt(w),givenSize:lr(d)})}const g=i[u];g&&(OU(u),s(g,d))}};if(i.EIP712Domain&&e){if(typeof e!="object")throw new xU({domain:e});s(i.EIP712Domain,e)}if(n!=="EIP712Domain")if(i[n])s(i[n],r);else throw new _U({primaryType:n,types:i})}function pA({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},(typeof(t==null?void 0:t.chainId)=="number"||typeof(t==null?void 0:t.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function OU(t){if(t==="address"||t==="bool"||t==="string"||t.startsWith("bytes")||t.startsWith("uint")||t.startsWith("int"))throw new SU({type:t})}const w9="/docs/contract/decodeEventLog";function tv(t){const{abi:e,data:r,strict:n,topics:i}=t,s=n??!0,[o,...a]=i;if(!o)throw new ZL({docsPath:w9});const c=e.find(p=>p.type==="event"&&o===Tw(Gs(p)));if(!(c&&"name"in c)||c.type!=="event")throw new k$(o,{docsPath:w9});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(p=>!("name"in p&&p.name)),h=d?[]:{},f=u.map((p,w)=>[p,w]).filter(([p])=>"indexed"in p&&p.indexed);for(let p=0;p<f.length;p++){const[w,m]=f[p],b=a[p];if(!b)throw new Pw({abiItem:c,param:w});h[d?m:w.name||m]=NU({param:w,value:b})}const g=u.filter(p=>!("indexed"in p&&p.indexed));if(g.length>0){if(r&&r!=="0x")try{const p=fp(g,r);if(p)if(d)for(let w=0;w<u.length;w++)h[w]=h[w]??p.shift();else for(let w=0;w<g.length;w++)h[g[w].name]=p[w]}catch(p){if(s)throw p instanceof T$||p instanceof Z$?new S1({abiItem:c,data:r,params:g,
46size:lr(r)}):p}else if(s)throw new S1({abiItem:c,data:"0x",params:g,size:0})}return{eventName:l,args:Object.values(h).length>0?h:void 0}}function NU({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(fp([t],e)||[])[0]}class kU extends se{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const m9="/docs/contract/encodeEventTopics";function yp(t){var c;const{abi:e,eventName:r,args:n}=t;let i=e[0];if(r){const l=ju({abi:e,name:r});if(!l)throw new s9(r,{docsPath:m9});i=l}if(i.type!=="event")throw new s9(void 0,{docsPath:m9});const s=Gs(i),o=Tw(s);let a=[];if(n&&"inputs"in i){const l=(c=i.inputs)==null?void 0:c.filter(d=>"indexed"in d&&d.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?(l==null?void 0:l.map(d=>n[d.name]))??[]:[];u.length>0&&(a=(l==null?void 0:l.map((d,h)=>Array.isArray(u[h])?u[h].map((f,g)=>y9({param:d,value:u[h][g]})):typeof u[h]<"u"&&u[h]!==null?y9({param:d,value:u[h]}):null))??[])}return[o,...a]}function y9({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return an(p0(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new kU(t.type);return nc([t],[e])}function rv(t){const{abi:e,args:r,logs:n,strict:i=!0}=t,s=(()=>{if(t.eventName)return Array.isArray(t.eventName)?t.eventName:[t.eventName]})();return n.map(o=>{var a;try{const c=e.find(u=>u.type==="event"&&o.topics[0]===Tw(u));if(!c)return null;const l=tv({...o,abi:[c],strict:i});return s&&!s.includes(l.eventName)||!RU({args:l.args,inputs:c.inputs,matchArgs:r})?null:{...l,...o}}catch(c){let l,u;if(c instanceof k$)return null;if(c instanceof S1||c instanceof Pw){if(i)return null;l=c.abiItem.name,u=(a=c.abiItem.inputs)==null?void 0:a.some(d=>!("name"in d&&d.name))}return{...o,args:u?[]:{},eventName:l}}}).filter(Boolean)}function RU(t){const{args:e,inputs:r,matchArgs:n}=t;if(!n)return!0;if(!e)return!1;function i(s,o,a){try{return s.type==="address"?mp(o,a):s.type==="string"||s.type==="bytes"?an(p0(o))===a:o===a}catch{return!1}}return Array.isArray(e)&&Array.isArray(n)?n.every((s,o)=>{if(s==null)return!0;const a=r[o];return a?(Array.isArray(s)?s:[s]).some(l=>i(a,l,e[o])):!1}):typeof e=="object"&&!Array.isArray(e)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([s,o])=>{if(o==null)return!0;const a=r.find(l=>
46l.name===s);return a?(Array.isArray(o)?o:[o]).some(l=>i(a,l,e[s])):!1}):!1}function oCe(t,e){if(t.length!==e.length)throw new O$({expectedLength:t.length,givenLength:e.length});const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n];r.push(gA(i,s))}return sl(r)}function gA(t,e,r=!1){if(t==="address"){const o=e;if(!ki(o))throw new Ma({address:o});return Oa(o.toLowerCase(),{size:r?32:null})}if(t==="string")return du(e);if(t==="bytes")return e;if(t==="bool")return Oa(D6(e),{size:r?32:1});const n=t.match(Z6);if(n){const[o,a,c="256"]=n,l=Number.parseInt(c)/8;return Ee(e,{size:r?32:l,signed:a==="int"})}const i=t.match(G$);if(i){const[o,a]=i;if(Number.parseInt(a)!==(e.length-2)/2)throw new B$({expectedSize:Number.parseInt(a),givenSize:(e.length-2)/2});return Oa(e,{dir:"right",size:r?32:null})}const s=t.match(AM);if(s&&Array.isArray(e)){const[o,a]=s,c=[];for(let l=0;l<e.length;l++)c.push(gA(a,e[l],!0));return c.length===0?"0x":sl(c)}throw new eM(t)}function BU(t,e="hex"){const r=wA(t),n=K6(new Uint8Array(r.length));return r.encode(n),e==="hex"?Or(n.bytes):n.bytes}function wA(t){return Array.isArray(t)?DU(t.map(e=>wA(e))):LU(t)}function DU(t){const e=t.reduce((i,s)=>i+s.length,0),r=mA(e);return{length:e<=55?1+e:1+r+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+r),r===1?i.pushUint8(e):r===2?i.pushUint16(e):r===3?i.pushUint24(e):i.pushUint32(e));for(const{encode:s}of t)s(i)}}}function LU(t){const e=typeof t=="string"?hs(t):t,r=mA(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+r),r===1?i.pushUint8(e.length):r===2?i.pushUint16(e.length):r===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function mA(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new se("Length is too large.")}function MU(t){const{chainId:e,nonce:r,to:n}=t,i=t.contractAddress??t.address,s=an(sl(["0x05",BU([e?Ee(e):"0x",i,r?Ee(r):"0x"])]));return n==="bytes"?hs(s):s}function UU(t){const e=an(`0x${t.substring(4)}`).substring(26);return hp(`0x${e}`)}async function jU({hash:t,signature:e}){const r=Ws(t)?t:Uo(t),{secp256k1:n}=await J(async()=>{const{secp256k1:o}=await Promise.resolve().then(()=>mF);return{secp256k1:o}},void 0);return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){const{r:l,s:u,v:d,yParity:h}=e,f=Number(h??d),g=b9(f);return new n.Signature(Ni(l),Ni(u)).addRecoveryBit(g)}const o=Ws(e)?e:Uo(e);if(lr(o)!==65)throw new Error("invalid signature length");const a=Ks(`0x${o.slice(130)}`),c=b9(a);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function b9(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}async function yA({hash:t,signature:e}){return UU(await jU({hash:t,signature:e}))}async function bA(t){const{authorization:e,signature:r}=t;return yA({hash:MU(e),signature:r??e})}function vA(t){const{kzg:e}=t,r=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(s=>hs(s)):t.blobs,i=[];for(const s of n)i.push(Uint8Array.from(e.blobToKzgCommitment(s)));return r==="bytes"?i:i.map(s=>Or(s))}function EA(t){const{kzg:e}=t,r=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(o=>hs(o)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(o=>hs(o)):t.commitments,s=[];for(let o=0;o<n.length;o++){const a=n[o],c=i[o];s.push(Uint8Array.from(e.computeBlobKzgProof(a,c)))}return r==="bytes"?s:s.map(o=>Or(o))}function zU(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function FU(t,e,r){return t&e^~t&r}function qU(t,e,r){return t&e^t&r^e&r}let HU=class extends j6{constructor(e,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=Vm(this.buffer)}update(e){Ih(this),e=Sw(e),Zs(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=Vm(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ih(this),d$(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,$h(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;zU(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=Vm(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=a,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}};const lc=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),VU=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,2756
46734187,3204031479,3329325298]),uc=new Uint32Array(64);let WU=class extends HU{constructor(e=32){super(64,e,8,!1),this.A=lc[0]|0,this.B=lc[1]|0,this.C=lc[2]|0,this.D=lc[3]|0,this.E=lc[4]|0,this.F=lc[5]|0,this.G=lc[6]|0,this.H=lc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)uc[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=uc[d-15],f=uc[d-2],g=oo(h,7)^oo(h,18)^h>>>3,p=oo(f,17)^oo(f,19)^f>>>10;uc[d]=p+uc[d-7]+g+uc[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=oo(a,6)^oo(a,11)^oo(a,25),f=u+h+FU(a,c,l)+VU[d]+uc[d]|0,p=(oo(n,2)^oo(n,13)^oo(n,22))+qU(n,i,s)|0;u=l,l=c,c=a,a=o+f|0,o=s,s=i,i=n,n=f+p|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){$h(uc)}destroy(){this.set(0,0,0,0,0,0,0,0),$h(this.buffer)}};const CA=f$(()=>new WU),KU=CA;function ZU(t,e){return KU(Ws(t,{strict:!1})?p0(t):t)}function GU(t){const{commitment:e,version:r=1}=t,n=t.to??(typeof e=="string"?"hex":"bytes"),i=ZU(e);return i.set([r],0),n==="bytes"?i:Or(i)}function YU(t){const{commitments:e,version:r}=t,n=t.to,i=[];for(const s of e)i.push(GU({commitment:s,to:n,version:r}));return i}const v9=6,xA=32,nv=4096,_A=xA*nv,E9=_A*v9-1-1*nv*v9;class JU extends se{constructor({maxSize:e,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class XU extends se{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function QU(t){const e=typeof t.data=="string"?hs(t.data):t.data,r=lr(e);if(!r)throw new XU;if(r>E9)throw new JU({maxSize:E9,size:r});const n=[];let i=!0,s=0;for(;i;){const o=K6(new Uint8Array(_A));let a=0;for(;a<nv;){const c=e.slice(s,s+(xA-1));if(o.pushByte(0),o.pushBytes(c),c.length<31){o.pushByte(128),i=!1;break}a++,s+=31}n.push(o)}return n.map(o=>Or(o.bytes))}function ej(t){const{data:e,kzg:r,to:n}=t,i=t.blobs??QU({data:e}),s=t.commitments??vA({blobs:i,kzg:r,to:n}),o=t.proofs??EA({blobs:i,commitments:s,kzg:r,to:n}),a=[];for(let c=0;c<i.length;c++)a.push({blob:i[c],commitment:s[c],proof:o[c]});return a}function tj(t){if(t.type)return t.type;if(typeof t.authorizationList<"u")return"eip7702";if(typeof t.blobs<"u"||typeof t.blobVersionedHashes<"u"||typeof t.maxFeePerBlobGas<"u"||typeof t.sidecars<"u")return"eip4844";if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new GM({transaction:t})}const SA={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function IA(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?Ks(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?Ks(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?SA[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return t.authorizationList&&(e.authorizationList=rj(t.authorizationList)),e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}function rj(t){return t.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}function $A(t){const e=(t.transactions??[]).map(r=>typeof r=="string"?r:IA(r));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}function Ua(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const AA={"0x0":"reverted","0x1":"success"};function nj(t){const e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(r=>Ua(r)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Ks(t.transactionIndex):null,status:t.status?AA[t.status]:null,type:t.type?SA[t.type]||t.type:null};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),e}const ij=3;function gu(t,{abi:e,address:r,args:n,docsPath:i,functionName:s,sender:o}){const a=t instanceof Nw?t:t instanceof se?t.walk(g=>"data"in g)||t.walk():{},{code:c,data:l,details:u,message:d,shortMessage:h}
46=a,f=t instanceof up?new QM({functionName:s}):[ij,lu.code].includes(c)&&(l||u||d||h)?new yb({abi:e,data:typeof l=="object"?l.data:l,functionName:s,message:a instanceof B6?u:h??d}):t;return new XM(f,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:s,sender:o})}class sj extends se{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:h}){var g;const f=pp({from:r==null?void 0:r.address,to:d,value:typeof h<"u"&&`${X6(h)} ${((g=i==null?void 0:i.nativeCurrency)==null?void 0:g.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ci(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ci(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ci(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",f].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function oj(t,{docsPath:e,...r}){const n=(()=>{const i=Rw(t,r);return i instanceof gp?t:i})();return new sj(n,{docsPath:e,...r})}function PA(t,{docsPath:e,...r}){const n=(()=>{const i=Rw(t,r);return i instanceof gp?t:i})();return new YM(n,{docsPath:e,...r})}function $e(t,e,r){const n=t[e.name];if(typeof n=="function")return n;const i=t[r];return typeof i=="function"?i:s=>e(t,s)}const aj=`�Ethereum Signed Message:
47`;function cj(t){const e=typeof t=="string"?du(t):typeof t.raw=="string"?t.raw:Or(t.raw),r=du(`${aj}${lr(e)}`);return Ri([r,e])}function TA(t,e){return an(cj(t),e)}const OA="0x6492649264926492649264926492649264926492649264926492649264926492";function lj(t){return P2(t,-32)===OA}function uj(t){const{address:e,data:r,signature:n,to:i="hex"}=t,s=sl([nc([{type:"address"},{type:"bytes"},{type:"bytes"}],[e,r,n]),OA]);return i==="hex"?s:hs(s)}class dj extends se{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function hj(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new dj({value:t});let[r,n="0"]=t.split(".");const i=r.startsWith("-");if(i&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>e){const[s,o,a]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${o}.${a}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${i?"-":""}${r}${n}`)}function lCe(t,e="wei"){return hj(t,Q$[e])}async function iv(t,{address:e,blockTag:r="latest",blockNumber:n}){const i=await t.request({method:"eth_getTransactionCount",params:[e,typeof n=="bigint"?Ee(n):r]},{dedupe:!!n});return Ks(i)}function uCe(t){const{source:e}=t,r=new Map,n=new lp(8192),i=new Map,s=({address:o,chainId:a})=>`${o}.${a}`;return{async consume({address:o,chainId:a,client:c}){const l=s({address:o,chainId:a}),u=this.get({address:o,chainId:a,client:c});this.increment({address:o,chainId:a});const d=await u;return await e.set({address:o,chainId:a},d),n.set(l,d),d},async increment({address:o,chainId:a}){const c=s({address:o,chainId:a}),l=r.get(c)??0;r.set(c,l+1)},async get({address:o,chainId:a,client:c}){const l=s({address:o,chainId:a});let u=i.get(l);return u||(u=(async()=>{try{const h=await e.get({address:o,chainId:a,client:c}),f=n.get(l)??0;return f>0&&h<=f?f+1:(n.delete(l),h)}finally{this.reset({address:o,chainId:a})}})(),i.set(l,u)),(r.get(l)??0)+await u},reset({address:o,chainId:a}){const c=s({address:o,chainId:a});r.delete(c),i.delete(c)}}}function Lw(t,{method:e}){var n,i;const r={};return t.transport.type==="fallback"&&((i=(n=t.transport).onResponse)==null||i.call(n,({method:s,response:o,status:a,transport:c})=>{a==="success"&&e===s&&(r[o]=c.request)})),s=>r[s]||t.request}async function NA(t,e){const{address:r,abi:n,args:i,eventName:s,fromBlock:o,strict:a,toBlock:c}=e,l=Lw(t,{method:"eth_newFilter"}),u=s?yp({abi:n,args:i,eventName:s}):void 0,d=await t.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?Ee(o):o,toBlock:typeof c=="bigint"?Ee(c):c,topics:u}]});return{abi:n,args:i,eventName:s,id:d,request:l(d),strict:!!a,type:"event"}}class fj extends se{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class sv extends se{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class pj extends se{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ci(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class kA extends se{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}async function No(t,{blockHash:e,blockNumber:r,blockTag:n=t.experimental_blockTag??"latest",includeTransactions:i}={}){var l,u,d;const s=i??!1,o=r!==void 0?Ee(r):void 0;let a=null;if(e?a=await t.request({method:"eth_getBlockByHash",params:[e,s]},{dedupe:!0}):a=await t.request({method:"eth_getBlockByNumber",params:[o||n,s]},{dedupe:!!o}),!a)throw new kA({blockHash:e,blockNumber:r});return(((d=(u=(l=t.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:d.format)||$A)(a)}async function ov(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function gj(t,e){return RA(t,e)}async function RA(t,e){var s,o;const{block:r,chain:n=t.chain,request:i}=e||{};try{const a=((s=n==null?void 0:n.fees)==null?void 0:s.maxPriorityFeePerGas)??((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee);if(typeof a=="function"){const l=r||await $e(t,No,"getBlock")({}),u=await a({block:l,client:t,request:i});if(u===null)throw new Error;return u}if(typeof a<"u")return a;const c=await t.request({method:"eth_maxPriorityFeePerGas"});return Ni(c)}catch{const[a,c]=await Promise.all([r?Promise.resolve(r):$e(t,No,"getBlock")({}),$e(t,ov,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new sv;const l=c-a.baseFeePerGas;return l<0n?0n:l}}async function wj(t,e){return $b(t,e)}async function $b(t,e){var h,f;const{block:r,chain:n=t.chain,request:i,type:s="eip1559"}=e||{},o=await(async()=>{var g,p;return typeof((g=n==null?void 0:n.fees)==null?void 0:g.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):((p=n==null?void 0:n.fees)==null?void 0:p.baseFeeMultiplier)??1.2})();if(o<1)throw new fj;const c=10**(((h=o.toString().split(".")[1])==null?void 0:h.length)??0),l=g=>g*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await $e(t,No,"getBlock")({});if(typeof((f=n==null?void 0:n.fees)==null?void 0:f.estimateFeesPerGas)=="function"){const g=await n.fees.estimateFeesPerGas({block:r,client:t,multiply:l,request:i,type:s});if(g!==null)return g}if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new sv;const g=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await RA(t,{block:u,chain:n,request:i}),p=l(u.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??p+g,maxPriorityFeePerGas:g}}return{gasPrice:(i==null?void 0:i.gasPrice)??l(await $e(t,ov,"getGasPrice")({}))}}async function y0(t){const e=await t.request({method:"eth_chainId"},{dedupe:!0});return Ks(e)}const BA=["blobVersionedHashes","chainId","fees","gas","nonce","type"],C9=new Map;async function Mw(t,e){const{account:r=t.account,blobs:n,chain:i,gas:s,kzg:o,nonce:a,nonceManager:c,parameters:l=BA,type:u}=e,d=r&&wr(r),h={...e,...d?{from:d==null?void 0:d.address}:{}};let f;async function g(){return f||(f=await $e(t,No,"getBlock")({blockTag:"latest"}),f)}let p;async function w(){return p||(i?i.id:typeof e.chainId<"u"?e.chainId:(p=await $e(t,y0,"getChainId")({}),p))}if(l.includes("nonce")&&typeof a>"u"&&d)if(c){const m=await w();h.nonce=await c.consume({address:d.address,chainId:m,client:t})}else h.nonce=await $e(t,iv,"getTransactionCount")({address:d.address,blockTag:"pending"});if((l.includes("blobVersionedHashes")||l.includes("sidecars"))&&n&&o){const m=vA({blobs:n,kzg:o});if(l.includes("blobVersionedHashes")){const b=YU({commitments:m,to:"hex"});h.blobVersionedHashes=b}if(l.includes("sidecars")){const b=EA({blobs:n,commitments:m,kzg:o}),v=ej({blobs:n,commitments:m,proofs:b,to:"hex"});h.sidecars=v}}if(l.includes("chainId")&&(h.chainId=await w()),(l.includes("fees")||l.includes("type"))&&typeof u>"u")try{h.type=tj(h)}catch{let m=C9.get(t.uid);if(typeof m>"u"){const b=await g();m=typeof(b==null?void 0:b.baseFeePerGas)=="bigint",C9.set(t.uid,m)}h.type=m?"eip1559":"legacy"}if(l.includes("fees"))if(h.type!=="legacy"&&h.type!=="eip2930"){if(typeof h.maxFeePerGas>"u"||typeof h.maxPriorityFeePerGas>"u"){const m=await g(),{maxFeePerGas:b,maxPriorityFeePerGas:v}=await $b(t,{block:m,chain:i,request:h});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas<v)throw new pj({maxPriorityFeePerGas:v});h.maxPriorityFeePerGas=v,h.maxFeePerGas=b}}else{if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")throw new sv;if(typeof e.gasPrice>"u"){const m=await g(),{gasPrice:b}=await $b(t,{block:m,chain:i,request:h,type:"legacy"});h.gasPrice=b}}return l.includes("gas")&&typeof s>"u"&&(h.gas=await $e(t,av,"estimateGas")({...h,account:d&&{address:d.address,type:"json-rpc"}})),Fu(h),delete h.parameters,h}async function DA(t,{address:e,blockNumber:r,blockTag:n=t.experimental_blockTag??"latest"}){const i=typeof r=="bigint"?Ee(r):void 0,s=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(s)}async function av(t,e){var i,s,o;const{account:r=t.account}=e,n=r?wr(r):void 0;try{let T=function(x){const{block:B,request:R,rpcStateOverride:M}=x;return t.request({method:"eth_estimateGas",params:M?[R,B??t.experimental_blockTag??"latest",M]:B?[R,B]:[R]})};const{accessList:a,authorizationList:c,blobs:l,blobVersionedHashes:u,blockNumber:d,blockTag:h,data:f,gas:g,gasPrice:p,maxFeePerBlobGas:w,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:v,value:E,stateOverride:I,..._}=await Mw(t,{...e,parameters:(n==null?void 0:n.type)==="local"?void 0:["blobVersionedHashes"]}),P=(typeof d=="bigint"?Ee(d):void 0)||h,y=ev(I),O=await(async()=>
47{if(_.to)return _.to;if(c&&c.length>0)return await bA({authorization:c[0]}).catch(()=>{throw new se("`to` is required. Could not infer from `authorizationList`")})})();Fu(e);const S=(o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:o.format,L=(S||m0)({...Bw(_,{format:S}),from:n==null?void 0:n.address,accessList:a,authorizationList:c,blobs:l,blobVersionedHashes:u,data:f,gas:g,gasPrice:p,maxFeePerBlobGas:w,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:v,to:O,value:E});let C=BigInt(await T({block:P,request:L,rpcStateOverride:y}));if(c){const x=await DA(t,{address:L.from}),B=await Promise.all(c.map(async R=>{const{address:M}=R,U=await T({block:P,request:{authorizationList:void 0,data:f,from:n==null?void 0:n.address,to:M,value:Ee(x)},rpcStateOverride:y}).catch(()=>100000n);return 2n*BigInt(U)}));C+=B.reduce((R,M)=>R+M,0n)}return C}catch(a){throw oj(a,{...e,account:n,chain:t.chain})}}async function mj(t,e){const{abi:r,address:n,args:i,functionName:s,dataSuffix:o,...a}=e,c=Cs({abi:r,args:i,functionName:s});try{return await $e(t,av,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...a})}catch(l){const u=a.account?wr(a.account):void 0;throw gu(l,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:u==null?void 0:u.address})}}async function cv(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:s,events:o,args:a,strict:c}={}){const l=c??!1,u=o??(s?[s]:void 0);let d=[];u&&(d=[u.flatMap(p=>yp({abi:[p],eventName:p.name,args:o?void 0:a}))],s&&(d=d[0]));let h;r?h=await t.request({method:"eth_getLogs",params:[{address:e,topics:d,blockHash:r}]}):h=await t.request({method:"eth_getLogs",params:[{address:e,topics:d,fromBlock:typeof n=="bigint"?Ee(n):n,toBlock:typeof i=="bigint"?Ee(i):i}]});const f=h.map(g=>Ua(g));return u?rv({abi:u,args:a,logs:f,strict:l}):f}async function LA(t,e){const{abi:r,address:n,args:i,blockHash:s,eventName:o,fromBlock:a,toBlock:c,strict:l}=e,u=o?ju({abi:r,name:o}):void 0,d=u?void 0:r.filter(h=>h.type==="event");return $e(t,cv,"getLogs")({address:n,args:i,blockHash:s,event:u,events:d,fromBlock:a,toBlock:c,strict:l})}async function ja(t,e){const{abi:r,address:n,args:i,functionName:s,...o}=e,a=Cs({abi:r,args:i,functionName:s});try{const{data:c}=await $e(t,wp,"call")({...o,data:a,to:n});return zu({abi:r,args:i,functionName:s,data:c||"0x"})}catch(c){throw gu(c,{abi:r,address:n,args:i,docsPath:"/docs/contract/readContract",functionName:s})}}async function yj(t,e){const{abi:r,address:n,args:i,dataSuffix:s,functionName:o,...a}=e,c=a.account?wr(a.account):t.account,l=Cs({abi:r,args:i,functionName:o});try{const{data:u}=await $e(t,wp,"call")({batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:n,...a,account:c}),d=zu({abi:r,args:i,functionName:o,data:u||"0x"}),h=r.filter(f=>"name"in f&&f.name===e.functionName);return{result:d,request:{abi:h,address:n,args:i,dataSuffix:s,functionName:o,...a,account:c}}}catch(u){throw gu(u,{abi:r,address:n,args:i,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const e3=new Map,x9=new Map;let bj=0;function za(t,e,r){const n=++bj,i=()=>e3.get(t)||[],s=()=>{const u=i();e3.set(t,u.filter(d=>d.id!==n))},o=()=>{const u=i();if(!u.some(h=>h.id===n))return;const d=x9.get(t);if(u.length===1&&d){const h=d();h instanceof Promise&&h.catch(()=>{})}s()},a=i();if(e3.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const c={};for(const u in e)c[u]=(...d)=>{var f,g;const h=i();if(h.length!==0)for(const p of h)(g=(f=p.fns)[u])==null||g.call(f,...d)};const l=r(c);return typeof l=="function"&&x9.set(t,l),o}function b0(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0;const s=()=>i=!1;return(async()=>{let a;e&&(a=await t({unpoll:s}));const c=await(r==null?void 0:r(a))??n;await I2(c);const l=async()=>{i&&(await t({unpoll:s}),await I2(n),l())};l()})(),s}const vj=new Map,Ej=new Map;function Cj(t){const e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),r=e(t,vj),n=e(t,Ej);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function xj(t,{cacheKey:e,cacheTime:r=Number.POSITIVE_INFINITY}){const n=Cj(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()<r)return i.data;let s=n.promise.get();s||(s=t(),n.promise.set(s));try{const o=await s;return n.response.set({created:new Date,data:o}),o}finally{n.promise.clear()}}const _j=t=>`blockNumber.${t}`;async function bp(t,{cacheTime:e=t.cacheTime}={}){const r=await xj(()=>t.request({method:"eth_blockNumber"}),{cacheKey:_j(t.uid),cacheTime:e});return BigInt(r)}async function Uw(t,{filter:e}){const r="strict"in e&&e.strict,n=await e.request({method:"eth_getFilterChanges",params:[e.id]});if(typeof n[0]=="string")return n;const i=n.map(s=>Ua(s));return!("abi"in e)||!e.abi?i:rv({abi:e.abi,logs:i,strict:r})}async function jw(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function Sj(t,e){const{abi:r,address:n,args:i,batch:s=!0,eventName:o,fromBlock:a,onError:c,onLogs:l,poll:u,pollingInterval:d=t.pollingInterval,strict:h}=e;return(typeof u<"u"?u:typeof a=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
47onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc")))?(()=>{const w=h??!1,m=gr(["watchContractEvent",n,i,s,t.uid,o,d,w,a]);return za(m,{onLogs:l,onError:c},b=>{let v;a!==void 0&&(v=a-1n);let E,I=!1;const _=b0(async()=>{var A;if(!I){try{E=await $e(t,NA,"createContractEventFilter")({abi:r,address:n,args:i,eventName:o,strict:w,fromBlock:a})}catch{}I=!0;return}try{let P;if(E)P=await $e(t,Uw,"getFilterChanges")({filter:E});else{const y=await $e(t,bp,"getBlockNumber")({});v&&v<y?P=await $e(t,LA,"getContractEvents")({abi:r,address:n,args:i,eventName:o,fromBlock:v+1n,toBlock:y,strict:w}):P=[],v=y}if(P.length===0)return;if(s)b.onLogs(P);else for(const y of P)b.onLogs([y])}catch(P){E&&P instanceof uu&&(I=!1),(A=b.onError)==null||A.call(b,P)}},{emitOnBegin:!0,interval:d});return async()=>{E&&await $e(t,jw,"uninstallFilter")({filter:E}),_()}})})():(()=>{const w=h??!1,m=gr(["watchContractEvent",n,i,s,t.uid,o,d,w]);let b=!0,v=()=>b=!1;return za(m,{onLogs:l,onError:c},E=>((async()=>{try{const I=(()=>{if(t.transport.type==="fallback"){const P=t.transport.transports.find(y=>y.config.type==="webSocket"||y.config.type==="ipc");return P?P.value:t.transport}return t.transport})(),_=o?yp({abi:r,eventName:o,args:i}):[],{unsubscribe:A}=await I.subscribe({params:["logs",{address:n,topics:_}],onData(P){var O;if(!b)return;const y=P.result;try{const{eventName:S,args:k}=tv({abi:r,data:y.data,topics:y.topics,strict:h}),L=Ua(y,{args:k,eventName:S});E.onLogs([L])}catch(S){let k,L;if(S instanceof S1||S instanceof Pw){if(h)return;k=S.abiItem.name,L=(O=S.abiItem.inputs)==null?void 0:O.some(C=>!("name"in C&&C.name))}const T=Ua(y,{args:L?[]:{},eventName:k});E.onLogs([T])}},onError(P){var y;(y=E.onError)==null||y.call(E,P)}});v=A,b||v()}catch(I){c==null||c(I)}})(),()=>v()))})()}class qu extends se{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
48`),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class a2 extends se{constructor({docsPath:e,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:e,metaMessages:r,name:"AccountTypeNotSupportedError"})}}async function lv(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}const t3=new lp(128);async function zw(t,e){var b,v,E,I;const{account:r=t.account,chain:n=t.chain,accessList:i,authorizationList:s,blobs:o,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:f,type:g,value:p,...w}=e;if(typeof r>"u")throw new qu({docsPath:"/docs/actions/wallet/sendTransaction"});const m=r?wr(r):null;try{Fu(e);const _=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await bA({authorization:s[0]}).catch(()=>{throw new se("`to` is required. Could not infer from `authorizationList`.")})})();if((m==null?void 0:m.type)==="json-rpc"||m===null){let A;n!==null&&(A=await $e(t,y0,"getChainId")({}),cA({currentChainId:A,chain:n}));const P=(E=(v=(b=t.chain)==null?void 0:b.formatters)==null?void 0:v.transactionRequest)==null?void 0:E.format,O=(P||m0)({...Bw(w,{format:P}),accessList:i,authorizationList:s,blobs:o,chainId:A,data:a,from:m==null?void 0:m.address,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:f,to:_,type:g,value:p}),S=t3.get(t.uid),k=S?"wallet_sendTransaction":"eth_sendTransaction";try{return await t.request({method:k,params:[O]},{retryCount:0})}catch(L){if(S===!1)throw L;const T=L;if(T.name==="InvalidInputRpcError"||T.name==="InvalidParamsRpcError"||T.name==="MethodNotFoundRpcError"||T.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[O]},{retryCount:0}).then(C=>(t3.set(t.uid,!0),C)).catch(C=>{const x=C;throw x.name==="MethodNotFoundRpcError"||x.name==="MethodNotSupportedRpcError"?(t3.set(t.uid,!1),T):x});throw T}}if((m==null?void 0:m.type)==="local"){const A=await $e(t,Mw,"prepareTransactionRequest")({account:m,accessList:i,authorizationList:s,blobs:o,chain:n,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:f,nonceManager:m.nonceManager,parameters:[...BA,"sidecars"],type:g,value:p,...w,to:_}),P=(I=n==null?void 0:n.serializers)==null?void 0:I.transaction,y=await m.signTransaction(A,{serializer:P});return await $e(t,lv,"sendRawTransaction")({serializedTransaction:y})}throw(m==null?void 0:m.type)==="smart"?new a2({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new a2({docsPath:"/docs/actions/wallet/sendTransaction",type:m==null?void 0:m.type})}catch(_){throw _ instanceof a2?_:PA(_,{...e,account:m,chain:e.chain||void 0})}}async function Ij(t,e){const{abi:r,account:n=t.account,address:i,args:s,dataSuffix:o,functionName:a,...c}=e;if(typeof n>"u")throw new qu({docsPath:"/docs/contract/writeContract"});const l=n?wr(n):null,u=Cs({abi:r,args:s,functionName:a});try{return await $e(t,zw,"sendTransaction")({data:`${u}${o?o.replace("0x",""):""}`,to:i,account:l,...c})}catch(d){throw gu(d,{abi:r,address:i,args:s,docsPath:"/docs/contract/writeContract",functionName:a,sender:l==null?void 0:l.address})}}const MA="0x5792579257925792579257925792579257925792579257925792579257925792",UA=Ee(0,{size:32});async function $j(t,e){const{account:r=t.account,capabilities:n,chain:i=t.chain,experimental_fallback:s,experimental_fallbackDelay:o=32,forceAtomic:a=!1,id:c,version:l="2.0.0"}=e,u=r?wr(r):null,d=e.calls.map(h=>{const f=h,g=f.abi?Cs({abi:f.abi,functionName:f.functionName,args:f.args}):f.data;return{data:f.dataSuffix&&g?Ri([g,f.dataSuffix]):g,to:f.to,value:f.value?Ee(f.value):void 0}});try{const h=await t.request({method:"wallet_sendCalls",params:[{atomicRequired:a,calls:d,capabilities:n,chainId:Ee(i.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof h=="string"?{id:h}:h}catch(h){const f=h;if(s&&(f.name==="MethodNotFoundRpcError"||f.name==="MethodNotSupportedRpcError"||f.name==="UnknownRpcError"||f.details.toLowerCase().includes("does not exist / is not available")||f.details.toLowerCase().includes("missing or invalid. request()")||f.details.toLowerCase().includes("did n
48ot match any variant of untagged enum")||f.details.toLowerCase().includes("account upgraded to unsupported contract")||f.details.toLowerCase().includes("eip-7702 not supported")||f.details.toLowerCase().includes("unsupported wc_ method"))){if(n&&Object.values(n).some(b=>!b.optional)){const b="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new _h(new se(b,{details:b}))}if(a&&d.length>1){const m="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Sh(new se(m,{details:m}))}const g=[];for(const m of d){const b=zw(t,{account:u,chain:i,data:m.data,to:m.to,value:m.value?Ni(m.value):void 0});g.push(b),o>0&&await new Promise(v=>setTimeout(v,o))}const p=await Promise.allSettled(g);if(p.every(m=>m.status==="rejected"))throw p[0].reason;const w=p.map(m=>m.status==="fulfilled"?m.value:UA);return{id:Ri([...w,Ee(i.id,{size:32}),MA])}}throw PA(h,{...e,account:u,chain:e.chain})}}async function jA(t,e){async function r(u){if(u.endsWith(MA.slice(2))){const h=Na(P2(u,-64,-32)),f=P2(u,0,-64).slice(2).match(/.{1,64}/g),g=await Promise.all(f.map(w=>UA.slice(2)!==w?t.request({method:"eth_getTransactionReceipt",params:[`0x${w}`]},{dedupe:!0}):void 0)),p=g.some(w=>w===null)?100:g.every(w=>(w==null?void 0:w.status)==="0x1")?200:g.every(w=>(w==null?void 0:w.status)==="0x0")?500:600;return{atomic:!1,chainId:Ks(h),receipts:g.filter(Boolean),status:p,version:"2.0.0"}}return t.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:n=!1,chainId:i,receipts:s,version:o="2.0.0",...a}=await r(e.id),[c,l]=(()=>{const u=a.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...a,atomic:n,chainId:i?Ks(i):void 0,receipts:(s==null?void 0:s.map(u=>({...u,blockNumber:Ni(u.blockNumber),gasUsed:Ni(u.gasUsed),status:AA[u.status]})))??[],statusCode:l,status:c,version:o}}async function Aj(t,e){const{id:r,pollingInterval:n=t.pollingInterval,status:i=({statusCode:h})=>h>=200,timeout:s=6e4}=e,o=gr(["waitForCallsStatus",t.uid,r]),{promise:a,resolve:c,reject:l}=Q6();let u;const d=za(o,{resolve:c,reject:l},h=>{const f=b0(async()=>{const g=p=>{clearTimeout(u),f(),p(),d()};try{const p=await jA(t,{id:r});if(!i(p))return;g(()=>h.resolve(p))}catch(p){g(()=>h.reject(p))}},{interval:n,emitOnBegin:!0});return f});return u=s?setTimeout(()=>{d(),clearTimeout(u),l(new Pj({id:r}))},s):void 0,await a}class Pj extends se{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Ab=256;let gg=Ab,wg;function zA(t=11){if(!wg||gg+t>Ab*2){wg="",gg=0;for(let e=0;e<Ab;e++)wg+=(256+Math.random()*256|0).toString(16).substring(1)}return wg.substring(gg,gg+++t)}function FA(t){const{batch:e,chain:r,ccipRead:n,key:i="base",name:s="Base Client",type:o="base"}=t,a=t.experimental_blockTag??(typeof(r==null?void 0:r.experimental_preconfirmationTime)=="number"?"pending":void 0),c=(r==null?void 0:r.blockTime)??12e3,l=Math.min(Math.max(Math.floor(c/2),500),4e3),u=t.pollingInterval??l,d=t.cacheTime??u,h=t.account?wr(t.account):void 0,{config:f,request:g,value:p}=t.transport({chain:r,pollingInterval:u}),w={...f,...p},m={account:h,batch:e,cacheTime:d,ccipRead:n,chain:r,key:i,name:s,pollingInterval:u,request:g,transport:w,type:o,uid:zA(),...a?{experimental_blockTag:a}:{}};function b(v){return E=>{const I=E(v);for(const A in m)delete I[A];const _={...v,...I};return Object.assign(_,{extend:b(_)})}}return Object.assign(m,{extend:b(m)})}function uv({key:t,methods:e,name:r,request:n,retryCount:i=3,retryDelay:s=150,timeout:o,type:a},c){const l=zA();return{config:{key:t,methods:e,name:r,request:n,retryCount:i,retryDelay:s,timeout:o,type:a},request:fD(n,{methods:e,retryCount:i,retryDelay:s,uid:l}),value:c}}function dCe(t,e={}){const{key:r="custom",methods:n,name:i="Custom Provider",retryDelay:s}=e;return({retryCount:o})=>uv({key:r,methods:n,name:i,request:t.request.bind(t),retryCount:e.retryCount??o,retryDelay:s,type:"custom"})}function hCe(t,e={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,shouldThrow:s=Tj,retryCount:o,retryDelay:a}=e;return({chain:c,pollingInterval:l=4e3,timeout:u,...d})=>{let h=t,f=()=>{};const g=uv({key:r,name:n,async request({method:p,params:w}){let m;const b=async(v=0)=>{const E=h[v]({...d,chain:c,retryCount:0,timeout:u});try{const I=await E.request({method:p,params:w});return f({method:p,params:w,response:I,transport:E,status:"success"}),I}
48catch(I){if(f({error:I,method:p,params:w,transport:E,status:"error"}),s(I)||v===h.length-1||(m??(m=h.slice(v+1).some(_=>{const{include:A,exclude:P}=_({chain:c}).config.methods||{};return A?A.includes(p):P?!P.includes(p):!0})),!m))throw I;return b(v+1)}};return b()},retryCount:o,retryDelay:a,type:"fallback"},{onResponse:p=>f=p,transports:h.map(p=>p({chain:c,retryCount:0}))});if(i){const p=typeof i=="object"?i:{};Oj({chain:c,interval:p.interval??l,onTransports:w=>h=w,ping:p.ping,sampleCount:p.sampleCount,timeout:p.timeout,transports:h,weights:p.weights})}return g}}function Tj(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===Ch.code||t.code===ru.code||Hl.nodeMessage.test(t.message)||t.code===5e3))}function Oj({chain:t,interval:e=4e3,onTransports:r,ping:n,sampleCount:i=10,timeout:s=1e3,transports:o,weights:a={}}){const{stability:c=.7,latency:l=.3}=a,u=[],d=async()=>{const h=await Promise.all(o.map(async p=>{const w=p({chain:t,retryCount:0,timeout:s}),m=Date.now();let b,v;try{await(n?n({transport:w}):w.request({method:"net_listening"})),v=1}catch{v=0}finally{b=Date.now()}return{latency:b-m,success:v}}));u.push(h),u.length>i&&u.shift();const f=Math.max(...u.map(p=>Math.max(...p.map(({latency:w})=>w)))),g=o.map((p,w)=>{const m=u.map(_=>_[w].latency),v=1-m.reduce((_,A)=>_+A,0)/m.length/f,E=u.map(_=>_[w].success),I=E.reduce((_,A)=>_+A,0)/E.length;return I===0?[0,w]:[l*v+c*I,w]}).sort((p,w)=>w[0]-p[0]);r(g.map(([,p])=>o[p])),await I2(e),d()};d()}class Nj extends se{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function fCe(t,e={}){const{batch:r,fetchOptions:n,key:i="http",methods:s,name:o="HTTP JSON-RPC",onFetchRequest:a,onFetchResponse:c,retryDelay:l,raw:u}=e;return({chain:d,retryCount:h,timeout:f})=>{const{batchSize:g=1e3,wait:p=0}=typeof r=="object"?r:{},w=e.retryCount??h,m=f??e.timeout??1e4,b=t||(d==null?void 0:d.rpcUrls.default.http[0]);if(!b)throw new Nj;const v=CU(b,{fetchOptions:n,onRequest:a,onResponse:c,timeout:m});return uv({key:i,methods:s,name:o,async request({method:E,params:I}){const _={method:E,params:I},{schedule:A}=iA({id:b,wait:p,shouldSplitBatch(S){return S.length>g},fn:S=>v.request({body:S}),sort:(S,k)=>S.id-k.id}),P=async S=>r?A(S):[await v.request({body:S})],[{error:y,result:O}]=await P(_);if(u)return{error:y,result:O};if(y)throw new B6({body:_,error:y,url:b});return O},retryCount:w,retryDelay:l,timeout:m,type:"http"},{fetchOptions:n,url:b})}}function dv(t,e){var n,i,s,o,a,c;if(!(t instanceof se))return!1;const r=t.walk(l=>l instanceof yb);return r instanceof yb?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((i=r.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((s=r.data)==null?void 0:s.errorName)==="ResolverNotContract"||((o=r.data)==null?void 0:o.errorName)==="ResolverError"||((a=r.data)==null?void 0:a.errorName)==="HttpError"||(c=r.reason)!=null&&c.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===A$[50]):!1}function qA(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Ws(e)?e:null}function c2(t){let e=new Uint8Array(32).fill(0);if(!t)return Or(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const i=qA(r[n]),s=i?p0(i):an(nu(r[n]),"bytes");e=an(Ri([e,s]),"bytes")}return Or(e)}function kj(t){return`[${t.slice(2)}]`}function Rj(t){const e=new Uint8Array(32).fill(0);return t?qA(t)||an(nu(t)):Or(e)}function Fw(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(nu(e).byteLength+2);let n=0;const i=e.split(".");for(let s=0;s<i.length;s++){let o=nu(i[s]);o.byteLength>255&&(o=nu(kj(Rj(i[s])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Bj(t,e){const{blockNumber:r,blockTag:n,coinType:i,name:s,gatewayUrls:o,strict:a}=e,{chain:c}=t,l=(()=>{if(e.universalResolverAddress)return e.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return w0({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>s.endsWith(d)))return null;try{const d=Cs({abi:t9,functionName:"addr",...i!=null?{args:[c2(s),BigInt(i)]}:{args:[c2(s)]}}),h={address:l,abi:S$,functionName:"resolve",args:[Uo(Fw(s)),d,o??[Dw]],blockNumber:r,blockTag:n},g=await $e(t,ja,"readContract")(h);if(g[0]==="0x")return null;const p=zu({abi:t9,args:i!=null?[c2(s),BigInt(i)]:void 0,functionName:"addr",data:g[0]});return p==="0x"||Na(p)==="0x00"?null:p}catch(d){if(a)throw d;if(dv(d,"resolve"))return null;throw d}}class Dj extends se{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class V0 extends se{constructor({reason:e}
48){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class hv extends se{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class Lj extends se{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const Mj=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,Uj=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,jj=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,zj=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Fj(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function _9(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function HA({uri:t,gatewayUrls:e}){const r=jj.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=_9(e==null?void 0:e.ipfs,"https://ipfs.io"),i=_9(e==null?void 0:e.arweave,"https://arweave.net"),s=t.match(Mj),{protocol:o,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=o==="ipns:/"||a==="ipns/",d=o==="ipfs:/"||a==="ipfs/"||Uj.test(t);if(t.startsWith("http")&&!u&&!d){let f=t;return e!=null&&e.arweave&&(f=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:f,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let h=t.replace(zj,"");if(h.startsWith("<svg")&&(h=`data:image/svg+xml;base64,${btoa(h)}`),h.startsWith("data:")||h.startsWith("{"))return{uri:h,isOnChain:!0,isEncoded:!1};throw new hv({uri:t})}function VA(t){if(typeof t!="object"||!("image"in t)&&!("image_url"in t)&&!("image_data"in t))throw new Dj({data:t});return t.image||t.image_url||t.image_data}async function qj({gatewayUrls:t,uri:e}){try{const r=await fetch(e).then(i=>i.json());return await fv({gatewayUrls:t,uri:VA(r)})}catch{throw new hv({uri:e})}}async function fv({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=HA({uri:e,gatewayUrls:t});if(n||await Fj(r))return r;throw new hv({uri:e})}function Hj(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=e.split("/"),[s,o]=r.split(":"),[a,c]=n.split(":");if(!s||s.toLowerCase()!=="eip155")throw new V0({reason:"Only EIP-155 supported"});if(!o)throw new V0({reason:"Chain ID not found"});if(!c)throw new V0({reason:"Contract address not found"});if(!i)throw new V0({reason:"Token ID not found"});if(!a)throw new V0({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function Vj(t,{nft:e}){if(e.namespace==="erc721")return ja(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return ja(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new Lj({namespace:e.namespace})}async function Wj(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?Kj(t,{gatewayUrls:e,record:r}):fv({uri:r,gatewayUrls:e})}async function Kj(t,{gatewayUrls:e,record:r}){const n=Hj(r),i=await Vj(t,{nft:n}),{uri:s,isOnChain:o,isEncoded:a}=HA({uri:i,gatewayUrls:e});if(o&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return fv({uri:VA(u),gatewayUrls:e})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),qj({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,c)})}async function WA(t,e){const{blockNumber:r,blockTag:n,key:i,name:s,gatewayUrls:o,strict:a}=e,{chain:c}=t,l=(()=>
48{if(e.universalResolverAddress)return e.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return w0({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>s.endsWith(d)))return null;try{const d={address:l,abi:S$,functionName:"resolve",args:[Uo(Fw(s)),Cs({abi:e9,functionName:"text",args:[c2(s),i]}),o??[Dw]],blockNumber:r,blockTag:n},f=await $e(t,ja,"readContract")(d);if(f[0]==="0x")return null;const g=zu({abi:e9,functionName:"text",data:f[0]});return g===""?null:g}catch(d){if(a)throw d;if(dv(d,"resolve"))return null;throw d}}async function Zj(t,{blockNumber:e,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){const c=await $e(t,WA,"getEnsText")({blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:s,strict:o});if(!c)return null;try{return await Wj(t,{record:c,gatewayUrls:n})}catch{return null}}async function Gj(t,{address:e,blockNumber:r,blockTag:n,gatewayUrls:i,strict:s,universalResolverAddress:o}){let a=o;if(!a){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=w0({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const c=`${e.toLowerCase().substring(2)}.addr.reverse`;try{const l={address:a,abi:DL,functionName:"reverse",args:[Uo(Fw(c))],blockNumber:r,blockTag:n},u=$e(t,ja,"readContract"),[d,h]=i?await u({...l,args:[...l.args,i]}):await u(l);return e.toLowerCase()!==h.toLowerCase()?null:d}catch(l){if(s)throw l;if(dv(l,"reverse"))return null;throw l}}async function Yj(t,e){const{blockNumber:r,blockTag:n,name:i}=e,{chain:s}=t,o=(()=>
48{if(e.universalResolverAddress)return e.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return w0({blockNumber:r,chain:s,contract:"ensUniversalResolver"})})(),a=s==null?void 0:s.ensTlds;if(a&&!a.some(l=>i.endsWith(l)))throw new Error(`${i} is not a valid ENS TLD (${a==null?void 0:a.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);const[c]=await $e(t,ja,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Uo(Fw(i))],blockNumber:r,blockTag:n});return c}async function KA(t,e){var w,m,b;const{account:r=t.account,blockNumber:n,blockTag:i="latest",blobs:s,data:o,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:h,value:f,...g}=e,p=r?wr(r):void 0;try{Fu(e);const E=(typeof n=="bigint"?Ee(n):void 0)||i,I=(b=(m=(w=t.chain)==null?void 0:w.formatters)==null?void 0:m.transactionRequest)==null?void 0:b.format,A=(I||m0)({...Bw(g,{format:I}),from:p==null?void 0:p.address,blobs:s,data:o,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:h,value:f}),P=await t.request({method:"eth_createAccessList",params:[A,E]});return{accessList:P.accessList,gasUsed:BigInt(P.gasUsed)}}catch(v){throw nA(v,{...e,account:p,chain:t.chain})}}async function Jj(t){const e=Lw(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function ZA(t,{address:e,args:r,event:n,events:i,fromBlock:s,strict:o,toBlock:a}={}){const c=i??(n?[n]:void 0),l=Lw(t,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(f=>yp({abi:[f],eventName:f.name,args:r}))],n&&(u=u[0]));const d=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?Ee(s):s,toBlock:typeof a=="bigint"?Ee(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:d,request:l(d),strict:!!o,toBlock:a,type:"event"}}async function GA(t){const e=Lw(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function Xj(t){const e=await t.request({method:"eth_blobBaseFee"});return BigInt(e)}async function Qj(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const i=r!==void 0?Ee(r):void 0;let s;return e?s=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]},{dedupe:!0}):s=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]},{dedupe:!!i}),Ks(s)}async function S9(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r!==void 0?Ee(r):void 0,s=await t.request({method:"eth_getCode",params:[e,i||n]},{dedupe:!!i});if(s!=="0x")return s}class ez extends se{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function tz(t,e){const{address:r,factory:n,factoryData:i}=e;try{const[s,o,a,c,l,u,d]=await $e(t,ja,"readContract")({abi:rz,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:o,version:a,chainId:Number(c),verifyingContract:l,salt:u},extensions:d,fields:s}}catch(s){const o=s;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new ez({address:r}):o}}const rz=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function nz(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function iz(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const s=typeof r=="bigint"?Ee(r):void 0,o=await t.request({method:"eth_feeHistory",params:[Ee(e),s||n,i]},{dedupe:!!s});return nz(o)}async function sz(t,{filter:e}){const r=e.strict??!1,i=(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>Ua(s));return e.abi?rv({abi:e.abi,logs:i,strict:r}):i}function oz(t){return t.map(e=>
48({...e,value:BigInt(e.value)}))}function az(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?Ks(t.nonce):void 0,storageProof:t.storageProof?oz(t.storageProof):void 0}}async function cz(t,{address:e,blockNumber:r,blockTag:n,storageKeys:i}){const s=n??"latest",o=r!==void 0?Ee(r):void 0,a=await t.request({method:"eth_getProof",params:[e,i,o||s]});return az(a)}async function lz(t,{address:e,blockNumber:r,blockTag:n="latest",slot:i}){const s=r!==void 0?Ee(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,s||n]})}async function pv(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){var u,d,h;const o=n||"latest",a=r!==void 0?Ee(r):void 0;let c=null;if(i?c=await t.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):e?c=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,Ee(s)]},{dedupe:!0}):c=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,Ee(s)]},{dedupe:!!a}),!c)throw new eA({blockHash:e,blockNumber:r,blockTag:o,hash:i,index:s});return(((h=(d=(u=t.chain)==null?void 0:u.formatters)==null?void 0:d.transaction)==null?void 0:h.format)||IA)(c)}async function uz(t,{hash:e,transactionReceipt:r}){const[n,i]=await Promise.all([$e(t,bp,"getBlockNumber")({}),e?$e(t,pv,"getTransaction")({hash:e}):void 0]),s=(r==null?void 0:r.blockNumber)||(i==null?void 0:i.blockNumber);return s?n-s+1n:0n}async function l2(t,{hash:e}){var i,s,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!r)throw new tA({hash:e});return(((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionReceipt)==null?void 0:o.format)||nj)(r)}async function dz(t,e){var m;const{account:r,allowFailure:n=!0,batchSize:i,blockNumber:s,blockTag:o,multicallAddress:a,stateOverride:c}=e,l=e.contracts,u=i??(typeof((m=t.batch)==null?void 0:m.multicall)=="object"&&t.batch.multicall.batchSize||1024);let d=a;if(!d){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");d=w0({blockNumber:s,chain:t.chain,contract:"multicall3"})}const h=[[]];let f=0,g=0;for(let b=0;b<l.length;b++){const{abi:v,address:E,args:I,functionName:_}=l[b];try{const A=Cs({abi:v,args:I,functionName:_});g+=(A.length-2)/2,u>0&&g>u&&h[f].length>0&&(f++,g=(A.length-2)/2,h[f]=[]),h[f]=[...h[f],{allowFailure:!0,callData:A,target:E}]}catch(A){const P=gu(A,{abi:v,address:E,args:I,docsPath:"/docs/contract/multicall",functionName:_,sender:r});if(!n)throw P;h[f]=[...h[f],{allowFailure:!0,callData:"0x",target:E}]}}const p=await Promise.allSettled(h.map(b=>$e(t,ja,"readContract")({abi:fb,account:r,address:d,args:[b],blockNumber:s,blockTag:o,functionName:"aggregate3",stateOverride:c}))),w=[];for(let b=0;b<p.length;b++){const v=p[b];if(v.status==="rejected"){if(!n)throw v.reason;for(let I=0;I<h[b].length;I++)w.push({status:"failure",error:v.reason,result:void 0});continue}const E=v.value;for(let I=0;I<E.length;I++){const{returnData:_,success:A}=E[I],{callData:P}=h[b][I],{abi:y,address:O,functionName:S,args:k}=l[w.length];try{if(P==="0x")throw new up;if(!A)throw new Nw({data:_});const L=zu({abi:y,args:k,data:_,functionName:S});w.push(n?{result:L,status:"success"}:L)}catch(L){const T=gu(L,{abi:y,address:O,args:k,docsPath:"/docs/contract/multicall",functionName:S});if(!n)throw T;w.push({error:T,result:void 0,status:"failure"})}}}if(w.length!==l.length)throw new se("multicall results mismatch");return w}async function Pb(t,e){const{blockNumber:r,blockTag:n=t.experimental_blockTag??"latest",blocks:i,returnFullTransactions:s,traceTransfers:o,validation:a}=e;try{const c=[];for(const h of i){const f=h.blockOverrides?x$(h.blockOverrides):void 0,g=h.calls.map(w=>{const m=w,b=m.account?wr(m.account):void 0,v=m.abi?Cs(m):m.data,E={...m,data:m.dataSuffix?Ri([v||"0x",m.dataSuffix]):v,from:m.from??(b==null?void 0:b.address)};return Fu(E),m0(E)}),p=h.stateOverrides?ev(h.stateOverrides):void 0;c.push({blockOverrides:f,calls:g,stateOverrides:p})}const u=(typeof r=="bigint"?Ee(r):void 0)||n;return(await t.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:o,validation:a},u]})).map((h,f)=>({...$A(h),calls:h.calls.map((g,p)=>{var O,S;const{abi:w,args:m,functionName:b,to:v}=i[f].calls[p],E=((O=g.error)==null?void 0:O.data)??g.returnData,I=BigInt(g.gasUsed),_=(S=g.logs)==null?void 0:S.map(k=>Ua(k)),A=g.status==="0x1"?"success":"failure",P=w&&A==="success"&&E!=="0x"?zu({abi:w,data:E,functionName:b}):null,y=(()=>{var L;if(A==="success")return;let k;if(((L=g.error)==null?void 0:L.data)==="0x"?k=new up:g.error&&(k=new Nw(g.error)),!!k)return gu(k,{abi:w??[],address:v??"0x",args:m,functionName:b??"<unknown>"})})();return{data:E,gasUsed:I,logs:_,status:A,...A==="success"?{result:P}:{error:y}}})}))}catch(c){const l=c,u=Rw(l,{});throw u instanceof gp?l:u}}function YA(t,e={}){const{as:r=typeof t=="string"?"Hex":"Bytes"}=e,n=V$(CL(t));return r==="Bytes"?n:v$(n)}let hz=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const fz={checksum:new hz(8192)},r3=fz.checksum,pz=/^0x[a-fA-F0-9]{40}$/;function qw(t,e={}){const{strict:r=!0}=e;if(!pz.test(t))throw new I9({address:t,cause:new wz});if(r){if(t.toLowerCase()===t)return;if(gz(t)!==t)throw new I9({address:t,cause:new mz})}}function gz(t){if(r3.has(t))return r3.get(t);
48qw(t,{strict:!1});const e=t.substring(2).toLowerCase(),r=YA(SL(e),{as:"Bytes"}),n=e.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(r[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());const i=`0x${n.join("")}`;return r3.set(t,i),i}function Tb(t,e={}){const{strict:r=!0}=e??{};try{return qw(t,{strict:r}),!0}catch{return!1}}class I9 extends yr{constructor({address:e,cause:r}){super(`Address "${e}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class wz extends yr{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class mz extends yr{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}function Ob(t){let e=!0,r="",n=0,i="",s=!1;for(let o=0;o<t.length;o++){const a=t[o];if(["(",")",","].includes(a)&&(e=!0),a==="("&&n++,a===")"&&n--,!!e){if(n===0){if(a===" "&&["event","function","error",""].includes(i))i="";else if(i+=a,a===")"){s=!0;break}continue}if(a===" "){t[o-1]!==","&&r!==","&&r!==",("&&(r="",e=!1);continue}i+=a,r+=a}}if(!s)throw new yr("Unable to normalize signature.");return i}function Nb(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Tb(t,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>Nb(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>Nb(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function JA(t,e,r){for(const n in t){const i=t[n],s=e[n];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return JA(i.components,s.components,r[n]);const o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?Tb(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?Tb(r[n],{strict:!1}):!1)return o}}function XA(t,e={}){const{prepare:r=!0}=e,n=Array.isArray(t)||typeof t=="string"?W8(t):t;return{...n,...r?{hash:oh(n)}:{}}}function yz(t,e,r){const{args:n=[],prepare:i=!0}=r??{},s=NL(e,{strict:!1}),o=t.filter(l=>s?l.type==="function"||l.type==="error"?QA(l)===W6(e,0,4):l.type==="event"?oh(l)===e:!1:"name"in l&&l.name===e);if(o.length===0)throw new kb({name:e});if(o.length===1)return{...o[0],...i?{hash:oh(o[0])}:{}};let a;for(const l of o){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...i?{hash:oh(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,h)=>{const f="inputs"in l&&l.inputs[h];return f?Nb(d,f):!1})){if(a&&"inputs"in a&&a.inputs){const d=JA(l.inputs,a.inputs,n);if(d)throw new vz({abiItem:l,type:d[0]},{abiItem:a,type:d[1]})}a=l}}const c=(()=>{if(a)return a;const[l,...u]=o;return{...l,overloads:u}})();if(!c)throw new kb({name:e});return{...c,...i?{hash:oh(c)}:{}}}function QA(t){return W6(oh(t),0,4)}function bz(t){const e=typeof t=="string"?t:$2(t);return Ob(e)}function oh(t){return typeof t!="string"&&"hash"in t&&t.hash?t.hash:YA(V6(bz(t)))}class vz extends yr{constructor(e,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${Ob($2(e.abiItem))}\`, and`,`\`${r.type}\` in \`${Ob($2(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class kb extends yr{constructor({name:e,data:r,type:n="item"}){const i=e?` with name "${e}"`:r?` with data "${r}"`:"";super(`ABI ${n}${i} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}const Ez=/^(.*)\[([0-9]*)\]$/,Cz=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,eP=/^(u?int)(8|
4816|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function xz({checksumAddress:t,parameters:e,values:r}){const n=[];for(let i=0;i<e.length;i++)n.push(gv({checksumAddress:t,parameter:e[i],value:r[i]}));return n}function gv({checksumAddress:t=!1,parameter:e,value:r}){const n=e,i=Oz(n.type);if(i){const[s,o]=i;return Sz(r,{checksumAddress:t,length:s,parameter:{...n,type:o}})}if(n.type==="tuple")return Tz(r,{checksumAddress:t,parameter:n});if(n.type==="address")return _z(r,{checksum:t});if(n.type==="bool")return $z(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const s=n.type.startsWith("int"),[,,o="256"]=eP.exec(n.type)??[];return Az(r,{signed:s,size:Number(o)})}if(n.type.startsWith("bytes"))return Iz(r,{type:n.type});if(n.type==="string")return Pz(r);throw new iP(n.type)}function wv(t){let e=0;for(let s=0;s<t.length;s++){const{dynamic:o,encoded:a}=t[s];o?e+=32:e+=fs(a)}const r=[],n=[];let i=0;for(let s=0;s<t.length;s++){const{dynamic:o,encoded:a}=t[s];o?(r.push(Tn(e+i,{size:32})),n.push(a),i+=fs(a)):r.push(a)}return jo(...r,...n)}function _z(t,e){const{checksum:r=!1}=e;return qw(t,{strict:r}),{dynamic:!1,encoded:fu(t.toLowerCase())}}function Sz(t,e){const{checksumAddress:r,length:n,parameter:i}=e,s=n===null;if(!Array.isArray(t))throw new kz(t);if(!s&&t.length!==n)throw new Nz({expectedLength:n,givenLength:t.length,type:`${i.type}[${n}]`});let o=!1;const a=[];for(let c=0;c<t.length;c++){const l=gv({checksumAddress:r,parameter:i,value:t[c]});l.dynamic&&(o=!0),a.push(l)}if(s||o){const c=wv(a);if(s){const l=Tn(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?jo(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:jo(...a.map(({encoded:c})=>c))}}function Iz(t,{type:e}){const[,r]=e.split("bytes"),n=fs(t);if(!r){let i=t;return n%32!==0&&(i=pu(i,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:jo(fu(Tn(n,{size:32})),i)}}if(n!==Number.parseInt(r))throw new rP({expectedSize:Number.parseInt(r),value:t});return{dynamic:!1,encoded:pu(t)}}function $z(t){if(typeof t!="boolean")throw new yr(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:fu(b$(t))}}function Az(t,{signed:e,size:r}){if(typeof r=="number"){const n=2n**(BigInt(r)-(e?1n:0n))-1n,i=e?-n-1n:0n;if(t>n||t<i)throw new E$({max:n.toString(),min:i.toString(),signed:e,size:r/8,value:t.toString()})}return{dynamic:!1,encoded:Tn(t,{size:32,signed:e})}}function Pz(t){const e=V6(t),r=Math.ceil(fs(e)/32),n=[];for(let i=0;i<r;i++)n.push(pu(W6(e,i*32,(i+1)*32)));return{dynamic:!0,encoded:jo(pu(Tn(fs(e),{size:32})),...n)}}function Tz(t,e){const{checksumAddress:r,parameter:n}=e;let i=!1;const s=[];for(let o=0;o<n.components.length;o++){const a=n.components[o],c=Array.isArray(t)?o:a.name,l=gv({checksumAddress:r,parameter:a,value:t[c]});s.push(l),l.dynamic&&(i=!0)}return{dynamic:i,encoded:i?wv(s):jo(...s.map(({encoded:o})=>o))}}function Oz(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function tP(t,e,r){const{checksumAddress:n=!1}={};if(t.length!==e.length)throw new nP({expectedLength:t.length,givenLength:e.length});const i=xz({checksumAddress:n,parameters:t,values:e}),s=wv(i);return s.length===0?"0x":s}function Rb(t,e){if(t.length!==e.length)throw new nP({expectedLength:t.length,givenLength:e.length});const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n];r.push(Rb.encode(i,s))}return jo(...r)}(function(t){function e(r,n,i=!1){if(r==="address"){const c=n;return qw(c),fu(c.toLowerCase(),i?32:0)}if(r==="string")return V6(n);if(r==="bytes")return n;if(r==="bool")return fu(b$(n),i?32:1);const s=r.match(eP);if(s){const[c,l,u="256"]=s,d=Number.parseInt(u)/8;return Tn(n,{size:i?32:d,signed:l==="int"})}const o=r.match(Cz);if(o){const[c,l]=o;if(Number.parseInt(l)!==(n.length-2)/2)throw new rP({expectedSize:Number.parseInt(l),value:n});return pu(n,i?32:0)}const a=r.match(Ez);if(a&&Array.isArray(n)){const[c,l]=a,u=[];for(let d=0;d<n.length;d++)u.push(e(l,n[d],!0));return u.length===0?"0x":jo(...u)}throw new iP(r)}t.encode=e})(Rb||(Rb={}));class Nz extends yr{constructor({expectedLength:e,givenLength:r,type:n}){super(`Array length mismatch for type \`${n}\`. Expected: \`${e}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLe
48ngthMismatchError"})}}class rP extends yr{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${fs(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class nP extends yr{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${r}`].join(`
49`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class kz extends yr{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class iP extends yr{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function Rz(t,e){var i;const{bytecode:r,args:n}=e;return jo(r,(i=t.inputs)!=null&&i.length&&(n!=null&&n.length)?tP(t.inputs,n):"0x")}function Bz(t){return XA(t)}function Dz(t,...e){const{overloads:r}=t,n=r?Lz([t,...r],t.name,{args:e[0]}):t,i=Mz(n),s=e.length>0?tP(n.inputs,e[0]):void 0;return s?jo(i,s):i}function md(t,e={}){return XA(t,e)}function Lz(t,e,r){const n=yz(t,e,r);if(n.type!=="function")throw new kb({name:e,type:"function"});return n}function Mz(t){return QA(t)}const Uz="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",ao="0x0000000000000000000000000000000000000000",jz="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function zz(t,e){const{blockNumber:r,blockTag:n,calls:i,stateOverrides:s,traceAssetChanges:o,traceTransfers:a,validation:c}=e,l=e.account?wr(e.account):void 0;if(o&&!l)throw new se("`account` is required when `traceAssetChanges` is true");const u=l?Rz(Bz("constructor(bytes, bytes)"),{bytecode:I$,args:[jz,Dz(md("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(e.calls.map(async R=>{if(!R.data&&!R.abi)return;const{accessList:M}=await KA(t,{account:l.address,...R,data:R.abi?Cs(R):R.data});return M.map(({address:U,storageKeys:z})=>z.length>0?U:null)})).then(R=>R.flat().filter(Boolean)):[],h=await Pb(t,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:s},{calls:d.map((R,M)=>({abi:[md("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:R,from:ao,nonce:M})),stateOverrides:[{address:ao,nonce:0}]}]:[],{calls:[...i,{}].map(R=>({...R,from:l==null?void 0:l.address})),stateOverrides:s},...o?[{calls:[{data:u}]},{calls:d.map((R,M)=>({abi:[md("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:R,from:ao,nonce:M})),stateOverrides:[{address:ao,nonce:0}]},{calls:d.map((R,M)=>({to:R,abi:[md("function decimals() returns (uint256)")],functionName:"decimals",from:ao,nonce:M})),stateOverrides:[{address:ao,nonce:0}]},{calls:d.map((R,M)=>({to:R,abi:[md("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:ao,nonce:M})),stateOverrides:[{address:ao,nonce:0}]},{calls:d.map((R,M)=>({to:R,abi:[md("function symbol() returns (string)")],functionName:"symbol",from:ao,nonce:M})),stateOverrides:[{address:ao,nonce:0}]}]:[]],traceTransfers:a,validation:c}),f=o?h[2]:h[0],[g,p,,w,m,b,v,E]=o?h:[],{calls:I,..._}=f,A=I.slice(0,-1)??[],P=(g==null?void 0:g.calls)??[],y=(p==null?void 0:p.calls)??[],O=[...P,...y].map(R=>R.status==="success"?Ni(R.data):null),S=(w==null?void 0:w.calls)??[],k=(m==null?void 0:m.calls)??[],L=[...S,...k].map(R=>R.status==="success"?Ni(R.data):null),T=((b==null?void 0:b.calls)??[]).map(R=>
vendor: 8,168 bytes, line 49
49R.status==="success"?R.result:null),C=((E==null?void 0:E.calls)??[]).map(R=>R.status==="success"?R.result:null),x=((v==null?void 0:v.calls)??[]).map(R=>R.status==="success"?R.result:null),B=[];for(const[R,M]of L.entries()){const U=O[R];if(typeof M!="bigint"||typeof U!="bigint")continue;const z=T[R-1],H=C[R-1],Y=x[R-1],V=R===0?{address:Uz,decimals:18,symbol:"ETH"}:{address:d[R-1],decimals:Y||z?Number(z??1):void 0,symbol:H??void 0};B.some(G=>G.token.address===V.address)||B.push({token:V,value:{pre:U,post:M,diff:M-U}})}return{assetChanges:B,block:_,results:A}}let sP=class extends j6{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,tL(e);const n=Sw(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),$h(s)}update(e){return Ih(this),this.iHash.update(e),this}digestInto(e){Ih(this),Zs(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:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const oP=(t,e,r)=>new sP(t,e).update(r).digest();oP.create=(t,e)=>new sP(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const si=BigInt(0),Nn=BigInt(1),Vl=BigInt(2),Fz=BigInt(3),aP=BigInt(4),cP=BigInt(5),lP=BigInt(8);function cs(t,e){const r=t%e;return r>=si?r:e+r}function Ki(t,e,r){let n=t;for(;e-- >si;)n*=n,n%=r;return n}function $9(t,e){if(t===si)throw new Error("invert: expected non-zero number");if(e<=si)throw new Error("invert: expected positive modulus, got "+e);let r=cs(t,e),n=e,i=si,s=Nn;for(;r!==si;){const a=n/r,c=n%r,l=i-s*a;n=r,r=c,i=s,s=l}if(n!==Nn)throw new Error("invert: does not exist");return cs(i,e)}function uP(t,e){const r=(t.ORDER+Nn)/aP,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function qz(t,e){const r=(t.ORDER-cP)/lP,n=t.mul(e,Vl),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,Vl),i),a=t.mul(s,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function Hz(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-Nn,r=0;for(;e%Vl===si;)e/=Vl,r++;let n=Vl;const i=Hw(t);for(;A9(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return uP;let s=i.pow(n,e);const o=(e+Nn)/Vl;return function(c,l){if(c.is0(l))return l;if(A9(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,s),h=c.pow(l,e),f=c.pow(l,o);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let g=1,p=c.sqr(h);for(;!c.eql(p,c.ONE);)if(g++,p=c.sqr(p),g===u)throw new Error("Cannot find square root");const w=Nn<<BigInt(u-g-1),m=c.pow(d,w);u=g,d=c.sqr(m),h=c.mul(h,d),f=c.mul(f,m)}return f}}function Vz(t){return t%aP===Fz?uP:t%lP===cP?qz:Hz(t)}const Wz=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Kz(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=Wz.reduce((n,i)=>(n[i]="function",n),e);return q6(t,r),t}function Zz(t,e,r){if(r<si)throw new Error("invalid exponent, negatives unsupported");if(r===si)return t.ONE;if(r===Nn)return e;let n=t.ONE,i=e;for(;r>si;)r&Nn&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Nn;return n}function dP(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function A9(t,e){const r=(t.ORDER-Nn)/Vl,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function Gz(t,e){e!==void 0&&x1(e);const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Hw(t,e,r=!1,n={}){if(t<=si)throw new Error("invalid field: expected ORDER > 0, got "+t);let i,s;if(typeof e=="object"&&e!=null){if(n.sqrt||r)throw new Error("cannot specify opts in two arguments");const u=e;u.BITS&&(i=u.BITS),u.sqrt&&(s=u.sqrt),typeof u.isLE=="boolean"&&(r=u.isLE)}else typeof e=="number"&&(i=e),n.sqrt&&(s=n.sqrt);const{nBitLength:o,nByteLength:a}=Gz(t,i);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const l=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:a,MASK:$w(o),ZERO:si,ONE:Nn,create:u=>cs(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return si<=u&&u<t},is0:u=>u===si,isValidNot0:u=>!l.is0(u)&&l.isValid(u),isOdd:u=>(u&Nn)===Nn,neg:u=>cs(-u,t),eql:(u,d)=>u===d,sqr:u=>cs(u*u,t),add:(u,d)=>cs(u+d,t),sub:(u,d)=>cs(u-d,t),mul:(u,d)=>cs(u*d,t),pow:(u,d)=>Zz(l,u,d),div:(u,d)=>cs(u*$9(d,t),t),sqrN:u=>u*u,addN:(u,d)=>u+d,subN:(u,d)=>u-d,mulN:(u,d)=>u*d,inv:u=>$9(u,t),sqrt:s||(u=>(c||(c=Vz(t)),c(l,u))),toBytes:u=>r?w$(u,a):F6(u,a),fromBytes:u=>{if(u.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+u.length);return r?g$(u):Iw(u)},invertBatch:u=>dP(l,u),cmov:(u,d,h)=>h?d:u});return Object.freeze(l)}function hP(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function fP(t){const e=hP(t);return e+Math.ceil(e/2)}function Yz(t,e,r=!1){const n=t.length,i=hP(e),s=fP(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?g$(t):Iw(t),a=cs(o,e-Nn)+Nn;return r?w$(a,i):F6(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Th=BigInt(0),Wl=BigInt(1);function Df(t,e){const r=e.negate();return t?r:e}function Jz(t,e,r){const n=o=>o.pz,i=dP(t.Fp,r.map(n));return r.map((o,a)=>o.toAffine(i[a])).map(t.fromAffine)}function pP(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function n3(t,e){pP(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=$w(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function P9(t,e,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=Wl);const l=e*n,u=l+Math.abs(a)-1,d=a===0,h=a<0,f=e%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:h,isNegF:f,offsetF:l}}function Xz(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function Qz(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const i3=new WeakMap,gP=new WeakMap;function s3(t){return gP.get(t)||1}function T9(t){if(t!==Th)throw new Error("invalid wNAF")}function eF(t,e){return{constTimeNegate:Df,hasPrecomputes(r){return s3(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>Th;)n&Wl&&(i=i.add(s)),s=s.double(),n>>=Wl;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=n3(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let s=t.ZERO,o=t.BASE;const a=n3(r,e);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:h,isNegF:f,offsetF:g}=P9(i,c,a);i=l,d?o=o.add(Df(f,n[g])):s=s.add(Df(h,n[u]))}return T9(i),{p:s,f:o}},wNAFUnsafe(r,n,i,s=t.ZERO){const o=n3(r,e);for(let a=0;a<o.windows&&i!==Th;a++){const{nextN:c,offset:l,isZero:u,isNeg:d}=P9(i,a,o);if(i=c,!u){const h=n[l];s=s.add(d?h.negate():h)}}return T9(i),s},getPrecomputes(r,n,i){let s=i3.get(n);
49return s||(s=this.precomputeWindow(n,r),r!==1&&(typeof i=="function"&&(s=i(s)),i3.set(n,s))),s},wNAFCached(r,n,i){const s=s3(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=s3(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){pP(n,e),gP.set(r,n),i3.delete(r)}}}function tF(t,e,r,n){let i=e,s=t.ZERO,o=t.ZERO;for(;r>Th||n>Th;)r&Wl&&(s=s.add(i)),n&Wl&&(o=o.add(i)),i=i.double(),r>>=Wl,n>>=Wl;return{p1:s,p2:o}}function rF(t,e,r,n){Xz(r,t),Qz(n,e);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=dL(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=$w(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((e.BITS-1)/c)*c;let h=o;for(let f=d;f>=0;f-=c){u.fill(o);for(let p=0;p<s;p++){const w=n[p],m=Number(w>>BigInt(f)&l);u[m]=u[m].add(r[p])}let g=o;for(let p=u.length-1,w=o;p>0;p--)w=w.add(u[p]),g=g.add(w);if(h=h.add(g),f!==0)for(let p=0;p<c;p++)h=h.double()}return h}function O9(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Kz(e),e}else return Hw(t)}function nF(t,e,r={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const a of["p","n","h"]){const c=e[a];if(!(typeof c=="bigint"&&c>Th))throw new Error(`CURVE.${a} must be positive bigint`)}const n=O9(e.p,r.Fp),i=O9(e.n,r.Fn),o=["Gx","Gy","a","b"];for(const a of o)if(!n.isValid(e[a]))throw new Error(`CURVE.${a} must be valid field element of CURVE.Fp`);return{Fp:n,Fn:i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function N9(t){t.lowS!==void 0&&A2("lowS",t.lowS),t.prehash!==void 0&&A2("prehash",t.prehash)}let iF=class extends Error{constructor(e=""){super(e)}};const Ea={Err:iF,_tlv:{encode:(t,e)=>{const{Err:r}=Ea;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=fg(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?fg(i.length/2|128):"";return fg(t)+s+i+e},decode(t,e){const{Err:r}=Ea;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=Ea;if(t<Lf)throw new e("integer: negative integers are not allowed");let r=fg(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=Ea;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return Iw(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=Ea,i=os("signature",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=Ea,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},Lf=BigInt(0),Mf=BigInt(1),sF=BigInt(2),mg=BigInt(3),oF=BigInt(4);function aF(t,e,r){function n(i){const s=t.sqr(i),o=t.mul(s,i);return t.add(t.add(o,t.mul(i,e)),r)}return n}function wP(t,e,r){const{BYTES:n}=t;function i(s){let o;if(typeof s=="bigint")o=s;else{let a=os("private key",s);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const c=new Uint8Array(n);c.set(a,c.length-a.length),a=c}try{o=t.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof s}`)}}if(r&&(o=t.create(o)),!t.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return i}function cF(t,e={}){const{Fp:r,Fn:n}=nF("weierstrass",t,e),{h:i,n:s}=t;q6(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});
49const{endo:o}=e;if(o&&(!r.is0(t.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function c(P,y,O){const{x:S,y:k}=y.toAffine(),L=r.toBytes(S);if(A2("isCompressed",O),O){a();const T=!r.isOdd(k);return ql(mP(T),L)}else return ql(Uint8Array.of(4),L,r.toBytes(k))}function l(P){Zs(P);const y=r.BYTES,O=y+1,S=2*y+1,k=P.length,L=P[0],T=P.subarray(1);if(k===O&&(L===2||L===3)){const C=r.fromBytes(T);if(!r.isValid(C))throw new Error("bad point: is not on curve, wrong x");const x=h(C);let B;try{B=r.sqrt(x)}catch(U){const z=U instanceof Error?": "+U.message:"";throw new Error("bad point: is not on curve, sqrt error"+z)}a();const R=r.isOdd(B);return(L&1)===1!==R&&(B=r.neg(B)),{x:C,y:B}}else if(k===S&&L===4){const C=r.fromBytes(T.subarray(y*0,y*1)),x=r.fromBytes(T.subarray(y*1,y*2));if(!f(C,x))throw new Error("bad point: is not on curve");return{x:C,y:x}}else throw new Error(`bad point: got length ${k}, expected compressed=${O} or uncompressed=${S}`)}const u=e.toBytes||c,d=e.fromBytes||l,h=aF(r,t.a,t.b);function f(P,y){const O=r.sqr(y),S=h(P);return r.eql(O,S)}if(!f(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const g=r.mul(r.pow(t.a,mg),oF),p=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(g,p)))throw new Error("bad curve params: a or b");function w(P,y,O=!1){if(!r.isValid(y)||O&&r.is0(y))throw new Error(`bad point coordinate ${P}`);return y}function m(P){if(!(P instanceof I))throw new Error("ProjectivePoint expected")}const b=G8((P,y)=>{const{px:O,py:S,pz:k}=P;if(r.eql(k,r.ONE))return{x:O,y:S};const L=P.is0();y==null&&(y=L?r.ONE:r.inv(k));const T=r.mul(O,y),C=r.mul(S,y),x=r.mul(k,y);if(L)return{x:r.ZERO,y:r.ZERO};if(!r.eql(x,r.ONE))throw new Error("invZ was invalid");return{x:T,y:C}}),v=G8(P=>{if(P.is0()){if(e.allowInfinityPoint&&!r.is0(P.py))return;throw new Error("bad point: ZERO")}const{x:y,y:O}=P.toAffine();if(!r.isValid(y)||!r.isValid(O))throw new Error("bad point: x or y not field elements");if(!f(y,O))throw new Error("bad point: equation left != right");if(!P.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function E(P,y,O,S,k){return O=new I(r.mul(O.px,P),O.py,O.pz),y=Df(S,y),O=Df(k,O),y.add(O)}class I{constructor(y,O,S){this.px=w("x",y),this.py=w("y",O,!0),this.pz=w("z",S),Object.freeze(this)}static fromAffine(y){const{x:O,y:S}=y||{};if(!y||!r.isValid(O)||!r.isValid(S))throw new Error("invalid affine point");if(y instanceof I)throw new Error("projective point not allowed");return r.is0(O)&&r.is0(S)?I.ZERO:new I(O,S,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){return Jz(I,"pz",y)}static fromBytes(y){return Zs(y),I.fromHex(y)}static fromHex(y){const O=I.fromAffine(d(os("pointHex",y)));return O.assertValidity(),O}static fromPrivateKey(y){const O=wP(n,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return I.BASE.multiply(O(y))}static msm(y,O){return rF(I,n,y,O)}precompute(y=8,O=!0){return A.setWindowSize(this,y),O||this.multiply(mg),this}_setWindowSize(y){this.precompute(y)}assertValidity(){v(this)}hasEvenY(){const{y}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(y)}equals(y){m(y);const{px:O,py:S,pz:k}=this,{px:L,py:T,pz:C}=y,x=r.eql(r.mul(O,C),r.mul(L,k)),B=r.eql(r.mul(S,C),r.mul(T,k));return x&&B}negate(){return new I(this.px,r.neg(this.py),this.pz)}double(){const{a:y,b:O}=t,S=r.mul(O,mg),{px:k,py:L,pz:T}=this;let C=r.ZERO,x=r.ZERO,B=r.ZERO,R=r.mul(k,k),M=r.mul(L,L),U=r.mul(T,T),z=r.mul(k,L);return z=r.add(z,z),B=r.mul(k,T),B=r.add(B,B),C=r.mul(y,B),x=r.mul(S,U),x=r.add(C,x),C=r.sub(M,x),x=r.add(M,x),x=r.mul(C,x),C=r.mul(z,C),B=r.mul(S,B),U=r.mul(y,U),z=r.sub(R,U),z=r.mul(y,z),z=r.add(z,B),B=r.add(R,R),R=r.add(B,R),R=r.add(R,U),R=r.mul(R,z),x=r.add(x,R),U=r.mul(L,T),U=r.add(U,U),R=r.mul(U,z),C=r.sub(C,R),B=r.mul(U,M),B=r.add(B,B),B=r.add(B,B),new I(C,x,B)}add(y){m(y);const{px:O,py:S,pz:k}=this,{px:L,py:T,pz:C}=y;let x=r.ZERO,B=r.ZERO,R=r.ZERO;const M=t.a,U=r.mul(t.b,mg);let z=r.mul(O,L),H=r.mul(S,T),Y=r.mul(k,C),V=r.add(O,S),G=r.add(L,T);V=r.mul(V,G),G=r.add(z,H),V=r.sub(V,G),G=r.add(O,k);let re=r.add(L,C);
49return G=r.mul(G,re),re=r.add(z,Y),G=r.sub(G,re),re=r.add(S,k),x=r.add(T,C),re=r.mul(re,x),x=r.add(H,Y),re=r.sub(re,x),R=r.mul(M,G),x=r.mul(U,Y),R=r.add(x,R),x=r.sub(H,R),R=r.add(H,R),B=r.mul(x,R),H=r.add(z,z),H=r.add(H,z),Y=r.mul(M,Y),G=r.mul(U,G),H=r.add(H,Y),Y=r.sub(z,Y),Y=r.mul(M,Y),G=r.add(G,Y),z=r.mul(H,G),B=r.add(B,z),z=r.mul(re,G),x=r.mul(V,x),x=r.sub(x,z),z=r.mul(V,H),R=r.mul(re,R),R=r.add(R,z),new I(x,B,R)}subtract(y){return this.add(y.negate())}is0(){return this.equals(I.ZERO)}multiply(y){const{endo:O}=e;if(!n.isValidNot0(y))throw new Error("invalid scalar: out of range");let S,k;const L=T=>A.wNAFCached(this,T,I.normalizeZ);if(O){const{k1neg:T,k1:C,k2neg:x,k2:B}=O.splitScalar(y),{p:R,f:M}=L(C),{p:U,f:z}=L(B);k=M.add(z),S=E(O.beta,R,U,T,x)}else{const{p:T,f:C}=L(y);S=T,k=C}return I.normalizeZ([S,k])[0]}multiplyUnsafe(y){const{endo:O}=e,S=this;if(!n.isValid(y))throw new Error("invalid scalar: out of range");if(y===Lf||S.is0())return I.ZERO;if(y===Mf)return S;if(A.hasPrecomputes(this))return this.multiply(y);if(O){const{k1neg:k,k1:L,k2neg:T,k2:C}=O.splitScalar(y),{p1:x,p2:B}=tF(I,S,L,C);return E(O.beta,x,B,k,T)}else return A.wNAFCachedUnsafe(S,y)}multiplyAndAddUnsafe(y,O,S){const k=this.multiplyUnsafe(O).add(y.multiplyUnsafe(S));return k.is0()?void 0:k}toAffine(y){return b(this,y)}isTorsionFree(){const{isTorsionFree:y}=e;return i===Mf?!0:y?y(I,this):A.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:y}=e;return i===Mf?this:y?y(I,this):this.multiplyUnsafe(i)}toBytes(y=!0){return A2("isCompressed",y),this.assertValidity(),u(I,this,y)}toRawBytes(y=!0){return this.toBytes(y)}toHex(y=!0){return _1(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}I.BASE=new I(t.Gx,t.Gy,r.ONE),I.ZERO=new I(r.ZERO,r.ONE,r.ZERO),I.Fp=r,I.Fn=n;const _=n.BITS,A=eF(I,e.endo?Math.ceil(_/2):_);return I}function mP(t){return Uint8Array.of(t?2:3)}function lF(t,e,r={}){q6(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=e.randomBytes||cL,i=e.hmac||((S,...k)=>oP(e.hash,S,ql(...k))),{Fp:s,Fn:o}=t,{ORDER:a,BITS:c}=o;function l(S){const k=a>>Mf;return S>k}function u(S){return l(S)?o.neg(S):S}function d(S,k){if(!o.isValidNot0(k))throw new Error(`invalid signature ${S}: out of range 1..CURVE.n`)}class h{constructor(k,L,T){d("r",k),d("s",L),this.r=k,this.s=L,T!=null&&(this.recovery=T),Object.freeze(this)}static fromCompact(k){const L=o.BYTES,T=os("compactSignature",k,L*2);return new h(o.fromBytes(T.subarray(0,L)),o.fromBytes(T.subarray(L,L*2)))}static fromDER(k){const{r:L,s:T}=Ea.toSig(os("DER",k));return new h(L,T)}assertValidity(){}addRecoveryBit(k){return new h(this.r,this.s,k)}recoverPublicKey(k){const L=s.ORDER,{r:T,s:C,recovery:x}=this;if(x==null||![0,1,2,3].includes(x))throw new Error("recovery id invalid");if(a*sF<L&&x>1)throw new Error("recovery id is ambiguous for h>1 curve");const R=x===2||x===3?T+a:T;if(!s.isValid(R))throw new Error("recovery id 2 or 3 invalid");const M=s.toBytes(R),U=t.fromHex(ql(mP((x&1)===0),M)),z=o.inv(R),H=v(os("msgHash",k)),Y=o.create(-H*z),V=o.create(C*z),G=t.BASE.multiplyUnsafe(Y).add(U.multiplyUnsafe(V));if(G.is0())throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return l(this.s)}normalizeS(){return this.hasHighS()?new h(this.r,o.neg(this.s),this.recovery):this}toBytes(k){if(k==="compact")return ql(o.toBytes(this.r),o.toBytes(this.s));if(k==="der")return U6(Ea.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return _1(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return _1(this.toBytes("compact"))}}const f=wP(o,r.allowedPrivateKeyLengths,r.wrapPrivateKey),g={isValidPrivateKey(S){try{return f(S),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const S=a;return Yz(n(fP(S)),S)},precompute(S=8,k=t.BASE){return k.precompute(S,!1)}};function p(S,k=!0){return t.fromPrivateKey(S).toBytes(k)}function w(S){if(typeof S=="bigint")return!1;if(S instanceof t)return!0;const L=os("key",S).length,T=s.BYTES,C=T+1,x=2*T+1;
49if(!(r.allowedPrivateKeyLengths||o.BYTES===C))return L===C||L===x}function m(S,k,L=!0){if(w(S)===!0)throw new Error("first arg must be private key");if(w(k)===!1)throw new Error("second arg must be public key");return t.fromHex(k).multiply(f(S)).toBytes(L)}const b=e.bits2int||function(S){if(S.length>8192)throw new Error("input is too large");const k=Iw(S),L=S.length*8-c;return L>0?k>>BigInt(L):k},v=e.bits2int_modN||function(S){return o.create(b(S))},E=$w(c);function I(S){return uL("num < 2^"+c,S,Lf,E),o.toBytes(S)}function _(S,k,L=A){if(["recovered","canonical"].some(V=>V in L))throw new Error("sign() legacy options not supported");const{hash:T}=e;let{lowS:C,prehash:x,extraEntropy:B}=L;C==null&&(C=!0),S=os("msgHash",S),N9(L),x&&(S=os("prehashed msgHash",T(S)));const R=v(S),M=f(k),U=[I(M),I(R)];if(B!=null&&B!==!1){const V=B===!0?n(s.BYTES):B;U.push(os("extraEntropy",V))}const z=ql(...U),H=R;function Y(V){const G=b(V);if(!o.isValidNot0(G))return;const re=o.inv(G),de=t.BASE.multiply(G).toAffine(),ce=o.create(de.x);if(ce===Lf)return;const ae=o.create(re*o.create(H+ce*M));if(ae===Lf)return;let be=(de.x===ce?0:2)|Number(de.y&Mf),Ce=ae;return C&&l(ae)&&(Ce=u(ae),be^=1),new h(ce,Ce,be)}return{seed:z,k2sig:Y}}const A={lowS:e.lowS,prehash:!1},P={lowS:e.lowS,prehash:!1};function y(S,k,L=A){const{seed:T,k2sig:C}=_(S,k,L);return hL(e.hash.outputLen,o.BYTES,i)(T,C)}t.BASE.precompute(8);function O(S,k,L,T=P){const C=S;k=os("msgHash",k),L=os("publicKey",L),N9(T);const{lowS:x,prehash:B,format:R}=T;if("strict"in T)throw new Error("options.strict was renamed to lowS");if(R!==void 0&&!["compact","der","js"].includes(R))throw new Error('format must be "compact", "der" or "js"');const M=typeof C=="string"||M6(C),U=!M&&!R&&typeof C=="object"&&C!==null&&typeof C.r=="bigint"&&typeof C.s=="bigint";if(!M&&!U)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let z,H;try{if(U)if(R===void 0||R==="js")z=new h(C.r,C.s);else throw new Error("invalid format");if(M){try{R!=="compact"&&(z=h.fromDER(C))}catch(Ce){if(!(Ce instanceof Ea.Err))throw Ce}!z&&R!=="der"&&(z=h.fromCompact(C))}H=t.fromHex(L)}catch{return!1}if(!z||x&&z.hasHighS())return!1;B&&(k=e.hash(k));const{r:Y,s:V}=z,G=v(k),re=o.inv(V),de=o.create(G*re),ce=o.create(Y*re),ae=t.BASE.multiplyUnsafe(de).add(H.multiplyUnsafe(ce));return ae.is0()?!1:o.create(ae.x)===Y}return Object.freeze({getPublicKey:p,getSharedSecret:m,sign:y,verify:O,utils:g,Point:t,Signature:h})}function uF(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=Hw(e.n,t.nBitLength),i={Fp:r,Fn:n,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:i}}function dF(t){const{CURVE:e,curveOpts:r}=uF(t),n={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,ecdsaOpts:n}}function hF(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function fF(t){const{CURVE:e,curveOpts:r,ecdsaOpts:n}=dF(t),i=cF(e,r),s=lF(i,n,r);return hF(t,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pF(t,e){const r=n=>fF({...t,hash:n});return{...r(e),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const N2={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")};BigInt(0);const gF=BigInt(1),Bb=BigInt(2),k9=(t,e)=>(t+e/Bb)/e;function wF(t){const e=N2.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,d=Ki(u,r,e)*u%e,h=Ki(d,r,e)*u%e,f=Ki(h,Bb,e)*l%e,g=Ki(f,i,e)*f%e,p=Ki(g,s,e)*g%e,w=Ki(p,a,e)*p%e,m=Ki(w,c,e)*w%e,b=Ki(m,a,e)*p%e,v=Ki(b,r,e)*u%e,E=Ki(v,o,e)*g%e,I=Ki(E,n,e)*l%e,_=Ki(I,Bb,e);if(!Db.eql(Db.sqr(_),t))throw new Error("Cannot find square root");return _}const Db=Hw(N2.p,void 0,void 0,{sqrt:wF}),mv=pF({...N2,Fp:Db,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=N2.n,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-gF*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,o=BigInt("0x100000000000000000000000000000000"),a=k9(s*t,e),c=k9(-n*t,e);let l=cs(t-a*r-c*i,e),u=cs(-a*n-c*s,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},CA),mF=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:mv},Symbol.toStringTag,{value:"Module"}));function yF({r:t,s:e,to:r="hex",v:n,yParity:i}){const s=(()=>
49{if(i===0||i===1)return i;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new mv.Signature(Ni(t),Ni(e)).toCompactHex()}${s===0?"1b":"1c"}`;return r==="hex"?o:hs(o)}async function yv(t,e){var d,h,f;const{address:r,factory:n,factoryData:i,hash:s,signature:o,universalSignatureVerifierAddress:a=(f=(h=(d=t.chain)==null?void 0:d.contracts)==null?void 0:h.universalSignatureVerifier)==null?void 0:f.address,...c}=e,l=Ws(o)?o:typeof o=="object"&&"r"in o&&"s"in o?yF(o):Or(o),u=await(async()=>!n&&!i||lj(l)?l:uj({address:n,data:i,signature:l}))();try{const g=a?{to:a,data:Cs({abi:r9,functionName:"isValidSig",args:[r,s,u]}),...c}:{data:kw({abi:r9,args:[r,s,u],bytecode:UL}),...c},{data:p}=await $e(t,wp,"call")(g);return lD(p??"0x0")}catch(g){try{if(mp(K$(r),await yA({hash:s,signature:o})))return!0}catch{}if(g instanceof rA)return!1;throw g}}async function bF(t,{address:e,message:r,factory:n,factoryData:i,signature:s,...o}){const a=TA(r);return yv(t,{address:e,factory:n,factoryData:i,hash:a,signature:s,...o})}async function vF(t,e){const{address:r,factory:n,factoryData:i,signature:s,message:o,primaryType:a,types:c,domain:l,...u}=e,d=IU({message:o,primaryType:a,types:c,domain:l});return yv(t,{address:r,factory:n,factoryData:i,hash:d,signature:s,...u})}function yP(t,{emitOnBegin:e=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:s,pollingInterval:o=t.pollingInterval}){const a=typeof s<"u"?s:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
49onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc"));let c;return a?(()=>{const d=gr(["watchBlockNumber",t.uid,e,r,o]);return za(d,{onBlockNumber:n,onError:i},h=>b0(async()=>{var f;try{const g=await $e(t,bp,"getBlockNumber")({cacheTime:0});if(c){if(g===c)return;if(g-c>1&&r)for(let p=c+1n;p<g;p++)h.onBlockNumber(p,c),c=p}(!c||g>c)&&(h.onBlockNumber(g,c),c=g)}catch(g){(f=h.onError)==null||f.call(h,g)}},{emitOnBegin:e,interval:o}))})():(()=>{const d=gr(["watchBlockNumber",t.uid,e,r]);return za(d,{onBlockNumber:n,onError:i},h=>{let f=!0,g=()=>f=!1;return(async()=>{try{const p=(()=>{if(t.transport.type==="fallback"){const m=t.transport.transports.find(b=>b.config.type==="webSocket"||b.config.type==="ipc");return m?m.value:t.transport}return t.transport})(),{unsubscribe:w}=await p.subscribe({params:["newHeads"],onData(m){var v;if(!f)return;const b=Ni((v=m.result)==null?void 0:v.number);h.onBlockNumber(b,c),c=b},onError(m){var b;(b=h.onError)==null||b.call(h,m)}});g=w,f||g()}catch(p){i==null||i(p)}})(),()=>g()})})()}async function EF(t,e){const{checkReplacement:r=!0,confirmations:n=1,hash:i,onReplaced:s,retryCount:o=6,retryDelay:a=({count:I})=>~~(1<<I)*200,timeout:c=18e4}=e,l=gr(["waitForTransactionReceipt",t.uid,i]),u=(()=>{var I;return e.pollingInterval?e.pollingInterval:(I=t.chain)!=null&&I.experimental_preconfirmationTime?t.chain.experimental_preconfirmationTime:t.pollingInterval})();let d,h,f,g=!1,p,w;const{promise:m,resolve:b,reject:v}=Q6(),E=c?setTimeout(()=>{w(),p(),v(new JM({hash:i}))},c):void 0;return p=za(l,{onReplaced:s,resolve:b,reject:v},async I=>{if(f=await $e(t,l2,"getTransactionReceipt")({hash:i}).catch(()=>{}),f&&n<=1){clearTimeout(E),I.resolve(f),p();return}w=$e(t,yP,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(_){const A=y=>{clearTimeout(E),w(),y(),p()};let P=_;if(!g)try{if(f){if(n>
491&&(!f.blockNumber||P-f.blockNumber+1n<n))return;A(()=>I.resolve(f));return}if(r&&!d&&(g=!0,await ob(async()=>{d=await $e(t,pv,"getTransaction")({hash:i}),d.blockNumber&&(P=d.blockNumber)},{delay:a,retryCount:o}),g=!1),f=await $e(t,l2,"getTransactionReceipt")({hash:i}),n>1&&(!f.blockNumber||P-f.blockNumber+1n<n))return;A(()=>I.resolve(f))}catch(y){if(y instanceof eA||y instanceof tA){if(!d){g=!1;return}try{h=d,g=!0;const O=await ob(()=>$e(t,No,"getBlock")({blockNumber:P,includeTransactions:!0}),{delay:a,retryCount:o,shouldRetry:({error:L})=>L instanceof kA});g=!1;const S=O.transactions.find(({from:L,nonce:T})=>L===h.from&&T===h.nonce);if(!S||(f=await $e(t,l2,"getTransactionReceipt")({hash:S.hash}),n>1&&(!f.blockNumber||P-f.blockNumber+1n<n)))return;let k="replaced";S.to===h.to&&S.value===h.value&&S.input===h.input?k="repriced":S.from===S.to&&S.value===0n&&(k="cancelled"),A(()=>{var L;(L=I.onReplaced)==null||L.call(I,{reason:k,replacedTransaction:h,transaction:S,transactionReceipt:f}),I.resolve(f)})}catch(O){A(()=>I.reject(O))}}else A(()=>I.reject(y))}}})}),m}function CF(t,{blockTag:e=t.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){const l=typeof a<"u"?a:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
49onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc")),u=o??!1;let d;return l?(()=>{const g=gr(["watchBlocks",t.uid,e,r,n,u,c]);return za(g,{onBlock:i,onError:s},p=>b0(async()=>{var w;try{const m=await $e(t,No,"getBlock")({blockTag:e,includeTransactions:u});if(m.number!==null&&(d==null?void 0:d.number)!=null){if(m.number===d.number)return;if(m.number-d.number>1&&r)for(let b=(d==null?void 0:d.number)+1n;b<m.number;b++){const v=await $e(t,No,"getBlock")({blockNumber:b,includeTransactions:u});p.onBlock(v,d),d=v}}((d==null?void 0:d.number)==null||e==="pending"&&(m==null?void 0:m.number)==null||m.number!==null&&m.number>d.number)&&(p.onBlock(m,d),d=m)}catch(m){(w=p.onError)==null||w.call(p,m)}},{emitOnBegin:n,interval:c}))})():(()=>{let g=!0,p=!0,w=()=>g=!1;return(async()=>{try{n&&$e(t,No,"getBlock")({blockTag:e,includeTransactions:u}).then(v=>{g&&p&&(i(v,void 0),p=!1)}).catch(s);const m=(()=>{if(t.transport.type==="fallback"){const v=t.transport.transports.find(E=>E.config.type==="webSocket"||E.config.type==="ipc");return v?v.value:t.transport}return t.transport})(),{unsubscribe:b}=await m.subscribe({params:["newHeads"],async onData(v){var I;if(!g)return;const E=await $e(t,No,"getBlock")({blockNumber:(I=v.result)==null?void 0:I.number,includeTransactions:u}).catch(()=>{});g&&(i(E,d),p=!1,d=E)},onError(v){s==null||s(v)}});w=b,g||w()}catch(m){s==null||s(m)}})(),()=>w()})()}function xF(t,{address:e,args:r,batch:n=!0,event:i,events:s,fromBlock:o,onError:a,onLogs:c,poll:l,pollingInterval:u=t.pollingInterval,strict:d}){const h=typeof l<"u"?l:typeof o=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
49onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc")),f=d??!1;return h?(()=>{const w=gr(["watchEvent",e,r,n,t.uid,i,u,o]);return za(w,{onLogs:c,onError:a},m=>{let b;o!==void 0&&(b=o-1n);let v,E=!1;const I=b0(async()=>{var _;if(!E){try{v=await $e(t,ZA,"createEventFilter")({address:e,args:r,event:i,events:s,strict:f,fromBlock:o})}catch{}E=!0;return}try{let A;if(v)A=await $e(t,Uw,"getFilterChanges")({filter:v});else{const P=await $e(t,bp,"getBlockNumber")({});b&&b!==P?A=await $e(t,cv,"getLogs")({address:e,args:r,event:i,events:s,fromBlock:b+1n,toBlock:P}):A=[],b=P}if(A.length===0)return;if(n)m.onLogs(A);else for(const P of A)m.onLogs([P])}catch(A){v&&A instanceof uu&&(E=!1),(_=m.onError)==null||_.call(m,A)}},{emitOnBegin:!0,interval:u});return async()=>{v&&await $e(t,jw,"uninstallFilter")({filter:v}),I()}})})():(()=>{let w=!0,m=()=>w=!1;return(async()=>{try{const b=(()=>{if(t.transport.type==="fallback"){const _=t.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return _?_.value:t.transport}return t.transport})(),v=s??(i?[i]:void 0);let E=[];v&&(E=[v.flatMap(A=>yp({abi:[A],eventName:A.name,args:r}))],i&&(E=E[0]));const{unsubscribe:I}=await b.subscribe({params:["logs",{address:e,topics:E}],onData(_){var P;if(!w)return;const A=_.result;try{const{eventName:y,args:O}=tv({abi:v??[],data:A.data,topics:A.topics,strict:f}),S=Ua(A,{args:O,eventName:y});c([S])}catch(y){let O,S;if(y instanceof S1||y instanceof Pw){if(d)return;O=y.abiItem.name,S=(P=y.abiItem.inputs)==null?void 0:P.some(L=>!("name"in L&&L.name))}const k=Ua(A,{args:S?[]:{},eventName:O});c([k])}},onError(_){a==null||a(_)}});m=I,w||m()}catch(b){a==null||a(b)}})(),()=>m()})()}function _F(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket"&&t.transport.type!=="ipc")?(()=>{const l=gr(["watchPendingTransactions",t.uid,e,s]);return za(l,{onTransactions:n,onError:r},u=>{let d;const h=b0(async()=>{var f;try{if(!d)try{d=await $e(t,GA,"createPendingTransactionFilter")({});return}catch(p){throw h(),p}const g=await $e(t,Uw,"getFilterChanges")({filter:d});if(g.length===0)return;if(e)u.onTransactions(g);else for(const p of g)u.onTransactions([p])}catch(g){(f=u.onError)==null||f.call(u,g)}},{emitOnBegin:!0,interval:s});return async()=>{d&&await $e(t,jw,"uninstallFilter")({filter:d}),h()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await t.transport.subscribe({params:["newPendingTransactions"],onData(h){if(!l)return;const f=h.result;n([f])},onError(h){r==null||r(h)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function SF(t){var d,h,f;const{scheme:e,statement:r,...n}=((d=t.match(IF))==null?void 0:d.groups)??{},{chainId:i,expirationTime:s,issuedAt:o,notBefore:a,requestId:c,...l}=((h=t.match($F))==null?void 0:h.groups)??{},u=(f=t.split("Resources:")[1])==null?void 0:f.split(`
50- `).slice(1);return{...n,...l,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...o?{issuedAt:new Date(o)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...e?{scheme:e}:{},...r?{statement:r}:{}}}const IF=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,$F=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function AF(t){const{address:e,domain:r,message:n,nonce:i,scheme:s,time:o=new Date}=t;if(r&&n.domain!==r||i&&n.nonce!==i||s&&n.scheme!==s||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!ki(n.address,{strict:!1})||e&&!mp(n.address,e))return!1}catch{return!1}return!0}async function PF(t,e){const{address:r,domain:n,message:i,nonce:s,scheme:o,signature:a,time:c=new Date,...l}=e,u=SF(i);
50if(!u.address||!AF({address:r,domain:n,message:u,nonce:s,scheme:o,time:c}))return!1;const h=TA(i);return yv(t,{address:u.address,hash:h,signature:a,...l})}function TF(t){return{call:e=>wp(t,e),createAccessList:e=>KA(t,e),createBlockFilter:()=>Jj(t),createContractEventFilter:e=>NA(t,e),createEventFilter:e=>ZA(t,e),createPendingTransactionFilter:()=>GA(t),estimateContractGas:e=>mj(t,e),estimateGas:e=>av(t,e),getBalance:e=>DA(t,e),getBlobBaseFee:()=>Xj(t),getBlock:e=>No(t,e),getBlockNumber:e=>bp(t,e),getBlockTransactionCount:e=>Qj(t,e),getBytecode:e=>S9(t,e),getChainId:()=>y0(t),getCode:e=>S9(t,e),getContractEvents:e=>LA(t,e),getEip712Domain:e=>tz(t,e),getEnsAddress:e=>Bj(t,e),getEnsAvatar:e=>Zj(t,e),getEnsName:e=>Gj(t,e),getEnsResolver:e=>Yj(t,e),getEnsText:e=>WA(t,e),getFeeHistory:e=>iz(t,e),estimateFeesPerGas:e=>wj(t,e),getFilterChanges:e=>Uw(t,e),getFilterLogs:e=>sz(t,e),getGasPrice:()=>ov(t),getLogs:e=>cv(t,e),getProof:e=>cz(t,e),estimateMaxPriorityFeePerGas:e=>gj(t,e),getStorageAt:e=>lz(t,e),getTransaction:e=>pv(t,e),getTransactionConfirmations:e=>uz(t,e),getTransactionCount:e=>iv(t,e),getTransactionReceipt:e=>l2(t,e),multicall:e=>dz(t,e),prepareTransactionRequest:e=>Mw(t,e),readContract:e=>ja(t,e),sendRawTransaction:e=>lv(t,e),simulate:e=>Pb(t,e),simulateBlocks:e=>Pb(t,e),simulateCalls:e=>zz(t,e),simulateContract:e=>yj(t,e),verifyMessage:e=>bF(t,e),verifySiweMessage:e=>PF(t,e),verifyTypedData:e=>vF(t,e),uninstallFilter:e=>jw(t,e),waitForTransactionReceipt:e=>EF(t,e),watchBlocks:e=>CF(t,e),watchBlockNumber:e=>yP(t,e),watchContractEvent:e=>Sj(t,e),watchEvent:e=>xF(t,e),watchPendingTransactions:e=>_F(t,e)}}function mCe(t){const{key:e="public",name:r="Public Client"}=t;return FA({...t,key:e,name:r,type:"publicClient"}).extend(TF)}async function OF(t,{chain:e}){const{id:r,name:n,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:Ee(r),chainName:n,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}function NF(t,e){const{abi:r,args:n,bytecode:i,...s}=e,o=kw({abi:r,args:n,bytecode:i});return zw(t,{...s,...s.authorizationList?{to:null}:{},data:o})}async function kF(t){var r;return((r=t.account)==null?void 0:r.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>hp(n))}async function RF(t,e={}){const{account:r=t.account,chainId:n}=e,i=r?wr(r):void 0,s=n?[i==null?void 0:i.address,[Ee(n)]]:[i==null?void 0:i.address],o=await t.request({method:"wallet_getCapabilities",params:s}),a={};for(const[c,l]of Object.entries(o)){a[Number(c)]={};for(let[u,d]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),a[Number(c)][u]=d}return typeof n=="number"?a[n]:a}async function BF(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function bP(t,e){var c;const{account:r=t.account,chainId:n,nonce:i}=e;if(!r)throw new qu({docsPath:"/docs/eip7702/prepareAuthorization"});const s=wr(r),o=(()=>{if(e.executor)return e.executor==="self"?e.executor:wr(e.executor)})(),a={address:e.contractAddress??e.address,chainId:n,nonce:i};return typeof a.chainId>"u"&&(a.chainId=((c=t.chain)==null?void 0:c.id)??await $e(t,y0,"getChainId")({})),typeof a.nonce>"u"&&(a.nonce=await $e(t,iv,"getTransactionCount")({address:s.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&mp(o.address,s.address))&&(a.nonce+=1)),a}async function DF(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>K$(r))}async function LF(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function MF(t,e){const{id:r}=e;await t.request({method:"wallet_showCallsStatus",params:[r]})}async function UF(t,e){const{account:r=t.account}=e;if(!r)throw new qu({docsPath:"/docs/eip7702/signAuthorization"});const n=wr(r);if(!n.signAuthorization)throw new a2({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const i=await bP(t,e);return n.signAuthorization(i)}async function jF(t,{account:e=t.account,message:r}){if(!e)throw new qu({docsPath:"/docs/actions/wallet/signMessage"});
50const n=wr(e);if(n.signMessage)return n.signMessage({message:r});const i=typeof r=="string"?du(r):r.raw instanceof Uint8Array?Uo(r.raw):r.raw;return t.request({method:"personal_sign",params:[i,n.address]},{retryCount:0})}async function zF(t,e){var l,u,d,h;const{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new qu({docsPath:"/docs/actions/wallet/signTransaction"});const s=wr(r);Fu({account:s,...e});const o=await $e(t,y0,"getChainId")({});n!==null&&cA({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((l=t.chain)==null?void 0:l.formatters),c=((u=a==null?void 0:a.transactionRequest)==null?void 0:u.format)||m0;return s.signTransaction?s.signTransaction({...i,chainId:o},{serializer:(h=(d=t.chain)==null?void 0:d.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c(i),chainId:Ee(o),from:s.address}]},{retryCount:0})}async function FF(t,e){const{account:r=t.account,domain:n,message:i,primaryType:s}=e;if(!r)throw new qu({docsPath:"/docs/actions/wallet/signTypedData"});const o=wr(r),a={EIP712Domain:pA({domain:n}),...e.types};if(fA({domain:n,message:i,primaryType:s,types:a}),o.signTypedData)return o.signTypedData({domain:n,message:i,primaryType:s,types:a});const c=TU({domain:n,message:i,primaryType:s,types:a});return t.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function qF(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:Ee(e)}]},{retryCount:0})}async function HF(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}function VF(t){return{addChain:e=>OF(t,e),deployContract:e=>NF(t,e),getAddresses:()=>kF(t),getCallsStatus:e=>jA(t,e),getCapabilities:e=>RF(t,e),getChainId:()=>y0(t),getPermissions:()=>BF(t),prepareAuthorization:e=>bP(t,e),prepareTransactionRequest:e=>Mw(t,e),requestAddresses:()=>DF(t),requestPermissions:e=>LF(t,e),sendCalls:e=>$j(t,e),sendRawTransaction:e=>lv(t,e),sendTransaction:e=>zw(t,e),showCallsStatus:e=>MF(t,e),signAuthorization:e=>UF(t,e),signMessage:e=>jF(t,e),signTransaction:e=>zF(t,e),signTypedData:e=>FF(t,e),switchChain:e=>qF(t,e),waitForCallsStatus:e=>Aj(t,e),watchAsset:e=>HF(t,e),writeContract:e=>Ij(t,e)}}function yCe(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return FA({...t,key:e,name:r,transport:n,type:"walletClient"}).extend(VF)}function bCe(t){const{r:e,s:r}=mv.Signature.fromCompact(t.slice(2,130)),n=+`0x${t.slice(130)}`,[i,s]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error("Invalid yParityOrV value")})();return typeof i<"u"?{r:Ee(e,{size:32}),s:Ee(r,{size:32}),v:i,yParity:s}:{r:Ee(e,{size:32}),s:Ee(r,{size:32}),yParity:s}}const WF=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,KF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,ZF=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function GF(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){YF(t);return}return e}function YF(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function yg(t,e={}){if(typeof t!="string")return t;if(t[0]==='"'&&t[t.length-1]==='"'&&t.indexOf("\\")===-1)return t.slice(1,-1);const r=t.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!ZF.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(WF.test(t)||KF.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,GF)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}var bg={exports:{}},R9;function JF(){if(R9)return bg.exports;R9=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(I,_,A){return Function.prototype.apply.call(I,_,A)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(I){return Object.getOwnPropertyNames(I).concat(Object.getOwnPropertySymbols(I))}:r=function(I){return Object.getOwnPropertyNames(I)};function n(E){console&&console.warn&&console.warn(E)}var i=Number.isNaN||function(I){return I!==I};function s(){s.init.call(this)}bg.exports=s,bg.exports.once=m,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o}
vendor: 15,116 bytes, lines 50-63
50,set:function(E){if(typeof E!="number"||E<0||i(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");o=E}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(I){if(typeof I!="number"||I<0||i(I))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+I+".");return this._maxListeners=I,this};function c(E){return E._maxListeners===void 0?s.defaultMaxListeners:E._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(I){for(var _=[],A=1;A<arguments.length;A++)_.push(arguments[A]);var P=I==="error",y=this._events;if(y!==void 0)P=P&&y.error===void 0;else if(!P)return!1;if(P){var O;if(_.length>0&&(O=_[0]),O instanceof Error)throw O;var S=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw S.context=O,S}var k=y[I];if(k===void 0)return!1;if(typeof k=="function")e(k,this,_);else for(var L=k.length,T=g(k,L),A=0;A<L;++A)e(T[A],this,_);return!0};function l(E,I,_,A){var P,y,O;if(a(_),y=E._events,y===void 0?(y=E._events=Object.create(null),E._eventsCount=0):(y.newListener!==void 0&&(E.emit("newListener",I,_.listener?_.listener:_),y=E._events),O=y[I]),O===void 0)O=y[I]=_,++E._eventsCount;else if(typeof O=="function"?O=y[I]=A?[_,O]:[O,_]:A?O.unshift(_):O.push(_),P=c(E),P>0&&O.length>P&&!O.warned){O.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=E,S.type=I,S.count=O.length,n(S)}return E}s.prototype.addListener=function(I,_){return l(this,I,_,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(I,_){return l(this,I,_,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(E,I,_){var A={fired:!1,wrapFn:void 0,target:E,type:I,listener:_},P=u.bind(A);return P.listener=_,A.wrapFn=P,P}s.prototype.once=function(I,_){return a(_),this.on(I,d(this,I,_)),this},s.prototype.prependOnceListener=function(I,_){return a(_),this.prependListener(I,d(this,I,_)),this},s.prototype.removeListener=function(I,_){var A,P,y,O,S;if(a(_),P=this._events,P===void 0)return this;if(A=P[I],A===void 0)return this;if(A===_||A.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete P[I],P.removeListener&&this.emit("removeListener",I,A.listener||_));else if(typeof A!="function"){for(y=-1,O=A.length-1;O>=0;O--)if(A[O]===_||A[O].listener===_){S=A[O].listener,y=O;break}if(y<0)return this;y===0?A.shift():p(A,y),A.length===1&&(P[I]=A[0]),P.removeListener!==void 0&&this.emit("removeListener",I,S||_)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(I){var _,A,P;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[I]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[I]),this;if(arguments.length===0){var y=Object.keys(A),O;for(P=0;P<y.length;++P)O=y[P],O!=="removeListener"&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=A[I],typeof _=="function")this.removeListener(I,_);else if(_!==void 0)for(P=_.length-1;P>=0;P--)this.removeListener(I,_[P]);return this};function h(E,I,_){var A=E._events;if(A===void 0)return[];var P=A[I];return P===void 0?[]:typeof P=="function"?_?[P.listener||P]:[P]:_?w(P):g(P,P.length)}s.prototype.listeners=function(I){return h(this,I,!0)},s.prototype.rawListeners=function(I){return h(this,I,!1)},s.listenerCount=function(E,I){return typeof E.listenerCount=="function"?E.listenerCount(I):f.call(E,I)},s.prototype.listenerCount=f;function f(E){var I=this._events;if(I!==void 0){var _=I[E];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function g(E,I){for(var _=new Array(I),A=0;A<I;++A)_[A]=E[A];return _}function p(E,I){for(;I+1<E.length;I++)E[I]=E[I+1];E.pop()}function w(E){for(var I=new Array(E.length),_=0;_<I.length;++_)I[_]=E[_].listener||E[_];return I}function m(E,I){return new Promise(function(_,A){function P(O){E.removeListener(I,y),A(O)}function y(){typeof E.removeListener=="function"&&E.removeListener("error",P),_([].slice.call(arguments))}v(E,I,y,{once:!0}),I!=="error"&&b(E,P,{once:!0})})}function b(E,I,_){typeof E.on=="function"&&v(E,"error",I,_)}function v(E,I,_,A){if(typeof E.on=="function")A.once?E.once(I,_):E.on(I,_);else if(typeof E.addEventListener=="function")E.addEventListener(I,function P(y){A.once&&E.removeEventListener(I,P),_(y)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return bg.exports}var Nr=JF();const v0=ec(Nr);var B9=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},XF=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),QF=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=sr.platform}return t}(),eq=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}(),tq=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),rq=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),nq=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,iq=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,D9=3,sq=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",nq]],L9=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function vP(t){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new rq:typeof navigator<"u"?aq(navigator.userAgent):lq()}function oq(t){return t!==""&&sq.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var s=i.exec(t);return!!s&&[n,s]},!1)}function aq(t){var e=oq(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new tq;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<D9&&(i=B9(B9([],i,!0),uq(D9-i.length),!0)):i=[];var s=i.join("."),o=cq(t),a=iq.exec(t);return a&&a[1]?new eq(r,s,o,a[1]):new XF(r,s,o)}function cq(t){for(var e=0,r=L9.length;e<r;e++){var n=L9[e],i=n[0],s=n[1],o=s.exec(t);if(o)return i}return null}function lq(){var t=typeof sr<"u"&&sr.version;return t?new QF(sr.version.slice(1)):null}function uq(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var o3={};/*! *****************************************************************************
51Copyright (c) Microsoft Corporation.
52
53Permission to use, copy, modify, and/or distribute this software for any
54purpose with or without fee is hereby granted.
55
56THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
57REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
58AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
59INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
60LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
61OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
62PERFORMANCE OF THIS SOFTWARE.
63***************************************************************************** */var Lb=function(t,e){return Lb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Lb(t,e)};function dq(t,e){Lb(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Mb=function(){return Mb=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Mb.apply(this,arguments)};function hq(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function fq(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function pq(t,e){return function(r,n){e(r,n,t)}}function gq(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function wq(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(d){o(d)}}function c(u){try{l(n.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function mq(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function yq(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function bq(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Ub(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function EP(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function vq(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(EP(arguments[e]));return t}function Eq(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function $1(t){return this instanceof $1?(this.v=t,this):new $1(t)}function Cq(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){n[h]&&(i[h]=function(f){return new Promise(function(g,p){s.push([h,f,g,p])>1||a(h,f)})})}function a(h,f){try{c(n[h](f))}catch(g){d(s[0][3],g)}}function c(h){h.value instanceof $1?Promise.resolve(h.value.v).then(l,u):d(s[0][2],h)}function l(h){a("next",h)}function u(h){a("throw",h)}function d(h,f){h(f),s.shift(),s.length&&a(s[0][0],s[0][1])}}function xq(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:$1(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function _q(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Ub=="function"?Ub(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);
63function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function Sq(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Iq(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function $q(t){return t&&t.__esModule?t:{default:t}}function Aq(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Pq(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Tq=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Mb},__asyncDelegator:xq,__asyncGenerator:Cq,__asyncValues:_q,__await:$1,__awaiter:wq,__classPrivateFieldGet:Aq,__classPrivateFieldSet:Pq,__createBinding:yq,__decorate:fq,__exportStar:bq,__extends:dq,__generator:mq,__importDefault:$q,__importStar:Iq,__makeTemplateOb
vendor: 5,600 bytes, line 63
63ject:Sq,__metadata:gq,__param:pq,__read:EP,__rest:hq,__spread:vq,__spreadArrays:Eq,__values:Ub},Symbol.toStringTag,{value:"Module"})),Vw=zI(Tq);var a3={},W0={},M9;function Oq(){if(M9)return W0;M9=1,Object.defineProperty(W0,"__esModule",{value:!0}),W0.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return W0.delay=t,W0}var bl={},c3={},vl={},U9;function Nq(){return U9||(U9=1,Object.defineProperty(vl,"__esModule",{value:!0}),vl.ONE_THOUSAND=vl.ONE_HUNDRED=void 0,vl.ONE_HUNDRED=100,vl.ONE_THOUSAND=1e3),vl}var l3={},j9;function kq(){return j9||(j9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(l3)),l3}var z9;function CP(){return z9||(z9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Vw;e.__exportStar(Nq(),t),e.__exportStar(kq(),t)}(c3)),c3}var F9;function Rq(){if(F9)return bl;F9=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.fromMiliseconds=bl.toMiliseconds=void 0;const t=CP();function e(n){return n*t.ONE_THOUSAND}bl.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return bl.fromMiliseconds=r,bl}var q9;function Bq(){return q9||(q9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Vw;e.__exportStar(Oq(),t),e.__exportStar(Rq(),t)}(a3)),a3}var yd={},H9;function Dq(){if(H9)return yd;H9=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return yd.Watch=t,yd.default=t,yd}var u3={},K0={},V9;function Lq(){if(V9)return K0;V9=1,Object.defineProperty(K0,"__esModule",{value:!0}),K0.IWatch=void 0;class t{}return K0.IWatch=t,K0}var W9;function Mq(){return W9||(W9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Vw.__exportStar(Lq(),t)}(u3)),u3}var K9;function Uq(){return K9||(K9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Vw;e.__exportStar(Bq(),t),e.__exportStar(Dq(),t),e.__exportStar(Mq(),t),e.__exportStar(CP(),t)}(o3)),o3}var X=Uq(),Dt={},Z9;function xP(){if(Z9)return Dt;Z9=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.getLocalStorage=Dt.getLocalStorageOrThrow=Dt.getCrypto=Dt.getCryptoOrThrow=Dt.getLocation=Dt.getLocationOrThrow=Dt.getNavigator=Dt.getNavigatorOrThrow=Dt.getDocument=Dt.getDocumentOrThrow=Dt.getFromWindowOrThrow=Dt.getFromWindow=void 0;function t(h){let f;return typeof window<"u"&&typeof window[h]<"u"&&(f=window[h]),f}Dt.getFromWindow=t;function e(h){const f=t(h);if(!f)throw new Error(`${h} is not defined in Window`);return f}Dt.getFromWindowOrThrow=e;function r(){return e("document")}Dt.getDocumentOrThrow=r;function n(){return t("document")}Dt.getDocument=n;function i(){return e("navigator")}Dt.getNavigatorOrThrow=i;function s(){return t("navigator")}Dt.getNavigator=s;function o(){return e("location")}Dt.getLocationOrThrow=o;function a(){return t("location")}Dt.getLocation=a;function c(){return e("crypto")}Dt.getCryptoOrThrow=c;function l(){return t("crypto")}Dt.getCrypto=l;function u(){return e("localStorage")}Dt.getLocalStorageOrThrow=u;function d(){return t("localStorage")}return Dt.getLocalStorage=d,Dt}var Zr=xP(),Z0={},G9;function jq(){if(G9)return Z0;G9=1,Object.defineProperty(Z0,"__esModule",{value:!0}),Z0.getWindowMetadata=void 0;const t=xP();function e(){let r,n;try{r=t.getDocumentOrThrow(),n=t.getLocationOrThrow()}catch{return null}function i(){const f=r.getElementsByTagName("link"),g=[];for(let p=0;p<f.length;p++){const w=f[p],m=w.getAttribute("rel");if(m&&m.toLowerCase().indexOf("icon")>-1){const b=w.getAttribute("href");if(b)if(b.toLowerCase().indexOf("https:")===-1&&b.toLowerCase().indexOf("http:")===-1&&b.indexOf("//")!==0){let v=n.protocol+"//"+n.host;if(b.indexOf("/")===0)v+=b;else{const E=n.pathname.split("/");E.pop();const I=E.join("/");v+=I+"/"+b}g.push(v)}else if(b.indexOf("//")===0){const v=n.protocol+b;g.push(v)}else g.push(b)}}return g}function s(...f){const g=r.getElementsByTagName("meta");for(let p=0;p<g.length;p++){const w=g[p],m=["itemprop","property","name"].map(b=>w.getAttribute(b)).filter(b=>b?f.includes(b):!1);if(m.length&&m){const b=w.getAttribute("content");
63if(b)return b}}return""}function o(){let f=s("name","og:site_name","og:title","twitter:title");return f||(f=r.title),f}function a(){return s("description","og:description","twitter:description","keywords")}const c=o(),l=a(),u=n.origin,d=i();return{description:l,url:u,icons:d,name:c}}return Z0.getWindowMetadata=e,Z0}var _P=jq();function A1(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function jb(t){return A1(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const SP="2.31.0";let G0={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:`viem@${SP}`},Ww=class zb extends Error{constructor(e,r={}){var a;const n=(()=>{var c;return r.cause instanceof zb?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),i=r.cause instanceof zb&&r.cause.docsPath||r.docsPath,s=(a=G0.getDocsUrl)==null?void 0:a.call(G0,{...r,docsPath:i}),o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...G0.version?[`Version: ${G0.version}`]:[]].join(`
64`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=SP}walk(e){return IP(this,e)}};function IP(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?IP(t.cause,e):e?null:t}let $P=class extends Ww{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};function E0(t,{dir:e,size:r=32}={}){return typeof t=="string"?zq(t,{dir:e,size:r}):Fq(t,{dir:e,size:r})}function zq(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new $P({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Fq(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new $P({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const s=e==="right";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}let qq=class extends Ww{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},Hq=class extends Ww{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}};function C0(t,{size:e}){if(jb(t)>e)throw new Hq({givenSize:jb(t),maxSize:e})}function Fb(t,e={}){const{signed:r}=e;e.size&&C0(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return n<=s?n:n-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function Vq(t,e={}){return Number(Fb(t,e))}const Wq=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function qb(t,e={}){return typeof t=="number"||typeof t=="bigint"?PP(t,e):typeof t=="string"?Gq(t,e):typeof t=="boolean"?Kq(t,e):AP(t,e)}function Kq(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(C0(r,{size:e.size}),E0(r,{size:e.size})):r}function AP(t,e={}){let r="";for(let i=0;i<t.length;i++)r+=Wq[t[i]];const n=`0x${r}`;return typeof e.size=="number"?(C0(n,{size:e.size}),E0(n,{dir:"right",size:e.size})):n}function PP(t,e={}){const{signed:r,size:n}=e,i=BigInt(t);let s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&r?-s-1n:0;if(s&&i>s||i<o){const c=typeof t=="bigint"?"n":"";throw new qq({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}const a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?E0(a,{size:n}):a}const Zq=new TextEncoder;function Gq(t,e={}){const r=Zq.encode(t);return AP(r,e)}const Yq=new TextEncoder;function Jq(t,e={}){return typeof t=="number"||typeof t=="bigint"?Qq(t,e):typeof t=="boolean"?Xq(t,e):A1(t)?TP(t,e):OP(t,e)}function Xq(t,e={}
vendor: 6,331 bytes, line 64
64){const r=new Uint8Array(1);return r[0]=Number(t),typeof e.size=="number"?(C0(r,{size:e.size}),E0(r,{size:e.size})):r}const ra={zero:48,nine:57,A:65,F:70,a:97,f:102};function Y9(t){if(t>=ra.zero&&t<=ra.nine)return t-ra.zero;if(t>=ra.A&&t<=ra.F)return t-(ra.A-10);if(t>=ra.a&&t<=ra.f)return t-(ra.a-10)}function TP(t,e={}){let r=t;e.size&&(C0(r,{size:e.size}),r=E0(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){const c=Y9(n.charCodeAt(a++)),l=Y9(n.charCodeAt(a++));if(c===void 0||l===void 0)throw new Ww(`Invalid byte sequence ("${n[a-2]}${n[a-1]}" in "${n}").`);s[o]=c*16+l}return s}function Qq(t,e){const r=PP(t,e);return TP(r)}function OP(t,e={}){const r=Yq.encode(t);return typeof e.size=="number"?(C0(r,{size:e.size}),E0(r,{dir:"right",size:e.size})):r}const vg=BigInt(2**32-1),J9=BigInt(32);function eH(t,e=!1){return e?{h:Number(t&vg),l:Number(t>>J9&vg)}:{h:Number(t>>J9&vg)|0,l:Number(t&vg)|0}}function tH(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=eH(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const rH=(t,e,r)=>t<<r|e>>>32-r,nH=(t,e,r)=>e<<r|t>>>32-r,iH=(t,e,r)=>e<<r-32|t>>>64-r,sH=(t,e,r)=>t<<r-32|e>>>64-r,bd=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function oH(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function P1(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function wu(t,...e){if(!oH(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function aH(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");P1(t.outputLen),P1(t.blockLen)}function Oh(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function NP(t,e){wu(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function cH(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Nh(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function d3(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function co(t,e){return t<<32-e|t>>>e}const lH=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function uH(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function dH(t){for(let e=0;e<t.length;e++)t[e]=uH(t[e]);return t}const X9=lH?t=>t:dH;function hH(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Kw(t){return typeof t=="string"&&(t=hH(t)),wu(t),t}function fH(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];wu(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let bv=class{};function kP(t){const e=n=>t().update(Kw(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function pH(t=32){if(bd&&typeof bd.getRandomValues=="function")return bd.getRandomValues(new Uint8Array(t));if(bd&&typeof bd.randomBytes=="function")return Uint8Array.from(bd.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const gH=BigInt(0),Y0=BigInt(1),wH=BigInt(2),mH=BigInt(7),yH=BigInt(256),bH=BigInt(113),RP=[],BP=[],DP=[];for(let t=0,e=Y0,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],RP.push(2*(5*n+r)),BP.push((t+1)*(t+2)/2%64);let i=gH;for(let s=0;s<7;s++)e=(e<<Y0^(e>>mH)*bH)%yH,e&wH&&(i^=Y0<<(Y0<<BigInt(s))-Y0);DP.push(i)}const LP=tH(DP,!0),vH=LP[0],EH=LP[1],Q9=(t,e,r)=>r>32?iH(t,e,r):rH(t,e,r),e7=(t,e,r)=>r>32?sH(t,e,r):nH(t,e,r);function CH(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=Q9(l,u,1)^r[a],h=e7(l,u,1)^r[a+1];for(let f=0;f<50;f+=10)t[o+f]^=d,t[o+f+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=BP[o],c=Q9(i,s,a),l=e7(i,s,a),u=RP[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=vH[n],t[1]^=EH[n]}Nh(r)}let xH=class MP extends bv{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,P1(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=cH(this.state)}clone(){return this._cloneInto()}keccak(){X9(this.state32),CH(this.state32,this.rounds),X9(this.state32),this.posOut=0,this.pos=0}update(e){Oh(this),e=Kw(e),wu(e);const{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Oh(this,!1),wu(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return P1(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(NP(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,Nh(this.state)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new MP(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const _H=(t,e,r)=>kP(()=>new xH(e,t,r)),SH=_H(1,136,256/8);
64function UP(t,e){const r=e||"hex",n=SH(A1(t,{strict:!1})?Jq(t):t);return r==="bytes"?n:qb(n)}let IH=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const h3=new IH(8192);function $H(t,e){if(h3.has(`${t}.${e}`))return h3.get(`${t}.${e}`);const r=t.substring(2).toLowerCase(),n=UP(OP(r),"bytes"),i=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return h3.set(`${t}.${e}`,s),s}function AH(t){const e=UP(`0x${t.substring(4)}`).substring(26);return $H(`0x${e}`)}async function PH({hash:t,signature:e}){const r=A1(t)?t:qb(t),{secp256k1:n}=await J(async()=>{const{secp256k1:o}=await Promise.resolve().then(()=>hV);return{secp256k1:o}},void 0);return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){const{r:l,s:u,v:d,yParity:h}=e,f=Number(h??d),g=t7(f);return new n.Signature(Fb(l),Fb(u)).addRecoveryBit(g)}const o=A1(e)?e:qb(e);if(jb(o)!==65)throw new Error("invalid signature length");const a=Vq(`0x${o.slice(130)}`),c=t7(a);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function t7(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}async function TH({hash:t,signature:e}){return AH(await PH({hash:t,signature:e}))}function OH(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function NH(t,e,r){return t&e^~t&r}function kH(t,e,r){return t&e^t&r^e&r}let RH=class extends bv{constructor(e,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=d3(this.buffer)}update(e){Oh(this),e=Kw(e),wu(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=d3(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Oh(this),NP(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,Nh(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;OH(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=d3(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=a,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}};const dc=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),BH=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,2756
vendor: 20,352 bytes, line 64
64734187,3204031479,3329325298]),hc=new Uint32Array(64);let DH=class extends RH{constructor(e=32){super(64,e,8,!1),this.A=dc[0]|0,this.B=dc[1]|0,this.C=dc[2]|0,this.D=dc[3]|0,this.E=dc[4]|0,this.F=dc[5]|0,this.G=dc[6]|0,this.H=dc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)hc[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=hc[d-15],f=hc[d-2],g=co(h,7)^co(h,18)^h>>>3,p=co(f,17)^co(f,19)^f>>>10;hc[d]=p+hc[d-7]+g+hc[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=co(a,6)^co(a,11)^co(a,25),f=u+h+NH(a,c,l)+BH[d]+hc[d]|0,p=(co(n,2)^co(n,13)^co(n,22))+kH(n,i,s)|0;u=l,l=c,c=a,a=o+f|0,o=s,s=i,i=n,n=f+p|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){Nh(hc)}destroy(){this.set(0,0,0,0,0,0,0,0),Nh(this.buffer)}};const LH=kP(()=>new DH);let jP=class extends bv{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,aH(e);const n=Kw(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Nh(s)}update(e){return Oh(this),this.iHash.update(e),this}digestInto(e){Oh(this),wu(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:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const zP=(t,e,r)=>new jP(t,e).update(r).digest();zP.create=(t,e)=>new jP(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vv=BigInt(0),Hb=BigInt(1);function vp(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Ev(t){if(!vp(t))throw new Error("Uint8Array expected")}function T1(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Eg(t){const e=t.toString(16);return e.length&1?"0"+e:e}function FP(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?vv:BigInt("0x"+t)}const qP=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",MH=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function O1(t){if(Ev(t),qP)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=MH[t[r]];return e}const na={_0:48,_9:57,A:65,F:70,a:97,f:102};function r7(t){if(t>=na._0&&t<=na._9)return t-na._0;if(t>=na.A&&t<=na.F)return t-(na.A-10);if(t>=na.a&&t<=na.f)return t-(na.a-10)}function k2(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(qP)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=r7(t.charCodeAt(s)),a=r7(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function iu(t){return FP(O1(t))}function HP(t){return Ev(t),FP(O1(Uint8Array.from(t).reverse()))}function Ep(t,e){return k2(t.toString(16).padStart(e*2,"0"))}function VP(t,e){return Ep(t,e).reverse()}function as(t,e,r){let n;if(typeof e=="string")try{n=k2(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(vp(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}function R2(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Ev(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}const f3=t=>typeof t=="bigint"&&vv<=t;function Cv(t,e,r){return f3(t)&&f3(e)&&f3(r)&&e<=t&&t<r}function wh(t,e,r,n){if(!Cv(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function UH(t){let e;for(e=0;t>vv;t>>=Hb,e+=1);return e}const Zw=t=>(Hb<<BigInt(t))-Hb,p3=t=>new Uint8Array(t),n7=t=>Uint8Array.from(t);function jH(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=p3(t),i=p3(t),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...d)=>r(i,n,...d),c=(d=p3(0))=>{i=a(n7([0]),d),n=a(),d.length!==0&&(i=a(n7([1]),d),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const h=[];for(;d<e;){n=a();const f=n.slice();h.push(f),d+=n.length}return R2(...h)};return(d,h)=>{o(),c(d);let f;for(;!(f=h(l()));)c();return o(),f}}const zH={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||vp(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Gw(t,e,r={}){const n=(i,s,o)=>{const a=zH[s];if(typeof a!="function")throw new Error("invalid validator function");const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+c)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}function i7(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const oi=BigInt(0),kn=BigInt(1),Kl=BigInt(2),FH=BigInt(3),WP=BigInt(4),KP=BigInt(5),ZP=BigInt(8);function ti(t,e){const r=t%e;return r>=oi?r:e+r}function Zi(t,e,r){let n=t;for(;e-- >oi;)n*=n,n%=r;return n}function Vb(t,e){if(t===oi)throw new Error("invert: expected non-zero number");if(e<=oi)throw new Error("invert: expected positive modulus, got "+e);let r=ti(t,e),n=e,i=oi,s=kn;for(;r!==oi;){const a=n/r,c=n%r,l=i-s*a;n=r,r=c,i=s,s=l}if(n!==kn)throw new Error("invert: does not exist");return ti(i,e)}function GP(t,e){const r=(t.ORDER+kn)/WP,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function qH(t,e){const r=(t.ORDER-KP)/ZP,n=t.mul(e,Kl),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,Kl),i),a=t.mul(s,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function HH(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-kn,r=0;for(;e%Kl===oi;)e/=Kl,r++;let n=Kl;const i=xv(t);for(;s7(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return GP;let s=i.pow(n,e);const o=(e+kn)/Kl;return function(c,l){if(c.is0(l))return l;if(s7(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,s),h=c.pow(l,e),f=c.pow(l,o);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let g=1,p=c.sqr(h);for(;!c.eql(p,c.ONE);)if(g++,p=c.sqr(p),g===u)throw new Error("Cannot find square root");const w=kn<<BigInt(u-g-1),m=c.pow(d,w);u=g,d=c.sqr(m),h=c.mul(h,d),f=c.mul(f,m)}return f}}function VH(t){return t%WP===FH?GP:t%ZP===KP?qH:HH(t)}const WH=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function KH(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=WH.reduce((n,i)=>(n[i]="function",n),e);return Gw(t,r)}function ZH(t,e,r){if(r<oi)throw new Error("invalid exponent, negatives unsupported");if(r===oi)return t.ONE;if(r===kn)return e;let n=t.ONE,i=e;for(;r>oi;)r&kn&&(n=t.mul(n,i)),i=t.sqr(i),r>>=kn;return n}function YP(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function s7(t,e){const r=(t.ORDER-kn)/Kl,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function JP(t,e){e!==void 0&&P1(e);const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function xv(t,e,r=!1,n={}){if(t<=oi)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:s}=JP(t,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:Zw(i),ZERO:oi,ONE:kn,create:c=>ti(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return oi<=c&&c<t},is0:c=>c===oi,isOdd:c=>(c&kn)===kn,neg:c=>ti(-c,t),eql:(c,l)=>c===l,sqr:c=>ti(c*c,t),add:(c,l)=>ti(c+l,t),sub:(c,l)=>ti(c-l,t),mul:(c,l)=>ti(c*l,t),pow:(c,l)=>ZH(a,c,l),div:(c,l)=>ti(c*Vb(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Vb(c,t),sqrt:n.sqrt||(c=>(o||(o=VH(t)),o(a,c))),toBytes:c=>r?VP(c,s):Ep(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?HP(c):iu(c)},invertBatch:c=>YP(a,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(a)}function XP(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function QP(t){const e=XP(t);return e+Math.ceil(e/2)}function GH(t,e,r=!1){const n=t.length,i=XP(e),s=QP(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?HP(t):iu(t),a=ti(o,e-kn)+kn;return r?VP(a,i):Ep(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const o7=BigInt(0),Wb=BigInt(1);function g3(t,e){const r=e.negate();return t?r:e}function eT(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function w3(t,e){eT(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=Zw(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function a7(t,e,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=Wb);const l=e*n,u=l+Math.abs(a)-1,d=a===0,h=a<0,f=e%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:h,isNegF:f,offsetF:l}}function YH(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function JH(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const m3=new WeakMap,tT=new WeakMap;function y3(t){return tT.get(t)||1}function XH(t,e){return{constTimeNegate:g3,hasPrecomputes(r){return y3(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>o7;)n&Wb&&(i=i.add(s)),s=s.double(),n>>=Wb;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=w3(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let s=t.ZERO,o=t.BASE;const a=w3(r,e);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:h,isNegF:f,offsetF:g}=a7(i,c,a);i=l,d?o=o.add(g3(f,n[g])):s=s.add(g3(h,n[u]))}return{p:s,f:o}},wNAFUnsafe(r,n,i,s=t.ZERO){const o=w3(r,e);for(let a=0;a<o.windows&&i!==o7;a++){const{nextN:c,offset:l,isZero:u,isNeg:d}=a7(i,a,o);if(i=c,!u){const h=n[l];s=s.add(d?h.negate():h)}}return s},getPrecomputes(r,n,i){let s=m3.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&m3.set(n,i(s))),s},wNAFCached(r,n,i){const s=y3(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=y3(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){eT(n,e),tT.set(r,n),m3.delete(r)}}}function QH(t,e,r,n){YH(r,t),JH(n,e);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=UH(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=Zw(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((e.BITS-1)/c)*c;let h=o;for(let f=d;f>=0;f-=c){u.fill(o);for(let p=0;p<s;p++){const w=n[p],m=Number(w>>BigInt(f)&l);u[m]=u[m].add(r[p])}let g=o;for(let p=u.length-1,w=o;p>0;p--)w=w.add(u[p]),g=g.add(w);if(h=h.add(g),f!==0)for(let p=0;p<c;p++)h=h.double()}return h}function rT(t){return KH(t.Fp),Gw(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...JP(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function c7(t){t.lowS!==void 0&&T1("lowS",t.lowS),t.prehash!==void 0&&T1("prehash",t.prehash)}function eV(t){const e=rT(t);Gw(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}let tV=class extends Error{constructor(e=""){super(e)}};const Ca={Err:tV,_tlv:{encode:(t,e)=>{const{Err:r}=Ca;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=Eg(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?Eg(i.length/2|128):"";return Eg(t)+s+i+e},decode(t,e){const{Err:r}=Ca;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=Ca;if(t<Ia)throw new e("integer: negative integers are not allowed");let r=Eg(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=Ca;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return iu(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=Ca,i=as("signature",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=Ca,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}};function b3(t,e){return O1(Ep(t,e))}const Ia=BigInt(0),Mr=BigInt(1);BigInt(2);const v3=BigInt(3),rV=BigInt(4);function nV(t){const e=eV(t),{Fp:r}=e,n=xv(e.n,e.nBitLength),i=e.toBytes||((v,E,I)=>{const _=E.toAffine();return R2(Uint8Array.from([4]),r.toBytes(_.x),r.toBytes(_.y))}),s=e.fromBytes||(v=>{const E=v.subarray(1),I=r.fromBytes(E.subarray(0,r.BYTES)),_=r.fromBytes(E.subarray(r.BYTES,2*r.BYTES));return{x:I,y:_}});function o(v){const{a:E,b:I}=e,_=r.sqr(v),A=r.mul(_,v);return r.add(r.add(A,r.mul(v,E)),I)}function a(v,E){const I=r.sqr(E),_=o(v);return r.eql(I,_)}if(!a(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(e.a,v3),rV),l=r.mul(r.sqr(e.b),BigInt(27));if(r.is0(r.add(c,l)))throw new Error("bad curve params: a or b");function u(v){return Cv(v,Mr,e.n)}function d(v){const{allowedPrivateKeyLengths:E,nByteLength:I,wrapPrivateKey:_,n:A}=e;if(E&&typeof v!="bigint"){if(vp(v)&&(v=O1(v)),typeof v!="string"||!E.includes(v.length))throw new Error("invalid private key");v=v.padStart(I*2,"0")}let P;try{P=typeof v=="bigint"?v:iu(as("private key",v,I))}catch{throw new Error("invalid private key, expected hex or "+I+" bytes, got "+typeof v)}return _&&(P=ti(P,A)),wh("private key",P,Mr,A),P}function h(v){if(!(v instanceof p))throw new Error("ProjectivePoint expected")}const f=i7((v,E)=>{const{px:I,py:_,pz:A}=v;if(r.eql(A,r.ONE))return{x:I,y:_};const P=v.is0();E==null&&(E=P?r.ONE:r.inv(A));const y=r.mul(I,E),O=r.mul(_,E),S=r.mul(A,E);if(P)return{x:r.ZERO,y:r.ZERO};if(!r.eql(S,r.ONE))throw new Error("invZ was invalid");return{x:y,y:O}}),g=i7(v=>{if(v.is0()){if(e.allowInfinityPoint&&!r.is0(v.py))return;throw new Error("bad point: ZERO")}const{x:E,y:I}=v.toAffine();if(!r.isValid(E)||!r.isValid(I))throw new Error("bad point: x or y not FE");if(!a(E,I))throw new Error("bad point: equation left != right");if(!v.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class p{constructor(E,I,_){if(E==null||!r.isValid(E))throw new Error("x required");if(I==null||!r.isValid(I)||r.is0(I))throw new Error("y required");if(_==null||!r.isValid(_))throw new Error("z required");this.px=E,this.py=I,this.pz=_,Object.freeze(this)}static fromAffine(E){const{x:I,y:_}=E||{};if(!E||!r.isValid(I)||!r.isValid(_))throw new Error("invalid affine point");if(E instanceof p)throw new Error("projective point not allowed");const A=P=>r.eql(P,r.ZERO);return A(I)&&A(_)?p.ZERO:new p(I,_,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(E){const I=YP(r,E.map(_=>_.pz));return E.map((_,A)=>_.toAffine(I[A])).map(p.fromAffine)}static fromHex(E){const I=p.fromAffine(s(as("pointHex",E)));return I.assertValidity(),I}static fromPrivateKey(E){return p.BASE.multiply(d(E))}static msm(E,I){return QH(p,n,E,I)}_setWindowSize(E){b.setWindowSize(this,E)}assertValidity(){g(this)}hasEvenY(){const{y:E}=this.toAffine();if(r.isOdd)return!r.isOdd(E);throw new Error("Field doesn't support isOdd")}equals(E){h(E);const{px:I,py:_,pz:A}=this,{px:P,py:y,pz:O}=E,S=r.eql(r.mul(I,O),r.mul(P,A)),k=r.eql(r.mul(_,O),r.mul(y,A));return S&&k}negate(){return new p(this.px,r.neg(this.py),this.pz)}double(){const{a:E,b:I}=e,_=r.mul(I,v3),{px:A,py:P,pz:y}=this;let O=r.ZERO,S=r.ZERO,k=r.ZERO,L=r.mul(A,A),T=r.mul(P,P),C=r.mul(y,y),x=r.mul(A,P);return x=r.add(x,x),k=r.mul(A,y),k=r.add(k,k),O=r.mul(E,k),S=r.mul(_,C),S=r.add(O,S),O=r.sub(T,S),S=r.add(T,S),S=r.mul(O,S),O=r.mul(x,O),k=r.mul(_,k),C=r.mul(E,C),x=r.sub(L,C),x=r.mul(E,x),x=r.add(x,k),k=r.add(L,L),L=r.add(k,L),L=r.add(L,C),L=r.mul(L,x),S=r.add(S,L),C=r.mul(P,y),C=r.add(C,C),L=r.mul(C,x),O=r.sub(O,L),k=r.mul(C,T),k=r.add(k,k),k=r.add(k,k),new p(O,S,k)}add(E){h(E);const{px:I,py:_,pz:A}=this,{px:P,py:y,pz:O}=E;let S=r.ZERO,k=r.ZERO,L=r.ZERO;const T=e.a,C=r.mul(e.b,v3);let x=r.mul(I,P),B=r.mul(_,y),R=r.mul(A,O),M=r.add(I,_),U=r.add(P,y);M=r.mul(M,U),U=r.add(x,B),M=r.sub(M,U),U=r.add(I,A);let z=r.add(P,O);return U=r.mul(U,z),z=r.add(x,R),U=r.sub(U,z),z=r.add(_,A),S=r.add(y,O),z=r.mul(z,S),S=r.add(B,R),z=r.sub(z,S),L=r.mul(T,U),S=r.mul(C,R),L=r.add(S,L),S=r.sub(B,L),L=r.add(B,L),k=r.mul(S,L),B=r.add(x,x),B=r.add(B,x),R=r.mul(T,R),U=r.mul(C,U),B=r.add(B,R),R=r.sub(x,R),R=r.mul(T,R),U=r.add(U,R),x=r.mul(B,U),k=r.add(k,x),x=r.mul(z,U),S=r.mul(M,S),S=r.sub(S,x),x=r.mul(M,B),L=r.mul(z,L),L=r.add(L,x),new p(S,k,L)}subtract(E){return this.add(E.negate())}is0(){return this.equals(p.ZERO)}wNAF(E){return b.wNAFCached(this,E,p.normalizeZ)}
vendor: 4,769 bytes, line 64
64multiplyUnsafe(E){const{endo:I,n:_}=e;wh("scalar",E,Ia,_);const A=p.ZERO;if(E===Ia)return A;if(this.is0()||E===Mr)return this;if(!I||b.hasPrecomputes(this))return b.wNAFCachedUnsafe(this,E,p.normalizeZ);let{k1neg:P,k1:y,k2neg:O,k2:S}=I.splitScalar(E),k=A,L=A,T=this;for(;y>Ia||S>Ia;)y&Mr&&(k=k.add(T)),S&Mr&&(L=L.add(T)),T=T.double(),y>>=Mr,S>>=Mr;return P&&(k=k.negate()),O&&(L=L.negate()),L=new p(r.mul(L.px,I.beta),L.py,L.pz),k.add(L)}multiply(E){const{endo:I,n:_}=e;wh("scalar",E,Mr,_);let A,P;if(I){const{k1neg:y,k1:O,k2neg:S,k2:k}=I.splitScalar(E);let{p:L,f:T}=this.wNAF(O),{p:C,f:x}=this.wNAF(k);L=b.constTimeNegate(y,L),C=b.constTimeNegate(S,C),C=new p(r.mul(C.px,I.beta),C.py,C.pz),A=L.add(C),P=T.add(x)}else{const{p:y,f:O}=this.wNAF(E);A=y,P=O}return p.normalizeZ([A,P])[0]}multiplyAndAddUnsafe(E,I,_){const A=p.BASE,P=(O,S)=>S===Ia||S===Mr||!O.equals(A)?O.multiplyUnsafe(S):O.multiply(S),y=P(this,I).add(P(E,_));return y.is0()?void 0:y}toAffine(E){return f(this,E)}isTorsionFree(){const{h:E,isTorsionFree:I}=e;if(E===Mr)return!0;if(I)return I(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:E,clearCofactor:I}=e;return E===Mr?this:I?I(p,this):this.multiplyUnsafe(e.h)}toRawBytes(E=!0){return T1("isCompressed",E),this.assertValidity(),i(p,this,E)}toHex(E=!0){return T1("isCompressed",E),O1(this.toRawBytes(E))}}p.BASE=new p(e.Gx,e.Gy,r.ONE),p.ZERO=new p(r.ZERO,r.ONE,r.ZERO);const{endo:w,nBitLength:m}=e,b=XH(p,w?Math.ceil(m/2):m);return{CURVE:e,ProjectivePoint:p,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function iV(t){const e=rT(t);return Gw(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function sV(t){const e=iV(t),{Fp:r,n,nByteLength:i,nBitLength:s}=e,o=r.BYTES+1,a=2*r.BYTES+1;function c(C){return ti(C,n)}function l(C){return Vb(C,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:h,isWithinCurveOrder:f}=nV({...e,toBytes(C,x,B){const R=x.toAffine(),M=r.toBytes(R.x),U=R2;return T1("isCompressed",B),B?U(Uint8Array.from([x.hasEvenY()?2:3]),M):U(Uint8Array.from([4]),M,r.toBytes(R.y))},fromBytes(C){const x=C.length,B=C[0],R=C.subarray(1);if(x===o&&(B===2||B===3)){const M=iu(R);if(!Cv(M,Mr,r.ORDER))throw new Error("Point is not on curve");const U=h(M);let z;try{z=r.sqrt(U)}catch(V){const G=V instanceof Error?": "+V.message:"";throw new Error("Point is not on curve"+G)}const H=(z&Mr)===Mr;return(B&1)===1!==H&&(z=r.neg(z)),{x:M,y:z}}else if(x===a&&B===4){const M=r.fromBytes(R.subarray(0,r.BYTES)),U=r.fromBytes(R.subarray(r.BYTES,2*r.BYTES));return{x:M,y:U}}else{const M=o,U=a;throw new Error("invalid Point, expected length of "+M+", or uncompressed "+U+", got "+x)}}});function g(C){const x=n>>Mr;return C>x}function p(C){return g(C)?c(-C):C}const w=(C,x,B)=>iu(C.slice(x,B));class m{constructor(x,B,R){wh("r",x,Mr,n),wh("s",B,Mr,n),this.r=x,this.s=B,R!=null&&(this.recovery=R),Object.freeze(this)}static fromCompact(x){const B=i;return x=as("compactSignature",x,B*2),new m(w(x,0,B),w(x,B,2*B))}static fromDER(x){const{r:B,s:R}=Ca.toSig(as("DER",x));return new m(B,R)}assertValidity(){}addRecoveryBit(x){return new m(this.r,this.s,x)}recoverPublicKey(x){const{r:B,s:R,recovery:M}=this,U=A(as("msgHash",x));if(M==null||![0,1,2,3].includes(M))throw new Error("recovery id invalid");const z=M===2||M===3?B+e.n:B;if(z>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const H=(M&1)===0?"02":"03",Y=u.fromHex(H+b3(z,r.BYTES)),V=l(z),G=c(-U*V),re=c(R*V),de=u.BASE.multiplyAndAddUnsafe(Y,G,re);if(!de)throw new Error("point at infinify");return de.assertValidity(),de}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return k2(this.toDERHex())}toDERHex(){return Ca.hexFromSig(this)}toCompactRawBytes(){return k2(this.toCompactHex())}toCompactHex(){const x=i;return b3(this.r,x)+b3(this.s,x)}}const b={isValidPrivateKey(C){try{return d(C),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const C=QP(e.n);return GH(e.randomBytes(C),e.n)},precompute(C=8,x=u.BASE){return x._setWindowSize(C),x.multiply(BigInt(3)),x}};function v(C,x=!0){return u.fromPrivateKey(C).toRawBytes(x)}function E(C){if(typeof C=="bigint")return!1;if(C instanceof u)return!0;const B=as("key",C).length,R=r.BYTES,M=R+1,U=2*R+1;if(!(e.allowedPrivateKeyLengths||i===M))return B===M||B===U}function I(C,x,B=!0){if(E(C)===!0)throw new Error("first arg must be private key");if(E(x)===!1)throw new Error("second arg must be public key");return u.fromHex(x).multiply(d(C)).toRawBytes(B)}const _=e.bits2int||function(C){if(C.length>8192)throw new Error("input is too large");
64const x=iu(C),B=C.length*8-s;return B>0?x>>BigInt(B):x},A=e.bits2int_modN||function(C){return c(_(C))},P=Zw(s);function y(C){return wh("num < 2^"+s,C,Ia,P),Ep(C,i)}function O(C,x,B=S){if(["recovered","canonical"].some(ae=>ae in B))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:M}=e;let{lowS:U,prehash:z,extraEntropy:H}=B;U==null&&(U=!0),C=as("msgHash",C),c7(B),z&&(C=as("prehashed msgHash",R(C)));const Y=A(C),V=d(x),G=[y(V),y(Y)];if(H!=null&&H!==!1){const ae=H===!0?M(r.BYTES):H;G.push(as("extraEntropy",ae))}const re=R2(...G),de=Y;function ce(ae){const be=_(ae);if(!f(be))return;const Ce=l(be),ze=u.BASE.multiply(be).toAffine(),Qe=c(ze.x);if(Qe===Ia)return;const vt=c(Ce*c(de+Qe*V));if(vt===Ia)return;let Qt=(ze.x===Qe?0:2)|Number(ze.y&Mr),$n=vt;return U&&g(vt)&&($n=p(vt),Qt^=1),new m(Qe,$n,Qt)}return{seed:re,k2sig:ce}}const S={lowS:e.lowS,prehash:!1},k={lowS:e.lowS,prehash:!1};function L(C,x,B=S){const{seed:R,k2sig:M}=O(C,x,B),U=e;return jH(U.hash.outputLen,U.nByteLength,U.hmac)(R,M)}u.BASE._setWindowSize(8);function T(C,x,B,R=k){var Qt;const M=C;x=as("msgHash",x),B=as("publicKey",B);const{lowS:U,prehash:z,format:H}=R;if(c7(R),"strict"in R)throw new Error("options.strict was renamed to lowS");if(H!==void 0&&H!=="compact"&&H!=="der")throw new Error("format must be compact or der");const Y=typeof M=="string"||vp(M),V=!Y&&!H&&typeof M=="object"&&M!==null&&typeof M.r=="bigint"&&typeof M.s=="bigint";if(!Y&&!V)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let G,re;try{if(V&&(G=new m(M.r,M.s)),Y){try{H!=="compact"&&(G=m.fromDER(M))}catch($n){if(!($n instanceof Ca.Err))throw $n}!G&&H!=="der"&&(G=m.fromCompact(M))}re=u.fromHex(B)}catch{return!1}if(!G||U&&G.hasHighS())return!1;z&&(x=e.hash(x));const{r:de,s:ce}=G,ae=A(x),be=l(ce),Ce=c(ae*be),ze=c(de*be),Qe=(Qt=u.BASE.multiplyAndAddUnsafe(re,Ce,ze))==null?void 0:Qt.toAffine();return Qe?c(Qe.x)===de:!1}return{CURVE:e,getPublicKey:v,getSharedSecret:I,sign:L,verify:T,ProjectivePoint:u,Signature:m,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function oV(t){return{hash:t,hmac:(e,...r)=>zP(t,e,fH(...r)),randomBytes:pH}}function aV(t,e){const r=n=>sV({...t,...oV(n)});return{...r(e),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const nT=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l7=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),cV=BigInt(0),lV=BigInt(1),Kb=BigInt(2),u7=(t,e)=>(t+e/Kb)/e;function uV(t){const e=nT,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,d=Zi(u,r,e)*u%e,h=Zi(d,r,e)*u%e,f=Zi(h,Kb,e)*l%e,g=Zi(f,i,e)*f%e,p=Zi(g,s,e)*g%e,w=Zi(p,a,e)*p%e,m=Zi(w,c,e)*w%e,b=Zi(m,a,e)*p%e,v=Zi(b,r,e)*u%e,E=Zi(v,o,e)*g%e,I=Zi(E,n,e)*l%e,_=Zi(I,Kb,e);if(!Zb.eql(Zb.sqr(_),t))throw new Error("Cannot find square root");return _}const Zb=xv(nT,void 0,void 0,{sqrt:uV}),dV=aV({a:cV,b:BigInt(7),Fp:Zb,n:l7,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=l7,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-lV*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,o=BigInt("0x100000000000000000000000000000000"),a=u7(s*t,e),c=u7(-n*t,e);let l=ti(t-a*r-c*i,e),u=ti(-a*n-c*s,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},LH),hV=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:dV},Symbol.toStringTag,{value:"Module"}));function fV(t){if(t.length>=255)throw new TypeError("Alphabet too long");const e=new Uint8Array(256);for(let l=0;l<e.length;l++)e[l]=255;for(let l=0;l<t.length;l++){const u=t.charAt(l),d=u.charCodeAt(0);if(e[d]!==255)throw new TypeError(u+" is ambiguous");e[d]=l}const r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function o(l){if(l instanceof Uint8Array||(ArrayBuffer.isView(l)?l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength):Array.isArray(l)&&(l=Uint8Array.from(l))),!(l instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(l.length===0)return"";let u=0,d=0,h=0;const f=l.length;for(;h!==f&&l[h]===0;)h++,u++;const g=(f-h)*s+1>>>0,p=new Uint8Array(g);for(;h!==f;){let b=l[h],v=0;for(let E=g-1;(b!==0||v<d)&&E!==-1;E--,v++)b+=256*p[E]>>>0,p[E]=b%r>>>0,b=b/r>>>0;if(b!==0)throw new Error("Non-zero carry");d=v,h++}let w=g-d;for(;w!==g&&p[w]===0;)w++;let m=n.repeat(u);for(;w<g;++w)m+=t.charAt(p[w]);return m}function a(l){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;let u=0,d=0,h=0;for(;l[u]===n;)d++,u++;const f=(l.length-u)*i+1>>>0,g=new Uint8Array(f);for(;u<l.length;){const b=l.charCodeAt(u);if(b>255)return;let v=e[b];if(v===255)return;let E=0;for(let I=f-1;(v!==0||E<h)&&I!==-1;I--,E++)v+=r*g[I]>>>0,g[I]=v%256>>>0,v=v/256>>>0;if(v!==0)throw new Error("Non-zero carry");h=E,u++}let p=f-h;for(;p!==f&&g[p]===0;)p++;const w=new Uint8Array(d+(f-p));let m=d;for(;p!==f;)w[m++]=g[p++];return w}function c(l){const u=a(l);if(u)return u;throw new Error("Non-base"+r+" character")}return{encode:o,decodeUnsafe:a,decode:c}}var pV="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const x0=fV(pV);function gV(t){const e=t.length;let r=0,n=0;for(;n<e;){let i=t.charCodeAt(n++);if((i&4294967168)===0){r++;continue}else if((i&4294965248)===0)r+=2;else{if(i>=55296&&i<=56319&&n<e){const s=t.charCodeAt(n);(s&64512)===56320&&(++n,i=((i&1023)<<10)+(s&1023)+65536)}(i&4294901760)===0?r+=3:r+=4}}return r}function wV(t,e,r){const n=t.length;let i=r,s=0;for(;s<n;){let o=t.charCodeAt(s++);if((o&4294967168)===0){e[i++]=o;continue}else if((o&4294965248)===0)e[i++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&s<n){const a=t.charCodeAt(s);(a&64512)===56320&&(++s,o=((o&1023)<<10)+(a&1023)+65536)}(o&4294901760)===0?(e[i++]=o>>12&15|224,e[i++]=o>>6&63|128):(e[i++]=o>>18&7|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128)}e[i++]=o&63|128}}const mV=new TextEncoder,yV=50;function bV(t,e,r){mV.encodeInto(t,e.subarray(r))}function vV(t,e,r){t.length>yV?bV(t,e,r):wV(t,e,r)}const EV=4096;function iT(t,e,r){let n=e;const i=n+r,s=[];let o="";for(;n<i;){const a=t[n++];if((a&128)===0)s.push(a);else if((a&224)===192){const c=t[n++]&63;s.push((a&31)<<6|c)}else if((a&240)===224){const c=t[n++]&63,l=t[n++]&63;s.push((a&31)<<12|c<<6|l)}else if((a&248)===240){const c=t[n++]&63,l=t[n++]&63,u=t[n++]&63;let d=(a&7)<<18|c<<12|l<<6|u;d>65535&&(d-=65536,s.push(d>>>10&1023|55296),d=56320|d&1023),s.push(d)}else s.push(a);s.length>=EV&&(o+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(o+=String.fromCharCode(...s)),o}const CV=new TextDecoder,xV=200;function _V(t,e,r){const n=t.subarray(e,e+r);return CV.decode(n)}function SV(t,e,r){return r>xV?_V(t,e,r):iT(t,e,r)}class Cg{constructor(e,r){this.type=e,this.data=r}}
vendor: 30,074 bytes, line 64
64class _i extends Error{constructor(e){super(e);const r=Object.create(_i.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:_i.name})}}const J0=4294967295;function IV(t,e,r){const n=r/4294967296,i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function sT(t,e,r){const n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function oT(t,e){const r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function $V(t,e){const r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}const AV=-1,PV=4294967296-1,TV=17179869184-1;function OV({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=TV)if(e===0&&t<=PV){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{const r=t/4294967296,n=t&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,e<<2|r&3),s.setUint32(4,n),i}else{const r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),sT(n,4,t),r}}function NV(t){const e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-i*1e9}}function kV(t){if(t instanceof Date){const e=NV(t);return OV(e)}else return null}function RV(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{const r=e.getUint32(0),n=e.getUint32(4),i=(r&3)*4294967296+n,s=r>>>2;return{sec:i,nsec:s}}case 12:{const r=oT(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new _i(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function BV(t){const e=RV(t);return new Date(e.sec*1e3+e.nsec/1e6)}const DV={type:AV,encode:kV,decode:BV};class B2{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(DV)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{const i=-1-e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){const i=this.builtInEncoders[n];if(i!=null){const s=i(e,r);if(s!=null){const o=-1-n;return new Cg(o,s)}}}for(let n=0;n<this.encoders.length;n++){const i=this.encoders[n];if(i!=null){const s=i(e,r);if(s!=null){const o=n;return new Cg(o,s)}}}return e instanceof Cg?e:null}decode(e,r,n){const i=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return i?i(e,r,n):new Cg(r,e)}}B2.defaultCodec=new B2;function LV(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function Gb(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):LV(t)?new Uint8Array(t):Uint8Array.from(t)}const MV=100,UV=2048;let jV=class aT{constructor(e){this.entered=!1,this.extensionCodec=(e==null?void 0:e.extensionCodec)??B2.defaultCodec,this.context=e==null?void 0:e.context,this.useBigInt64=(e==null?void 0:e.useBigInt64)??!1,this.maxDepth=(e==null?void 0:e.maxDepth)??MV,this.initialBufferSize=(e==null?void 0:e.initialBufferSize)??UV,this.sortKeys=(e==null?void 0:e.sortKeys)??!1,this.forceFloat32=(e==null?void 0:e.forceFloat32)??!1,this.ignoreUndefined=(e==null?void 0:e.ignoreUndefined)??!1,this.forceIntegerToFloat=(e==null?void 0:e.forceIntegerToFloat)??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new aT({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,r)}ensureBufferSizeToWrite(e){const r=this.pos+e;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(e){const r=new ArrayBuffer(e),n=new Uint8Array(r),i=new DataView(r);n.set(this.bytes),this.view=i,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){const n=gV(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),vV(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,r){const n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,r);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){const r=e.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const n=Gb(e);this.writeU8a(n)}encodeArray(e,r){const n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(const i of e)this.doEncode(i,r+1)}countWithoutUndefined(e,r){let n=0;for(const i of r)e[i]!==void 0&&n++;return n}encodeMap(e,r){const n=Object.keys(e);this.sortKeys&&n.sort();const i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(const s of n){const o=e[s];this.ignoreUndefined&&o===void 0||(this.encodeString(s),this.doEncode(o,r+1))}}encodeExtension(e){if(typeof e.data=="function"){const n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(e.type),this.writeU8a(n);return}const r=e.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){const r=e.length;this.ensureBufferSizeToWrite(r),this.bytes.set(e,this.pos),this.pos+=r}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),IV(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),sT(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function zV(t,e){return new jV(e).encodeSharedRef(t)}function E3(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}const FV=16,qV=16;class HV{constructor(e=FV,r=qV){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){const i=this.caches[n-1];e:for(const s of i){const o=s.bytes;for(let a=0;a<n;a++)if(o[a]!==e[r+a])continue e;return s.str}return null}store(e,r){const n=this.caches[e.length-1],i={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,r,n){const i=this.find(e,r,n);if(i!=null)return this.hit++,i;this.miss++;const s=iT(e,r,n),o=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(o,s),s}}const Yb="array",Uf="map_key",cT="map_value",VV=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new _i("The type of key must be string or number but "+typeof t)};class WV{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const r=this.getUninitializedStateFromPool();r.type=Yb,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){const r=this.getUninitializedStateFromPool();r.type=Uf,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===Yb){const n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===Uf||e.type===cT){const n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const X0=-1,_v=new DataView(new ArrayBuffer(0)),KV=new Uint8Array(_v.buffer);try{_v.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const d7=new RangeError("Insufficient data"),ZV=new HV;let GV=class lT{constructor(e){this.totalPos=0,this.pos=0,this.view=_v,this.bytes=KV,this.headByte=X0,this.stack=new WV,this.entered=!1,this.extensionCodec=(e==null?void 0:e.extensionCodec)??B2.defaultCodec,this.context=e==null?void 0:e.context,this.useBigInt64=(e==null?void 0:e.useBigInt64)??!1,this.rawStrings=(e==null?void 0:e.rawStrings)??!1,this.maxStrLength=(e==null?void 0:e.maxStrLength)??J0,this.maxBinLength=(e==null?void 0:e.maxBinLength)??J0,this.maxArrayLength=(e==null?void 0:e.maxArrayLength)??J0,this.maxMapLength=(e==null?void 0:e.maxMapLength)??J0,this.maxExtLength=(e==null?void 0:e.maxExtLength)??J0,this.keyDecoder=(e==null?void 0:e.keyDecoder)!==void 0?e.keyDecoder:ZV,this.mapKeyConverter=(e==null?void 0:e.mapKeyConverter)??VV}clone(){return new lT({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=X0,this.stack.reset()}setBuffer(e){const r=Gb(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===X0&&!this.hasRemaining(1))this.setBuffer(e);else{const r=this.bytes.subarray(this.pos),n=Gb(e),i=new Uint8Array(r.length+n.length);i.set(r),i.set(n,r.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){const{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(const a of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{n=this.doDecodeSync(),r=!0}catch(c){if(!(c instanceof RangeError))throw c}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}const{headByte:i,pos:s,totalPos:o}=this;throw new RangeError(`Insufficient data in parsing ${E3(i)} at ${o} (${s} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,i=-1;for await(const s of e){if(r&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(o){if(!(o instanceof RangeError))throw o}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const e=this.readHeadByte();let r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){const i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e<160){const i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else{const i=e-160;r=this.decodeString(i,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){const i=this.lookU8();r=this.decodeString(i,1)}else if(e===218){const i=this.lookU16();r=this.decodeString(i,2)}else if(e===219){const i=this.lookU32();r=this.decodeString(i,4)}else if(e===220){const i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===221){const i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===222){const i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===223){const i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===196){const i=this.lookU8();r=this.decodeBinary(i,1)}else if(e===197){const i=this.lookU16();r=this.decodeBinary(i,2)}else if(e===198){const i=this.lookU32();r=this.decodeBinary(i,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){const i=this.lookU8();r=this.decodeExtension(i,1)}else if(e===200){const i=this.lookU16();r=this.decodeExtension(i,2)}else if(e===201){const i=this.lookU32();r=this.decodeExtension(i,4)}else throw new _i(`Unrecognized type byte: ${E3(e)}`);this.complete();const n=this.stack;for(;n.length>0;){const i=n.top();if(i.type===Yb)if(i.array[i.position]=r,i.position++,i.position===i.size)r=i.array,n.release(i);else continue e;else if(i.type===Uf){if(r==="__proto__")throw new _i("The key __proto__ is not allowed");i.key=this.mapKeyConverter(r),i.type=cT;continue e}else if(i.map[i.key]=r,i.readCount++,i.readCount===i.size)r=i.map,n.release(i);else{i.key=null,i.type=Uf;continue e}}return r}}readHeadByte(){return this.headByte===X0&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=X0}readArraySize(){const e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new _i(`Unrecognized array type byte: ${E3(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new _i(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new _i(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){var s;if(e>this.maxStrLength)throw new _i(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw d7;const n=this.pos+r;let i;return this.stateIsMapKey()&&((s=this.keyDecoder)!=null&&s.canBeCached(e))?i=this.keyDecoder.decode(this.bytes,n,e):i=SV(this.bytes,n,e),this.pos+=r+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Uf:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new _i(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw d7;const n=this.pos+r,i=this.bytes.subarray(n,n+e);return this.pos+=r+e,i}decodeExtension(e,r){if(e>this.maxExtLength)throw new _i(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);const n=this.view.getInt8(this.pos+r),i=this.decodeBinary(e,r+1);return this.extensionCodec.decode(i,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){const e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){const e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){const e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){const e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){const e=$V(this.view,this.pos);return this.pos+=8,e}readI64(){const e=oT(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){const e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){const e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function YV(t,e){return new GV(e).decode(t)}/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function uT(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function dT(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(r=>typeof r=="string"):e.every(r=>Number.isSafeInteger(r)):!1}function D2(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function Cp(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function L2(t){if(!Array.isArray(t))throw new Error("array expected")}function M2(t,e){if(!dT(!0,e))throw new Error(`${t}: array of strings expected`)}function hT(t,e){if(!dT(!1,e))throw new Error(`${t}: array of numbers expected`)}function fT(...t){const e=s=>s,r=(s,o)=>a=>s(o(a)),n=t.map(s=>s.encode).reduceRight(r,e),i=t.map(s=>s.decode).reduce(r,e);return{encode:n,decode:i}}function pT(t){const e=typeof t=="string"?t.split(""):t,r=e.length;M2("alphabet",e);const n=new Map(e.map((i,s)=>[i,s]));return{encode:i=>(L2(i),i.map(s=>{if(!Number.isSafeInteger(s)||s<0||s>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${s}". Allowed: ${t}`);return e[s]})),decode:i=>(L2(i),i.map(s=>{D2("alphabet.decode",s);const o=n.get(s);if(o===void 0)throw new Error(`Unknown letter: "${s}". Allowed: ${t}`);return o}))}}function gT(t=""){return D2("join",t),{encode:e=>(M2("join.decode",e),e.join(t)),decode:e=>(D2("join.decode",e),e.split(t))}}function JV(t,e="="){return Cp(t),D2("padding",e),{encode(r){for(M2("padding.encode",r);r.length*t%8;)r.push(e);return r},decode(r){M2("padding.decode",r);let n=r.length;if(n*t%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;n>0&&r[n-1]===e;n--)if((n-1)*t%8===0)throw new Error("padding: invalid, string has too much padding");return r.slice(0,n)}}}function h7(t,e,r){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(L2(t),!t.length)return[];let n=0;const i=[],s=Array.from(t,a=>{if(Cp(a),a<0||a>=e)throw new Error(`invalid integer: ${a}`);return a}),o=s.length;for(;;){let a=0,c=!0;for(let l=n;l<o;l++){const u=s[l],d=e*a,h=d+u;if(!Number.isSafeInteger(h)||d/e!==a||h-u!==d)throw new Error("convertRadix: carry overflow");const f=h/r;a=h%r;const g=Math.floor(f);if(s[l]=g,!Number.isSafeInteger(g)||g*r+a!==h)throw new Error("convertRadix: carry overflow");if(c)g?c=!1:n=l;else continue}if(i.push(a),c)break}for(let a=0;a<t.length-1&&t[a]===0;a++)i.push(0);return i.reverse()}const wT=(t,e)=>e===0?t:wT(e,t%e),U2=(t,e)=>t+(e-wT(t,e)),C3=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function f7(t,e,r,n){if(L2(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(U2(e,r)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${r} carryBits=${U2(e,r)}`);let i=0,s=0;const o=C3[e],a=C3[r]-1,c=[];for(const l of t){if(Cp(l),l>=o)throw new Error(`convertRadix2: invalid data word=${l} from=${e}`);if(i=i<<e|l,s+e>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`);for(s+=e;s>=r;s-=r)c.push((i>>s-r&a)>>>0);const u=C3[s];if(u===void 0)throw new Error("invalid carry");i&=u-1}if(i=i<<r-s&a,!n&&s>=e)throw new Error("Excess padding");if(!n&&i>0)throw new Error(`Non-zero padding: ${i}`);return n&&s>0&&c.push(i>>>0),c}function XV(t){Cp(t);const e=2**8;return{encode:r=>{if(!uT(r))throw new Error("radix.encode input should be Uint8Array");return h7(Array.from(r),e,t)},decode:r=>(hT("radix.decode",r),Uint8Array.from(h7(r,t,e)))}}function QV(t,e=!1){if(Cp(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(U2(8,t)>32||U2(t,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!uT(r))throw new Error("radix2.encode input should be Uint8Array");return f7(Array.from(r),8,t,!e)},decode:r=>(hT("radix2.decode",r),Uint8Array.from(f7(r,t,8,e)))}}const eW=fT(QV(5),pT("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),JV(5),gT("")),tW=t=>fT(XV(58),pT(t),gT("")),PCe=tW("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),rW=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),nW=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Fa(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return nW(t)}catch{return t}}function zo(t){return typeof t=="string"?t:rW(t)||""}function iW(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function mT(t,...e){if(!iW(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function p7(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function sW(t,e){mT(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const vd=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const x3=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);function oW(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function yT(t){return typeof t=="string"&&(t=oW(t)),mT(t),t}let aW=class{clone(){return this._cloneInto()}};function cW(t){const e=n=>t().update(yT(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function bT(t=32){if(vd&&typeof vd.getRandomValues=="function")return vd.getRandomValues(new Uint8Array(t));if(vd&&typeof vd.randomBytes=="function")return vd.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}function lW(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}let uW=class extends aW{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=x3(this.buffer)}update(e){p7(this);const{view:r,buffer:n,blockLen:i}=this;e=yT(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=x3(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){p7(this),sW(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;lW(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=x3(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}};const xg=BigInt(2**32-1),Jb=BigInt(32);function vT(t,e=!1){return e?{h:Number(t&xg),l:Number(t>>Jb&xg)}:{h:Number(t>>Jb&xg)|0,l:Number(t&xg)|0}}function dW(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=vT(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}const hW=(t,e)=>BigInt(t>>>0)<<Jb|BigInt(e>>>0),fW=(t,e,r)=>t>>>r,pW=(t,e,r)=>t<<32-r|e>>>r,gW=(t,e,r)=>t>>>r|e<<32-r,wW=(t,e,r)=>t<<32-r|e>>>r,mW=(t,e,r)=>t<<64-r|e>>>r-32,yW=(t,e,r)=>t>>>r-32|e<<64-r,bW=(t,e)=>e,vW=(t,e)=>t,EW=(t,e,r)=>t<<r|e>>>32-r,CW=(t,e,r)=>e<<r|t>>>32-r,xW=(t,e,r)=>e<<r-32|t>>>64-r,_W=(t,e,r)=>t<<r-32|e>>>64-r;function SW(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const IW=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),$W=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,AW=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),PW=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,TW=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),OW=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Ke={fromBig:vT,split:dW,toBig:hW,shrSH:fW,shrSL:pW,rotrSH:gW,rotrSL:wW,rotrBH:mW,rotrBL:yW,rotr32H:bW,rotr32L:vW,rotlSH:EW,rotlSL:CW,rotlBH:xW,rotlBL:_W,add:SW,add3L:IW,add3H:$W,add4L:AW,add4H:PW,add5H:OW,add5L:TW},[NW,kW]=Ke.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
645771202a","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(t=>BigInt(t))),fc=new Uint32Array(80),pc=new Uint32Array(80);let RW=class extends uW{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:d,Fl:h,Gh:f,Gl:g,Hh:p,Hl:w}=this;return[e,r,n,i,s,o,a,c,l,u,d,h,f,g,p,w]}set(e,r,n,i,s,o,a,c,l,u,d,h,f,g,p,w){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=d|0,this.Fl=h|0,this.Gh=f|0,this.Gl=g|0,this.Hh=p|0,this.Hl=w|0}process(e,r){for(let v=0;v<16;v++,r+=4)fc[v]=e.getUint32(r),pc[v]=e.getUint32(r+=4);for(let v=16;v<80;v++){const E=fc[v-15]|0,I=pc[v-15]|0,_=Ke.rotrSH(E,I,1)^Ke.rotrSH(E,I,8)^Ke.shrSH(E,I,7),A=Ke.rotrSL(E,I,1)^Ke.rotrSL(E,I,8)^Ke.shrSL(E,I,7),P=fc[v-2]|0,y=pc[v-2]|0,O=Ke.rotrSH(P,y,19)^Ke.rotrBH(P,y,61)^Ke.shrSH(P,y,6),S=Ke.rotrSL(P,y,19)^Ke.rotrBL(P,y,61)^Ke.shrSL(P,y,6),k=Ke.add4L(A,S,pc[v-7],pc[v-16]),L=Ke.add4H(k,_,O,fc[v-7],fc[v-16]);fc[v]=L|0,pc[v]=k|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:d,El:h,Fh:f,Fl:g,Gh:p,Gl:w,Hh:m,Hl:b}=this;for(let v=0;v<80;v++){const E=Ke.rotrSH(d,h,14)^Ke.rotrSH(d,h,18)^Ke.rotrBH(d,h,41),I=Ke.rotrSL(d,h,14)^Ke.rotrSL(d,h,18)^Ke.rotrBL(d,h,41),_=d&f^~d&p,A=h&g^~h&w,P=Ke.add5L(b,I,A,kW[v],pc[v]),y=Ke.add5H(P,m,E,_,NW[v],fc[v]),O=P|0,S=Ke.rotrSH(n,i,28)^Ke.rotrBH(n,i,34)^Ke.rotrBH(n,i,39),k=Ke.rotrSL(n,i,28)^Ke.rotrBL(n,i,34)^Ke.rotrBL(n,i,39),L=n&s^n&a^s&a,T=i&o^i&c^o&c;m=p|0,b=w|0,p=f|0,w=g|0,f=d|0,g=h|0,{h:d,l:h}=Ke.add(l|0,u|0,y|0,O|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const C=Ke.add3L(O,k,T);n=Ke.add3H(C,y,S,L),i=C|0}({h:n,l:i}=Ke.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Ke.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Ke.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Ke.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:h}=Ke.add(this.Eh|0,this.El|0,d|0,h|0),{h:f,l:g}=Ke.add(this.Fh|0,this.Fl|0,f|0,g|0),{h:p,l:w}=Ke.add(this.Gh|0,this.Gl|0,p|0,w|0),{h:m,l:b}=Ke.add(this.Hh|0,this.Hl|0,m|0,b|0),this.set(n,i,s,o,a,c,l,u,d,h,f,g,p,w,m,b)}roundClean(){fc.fill(0),pc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const BW=cW(()=>new RW);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Sv=BigInt(0),ET=BigInt(1),DW=BigInt(2);function Iv(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function $v(t){if(!Iv(t))throw new Error("Uint8Array expected")}function _3(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}const LW=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Av(t){$v(t);let e="";for(let r=0;r<t.length;r++)e+=LW[t[r]];return e}function CT(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?Sv:BigInt("0x"+t)}const ia={_0:48,_9:57,A:65,F:70,a:97,f:102};function g7(t){if(t>=ia._0&&t<=ia._9)return t-ia._0;if(t>=ia.A&&t<=ia.F)return t-(ia.A-10);if(t>=ia.a&&t<=ia.f)return t-(ia.a-10)}function xT(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=g7(t.charCodeAt(s)),a=g7(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function MW(t){return CT(Av(t))}function u2(t){return $v(t),CT(Av(Uint8Array.from(t).reverse()))}function _T(t,e){return xT(t.toString(16).padStart(e*2,"0"))}function Xb(t,e){return _T(t,e).reverse()}function sa(t,e,r){let n;if(typeof e=="string")try{n=xT(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(Iv(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}function w7(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];$v(i),e+=i.length}
vendor: 6,458 bytes, line 64
64const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}const S3=t=>typeof t=="bigint"&&Sv<=t;function UW(t,e,r){return S3(t)&&S3(e)&&S3(r)&&e<=t&&t<r}function Q0(t,e,r,n){if(!UW(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function jW(t){let e;for(e=0;t>Sv;t>>=ET,e+=1);return e}const zW=t=>(DW<<BigInt(t-1))-ET,FW={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||Iv(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Pv(t,e,r={}){const n=(i,s,o)=>{const a=FW[s];if(typeof a!="function")throw new Error("invalid validator function");const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+c)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}function m7(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const Vr=BigInt(0),dr=BigInt(1),Rl=BigInt(2),qW=BigInt(3),Qb=BigInt(4),y7=BigInt(5),b7=BigInt(8);function Pr(t,e){const r=t%e;return r>=Vr?r:e+r}function HW(t,e,r){if(e<Vr)throw new Error("invalid exponent, negatives unsupported");if(r<=Vr)throw new Error("invalid modulus");if(r===dr)return Vr;let n=dr;for(;e>Vr;)e&dr&&(n=n*t%r),t=t*t%r,e>>=dr;return n}function lo(t,e,r){let n=t;for(;e-- >Vr;)n*=n,n%=r;return n}function v7(t,e){if(t===Vr)throw new Error("invert: expected non-zero number");if(e<=Vr)throw new Error("invert: expected positive modulus, got "+e);let r=Pr(t,e),n=e,i=Vr,s=dr;for(;r!==Vr;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==dr)throw new Error("invert: does not exist");return Pr(i,e)}function VW(t){const e=(t-dr)/Rl;let r,n,i;for(r=t-dr,n=0;r%Rl===Vr;r/=Rl,n++);for(i=Rl;i<t&&HW(i,e,t)!==t-dr;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const o=(t+dr)/Qb;return function(a,c){const l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error("Cannot find square root");return l}}const s=(r+dr)/Rl;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let c=n,l=o.pow(o.mul(o.ONE,i),r),u=o.pow(a,s),d=o.pow(a,r);for(;!o.eql(d,o.ONE);){if(o.eql(d,o.ZERO))return o.ZERO;let h=1;for(let g=o.sqr(d);h<c&&!o.eql(g,o.ONE);h++)g=o.sqr(g);const f=o.pow(l,dr<<BigInt(c-h-1));l=o.sqr(f),u=o.mul(u,f),d=o.mul(d,l),c=h}return u}}function WW(t){if(t%Qb===qW){const e=(t+dr)/Qb;return function(r,n){const i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(t%b7===y7){const e=(t-y7)/b7;return function(r,n){const i=r.mul(n,Rl),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,Rl),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error("Cannot find square root");return c}}return VW(t)}const KW=(t,e)=>(Pr(t,e)&dr)===dr,ZW=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function GW(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=ZW.reduce((n,i)=>(n[i]="function",n),e);return Pv(t,r)}function YW(t,e,r){if(r<Vr)throw new Error("invalid exponent, negatives unsupported");if(r===Vr)return t.ONE;if(r===dr)return e;let n=t.ONE,i=e;for(;r>Vr;)r&dr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=dr;return n}function JW(t,e){const r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function ST(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function IT(t,e,r=!1,n={}){if(t<=Vr)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:s}=ST(t,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:zW(i),ZERO:Vr,ONE:dr,create:c=>Pr(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Vr<=c&&c<t},is0:c=>c===Vr,isOdd:c=>(c&dr)===dr,neg:c=>Pr(-c,t),eql:(c,l)=>c===l,sqr:c=>Pr(c*c,t),add:(c,l)=>Pr(c+l,t),sub:(c,l)=>Pr(c-l,t),mul:(c,l)=>Pr(c*l,t),pow:(c,l)=>YW(a,c,l),div:(c,l)=>Pr(c*v7(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>v7(c,t),sqrt:n.sqrt||(c=>(o||(o=WW(t)),o(a,c))),invertBatch:c=>JW(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?Xb(c,s):_T(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?u2(c):MW(c)}});return Object.freeze(a)}const E7=BigInt(0),_g=BigInt(1);function I3(t,e){const r=e.negate();return t?r:e}function $T(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function $3(t,e){$T(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function XW(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function QW(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const A3=new WeakMap,AT=new WeakMap;function P3(t){return AT.get(t)||1}function eK(t,e){return{constTimeNegate:I3,hasPrecomputes(r){return P3(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>E7;)n&_g&&(i=i.add(s)),s=s.double(),n>>=_g;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=$3(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){const{windows:s,windowSize:o}=$3(r,e);let a=t.ZERO,c=t.BASE;const l=BigInt(2**r-1),u=2**r,d=BigInt(r);for(let h=0;h<s;h++){const f=h*o;let g=Number(i&l);i>>=d,g>o&&(g-=u,i+=_g);const p=f,w=f+Math.abs(g)-1,m=h%2!==0,b=g<0;g===0?c=c.add(I3(m,n[p])):a=a.add(I3(b,n[w]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){const{windows:o,windowSize:a}=$3(r,e),c=BigInt(2**r-1),l=2**r,u=BigInt(r);for(let d=0;d<o;d++){const h=d*a;if(i===E7)break;let f=Number(i&c);if(i>>=u,f>a&&(f-=l,i+=_g),f===0)continue;let g=n[h+Math.abs(f)-1];f<0&&(g=g.negate()),s=s.add(g)}return s},getPrecomputes(r,n,i){let s=A3.get(n);
vendor: 3,674 bytes, line 64
64return s||(s=this.precomputeWindow(n,r),r!==1&&A3.set(n,i(s))),s},wNAFCached(r,n,i){const s=P3(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=P3(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){$T(n,e),AT.set(r,n),A3.delete(r)}}}function tK(t,e,r,n){if(XW(r,t),QW(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=t.ZERO,s=jW(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o;let u=i;for(let d=l;d>=0;d-=o){c.fill(i);for(let f=0;f<n.length;f++){const g=n[f],p=Number(g>>BigInt(d)&BigInt(a));c[p]=c[p].add(r[f])}let h=i;for(let f=c.length-1,g=i;f>0;f--)g=g.add(c[f]),h=h.add(g);if(u=u.add(h),d!==0)for(let f=0;f<o;f++)u=u.double()}return u}function rK(t){return GW(t.Fp),Pv(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ST(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const $s=BigInt(0),zn=BigInt(1),Sg=BigInt(2),nK=BigInt(8),iK={zip215:!0};function sK(t){const e=rK(t);return Pv(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function oK(t){const e=sK(t),{Fp:r,n,prehash:i,hash:s,randomBytes:o,nByteLength:a,h:c}=e,l=Sg<<BigInt(a*8)-zn,u=r.create,d=IT(e.n,e.nBitLength),h=e.uvRatio||((C,x)=>{try{return{isValid:!0,value:r.sqrt(C*r.inv(x))}}catch{return{isValid:!1,value:$s}}}),f=e.adjustScalarBytes||(C=>C),g=e.domain||((C,x,B)=>{if(_3("phflag",B),x.length||B)throw new Error("Contexts/pre-hash are not supported");return C});function p(C,x){Q0("coordinate "+C,x,$s,l)}function w(C){if(!(C instanceof v))throw new Error("ExtendedPoint expected")}const m=m7((C,x)=>{const{ex:B,ey:R,ez:M}=C,U=C.is0();x==null&&(x=U?nK:r.inv(M));const z=u(B*x),H=u(R*x),Y=u(M*x);if(U)return{x:$s,y:zn};if(Y!==zn)throw new Error("invZ was invalid");return{x:z,y:H}}),b=m7(C=>{const{a:x,d:B}=e;if(C.is0())throw new Error("bad point: ZERO");const{ex:R,ey:M,ez:U,et:z}=C,H=u(R*R),Y=u(M*M),V=u(U*U),G=u(V*V),re=u(H*x),de=u(V*u(re+Y)),ce=u(G+u(B*u(H*Y)));if(de!==ce)throw new Error("bad point: equation left != right (1)");const ae=u(R*M),be=u(U*z);if(ae!==be)throw new Error("bad point: equation left != right (2)");return!0});class v{constructor(x,B,R,M){this.ex=x,this.ey=B,this.ez=R,this.et=M,p("x",x),p("y",B),p("z",R),p("t",M),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(x){if(x instanceof v)throw new Error("extended point not allowed");const{x:B,y:R}=x||{};return p("x",B),p("y",R),new v(B,R,zn,u(B*R))}static normalizeZ(x){const B=r.invertBatch(x.map(R=>R.ez));return x.map((R,M)=>R.toAffine(B[M])).map(v.fromAffine)}static msm(x,B){return tK(v,d,x,B)}_setWindowSize(x){_.setWindowSize(this,x)}assertValidity(){b(this)}equals(x){w(x);const{ex:B,ey:R,ez:M}=this,{ex:U,ey:z,ez:H}=x,Y=u(B*H),V=u(U*M),G=u(R*H),re=u(z*M);return Y===V&&G===re}is0(){return this.equals(v.ZERO)}negate(){return new v(u(-this.ex),this.ey,this.ez,u(-this.et))}double(){const{a:x}=e,{ex:B,ey:R,ez:M}=this,U=u(B*B),z=u(R*R),H=u(Sg*u(M*M)),Y=u(x*U),V=B+R,G=u(u(V*V)-U-z),re=Y+z,de=re-H,ce=Y-z,ae=u(G*de),be=u(re*ce),Ce=u(G*ce),ze=u(de*re);return new v(ae,be,ze,Ce)}add(x){w(x);const{a:B,d:R}=e,{ex:M,ey:U,ez:z,et:H}=this,{ex:Y,ey:V,ez:G,et:re}=x;if(B===BigInt(-1)){const ug=u((U-M)*(V+Y)),fd=u((U+M)*(V-Y)),j0=u(fd-ug);if(j0===$s)return this.double();const dg=u(z*Sg*re),z0=u(H*Sg*G),yl=z0+dg,mi=fd+ug,pd=z0-dg,zm=u(yl*j0),so=u(mi*pd),Fm=u(yl*p
vendor: 11,244 bytes, line 64
64d),j=u(j0*mi);return new v(zm,so,j,Fm)}const de=u(M*Y),ce=u(U*V),ae=u(H*R*re),be=u(z*G),Ce=u((M+U)*(Y+V)-de-ce),ze=be-ae,Qe=be+ae,vt=u(ce-B*de),Qt=u(Ce*ze),$n=u(Qe*vt),ml=u(Ce*vt),jm=u(ze*Qe);return new v(Qt,$n,jm,ml)}subtract(x){return this.add(x.negate())}wNAF(x){return _.wNAFCached(this,x,v.normalizeZ)}multiply(x){const B=x;Q0("scalar",B,zn,n);const{p:R,f:M}=this.wNAF(B);return v.normalizeZ([R,M])[0]}multiplyUnsafe(x,B=v.ZERO){const R=x;return Q0("scalar",R,$s,n),R===$s?I:this.is0()||R===zn?this:_.wNAFCachedUnsafe(this,R,v.normalizeZ,B)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return _.unsafeLadder(this,n).is0()}toAffine(x){return m(this,x)}clearCofactor(){const{h:x}=e;return x===zn?this:this.multiplyUnsafe(x)}static fromHex(x,B=!1){const{d:R,a:M}=e,U=r.BYTES;x=sa("pointHex",x,U),_3("zip215",B);const z=x.slice(),H=x[U-1];z[U-1]=H&-129;const Y=u2(z),V=B?l:r.ORDER;Q0("pointHex.y",Y,$s,V);const G=u(Y*Y),re=u(G-zn),de=u(R*G-M);let{isValid:ce,value:ae}=h(re,de);if(!ce)throw new Error("Point.fromHex: invalid y coordinate");const be=(ae&zn)===zn,Ce=(H&128)!==0;if(!B&&ae===$s&&Ce)throw new Error("Point.fromHex: x=0 and x_0=1");return Ce!==be&&(ae=u(-ae)),v.fromAffine({x:ae,y:Y})}static fromPrivateKey(x){return y(x).point}toRawBytes(){const{x,y:B}=this.toAffine(),R=Xb(B,r.BYTES);return R[R.length-1]|=x&zn?128:0,R}toHex(){return Av(this.toRawBytes())}}v.BASE=new v(e.Gx,e.Gy,zn,u(e.Gx*e.Gy)),v.ZERO=new v($s,zn,zn,$s);const{BASE:E,ZERO:I}=v,_=eK(v,a*8);function A(C){return Pr(C,n)}function P(C){return A(u2(C))}function y(C){const x=r.BYTES;C=sa("private key",C,x);const B=sa("hashed private key",s(C),2*x),R=f(B.slice(0,x)),M=B.slice(x,2*x),U=P(R),z=E.multiply(U),H=z.toRawBytes();return{head:R,prefix:M,scalar:U,point:z,pointBytes:H}}function O(C){return y(C).pointBytes}function S(C=new Uint8Array,...x){const B=w7(...x);return P(s(g(B,sa("context",C),!!i)))}function k(C,x,B={}){C=sa("message",C),i&&(C=i(C));const{prefix:R,scalar:M,pointBytes:U}=y(x),z=S(B.context,R,C),H=E.multiply(z).toRawBytes(),Y=S(B.context,H,U,C),V=A(z+Y*M);Q0("signature.s",V,$s,n);const G=w7(H,Xb(V,r.BYTES));return sa("result",G,r.BYTES*2)}const L=iK;function T(C,x,B,R=L){const{context:M,zip215:U}=R,z=r.BYTES;C=sa("signature",C,2*z),x=sa("message",x),B=sa("publicKey",B,z),U!==void 0&&_3("zip215",U),i&&(x=i(x));const H=u2(C.slice(z,2*z));let Y,V,G;try{Y=v.fromHex(B,U),V=v.fromHex(C.slice(0,z),U),G=E.multiplyUnsafe(H)}catch{return!1}if(!U&&Y.isSmallOrder())return!1;const re=S(M,V.toRawBytes(),Y.toRawBytes(),x);return V.add(Y.multiplyUnsafe(re)).subtract(G).clearCofactor().equals(v.ZERO)}return E._setWindowSize(8),{CURVE:e,getPublicKey:O,sign:k,verify:T,ExtendedPoint:v,utils:{getExtendedPublicKey:y,randomPrivateKey:()=>o(r.BYTES),precompute(C=8,x=v.BASE){return x._setWindowSize(C),x.multiply(BigInt(3)),x}}}}BigInt(0),BigInt(1);const Tv=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),C7=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const aK=BigInt(1),x7=BigInt(2);BigInt(3);const cK=BigInt(5),lK=BigInt(8);function uK(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=Tv,o=t*t%s*t%s,a=lo(o,x7,s)*o%s,c=lo(a,aK,s)*t%s,l=lo(c,cK,s)*c%s,u=lo(l,e,s)*l%s,d=lo(u,r,s)*u%s,h=lo(d,n,s)*d%s,f=lo(h,i,s)*h%s,g=lo(f,i,s)*h%s,p=lo(g,e,s)*l%s;return{pow_p_5_8:lo(p,x7,s)*t%s,b2:o}}function dK(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function hK(t,e){const r=Tv,n=Pr(e*e*e,r),i=Pr(n*n*e,r),s=uK(t*i).pow_p_5_8;let o=Pr(t*n*s,r);const a=Pr(e*o*o,r),c=o,l=Pr(o*C7,r),u=a===t,d=a===Pr(-t,r),h=a===Pr(-t*C7,r);return u&&(o=c),(d||h)&&(o=l),KW(o,r)&&(o=Pr(-o,r)),{isValid:u||d,value:o}}const fK=IT(Tv,void 0,!0),pK={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:fK,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:lK,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:BW,randomBytes:bT,adjustScalarBytes:dK,uvRatio:hK},PT=oK(pK),gK="EdDSA",wK="JWT",j2=".",Yw="base64url",TT="utf8",OT="utf8",mK=":",yK="did",bK="key",_7="base58btc",vK="z",EK="K36",CK=32;function Ov(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function NT(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Ov(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function kT(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));const r=NT(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return Ov(r)}function xK(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var p=0,w=0,m=0,b=g.length;m!==b&&g[m]===0;)m++,p++;for(var v=(b-m)*u+1>>>0,E=new Uint8Array(v);m!==b;){for(var I=g[m],_=0,A=v-1;(I!==0||_<w)&&A!==-1;A--,_++)I+=256*E[A]>>>0,E[A]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");w=_,m++}for(var P=v-w;P!==v&&E[P]===0;)P++;for(var y=c.repeat(p);P<v;++P)y+=t.charAt(E[P]);return y}function h(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var p=0;if(g[p]!==" "){for(var w=0,m=0;g[p]===c;)w++,p++;for(var b=(g.length-p)*l+1>>>0,v=new Uint8Array(b);g[p];){var E=r[g.charCodeAt(p)];if(E===255)return;for(var I=0,_=b-1;(E!==0||I<m)&&_!==-1;_--,I++)E+=a*v[_]>>>0,v[_]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");m=I,p++}if(g[p]!==" "){for(var A=b-m;A!==b&&v[A]===0;)A++;for(var P=new Uint8Array(w+(b-A)),y=w;A!==b;)P[y++]=v[A++];return P}}}function f(g){var p=h(g);if(p)return p;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:h,decode:f}}var _K=xK,SK=_K;const RT=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},IK=t=>new TextEncoder().encode(t),$K=t=>new TextDecoder().decode(t);let AK=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},PK=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return BT(this,e)}},TK=class{constructor(e){this.decoders=e}or(e){return BT(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const BT=(t,e)=>new TK({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let OK=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new AK(e,r,n),this.decoder=new PK(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const Jw=({name:t,prefix:e,encode:r,decode:n})=>new OK(t,e,r,n),xp=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=SK(r,e);return Jw({prefix:t,name:e,encode:n,decode:s=>RT(i(s))})},NK=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const d=i[t[u]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|d,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},kK=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},ln=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Jw({prefix:e,name:t,encode(i){return kK(i,n,r)},decode(i){return NK(i,n,r,t)}}),RK=Jw({prefix:"\0",name:"identity",encode:t=>$K(t),decode:t=>IK(t)});var BK=Object.freeze({__proto__:null,identity:RK});const DK=ln({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var LK=Object.freeze({__proto__:null,base2:DK});const MK=ln({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var UK=Object.freeze({__proto__:null,base8:MK});const jK=xp({prefix:"9",name:"base10",alphabet:"0123456789"});var zK=Object.freeze({__proto__:null,base10:jK});const FK=ln({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),qK=ln({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var HK=Object.freeze({__proto__:null,base16:FK,base16upper:qK});const VK=ln({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),WK=ln({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),KK=ln({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ZK=ln({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),GK=ln({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),YK=ln({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),JK=ln({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),XK=ln({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),QK=ln({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var eZ=Object.freeze({__proto__:null,base32:VK,base32upper:WK,base32pad:KK,base32padupper:ZK,base32hex:GK,base32hexupper:YK,base32hexpad:JK,base32hexpadupper:XK,base32z:QK});const tZ=xp({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),rZ=xp({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var nZ=Object.freeze({__proto__:null,base36:tZ,base36upper:rZ});const iZ=xp({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),sZ=xp({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var oZ=Object.freeze({__proto__:null,base58btc:iZ,base58flickr:sZ});const aZ=ln({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
64+/",bitsPerChar:6}),cZ=ln({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),lZ=ln({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),uZ=ln({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var dZ=Object.freeze({__proto__:null,base64:aZ,base64pad:cZ,base64url:lZ,base64urlpad:uZ});const DT=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),hZ=DT.reduce((t,e,r)=>(t[r]=e,t),[]),fZ=DT.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function pZ(t){return t.reduce((e,r)=>(e+=hZ[r],e),"")}function gZ(t){const e=[];for(const r of t){const n=fZ[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const wZ=Jw({prefix:"🚀",name:"base256emoji",encode:pZ,decode:gZ});var mZ=Object.freeze({__proto__:null,base256emoji:wZ}),yZ=LT,S7=128,bZ=-128,vZ=Math.pow(2,31);function LT(t,e,r){e=e||[],r=r||0;for(var n=r;t>=vZ;)e[r++]=t&255|S7,t/=128;for(;t&bZ;)e[r++]=t&255|S7,t>>>=7;return e[r]=t|0,LT.bytes=r-n+1,e}var EZ=e4,CZ=128,I7=127;function e4(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw e4.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&I7)<<i:(o&I7)*Math.pow(2,i),i+=7}while(o>=CZ);return e4.bytes=s-n,r}var xZ=Math.pow(2,7),_Z=Math.pow(2,14),SZ=Math.pow(2,21),IZ=Math.pow(2,28),$Z=Math.pow(2,35),AZ=Math.pow(2,42),PZ=Math.pow(2,49),TZ=Math.pow(2,56),OZ=Math.pow(2,63),NZ=function(t){return t<xZ?1:t<_Z?2:t<SZ?3:t<IZ?4:t<$Z?5:t<AZ?6:t<PZ?7:t<TZ?8:t<OZ?9:10},kZ={encode:yZ,decode:EZ,encodingLength:NZ},MT=kZ;const $7=(t,e,r=0)=>(MT.encode(t,e,r),e),A7=t=>MT.encodingLength(t),t4=(t,e)=>{const r=e.byteLength,n=A7(t),i=n+A7(r),s=new Uint8Array(i+r);return $7(t,s,0),$7(r,s,n),s.set(e,i),new RZ(t,r,e,s)};let RZ=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const UT=({name:t,code:e,encode:r})=>new BZ(t,e,r);let BZ=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?t4(this.code,r):r.then(n=>t4(this.code,n))}else throw Error("Unknown type, must be binary type")}};const jT=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),DZ=UT({name:"sha2-256",code:18,encode:jT("SHA-256")}),LZ=UT({name:"sha2-512",code:19,encode:jT("SHA-512")});var MZ=Object.freeze({__proto__:null,sha256:DZ,sha512:LZ});const zT=0,UZ="identity",FT=RT,jZ=t=>t4(zT,FT(t)),zZ={code:zT,name:UZ,encode:FT,digest:jZ};var FZ=Object.freeze({__proto__:null,identity:zZ});new TextEncoder,new TextDecoder;const P7={...BK,...LK,...UK,...zK,...HK,...eZ,...nZ,...oZ,...dZ,...mZ};({...MZ,...FZ});function qT(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const T7=qT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),T3=qT("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=NT(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),HT={utf8:T7,"utf-8":T7,hex:P7.base16,latin1:T3,ascii:T3,binary:T3,...P7};function Xw(t,e="utf8"){const r=HT[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}function _0(t,e="utf8"){const r=HT[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Ov(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function O7(t){return Fa(Xw(_0(t,Yw),TT))}function z2(t){return Xw(_0(zo(t),TT),Yw)}function Nv(t){const e=_0(EK,_7),r=vK+Xw(kT([e,t]),_7);return[yK,bK,r].join(mK)}function qZ(t){return Xw(t,Yw)}function HZ(t){return _0(t,Yw)}function VZ(t){return _0([z2(t.header),z2(t.payload)].join(j2),OT)}function WZ(t){return[z2(t.header),z2(t.payload),qZ(t.signature)].join(j2)}function kh(t){const e=t.split(j2),r=O7(e[0]),n=O7(e[1]),i=HZ(e[2]),s=_0(e.slice(0,2).join(j2),OT);return{header:r,payload:n,signature:i,data:s}}function F2(t=bT(CK)){const e=PT.getPublicKey(t);return{secretKey:kT([t,e]),publicKey:e}}async function VT(t,e,r,n,i=X.fromMiliseconds(Date.now())){const s={alg:gK,typ:wK},o=Nv(n.publicKey),a=i+r,c={iss:o,sub:t,aud:e,iat:i,exp:a},l=VZ({header:s,payload:c}),u=PT.sign(l,n.secretKey.slice(0,32));return WZ({header:s,payload:c,signature:u})}function kv(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function WT(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?
vendor: 7,125 bytes, line 64
64kv(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function jf(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));const r=WT(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return kv(r)}function KZ(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var p=0,w=0,m=0,b=g.length;m!==b&&g[m]===0;)m++,p++;for(var v=(b-m)*u+1>>>0,E=new Uint8Array(v);m!==b;){for(var I=g[m],_=0,A=v-1;(I!==0||_<w)&&A!==-1;A--,_++)I+=256*E[A]>>>0,E[A]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");w=_,m++}for(var P=v-w;P!==v&&E[P]===0;)P++;for(var y=c.repeat(p);P<v;++P)y+=t.charAt(E[P]);return y}function h(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var p=0;if(g[p]!==" "){for(var w=0,m=0;g[p]===c;)w++,p++;for(var b=(g.length-p)*l+1>>>0,v=new Uint8Array(b);g[p];){var E=r[g.charCodeAt(p)];if(E===255)return;for(var I=0,_=b-1;(E!==0||I<m)&&_!==-1;_--,I++)E+=a*v[_]>>>0,v[_]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");m=I,p++}if(g[p]!==" "){for(var A=b-m;A!==b&&v[A]===0;)A++;for(var P=new Uint8Array(w+(b-A)),y=w;A!==b;)P[y++]=v[A++];return P}}}function f(g){var p=h(g);if(p)return p;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:h,decode:f}}var ZZ=KZ,GZ=ZZ;const YZ=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},JZ=t=>new TextEncoder().encode(t),XZ=t=>new TextDecoder().decode(t);class QZ{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class eG{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return KT(this,e)}}class tG{constructor(e){this.decoders=e}or(e){return KT(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const KT=(t,e)=>new tG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class rG{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new QZ(e,r,n),this.decoder=new eG(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Qw=({name:t,prefix:e,encode:r,decode:n})=>new rG(t,e,r,n),_p=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=GZ(r,e);return Qw({prefix:t,name:e,encode:n,decode:s=>YZ(i(s))})},nG=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const d=i[t[u]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|d,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},iG=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},un=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Qw({prefix:e,name:t,encode(i){return iG(i,n,r)},decode(i){return nG(i,n,r,t)}}),sG=Qw({prefix:"\0",name:"identity",encode:t=>XZ(t),decode:t=>JZ(t)}),oG=Object.freeze(Object.defineProperty({__proto__:null,identity:sG},Symbol.toStringTag,{value:"Module"})),aG=un({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),cG=Object.freeze(Object.defineProperty({__proto__:null,base2:aG},Symbol.toStringTag,{value:"Module"})),lG=un({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),uG=Object.freeze(Object.defineProperty({__proto__:null,base8:lG},Symbol.toStringTag,{value:"Module"})),dG=_p({prefix:"9",name:"base10",alphabet:"0123456789"}),hG=Object.freeze(Object.defineProperty({__proto__:null,base10:dG},Symbol.toStringTag,{value:"Module"})),fG=un({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),pG=un({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),gG=Object.freeze(Object.defineProperty({__proto__:null,base16:fG,base16upper:pG},Symbol.toStringTag,{value:"Module"})),wG=un({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),mG=un({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),yG=un({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),bG=un({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vG=un({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),EG=un({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),CG=un({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),xG=un({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),_G=un({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),SG=Object.freeze(Object.defineProperty({__proto__:null,base32:wG,base32hex:vG,base32hexpad:CG,base32hexpadupper:xG,base32hexupper:EG,base32pad:yG,base32padupper:bG,base32upper:mG,base32z:_G},Symbol.toStringTag,{value:"Module"})),IG=_p({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),$G=_p({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),AG=Object.freeze(Object.defineProperty({__proto__:null,base36:IG,base36upper:$G},Symbol.toStringTag,{value:"Module"})),PG=_p({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),TG=_p({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),OG=Object.freeze(Object.defineProperty({__proto__:null,base58btc:PG,base58flickr:TG},Symbol.toStringTag,{value:"Module"})),NG=un({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
64+/",bitsPerChar:6}),kG=un({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),RG=un({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),BG=un({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),DG=Object.freeze(Object.defineProperty({__proto__:null,base64:NG,base64pad:kG,base64url:RG,base64urlpad:BG},Symbol.toStringTag,{value:"Module"})),ZT=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),LG=ZT.reduce((t,e,r)=>(t[r]=e,t),[]),MG=ZT.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function UG(t){return t.reduce((e,r)=>(e+=LG[r],e),"")}function jG(t){const e=[];for(const r of t){const n=MG[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const zG=Qw({prefix:"🚀",name:"base256emoji",encode:UG,decode:jG}),FG=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:zG},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Rh={...oG,...cG,...uG,...hG,...gG,...SG,...AG,...OG,...DG,...FG};function GT(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const N7=GT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),O3=GT("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=WT(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),YT={utf8:N7,"utf-8":N7,hex:Rh.base16,latin1:O3,ascii:O3,binary:O3,...Rh};function us(t,e="utf8"){const r=YT[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?kv(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function li(t,e="utf8"){const r=YT[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}const JT={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}};var N3,k7;function XT(){if(k7)return N3;k7=1;const t="Input must be an string, Buffer or Uint8Array";function e(o){let a;if(o instanceof Uint8Array)a=o;
vendor: 6,993 bytes, lines 64-66
64else if(typeof o=="string")a=new TextEncoder().encode(o);else throw new Error(t);return a}function r(o){return Array.prototype.map.call(o,function(a){return(a<16?"0":"")+a.toString(16)}).join("")}function n(o){return(4294967296+o).toString(16).substring(1)}function i(o,a,c){let l=`
65`+o+" = ";for(let u=0;u<a.length;u+=2){if(c===32)l+=n(a[u]).toUpperCase(),l+=" ",l+=n(a[u+1]).toUpperCase();else if(c===64)l+=n(a[u+1]).toUpperCase(),l+=n(a[u]).toUpperCase();else throw new Error("Invalid size "+c);u%6===4?l+=`
66`+new Array(o.length+4).join(" "):u<a.length-2&&(l+=" ")}console.log(l)}function s(o,a,c){let l=new Date().getTime();const u=new Uint8Array(a);for(let h=0;h<a;h++)u[h]=h%256;const d=new Date().getTime();console.log("Generated random input in "+(d-l)+"ms"),l=d;for(let h=0;h<c;h++){const f=o(u),g=new Date().getTime(),p=g-l;l=g,console.log("Hashed in "+p+"ms: "+f.substring(0,20)+"..."),console.log(Math.round(a/(1<<20)/(p/1e3)*100)/100+" MB PER SECOND")}}return N3={normalizeInput:e,toHex:r,debugPrint:i,testSpeed:s},N3}var k3,R7;function qG(){if(R7)return k3;R7=1;const t=XT();function e(m,b,v){const E=m[b]+m[v];let I=m[b+1]+m[v+1];E>=4294967296&&I++,m[b]=E,m[b+1]=I}function r(m,b,v,E){let I=m[b]+v;v<0&&(I+=4294967296);let _=m[b+1]+E;I>=4294967296&&_++,m[b]=I,m[b+1]=_}function n(m,b){return m[b]^m[b+1]<<8^m[b+2]<<16^m[b+3]<<24}function i(m,b,v,E,I,_){const A=l[I],P=l[I+1],y=l[_],O=l[_+1];e(c,m,b),r(c,m,A,P);let S=c[E]^c[m],k=c[E+1]^c[m+1];c[E]=k,c[E+1]=S,e(c,v,E),S=c[b]^c[v],k=c[b+1]^c[v+1],c[b]=S>>>24^k<<8,c[b+1]=k>>>24^S<<8,e(c,m,b),r(c,m,y,O),S=c[E]^c[m],k=c[E+1]^c[m+1],c[E]=S>>>16^k<<16,c[E+1]=k>>>16^S<<16,e(c,v,E),S=c[b]^c[v],k=c[b+1]^c[v+1],c[b]=k>>>31^S<<1,c[b+1]=S>>>31^k<<1}const s=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],a=new Uint8Array(o.map(function(m){return m*2})),c=new Uint32Array(32),l=new Uint32Array(32);function u(m,b){let v=0;for(v=0;v<16;v++)c[v]=m.h[v],c[v+16]=s[v];for(c[24]=c[24]^m.t,c[25]=c[25]^m.t/4294967296,b&&(c[28]=~c[28],c[29]=~c[29]),v=0;v<32;v++)l[v]=n(m.b,4*v);for(v=0;v<12;v++)i(0,8,16,24,a[v*16+0],a[v*16+1]),i(2,10,18,26,a[v*16+2],a[v*16+3]),i(4,12,20,28,a[v*16+4],a[v*16+5]),i(6,14,22,30,a[v*16+6],a[v*16+7]),i(0,10,20,30,a[v*16+8],a[v*16+9]),i(2,12,22,24,a[v*16+10],a[v*16+11]),i(4,14,16,26,a[v*16+12],a[v*16+13]),i(6,8,18,28,a[v*16+14],a[v*16+15]);for(v=0;v<16;v++)m.h[v]=m.h[v]^c[v]^c[v+16]}const d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function h(m,b,v,E){if(m===0||m>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(b&&b.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(v&&v.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(E&&E.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const I={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:m};d.fill(0),d[0]=m,b&&(d[1]=b.length),d[2]=1,d[3]=1,v&&d.set(v,32),E&&d.set(E,48);for(let _=0;_<16;_++)I.h[_]=s[_]^n(d,_*4);return b&&(f(I,b),I.c=128),I}function f(m,b){for(let v=0;v<b.length;v++)m.c===128&&(m.t+=m.c,u(m,!1),m.c=0),m.b[m.c++]=b[v]}function g(m){for(m.t+=m.c;m.c<128;)m.b[m.c++]=0;u(m,!0);const b=new Uint8Array(m.outlen);for(let v=0;v<m.outlen;v++)b[v]=m.h[v>>2]>>8*(v&3);return b}function p(m,b,v,E,I){v=v||64,m=t.normalizeInput(m),E&&(E=t.normalizeInput(E)),I&&(I=t.normalizeInput(I));const _=h(v,b,E,I);return f(_,m),g(_)}function w(m,b,v,E,I){const _=p(m,b,v,E,I);return t.toHex(_)}return k3={blake2b:p,blake2bHex:w,blake2bInit:h,blake2bUpdate:f,blake2bFinal:g},k3}var R3,B7;function HG(){if(B7)return R3;B7=1;const t=XT();function e(g,p){return g[p]^g[p+1]<<8^g[p+2]<<16^g[p+3]<<24}function r(g,p,w,m,b,v){o[g]=o[g]+o[p]+b,o[m]=n(o[m]^o[g],16),o[w]=o[w]+o[m],o[p]=n(o[p]^o[w],12),o[g]=o[g]+o[p]+v,o[m]=n(o[m]^o[g],8),o[w]=o[w]+o[m],o[p]=n(o[p]^o[w],7)}function n(g,p){return g>>>p^g<<32-p}const i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),o=new Uint32Array(16),a=new Uint32Array(16);function c(g,p){let w=0;for(w=0;w<8;w++)o[w]=g.h[w],o[w+8]=i[w];for(o[12]^=g.t,o[13]^=g.t/4294967296,p&&(o[14]=~o[14]),w=0;w<16;w++)a[w]=e(g.b,4*w);for(w=0;w<10;w++)r(0,4,8,12,a[s[w*16+0]],a[s[w*16+1]]),r(1,5,9,13,a[s[w*16+2]],a[s[w*16+3]]),r(2,6,10,14,a[s[w*16+4]],a[s[w*16+5]]),r(3,7,11,15,a[s[w*16+6]],a[s[w*16+7]]),r(0,5,10,15,a[s[w*16+8]],a[s[w*16+9]]),r(1,6,11,12,a[s[w*16+10]],a[s[w*16+11]]),r(2,7,8,13,a[s[w*16+12]],a[s[w*16+13]]),r(3,4,9,14,a[s[w*16+14]],a[s[w*16+15]]);for(w=0;w<8;w++)g.h[w]^=o[w]^o[w+8]}function l(g,p){if(!(g>0&&g<=32))throw new Error("Incorrect output length, should be in [1, 32]");const w=p?p.length:0;if(p&&!(w>0&&w<=32))throw new Error("Incorrect key length, should be in [1, 32]");const m={h:new Uint32Array(i),b:new Uint8Array(64),c:0,t:0,outlen:g};return m.h[0]^=16842752^w<<8^g,w>0&&(u(m,p),m.c=64),m}function u(g,p){for(let w=0;w<p.length;w++)g.c===64&&(g.t+=g.c,c(g,!1),g.c=0),g.b[g.c++]=p[w]}function d(g){for(g.t+=g.c;g.c<64;)g.b[g.c++]=0;c(g,!0);const p=new Uint8Array(g.outlen);for(let w=0;w<g.outlen;w++)p[w]=g.h[w>>2]>>8*(w&3)&255;return p}function h(g,p,w){w=w||32,g=t.normalizeInput(g);const m=l(w,p);return u(m,g),d(m)}function f(g,p,w){const m=h(g,p,w);return t.toHex(m)}return R3={blake2s:h,blake2sHex:f,blake2sInit:l,blake2sUpdate:u,blake2sFinal:d},R3}var B3,D7;function VG(){if(D7)return B3;D7=1;const t=qG(),e=HG();return B3={blake2b:t.blake2b,blake2bHex:t.blake2bHex,blake2bInit:t.blake2bInit,blake2bUpdate:t.blake2bUpdate,blake2bFinal:t.blake2bFinal,blake2s:e.blake2s,blake2sHex:e.blake2sHex,blake2sInit:e.blake2sInit,blake2sUpdate:e.blake2sUpdate,blake2sFinal:e.blake2sFinal},B3}var WG=VG(),KG={};const ZG=":";function mh(t){const[e,r]=t.split(ZG);return{namespace:e,reference:r}}function UCe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];
66r.push(...i.accounts)}),r}function QT(t,e){return t.includes(":")?[t]:e.chains||[]}var GG=Object.defineProperty,YG=Object.defineProperties,JG=Object.getOwnPropertyDescriptors,L7=Object.getOwnPropertySymbols,XG=Object.prototype.hasOwnProperty,QG=Object.prototype.propertyIsEnumerable,r4=(t,e,r)=>e in t?GG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,M7=(t,e)=>{for(var r in e||(e={}))XG.call(e,r)&&r4(t,r,e[r]);if(L7)for(var r of L7(e))QG.call(e,r)&&r4(t,r,e[r]);return t},eY=(t,e)=>YG(t,JG(e)),U7=(t,e,r)=>r4(t,typeof e!="symbol"?e+"":e,r);const tY="ReactNative",$i={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},rY="js";function q2(){return typeof sr<"u"&&typeof sr.versions<"u"&&typeof sr.versions.node<"u"}function ol(){return!Zr.getDocument()&&!!Zr.getNavigator()&&navigator.product===tY}function nY(){return ol()&&typeof he<"u"&&typeof(he==null?void 0:he.Platform)<"u"&&(he==null?void 0:he.Platform.OS)==="android"}function iY(){return ol()&&typeof he<"u"&&typeof(he==null?void 0:he.Platform)<"u"&&(he==null?void 0:he.Platform.OS)==="ios"}function S0(){return!q2()&&!!Zr.getNavigator()&&!!Zr.getDocument()}function Sp(){return ol()?$i.reactNative:q2()?$i.node:S0()?$i.browser:$i.unknown}function j7(){var t;try{return ol()&&typeof he<"u"&&typeof(he==null?void 0:he.Application)<"u"?(t=he.Application)==null?void 0:t.applicationId:void 0}catch{return}}function sY(t,e){const r=new URLSearchParams(t);for(const n of Object.keys(e).sort())if(e.hasOwnProperty(n)){const i=e[n];i!==void 0&&r.set(n,i)}return r.toString()}function oY(t){var e,r;const n=eO();try{return t!=null&&t.url&&n.url&&new URL(t.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),t.url=n.url),(e=t==null?void 0:t.icons)!=null&&e.length&&t.icons.length>0&&(t.icons=t.icons.filter(i=>i!=="")),eY(M7(M7({},n),t),{url:(t==null?void 0:t.url)||n.url,name:(t==null?void 0:t.name)||n.name,description:(t==null?void 0:t.description)||n.description,icons:(r=t==null?void 0:t.icons)!=null&&r.length&&t.icons.length>0?t.icons:n.icons})}catch(i){return console.warn("Error populating app metadata",i),t||n}}function eO(){return _P.getWindowMetadata()||{name:"",description:"",url:"",icons:[""]}}function aY(){if(Sp()===$i.reactNative&&typeof he<"u"&&typeof(he==null?void 0:he.Platform)<"u"){const{OS:r,Version:n}=he.Platform;return[r,n].join("-")}const t=vP();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function cY(){var t;const e=Sp();return e===$i.browser?[e,((t=Zr.getLocation())==null?void 0:t.host)||"unknown"].join(":"):e}function tO(t,e,r){const n=aY(),i=cY();return[[t,e].join("-"),[rY,r].join("-"),n,i].join("/")}function lY({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a,packageName:c}){const l=r.split("?"),u=tO(t,e,n),d={auth:i,ua:u,projectId:s,useOnCloseEvent:o,packageName:c||void 0,bundleId:a||void 0},h=sY(l[1]||"",d);return l[0]+"?"+h}function Zl(t,e){return t.filter(r=>e.includes(r)).length===t.length}function n4(t){return Object.fromEntries(t.entries())}function i4(t){return new Map(Object.entries(t))}function Pl(t=X.FIVE_MINUTES,e){const r=X.toMiliseconds(t||X.FIVE_MINUTES);let n,i,s,o;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a),o=Promise.resolve(a))},reject:a=>{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,c)=>{if(o)return a(o);s=setTimeout(()=>{const l=new Error(e);o=Promise.reject(l),c(l)},r),n=a,i=c})}}function zc(t,e,r){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(r)),e);try{const o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function rO(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function uY(t){return rO("topic",t)}function dY(t){return rO("id",t)}function nO(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function $r(t,e){return X.fromMiliseconds(Date.now()+X.toMiliseconds(t))}function Nc(t){return Date.now()>=X.toMiliseconds(t)}function xt(t,e){return`${t}${e?`:${e}`:""}`}function ko(t=[],e=[]){return[...new Set([...t,...e])]}async function hY({id:t,topic:e,wcDeepLink:r}){var n;try{if(!r)return;const i=typeof r=="string"?JSON.parse(r):r,s=i==null?void 0:i.href;
vendor: 13,846 bytes, line 66
66if(typeof s!="string")return;const o=fY(s,t,e),a=Sp();if(a===$i.browser){if(!((n=Zr.getDocument())!=null&&n.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}pY(o)}else a===$i.reactNative&&typeof(he==null?void 0:he.Linking)<"u"&&await he.Linking.openURL(o)}catch(i){console.error(i)}}function fY(t,e,r){const n=`requestId=${e}&sessionTopic=${r}`;t.endsWith("/")&&(t=t.slice(0,-1));let i=`${t}`;if(t.startsWith("https://t.me")){const s=t.includes("?")?"&startapp=":"?startapp=";i=`${i}${s}${yY(n,!0)}`}else i=`${i}/wc?${n}`;return i}function pY(t){let e="_self";mY()?e="_top":(wY()||t.startsWith("https://")||t.startsWith("http://"))&&(e="_blank"),window.open(t,e,"noreferrer noopener")}async function gY(t,e){let r="";try{if(S0()&&(r=localStorage.getItem(e),r))return r;r=await t.getItem(e)}catch(n){console.error(n)}return r}function z7(t,e){if(!t.includes(e))return null;const r=t.split(/([&,?,=])/),n=r.indexOf(e);return r[n+2]}function F7(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function Rv(){return typeof sr<"u"&&KG.IS_VITEST==="true"}function wY(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function mY(){try{return window.self!==window.top}catch{return!1}}function yY(t,e=!1){const r=Oe.from(t).toString("base64");return e?r.replace(/[=]/g,""):r}function iO(t){return Oe.from(t,"base64").toString("utf-8")}function bY(t){return new Promise(e=>setTimeout(e,t))}let vY=class{constructor({limit:e}){U7(this,"limit"),U7(this,"set"),this.limit=e,this.set=new Set}add(e){if(!this.set.has(e)){if(this.set.size>=this.limit){const r=this.set.values().next().value;r&&this.set.delete(r)}this.set.add(e)}}has(e){return this.set.has(e)}};const Ig=BigInt(2**32-1),q7=BigInt(32);function sO(t,e=!1){return e?{h:Number(t&Ig),l:Number(t>>q7&Ig)}:{h:Number(t>>q7&Ig)|0,l:Number(t&Ig)|0}}function oO(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=sO(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const H7=(t,e,r)=>t>>>r,V7=(t,e,r)=>t<<32-r|e>>>r,kc=(t,e,r)=>t>>>r|e<<32-r,Rc=(t,e,r)=>t<<32-r|e>>>r,xf=(t,e,r)=>t<<64-r|e>>>r-32,_f=(t,e,r)=>t>>>r-32|e<<64-r,EY=(t,e)=>e,CY=(t,e)=>t,xY=(t,e,r)=>t<<r|e>>>32-r,_Y=(t,e,r)=>e<<r|t>>>32-r,SY=(t,e,r)=>e<<r-32|t>>>64-r,IY=(t,e,r)=>t<<r-32|e>>>64-r;function Ms(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const Bv=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Dv=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,$Y=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),AY=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,PY=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),TY=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Ed=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Lv(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function qa(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function ps(t,...e){if(!Lv(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Mv(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");qa(t.outputLen),qa(t.blockLen)}function tl(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Uv(t,e){ps(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function N1(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function gs(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function D3(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function uo(t,e){return t<<32-e|t>>>e}const aO=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function cO(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const ya=aO?t=>t:t=>cO(t);function OY(t){for(let e=0;e<t.length;e++)t[e]=cO(t[e]);return t}const Bc=aO?t=>t:OY,lO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",NY=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function k1(t){if(ps(t),lO)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=NY[t[r]];return e}const oa={_0:48,_9:57,A:65,F:70,a:97,f:102};function W7(t){if(t>=oa._0&&t<=oa._9)return t-oa._0;if(t>=oa.A&&t<=oa.F)return t-(oa.A-10);if(t>=oa.a&&t<=oa.f)return t-(oa.a-10)}function jv(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(lO)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=W7(t.charCodeAt(s)),a=W7(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function kY(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Vs(t){return typeof t=="string"&&(t=kY(t)),ps(t),t}function Gl(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];ps(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let em=class{};function Ip(t){const e=n=>t().update(Vs(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function RY(t){const e=(n,i)=>t(i).update(Vs(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function I0(t=32){if(Ed&&typeof Ed.getRandomValues=="function")return Ed.getRandomValues(new Uint8Array(t));if(Ed&&typeof Ed.randomBytes=="function")return Uint8Array.from(Ed.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const BY=BigInt(0),ef=BigInt(1),DY=BigInt(2),LY=BigInt(7),MY=BigInt(256),UY=BigInt(113),uO=[],dO=[],hO=[];for(let t=0,e=ef,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],uO.push(2*(5*n+r)),dO.push((t+1)*(t+2)/2%64);let i=BY;for(let s=0;s<7;s++)e=(e<<ef^(e>>LY)*UY)%MY,e&DY&&(i^=ef<<(ef<<BigInt(s))-ef);hO.push(i)}const fO=oO(hO,!0),jY=fO[0],zY=fO[1],K7=(t,e,r)=>r>32?SY(t,e,r):xY(t,e,r),Z7=(t,e,r)=>r>32?IY(t,e,r):_Y(t,e,r);function FY(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=K7(l,u,1)^r[a],h=Z7(l,u,1)^r[a+1];for(let f=0;f<50;f+=10)t[o+f]^=d,t[o+f+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=dO[o],c=K7(i,s,a),l=Z7(i,s,a),u=uO[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=jY[n],t[1]^=zY[n]}gs(r)}let qY=class pO extends em{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,qa(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=N1(this.state)}clone(){return this._cloneInto()}keccak(){Bc(this.state32),FY(this.state32,this.rounds),Bc(this.state32),this.posOut=0,this.pos=0}update(e){tl(this),e=Vs(e),ps(e);const{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){tl(this,!1),ps(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return qa(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Uv(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,gs(this.state)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new pO(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const HY=(t,e,r)=>Ip(()=>new qY(e,t,r)),VY=HY(1,136,256/8);function WY(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function KY(t,e,r){return t&e^~t&r}function ZY(t,e,r){return t&e^t&r^e&r}let gO=class extends em{constructor(e,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=D3(this.buffer)}update(e){tl(this),e=Vs(e),ps(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=D3(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){tl(this),Uv(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,gs(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;WY(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=D3(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=a,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}};const gc=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pn=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),gn=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),GY=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]),wc=new Uint32Array(64);let YY=class extends gO{constructor(e=32){super(64,e,8,!1),this.A=gc[0]|0,this.B=gc[1]|0,this.C=gc[2]|0,this.D=gc[3]|0,this.E=gc[4]|0,this.F=gc[5]|0,this.G=gc[6]|0,this.H=gc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)wc[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=wc[d-15],f=wc[d-2],g=uo(h,7)^uo(h,18)^h>>>3,p=uo(f,17)^uo(f,19)^f>>>10;wc[d]=p+wc[d-7]+g+wc[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=uo(a,6)^uo(a,11)^uo(a,25),f=u+h+KY(a,c,l)+GY[d]+wc[d]|0,g=(uo(n,2)^uo(n,13)^uo(n,22))+ZY(n,i,s)|0;u=l,l=c,c=a,a=o+f|0,o=s,s=i,i=n,n=f+g|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){gs(wc)}destroy(){this.set(0,0,0,0,0,0,0,0),gs(this.buffer)}};const wO=oO(["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
665771202a","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(t=>BigInt(t))),JY=wO[0],XY=wO[1],mc=new Uint32Array(80),yc=new Uint32Array(80);let zv=class extends gO{constructor(e=64){super(128,e,16,!1),this.Ah=gn[0]|0,this.Al=gn[1]|0,this.Bh=gn[2]|0,this.Bl=gn[3]|0,this.Ch=gn[4]|0,this.Cl=gn[5]|0,this.Dh=gn[6]|0,this.Dl=gn[7]|0,this.Eh=gn[8]|0,this.El=gn[9]|0,this.Fh=gn[10]|0,this.Fl=gn[11]|0,this.Gh=gn[12]|0,this.Gl=gn[13]|0,this.Hh=gn[14]|0,this.Hl=gn[15]|0}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:d,Fl:h,Gh:f,Gl:g,Hh:p,Hl:w}=this;return[e,r,n,i,s,o,a,c,l,u,d,h,f,g,p,w]}set(e,r,n,i,s,o,a,c,l,u,d,h,f,g,p,w){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=d|0,this.Fl=h|0,this.Gh=f|0,this.Gl=g|0,this.Hh=p|0,this.Hl=w|0}process(e,r){for(let v=0;v<16;v++,r+=4)mc[v]=e.getUint32(r),yc[v]=e.getUint32(r+=4);for(let v=16;v<80;v++){const E=mc[v-15]|0,I=yc[v-15]|0,_=kc(E,I,1)^kc(E,I,8)^H7(E,I,7),A=Rc(E,I,1)^Rc(E,I,8)^V7(E,I,7),P=mc[v-2]|0,y=yc[v-2]|0,O=kc(P,y,19)^xf(P,y,61)^H7(P,y,6),S=Rc(P,y,19)^_f(P,y,61)^V7(P,y,6),k=$Y(A,S,yc[v-7],yc[v-16]),L=AY(k,_,O,mc[v-7],mc[v-16]);mc[v]=L|0,yc[v]=k|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:d,El:h,Fh:f,Fl:g,Gh:p,Gl:w,Hh:m,Hl:b}=this;for(let v=0;v<80;v++){const E=kc(d,h,14)^kc(d,h,18)^xf(d,h,41),I=Rc(d,h,14)^Rc(d,h,18)^_f(d,h,41),_=d&f^~d&p,A=h&g^~h&w,P=PY(b,I,A,XY[v],yc[v]),y=TY(P,m,E,_,JY[v],mc[v]),O=P|0,S=kc(n,i,28)^xf(n,i,34)^xf(n,i,39),k=Rc(n,i,28)^_f(n,i,34)^_f(n,i,39),L=n&s^n&a^s&a,T=i&o^i&c^o&c;m=p|0,b=w|0,p=f|0,w=g|0,f=d|0,g=h|0,{h:d,l:h}=Ms(l|0,u|0,y|0,O|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const C=Bv(O,k,T);n=Dv(C,y,S,L),i=C|0}({h:n,l:i}=Ms(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Ms(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Ms(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Ms(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:h}=Ms(this.Eh|0,this.El|0,d|0,h|0),{h:f,l:g}=Ms(this.Fh|0,this.Fl|0,f|0,g|0),{h:p,l:w}=Ms(this.Gh|0,this.Gl|0,p|0,w|0),{h:m,l:b}=Ms(this.Hh|0,this.Hl|0,m|0,b|0),this.set(n,i,s,o,a,c,l,u,d,h,f,g,p,w,m,b)}roundClean(){gs(mc,yc)}destroy(){gs(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},QY=class extends zv{constructor(){super(48),this.Ah=pn[0]|0,this.Al=pn[1]|0,this.Bh=pn[2]|0,this.Bl=pn[3]|0,this.Ch=pn[4]|0,this.Cl=pn[5]|0,this.Dh=pn[6]|0,this.Dl=pn[7]|0,this.Eh=pn[8]|0,this.El=pn[9]|0,this.Fh=pn[10]|0,this.Fl=pn[11]|0,this.Gh=pn[12]|0,this.Gl=pn[13]|0,this.Hh=pn[14]|0,this.Hl=pn[15]|0}};const wn=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);let eJ=class extends zv{constructor(){super(32),this.Ah=wn[0]|0,this.Al=wn[1]|0,this.Bh=wn[2]|0,this.Bl=wn[3]|0,this.Ch=wn[4]|0,this.Cl=wn[5]|0,this.Dh=wn[6]|0,this.Dl=wn[7]|0,this.Eh=wn[8]|0,this.El=wn[9]|0,this.Fh=wn[10]|0,this.Fl=wn[11]|0,this.Gh=wn[12]|0,this.Gl=wn[13]|0,this.Hh=wn[14]|0,this.Hl=wn[15]|0}};const tm=Ip(()=>new YY),tJ=Ip(()=>new zv),rJ=Ip(()=>new QY),nJ=Ip(()=>new eJ),iJ=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),_r=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),me=new Uint32Array(32);function bc(t,e,r,n,i,s){const o=i[s],a=i[s+1];let c=me[2*t],l=me[2*t+1],u=me[2*e],d=me[2*e+1],h=me[2*r],f=me[2*r+1],g=me[2*n],p=me[2*n+1],w=Bv(c,u,o);l=Dv(w,l,d,a),c=w|0,{Dh:p,Dl:g}={Dh:p^l,Dl:g^c},{Dh:p,Dl:g}={Dh:EY(p,g),Dl:CY(p)},{h:f,l:h}=Ms(f,h,p,g),{Bh:d,Bl:u}={Bh:d^f,Bl:u^h},{Bh:d,Bl:u}={Bh:kc(d,u,24),Bl:Rc(d,u,24)},me[2*t]=c,me[2*t+1]=l,me[2*e]=u,me[2*e+1]=d,me[2*r]=h,me[2*r+1]=f,me[2*n]=g,me[2*n+1]=p}function vc(t,e,r,n,i,s){const o=i[s],a=i[s+1];let c=me[2*t],l=me[2*t+1],u=me[2*e],d=me[2*e+1],h=me[2*r],f=me[2*r+1],g=me[2*n],p=me[2*n+1],w=Bv(c,u,o);l=Dv(w,l,d,a),c=w|0,{Dh:p,Dl:g}={Dh:p^l,Dl:g^c},{Dh:p,Dl:g}={Dh:kc(p,g,16),Dl:Rc(p,g,16)},{h:f,l:h}=Ms(f,h,p,g),{Bh:d,Bl:u}={Bh:d^f,Bl:u^h},{Bh:d,Bl:u}={Bh:xf(d,u,63),Bl:_f(d,u,63)},me[2*t]=c,me[2*t+1]=l,me[2*e]=u,me[2*e+1]=d,me[2*r]=h,me[2*r+1]=f,me[2*n]=g,me[2*n+1]=p}function sJ(t,e={},r,n,i){if(qa(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");const{key:s,salt:o,personalization:a}=e;if(s!==void 0&&(s.length<1||s.length>r))throw new Error("key length must be undefined or 1.."+r);if(o!==void 0&&o.length!==n)throw new Error("salt must be undefined or "+n);if(a!==void 0&&a.length!==i)throw new Error("personalization must be undefined or "+i)}class oJ extends em{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,qa(e),qa(r),this.blockLen=e,this.outputLen=r,this.buffer=new Uint8Array(e),this.buffer32=N1(this.buffer)}update(e){tl(this),e=Vs(e),ps(e);const{blockLen:r,buffer:n,buffer32:i}=this,s=e.length,o=e.byteOffset,a=e.buffer;for(let c=0;c<s;){this.pos===r&&(Bc(i),this.compress(i,0,!1),Bc(i),this.pos=0);const l=Math.min(r-this.pos,s-c),u=o+c;if(l===r&&!(u%4)&&c+l<s){const d=new Uint32Array(a,u,Math.floor((s-c)/4));Bc(d);for(let h=0;c+r<s;h+=i.length,c+=r)this.length+=r,this.compress(d,h,!1);Bc(d);continue}n.set(e.subarray(c,c+l),this.pos),this.pos+=l,this.length+=l,c+=l}return this}digestInto(e){tl(this),Uv(e,this);const{pos:r,buffer32:n}=this;this.finished=!0,gs(this.buffer.subarray(r)),Bc(n),this.compress(n,0,!0),Bc(n);const i=N1(e);
vendor: 33,289 bytes, lines 66-69
66this.get().forEach((s,o)=>i[o]=ya(s))}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){const{buffer:r,length:n,finished:i,destroyed:s,outputLen:o,pos:a}=this;return e||(e=new this.constructor({dkLen:o})),e.set(...this.get()),e.buffer.set(r),e.destroyed=s,e.finished=i,e.length=n,e.pos=a,e.outputLen=o,e}clone(){return this._cloneInto()}}class aJ extends oJ{constructor(e={}){const r=e.dkLen===void 0?64:e.dkLen;super(128,r),this.v0l=_r[0]|0,this.v0h=_r[1]|0,this.v1l=_r[2]|0,this.v1h=_r[3]|0,this.v2l=_r[4]|0,this.v2h=_r[5]|0,this.v3l=_r[6]|0,this.v3h=_r[7]|0,this.v4l=_r[8]|0,this.v4h=_r[9]|0,this.v5l=_r[10]|0,this.v5h=_r[11]|0,this.v6l=_r[12]|0,this.v6h=_r[13]|0,this.v7l=_r[14]|0,this.v7h=_r[15]|0,sJ(r,e,64,16,16);let{key:n,personalization:i,salt:s}=e,o=0;if(n!==void 0&&(n=Vs(n),o=n.length),this.v0l^=this.outputLen|o<<8|65536|1<<24,s!==void 0){s=Vs(s);const a=N1(s);this.v4l^=ya(a[0]),this.v4h^=ya(a[1]),this.v5l^=ya(a[2]),this.v5h^=ya(a[3])}if(i!==void 0){i=Vs(i);const a=N1(i);this.v6l^=ya(a[0]),this.v6h^=ya(a[1]),this.v7l^=ya(a[2]),this.v7h^=ya(a[3])}if(n!==void 0){const a=new Uint8Array(this.blockLen);a.set(n),this.update(a)}}get(){let{v0l:e,v0h:r,v1l:n,v1h:i,v2l:s,v2h:o,v3l:a,v3h:c,v4l:l,v4h:u,v5l:d,v5h:h,v6l:f,v6h:g,v7l:p,v7h:w}=this;return[e,r,n,i,s,o,a,c,l,u,d,h,f,g,p,w]}set(e,r,n,i,s,o,a,c,l,u,d,h,f,g,p,w){this.v0l=e|0,this.v0h=r|0,this.v1l=n|0,this.v1h=i|0,this.v2l=s|0,this.v2h=o|0,this.v3l=a|0,this.v3h=c|0,this.v4l=l|0,this.v4h=u|0,this.v5l=d|0,this.v5h=h|0,this.v6l=f|0,this.v6h=g|0,this.v7l=p|0,this.v7h=w|0}compress(e,r,n){this.get().forEach((c,l)=>me[l]=c),me.set(_r,16);let{h:i,l:s}=sO(BigInt(this.length));me[24]=_r[8]^s,me[25]=_r[9]^i,n&&(me[28]=~me[28],me[29]=~me[29]);let o=0;const a=iJ;for(let c=0;c<12;c++)bc(0,4,8,12,e,r+2*a[o++]),vc(0,4,8,12,e,r+2*a[o++]),bc(1,5,9,13,e,r+2*a[o++]),vc(1,5,9,13,e,r+2*a[o++]),bc(2,6,10,14,e,r+2*a[o++]),vc(2,6,10,14,e,r+2*a[o++]),bc(3,7,11,15,e,r+2*a[o++]),vc(3,7,11,15,e,r+2*a[o++]),bc(0,5,10,15,e,r+2*a[o++]),vc(0,5,10,15,e,r+2*a[o++]),bc(1,6,11,12,e,r+2*a[o++]),vc(1,6,11,12,e,r+2*a[o++]),bc(2,7,8,13,e,r+2*a[o++]),vc(2,7,8,13,e,r+2*a[o++]),bc(3,4,9,14,e,r+2*a[o++]),vc(3,4,9,14,e,r+2*a[o++]);this.v0l^=me[0]^me[16],this.v0h^=me[1]^me[17],this.v1l^=me[2]^me[18],this.v1h^=me[3]^me[19],this.v2l^=me[4]^me[20],this.v2h^=me[5]^me[21],this.v3l^=me[6]^me[22],this.v3h^=me[7]^me[23],this.v4l^=me[8]^me[24],this.v4h^=me[9]^me[25],this.v5l^=me[10]^me[26],this.v5h^=me[11]^me[27],this.v6l^=me[12]^me[28],this.v6h^=me[13]^me[29],this.v7l^=me[14]^me[30],this.v7h^=me[15]^me[31],gs(me)}destroy(){this.destroyed=!0,gs(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const cJ=RY(t=>new aJ(t)),lJ="https://rpc.walletconnect.org/v1";function mO(t){const e=`�Ethereum Signed Message:
67${t.length}`,r=new TextEncoder().encode(e+t);return"0x"+Oe.from(VY(r)).toString("hex")}async function uJ(t,e,r,n,i,s){switch(r.t){case"eip191":return await dJ(t,e,r.s);case"eip1271":return await hJ(t,e,r.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function dJ(t,e,r){return(await TH({hash:mO(e),signature:r})).toLowerCase()===t.toLowerCase()}async function hJ(t,e,r,n,i,s){const o=mh(n);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{const a="0x1626ba7e",c="0000000000000000000000000000000000000000000000000000000000000040",l=r.substring(2),u=(l.length/2).toString(16).padStart(64,"0"),d=(e.startsWith("0x")?e:mO(e)).substring(2),h=a+d+c+u+l,f=await fetch(`${s||lJ}/?chainId=${n}&projectId=${i}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:fJ(),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:h},"latest"]})}),{result:g}=await f.json();return g?g.slice(0,a.length).toLowerCase()===a.toLowerCase():!1}catch(a){return console.error("isValidEip1271Signature: ",a),!1}}function fJ(){return Date.now()+Math.floor(Math.random()*1e3)}function pJ(t){const e=atob(t),r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o);const n=r[0];if(n===0)throw new Error("No signatures found");const i=1+n*64;if(r.length<i)throw new Error("Transaction data too short for claimed signature count");if(r.length<100)throw new Error("Transaction too short");const s=Oe.from(t,"base64").slice(1,65);return x0.encode(s)}function gJ(t){const e=new Uint8Array(Oe.from(t,"base64")),r=Array.from("TransactionData::").map(s=>s.charCodeAt(0)),n=new Uint8Array(r.length+e.length);n.set(r),n.set(e,r.length);const i=cJ(n,{dkLen:32});return x0.encode(i)}function G7(t){const e=new Uint8Array(tm(wJ(t)));return x0.encode(e)}function wJ(t){if(t instanceof Uint8Array)return t;if(Array.isArray(t))return new Uint8Array(t);if(typeof t=="object"&&t!=null&&t.data)return new Uint8Array(Object.values(t.data));if(typeof t=="object"&&t)return new Uint8Array(Object.values(t));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function Y7(t){const e=Oe.from(t,"base64"),r=YV(e).txn;if(!r)throw new Error("Invalid signed transaction: missing 'txn' field");const n=zV(r),i=Oe.from("TX"),s=Oe.concat([i,Oe.from(n)]),o=nJ(s);return eW.encode(o).replace(/=+$/,"")}function L3(t){const e=[];let r=BigInt(t);for(;r>=BigInt(128);)e.push(Number(r&BigInt(127)|BigInt(128))),r>>=BigInt(7);return e.push(Number(r)),Oe.from(e)}function mJ(t){const e=Oe.from(t.signed.bodyBytes,"base64"),r=Oe.from(t.signed.authInfoBytes,"base64"),n=Oe.from(t.signature.signature,"base64"),i=[];i.push(Oe.from([10])),i.push(L3(e.length)),i.push(e),i.push(Oe.from([18])),i.push(L3(r.length)),i.push(r),i.push(Oe.from([26])),i.push(L3(n.length)),i.push(n);const s=Oe.concat(i),o=tm(s);return Oe.from(o).toString("hex").toUpperCase()}var yJ=Object.defineProperty,bJ=Object.defineProperties,vJ=Object.getOwnPropertyDescriptors,J7=Object.getOwnPropertySymbols,EJ=Object.prototype.hasOwnProperty,CJ=Object.prototype.propertyIsEnumerable,X7=(t,e,r)=>e in t?yJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xJ=(t,e)=>{for(var r in e||(e={}))EJ.call(e,r)&&X7(t,r,e[r]);if(J7)for(var r of J7(e))CJ.call(e,r)&&X7(t,r,e[r]);return t},_J=(t,e)=>bJ(t,vJ(e));const SJ="did:pkh:",Fv=t=>t==null?void 0:t.split(":"),IJ=t=>{const e=t&&Fv(t);if(e)return t.includes(SJ)?e[3]:e[1]},s4=t=>{const e=t&&Fv(t);if(e)return e[2]+":"+e[3]},H2=t=>{const e=t&&Fv(t);if(e)return e.pop()};async function Q7(t){const{cacao:e,projectId:r}=t,{s:n,p:i}=e,s=yO(i,i.iss),o=H2(i.iss);return await uJ(o,s,n,s4(i.iss),r)}const yO=(t,e)=>{const r=`${t.domain} wants you to sign in with your Ethereum account:`,n=H2(e);if(!t.aud&&!t.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=t.statement||void 0;const s=`URI: ${t.aud||t.uri}`,o=`Version: ${t.version}`,a=`Chain ID: ${IJ(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,u=t.exp?`Expiration Time: ${t.exp}`:void 0,d=t.nbf?`Not Before: ${t.nbf}`:void 0,h=t.requestId?`Request ID: ${t.requestId}`:void 0,f=t.resources?`Resources:${t.resources.map(p=>`
68- ${p}`).join("")}`:void 0,g=d2(t.resources);if(g){const p=R1(g);i=BJ(i,p)}return[r,n,"",i,"",s,o,a,c,l,u,d,h,f].filter(p=>p!=null).join(`
69`)};function $J(t){return Oe.from(JSON.stringify(t)).toString("base64")}function AJ(t){return JSON.parse(Oe.from(t,"base64").toString("utf-8"))}function mu(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");const e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(r=>{const n=t.att[r];if(Array.isArray(n))throw new Error(`Resource must be an object: ${r}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(n).forEach(i=>{const s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function PJ(t,e,r,n={}){return r==null||r.sort((i,s)=>i.localeCompare(s)),{att:{[t]:TJ(e,r,n)}}}function TJ(t,e,r={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const n=e.map(i=>({[`${t}/${i}`]:[r]}));return Object.assign({},...n)}function bO(t){return mu(t),`urn:recap:${$J(t).replace(/=/g,"")}`}function R1(t){const e=AJ(t.replace("urn:recap:",""));return mu(e),e}function OJ(t,e,r){const n=PJ(t,e,r);return bO(n)}function NJ(t){return t&&t.includes("urn:recap:")}function kJ(t,e){const r=R1(t),n=R1(e),i=RJ(r,n);return bO(i)}function RJ(t,e){mu(t),mu(e);const r=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return r.forEach(i=>{var s,o;Object.keys(((s=t.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;n.att[i]=_J(xJ({},n.att[i]),{[a]:((c=t.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),n}function BJ(t="",e){mu(e);const r="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(r))return t;const n=[];let i=0;Object.keys(e.att).forEach(a=>{const c=Object.keys(e.att[a]).map(d=>({ability:d.split("/")[0],action:d.split("/")[1]}));c.sort((d,h)=>d.action.localeCompare(h.action));const l={};c.forEach(d=>{l[d.ability]||(l[d.ability]=[]),l[d.ability].push(d.action)});const u=Object.keys(l).map(d=>(i++,`(${i}) '${d}': '${l[d].join("', '")}' for '${a}'.`));n.push(u.join(", ").replace(".,","."))});const s=n.join(" "),o=`${r}${s}`;return`${t?t+" ":""}${o}`}function eE(t){var e;const r=R1(t);mu(r);const n=(e=r.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function tE(t){const e=R1(t);mu(e);const r=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&r.push(i[0].chains)})}),[...new Set(r.flat())]}function d2(t){if(!t)return;const e=t==null?void 0:t[t.length-1];return NJ(e)?e:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function vO(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function o4(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function M3(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function ri(t,...e){if(!vO(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function rE(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function DJ(t,e){ri(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Wc(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Bh(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function LJ(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const MJ=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function UJ(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function a4(t){if(typeof t=="string")t=UJ(t);else if(vO(t))t=c4(t);else throw new Error("Uint8Array expected, got "+typeof t);return t}function jJ(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function zJ(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}const FJ=(t,e)=>{function r(n,...i){if(ri(n),!MJ)throw new Error("Non little-endian hardware is not yet supported");if(t.nonceLength!==void 0){const l=i[0];if(!l)throw new Error("nonce / iv required");t.varSizeNonce?ri(l):ri(l,t.nonceLength)}const s=t.tagLength;s&&i[1]!==void 0&&ri(i[1]);const o=e(n,...i),a=(l,u)=>{if(u!==void 0){if(l!==2)throw new Error("cipher output not supported");ri(u)}};let c=!1;return{encrypt(l,u){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,ri(l),a(o.encrypt.length,u),o.encrypt(l,u)},decrypt(l,u){if(ri(l),s&&l.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return a(o.decrypt.length,u),o.decrypt(l,u)}}}return Object.assign(r,t),r};function nE(t,e,r=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(r&&!HJ(e))throw new Error("invalid output, must be aligned");return e}function iE(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s);t.setUint32(e+4,o,n),t.setUint32(e+0,a,n)}function qJ(t,e,r){o4(r);const n=new Uint8Array(16),i=LJ(n);return iE(i,0,BigInt(e),r),iE(i,8,BigInt(t),r),n}function HJ(t){return t.byteOffset%4===0}function c4(t){return Uint8Array.from(t)}const EO=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),VJ=EO("expand 16-byte k"),WJ=EO("expand 32-byte k"),KJ=Wc(VJ),ZJ=Wc(WJ);function lt(t,e){return t<<e|t>>>32-e}function l4(t){return t.byteOffset%4===0}const $g=64,GJ=16,CO=2**32-1,sE=new Uint32Array;function YJ(t,e,r,n,i,s,o,a){const c=i.length,l=new Uint8Array($g),u=Wc(l),d=l4(i)&&l4(s),h=d?Wc(i):sE,f=d?Wc(s):sE;for(let g=0;g<c;o++){if(t(e,r,n,u,o,a),o>=CO)throw new Error("arx: counter overflow");const p=Math.min($g,c-g);if(d&&p===$g){const w=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let m=0,b;m<GJ;m++)b=w+m,f[b]=h[b]^u[m];g+=$g;continue}for(let w=0,m;w<p;w++)m=g+w,s[m]=i[m]^l[w];g+=p}}function JJ(t,e){const{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=jJ({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!="function")throw new Error("core must be a function");return M3(i),M3(o),o4(s),o4(r),(a,c,l,u,d=0)=>{ri(a),ri(c),ri(l);const h=l.length;if(u===void 0&&(u=new Uint8Array(h)),ri(u),M3(d),d<0||d>=CO)throw new Error("arx: counter overflow");if(u.length<h)throw new Error(`arx: output (${u.length}) is shorter than data (${h})`);const f=[];let g=a.length,p,w;if(g===32)f.push(p=c4(a)),w=ZJ;else if(g===16&&r)p=new Uint8Array(32),p.set(a),p.set(a,16),w=KJ,f.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${g}`);l4(c)||f.push(c=c4(c));const m=Wc(p);if(n){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");n(w,m,Wc(c.subarray(0,16)),m),c=c.subarray(16)}const b=16-i;if(b!==c.length)throw new Error(`arx: nonce must be ${b} or 16 bytes`);if(b!==12){const E=new Uint8Array(12);E.set(c,s?0:12-c.length),c=E,f.push(c)}const v=Wc(c);return YJ(t,w,m,v,l,u,d,o),Bh(...f),u}}const Xr=(t,e)=>t[e++]&255|(t[e++]&255)<<8;class XJ{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=a4(e),ri(e,32);const r=Xr(e,0),n=Xr(e,2),i=Xr(e,4),s=Xr(e,6),o=Xr(e,8),a=Xr(e,10),c=Xr(e,12),l=Xr(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=Xr(e,16+2*u)}process(e,r,n=!1){const i=n?0:2048,{h:s,r:o}=this,a=o[0],c=o[1],l=o[2],u=o[3],d=o[4],h=o[5],f=o[6],g=o[7],p=o[8],w=o[9],m=Xr(e,r+0),b=Xr(e,r+2),v=Xr(e,r+4),E=Xr(e,r+6),I=Xr(e,r+8),_=Xr(e,r+10),A=Xr(e,r+12),P=Xr(e,r+14);let y=s[0]+(m&8191),O=s[1]+((m>>>13|b<<3)&8191),S=s[2]+((b>>>10|v<<6)&8191),k=s[3]+((v>>>7|E<<9)&8191),L=s[4]+((E>>>4|I<<12)&8191),T=s[5]+(I>>>1&8191),C=s[6]+((I>>>14|_<<2)&8191),x=s[7]+((_>>>11|A<<5)&8191),B=s[8]+((A>>>8|P<<8)&8191),R=s[9]+(P>>>5|i),M=0,U=M+y*a+O*(5*w)+S*(5*p)+k*(5*g)+L*(5*f);M=U>>>13,U&=8191,U+=T*(5*h)+C*(5*d)+x*(5*u)+B*(5*l)+R*(5*c),M+=U>>>13,U&=8191;let z=M+y*c+O*a+S*(5*w)+k*(5*p)+L*(5*g);M=z>>>13,z&=8191,z+=T*(5*f)+C*(5*h)+x*(5*d)+B*(5*u)+R*(5*l),M+=z>>>13,z&=8191;let H=M+y*l+O*c+S*a+k*(5*w)+L*(5*p);M=H>>>13,H&=8191,H+=T*(5*g)+C*(5*f)+x*(5*h)+B*(5*d)+R*(5*u),M+=H>>>13,H&=8191;let Y=M+y*u+O*l+S*c+k*a+L*(5*w);M=Y>>>13,Y&=8191,Y+=T*(5*p)+C*(5*g)+x*(5*f)+B*(5*h)+R*(5*d),M+=Y>>>13,Y&=8191;let V=M+y*d+O*u+S*l+k*c+L*a;M=V>>>13,V&=8191,V+=T*(5*w)+C*(5*p)+x*(5*g)+B*(5*f)+R*(5*h),M+=V>>>13,V&=8191;let G=M+y*h+O*d+S*u+k*l+L*c;M=G>>>13,G&=8191,G+=T*a+C*(5*w)+x*(5*p)+B*(5*g)+R*(5*f),M+=G>>>13,G&=8191;let re=M+y*f+O*h+S*d+k*u+L*l;M=re>>>13,re&=8191,re+=T*c+C*a+x*(5*w)+B*(5*p)+R*(5*g),M+=re>>>13,re&=8191;let de=M+y*g+O*f+S*h+k*d+L*u;M=de>>>13,de&=8191,de+=T*l+C*c+x*a+B*(5*w)+R*(5*p),M+=de>>>13,de&=8191;let ce=M+y*p+O*g+S*f+k*h+L*d;M=ce>>>13,ce&=8191,ce+=T*u+C*l+x*c+B*a+R*(5*w),M+=ce>>>13,ce&=8191;let ae=M+y*w+O*p+S*g+k*f+L*h;M=ae>>>13,ae&=8191,ae+=T*d+C*u+x*l+B*c+R*a,M+=ae>>>13,ae&=8191,M=(M<<2)+M|0,M=M+U|0,U=M&8191,M=M>>>13,z+=M,s[0]=U,s[1]=z,s[2]=H,s[3]=Y,s[4]=V,s[5]=G,s[6]=re,s[7]=de,s[8]=ce,s[9]=ae}finalize(){const{h:e,pad:r}=this,n=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let s=(i^1)-1;for(let a=0;a<10;a++)n[a]&=s;s=~s;for(let a=0;a<10;a++)e[a]=e[a]&s|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+r[0];e[0]=o&65535;for(let a=1;a<8;a++)o=(e[a]+r[a]|0)+(o>>>16)|0,e[a]=o&65535;Bh(n)}update(e){rE(this),e=a4(e),ri(e);const{buffer:r,blockLen:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);if(o===n){for(;n<=i-s;s+=n)this.process(e,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(r,0,!1),this.pos=0)}return this}destroy(){Bh(this.h,this.r,this.buffer,this.pad)}digestInto(e){rE(this),DJ(e,this),this.finished=!0;const{buffer:r,h:n}=this;let{pos:i}=this;if(i){for(r[i++]=1;i<16;i++)r[i]=0;this.process(r,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)e[s++]=n[o]>>>0,e[s++]=n[o]>>>8;return e}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}}function QJ(t){const e=(n,i)=>t(i).update(a4(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}const eX=QJ(t=>new XJ(t));function tX(t,e,r,n,i,s=20){let o=t[0],a=t[1],c=t[2],l=t[3],u=e[0],d=e[1],h=e[2],f=e[3],g=e[4],p=e[5],w=e[6],m=e[7],b=i,v=r[0],E=r[1],I=r[2],_=o,A=a,P=c,y=l,O=u,S=d,k=h,L=f,T=g,C=p,x=w,B=m,R=b,M=v,U=E,z=I;for(let Y=0;Y<s;Y+=2)_=_+O|0,R=lt(R^_,16),T=T+R|0,O=lt(O^T,12),_=_+O|0,R=lt(R^_,8),T=T+R|0,O=lt(O^T,7),A=A+S|0,M=lt(M^A,16),C=C+M|0,S=lt(S^C,12),A=A+S|0,M=lt(M^A,8),C=C+M|0,S=lt(S^C,7),P=P+k|0,U=lt(U^P,16),x=x+U|0,k=lt(k^x,12),P=P+k|0,U=lt(U^P,8),x=x+U|0,k=lt(k^x,7),y=y+L|0,z=lt(z^y,16),B=B+z|0,L=lt(L^B,12),y=y+L|0,z=lt(z^y,8),B=B+z|0,L=lt(L^B,7),_=_+S|0,z=lt(z^_,16),x=x+z|0,S=lt(S^x,12),_=_+S|0,z=lt(z^_,8),x=x+z|0,S=lt(S^x,7),A=A+k|0,R=lt(R^A,16),B=B+R|0,k=lt(k^B,12),A=A+k|0,R=lt(R^A,8),B=B+R|0,k=lt(k^B,7),P=P+L|0,M=lt(M^P,16),T=T+M|0,L=lt(L^T,12),P=P+L|0,M=lt(M^P,8),T=T+M|0,L=lt(L^T,7),y=y+O|0,U=lt(U^y,16),C=C+U|0,O=lt(O^C,12),y=y+O|0,U=lt(U^y,8),C=C+U|0,O=lt(O^C,7);let H=0;n[H++]=o+_|0,n[H++]=a+A|0,n[H++]=c+P|0,n[H++]=l+y|0,n[H++]=u+O|0,n[H++]=d+S|0,n[H++]=h+k|0,n[H++]=f+L|0,n[H++]=g+T|0,n[H++]=p+C|0,n[H++]=w+x|0,n[H++]=m+B|0,n[H++]=b+R|0,n[H++]=v+M|0,n[H++]=E+U|0,n[H++]=I+z|0}const rX=JJ(tX,{counterRight:!1,counterLength:4,allowShortKeys:!1}),nX=new Uint8Array(16),oE=(t,e)=>{t.update(e);const r=e.length%16;r&&t.update(nX.subarray(r))},iX=new Uint8Array(32);function aE(t,e,r,n,i){const s=t(e,r,iX),o=eX.create(s);i&&oE(o,i),oE(o,n);const a=qJ(n.length,i?i.length:0,!0);o.update(a);const c=o.digest();return Bh(s,a),c}const sX=t=>(e,r,n)=>({encrypt(i,s){const o=i.length;s=nE(o+16,s,!1),s.set(i);const a=s.subarray(0,-16);t(e,r,a,a,1);const c=aE(t,e,r,a,n);return s.set(c,o),Bh(c),s},decrypt(i,s){s=nE(i.length-16,s,!1);const o=i.subarray(0,-16),a=i.subarray(-16),c=aE(t,e,r,o,n);if(!zJ(a,c))throw new Error("invalid tag");return s.set(i.subarray(0,-16)),t(e,r,s,s,1),Bh(c),s}}),xO=FJ({blockSize:64,nonceLength:12,tagLength:16},sX(rX));let _O=class extends em{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,Mv(e);const n=Vs(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),gs(s)}update(e){return tl(this),this.iHash.update(e),this}digestInto(e){tl(this),ps(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:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const rm=(t,e,r)=>new _O(t,e).update(r).digest();rm.create=(t,e)=>new _O(t,e);function oX(t,e,r){return Mv(t),r===void 0&&(r=new Uint8Array(t.outputLen)),rm(t,Vs(r),Vs(e))}const U3=Uint8Array.from([0]),cE=Uint8Array.of();function aX(t,e,r,n=32){Mv(t),qa(n);const i=t.outputLen;if(n>255*i)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(n/i);r===void 0&&(r=cE);const o=new Uint8Array(s*i),a=rm.create(t,e),c=a._cloneInto(),l=new Uint8Array(a.outputLen);for(let u=0;u<s;u++)U3[0]=u+1,c.update(u===0?cE:l).update(r).update(U3).digestInto(l),o.set(l,i*u),a._cloneInto(c);return a.destroy(),c.destroy(),gs(l,U3),o.slice(0,n)}const cX=(t,e,r,n,i)=>aX(t,oX(t,e,r),n,i),nm=tm,qv=BigInt(0),u4=BigInt(1);function V2(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Ag(t){const e=t.toString(16);return e.length&1?"0"+e:e}function SO(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?qv:BigInt("0x"+t)}function im(t){return SO(k1(t))}function W2(t){return ps(t),SO(k1(Uint8Array.from(t).reverse()))}function Hv(t,e){return jv(t.toString(16).padStart(e*2,"0"))}function Vv(t,e){return Hv(t,e).reverse()}function ei(t,e,r){let n;if(typeof e=="string")try{n=jv(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(Lv(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}const j3=t=>typeof t=="bigint"&&qv<=t;function lX(t,e,r){return j3(t)&&j3(e)&&j3(r)&&e<=t&&t<r}function d4(t,e,r,n){if(!lX(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function uX(t){let e;for(e=0;t>qv;t>>=u4,e+=1);return e}const sm=t=>(u4<<BigInt(t))-u4;function dX(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");const n=h=>new Uint8Array(h),i=h=>Uint8Array.of(h);let s=n(t),o=n(t),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},l=(...h)=>r(o,s,...h),u=(h=n(0))=>{o=l(i(0),h),s=l(),h.length!==0&&(o=l(i(1),h),s=l())},d=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let h=0;const f=[];for(;h<e;){s=l();const g=s.slice();f.push(g),h+=s.length}return Gl(...f)};return(h,f)=>{c(),u(h);let g;for(;!(g=f(d()));)u();return c(),g}}function om(t,e,r={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function n(i,s,o){const a=t[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${c}`)}Object.entries(e).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function lE(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const ai=BigInt(0),Rn=BigInt(1),Yl=BigInt(2),hX=BigInt(3),IO=BigInt(4),$O=BigInt(5),AO=BigInt(8);function ls(t,e){const r=t%e;return r>=ai?r:e+r}function Ds(t,e,r){let n=t;for(;e-- >ai;)n*=n,n%=r;return n}function uE(t,e){if(t===ai)throw new Error("invert: expected non-zero number");if(e<=ai)throw new Error("invert: expected positive modulus, got "+e);let r=ls(t,e),n=e,i=ai,s=Rn;for(;r!==ai;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==Rn)throw new Error("invert: does not exist");return ls(i,e)}function PO(t,e){const r=(t.ORDER+Rn)/IO,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function fX(t,e){const r=(t.ORDER-$O)/AO,n=t.mul(e,Yl),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,Yl),i),a=t.mul(s,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function pX(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-Rn,r=0;for(;e%Yl===ai;)e/=Yl,r++;let n=Yl;const i=$0(t);for(;dE(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return PO;let s=i.pow(n,e);const o=(e+Rn)/Yl;return function(a,c){if(a.is0(c))return c;if(dE(a,c)!==1)throw new Error("Cannot find square root");let l=r,u=a.mul(a.ONE,s),d=a.pow(c,e),h=a.pow(c,o);for(;!a.eql(d,a.ONE);){if(a.is0(d))return a.ZERO;let f=1,g=a.sqr(d);for(;!a.eql(g,a.ONE);)if(f++,g=a.sqr(g),f===l)throw new Error("Cannot find square root");const p=Rn<<BigInt(l-f-1),w=a.pow(u,p);l=f,u=a.sqr(w),d=a.mul(d,u),h=a.mul(h,w)}return h}}function gX(t){return t%IO===hX?PO:t%AO===$O?fX:pX(t)}const wX=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function mX(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=wX.reduce((n,i)=>(n[i]="function",n),e);return om(t,r),t}function yX(t,e,r){if(r<ai)throw new Error("invalid exponent, negatives unsupported");if(r===ai)return t.ONE;if(r===Rn)return e;let n=t.ONE,i=e;for(;r>ai;)r&Rn&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Rn;return n}function TO(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function dE(t,e){const r=(t.ORDER-Rn)/Yl,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function bX(t,e){e!==void 0&&qa(e);const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function $0(t,e,r=!1,n={}){if(t<=ai)throw new Error("invalid field: expected ORDER > 0, got "+t);let i,s;if(typeof e=="object"&&e!=null){if(n.sqrt||r)throw new Error("cannot specify opts in two arguments");const u=e;u.BITS&&(i=u.BITS),u.sqrt&&(s=u.sqrt),typeof u.isLE=="boolean"&&(r=u.isLE)}else typeof e=="number"&&(i=e),n.sqrt&&(s=n.sqrt);const{nBitLength:o,nByteLength:a}=bX(t,i);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const l=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:a,MASK:sm(o),ZERO:ai,ONE:Rn,create:u=>ls(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return ai<=u&&u<t},is0:u=>u===ai,isValidNot0:u=>!l.is0(u)&&l.isValid(u),isOdd:u=>(u&Rn)===Rn,neg:u=>ls(-u,t),eql:(u,d)=>u===d,sqr:u=>ls(u*u,t),add:(u,d)=>ls(u+d,t),sub:(u,d)=>ls(u-d,t),mul:(u,d)=>ls(u*d,t),pow:(u,d)=>yX(l,u,d),div:(u,d)=>ls(u*uE(d,t),t),sqrN:u=>u*u,addN:(u,d)=>u+d,subN:(u,d)=>u-d,mulN:(u,d)=>u*d,inv:u=>uE(u,t),sqrt:s||(u=>(c||(c=gX(t)),c(l,u))),toBytes:u=>r?Vv(u,a):Hv(u,a),fromBytes:u=>{if(u.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+u.length);return r?W2(u):im(u)},invertBatch:u=>TO(l,u),cmov:(u,d,h)=>h?d:u});return Object.freeze(l)}function OO(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function NO(t){const e=OO(t);return e+Math.ceil(e/2)}function vX(t,e,r=!1){const n=t.length,i=OO(e),s=NO(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?W2(t):im(t),a=ls(o,e-Rn)+Rn;return r?Vv(a,i):Hv(a,i)}const Dh=BigInt(0),Jl=BigInt(1);function zf(t,e){const r=e.negate();return t?r:e}function EX(t,e,r){const n=s=>s.pz,i=TO(t.Fp,r.map(n));return r.map((s,o)=>s.toAffine(i[o])).map(t.fromAffine)}function kO(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function z3(t,e){kO(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=sm(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function hE(t,e,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=Jl);const l=e*n,u=l+Math.abs(a)-1,d=a===0,h=a<0,f=e%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:h,isNegF:f,offsetF:l}}function CX(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function xX(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const F3=new WeakMap,RO=new WeakMap;function q3(t){return RO.get(t)||1}function fE(t){if(t!==Dh)throw new Error("invalid wNAF")}function _X(t,e){return{constTimeNegate:zf,hasPrecomputes(r){return q3(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>Dh;)n&Jl&&(i=i.add(s)),s=s.double(),n>>=Jl;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=z3(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let s=t.ZERO,o=t.BASE;const a=z3(r,e);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:h,isNegF:f,offsetF:g}=hE(i,c,a);i=l,d?o=o.add(zf(f,n[g])):s=s.add(zf(h,n[u]))}return fE(i),{p:s,f:o}},wNAFUnsafe(r,n,i,s=t.ZERO){const o=z3(r,e);for(let a=0;a<o.windows&&i!==Dh;a++){const{nextN:c,offset:l,isZero:u,isNeg:d}=hE(i,a,o);if(i=c,!u){const h=n[l];s=s.add(d?h.negate():h)}}return fE(i),s},getPrecomputes(r,n,i){let s=F3.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&(typeof i=="function"&&(s=i(s)),F3.set(n,s))),s},wNAFCached(r,n,i){const s=q3(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=q3(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){kO(n,e),RO.set(r,n),F3.delete(r)}}}function SX(t,e,r,n){let i=e,s=t.ZERO,o=t.ZERO;for(;r>Dh||n>Dh;)r&Jl&&(s=s.add(i)),n&Jl&&(o=o.add(i)),i=i.double(),r>>=Jl,n>>=Jl;return{p1:s,p2:o}}function IX(t,e,r,n){CX(r,t),xX(n,e);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=uX(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=sm(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((e.BITS-1)/c)*c;let h=o;for(let f=d;f>=0;f-=c){u.fill(o);for(let p=0;p<s;p++){const w=n[p],m=Number(w>>BigInt(f)&l);u[m]=u[m].add(r[p])}let g=o;for(let p=u.length-1,w=o;p>0;p--)w=w.add(u[p]),g=g.add(w);if(h=h.add(g),f!==0)for(let p=0;p<c;p++)h=h.double()}return h}function pE(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return mX(e),e}else return $0(t)}function $X(t,e,r={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const o of["p","n","h"]){const a=e[o];if(!(typeof a=="bigint"&&a>Dh))throw new Error(`CURVE.${o} must be positive bigint`)}const n=pE(e.p,r.Fp),i=pE(e.n,r.Fn),s=["Gx","Gy","a","b"];for(const o of s)if(!n.isValid(e[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return{Fp:n,Fn:i}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const tf=BigInt(0),Cd=BigInt(1),Pg=BigInt(2);function AX(t){return om(t,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...t})}function PX(t){const e=AX(t),{P:r,type:n,adjustScalarBytes:i,powPminus2:s,randomBytes:o}=e,a=n==="x25519";if(!a&&n!=="x448")throw new Error("invalid type");const c=o||I0,l=a?255:448,u=a?32:56,d=BigInt(a?9:5),h=BigInt(a?121665:39081),f=a?Pg**BigInt(254):Pg**BigInt(447),g=a?BigInt(8)*Pg**BigInt(251)-Cd:BigInt(4)*Pg**BigInt(445)-Cd,p=f+g+Cd,w=y=>ls(y,r),m=b(d);function b(y){return Vv(w(y),u)}function v(y){const O=ei("u coordinate",y,u);
69return a&&(O[31]&=127),w(W2(O))}function E(y){return W2(i(ei("scalar",y,u)))}function I(y,O){const S=P(v(O),E(y));if(S===tf)throw new Error("invalid private or public key received");return b(S)}function _(y){return I(y,m)}function A(y,O,S){const k=w(y*(O-S));return O=w(O-k),S=w(S+k),{x_2:O,x_3:S}}function P(y,O){d4("u",y,tf,r),d4("scalar",O,f,p);const S=O,k=y;let L=Cd,T=tf,C=y,x=Cd,B=tf;for(let M=BigInt(l-1);M>=tf;M--){const U=S>>M&Cd;B^=U,{x_2:L,x_3:C}=A(B,L,C),{x_2:T,x_3:x}=A(B,T,x),B=U;const z=L+T,H=w(z*z),Y=L-T,V=w(Y*Y),G=H-V,re=C+x,de=C-x,ce=w(de*z),ae=w(re*Y),be=ce+ae,Ce=ce-ae;C=w(be*be),x=w(k*w(Ce*Ce)),L=w(H*V),T=w(G*(H+w(h*G)))}({x_2:L,x_3:C}=A(B,L,C)),{x_2:T,x_3:x}=A(B,T,x);const R=s(T);return w(L*R)}return{scalarMult:I,scalarMultBase:_,getSharedSecret:(y,O)=>I(y,O),getPublicKey:y=>_(y),utils:{randomPrivateKey:()=>c(u)},GuBytes:m.slice()}}BigInt(0);const TX=BigInt(1),gE=BigInt(2),OX=BigInt(3),NX=BigInt(5);BigInt(8);const BO={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function kX(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=BO.p,o=t*t%s*t%s,a=Ds(o,gE,s)*o%s,c=Ds(a,TX,s)*t%s,l=Ds(c,NX,s)*c%s,u=Ds(l,e,s)*l%s,d=Ds(u,r,s)*u%s,h=Ds(d,n,s)*d%s,f=Ds(h,i,s)*h%s,g=Ds(f,i,s)*h%s,p=Ds(g,e,s)*l%s;return{pow_p_5_8:Ds(p,gE,s)*t%s,b2:o}}function RX(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const h4=(()=>{const t=BO.p;return PX({P:t,type:"x25519",powPminus2:e=>{const{pow_p_5_8:r,b2:n}=kX(e);return ls(Ds(r,OX,t)*n,t)},adjustScalarBytes:RX})})();function wE(t){t.lowS!==void 0&&V2("lowS",t.lowS),t.prehash!==void 0&&V2("prehash",t.prehash)}let BX=class extends Error{constructor(e=""){super(e)}};const xa={Err:BX,_tlv:{encode:(t,e)=>{const{Err:r}=xa;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=Ag(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?Ag(i.length/2|128):"";return Ag(t)+s+i+e},decode(t,e){const{Err:r}=xa;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=xa;if(t<Ff)throw new e("integer: negative integers are not allowed");let r=Ag(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=xa;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return im(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=xa,i=ei("signature",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=xa,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},Ff=BigInt(0),qf=BigInt(1),DX=BigInt(2),Tg=BigInt(3),LX=BigInt(4);function MX(t,e,r){function n(i){const s=t.sqr(i),o=t.mul(s,i);return t.add(t.add(o,t.mul(i,e)),r)}return n}function DO(t,e,r){const{BYTES:n}=t;function i(s){let o;if(typeof s=="bigint")o=s;else{let a=ei("private key",s);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const c=new Uint8Array(n);c.set(a,c.length-a.length),a=c}try{o=t.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof s}`)}}if(r&&(o=t.create(o)),!t.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return i}function UX(t,e={}){const{Fp:r,Fn:n}=$X("weierstrass",t,e),{h:i,n:s}=t;om(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});
69const{endo:o}=e;if(o&&(!r.is0(t.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function c(P,y,O){const{x:S,y:k}=y.toAffine(),L=r.toBytes(S);if(V2("isCompressed",O),O){a();const T=!r.isOdd(k);return Gl(LO(T),L)}else return Gl(Uint8Array.of(4),L,r.toBytes(k))}function l(P){ps(P);const y=r.BYTES,O=y+1,S=2*y+1,k=P.length,L=P[0],T=P.subarray(1);if(k===O&&(L===2||L===3)){const C=r.fromBytes(T);if(!r.isValid(C))throw new Error("bad point: is not on curve, wrong x");const x=h(C);let B;try{B=r.sqrt(x)}catch(M){const U=M instanceof Error?": "+M.message:"";throw new Error("bad point: is not on curve, sqrt error"+U)}a();const R=r.isOdd(B);return(L&1)===1!==R&&(B=r.neg(B)),{x:C,y:B}}else if(k===S&&L===4){const C=r.fromBytes(T.subarray(y*0,y*1)),x=r.fromBytes(T.subarray(y*1,y*2));if(!f(C,x))throw new Error("bad point: is not on curve");return{x:C,y:x}}else throw new Error(`bad point: got length ${k}, expected compressed=${O} or uncompressed=${S}`)}const u=e.toBytes||c,d=e.fromBytes||l,h=MX(r,t.a,t.b);function f(P,y){const O=r.sqr(y),S=h(P);return r.eql(O,S)}if(!f(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const g=r.mul(r.pow(t.a,Tg),LX),p=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(g,p)))throw new Error("bad curve params: a or b");function w(P,y,O=!1){if(!r.isValid(y)||O&&r.is0(y))throw new Error(`bad point coordinate ${P}`);return y}function m(P){if(!(P instanceof I))throw new Error("ProjectivePoint expected")}const b=lE((P,y)=>{const{px:O,py:S,pz:k}=P;if(r.eql(k,r.ONE))return{x:O,y:S};const L=P.is0();y==null&&(y=L?r.ONE:r.inv(k));const T=r.mul(O,y),C=r.mul(S,y),x=r.mul(k,y);if(L)return{x:r.ZERO,y:r.ZERO};if(!r.eql(x,r.ONE))throw new Error("invZ was invalid");return{x:T,y:C}}),v=lE(P=>{if(P.is0()){if(e.allowInfinityPoint&&!r.is0(P.py))return;throw new Error("bad point: ZERO")}const{x:y,y:O}=P.toAffine();if(!r.isValid(y)||!r.isValid(O))throw new Error("bad point: x or y not field elements");if(!f(y,O))throw new Error("bad point: equation left != right");if(!P.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function E(P,y,O,S,k){return O=new I(r.mul(O.px,P),O.py,O.pz),y=zf(S,y),O=zf(k,O),y.add(O)}class I{constructor(y,O,S){this.px=w("x",y),this.py=w("y",O,!0),this.pz=w("z",S),Object.freeze(this)}static fromAffine(y){const{x:O,y:S}=y||{};if(!y||!r.isValid(O)||!r.isValid(S))throw new Error("invalid affine point");if(y instanceof I)throw new Error("projective point not allowed");return r.is0(O)&&r.is0(S)?I.ZERO:new I(O,S,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){return EX(I,"pz",y)}static fromBytes(y){return ps(y),I.fromHex(y)}static fromHex(y){const O=I.fromAffine(d(ei("pointHex",y)));return O.assertValidity(),O}static fromPrivateKey(y){const O=DO(n,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return I.BASE.multiply(O(y))}static msm(y,O){return IX(I,n,y,O)}precompute(y=8,O=!0){return A.setWindowSize(this,y),O||this.multiply(Tg),this}_setWindowSize(y){this.precompute(y)}assertValidity(){v(this)}hasEvenY(){const{y}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(y)}equals(y){m(y);const{px:O,py:S,pz:k}=this,{px:L,py:T,pz:C}=y,x=r.eql(r.mul(O,C),r.mul(L,k)),B=r.eql(r.mul(S,C),r.mul(T,k));return x&&B}negate(){return new I(this.px,r.neg(this.py),this.pz)}double(){const{a:y,b:O}=t,S=r.mul(O,Tg),{px:k,py:L,pz:T}=this;let C=r.ZERO,x=r.ZERO,B=r.ZERO,R=r.mul(k,k),M=r.mul(L,L),U=r.mul(T,T),z=r.mul(k,L);return z=r.add(z,z),B=r.mul(k,T),B=r.add(B,B),C=r.mul(y,B),x=r.mul(S,U),x=r.add(C,x),C=r.sub(M,x),x=r.add(M,x),x=r.mul(C,x),C=r.mul(z,C),B=r.mul(S,B),U=r.mul(y,U),z=r.sub(R,U),z=r.mul(y,z),z=r.add(z,B),B=r.add(R,R),R=r.add(B,R),R=r.add(R,U),R=r.mul(R,z),x=r.add(x,R),U=r.mul(L,T),U=r.add(U,U),R=r.mul(U,z),C=r.sub(C,R),B=r.mul(U,M),B=r.add(B,B),B=r.add(B,B),new I(C,x,B)}add(y){m(y);const{px:O,py:S,pz:k}=this,{px:L,py:T,pz:C}=y;let x=r.ZERO,B=r.ZERO,R=r.ZERO;const M=t.a,U=r.mul(t.b,Tg);let z=r.mul(O,L),H=r.mul(S,T),Y=r.mul(k,C),V=r.add(O,S),G=r.add(L,T);V=r.mul(V,G),G=r.add(z,H),V=r.sub(V,G),G=r.add(O,k);let re=r.add(L,C);
69return G=r.mul(G,re),re=r.add(z,Y),G=r.sub(G,re),re=r.add(S,k),x=r.add(T,C),re=r.mul(re,x),x=r.add(H,Y),re=r.sub(re,x),R=r.mul(M,G),x=r.mul(U,Y),R=r.add(x,R),x=r.sub(H,R),R=r.add(H,R),B=r.mul(x,R),H=r.add(z,z),H=r.add(H,z),Y=r.mul(M,Y),G=r.mul(U,G),H=r.add(H,Y),Y=r.sub(z,Y),Y=r.mul(M,Y),G=r.add(G,Y),z=r.mul(H,G),B=r.add(B,z),z=r.mul(re,G),x=r.mul(V,x),x=r.sub(x,z),z=r.mul(V,H),R=r.mul(re,R),R=r.add(R,z),new I(x,B,R)}subtract(y){return this.add(y.negate())}is0(){return this.equals(I.ZERO)}multiply(y){const{endo:O}=e;if(!n.isValidNot0(y))throw new Error("invalid scalar: out of range");let S,k;const L=T=>A.wNAFCached(this,T,I.normalizeZ);if(O){const{k1neg:T,k1:C,k2neg:x,k2:B}=O.splitScalar(y),{p:R,f:M}=L(C),{p:U,f:z}=L(B);k=M.add(z),S=E(O.beta,R,U,T,x)}else{const{p:T,f:C}=L(y);S=T,k=C}return I.normalizeZ([S,k])[0]}multiplyUnsafe(y){const{endo:O}=e,S=this;if(!n.isValid(y))throw new Error("invalid scalar: out of range");if(y===Ff||S.is0())return I.ZERO;if(y===qf)return S;if(A.hasPrecomputes(this))return this.multiply(y);if(O){const{k1neg:k,k1:L,k2neg:T,k2:C}=O.splitScalar(y),{p1:x,p2:B}=SX(I,S,L,C);return E(O.beta,x,B,k,T)}else return A.wNAFCachedUnsafe(S,y)}multiplyAndAddUnsafe(y,O,S){const k=this.multiplyUnsafe(O).add(y.multiplyUnsafe(S));return k.is0()?void 0:k}toAffine(y){return b(this,y)}isTorsionFree(){const{isTorsionFree:y}=e;return i===qf?!0:y?y(I,this):A.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:y}=e;return i===qf?this:y?y(I,this):this.multiplyUnsafe(i)}toBytes(y=!0){return V2("isCompressed",y),this.assertValidity(),u(I,this,y)}toRawBytes(y=!0){return this.toBytes(y)}toHex(y=!0){return k1(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}I.BASE=new I(t.Gx,t.Gy,r.ONE),I.ZERO=new I(r.ZERO,r.ONE,r.ZERO),I.Fp=r,I.Fn=n;const _=n.BITS,A=_X(I,e.endo?Math.ceil(_/2):_);return I}function LO(t){return Uint8Array.of(t?2:3)}function jX(t,e,r={}){om(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=e.randomBytes||I0,i=e.hmac||((S,...k)=>rm(e.hash,S,Gl(...k))),{Fp:s,Fn:o}=t,{ORDER:a,BITS:c}=o;function l(S){const k=a>>qf;return S>k}function u(S){return l(S)?o.neg(S):S}function d(S,k){if(!o.isValidNot0(k))throw new Error(`invalid signature ${S}: out of range 1..CURVE.n`)}class h{constructor(k,L,T){d("r",k),d("s",L),this.r=k,this.s=L,T!=null&&(this.recovery=T),Object.freeze(this)}static fromCompact(k){const L=o.BYTES,T=ei("compactSignature",k,L*2);return new h(o.fromBytes(T.subarray(0,L)),o.fromBytes(T.subarray(L,L*2)))}static fromDER(k){const{r:L,s:T}=xa.toSig(ei("DER",k));return new h(L,T)}assertValidity(){}addRecoveryBit(k){return new h(this.r,this.s,k)}recoverPublicKey(k){const L=s.ORDER,{r:T,s:C,recovery:x}=this;if(x==null||![0,1,2,3].includes(x))throw new Error("recovery id invalid");if(a*DX<L&&x>1)throw new Error("recovery id is ambiguous for h>1 curve");const B=x===2||x===3?T+a:T;if(!s.isValid(B))throw new Error("recovery id 2 or 3 invalid");const R=s.toBytes(B),M=t.fromHex(Gl(LO((x&1)===0),R)),U=o.inv(B),z=v(ei("msgHash",k)),H=o.create(-z*U),Y=o.create(C*U),V=t.BASE.multiplyUnsafe(H).add(M.multiplyUnsafe(Y));if(V.is0())throw new Error("point at infinify");return V.assertValidity(),V}hasHighS(){return l(this.s)}normalizeS(){return this.hasHighS()?new h(this.r,o.neg(this.s),this.recovery):this}toBytes(k){if(k==="compact")return Gl(o.toBytes(this.r),o.toBytes(this.s));if(k==="der")return jv(xa.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return k1(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return k1(this.toBytes("compact"))}}const f=DO(o,r.allowedPrivateKeyLengths,r.wrapPrivateKey),g={isValidPrivateKey(S){try{return f(S),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const S=a;return vX(n(NO(S)),S)},precompute(S=8,k=t.BASE){return k.precompute(S,!1)}};function p(S,k=!0){return t.fromPrivateKey(S).toBytes(k)}function w(S){if(typeof S=="bigint")return!1;if(S instanceof t)return!0;const k=ei("key",S).length,L=s.BYTES,T=L+1,C=2*L+1;if(!(r.allowedPrivateKeyLengths||o.BYTES===T))return k===T||k===C}function m(S,k,L=!0){if(w(S)===!0)throw new Error("first arg must be private key");if(w(k)===!1)throw new Error("second arg must be public key");return t.fromHex(k).multiply(f(S)).toBytes(L)}const b=e.bits2int||function(S){if(S.length>8192)throw new Error("input is too large");
vendor: 6,260 bytes, line 69
69const k=im(S),L=S.length*8-c;return L>0?k>>BigInt(L):k},v=e.bits2int_modN||function(S){return o.create(b(S))},E=sm(c);function I(S){return d4("num < 2^"+c,S,Ff,E),o.toBytes(S)}function _(S,k,L=A){if(["recovered","canonical"].some(V=>V in L))throw new Error("sign() legacy options not supported");const{hash:T}=e;let{lowS:C,prehash:x,extraEntropy:B}=L;C==null&&(C=!0),S=ei("msgHash",S),wE(L),x&&(S=ei("prehashed msgHash",T(S)));const R=v(S),M=f(k),U=[I(M),I(R)];if(B!=null&&B!==!1){const V=B===!0?n(s.BYTES):B;U.push(ei("extraEntropy",V))}const z=Gl(...U),H=R;function Y(V){const G=b(V);if(!o.isValidNot0(G))return;const re=o.inv(G),de=t.BASE.multiply(G).toAffine(),ce=o.create(de.x);if(ce===Ff)return;const ae=o.create(re*o.create(H+ce*M));if(ae===Ff)return;let be=(de.x===ce?0:2)|Number(de.y&qf),Ce=ae;return C&&l(ae)&&(Ce=u(ae),be^=1),new h(ce,Ce,be)}return{seed:z,k2sig:Y}}const A={lowS:e.lowS,prehash:!1},P={lowS:e.lowS,prehash:!1};function y(S,k,L=A){const{seed:T,k2sig:C}=_(S,k,L);return dX(e.hash.outputLen,o.BYTES,i)(T,C)}t.BASE.precompute(8);function O(S,k,L,T=P){const C=S;k=ei("msgHash",k),L=ei("publicKey",L),wE(T);const{lowS:x,prehash:B,format:R}=T;if("strict"in T)throw new Error("options.strict was renamed to lowS");if(R!==void 0&&!["compact","der","js"].includes(R))throw new Error('format must be "compact", "der" or "js"');const M=typeof C=="string"||Lv(C),U=!M&&!R&&typeof C=="object"&&C!==null&&typeof C.r=="bigint"&&typeof C.s=="bigint";if(!M&&!U)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let z,H;try{if(U)if(R===void 0||R==="js")z=new h(C.r,C.s);else throw new Error("invalid format");if(M){try{R!=="compact"&&(z=h.fromDER(C))}catch(be){if(!(be instanceof xa.Err))throw be}!z&&R!=="der"&&(z=h.fromCompact(C))}H=t.fromHex(L)}catch{return!1}if(!z||x&&z.hasHighS())return!1;B&&(k=e.hash(k));const{r:Y,s:V}=z,G=v(k),re=o.inv(V),de=o.create(G*re),ce=o.create(Y*re),ae=t.BASE.multiplyUnsafe(de).add(H.multiplyUnsafe(ce));return ae.is0()?!1:o.create(ae.x)===Y}return Object.freeze({getPublicKey:p,getSharedSecret:m,sign:y,verify:O,utils:g,Point:t,Signature:h})}function zX(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=$0(e.n,t.nBitLength),i={Fp:r,Fn:n,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:i}}function FX(t){const{CURVE:e,curveOpts:r}=zX(t),n={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,ecdsaOpts:n}}function qX(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function HX(t){const{CURVE:e,curveOpts:r,ecdsaOpts:n}=FX(t),i=UX(e,r),s=jX(i,n,r);return qX(t,s)}function f4(t,e){const r=n=>HX({...t,hash:n});return{...r(e),create:r}}const MO={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},UO={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},jO={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},VX=$0(MO.p),WX=$0(UO.p),KX=$0(jO.p),ZX=f4({...MO,Fp:VX,lowS:!1},tm);f4({...UO,Fp:WX,lowS:!1},rJ),f4({...jO,Fp:KX,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},tJ);const GX=ZX,zO="base10",Bn="base16",qs="base64pad",Mc="base64url",$p="utf8",FO=0,Ra=1,Ap=2,YX=0,mE=1,Hf=12,Wv=32;function JX(){const t=h4.utils.randomPrivateKey(),e=h4.getPublicKey(t);return{privateKey:li(t,Bn),publicKey:li(e,Bn)}}function p4(){const t=I0(Wv);return li(t,Bn)}function XX(t,e){const r=h4.getSharedSecret(us(t,Bn),us(e,Bn)),n=cX(nm,r,void 0,void 0,Wv);return li(n,Bn)}function h2(t){const e=nm(us(t,Bn));return li(e,Bn)}function Io(t){const e=nm(us(t,$p));return li(e,Bn)}function qO(t){return us(`${t}`,zO)}function yu(t){return Number(li(t,zO))}function HO(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function VO(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}function QX(t){const e=qO(typeof t.type<"u"?t.type:FO);if(yu(e)===Ra&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?us(t.senderPublicKey,Bn):void 0,n=typeof t.iv<"u"?us(t.iv,Bn):I0(Hf),i=us(t.symKey,Bn),s=xO(i,n).encrypt
69(us(t.message,$p)),o=WO({type:e,sealed:s,iv:n,senderPublicKey:r});return t.encoding===Mc?HO(o):o}function eQ(t){const e=us(t.symKey,Bn),{sealed:r,iv:n}=B1({encoded:t.encoded,encoding:t.encoding}),i=xO(e,n).decrypt(r);if(i===null)throw new Error("Failed to decrypt");return li(i,$p)}function tQ(t,e){const r=qO(Ap),n=I0(Hf),i=us(t,$p),s=WO({type:r,sealed:i,iv:n});return e===Mc?HO(s):s}function rQ(t,e){const{sealed:r}=B1({encoded:t,encoding:e});return li(r,$p)}function WO(t){if(yu(t.type)===Ap)return li(jf([t.type,t.sealed]),qs);if(yu(t.type)===Ra){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return li(jf([t.type,t.senderPublicKey,t.iv,t.sealed]),qs)}return li(jf([t.type,t.iv,t.sealed]),qs)}function B1(t){const e=(t.encoding||qs)===Mc?VO(t.encoded):t.encoded,r=us(e,qs),n=r.slice(YX,mE),i=mE;if(yu(n)===Ra){const c=i+Wv,l=c+Hf,u=r.slice(i,c),d=r.slice(c,l),h=r.slice(l);return{type:n,sealed:h,iv:d,senderPublicKey:u}}if(yu(n)===Ap){const c=r.slice(i),l=I0(Hf);return{type:n,sealed:c,iv:l}}const s=i+Hf,o=r.slice(i,s),a=r.slice(s);return{type:n,sealed:a,iv:o}}function nQ(t,e){const r=B1({encoded:t,encoding:e==null?void 0:e.encoding});return KO({type:yu(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?li(r.senderPublicKey,Bn):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function KO(t){const e=(t==null?void 0:t.type)||FO;if(e===Ra){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function yE(t){return t.type===Ra&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}function bE(t){return t.type===Ap}function iQ(t){const e=Oe.from(t.x,"base64"),r=Oe.from(t.y,"base64");return jf([new Uint8Array([4]),e,r])}function sQ(t,e){const[r,n,i]=t.split("."),s=Oe.from(VO(i),"base64");if(s.length!==64)throw new Error("Invalid signature length");const o=s.slice(0,32),a=s.slice(32,64),c=`${r}.${n}`,l=nm(c),u=iQ(e);if(!GX.verify(jf([o,a]),l,u))throw new Error("Invalid signature");return kh(t).payload}const oQ="irn";function K2(t){return(t==null?void 0:t.relay)||{protocol:oQ}}function Sf(t){const e=JT[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}function aQ(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=t[i];r[s]=o}}),r}function vE(t){if(!t.includes("wc:")){const l=iO(t);l!=null&&l.includes("wc:")&&(t=l)}t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=new URLSearchParams(s),a={};o.forEach((l,u)=>{a[u]=l});
69const c=typeof a.methods=="string"?a.methods.split(","):void 0;return{protocol:n,topic:cQ(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:aQ(a),methods:c,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function cQ(t){return t.startsWith("//")?t.substring(2):t}function lQ(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const s=i,o=r+e+s;t[s]&&(n[o]=t[s])}),n}function EE(t){const e=new URLSearchParams,r=lQ(t.relay);Object.keys(r).sort().forEach(i=>{e.set(i,r[i])}),e.set("symKey",t.symKey),t.expiryTimestamp&&e.set("expiryTimestamp",t.expiryTimestamp.toString()),t.methods&&e.set("methods",t.methods.join(","));const n=e.toString();return`${t.protocol}:${t.topic}@${t.version}?${n}`}function Og(t,e,r){return`${t}?wc_ev=${r}&topic=${e}`}var uQ=Object.defineProperty,dQ=Object.defineProperties,hQ=Object.getOwnPropertyDescriptors,CE=Object.getOwnPropertySymbols,fQ=Object.prototype.hasOwnProperty,pQ=Object.prototype.propertyIsEnumerable,xE=(t,e,r)=>e in t?uQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gQ=(t,e)=>{for(var r in e||(e={}))fQ.call(e,r)&&xE(t,r,e[r]);if(CE)for(var r of CE(e))pQ.call(e,r)&&xE(t,r,e[r]);return t},wQ=(t,e)=>dQ(t,hQ(e));function A0(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function mQ(t){const e=[];return Object.values(t).forEach(r=>{e.push(...A0(r.accounts))}),e}function yQ(t,e){const r=[];return Object.values(t).forEach(n=>{A0(n.accounts).includes(e)&&r.push(...n.methods)}),r}function bQ(t,e){const r=[];return Object.values(t).forEach(n=>{A0(n.accounts).includes(e)&&r.push(...n.events)}),r}function am(t){return t.includes(":")}function ah(t){return am(t)?t.split(":")[0]:t}function _E(t){var e,r,n;const i={};if(!Ro(t))return i;for(const[s,o]of Object.entries(t)){const a=am(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],u=ah(s);i[u]=wQ(gQ({},i[u]),{chains:ko(a,(e=i[u])==null?void 0:e.chains),methods:ko(c,(r=i[u])==null?void 0:r.methods),events:ko(l,(n=i[u])==null?void 0:n.events)})}return i}function vQ(t){const e={};return t==null||t.forEach(r=>{var n;const[i,s]=r.split(":");e[i]||(e[i]={accounts:[],chains:[],events:[],methods:[]}),e[i].accounts.push(r),(n=e[i].chains)==null||n.push(`${i}:${s}`)}),e}function SE(t,e){e=e.map(n=>n.replace("did:pkh:",""));const r=vQ(e);for(const[n,i]of Object.entries(r))i.methods?i.methods=ko(i.methods,t):i.methods=t,i.events=["chainChanged","accountsChanged"];return r}function EQ(t,e){var r,n,i,s,o,a;const c=_E(t),l=_E(e),u={},d=Object.keys(c).concat(Object.keys(l));for(const h of d)u[h]={chains:ko((r=c[h])==null?void 0:r.chains,(n=l[h])==null?void 0:n.chains),methods:ko((i=c[h])==null?void 0:i.methods,(s=l[h])==null?void 0:s.methods),events:ko((o=c[h])==null?void 0:o.events,(a=l[h])==null?void 0:a.events)};return u}const CQ={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},xQ={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function fe(t,e){const{message:r,code:n}=xQ[t];return{message:e?`${r} ${e}`:r,code:n}}function rr(t,e){const{message:r,code:n}=CQ[t];return{message:e?`${r} ${e}`:r,code:n}}function Ba(t,e){return!!Array.isArray(t)}function Ro(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function sn(t){return typeof t>"u"}function Cr(t,e){return e&&sn(t)?!0:typeof t=="string"&&!!t.trim().length}function Kv(t,e){return e&&sn(t)?!0:typeof t=="number"&&!isNaN(t)}function _Q(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let s=!0;return Zl(i,n)?(n.forEach(o=>{const{accounts:a,methods:c,events:l}=t.namespaces[o],u=A0(a),d=r[o];(!Zl(QT(o,d),u)||!Zl(d.methods,c)||!Zl(d.events,l))&&(s=!1)}),s):!1}function Z2(t){return Cr(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function SQ(t){if(Cr(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Z2(r)}}return!1}function IQ(t){function e(r){try{return typeof new URL(r)<"u"}catch{return!1}}try{if(Cr(t,!1)){if(e(t))return!0;const r=iO(t);return e(r)}}catch{}return!1}function $Q(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function AQ(t){return t==null?void 0:t.topic}function PQ(t,e){let r=null;return Cr(t==null?void 0:t.publicKey,!1)||(r=fe("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function IE(t){let e=!0;return Ba(t)?t.length&&(e=t.every(r=>Cr(r,!1))):e=!1,e}function TQ(t,e,r){let n=null;return Ba(e)&&e.length?e.forEach(i=>
69{n||Z2(i)||(n=rr("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):Z2(t)||(n=rr("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function OQ(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;const o=TQ(i,QT(i,s),`${e} ${r}`);o&&(n=o)}),n}function NQ(t,e){let r=null;return Ba(t)?t.forEach(n=>{r||SQ(n)||(r=rr("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=rr("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function kQ(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=NQ(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function RQ(t,e){let r=null;return IE(t==null?void 0:t.methods)?IE(t==null?void 0:t.events)||(r=rr("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=rr("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function ZO(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=RQ(n,`${e}, namespace`);i&&(r=i)}),r}function BQ(t,e,r){let n=null;if(t&&Ro(t)){const i=ZO(t,e);i&&(n=i);const s=OQ(t,e,r);s&&(n=s)}else n=fe("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function H3(t,e){let r=null;if(t&&Ro(t)){const n=ZO(t,e);n&&(r=n);const i=kQ(t,e);i&&(r=i)}else r=fe("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function GO(t){return Cr(t.protocol,!0)}function DQ(t,e){let r=!1;return t?t&&Ba(t)&&t.length&&t.forEach(n=>{r=GO(n)}):r=!0,r}function LQ(t){return typeof t=="number"}function Xn(t){return typeof t<"u"&&typeof t!==null}function MQ(t){return!(!t||typeof t!="object"||!t.code||!Kv(t.code,!1)||!t.message||!Cr(t.message,!1))}function UQ(t){return!(sn(t)||!Cr(t.method,!1))}function jQ(t){return!(sn(t)||sn(t.result)&&sn(t.error)||!Kv(t.id,!1)||!Cr(t.jsonrpc,!1))}function zQ(t){return!(sn(t)||!Cr(t.name,!1))}function $E(t,e){return!(!Z2(e)||!mQ(t).includes(e))}function FQ(t,e,r){return Cr(r,!1)?yQ(t,e).includes(r):!1}function qQ(t,e,r){return Cr(r,!1)?bQ(t,e).includes(r):!1}function AE(t,e,r){let n=null;const i=HQ(t),s=VQ(e),o=Object.keys(i),a=Object.keys(s),c=PE(Object.keys(t)),l=PE(Object.keys(e)),u=c.filter(d=>!l.includes(d));return u.length&&(n=fe("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
70      Required: ${u.toString()}
71      Received: ${Object.keys(e).toString()}`)),Zl(o,a)||(n=fe("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
72      Required: ${o.toString()}
73      Approved: ${a.toString()}`)),Object.keys(e).forEach(d=>{if(!d.includes(":")||n)return;const h=A0(e[d].accounts);h.includes(d)||(n=fe("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${d}
74        Required: ${d}
75        Approved: ${h.toString()}`))}),o.forEach(d=>{n||(Zl(i[d].methods,s[d].methods)?Zl(i[d].events,s[d].events)||(n=fe("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${d}`)):n=fe("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${d}`))}),n}function HQ(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function PE(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function VQ(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=A0(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function WQ(t,e){return Kv(t,!1)&&t<=e.max&&t>=e.min}function TE(){const t=Sp();return new Promise(e=>{switch(t){case $i.browser:e(KQ());break;case $i.reactNative:e(ZQ());break;case $i.node:e(GQ());break;default:e(!0)}})}function KQ(){return S0()&&(navigator==null?void 0:navigator.onLine)}
75async function ZQ(){if(ol()&&typeof he<"u"&&he!=null&&he.NetInfo){const t=await(he==null?void 0:he.NetInfo.fetch());return t==null?void 0:t.isConnected}return!0}function GQ(){return!0}function YQ(t){switch(Sp()){case $i.browser:JQ(t);break;case $i.reactNative:XQ(t);break}}function JQ(t){!ol()&&S0()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function XQ(t){ol()&&typeof he<"u"&&he!=null&&he.NetInfo&&(he==null||he.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}function QQ(){var t;return S0()&&Zr.getDocument()?((t=Zr.getDocument())==null?void 0:t.visibilityState)==="visible":!0}const V3={};class rf{static get(e){return V3[e]}static set(e,r){V3[e]=r}static delete(e){delete V3[e]}}function eee(t){const e=x0.decode(t);if(e.length<33)throw new Error("Too short to contain a public key");return e.slice(1,33)}function tee({publicKey:t,signature:e,payload:r}){var n;const i=g4(r.method),s=128|parseInt(((n=r.version)==null?void 0:n.toString())||"4"),o=iee(r.address),a=r.era==="00"?new Uint8Array([0]):g4(r.era);if(a.length!==1&&a.length!==2)throw new Error("Invalid era length");const c=parseInt(r.nonce,16),l=new Uint8Array([c&255,c>>8&255]),u=BigInt(`0x${nee(r.tip)}`),d=oee(u),h=new Uint8Array([0,...t,o,...e,...a,...l,...d,...i]),f=see(h.length+1);return new Uint8Array([...f,s,...h])}function ree(t){const e=g4(t),r=WG.blake2b(e,void 0,32);return"0x"+Oe.from(r).toString("hex")}function g4(t){return new Uint8Array(t.replace(/^0x/,"").match(/.{1,2}/g).map(e=>parseInt(e,16)))}function nee(t){return t.startsWith("0x")?t.slice(2):t}function iee(t){const e=x0.decode(t)[0];return e===42?0:e===60?2:1}function see(t){if(t<64)return new Uint8Array([t<<2]);if(t<16384){const e=t<<2|1;return new Uint8Array([e&255,e>>8&255])}else if(t<1<<30){const e=t<<2|2;return new Uint8Array([e&255,e>>8&255,e>>16&255,e>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function oee(t){if(t<BigInt(1)<<BigInt(6))return new Uint8Array([Number(t<<BigInt(2))]);if(t<BigInt(1)<<BigInt(14)){const e=t<<BigInt(2)|BigInt(1);return new Uint8Array([Number(e&BigInt(255)),Number(e>>BigInt(8)&BigInt(255))])}else if(t<BigInt(1)<<BigInt(30)){const e=t<<BigInt(2)|BigInt(2);return new Uint8Array([Number(e&BigInt(255)),Number(e>>BigInt(8)&BigInt(255)),Number(e>>BigInt(16)&BigInt(255)),Number(e>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function aee(t){const e=Uint8Array.from(Oe.from(t.signature,"hex")),r=eee(t.transaction.address),n=tee({publicKey:r,signature:e,payload:t.transaction}),i=Oe.from(n).toString("hex");return ree(i)}class qi{}let cee=class extends qi{constructor(e){super()}};const OE=X.FIVE_SECONDS,Hi={pulse:"heartbeat_pulse"};let YO=class JO extends cee{constructor(e){super(e),this.events=new Nr.EventEmitter,this.interval=OE,this.interval=(e==null?void 0:e.interval)||OE}static async init(e){const r=new JO(e);return await r.init(),r}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),X.toMiliseconds(this.interval))}pulse(){this.events.emit(Hi.pulse)}};function lee(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function Lr(t,...e){try{return lee(t(...e))}catch(r){return Promise.reject(r)}}function uee(t){const e=typeof t;return t===null||e!=="object"&&e!=="function"}function dee(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}function f2(t){if(uee(t))return String(t);if(dee(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return f2(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const w4="base64:";function hee(t){return typeof t=="string"?t:w4+gee(t)}function fee(t){return typeof t!="string"||!t.startsWith(w4)?t:pee(t.slice(w4.length))}function pee(t){return globalThis.Buffer?Oe.from(t,"base64"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))}function gee(t){return globalThis.Buffer?Oe.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))}function Jn(t){var e;return t&&((e=t.split("?")[0])==null?void 0:e.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function wee(...t){return Jn(t.join(":"))}function Ng(t){return t=Jn(t),t?t+":":""}function mee(t,e){if(e===void 0)return!0;let r=0,n=t.indexOf(":");for(;n>-1;)r++,n=t.indexOf(":",n+1);return r<=e}function yee(t,e){return e?t.startsWith(e)&&t[t.length-1]!=="$":t[t.length-1]!=="$"}const bee="memory",vee=()=>{const t=new Map;return{name:bee,getInstance:()=>t,hasItem(e){return t.has(e)},getItem(e){return t.get(e)??null},getItemRaw(e){return t.get(e)??null},setItem(e,r){t.set(e,r)},setItemRaw(e,r){t.set(e,r)},removeItem(e){t.delete(e)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function Eee(t={}){const e={mounts:{"":t.driver||vee()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}}
vendor: 11,994 bytes, line 75
75,r=l=>{for(const u of e.mountpoints)if(l.startsWith(u))return{base:u,relativeKey:l.slice(u.length),driver:e.mounts[u]};return{base:"",relativeKey:l,driver:e.mounts[""]}},n=(l,u)=>e.mountpoints.filter(d=>d.startsWith(l)||u&&l.startsWith(d)).map(d=>({relativeBase:l.length>d.length?l.slice(d.length):void 0,mountpoint:d,driver:e.mounts[d]})),i=(l,u)=>{if(e.watching){u=Jn(u);for(const d of e.watchListeners)d(l,u)}},s=async()=>{if(!e.watching){e.watching=!0;for(const l in e.mounts)e.unwatch[l]=await NE(e.mounts[l],i,l)}},o=async()=>{if(e.watching){for(const l in e.unwatch)await e.unwatch[l]();e.unwatch={},e.watching=!1}},a=(l,u,d)=>{const h=new Map,f=g=>{let p=h.get(g.base);return p||(p={driver:g.driver,base:g.base,items:[]},h.set(g.base,p)),p};for(const g of l){const p=typeof g=="string",w=Jn(p?g:g.key),m=p?void 0:g.value,b=p||!g.options?u:{...u,...g.options},v=r(w);f(v).items.push({key:w,value:m,relativeKey:v.relativeKey,options:b})}return Promise.all([...h.values()].map(g=>d(g))).then(g=>g.flat())},c={hasItem(l,u={}){l=Jn(l);const{relativeKey:d,driver:h}=r(l);return Lr(h.hasItem,d,u)},getItem(l,u={}){l=Jn(l);const{relativeKey:d,driver:h}=r(l);return Lr(h.getItem,d,u).then(f=>yg(f))},getItems(l,u={}){return a(l,u,d=>d.driver.getItems?Lr(d.driver.getItems,d.items.map(h=>({key:h.relativeKey,options:h.options})),u).then(h=>h.map(f=>({key:wee(d.base,f.key),value:yg(f.value)}))):Promise.all(d.items.map(h=>Lr(d.driver.getItem,h.relativeKey,h.options).then(f=>({key:h.key,value:yg(f)})))))},getItemRaw(l,u={}){l=Jn(l);const{relativeKey:d,driver:h}=r(l);return h.getItemRaw?Lr(h.getItemRaw,d,u):Lr(h.getItem,d,u).then(f=>fee(f))},async setItem(l,u,d={}){if(u===void 0)return c.removeItem(l);l=Jn(l);const{relativeKey:h,driver:f}=r(l);f.setItem&&(await Lr(f.setItem,h,f2(u),d),f.watch||i("update",l))},async setItems(l,u){await a(l,u,async d=>{if(d.driver.setItems)return Lr(d.driver.setItems,d.items.map(h=>({key:h.relativeKey,value:f2(h.value),options:h.options})),u);d.driver.setItem&&await Promise.all(d.items.map(h=>Lr(d.driver.setItem,h.relativeKey,f2(h.value),h.options)))})},async setItemRaw(l,u,d={}){if(u===void 0)return c.removeItem(l,d);l=Jn(l);const{relativeKey:h,driver:f}=r(l);if(f.setItemRaw)await Lr(f.setItemRaw,h,u,d);else if(f.setItem)await Lr(f.setItem,h,hee(u),d);else return;f.watch||i("update",l)},async removeItem(l,u={}){typeof u=="boolean"&&(u={removeMeta:u}),l=Jn(l);const{relativeKey:d,driver:h}=r(l);h.removeItem&&(await Lr(h.removeItem,d,u),(u.removeMeta||u.removeMata)&&await Lr(h.removeItem,d+"$",u),h.watch||i("remove",l))},async getMeta(l,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),l=Jn(l);const{relativeKey:d,driver:h}=r(l),f=Object.create(null);if(h.getMeta&&Object.assign(f,await Lr(h.getMeta,d,u)),!u.nativeOnly){const g=await Lr(h.getItem,d+"$",u).then(p=>yg(p));g&&typeof g=="object"&&(typeof g.atime=="string"&&(g.atime=new Date(g.atime)),typeof g.mtime=="string"&&(g.mtime=new Date(g.mtime)),Object.assign(f,g))}return f},setMeta(l,u,d={}){return this.setItem(l+"$",u,d)},removeMeta(l,u={}){return this.removeItem(l+"$",u)},async getKeys(l,u={}){var w;l=Ng(l);const d=n(l,!0);let h=[];const f=[];let g=!0;for(const m of d){(w=m.driver.flags)!=null&&w.maxDepth||(g=!1);const b=await Lr(m.driver.getKeys,m.relativeBase,u);for(const v of b){const E=m.mountpoint+Jn(v);h.some(I=>E.startsWith(I))||f.push(E)}h=[m.mountpoint,...h.filter(v=>!v.startsWith(m.mountpoint))]}const p=u.maxDepth!==void 0&&!g;return f.filter(m=>(!p||mee(m,u.maxDepth))&&yee(m,l))},async clear(l,u={}){l=Ng(l),await Promise.all(n(l,!1).map(async d=>{if(d.driver.clear)return Lr(d.driver.clear,d.relativeBase,u);if(d.driver.removeItem){const h=await d.driver.getKeys(d.relativeBase||"",u);return Promise.all(h.map(f=>d.driver.removeItem(f,u)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(l=>kE(l)))},async watch(l){return await s(),e.watchListeners.push(l),async()=>{e.watchListeners=e.watchListeners.filter(u=>u!==l),e.watchListeners.length===0&&await o()}},async unwatch(){e.watchListeners=[],await o()},mount(l,u){if(l=Ng(l),l&&e.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(e.mountpoints.push(l),e.mountpoints.sort((d,h)=>h.length-d.length)),e.mounts[l]=u,e.watching&&Promise.resolve(NE(u,i,l)).then(d=>{e.unwatch[l]=d}).catch(console.error),c},async unmount(l,u=!0){var d,h;l=Ng(l),!(!l||!e.mounts[l])&&(e.watching&&l in e.unwatch&&((h=(d=e.unwatch)[l])==null||h.call(d),delete e.unwatch[l]),u&&await kE(e.mounts[l]),e.mountpoints=e.mountpoints.filter(f=>f!==l),delete e.mounts[l])},getMount(l=""){l=Jn(l)+":";const u=r(l);return{driver:u.driver,base:u.base}},getMounts(l="",u={}){return l=Jn(l),n(l,u.parents).map(h=>({driver:h.driver,base:h.mountpoint}))},keys:(l,u={})=>c.getKeys(l,u),get:(l,u={})=>c.getItem(l,u),set:(l,u,d={})=>c.setItem(l,u,d),has:(l,u={})=>c.hasItem(l,u),del:(l,u={})=>c.removeItem(l,u),remove:(l,u={})=>c.removeItem(l,u)};return c}function NE(t,e,r){return t.watch?t.watch((n,i)=>e(n,r+i)):()=>{}}async function kE(t){typeof t.dispose=="function"&&await Lr(t.dispose)}function Hu(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function XO(t,e){let r;const n=()=>{if(r)return r;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),r=Hu(i),r.then(s=>{s.onclose=()=>r=void 0},()=>{}),r};return(i,s)=>n().then(o=>s(o.transaction(e,i).objectStore(e)))}let W3;function Pp(){return W3||(W3=XO("keyval-store","keyval")),W3}function RE(t,e=Pp()){return e("readonly",r=>Hu(r.get(t)))}function Cee(t,e,r=Pp()){return r("readwrite",n=>(n.put(e,t),Hu(n.transaction)))}function xee(t,e=Pp()){return e("readwrite",r=>(r.delete(t),Hu(r.transaction)))}function _ee(t=Pp()){return t("readwrite",e=>(e.clear(),Hu(e.transaction)))}function See(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Hu(t.transaction)}function Iee(t=Pp()){return t("readonly",e=>{if(e.getAllKeys)return Hu(e.getAllKeys());const r=[];return See(e,n=>r.push(n.key)).then(()=>r)})}const $ee="idb-keyval";var Aee=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",r=i=>e+i;let n;return t.dbName&&t.storeName&&(n=XO(t.dbName,t.storeName)),{name:$ee,options:t,async hasItem(i){return!(typeof await RE(r(i),n)>"u")},async getItem(i){return await RE(r(i),n)??null},setItem(i,s){return Cee(r(i),s,n)},removeItem(i){return xee(r(i),n)},getKeys(){return Iee(n)},clear(){return _ee(n)}}};const Pee="WALLET_CONNECT_V2_INDEXED_DB",Tee="keyvaluestorage";let Oee=class{constructor(){this.indexedDb=Eee({driver:Aee({dbName:Pee,storeName:Tee})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const r=await this.indexedDb.getItem(e);if(r!==null)return r}async setItem(e,r){await this.indexedDb.setItem(e,zo(r))}async removeItem(e){await this.indexedDb.removeItem(e)}};var K3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof he<"u"?he:typeof self<"u"?self:{},p2={exports:{}};(function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof K3<"u"&&K3.localStorage?p2.exports=K3.localStorage:typeof window<"u"&&window.localStorage?p2.exports=window.localStorage:p2.exports=new e})();function Nee(t){var e;return[t[0],Fa((e=t[1])!=null?e:"")]}let kee=class{constructor(){this.localStorage=p2.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Nee)}async getItem(e){const r=this.localStorage.getItem(e);if(r!==null)return Fa(r)}async setItem(e,r){this.localStorage.setItem(e,zo(r))}async removeItem(e){this.localStorage.removeItem(e)}};const Ree="wc_storage_version",BE=1,Bee=async(t,e,r)=>{const n=Ree,i=await e.getItem(n);if(i&&i>=BE){r(e);return}const s=await t.getKeys();if(!s.length){r(e);return}const o=[];for(;s.length;){const a=s.shift();if(!a)continue;const c=a.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const l=await t.getItem(a);await e.setItem(a,l),o.push(a)}}await e.setItem(n,BE),r(e),Dee(t,o)},Dee=async(t,e)=>{e.length&&e.forEach(async r=>{await t.removeItem(r)})};let QO=class{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const e=new kee;this.storage=e;try{const r=new Oee;Bee(e,r,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,r){return await this.initialize(),this.storage.setItem(e,r)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const r=setInterval(()=>{this.initialized&&(clearInterval(r),e())},20)})}};var Z3,DE;function Lee(){if(DE)return Z3;DE=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}Z3=e;function e(r,n,i){var s=i&&i.stringify||t,o=1;if(typeof r=="object"&&r!==null){var a=n.length+o;if(a===1)return r;var c=new Array(a);c[0]=s(r);for(var l=1;l<a;l++)c[l]=s(n[l]);return c.join(" ")}if(typeof r!="string")return r;var u=n.length;if(u===0)return r;for(var d="",h=1-o,f=-1,g=r&&r.length||0,p=0;p<g;){if(r.charCodeAt(p)===37&&p+1<g){switch(f=f>-1?f:0,r.charCodeAt(p+1)){case 100:case 102:if(h>=u||n[h]==null)break;f<p&&(d+=r.slice(f,p)),d+=Number(n[h]),f=p+2,p++;break;case 105:if(h>=u||n[h]==null)break;f<p&&(d+=r.slice(f,p)),d+=Math.floor(Number(n[h])),f=p+2,p++;break;case 79:case 111:case 106:if(h>=u||n[h]===void 0)break;f<p&&(d+=r.slice(f,p));var w=typeof n[h];if(w==="string"){d+="'"+n[h]+"'",f=p+2,p++;break}if(w==="function"){d+=n[h].name||"<anonymous>",f=p+2,p++;break}d+=s(n[h]),f=p+2,p++;break;case 115:if(h>=u)break;f<p&&(d+=r.slice(f,p)),d+=String(n[h]),f=p+2,p++;break;case 37:f<p&&(d+=r.slice(f,p)),d+="%",f=p+2,p++,h--;break}++h}++p}return f===-1?r:(f<g&&(d+=r.slice(f)),d)}return Z3}var G3,LE;function Mee(){if(LE)return G3;LE=1;const t=Lee();G3=i;const e=I().console||{},r={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:p,wrapResponseSerializer:p,wrapErrorSerializer:p,req:g,res:g,err:h};function n(_,A){return Array.isArray(_)?_.filter(function(y){return y!=="!stdSerializers.err"}):_===!0?Object.keys(A):!1}function i(_){_=_||{},_.browser=_.browser||{};const A=_.browser.transmit;if(A&&typeof A.send!="function")throw Error("pino: transmit option must have a send function");const P=_.browser.write||e;_.browser.write&&(_.browser.asObject=!0);const y=_.serializers||{},O=n(_.browser.serialize,y);let S=_.browser.serialize;Array.isArray(_.browser.serialize)&&_.browser.serialize.indexOf("!stdSerializers.err")>-1&&(S=!1);const k=["error","fatal","warn","info","debug","trace"];typeof P=="function"&&(P.error=P.fatal=P.warn=P.info=P.debug=P.trace=P),_.enabled===!1&&(_.level="silent");const L=_.level||"info",T=Object.create(P);T.log||(T.log=w),Object.defineProperty(T,"levelVal",{get:x}),Object.defineProperty(T,"level",{get:B,set:R});const C={transmit:A,serialize:O,asObject:_.browser.asObject,levels:k,timestamp:f(_)};T.levels=i.levels,T.level=L,T.setMaxListeners=T.getMaxListeners=T.emit=T.addListener=T.on=T.prependListener=T.once=T.prependOnceListener=T.removeListener=T.removeAllListeners=T.listeners=T.listenerCount=T.eventNames=T.write=T.flush=w,T.serializers=y,T._serialize=O,T._stdErrSerialize=S,T.child=M,A&&(T._logEvent=d());
75function x(){return this.level==="silent"?1/0:this.levels.values[this.level]}function B(){return this._level}function R(U){if(U!=="silent"&&!this.levels.values[U])throw Error("unknown level "+U);this._level=U,s(C,T,"error","log"),s(C,T,"fatal","error"),s(C,T,"warn","error"),s(C,T,"info","log"),s(C,T,"debug","log"),s(C,T,"trace","log")}function M(U,z){if(!U)throw new Error("missing bindings for child Pino");z=z||{},O&&U.serializers&&(z.serializers=U.serializers);const H=z.serializers;if(O&&H){var Y=Object.assign({},y,H),V=_.browser.serialize===!0?Object.keys(Y):O;delete U.serializers,c([U],V,Y,this._stdErrSerialize)}function G(re){this._childLevel=(re._childLevel|0)+1,this.error=l(re,U,"error"),this.fatal=l(re,U,"fatal"),this.warn=l(re,U,"warn"),this.info=l(re,U,"info"),this.debug=l(re,U,"debug"),this.trace=l(re,U,"trace"),Y&&(this.serializers=Y,this._serialize=V),A&&(this._logEvent=d([].concat(re._logEvent.bindings,U)))}return G.prototype=this,new G(this)}return T}i.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},i.stdSerializers=r,i.stdTimeFunctions=Object.assign({},{nullTime:m,epochTime:b,unixTime:v,isoTime:E});function s(_,A,P,y){const O=Object.getPrototypeOf(A);A[P]=A.levelVal>A.levels.values[P]?w:O[P]?O[P]:e[P]||e[y]||w,o(_,A,P)}function o(_,A,P){!_.transmit&&A[P]===w||(A[P]=function(y){return function(){const S=_.timestamp(),k=new Array(arguments.length),L=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var T=0;T<k.length;T++)k[T]=arguments[T];if(_.serialize&&!_.asObject&&c(k,this._serialize,this.serializers,this._stdErrSerialize),_.asObject?y.call(L,a(this,P,k,S)):y.apply(L,k),_.transmit){const C=_.transmit.level||A.level,x=i.levels.values[C],B=i.levels.values[P];if(B<x)return;u(this,{ts:S,methodLevel:P,methodValue:B,transmitValue:i.levels.values[_.transmit.level||A.level],send:_.transmit.send,val:A.levelVal},k)}}}(A[P]))}function a(_,A,P,y){_._serialize&&c(P,_._serialize,_.serializers,_._stdErrSerialize);const O=P.slice();let S=O[0];const k={};y&&(k.time=y),k.level=i.levels.values[A];let L=(_._childLevel|0)+1;if(L<1&&(L=1),S!==null&&typeof S=="object"){for(;L--&&typeof O[0]=="object";)Object.assign(k,O.shift());S=O.length?t(O.shift(),O):void 0}else typeof S=="string"&&(S=t(O.shift(),O));return S!==void 0&&(k.msg=S),k}function c(_,A,P,y){for(const O in _)if(y&&_[O]instanceof Error)_[O]=i.stdSerializers.err(_[O]);else if(typeof _[O]=="object"&&!Array.isArray(_[O]))for(const S in _[O])A&&A.indexOf(S)>-1&&S in P&&(_[O][S]=P[S](_[O][S]))}function l(_,A,P){return function(){const y=new Array(1+arguments.length);y[0]=A;for(var O=1;O<y.length;O++)y[O]=arguments[O-1];return _[P].apply(this,y)}}function u(_,A,P){const y=A.send,O=A.ts,S=A.methodLevel,k=A.methodValue,L=A.val,T=_._logEvent.bindings;c(P,_._serialize||Object.keys(_.serializers),_.serializers,_._stdErrSerialize===void 0?!0:_._stdErrSerialize),_._logEvent.ts=O,_._logEvent.messages=P.filter(function(C){return T.indexOf(C)===-1}),_._logEvent.level.label=S,_._logEvent.level.value=k,y(S,_._logEvent,L),_._logEvent=d(T)}function d(_){return{ts:0,messages:[],bindings:_||[],level:{label:"",value:0}}}function h(_){const A={type:_.constructor.name,msg:_.message,stack:_.stack};for(const P in _)A[P]===void 0&&(A[P]=_[P]);return A}function f(_){return typeof _.timestamp=="function"?_.timestamp:_.timestamp===!1?m:b}function g(){return{}}function p(_){return _}function w(){}function m(){return!1}function b(){return Date.now()}function v(){return Math.round(Date.now()/1e3)}function E(){return new Date(Date.now()).toISOString()}function I(){function _(A){return typeof A<"u"&&A}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return _(self)||_(window)||_(this)||{}}}return G3}var rh=Mee();const al=ec(rh),Uee={level:"info"},Tp="custom_context",Zv=1e3*1024;let jee=class{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},ME=class{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const r=new jee(e);
75if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let r=this.head;for(;r!==null;)e.push(r.value),r=r.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const r=e.value;return e=e.next,{done:!1,value:r}}}}},eN=class{constructor(e,r=Zv){this.level=e??"error",this.levelValue=rh.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new ME(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,r){r===rh.levels.values.error?console.error(e):r===rh.levels.values.warn?console.warn(e):r===rh.levels.values.debug?console.debug(e):r===rh.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(zo({timestamp:new Date().toISOString(),log:e}));const r=typeof e=="string"?JSON.parse(e).level:e.level;r>=this.levelValue&&this.forwardToConsole(e,r)}getLogs(){return this.logs}clearLogs(){this.logs=new ME(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const r=this.getLogArray();return r.push(zo({extraMetadata:e})),new Blob(r,{type:"application/json"})}},zee=class{constructor(e,r=Zv){this.baseChunkLogger=new eN(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const r=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}},Fee=class{constructor(e,r=Zv){this.baseChunkLogger=new eN(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var qee=Object.defineProperty,Hee=Object.defineProperties,Vee=Object.getOwnPropertyDescriptors,UE=Object.getOwnPropertySymbols,Wee=Object.prototype.hasOwnProperty,Kee=Object.prototype.propertyIsEnumerable,jE=(t,e,r)=>e in t?qee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G2=(t,e)=>{for(var r in e||(e={}))Wee.call(e,r)&&jE(t,r,e[r]);if(UE)for(var r of UE(e))Kee.call(e,r)&&jE(t,r,e[r]);return t},Y2=(t,e)=>Hee(t,Vee(e));function cl(t){return Y2(G2({},t),{level:(t==null?void 0:t.level)||Uee.level})}function Zee(t,e=Tp){return t[e]||""}function Gee(t,e,r=Tp){return t[r]=e,t}function qt(t,e=Tp){let r="";return typeof t.bindings>"u"?r=Zee(t,e):r=t.bindings().context||"",r}function Yee(t,e,r=Tp){const n=qt(t,r);return n.trim()?`${n}/${e}`:e}function St(t,e,r=Tp){const n=Yee(t,e,r),i=t.child({context:n});return Gee(i,n,r)}function Jee(t){var e,r;const n=new zee((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:al(Y2(G2({},t.opts),{level:"trace",browser:Y2(G2({},(r=t.opts)==null?void 0:r.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function Xee(t){var e;const r=new Fee((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:al(Y2(G2({},t.opts),{level:"trace"}),r),chunkLoggerController:r}}function tN(t){return typeof t.loggerOverride<"u"&&typeof t.loggerOverride!="string"?{logger:t.loggerOverride,chunkLoggerController:null}:typeof window<"u"?Jee(t):Xee(t)}var Qee=Object.defineProperty,ete=(t,e,r)=>e in t?Qee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zE=(t,e,r)=>ete(t,typeof e!="symbol"?e+"":e,r);let tte=class extends qi{constructor(e){super(),this.opts=e,zE(this,"protocol","wc"),zE(this,"version",2)}};var rte=Object.defineProperty,nte=(t,e,r)=>e in t?rte(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ite=(t,e,r)=>nte(t,e+"",r);let ste=class extends qi{constructor(e,r){super(),this.core=e,this.logger=r,ite(this,"records",new Map)}},ote=class{constructor(e,r){this.logger=e,this.core=r}},ate=class extends qi{constructor(e,r){super(),this.relayer=e,this.logger=r}},cte=class extends qi{constructor(e){super()}},lte=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}},ute=class extends qi{constructor(e,r){super(),this.relayer=e,this.logger=r}},dte=class extends qi{constructor(e,r){super(),this.core=e,this.logger=r}},hte=class{constructor(e,r,n){this.core=e,this.logger=r,this.store=n}},fte=class{constructor(e,r){this.projectId=e,this.logger=r}},pte=class{constructor(e,r,n){this.core=e,this.logger=r,this.telemetryEnabled=n}};var gte=Object.defineProperty,wte=(t,e,r)=>e in t?gte(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,FE=(t,e,r)=>wte(t,typeof e!="symbol"?e+"":e,r);let mte=class{constructor(e){this.opts=e,FE(this,"protocol","wc"),FE(this,"version",2)}},yte=class{constructor(e){this.client=e}};const bte="PARSE_ERROR",vte="INVALID_REQUEST",Ete="METHOD_NOT_FOUND",Cte="INVALID_PARAMS",rN="INTERNAL_ERROR",Gv="SERVER_ERROR",xte=[-32700,-32600,-32601,-32602,-32603],Vf={[bte]:{code:-32700,message:"Parse error"},[vte]:{code:-32600,message:"Invalid Request"},[Ete]:{code:-32601,message:"Method not found"},[Cte]:{code:-32602,message:"Invalid params"},[rN]:{code:-32603,message:"Internal error"},[Gv]:{code:-32e3,message:"Server error"}},nN=Gv;function _te(t){return xte.includes(t)}function qE(t){return Object.keys(Vf).includes(t)?Vf[t]:Vf[nN]}function Ste(t){const e=Object.values(Vf).find(r=>r.code===t);return e||Vf[nN]}function iN(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var Y3={};/*! *****************************************************************************
76Copyright (c) Microsoft Corporation.
77
78Permission to use, copy, modify, and/or distribute this software for any
79purpose with or without fee is hereby granted.
80
81THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
82REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
83AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
84INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
85LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
86OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
87PERFORMANCE OF THIS SOFTWARE.
88***************************************************************************** */var m4=function(t,e){return m4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},m4(t,e)};function Ite(t,e){m4(t,e);function r(){this.constructor=t}
vendor: 4,656 bytes, line 88
88t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var y4=function(){return y4=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},y4.apply(this,arguments)};function $te(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function Ate(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function Pte(t,e){return function(r,n){e(r,n,t)}}function Tte(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Ote(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(d){o(d)}}function c(u){try{l(n.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function Nte(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function kte(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Rte(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function b4(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function sN(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function Bte(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(sN(arguments[e]));return t}function Dte(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function D1(t){return this instanceof D1?(this.v=t,this):new D1(t)}function Lte(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){n[h]&&(i[h]=function(f){return new Promise(function(g,p){s.push([h,f,g,p])>1||a(h,f)})})}function a(h,f){try{c(n[h](f))}catch(g){d(s[0][3],g)}}function c(h){h.value instanceof D1?Promise.resolve(h.value.v).then(l,u):d(s[0][2],h)}function l(h){a("next",h)}function u(h){a("throw",h)}function d(h,f){h(f),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Mte(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:D1(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function Ute(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof b4=="function"?b4(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);
88function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function jte(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function zte(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Fte(t){return t&&t.__esModule?t:{default:t}}function qte(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Hte(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Vte=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return y4},__asyncDelegator:Mte,__asyncGenerator:Lte,__asyncValues:Ute,__await:D1,__awaiter:Ote,__classPrivateFieldGet:qte,__classPrivateFieldSet:Hte,__createBinding:kte,__decorate:Ate,__exportStar:Rte,__extends:Ite,__generator:Nte,__importDefault:Fte,__importStar:zte,__makeTemplateOb
vendor: 6,450 bytes, line 88
88ject:jte,__metadata:Tte,__param:Pte,__read:sN,__rest:$te,__spread:Bte,__spreadArrays:Dte,__values:b4},Symbol.toStringTag,{value:"Module"})),Wte=zI(Vte);var aa={},HE;function Kte(){if(HE)return aa;HE=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.isBrowserCryptoAvailable=aa.getSubtleCrypto=aa.getBrowerCrypto=void 0;function t(){return(So==null?void 0:So.crypto)||(So==null?void 0:So.msCrypto)||{}}aa.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}aa.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return aa.isBrowserCryptoAvailable=r,aa}var ca={},VE;function Zte(){if(VE)return ca;VE=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.isBrowser=ca.isNode=ca.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ca.isReactNative=t;function e(){return typeof sr<"u"&&typeof sr.versions<"u"&&typeof sr.versions.node<"u"}ca.isNode=e;function r(){return!t()&&!e()}return ca.isBrowser=r,ca}var WE;function Gte(){return WE||(WE=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Wte;e.__exportStar(Kte(),t),e.__exportStar(Zte(),t)}(Y3)),Y3}var Yte=Gte();function zr(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Ai(t=6){return BigInt(zr(t))}function On(t,e,r){return{id:r||zr(),jsonrpc:"2.0",method:t,params:e}}function ll(t,e){return{id:t,jsonrpc:"2.0",result:e}}function P0(t,e,r){return{id:t,jsonrpc:"2.0",error:Jte(e)}}function Jte(t,e){return typeof t>"u"?qE(rN):(typeof t=="string"&&(t=Object.assign(Object.assign({},qE(Gv)),{message:t})),_te(t.code)&&(t=Ste(t.code)),t)}let Xte=class{},Qte=class extends Xte{constructor(){super()}},ere=class extends Qte{constructor(e){super()}};const tre="^https?:",rre="^wss?:";function nre(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function oN(t,e){const r=nre(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function KE(t){return oN(t,tre)}function ZE(t){return oN(t,rre)}function ire(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function aN(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function T0(t){return aN(t)&&"method"in t}function Vu(t){return aN(t)&&(Tr(t)||cr(t))}function Tr(t){return"result"in t}function cr(t){return"error"in t}let nr=class extends ere{constructor(e){super(e),this.events=new Nr.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(On(e.method,e.params||[],e.id||Ai().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{cr(s)?i(s.error):n(s.result)});try{await this.connection.send(e,r)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Vu(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};const sre=()=>typeof WebSocket<"u"?WebSocket:typeof he<"u"&&typeof he.WebSocket<"u"?he.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),ore=()=>typeof WebSocket<"u"||typeof he<"u"&&typeof he.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",GE=t=>t.split("?")[0],YE=10,are=sre();let cN=class{constructor(e){if(this.url=e,this.events=new Nr.EventEmitter,this.registering=!1,!ZE(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(zo(e))}catch(r){this.onError(e.id,r)}}register(e=this.url){if(!ZE(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{const i=Yte.isReactNative()?void 0:{rejectUnauthorized:!ire(e)},s=new are(e,[],i);ore()?s.onerror=o=>{const a=o;n(this.emitError(a.error))}:s.on("error",o=>{n(this.emitError(o))}),s.onopen=()=>{this.onOpen(s),r(s)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;
88const r=typeof e.data=="string"?Fa(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),s=P0(e,i);this.events.emit("payload",s)}parseError(e,r=this.url){return iN(e,GE(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>YE&&this.events.setMaxListeners(YE)}emitError(e){const r=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${GE(this.url)}`));return this.events.emit("register_error",r),r}};var cre={};const lN="wc",uN=2,v4="core",Fo=`${lN}@2:${v4}:`,lre={logger:"error"},ure={database:":memory:"},dre="crypto",JE="client_ed25519_seed",hre=X.ONE_DAY,fre="keychain",pre="0.3",gre="messages",wre="0.3",XE=X.SIX_HOURS,mre="publisher",dN="irn",yre="error",hN="wss://relay.walletconnect.org",bre="relayer",Fr={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},vre="_subscription",Gi={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Ere=.1,E4="2.21.5",Gt={link_mode:"link_mode",relay:"relay"},g2={inbound:"inbound",outbound:"outbound"},Cre="0.3",xre="WALLETCONNECT_CLIENT_ID",QE="WALLETCONNECT_LINK_MODE_APPS",Ci={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},_re="subscription",Sre="0.3",Ire="pairing",$re="0.3",nf={wc_pairingDelete:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:X.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:X.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:X.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:X.ONE_DAY,prompt:!1,tag:0},res:{ttl:X.ONE_DAY,prompt:!1,tag:0}}},Bl={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},As={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},Are="history",Pre="0.3",Tre="expirer",ns={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},Ore="0.3",Nre="verify-api",kre="https://verify.walletconnect.com",fN="https://verify.walletconnect.org",Wf=fN,Rre=`${Wf}/v3`,Bre=[kre,fN],Dre="echo",Lre="https://echo.walletconnect.com",Eo={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},ba={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},Ps={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},El={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},Cl={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"}
vendor: 20,177 bytes, line 88
88,sf={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},Mre=.1,Ure="event-client",jre=86400,zre="https://pulse.walletconnect.org/batch";function Fre(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var p=0,w=0,m=0,b=g.length;m!==b&&g[m]===0;)m++,p++;for(var v=(b-m)*u+1>>>0,E=new Uint8Array(v);m!==b;){for(var I=g[m],_=0,A=v-1;(I!==0||_<w)&&A!==-1;A--,_++)I+=256*E[A]>>>0,E[A]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");w=_,m++}for(var P=v-w;P!==v&&E[P]===0;)P++;for(var y=c.repeat(p);P<v;++P)y+=t.charAt(E[P]);return y}function h(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var p=0;if(g[p]!==" "){for(var w=0,m=0;g[p]===c;)w++,p++;for(var b=(g.length-p)*l+1>>>0,v=new Uint8Array(b);g[p];){var E=r[g.charCodeAt(p)];if(E===255)return;for(var I=0,_=b-1;(E!==0||I<m)&&_!==-1;_--,I++)E+=a*v[_]>>>0,v[_]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");m=I,p++}if(g[p]!==" "){for(var A=b-m;A!==b&&v[A]===0;)A++;for(var P=new Uint8Array(w+(b-A)),y=w;A!==b;)P[y++]=v[A++];return P}}}function f(g){var p=h(g);if(p)return p;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:h,decode:f}}var qre=Fre,Hre=qre;const pN=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Vre=t=>new TextEncoder().encode(t),Wre=t=>new TextDecoder().decode(t);let Kre=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Zre=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return gN(this,e)}},Gre=class{constructor(e){this.decoders=e}or(e){return gN(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const gN=(t,e)=>new Gre({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let Yre=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new Kre(e,r,n),this.decoder=new Zre(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const cm=({name:t,prefix:e,encode:r,decode:n})=>new Yre(t,e,r,n),Op=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=Hre(r,e);return cm({prefix:t,name:e,encode:n,decode:s=>pN(i(s))})},Jre=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const d=i[t[u]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|d,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},Xre=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},dn=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>cm({prefix:e,name:t,encode(i){return Xre(i,n,r)},decode(i){return Jre(i,n,r,t)}}),Qre=cm({prefix:"\0",name:"identity",encode:t=>Wre(t),decode:t=>Vre(t)});var ene=Object.freeze({__proto__:null,identity:Qre});const tne=dn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var rne=Object.freeze({__proto__:null,base2:tne});const nne=dn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var ine=Object.freeze({__proto__:null,base8:nne});const sne=Op({prefix:"9",name:"base10",alphabet:"0123456789"});var one=Object.freeze({__proto__:null,base10:sne});const ane=dn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cne=dn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var lne=Object.freeze({__proto__:null,base16:ane,base16upper:cne});const une=dn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),dne=dn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),hne=dn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),fne=dn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),pne=dn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),gne=dn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),wne=dn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),mne=dn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),yne=dn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var bne=Object.freeze({__proto__:null,base32:une,base32upper:dne,base32pad:hne,base32padupper:fne,base32hex:pne,base32hexupper:gne,base32hexpad:wne,base32hexpadupper:mne,base32z:yne});const vne=Op({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ene=Op({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Cne=Object.freeze({__proto__:null,base36:vne,base36upper:Ene});const xne=Op({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),_ne=Op({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Sne=Object.freeze({__proto__:null,base58btc:xne,base58flickr:_ne});const Ine=dn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),$ne=dn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ane=dn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Pne=dn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Tne=Object.freeze({__proto__:null,base64:Ine,base64pad:$ne,base64url:Ane,base64urlpad:Pne});const wN=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),One=wN.reduce((t,e,r)=>(t[r]=e,t),[]),Nne=wN.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function kne(t){return t.reduce((e,r)=>(e+=One[r],e),"")}function Rne(t){const e=[];for(const r of t){const n=Nne[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const Bne=cm({prefix:"🚀",name:"base256emoji",encode:kne,decode:Rne});var Dne=Object.freeze({__proto__:null,base256emoji:Bne}),Lne=mN,eC=128,Mne=-128,Une=Math.pow(2,31);function mN(t,e,r){e=e||[],r=r||0;for(var n=r;t>=Une;)e[r++]=t&255|eC,t/=128;for(;t&Mne;)e[r++]=t&255|eC,t>>>=7;return e[r]=t|0,mN.bytes=r-n+1,e}var jne=C4,zne=128,tC=127;function C4(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw C4.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&tC)<<i:(o&tC)*Math.pow(2,i),i+=7}while(o>=zne);return C4.bytes=s-n,r}var Fne=Math.pow(2,7),qne=Math.pow(2,14),Hne=Math.pow(2,21),Vne=Math.pow(2,28),Wne=Math.pow(2,35),Kne=Math.pow(2,42),Zne=Math.pow(2,49),Gne=Math.pow(2,56),Yne=Math.pow(2,63),Jne=function(t){return t<Fne?1:t<qne?2:t<Hne?3:t<Vne?4:t<Wne?5:t<Kne?6:t<Zne?7:t<Gne?8:t<Yne?9:10},Xne={encode:Lne,decode:jne,encodingLength:Jne},yN=Xne;const rC=(t,e,r=0)=>(yN.encode(t,e,r),e),nC=t=>yN.encodingLength(t),x4=(t,e)=>{const r=e.byteLength,n=nC(t),i=n+nC(r),s=new Uint8Array(i+r);return rC(t,s,0),rC(r,s,n),s.set(e,i),new Qne(t,r,e,s)};let Qne=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const bN=({name:t,code:e,encode:r})=>new eie(t,e,r);let eie=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?x4(this.code,r):r.then(n=>x4(this.code,n))}else throw Error("Unknown type, must be binary type")}};const vN=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),tie=bN({name:"sha2-256",code:18,encode:vN("SHA-256")}),rie=bN({name:"sha2-512",code:19,encode:vN("SHA-512")});var nie=Object.freeze({__proto__:null,sha256:tie,sha512:rie});const EN=0,iie="identity",CN=pN,sie=t=>x4(EN,CN(t)),oie={code:EN,name:iie,encode:CN,digest:sie};var aie=Object.freeze({__proto__:null,identity:oie});new TextEncoder,new TextDecoder;const iC={...ene,...rne,...ine,...one,...lne,...bne,...Cne,...Sne,...Tne,...Dne};({...nie,...aie});function xN(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function cie(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?xN(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function _N(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const sC=_N("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),J3=_N("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=cie(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),lie={utf8:sC,"utf-8":sC,hex:iC.base16,latin1:J3,ascii:J3,binary:J3,...iC};function uie(t,e="utf8"){const r=lie[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?xN(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}var die=Object.defineProperty,hie=(t,e,r)=>e in t?die(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ho=(t,e,r)=>hie(t,typeof e!="symbol"?e+"":e,r);let fie=class{constructor(e,r){this.core=e,this.logger=r,ho(this,"keychain",new Map),ho(this,"name",fre),ho(this,"version",pre),ho(this,"initialized",!1),ho(this,"storagePrefix",Fo),ho(this,"init",async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}}),ho(this,"has",n=>(this.isInitialized(),this.keychain.has(n))),ho(this,"set",async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()}),ho(this,"get",n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=fe("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i}),ho(this,"del",async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()}),this.core=e,this.logger=St(r,this.name)}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,n4(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?i4(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}};var pie=Object.defineProperty,gie=(t,e,r)=>e in t?pie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qr=(t,e,r)=>gie(t,typeof e!="symbol"?e+"":e,r);let wie=class{constructor(e,r,n){this.core=e,this.logger=r,Qr(this,"name",dre),Qr(this,"keychain"),Qr(this,"randomSessionIdentifier",p4()),Qr(this,"initialized",!1),Qr(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),Qr(this,"hasKeys",i=>(this.isInitialized(),this.keychain.has(i))),Qr(this,"getClientId",async()=>{this.isInitialized();const i=await this.getClientSeed(),s=F2(i);return Nv(s.publicKey)}),Qr(this,"generateKeyPair",()=>{this.isInitialized();const i=JX();return this.setPrivateKey(i.publicKey,i.privateKey)}),Qr(this,"signJWT",async i=>{this.isInitialized();const s=await this.getClientSeed(),o=F2(s),a=this.randomSessionIdentifier;return await VT(a,i,hre,o)}),Qr(this,"generateSharedKey",(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),c=XX(a,s);return this.setSymKey(c,o)}),Qr(this,"setSymKey",async(i,s)=>{this.isInitialized();const o=s||h2(i);return await this.keychain.set(o,i),o}),Qr(this,"deleteKeyPair",async i=>{this.isInitialized(),await this.keychain.del(i)}),Qr(this,"deleteSymKey",async i=>{this.isInitialized(),await this.keychain.del(i)}),Qr(this,"encode",async(i,s,o)=>{this.isInitialized();const a=KO(o),c=zo(s);if(bE(a))return tQ(c,o==null?void 0:o.encoding);if(yE(a)){const h=a.senderPublicKey,f=a.receiverPublicKey;i=await this.generateSharedKey(h,f)}const l=this.getSymKey(i),{type:u,senderPublicKey:d}=a;return QX({type:u,symKey:l,message:c,senderPublicKey:d,encoding:o==null?void 0:o.encoding})}),Qr(this,"decode",async(i,s,o)=>{this.isInitialized();const a=nQ(s,o);if(bE(a)){const c=rQ(s,o==null?void 0:o.encoding);return Fa(c)}if(yE(a)){const c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(i),l=eQ({symKey:c,encoded:s,encoding:o==null?void 0:o.encoding});return Fa(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}}),Qr(this,"getPayloadType",(i,s=qs)=>{const o=B1({encoded:i,encoding:s});return yu(o.type)}),Qr(this,"getPayloadSenderPublicKey",(i,s=qs)=>{const o=B1({encoded:i,encoding:s});return o.senderPublicKey?li(o.senderPublicKey,Bn):void 0}),this.core=e,this.logger=St(r,this.name),this.keychain=n||new fie(this.core,this.logger)}get context(){return qt(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(JE)}catch{e=p4(),await this.keychain.set(JE,e)}return uie(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}};var mie=Object.defineProperty,yie=Object.defineProperties,bie=Object.getOwnPropertyDescriptors,oC=Object.getOwnPropertySymbols,vie=Object.prototype.hasOwnProperty,Eie=Object.prototype.propertyIsEnumerable,_4=(t,e,r)=>e in t?mie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cie=(t,e)=>{for(var r in e||(e={}))vie.call(e,r)&&_4(t,r,e[r]);if(oC)for(var r of oC(e))Eie.call(e,r)&&_4(t,r,e[r]);return t},xie=(t,e)=>yie(t,bie(e)),yi=(t,e,r)=>_4(t,typeof e!="symbol"?e+"":e,r);let _ie=class extends ote{constructor(e,r){super(e,r),this.logger=e,this.core=r,yi(this,"messages",new Map),yi(this,"messagesWithoutClientAck",new Map),yi(this,"name",gre),yi(this,"version",wre),yi(this,"initialized",!1),yi(this,"storagePrefix",Fo),yi(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n);const i=await this.getRelayerMessagesWithoutClientAck();typeof i<"u"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),yi(this,"set",async(n,i,s)=>{this.isInitialized();const o=Io(i);let a=this.messages.get(n);if(typeof a>"u"&&(a={}),typeof a[o]<"u")return o;if(a[o]=i,this.messages.set(n,a),s===g2.inbound){const c=this.messagesWithoutClientAck.get(n)||{};this.messagesWithoutClientAck.set(n,xie(Cie({},c),{[o]:i}))}return await this.persist(),o}),yi(this,"get",n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i}),yi(this,"getWithoutAck",n=>{this.isInitialized();const i={};for(const s of n){const o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),yi(this,"has",(n,i)=>{this.isInitialized();const s=this.get(n),o=Io(i);return typeof s[o]<"u"}),yi(this,"ack",async(n,i)=>{this.isInitialized();const s=this.messagesWithoutClientAck.get(n);if(typeof s>"u")return;const o=Io(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(n):this.messagesWithoutClientAck.set(n,s),await this.persist()}),yi(this,"del",async n=>{this.isInitialized(),this.messages.delete(n),this.messagesWithoutClientAck.delete(n),await this.persist()}),this.logger=St(e,this.name),this.core=r}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,n4(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,n4(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?i4(e):void 0}async getRelayerMessagesWithoutClientAck(){const e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof e<"u"?i4(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}};var Sie=Object.defineProperty,Iie=Object.defineProperties,$ie=Object.getOwnPropertyDescriptors,aC=Object.getOwnPropertySymbols,Aie=Object.prototype.hasOwnProperty,Pie=Object.prototype.propertyIsEnumerable,S4=(t,e,r)=>e in t?Sie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,kg=(t,e)=>{for(var r in e||(e={}))Aie.call(e,r)&&S4(t,r,e[r]);if(aC)for(var r of aC(e))Pie.call(e,r)&&S4(t,r,e[r]);return t},X3=(t,e)=>Iie(t,$ie(e)),Ts=(t,e,r)=>S4(t,typeof e!="symbol"?e+"":e,r);let Tie=class extends ate{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,Ts(this,"events",new Nr.
88EventEmitter),Ts(this,"name",mre),Ts(this,"queue",new Map),Ts(this,"publishTimeout",X.toMiliseconds(X.ONE_MINUTE)),Ts(this,"initialPublishTimeout",X.toMiliseconds(X.ONE_SECOND*15)),Ts(this,"needsTransportRestart",!1),Ts(this,"publish",async(n,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});const a=(s==null?void 0:s.ttl)||XE,c=K2(s),l=(s==null?void 0:s.prompt)||!1,u=(s==null?void 0:s.tag)||0,d=(s==null?void 0:s.id)||Ai().toString(),h={topic:n,message:i,opts:{ttl:a,relay:c,prompt:l,tag:u,id:d,attestation:s==null?void 0:s.attestation,tvf:s==null?void 0:s.tvf}},f=`Failed to publish payload, please try again. id:${d} tag:${u}`;try{const g=new Promise(async p=>{const w=({id:b})=>{h.opts.id===b&&(this.removeRequestFromQueue(b),this.relayer.events.removeListener(Fr.publish,w),p(h))};this.relayer.events.on(Fr.publish,w);const m=zc(new Promise((b,v)=>{this.rpcPublish({topic:n,message:i,ttl:a,prompt:l,tag:u,id:d,attestation:s==null?void 0:s.attestation,tvf:s==null?void 0:s.tvf}).then(b).catch(E=>{this.logger.warn(E,E==null?void 0:E.message),v(E)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${d} tag:${u}`);try{await m,this.events.removeListener(Fr.publish,w)}catch(b){this.queue.set(d,X3(kg({},h),{attempt:1})),this.logger.warn(b,b==null?void 0:b.message)}});this.logger.trace({type:"method",method:"publish",params:{id:d,topic:n,message:i,opts:s}}),await zc(g,this.publishTimeout,f)}catch(g){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(g),(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw g}finally{this.queue.delete(d)}}),Ts(this,"on",(n,i)=>{this.events.on(n,i)}),Ts(this,"once",(n,i)=>{this.events.once(n,i)}),Ts(this,"off",(n,i)=>{this.events.off(n,i)}),Ts(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.relayer=e,this.logger=St(r,this.name),this.registerEventListeners()}get context(){return qt(this.logger)}async rpcPublish(e){var r,n,i,s;const{topic:o,message:a,ttl:c=XE,prompt:l,tag:u,id:d,attestation:h,tvf:f}=e,g={method:Sf(K2().protocol).publish,params:kg({topic:o,message:a,ttl:c,prompt:l,tag:u,attestation:h},f),id:d};sn((r=g.params)==null?void 0:r.prompt)&&((n=g.params)==null||delete n.prompt),sn((i=g.params)==null?void 0:i.tag)&&((s=g.params)==null||delete s.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:g});const p=await this.relayer.request(g);return this.relayer.events.emit(Fr.publish,e),this.logger.debug("Successfully Published Payload"),p}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,r)=>{const n=e.attempt+1;this.queue.set(r,X3(kg({},e),{attempt:n}));const{topic:i,message:s,opts:o,attestation:a}=e;this.logger.warn({},`Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${n}`),await this.rpcPublish(X3(kg({},e),{topic:i,message:s,ttl:o.ttl,prompt:o.prompt,tag:o.tag,id:o.id,attestation:a,tvf:o.tvf})),this.logger.warn({},`Publisher: queue->published: ${e.opts.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(Hi.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Fr.connection_stalled);return}this.checkQueue()}),this.relayer.on(Fr.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}};var Oie=Object.defineProperty,Nie=(t,e,r)=>e in t?Oie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xd=(t,e,r)=>Nie(t,typeof e!="symbol"?e+"":e,r);let kie=class{constructor(){xd(this,"map",new Map),xd(this,"set",(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])}),xd(this,"get",e=>this.map.get(e)||[]),xd(this,"exists",(e,r)=>this.get(e).includes(r)),xd(this,"delete",(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(s=>s!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),xd(this,"clear",()=>{this.map.clear()})}
vendor: 5,024 bytes, line 88
88get topics(){return Array.from(this.map.keys())}};var Rie=Object.defineProperty,Bie=Object.defineProperties,Die=Object.getOwnPropertyDescriptors,cC=Object.getOwnPropertySymbols,Lie=Object.prototype.hasOwnProperty,Mie=Object.prototype.propertyIsEnumerable,I4=(t,e,r)=>e in t?Rie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,of=(t,e)=>{for(var r in e||(e={}))Lie.call(e,r)&&I4(t,r,e[r]);if(cC)for(var r of cC(e))Mie.call(e,r)&&I4(t,r,e[r]);return t},Q3=(t,e)=>Bie(t,Die(e)),Lt=(t,e,r)=>I4(t,typeof e!="symbol"?e+"":e,r);let Uie=class extends ute{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,Lt(this,"subscriptions",new Map),Lt(this,"topicMap",new kie),Lt(this,"events",new Nr.EventEmitter),Lt(this,"name",_re),Lt(this,"version",Sre),Lt(this,"pending",new Map),Lt(this,"cached",[]),Lt(this,"initialized",!1),Lt(this,"storagePrefix",Fo),Lt(this,"subscribeTimeout",X.toMiliseconds(X.ONE_MINUTE)),Lt(this,"initialSubscribeTimeout",X.toMiliseconds(X.ONE_SECOND*15)),Lt(this,"clientId"),Lt(this,"batchSubscribeTopicsLimit",500),Lt(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),Lt(this,"subscribe",async(n,i)=>{this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=K2(i),o={topic:n,relay:s,transportType:i==null?void 0:i.transportType};this.pending.set(n,o);const a=await this.rpcSubscribe(n,s,i);return typeof a=="string"&&(this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}}),Lt(this,"unsubscribe",async(n,i)=>{this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)}),Lt(this,"isSubscribed",n=>new Promise(i=>{i(this.topicMap.topics.includes(n))})),Lt(this,"isKnownTopic",n=>new Promise(i=>{i(this.topicMap.topics.includes(n)||this.pending.has(n)||this.cached.some(s=>s.topic===n))})),Lt(this,"on",(n,i)=>{this.events.on(n,i)}),Lt(this,"once",(n,i)=>{this.events.once(n,i)}),Lt(this,"off",(n,i)=>{this.events.off(n,i)}),Lt(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),Lt(this,"start",async()=>{await this.onConnect()}),Lt(this,"stop",async()=>{await this.onDisconnect()}),Lt(this,"restart",async()=>{await this.restore(),await this.onRestart()}),Lt(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const n=[];this.pending.forEach(i=>{n.push(i)}),await this.batchSubscribe(n)}),Lt(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(Hi.pulse,async()=>{await this.checkPending()}),this.events.on(Ci.created,async n=>{const i=Ci.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()}),this.events.on(Ci.deleted,async n=>{const i=Ci.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()})}),this.relayer=e,this.logger=St(r,this.name),this.clientId=""}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=K2(n);await this.restartToComplete({topic:e,id:r,relay:i}),await this.rpcUnsubscribe(e,r,i);const s=rr("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r,n){var i;(!n||(n==null?void 0:n.transportType)===Gt.relay)&&await this.restartToComplete({topic:e,id:e,relay:r});const s={method:Sf(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});const o=(i=n==null?void 0:n.internal)==null?void 0:i.throwOnFailedPublish;
88try{const a=await this.getSubscriptionId(e);if((n==null?void 0:n.transportType)===Gt.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(u=>this.logger.warn(u))},X.toMiliseconds(X.ONE_SECOND)),a;const c=new Promise(async u=>{const d=h=>{h.topic===e&&(this.events.removeListener(Ci.created,d),u(h.id))};this.events.on(Ci.created,d);try{const h=await zc(new Promise((f,g)=>{this.relayer.request(s).catch(p=>{this.logger.warn(p,p==null?void 0:p.message),g(p)}).then(f)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(Ci.created,d),u(h)}catch{}}),l=await zc(c,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!l&&o)throw new Error(`Subscribing to ${e} failed, please try again`);return l?a:null}catch(a){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Fr.connection_stalled),o)throw a}return null}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:Sf(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await zc(new Promise(i=>{this.relayer.request(n).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(Fr.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const r=e[0].relay,n={method:Sf(r.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let i;try{i=await await zc(new Promise((s,o)=>{this.relayer.request(n).catch(a=>{this.logger.warn(a),o(a)}).then(s)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(Fr.connection_stalled)}return i}rpcUnsubscribe(e,r,n){const i={method:Sf(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,Q3(of({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,of({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r)}addSubscription(e,r){this.subscriptions.set(e,of({},r)),this.topicMap.set(r.topic,e),this.events.emit(Ci.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:n}=fe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Ci.deleted,Q3(of({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ci.sync)}async onRestart(){if(this.cached.length){const e=[...this.cached],r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<r;n++){const i=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(Ci.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=fe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async r=>Q3(of({}
88,r),{id:await this.getSubscriptionId(r.topic)})))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await bY(X.toMiliseconds(X.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(e){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return Io(e+await this.getClientId())}};var jie=Object.defineProperty,lC=Object.getOwnPropertySymbols,zie=Object.prototype.hasOwnProperty,Fie=Object.prototype.propertyIsEnumerable,$4=(t,e,r)=>e in t?jie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,uC=(t,e)=>{for(var r in e||(e={}))zie.call(e,r)&&$4(t,r,e[r]);if(lC)for(var r of lC(e))Fie.call(e,r)&&$4(t,r,e[r]);return t},ut=(t,e,r)=>$4(t,typeof e!="symbol"?e+"":e,r);let qie=class extends cte{constructor(e){super(e),ut(this,"protocol","wc"),ut(this,"version",2),ut(this,"core"),ut(this,"logger"),ut(this,"events",new Nr.EventEmitter),ut(this,"provider"),ut(this,"messages"),ut(this,"subscriber"),ut(this,"publisher"),ut(this,"name",bre),ut(this,"transportExplicitlyClosed",!1),ut(this,"initialized",!1),ut(this,"connectionAttemptInProgress",!1),ut(this,"relayUrl"),ut(this,"projectId"),ut(this,"packageName"),ut(this,"bundleId"),ut(this,"hasExperiencedNetworkDisruption",!1),ut(this,"pingTimeout"),ut(this,"heartBeatTimeout",X.toMiliseconds(X.THIRTY_SECONDS+X.FIVE_SECONDS)),ut(this,"reconnectTimeout"),ut(this,"connectPromise"),ut(this,"reconnectInProgress",!1),ut(this,"requestsInFlight",[]),ut(this,"connectTimeout",X.toMiliseconds(X.ONE_SECOND*15)),ut(this,"request",async r=>{var n,i;this.logger.debug("Publishing Request Payload");const s=r.id||Ai().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:r.method,topic:(n=r.params)==null?void 0:n.topic},"relayer.request - publishing...");const o=`${s}:${((i=r.params)==null?void 0:i.tag)||""}`;this.requestsInFlight.push(o);const a=await this.provider.request(r);return this.requestsInFlight=this.requestsInFlight.filter(c=>c!==o),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),ut(this,"resetPingTimeout",()=>{q2()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var r,n,i,s;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(s=(i=(n=(r=this.provider)==null?void 0:r.connection)==null?void 0:n.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o==null?void 0:o.message)}},this.heartBeatTimeout))}),ut(this,"onPayloadHandler",r=>{this.onProviderPayload(r),this.resetPingTimeout()}),ut(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(Fr.connect)}),ut(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),ut(this,"onProviderErrorHandler",r=>{this.logger.fatal(`Fatal socket error: ${r.message}`),this.events.emit(Fr.error,r),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),ut(this,"registerProviderListeners",()=>{this.provider.on(Gi.payload,this.onPayloadHandler),this.provider.on(Gi.connect,this.onConnectHandler),this.provider.on(Gi.disconnect,this.onDisconnectHandler),this.provider.on(Gi.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?St(e.logger,this.name):al(cl({level:e.logger||yre})),this.messages=new _ie(this.logger,e.core),this.subscriber=new Uie(this,this.logger),this.publisher=new Tie(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||hN,this.projectId=e.projectId,nY()?this.packageName=j7():iY()&&(this.bundleId=j7()),this.provider={}}
88async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(e=>this.logger.warn(e,e==null?void 0:e.message))}get context(){return qt(this.logger)}get connected(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===1||!1}get connecting(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===0||this.connectPromise!==void 0||!1}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now(),transportType:Gt.relay},g2.outbound)}async subscribe(e,r){var n,i,s;this.isInitialized(),(!(r!=null&&r.transportType)||(r==null?void 0:r.transportType)==="relay")&&await this.toEstablishConnection();const o=typeof((n=r==null?void 0:r.internal)==null?void 0:n.throwOnFailedPublish)>"u"?!0:(i=r==null?void 0:r.internal)==null?void 0:i.throwOnFailedPublish;let a=((s=this.subscriber.topicMap.get(e))==null?void 0:s[0])||"",c;const l=u=>{u.topic===e&&(this.subscriber.off(Ci.created,l),c())};return await Promise.all([new Promise(u=>{c=u,this.subscriber.on(Ci.created,l)}),new Promise(async(u,d)=>{a=await this.subscriber.subscribe(e,uC({internal:{throwOnFailedPublish:o}},r)).catch(h=>{o&&d(h)})||a,u()})]),a}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await zc(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(r,n)=>{await this.connect(e).then(r).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await TE())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const r=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${r.length} message events sorted`);for(const n of r)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i,"Error while processing batch message event: "+(i==null?void 0:i.message))}this.logger.trace(`Batch of ${r.length} message events processed`)}async onLinkMessageEvent(e,r){const{topic:n}=e;if(!r.sessionExists){const i=$r(X.FIVE_MINUTES),s={topic:n,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(n,s)}this.events.emit(Fr.message,e),await this.recordMessageEvent(e,g2.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let r=1;for(;r<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${r}...`),await this.createProvider(),await new Promise(async(n,i)=>{const s=()=>
vendor: 85,109 bytes, line 88
88{i(new Error("Connection interrupted while trying to connect"))};this.provider.once(Gi.disconnect,s),await zc(new Promise((o,a)=>{this.provider.connect().then(o).catch(a)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(Gi.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,a)=>{const c=()=>{i(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(Gi.disconnect,c),await this.subscriber.start().then(o).catch(a).finally(()=>{this.provider.off(Gi.disconnect,c)})}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){await this.subscriber.stop();const i=n;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${r}`);break}await new Promise(n=>setTimeout(n,X.toMiliseconds(r*1))),r++}}startPingTimeout(){var e,r,n,i,s;if(q2())try{(r=(e=this.provider)==null?void 0:e.connection)!=null&&r.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o==null?void 0:o.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new nr(new cN(lY({sdkVersion:E4,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,r){const{topic:n,message:i}=e;await this.messages.set(n,i,r)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isKnownTopic(r))return this.logger.warn(`Ignoring message for unknown topic ${r}`),!0;const i=this.messages.has(r,n);return i&&this.logger.warn(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),T0(e)){if(!e.method.endsWith(vre))return;const r=e.params,{topic:n,message:i,publishedAt:s,attestation:o}=r.data,a={topic:n,message:i,publishedAt:s,transportType:Gt.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(uC({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else Vu(e)&&this.events.emit(Fr.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,g2.inbound),this.events.emit(Fr.message,e))}async acknowledgePayload(e){const r=ll(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(Gi.payload,this.onPayloadHandler),this.provider.off(Gi.connect,this.onConnectHandler),this.provider.off(Gi.disconnect,this.onDisconnectHandler),this.provider.off(Gi.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await TE();YQ(async r=>{e!==r&&(e=r,r?await this.transportOpen().catch(n=>this.logger.error(n,n==null?void 0:n.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(Hi.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&QQ())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(r){this.logger.warn(r,r==null?void 0:r.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Fr.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e==null?void 0:e.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},X.toMiliseconds(Ere)))))}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}};function Hie(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function dC(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function hC(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Vie="[object RegExp]",Wie="[object String]",Kie="[object Number]",Zie="[object Boolean]",fC="[object Arguments]",Gie="[object Symbol]",Yie="[object Date]",Jie="[object Map]",Xie="[object Set]",Qie="[object Array]",ese="[object Function]",tse="[object ArrayBuffer]",e5="[object Object]",rse="[object Error]",nse="[object DataView]",ise="[object Uint8Array]",sse="[object Uint8ClampedArray]",ose="[object Uint16Array]",ase="[object Uint32Array]",cse="[object BigUint64Array]",lse="[object Int8Array]",use="[object Int16Array]",dse="[object Int32Array]",hse="[object BigInt64Array]",fse="[object Float32Array]",pse="[object Float64Array]";function gse(){}function pC(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function wse(t,e,r){return If(t,e,void 0,void 0,void 0,void 0,r)}function If(t,e,r,n,i,s,o){const a=o(t,e,r,n,i,s);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return Kf(t,e,s,o)}return Kf(t,e,s,o)}function Kf(t,e,r,n){if(Object.is(t,e))return!0;let i=hC(t),s=hC(e);if(i===fC&&(i=e5),s===fC&&(s=e5),i!==s)return!1;switch(i){case Wie:return t.toString()===e.toString();case Kie:{const c=t.valueOf(),l=e.valueOf();return Hie(c,l)}case Zie:case Yie:case Gie:return Object.is(t.valueOf(),e.valueOf());case Vie:return t.source===e.source&&t.flags===e.flags;case ese:return t===e}r=r??new Map;const o=r.get(t),a=r.get(e);if(o!=null&&a!=null)return o===e;r.set(t,e),r.set(e,t);try{switch(i){case Jie:{if(t.size!==e.size)return!1;for(const[c,l]of t.entries())if(!e.has(c)||!If(l,e.get(c),c,t,e,r,n))return!1;return!0}case Xie:{if(t.size!==e.size)return!1;const c=Array.from(t.values()),l=Array.from(e.values());for(let u=0;u<c.length;u++){const d=c[u],h=l.findIndex(f=>If(d,f,void 0,t,e,r,n));if(h===-1)return!1;l.splice(h,1)}return!0}case Qie:case ise:case sse:case ose:case ase:case cse:case lse:case use:case dse:case hse:case fse:case pse:{if(typeof Oe<"u"&&Oe.isBuffer(t)!==Oe.isBuffer(e)||t.length!==e.length)return!1;for(let c=0;c<t.length;c++)if(!If(t[c],e[c],c,t,e,r,n))return!1;return!0}case tse:return t.byteLength!==e.byteLength?!1:Kf(new Uint8Array(t),new Uint8Array(e),r,n);case nse:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:Kf(new Uint8Array(t),new Uint8Array(e),r,n);case rse:return t.name===e.name&&t.message===e.message;case e5:{if(!(Kf(t.constructor,e.constructor,r,n)||pC(t)&&pC(e)))return!1;const c=[...Object.keys(t),...dC(t)],l=[...Object.keys(e),...dC(e)];if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++){const d=c[u],h=t[d];if(!Object.hasOwn(e,d))return!1;const f=e[d];if(!If(h,f,d,t,e,r,n))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}function mse(t,e){return wse(t,e,gse)}var yse=Object.defineProperty,gC=Object.getOwnPropertySymbols,bse=Object.prototype.hasOwnProperty,vse=Object.prototype.propertyIsEnumerable,A4=(t,e,r)=>e in t?yse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wC=(t,e)=>{for(var r in e||(e={}))bse.call(e,r)&&A4(t,r,e[r]);if(gC)for(var r of gC(e))vse.call(e,r)&&A4(t,r,e[r]);return t},Fn=(t,e,r)=>A4(t,typeof e!="symbol"?e+"":e,r);let Wu=class extends lte{constructor(e,r,n,i=Fo,s=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,Fn(this,"map",new Map),Fn(this,"version",Cre),Fn(this,"cached",[]),Fn(this,"initialized",!1),Fn(this,"getKey"),Fn(this,"storagePrefix",Fo),Fn(this,"recentlyDeleted",[]),Fn(this,"recentlyDeletedLimit",200),Fn(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!sn(o)?this.map.set(this.getKey(o),o):$Q(o)?this.map.set(o.id,o):AQ(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),Fn(this,"set",async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())}),Fn(this,"get",o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o))),Fn(this,"getAll",o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>mse(a[c],o[c]))):this.values)),Fn(this,"update",async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const c=wC(wC({},this.getData(o)),a);this.map.set(o,c),await this.persist()}),Fn(this,"delete",async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=St(r,this.name),this.storagePrefix=i,this.getKey=s}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){if(this.recentlyDeleted.includes(e)){const{message:i}=fe("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=fe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=fe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}};var Ese=Object.defineProperty,Cse=(t,e,r)=>e in t?Ese(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,et=(t,e,r)=>Cse(t,typeof e!="symbol"?e+"":e,r);let xse=class{constructor(e,r){this.core=e,this.logger=r,et(this,"name",Ire),et(this,"version",$re),et(this,"events",new v0),et(this,"pairings"),et(this,"initialized",!1),et(this,"storagePrefix",Fo),et(this,"ignoredPayloadTypes",[Ra]),et(this,"registeredMethods",[]),et(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),et(this,"register",({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]}),et(this,"create",async n=>{this.isInitialized();const i=p4(),s=await this.core.crypto.setSymKey(i),o=$r(X.FIVE_MINUTES),a={protocol:dN},c={topic:s,expiry:o,relay:a,active:!1,methods:n==null?void 0:n.methods},l=EE({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n==null?void 0:n.methods});return this.events.emit(Bl.create,c),this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s,{transportType:n==null?void 0:n.transportType}),{topic:s,uri:l}}),et(this,"pair",async n=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:n==null?void 0:n.uri,trace:[Eo.pairing_started]}});this.isValidPair(n,i);const{topic:s,symKey:o,relay:a,expiryTimestamp:c,methods:l}=vE(n.uri);i.props.properties.topic=s,i.addTrace(Eo.pairing_uri_validation_success),i.addTrace(Eo.pairing_uri_not_expired);let u;if(this.pairings.keys.includes(s)){if(u=this.pairings.get(s),i.addTrace(Eo.existing_pairing),u.active)throw i.setError(ba.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(Eo.pairing_not_expired)}const d=c||$r(X.FIVE_MINUTES),h={topic:s,relay:a,expiry:d,active:!1,methods:l};this.core.expirer.set(s,d),await this.pairings.set(s,h),i.addTrace(Eo.store_new_pairing),n.activatePairing&&await this.activate({topic:s}),this.events.emit(Bl.create,h),i.addTrace(Eo.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(Eo.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(ba.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:a})}catch(f){throw i.setError(ba.subscribe_pairing_topic_failure),f}return i.addTrace(Eo.subscribe_pairing_topic_success),h}),et(this,"activate",async({topic:n})=>{this.isInitialized();const i=$r(X.FIVE_MINUTES);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})}),et(this,"ping",async n=>{this.isInitialized(),await this.isValidPing(n),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:c}=Pl();this.events.once(xt("pairing_ping",s),({error:l})=>{l?c(l):a()}),await o()}}),et(this,"updateExpiry",async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})}),et(this,"updateMetadata",async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})}),et(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),et(this,"disconnect",async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",rr("USER_DISCONNECTED")),await this.deletePairing(i))}),et(this,"formatUriFromPairing",n=>{this.isInitialized();const{topic:i,relay:s,expiry:o,methods:a}=n,c=this.core.crypto.keychain.get(i);return EE({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:c,relay:s,expiryTimestamp:o,methods:a})}),et(this,"sendRequest",async(n,i,s)=>{const o=On(i,s),a=await this.core.crypto.encode(n,o),c=nf[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id}),et(this,"sendResult",async(n,i,s)=>{const o=ll(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=nf[c].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),et(this,"sendError",async(n,i,s)=>{const o=P0(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=nf[c]?nf[c].res:nf.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),et(this,"deletePairing",async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,rr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),et(this,"cleanup",async()=>{const n=this.pairings.getAll().filter(i=>Nc(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))}),et(this,"onRelayEventRequest",async n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return await this.onPairingPingRequest(i,s);case"wc_pairingDelete":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),et(this,"onRelayEventResponse",async n=>{const{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}}),et(this,"onPairingPingRequest",async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(Bl.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),et(this,"onPairingPingResponse",(n,i)=>{const{id:s}=i;setTimeout(()=>{Tr(i)?this.events.emit(xt("pairing_ping",s),{}):cr(i)&&this.events.emit(xt("pairing_ping",s),{error:i.error})},500)}),et(this,"onPairingDeleteRequest",async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Bl.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),et(this,"onUnknownRpcMethodRequest",async(n,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=rr("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}}),et(this,"onUnknownRpcMethodResponse",n=>{this.registeredMethods.includes(n)||this.logger.error(rr("WC_METHOD_UNSUPPORTED",n))}),et(this,"isValidPair",(n,i)=>{var s;if(!Xn(n)){const{message:a}=fe("MISSING_OR_INVALID",`pair() params: ${n}`);throw i.setError(ba.malformed_pairing_uri),new Error(a)}if(!IQ(n.uri)){const{message:a}=fe("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw i.setError(ba.malformed_pairing_uri),new Error(a)}const o=vE(n==null?void 0:n.uri);if(!((s=o==null?void 0:o.relay)!=null&&s.protocol)){const{message:a}=fe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(ba.malformed_pairing_uri),new Error(a)}if(!(o!=null&&o.symKey)){const{message:a}=fe("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(ba.malformed_pairing_uri),new Error(a)}if(o!=null&&o.expiryTimestamp&&X.toMiliseconds(o==null?void 0:o.expiryTimestamp)<Date.now()){i.setError(ba.pairing_expired);const{message:a}=fe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(a)}}),et(this,"isValidPing",async n=>{if(!Xn(n)){const{message:s}=fe("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)}),et(this,"isValidDisconnect",async n=>{if(!Xn(n)){const{message:s}=fe("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)}),et(this,"isValidPairingTopic",async n=>{if(!Cr(n,!1)){const{message:i}=fe("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=fe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(Nc(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=fe("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=St(r,this.name),this.pairings=new Wu(this.core,this.logger,this.name,this.storagePrefix)}get context(){return qt(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Fr.message,async e=>{const{topic:r,message:n,transportType:i}=e;if(this.pairings.keys.includes(r)&&i!==Gt.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{const s=await this.core.crypto.decode(r,n);T0(s)?(this.core.history.set(r,s),await this.onRelayEventRequest({topic:r,payload:s})):Vu(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:r,payload:s}),this.core.history.delete(r,s.id)),await this.core.relayer.messages.ack(r,n)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(ns.expired,async e=>{const{topic:r}=nO(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(Bl.expire,{topic:r}))})}};var _se=Object.defineProperty,Sse=(t,e,r)=>e in t?_se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,en=(t,e,r)=>Sse(t,typeof e!="symbol"?e+"":e,r);let Ise=class extends ste{constructor(e,r){super(e,r),this.core=e,this.logger=r,en(this,"records",new Map),en(this,"events",new Nr.EventEmitter),en(this,"name",Are),en(this,"version",Pre),en(this,"cached",[]),en(this,"initialized",!1),en(this,"storagePrefix",Fo),en(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),en(this,"set",(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:$r(X.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(As.created,o)}),en(this,"resolve",async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=cr(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(As.updated,i))}),en(this,"get",async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i))),en(this,"delete",(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(As.deleted,s)}}),this.persist()}),en(this,"exists",async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1)),en(this,"on",(n,i)=>{this.events.on(n,i)}),en(this,"once",(n,i)=>{this.events.once(n,i)}),en(this,"off",(n,i)=>{this.events.off(n,i)}),en(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=St(r,this.name)}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:On(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=fe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(As.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=fe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(As.created,e=>{const r=As.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(As.updated,e=>{const r=As.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(As.deleted,e=>{const r=As.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.core.heartbeat.on(Hi.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(r=>{X.toMiliseconds(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.records.delete(r.id),this.events.emit(As.deleted,r,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}};var $se=Object.defineProperty,Ase=(t,e,r)=>e in t?$se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mn=(t,e,r)=>Ase(t,typeof e!="symbol"?e+"":e,r);let Pse=class extends dte{constructor(e,r){super(e,r),this.core=e,this.logger=r,mn(this,"expirations",new Map),mn(this,"events",new Nr.EventEmitter),mn(this,"name",Tre),mn(this,"version",Ore),mn(this,"cached",[]),mn(this,"initialized",!1),mn(this,"storagePrefix",Fo),mn(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),mn(this,"has",n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}}),mn(this,"set",(n,i)=>{this.isInitialized();const s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(ns.created,{target:s,expiration:o})}),mn(this,"get",n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)}),mn(this,"del",n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(ns.deleted,{target:i,expiration:s})}}),mn(this,"on",(n,i)=>{this.events.on(n,i)}),mn(this,"once",(n,i)=>{this.events.once(n,i)}),mn(this,"off",(n,i)=>{this.events.off(n,i)}),mn(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=St(r,this.name)}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return uY(e);if(typeof e=="number")return dY(e);const{message:r}=fe("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(ns.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=fe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=fe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;X.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(ns.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(Hi.pulse,()=>this.checkExpirations()),this.events.on(ns.created,e=>{const r=ns.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ns.expired,e=>{const r=ns.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ns.deleted,e=>{const r=ns.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}};var Tse=Object.defineProperty,Ose=(t,e,r)=>e in t?Tse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,br=(t,e,r)=>Ose(t,typeof e!="symbol"?e+"":e,r);let Nse=class extends hte{constructor(e,r,n){super(e,r,n),this.core=e,this.logger=r,this.store=n,br(this,"name",Nre),br(this,"abortController"),br(this,"isDevEnv"),br(this,"verifyUrlV3",Rre),br(this,"storagePrefix",Fo),br(this,"version",uN),br(this,"publicKey"),br(this,"fetchPromise"),br(this,"init",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&X.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),br(this,"register",async i=>{if(!S0()||this.isDevEnv)return;const s=window.location.origin,{id:o,decryptedId:a}=i,c=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${a}`;try{const l=Zr.getDocument(),u=this.startAbortTimer(X.ONE_SECOND*5),d=await new Promise((h,f)=>{const g=()=>{window.removeEventListener("message",w),l.body.removeChild(p),f("attestation aborted")};this.abortController.signal.addEventListener("abort",g);const p=l.createElement("iframe");p.src=c,p.style.display="none",p.addEventListener("error",g,{signal:this.abortController.signal});const w=m=>{if(m.data&&typeof m.data=="string")try{const b=JSON.parse(m.data);if(b.type==="verify_attestation"){if(kh(b.attestation).payload.id!==o)return;clearInterval(u),l.body.removeChild(p),this.abortController.signal.removeEventListener("abort",g),window.removeEventListener("message",w),h(b.attestation===null?"":b.attestation)}}catch(b){this.logger.warn(b)}};l.body.appendChild(p),window.addEventListener("message",w,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",d),d}catch(l){this.logger.warn(l)}return""}),br(this,"resolve",async i=>{if(this.isDevEnv)return"";const{attestationId:s,hash:o,encryptedId:a}=i;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(kh(s).payload.id!==a)return;const l=await this.isValidJwtAttestation(s);if(l){if(!l.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return l}}if(!o)return;const c=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(o,c)}),br(this,"fetchAttestation",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);const o=this.startAbortTimer(X.ONE_SECOND*5),a=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),a.status===200?await a.json():void 0}),br(this,"getVerifyUrl",i=>{let s=i||Wf;return Bre.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${Wf}`),s=Wf),s}),br(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(X.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),br(this,"persistPublicKey",async i=>{this.logger.debug("persisting public key to local storage",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),br(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),br(this,"isValidJwtAttestation",async i=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}const o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}}),br(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),br(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i}),br(this,"validateAttestation",(i,s)=>{const o=sQ(i,s.publicKey),a={hasExpired:X.toMiliseconds(o.exp)<Date.now(),payload:o};if(a.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:a.payload.origin,isScam:a.payload.isScam,isVerified:a.payload.isVerified}}),this.logger=St(r,this.name),this.abortController=new AbortController,this.isDevEnv=Rv(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return qt(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),X.toMiliseconds(e))}};var kse=Object.defineProperty,Rse=(t,e,r)=>e in t?kse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mC=(t,e,r)=>Rse(t,typeof e!="symbol"?e+"":e,r);let Bse=class extends fte{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,mC(this,"context",Dre),mC(this,"registerDeviceToken",async n=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${Lre}/${this.projectId}/clients`;await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})}),this.logger=St(r,this.context)}};var Dse=Object.defineProperty,yC=Object.getOwnPropertySymbols,Lse=Object.prototype.hasOwnProperty,Mse=Object.prototype.propertyIsEnumerable,P4=(t,e,r)=>e in t?Dse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,af=(t,e)=>{for(var r in e||(e={}))Lse.call(e,r)&&P4(t,r,e[r]);if(yC)for(var r of yC(e))Mse.call(e,r)&&P4(t,r,e[r]);return t},kr=(t,e,r)=>P4(t,typeof e!="symbol"?e+"":e,r);let Use=class extends pte{constructor(e,r,n=!0){super(e,r,n),this.core=e,this.logger=r,kr(this,"context",Ure),kr(this,"storagePrefix",Fo),kr(this,"storageVersion",Mre),kr(this,"events",new Map),kr(this,"shouldPersist",!1),kr(this,"init",async()=>{if(!Rv())try{const i={eventId:F7(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:tO(this.core.relayer.protocol,this.core.relayer.version,E4)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),kr(this,"createEvent",i=>{const{event:s="ERROR",type:o="",properties:{topic:a,trace:c}}=i,l=F7(),u=this.core.projectId||"",d=Date.now(),h=af({eventId:l,timestamp:d,props:{event:s,type:o,properties:{topic:a,trace:c}},bundleId:u,domain:this.getAppDomain()},this.setMethods(l));return this.telemetryEnabled&&(this.events.set(l,h),this.shouldPersist=!0),h}),kr(this,"getEvent",i=>{const{eventId:s,topic:o}=i;if(s)return this.events.get(s);const a=Array.from(this.events.values()).find(c=>c.props.properties.topic===o);if(a)return af(af({},a),this.setMethods(a.eventId))}),kr(this,"deleteEvent",i=>{const{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),kr(this,"setEventListeners",()=>{this.core.heartbeat.on(Hi.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{X.fromMiliseconds(Date.now())-X.fromMiliseconds(i.timestamp)>jre&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),kr(this,"setMethods",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),kr(this,"addTrace",(i,s)=>{const o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),kr(this,"setError",(i,s)=>{const o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),kr(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),kr(this,"restore",async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,af(af({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),kr(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),kr(this,"sendEvent",async i=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${zre}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${E4}${s}`,{method:"POST",body:JSON.stringify(i)})}),kr(this,"getAppDomain",()=>eO().url),this.logger=St(r,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}};var jse=Object.defineProperty,bC=Object.getOwnPropertySymbols,zse=Object.prototype.hasOwnProperty,Fse=Object.prototype.propertyIsEnumerable,T4=(t,e,r)=>e in t?jse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vC=(t,e)=>{for(var r in e||(e={}))zse.call(e,r)&&T4(t,r,e[r]);if(bC)for(var r of bC(e))Fse.call(e,r)&&T4(t,r,e[r]);return t},Ht=(t,e,r)=>T4(t,typeof e!="symbol"?e+"":e,r);let qse=class SN extends tte{constructor(e){var r;super(e),Ht(this,"protocol",lN),Ht(this,"version",uN),Ht(this,"name",v4),Ht(this,"relayUrl"),Ht(this,"projectId"),Ht(this,"customStoragePrefix"),Ht(this,"events",new Nr.EventEmitter),Ht(this,"logger"),Ht(this,"heartbeat"),Ht(this,"relayer"),Ht(this,"crypto"),Ht(this,"storage"),Ht(this,"history"),Ht(this,"expirer"),Ht(this,"pairing"),Ht(this,"verify"),Ht(this,"echoClient"),Ht(this,"linkModeSupportedApps"),Ht(this,"eventClient"),Ht(this,"initialized",!1),Ht(this,"logChunkController"),Ht(this,"on",(a,c)=>this.events.on(a,c)),Ht(this,"once",(a,c)=>this.events.once(a,c)),Ht(this,"off",(a,c)=>this.events.off(a,c)),Ht(this,"removeListener",(a,c)=>this.events.removeListener(a,c)),Ht(this,"dispatchEnvelope",({topic:a,message:c,sessionExists:l})=>{if(!a||!c)return;const u={topic:a,message:c,publishedAt:Date.now(),transportType:Gt.link_mode};this.relayer.onLinkMessageEvent(u,{sessionExists:l})});const n=this.getGlobalCore(e==null?void 0:e.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(a){console.warn("Failed to copy global core",a)}this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||hN,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const i=cl({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:lre.logger,name:v4}),{logger:s,chunkLoggerController:o}=tN({opts:i,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=o,(r=this.logChunkController)!=null&&r.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,c;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((c=this.logChunkController)==null||c.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=St(s,this.name),this.heartbeat=new YO,this.crypto=new wie(this,this.logger,e==null?void 0:e.keychain),this.history=new Ise(this,this.logger),this.expirer=new Pse(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new QO(vC(vC({},ure),e==null?void 0:e.storageOptions)),this.relayer=new qie({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new xse(this,this.logger),this.verify=new Nse(this,this.logger,this.storage),this.echoClient=new Bse(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new Use(this,this.logger,e==null?void 0:e.telemetryEnabled),this.setGlobalCore(this)}static async init(e){const r=new SN(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(xre,n),r}get context(){return qt(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(QE,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(QE)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}getGlobalCore(e=""){try{if(this.isGlobalCoreDisabled())return;const r=`_walletConnectCore_${e}`,n=`${r}_count`;return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[n]} times.`),globalThis[r]}catch(r){console.warn("Failed to get global WalletConnect core",r);return}}setGlobalCore(e){var r;try{if(this.isGlobalCoreDisabled())return;const n=`_walletConnectCore_${((r=e.opts)==null?void 0:r.customStoragePrefix)||""}`;globalThis[n]=e}catch(n){console.warn("Failed to set global WalletConnect core",n)}}isGlobalCoreDisabled(){try{return typeof sr<"u"&&cre.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}};const Hse=qse,IN="wc",$N=2,AN="client",Yv=`${IN}@${$N}:${AN}:`,t5={name:AN,logger:"error"},EC="WALLETCONNECT_DEEPLINK_CHOICE",Vse="proposal",CC="Proposal expired",Wse="session",_d=X.SEVEN_DAYS,Kse="engine",Rr={wc_sessionPropose:{req:{ttl:X.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1104},res:{ttl:X.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1106},res:{ttl:X.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:X.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:X.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1112},res:{ttl:X.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1114},res:{ttl:X.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:X.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:X.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1119}}},r5={min:X.FIVE_MINUTES,max:X.SEVEN_DAYS},fo={idle:"IDLE",active:"ACTIVE"},Zse={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},Gse="request",Yse=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],Jse="wc",Xse="auth",Qse="authKeys",eoe="pairingTopics",toe="requests",lm=`${Jse}@${1.5}:${Xse}:`,w2=`${lm}:PUB_KEY`;var roe=Object.defineProperty,noe=Object.defineProperties,ioe=Object.getOwnPropertyDescriptors,xC=Object.getOwnPropertySymbols,soe=Object.prototype.hasOwnProperty,ooe=Object.prototype.propertyIsEnumerable,O4=(t,e,r)=>e in t?roe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Zt=(t,e)=>{for(var r in e||(e={}))soe.call(e,r)&&O4(t,r,e[r]);if(xC)for(var r of xC(e))ooe.call(e,r)&&O4(t,r,e[r]);return t},qn=(t,e)=>noe(t,ioe(e)),le=(t,e,r)=>O4(t,typeof e!="symbol"?e+"":e,r);let aoe=class extends yte{constructor(e){super(e),le(this,"name",Kse),le(this,"events",new v0),le(this,"initialized",!1),le(this,"requestQueue",{state:fo.idle,queue:[]}),le(this,"sessionRequestQueue",{state:fo.idle,queue:[]}),le(this,"emittedSessionRequests",new vY({limit:500})),le(this,"requestQueueDelay",X.ONE_SECOND),le(this,"expectedPairingMethodMap",new Map),le(this,"recentlyDeletedMap",new Map),le(this,"recentlyDeletedLimit",200),le(this,"relayMessageCache",[]),le(this,"pendingSessions",new Map),le(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(Rr)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},X.toMiliseconds(this.requestQueueDelay)))}),le(this,"connect",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const n=qn(Zt({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n),n.optionalNamespaces=EQ(n.requiredNamespaces,n.optionalNamespaces),n.requiredNamespaces={};const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,scopedProperties:c,relays:l}=n;let u=i,d,h=!1;try{if(u){const _=this.client.core.pairing.pairings.get(u);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),h=_.active}}catch(_){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),_}if(!u||!h){const{topic:_,uri:A}=await this.client.core.pairing.create();u=_,d=A}if(!u){const{message:_}=fe("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(_)}const f=await this.client.core.crypto.generateKeyPair(),g=Rr.wc_sessionPropose.req.ttl||X.FIVE_MINUTES,p=$r(g),w=qn(Zt(Zt({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:dN}],proposer:{publicKey:f,metadata:this.client.metadata},expiryTimestamp:p,pairingTopic:u},a&&{sessionProperties:a}),c&&{scopedProperties:c}),{id:zr()}),m=xt("session_connect",w.id),{reject:b,resolve:v,done:E}=Pl(g,CC),I=({id:_})=>{_===w.id&&(this.client.events.off("proposal_expire",I),this.pendingSessions.delete(w.id),this.events.emit(m,{error:{message:CC,code:0}}))};return this.client.events.on("proposal_expire",I),this.events.once(m,({error:_,session:A})=>{this.client.events.off("proposal_expire",I),_?b(_):A&&v(A)}),await this.sendRequest({topic:u,method:"wc_sessionPropose",params:w,throwOnFailedPublish:!0,clientRpcId:w.id}),await this.setProposal(w.id,w),{uri:d,approval:E}}),le(this,"pair",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(r)}catch(n){throw this.client.logger.error("pair() failed"),n}}),le(this,"approve",async r=>{var n,i,s;const o=this.client.core.eventClient.createEvent({properties:{topic:(n=r==null?void 0:r.id)==null?void 0:n.toString(),trace:[Ps.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(y){throw o.setError(El.no_internet_connection),y}try{await this.isValidProposalId(r==null?void 0:r.id)}catch(y){throw this.client.logger.error(`approve() -> proposal.get(${r==null?void 0:r.id}) failed`),o.setError(El.proposal_not_found),y}try{await this.isValidApprove(r)}catch(y){throw this.client.logger.error("approve() -> isValidApprove() failed"),o.setError(El.session_approve_namespace_validation_failure),y}const{id:a,relayProtocol:c,namespaces:l,sessionProperties:u,scopedProperties:d,sessionConfig:h}=r,f=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:o.eventId});const{pairingTopic:g,proposer:p,requiredNamespaces:w,optionalNamespaces:m}=f;let b=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:g});b||(b=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:Ps.session_approve_started,properties:{topic:g,trace:[Ps.session_approve_started,Ps.session_namespaces_validation_success]}}));const v=await this.client.core.crypto.generateKeyPair(),E=p.publicKey,I=await this.client.core.crypto.generateSharedKey(v,E),_=Zt(Zt(Zt({relay:{protocol:c??"irn"},namespaces:l,controller:{publicKey:v,metadata:this.client.metadata},expiry:$r(_d)},u&&{sessionProperties:u}),d&&{scopedProperties:d}),h&&{sessionConfig:h}),A=Gt.relay;b.addTrace(Ps.subscribing_session_topic);try{await this.client.core.relayer.subscribe(I,{transportType:A})}catch(y){throw b.setError(El.subscribe_session_topic_failure),y}b.addTrace(Ps.subscribe_session_topic_success);const P=qn(Zt({},_),{topic:I,requiredNamespaces:w,optionalNamespaces:m,pairingTopic:g,acknowledged:!1,self:_.controller,peer:{publicKey:p.publicKey,metadata:p.metadata},controller:v,transportType:Gt.relay});await this.client.session.set(I,P),b.addTrace(Ps.store_session);try{b.addTrace(Ps.publishing_session_settle),await this.sendRequest({topic:I,method:"wc_sessionSettle",params:_,throwOnFailedPublish:!0}).catch(y=>{throw b==null||b.setError(El.session_settle_publish_failure),y}),b.addTrace(Ps.session_settle_publish_success),b.addTrace(Ps.publishing_session_approve),await this.sendResult({id:a,topic:g,result:{relay:{protocol:c??"irn"},responderPublicKey:v},throwOnFailedPublish:!0}).catch(y=>{throw b==null||b.setError(El.session_approve_publish_failure),y}),b.addTrace(Ps.session_approve_publish_success)}catch(y){throw this.client.logger.error(y),this.client.session.delete(I,rr("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(I),y}return this.client.core.eventClient.deleteEvent({eventId:b.eventId}),await this.client.core.pairing.updateMetadata({topic:g,metadata:p.metadata}),await this.deleteProposal(a),await this.client.core.pairing.activate({topic:g}),await this.setExpiry(I,$r(_d)),{topic:I,acknowledged:()=>Promise.resolve(this.client.session.get(I))}}),le(this,"reject",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(r)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:n,reason:i}=r;let s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}s&&await this.sendError({id:n,topic:s,error:i,rpcOpts:Rr.wc_sessionPropose.reject}),await this.deleteProposal(n)}),le(this,"update",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(r)}catch(d){throw this.client.logger.error("update() -> isValidUpdate() failed"),d}const{topic:n,namespaces:i}=r,{done:s,resolve:o,reject:a}=Pl(),c=zr(),l=Ai().toString(),u=this.client.session.get(n).namespaces;return this.events.once(xt("session_update",c),({error:d})=>{d?a(d):o()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(d=>{this.client.logger.error(d),this.client.session.update(n,{namespaces:u}),a(d)}),{acknowledged:s}}),le(this,"extend",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(r)}catch(c){throw this.client.logger.error("extend() -> isValidExtend() failed"),c}const{topic:n}=r,i=zr(),{done:s,resolve:o,reject:a}=Pl();return this.events.once(xt("session_extend",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(n,$r(_d)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}}),le(this,"request",async r=>{this.isInitialized();try{await this.isValidRequest(r)}catch(w){throw this.client.logger.error("request() -> isValidRequest() failed"),w}const{chainId:n,request:i,topic:s,expiry:o=Rr.wc_sessionRequest.req.ttl}=r,a=this.client.session.get(s);(a==null?void 0:a.transportType)===Gt.relay&&await this.confirmOnlineStateOrThrow();const c=zr(),l=Ai().toString(),{done:u,resolve:d,reject:h}=Pl(o,"Request expired. Please try again.");this.events.once(xt("session_request",c),({error:w,result:m})=>{w?h(w):d(m)});const f="wc_sessionRequest",g=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(g)return await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:f,params:{request:qn(Zt({},i),{expiryTimestamp:$r(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0,appLink:g}).catch(w=>h(w)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:c}),await u();const p={request:qn(Zt({},i),{expiryTimestamp:$r(o)}),chainId:n};return await Promise.all([new Promise(async w=>{await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:f,params:p,expiry:o,throwOnFailedPublish:!0,tvf:this.getTVFParams(c,p)}).catch(m=>h(m)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:c}),w()}),new Promise(async w=>{var m;if(!((m=a.sessionConfig)!=null&&m.disableDeepLink)){const b=await gY(this.client.core.storage,EC);await hY({id:c,topic:s,wcDeepLink:b})}w()}),u()]).then(w=>w[2])}),le(this,"respond",async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:s}=i,o=this.client.session.get(n);o.transportType===Gt.relay&&await this.confirmOnlineStateOrThrow();const a=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Tr(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0,appLink:a}):cr(i)&&await this.sendError({id:s,topic:n,error:i.error,appLink:a}),this.cleanupAfterResponse(r)}),le(this,"ping",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(r)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=zr(),s=Ai().toString(),{done:o,resolve:a,reject:c}=Pl();this.events.once(xt("session_ping",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:n}))}),le(this,"emit",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(r);const{topic:n,event:i,chainId:s}=r,o=Ai().toString(),a=zr();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:a})}),le(this,"disconnect",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(r);const{topic:n}=r;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:rr("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=fe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),le(this,"find",r=>(this.isInitialized(),this.client.session.getAll().filter(n=>_Q(n,r)))),le(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),le(this,"authenticate",async(r,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(r);const s=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?Gt.link_mode:Gt.relay;o===Gt.relay&&await this.confirmOnlineStateOrThrow();const{chains:a,statement:c="",uri:l,domain:u,nonce:d,type:h,exp:f,nbf:g,methods:p=[],expiry:w}=r,m=[...r.resources||[]],{topic:b,uri:v}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:b,uri:v}});const E=await this.client.core.crypto.generateKeyPair(),I=h2(E);if(await Promise.all([this.client.auth.authKeys.set(w2,{responseTopic:I,publicKey:E}),this.client.auth.pairingTopics.set(I,{topic:I,pairingTopic:b})]),await this.client.core.relayer.subscribe(I,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${b}`),p.length>0){const{namespace:M}=mh(a[0]);let U=OJ(M,"request",p);d2(m)&&(U=kJ(U,m.pop())),m.push(U)}const _=w&&w>Rr.wc_sessionAuthenticate.req.ttl?w:Rr.wc_sessionAuthenticate.req.ttl,A={authPayload:{type:h??"caip122",chains:a,statement:c,aud:l,domain:u,version:"1",nonce:d,iat:new Date().toISOString(),exp:f,nbf:g,resources:m},requester:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:$r(_)},P={eip155:{chains:a,methods:[...new Set(["personal_sign",...p])],events:["chainChanged","accountsChanged"]}},y={requiredNamespaces:{},optionalNamespaces:P,relays:[{protocol:"irn"}],pairingTopic:b,proposer:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:$r(Rr.wc_sessionPropose.req.ttl),id:zr()},{done:O,resolve:S,reject:k}=Pl(_,"Request expired"),L=zr(),T=xt("session_connect",y.id),C=xt("session_request",L),x=async({error:M,session:U})=>{this.events.off(C,B),M?k(M):U&&S({session:U})},B=async M=>{var U,z,H;if(await this.deletePendingAuthRequest(L,{message:"fulfilled",code:0}),M.error){const ae=rr("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return M.error.code===ae.code?void 0:(this.events.off(T,x),k(M.error.message))}await this.deleteProposal(y.id),this.events.off(T,x);const{cacaos:Y,responder:V}=M.result,G=[],re=[];for(const ae of Y){await Q7({cacao:ae,projectId:this.client.core.projectId})||(this.client.logger.error(ae,"Signature verification failed"),k(rr("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:be}=ae,Ce=d2(be.resources),ze=[s4(be.iss)],Qe=H2(be.iss);if(Ce){const vt=eE(Ce),Qt=tE(Ce);G.push(...vt),ze.push(...Qt)}for(const vt of ze)re.push(`${vt}:${Qe}`)}const de=await this.client.core.crypto.generateSharedKey(E,V.publicKey);let ce;G.length>0&&(ce={topic:de,acknowledged:!0,self:{publicKey:E,metadata:this.client.metadata},peer:V,controller:V.publicKey,expiry:$r(_d),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:b,namespaces:SE([...new Set(G)],[...new Set(re)]),transportType:o},await this.client.core.relayer.subscribe(de,{transportType:o}),await this.client.session.set(de,ce),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:V.metadata}),ce=this.client.session.get(de)),(U=this.client.metadata.redirect)!=null&&U.linkMode&&(z=V.metadata.redirect)!=null&&z.linkMode&&(H=V.metadata.redirect)!=null&&H.universal&&n&&(this.client.core.addLinkModeSupportedApp(V.metadata.redirect.universal),this.client.session.update(de,{transportType:Gt.link_mode})),S({auths:Y,session:ce})};this.events.once(T,x),this.events.once(C,B);let R;try{if(s){const M=On("wc_sessionAuthenticate",A,L);this.client.core.history.set(b,M);const U=await this.client.core.crypto.encode("",M,{type:Ap,encoding:Mc});R=Og(n,b,U)}else await Promise.all([this.sendRequest({topic:b,method:"wc_sessionAuthenticate",params:A,expiry:r.expiry,throwOnFailedPublish:!0,clientRpcId:L}),this.sendRequest({topic:b,method:"wc_sessionPropose",params:y,expiry:Rr.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:y.id})])}catch(M){throw this.events.off(T,x),this.events.off(C,B),M}return await this.setProposal(y.id,y),await this.setAuthRequest(L,{request:qn(Zt({},A),{verifyContext:{}}),pairingTopic:b,transportType:o}),{uri:R??v,response:O}}),le(this,"approveSessionAuthenticate",async r=>{const{id:n,auths:i}=r,s=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[Cl.authenticated_session_approve_started]}});try{this.isInitialized()}catch(w){throw s.setError(sf.no_internet_connection),w}const o=this.getPendingAuthRequest(n);if(!o)throw s.setError(sf.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);const a=o.transportType||Gt.relay;a===Gt.relay&&await this.confirmOnlineStateOrThrow();const c=o.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),u=h2(c),d={type:Ra,receiverPublicKey:c,senderPublicKey:l},h=[],f=[];for(const w of i){if(!await Q7({cacao:w,projectId:this.client.core.projectId})){s.setError(sf.invalid_cacao);const I=rr("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:u,error:I,encodeOpts:d}),new Error(I.message)}s.addTrace(Cl.cacaos_verified);const{p:m}=w,b=d2(m.resources),v=[s4(m.iss)],E=H2(m.iss);if(b){const I=eE(b),_=tE(b);h.push(...I),v.push(..._)}for(const I of v)f.push(`${I}:${E}`)}const g=await this.client.core.crypto.generateSharedKey(l,c);s.addTrace(Cl.create_authenticated_session_topic);let p;if((h==null?void 0:h.length)>0){p={topic:g,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:c,metadata:o.requester.metadata},controller:c,expiry:$r(_d),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:SE([...new Set(h)],[...new Set(f)]),transportType:a},s.addTrace(Cl.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(g,{transportType:a})}catch(w){throw s.setError(sf.subscribe_authenticated_session_topic_failure),w}s.addTrace(Cl.subscribe_authenticated_session_topic_success),await this.client.session.set(g,p),s.addTrace(Cl.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(Cl.publishing_authenticated_session_approve);try{await this.sendResult({topic:u,id:n,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,a)})}catch(w){throw s.setError(sf.authenticated_session_approve_publish_failure),w}return await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:p}}),le(this,"rejectSessionAuthenticate",async r=>{this.isInitialized();const{id:n,reason:i}=r,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);s.transportType===Gt.relay&&await this.confirmOnlineStateOrThrow();const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=h2(o),l={type:Ra,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:Rr.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.deleteProposal(n)}),le(this,"formatAuthMessage",r=>{this.isInitialized();const{request:n,iss:i}=r;return yO(n,i)}),le(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const r=this.relayMessageCache.shift();r&&await this.onRelayMessage(r)}catch(r){this.client.logger.error(r)}},50)}),le(this,"cleanupDuplicatePairings",async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===r.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}}),le(this,"deleteSession",async r=>{var n;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=r,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,rr("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(EC).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,rr("USER_DISCONNECTED"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=fo.idle),o&&this.client.events.emit("session_delete",{id:a,topic:i})}),le(this,"deleteProposal",async(r,n)=>{if(n)try{const i=this.client.proposal.get(r),s=this.client.core.eventClient.getEvent({topic:i.pairingTopic});s==null||s.setError(El.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(r,rr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,"proposal")}),le(this,"deletePendingSessionRequest",async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==r),i&&(this.sessionRequestQueue.state=fo.idle,this.client.events.emit("session_request_expire",{id:r}))}),le(this,"deletePendingAuthRequest",async(r,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])}),le(this,"setExpiry",async(r,n)=>{this.client.session.keys.includes(r)&&(this.client.core.expirer.set(r,n),await this.client.session.update(r,{expiry:n}))}),le(this,"setProposal",async(r,n)=>{this.client.core.expirer.set(r,$r(Rr.wc_sessionPropose.req.ttl)),await this.client.proposal.set(r,n)}),le(this,"setAuthRequest",async(r,n)=>{const{request:i,pairingTopic:s,transportType:o=Gt.relay}=n;this.client.core.expirer.set(r,i.expiryTimestamp),await this.client.auth.requests.set(r,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:r,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),le(this,"setPendingSessionRequest",async r=>{const{id:n,topic:i,params:s,verifyContext:o}=r,a=s.request.expiryTimestamp||$r(Rr.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,a),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o})}),le(this,"sendRequest",async r=>{const{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l,appLink:u,tvf:d}=r,h=On(i,s,c);let f;const g=!!u;try{const m=g?Mc:qs;f=await this.client.core.crypto.encode(n,h,{encoding:m})}catch(m){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),m}let p;if(Yse.includes(i)){const m=Io(JSON.stringify(h)),b=Io(f);p=await this.client.core.verify.register({id:b,decryptedId:m})}const w=Rr[i].req;if(w.attestation=p,o&&(w.ttl=o),a&&(w.id=a),this.client.core.history.set(n,h),g){const m=Og(u,n,f);await he.Linking.openURL(m,this.client.name)}else{const m=Rr[i].req;o&&(m.ttl=o),a&&(m.id=a),m.tvf=qn(Zt({},d),{correlationId:h.id}),l?(m.internal=qn(Zt({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,f,m)):this.client.core.relayer.publish(n,f,m).catch(b=>this.client.logger.error(b))}return h.id}),le(this,"sendResult",async r=>{const{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a,appLink:c}=r,l=ll(n,s);let u;const d=c&&typeof(he==null?void 0:he.Linking)<"u";try{const g=d?Mc:qs;u=await this.client.core.crypto.encode(i,l,qn(Zt({},a||{}),{encoding:g}))}catch(g){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),g}let h,f;try{h=await this.client.core.history.get(i,n);const g=h.request;try{f=this.getTVFParams(n,g.params,s)}catch(p){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${p==null?void 0:p.message}`)}}catch(g){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),g}if(d){const g=Og(c,i,u);await he.Linking.openURL(g,this.client.name)}else{const g=h.request.method,p=Rr[g].res;p.tvf=qn(Zt({},f),{correlationId:n}),o?(p.internal=qn(Zt({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,u,p)):this.client.core.relayer.publish(i,u,p).catch(w=>this.client.logger.error(w))}await this.client.core.history.resolve(l)}),le(this,"sendError",async r=>{const{id:n,topic:i,error:s,encodeOpts:o,rpcOpts:a,appLink:c}=r,l=P0(n,s);let u;const d=c&&typeof(he==null?void 0:he.Linking)<"u";try{const f=d?Mc:qs;u=await this.client.core.crypto.encode(i,l,qn(Zt({},o||{}),{encoding:f}))}catch(f){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),f}let h;try{h=await this.client.core.history.get(i,n)}catch(f){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),f}if(d){const f=Og(c,i,u);await he.Linking.openURL(f,this.client.name)}else{const f=h.request.method,g=a||Rr[f].res;this.client.core.relayer.publish(i,u,g)}await this.client.core.history.resolve(l)}),le(this,"cleanup",async()=>{const r=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;Nc(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{Nc(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),le(this,"onProviderMessageEvent",async r=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(r):await this.onRelayMessage(r)}),le(this,"onRelayEventRequest",async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()}),le(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===fo.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=fo.active;const r=this.requestQueue.queue.shift();if(r)try{await this.processRequest(r)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=fo.idle}),le(this,"processRequest",async r=>{const{topic:n,payload:i,attestation:s,transportType:o,encryptedId:a}=r,c=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:c}))switch(c){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:n,payload:i,attestation:s,encryptedId:a});case"wc_sessionSettle":return await this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(n,i);case"wc_sessionPing":return await this.onSessionPingRequest(n,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});case"wc_sessionEvent":return await this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});default:return this.client.logger.info(`Unsupported request method ${c}`)}}),le(this,"onRelayEventResponse",async r=>{const{topic:n,payload:i,transportType:s}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),le(this,"onRelayEventUnknownPayload",r=>{const{topic:n}=r,{message:i}=fe("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),le(this,"shouldIgnorePairingRequest",r=>{const{topic:n,requestMethod:i}=r,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),le(this,"onSessionProposeRequest",async r=>{const{topic:n,payload:i,attestation:s,encryptedId:o}=r,{params:a,id:c}=i;try{const l=this.client.core.eventClient.getEvent({topic:n});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),l==null||l.setError(ba.proposal_listener_not_found)),this.isValidConnect(Zt({},i.params));const u=a.expiryTimestamp||$r(Rr.wc_sessionPropose.req.ttl),d=Zt({id:c,pairingTopic:n,expiryTimestamp:u,attestation:s,encryptedId:o},a);await this.setProposal(c,d);const h=await this.getVerifyContext({attestationId:s,hash:Io(JSON.stringify(i)),encryptedId:o,metadata:d.proposer.metadata});l==null||l.addTrace(Eo.emit_session_proposal),this.client.events.emit("session_proposal",{id:c,params:d,verifyContext:h})}catch(l){await this.sendError({id:c,topic:n,error:l,rpcOpts:Rr.wc_sessionPropose.autoReject}),this.client.logger.error(l)}}),le(this,"onSessionProposeResponse",async(r,n,i)=>{const{id:s}=n;if(Tr(n)){const{result:o}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const a=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const c=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:c});const l=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const u=await this.client.core.crypto.generateSharedKey(c,l);this.pendingSessions.set(s,{sessionTopic:u,pairingTopic:r,proposalId:s,publicKey:c});const d=await this.client.core.relayer.subscribe(u,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:d}),await this.client.core.pairing.activate({topic:r})}else if(cr(n)){await this.deleteProposal(s);const o=xt("session_connect",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:n.error})}}),le(this,"onSessionSettleRequest",async(r,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:u,scopedProperties:d,sessionConfig:h}=n.params,f=[...this.pendingSessions.values()].find(w=>w.sessionTopic===r);if(!f)return this.client.logger.error(`Pending session not found for topic ${r}`);const g=this.client.proposal.get(f.proposalId),p=qn(Zt(Zt(Zt({topic:r,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:f.pairingTopic,requiredNamespaces:g.requiredNamespaces,optionalNamespaces:g.optionalNamespaces,controller:a.publicKey,self:{publicKey:f.publicKey,metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},u&&{sessionProperties:u}),d&&{scopedProperties:d}),h&&{sessionConfig:h}),{transportType:Gt.relay});await this.client.session.set(p.topic,p),await this.setExpiry(p.topic,p.expiry),await this.client.core.pairing.updateMetadata({topic:f.pairingTopic,metadata:p.peer.metadata}),this.client.events.emit("session_connect",{session:p}),this.events.emit(xt("session_connect",f.proposalId),{session:p}),this.pendingSessions.delete(f.proposalId),this.deleteProposal(f.proposalId,!1),this.cleanupDuplicatePairings(p),await this.sendResult({id:n.id,topic:r,result:!0})}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),le(this,"onSessionSettleResponse",async(r,n)=>{const{id:i}=n;Tr(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(xt("session_approve",i),{})):cr(n)&&(await this.client.session.delete(r,rr("USER_DISCONNECTED")),this.events.emit(xt("session_approve",i),{error:n.error}))}),le(this,"onSessionUpdateRequest",async(r,n)=>{const{params:i,id:s}=n;try{const o=`${r}_session_update`,a=rf.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:r,error:rr("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(Zt({topic:r},i));try{rf.set(o,s),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:r,result:!0})}catch(c){throw rf.delete(o),c}this.client.events.emit("session_update",{id:s,topic:r,params:i})}catch(o){await this.sendError({id:s,topic:r,error:o}),this.client.logger.error(o)}}),le(this,"isRequestOutOfSync",(r,n)=>n.toString().slice(0,-3)<r.toString().slice(0,-3)),le(this,"onSessionUpdateResponse",(r,n)=>{const{id:i}=n,s=xt("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Tr(n)?this.events.emit(xt("session_update",i),{}):cr(n)&&this.events.emit(xt("session_update",i),{error:n.error})}),le(this,"onSessionExtendRequest",async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,$r(_d)),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),le(this,"onSessionExtendResponse",(r,n)=>{const{id:i}=n,s=xt("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Tr(n)?this.events.emit(xt("session_extend",i),{}):cr(n)&&this.events.emit(xt("session_extend",i),{error:n.error})}),le(this,"onSessionPingRequest",async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),le(this,"onSessionPingResponse",(r,n)=>{const{id:i}=n,s=xt("session_ping",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Tr(n)?this.events.emit(xt("session_ping",i),{}):cr(n)&&this.events.emit(xt("session_ping",i),{error:n.error})},500)}),le(this,"onSessionDeleteRequest",async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),Promise.all([new Promise(s=>{this.client.core.relayer.once(Fr.publish,async()=>{s(await this.deleteSession({topic:r,id:i}))})}),this.sendResult({id:i,topic:r,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:r,error:rr("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),le(this,"onSessionRequest",async r=>{var n,i,s;const{topic:o,payload:a,attestation:c,encryptedId:l,transportType:u}=r,{id:d,params:h}=a;try{await this.isValidRequest(Zt({topic:o},h));const f=this.client.session.get(o),g=await this.getVerifyContext({attestationId:c,hash:Io(JSON.stringify(On("wc_sessionRequest",h,d))),encryptedId:l,metadata:f.peer.metadata,transportType:u}),p={id:d,topic:o,params:h,verifyContext:g};await this.setPendingSessionRequest(p),u===Gt.link_mode&&(n=f.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=f.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(p):(this.addSessionRequestToSessionRequestQueue(p),this.processSessionRequestQueue())}catch(f){await this.sendError({id:d,topic:o,error:f}),this.client.logger.error(f)}}),le(this,"onSessionRequestResponse",(r,n)=>{const{id:i}=n,s=xt("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Tr(n)?this.events.emit(xt("session_request",i),{result:n.result}):cr(n)&&this.events.emit(xt("session_request",i),{error:n.error})}),le(this,"onSessionEventRequest",async(r,n)=>{const{id:i,params:s}=n;try{const o=`${r}_session_event_${s.event.name}`,a=rf.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Zt({topic:r},s)),this.client.events.emit("session_event",{id:i,topic:r,params:s}),rf.set(o,i)}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),le(this,"onSessionAuthenticateResponse",(r,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:r,payload:n}),Tr(n)?this.events.emit(xt("session_request",i),{result:n.result}):cr(n)&&this.events.emit(xt("session_request",i),{error:n.error})}),le(this,"onSessionAuthenticateRequest",async r=>{var n;const{topic:i,payload:s,attestation:o,encryptedId:a,transportType:c}=r;try{const{requester:l,authPayload:u,expiryTimestamp:d}=s.params,h=await this.getVerifyContext({attestationId:o,hash:Io(JSON.stringify(s)),encryptedId:a,metadata:l.metadata,transportType:c}),f={requester:l,pairingTopic:i,id:s.id,authPayload:u,verifyContext:h,expiryTimestamp:d};await this.setAuthRequest(s.id,{request:f,pairingTopic:i,transportType:c}),c===Gt.link_mode&&(n=l.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:s.params,id:s.id,verifyContext:h})}catch(l){this.client.logger.error(l);const u=s.params.requester.publicKey,d=await this.client.core.crypto.generateKeyPair(),h=this.getAppLinkIfEnabled(s.params.requester.metadata,c),f={type:Ra,receiverPublicKey:u,senderPublicKey:d};await this.sendError({id:s.id,topic:i,error:l,encodeOpts:f,rpcOpts:Rr.wc_sessionAuthenticate.autoReject,appLink:h})}}),le(this,"addSessionRequestToSessionRequestQueue",r=>{this.sessionRequestQueue.queue.push(r)}),le(this,"cleanupAfterResponse",r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=fo.idle,this.processSessionRequestQueue()},X.toMiliseconds(this.requestQueueDelay))}),le(this,"cleanupPendingSentRequestsForTopic",({topic:r,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===r&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=xt("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(xt("session_request",s.request.id),{error:n})})}),le(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===fo.active){this.client.logger.info("session request queue is already active.");return}const r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(r)}catch(n){this.client.logger.error(n)}}),le(this,"emitSessionRequest",r=>{if(this.emittedSessionRequests.has(r.id)){this.client.logger.warn({id:r.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${r.id}`);return}this.sessionRequestQueue.state=fo.active,this.emittedSessionRequests.add(r.id),this.client.events.emit("session_request",r)}),le(this,"onPairingCreated",r=>{if(r.methods&&this.expectedPairingMethodMap.set(r.topic,r.methods),r.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);
88n&&this.onSessionProposeRequest({topic:r.topic,payload:On("wc_sessionPropose",qn(Zt({},n),{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties,scopedProperties:n.scopedProperties}),n.id),attestation:n.attestation,encryptedId:n.encryptedId})}),le(this,"isValidConnect",async r=>{if(!Xn(r)){const{message:l}=fe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:a,relays:c}=r;if(sn(n)||await this.isValidPairingTopic(n),!DQ(c)){const{message:l}=fe("MISSING_OR_INVALID",`connect() relays: ${c}`);throw new Error(l)}if(!sn(i)&&Ro(i)!==0){const l="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(l):this.client.logger.warn(l),this.validateNamespaces(i,"requiredNamespaces")}if(!sn(s)&&Ro(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),sn(o)||this.validateSessionProps(o,"sessionProperties"),!sn(a)){this.validateSessionProps(a,"scopedProperties");const l=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(a).every(u=>l.includes(u.split(":")[0])))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(l)}`)}}),le(this,"validateNamespaces",(r,n)=>{const i=BQ(r,"connect()",n);if(i)throw new Error(i.message)}),le(this,"isValidApprove",async r=>{if(!Xn(r))throw new Error(fe("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:a}=r;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const c=this.client.proposal.get(n),l=H3(i,"approve()");if(l)throw new Error(l.message);const u=AE(c.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Cr(s,!0)){const{message:d}=fe("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(d)}if(sn(o)||this.validateSessionProps(o,"sessionProperties"),!sn(a)){this.validateSessionProps(a,"scopedProperties");const d=new Set(Object.keys(i));if(!Object.keys(a).every(h=>d.has(h.split(":")[0])))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(d).join(", ")}`)}}),le(this,"isValidReject",async r=>{if(!Xn(r)){const{message:s}=fe("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(s)}const{id:n,reason:i}=r;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!MQ(i)){const{message:s}=fe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),le(this,"isValidSessionSettleRequest",r=>{if(!Xn(r)){const{message:l}=fe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(l)}const{relay:n,controller:i,namespaces:s,expiry:o}=r;if(!GO(n)){const{message:l}=fe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const a=PQ(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const c=H3(s,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(Nc(o)){const{message:l}=fe("EXPIRED","onSessionSettleRequest()");throw new Error(l)}}),le(this,"isValidUpdate",async r=>{if(!Xn(r)){const{message:c}=fe("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}const{topic:n,namespaces:i}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const s=this.client.session.get(n),o=H3(i,"update()");if(o)throw new Error(o.message);const a=AE(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)}),le(this,"isValidExtend",async r=>{if(!Xn(r)){const{message:i}=fe("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)}),le(this,"isValidRequest",async r=>{if(!Xn(r)){const{message:c}=fe("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}
vendor: 12,382 bytes, line 88
88const{topic:n,request:i,chainId:s,expiry:o}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!$E(a,s)){const{message:c}=fe("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(c)}if(!UQ(i)){const{message:c}=fe("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!FQ(a,s,i.method)){const{message:c}=fe("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!WQ(o,r5)){const{message:c}=fe("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${r5.min} and ${r5.max}`);throw new Error(c)}}),le(this,"isValidRespond",async r=>{var n;if(!Xn(r)){const{message:o}=fe("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(o)}const{topic:i,response:s}=r;try{await this.isValidSessionTopic(i)}catch(o){throw(n=r==null?void 0:r.response)!=null&&n.id&&this.cleanupAfterResponse(r),o}if(!jQ(s)){const{message:o}=fe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),le(this,"isValidPing",async r=>{if(!Xn(r)){const{message:i}=fe("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),le(this,"isValidEmit",async r=>{if(!Xn(r)){const{message:a}=fe("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(a)}const{topic:n,event:i,chainId:s}=r;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!$E(o,s)){const{message:a}=fe("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!zQ(i)){const{message:a}=fe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!qQ(o,s,i.name)){const{message:a}=fe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}}),le(this,"isValidDisconnect",async r=>{if(!Xn(r)){const{message:i}=fe("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),le(this,"isValidAuthenticate",r=>{const{chains:n,uri:i,domain:s,nonce:o}=r;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!Cr(i,!1))throw new Error("uri is required parameter");if(!Cr(s,!1))throw new Error("domain is required parameter");if(!Cr(o,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(c=>mh(c).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=mh(n[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),le(this,"getVerifyContext",async r=>{const{attestationId:n,hash:i,encryptedId:s,metadata:o,transportType:a}=r,c={verified:{verifyUrl:o.verifyUrl||Wf,validation:"UNKNOWN",origin:o.url||""}};try{if(a===Gt.link_mode){const u=this.getAppLinkIfEnabled(o,a);return c.verified.validation=u&&new URL(u).origin===new URL(o.url).origin?"VALID":"INVALID",c}const l=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(o.url).origin?"VALID":"INVALID")}catch(l){this.client.logger.warn(l)}return this.client.logger.debug(`Verify context: ${JSON.stringify(c)}`),c}),le(this,"validateSessionProps",(r,n)=>{Object.values(r).forEach((i,s)=>{if(i==null){const{message:o}=fe("MISSING_OR_INVALID",`${n} must contain an existing value for each key. Received: ${i} for key ${Object.keys(r)[s]}`);throw new Error(o)}})}),le(this,"getPendingAuthRequest",r=>{const n=this.client.auth.requests.get(r);return typeof n=="object"?n:void 0}),le(this,"addToRecentlyDeleted",(r,n)=>{if(this.recentlyDeletedMap.set(r,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),le(this,"checkRecentlyDeleted",r=>{const n=this.recentlyDeletedMap.get(r);if(n){const{message:i}=fe("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${r}`);throw new Error(i)}}),le(this,"isLinkModeEnabled",(r,n)=>{var i,s,o,a,c,l,u,d,h;return!r||n!==Gt.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((a=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:a.universal)!==void 0&&((l=(c=this.client.metadata)==null?void 0:c.redirect)==null?void 0:l.universal)!==""&&((u=r==null?void 0:r.redirect)==null?void 0:u.universal)!==void 0&&((d=r==null?void 0:r.redirect)==null?void 0:d.universal)!==""&&((h=r==null?void 0:r.redirect)==null?void 0:h.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(r.redirect.universal)&&typeof(he==null?void 0:he.Linking)<"u"}),le(this,"getAppLinkIfEnabled",(r,n)=>{var i;return this.isLinkModeEnabled(r,n)?(i=r==null?void 0:r.redirect)==null?void 0:i.universal:void 0}),le(this,"handleLinkModeMessage",({url:r})=>{if(!r||!r.includes("wc_ev")||!r.includes("topic"))return;const n=z7(r,"topic")||"",i=decodeURIComponent(z7(r,"wc_ev")||""),s=this.client.session.keys.includes(n);s&&this.client.session.update(n,{transportType:Gt.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:s})}),le(this,"registerLinkModeListeners",async()=>{var r;if(Rv()||ol()&&(r=this.client.metadata.redirect)!=null&&r.linkMode){const n=he==null?void 0:he.Linking;if(typeof n<"u"){n.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),le(this,"getTVFParams",(r,n,i)=>{var s,o,a;if(!((s=n.request)!=null&&s.method))return{};const c={correlationId:r,rpcMethods:[n.request.method],chainId:n.chainId};try{const l=this.extractTxHashesFromResult(n.request,i);c.txHashes=l,c.contractAddresses=this.isValidContractData(n.request.params)?[(a=(o=n.request.params)==null?void 0:o[0])==null?void 0:a.to]:[]}catch(l){this.client.logger.warn("Error getting TVF params",l)}return c}),le(this,"isValidContractData",r=>{var n;if(!r)return!1;try{const i=(r==null?void 0:r.data)||((n=r==null?void 0:r[0])==null?void 0:n.data);if(!i.startsWith("0x"))return!1;const s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),le(this,"extractTxHashesFromResult",(r,n)=>{var i;try{if(!n)return[];const s=r.method,o=Zse[s];if(s==="sui_signTransaction")return[gJ(n.transactionBytes)];if(s==="near_signTransaction")return[G7(n)];if(s==="near_signTransactions")return n.map(c=>G7(c));if(s==="xrpl_signTransactionFor"||s==="xrpl_signTransaction")return[(i=n.tx_json)==null?void 0:i.hash];if(s==="polkadot_signTransaction")return[aee({transaction:r.params.transactionPayload,signature:n.signature})];if(s==="algo_signTxn")return Ba(n)?n.map(c=>Y7(c)):[Y7(n)];if(s==="cosmos_signDirect")return[mJ(n)];if(typeof n=="string")return[n];const a=n[o.key];if(Ba(a))return s==="solana_signAllTransactions"?a.map(c=>pJ(c)):a;if(typeof a=="string")return[a]}catch(s){this.client.logger.warn("Error extracting tx hashes from result",s)}return[]})}async processPendingMessageEvents(){try{const e=this.client.session.keys,r=this.client.core.relayer.messages.getWithoutAck(e);for(const[n,i]of Object.entries(r))for(const s of i)try{await this.onProviderMessageEvent({topic:n,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${n}, message: ${s}`)}}catch(e){this.client.logger.warn("processPendingMessageEvents failed",e)}}isInitialized(){if(!this.initialized){const{message:e}=fe("NOT_INITIALIZED",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Fr.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){const{topic:r,message:n,attestation:i,transportType:s}=e,{publicKey:o}=this.client.auth.authKeys.keys.includes(w2)?this.client.auth.authKeys.get(w2):{publicKey:void 0};try{const a=await this.client.core.crypto.decode(r,n,{receiverPublicKey:o,encoding:s===Gt.link_mode?Mc:qs});T0(a)?(this.client.core.history.set(r,a),await this.onRelayEventRequest({topic:r,payload:a,attestation:i,transportType:s,encryptedId:Io(n)})):Vu(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:r,payload:a,transportType:s}),this.client.core.history.delete(r,a.id)):await this.onRelayEventUnknownPayload({topic:r,payload:a,transportType:s}),await this.client.core.relayer.messages.ack(r,n)}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(ns.expired,async e=>{const{topic:r,id:n}=nO(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,fe("EXPIRED"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,fe("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession({topic:r,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Bl.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(Bl.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Cr(e,!1)){const{message:r}=fe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=fe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(Nc(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=fe("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!Cr(e,!1)){const{message:r}=fe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:r}=fe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(Nc(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:r}=fe("EXPIRED",`session topic: ${e}`);throw new Error(r)}if(!this.client.core.crypto.keychain.has(e)){const{message:r}=fe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Cr(e,!1)){const{message:r}=fe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=fe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!LQ(e)){const{message:r}=fe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=fe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(Nc(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:r}=fe("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}},coe=class extends Wu{constructor(e,r){super(e,r,Vse,Yv),this.core=e,this.logger=r}},loe=class extends Wu{constructor(e,r){super(e,r,Wse,Yv),this.core=e,this.logger=r}},uoe=class extends Wu{constructor(e,r){super(e,r,Gse,Yv,n=>n.id),this.core=e,this.logger=r}},doe=class extends Wu{constructor(e,r){super(e,r,Qse,lm,()=>w2),this.core=e,this.logger=r}},hoe=class extends Wu{constructor(e,r){super(e,r,eoe,lm),this.core=e,this.logger=r}},foe=class extends Wu{constructor(e,r){super(e,r,toe,lm,n=>n.id),this.core=e,this.logger=r}};var poe=Object.defineProperty,goe=(t,e,r)=>e in t?poe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n5=(t,e,r)=>goe(t,typeof e!="symbol"?e+"":e,r);let woe=class{constructor(e,r){this.core=e,this.logger=r,n5(this,"authKeys"),n5(this,"pairingTopics"),n5(this,"requests"),this.authKeys=new doe(this.core,this.logger),this.pairingTopics=new hoe(this.core,this.logger),this.requests=new foe(this.core,this.logger)}
88async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}};var moe=Object.defineProperty,yoe=(t,e,r)=>e in t?moe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tt=(t,e,r)=>yoe(t,typeof e!="symbol"?e+"":e,r);let boe=class PN extends mte{constructor(e){super(e),tt(this,"protocol",IN),tt(this,"version",$N),tt(this,"name",t5.name),tt(this,"metadata"),tt(this,"core"),tt(this,"logger"),tt(this,"events",new Nr.EventEmitter),tt(this,"engine"),tt(this,"session"),tt(this,"proposal"),tt(this,"pendingRequest"),tt(this,"auth"),tt(this,"signConfig"),tt(this,"on",(n,i)=>this.events.on(n,i)),tt(this,"once",(n,i)=>this.events.once(n,i)),tt(this,"off",(n,i)=>this.events.off(n,i)),tt(this,"removeListener",(n,i)=>this.events.removeListener(n,i)),tt(this,"removeAllListeners",n=>this.events.removeAllListeners(n)),tt(this,"connect",async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"pair",async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"approve",async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"reject",async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"update",async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"extend",async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"request",async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"respond",async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"ping",async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"emit",async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"disconnect",async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"find",n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}}),tt(this,"authenticate",async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(s){throw this.logger.error(s.message),s}}),tt(this,"formatAuthMessage",n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"approveSessionAuthenticate",async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),tt(this,"rejectSessionAuthenticate",async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),this.name=(e==null?void 0:e.name)||t5.name,this.metadata=oY(e==null?void 0:e.metadata),this.signConfig=e==null?void 0:e.signConfig;const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:al(cl({level:(e==null?void 0:e.logger)||t5.logger}));this.core=(e==null?void 0:e.core)||new Hse(e),this.logger=St(r,this.name),this.session=new loe(this.core,this.logger),this.proposal=new coe(this.core,this.logger),this.pendingRequest=new uoe(this.core,this.logger),this.engine=new aoe(this),this.auth=new woe(this.core,this.logger)}static async init(e){const r=new PN(e);return await r.initialize(),r}get context(){return qt(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var Rg={exports:{}},_C;function voe(){return _C||(_C=1,function(t,e){var r=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof So<"u"&&So,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof So<"u"&&So||{},c={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function l(C){return C&&DataView.prototype.isPrototypeOf(C)}if(c.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array
88]"],d=ArrayBuffer.isView||function(C){return C&&u.indexOf(Object.prototype.toString.call(C))>-1};function h(C){if(typeof C!="string"&&(C=String(C)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(C)||C==="")throw new TypeError('Invalid character in header field name: "'+C+'"');return C.toLowerCase()}function f(C){return typeof C!="string"&&(C=String(C)),C}function g(C){var x={next:function(){var B=C.shift();return{done:B===void 0,value:B}}};return c.iterable&&(x[Symbol.iterator]=function(){return x}),x}function p(C){this.map={},C instanceof p?C.forEach(function(x,B){this.append(B,x)},this):Array.isArray(C)?C.forEach(function(x){if(x.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+x.length);this.append(x[0],x[1])},this):C&&Object.getOwnPropertyNames(C).forEach(function(x){this.append(x,C[x])},this)}p.prototype.append=function(C,x){C=h(C),x=f(x);var B=this.map[C];this.map[C]=B?B+", "+x:x},p.prototype.delete=function(C){delete this.map[h(C)]},p.prototype.get=function(C){return C=h(C),this.has(C)?this.map[C]:null},p.prototype.has=function(C){return this.map.hasOwnProperty(h(C))},p.prototype.set=function(C,x){this.map[h(C)]=f(x)},p.prototype.forEach=function(C,x){for(var B in this.map)this.map.hasOwnProperty(B)&&C.call(x,this.map[B],B,this)},p.prototype.keys=function(){var C=[];return this.forEach(function(x,B){C.push(B)}),g(C)},p.prototype.values=function(){var C=[];return this.forEach(function(x){C.push(x)}),g(C)},p.prototype.entries=function(){var C=[];return this.forEach(function(x,B){C.push([B,x])}),g(C)},c.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function w(C){if(!C._noBody){if(C.bodyUsed)return Promise.reject(new TypeError("Already read"));C.bodyUsed=!0}}function m(C){return new Promise(function(x,B){C.onload=function(){x(C.result)},C.onerror=function(){B(C.error)}})}function b(C){var x=new FileReader,B=m(x);return x.readAsArrayBuffer(C),B}function v(C){var x=new FileReader,B=m(x),R=/charset=([A-Za-z0-9_-]+)/.exec(C.type),M=R?R[1]:"utf-8";return x.readAsText(C,M),B}function E(C){for(var x=new Uint8Array(C),B=new Array(x.length),R=0;R<x.length;R++)B[R]=String.fromCharCode(x[R]);return B.join("")}function I(C){if(C.slice)return C.slice(0);var x=new Uint8Array(C.byteLength);return x.set(new Uint8Array(C)),x.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(C){this.bodyUsed=this.bodyUsed,this._bodyInit=C,C?typeof C=="string"?this._bodyText=C:c.blob&&Blob.prototype.isPrototypeOf(C)?this._bodyBlob=C:c.formData&&FormData.prototype.isPrototypeOf(C)?this._bodyFormData=C:c.searchParams&&URLSearchParams.prototype.isPrototypeOf(C)?this._bodyText=C.toString():c.arrayBuffer&&c.blob&&l(C)?(this._bodyArrayBuffer=I(C.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(C)||d(C))?this._bodyArrayBuffer=I(C):this._bodyText=C=Object.prototype.toString.call(C):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof C=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(C)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var C=w(this);if(C)return C;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var C=w(this);return C||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(c.blob)return this.blob().then(b);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var C=w(this);if(C)return C;if(this._bodyBlob)return v(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(O)}),this.json=function(){return this.text().then(JSON.parse)},this}var A=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function P(C){var x=C.toUpperCase();return A.indexOf(x)>-1?x:C}function y(C,x){if(!(this instanceof y))throw new TypeError('Please use the "new" operator, this DOM object c
88onstructor cannot be called as a function.');x=x||{};var B=x.body;if(C instanceof y){if(C.bodyUsed)throw new TypeError("Already read");this.url=C.url,this.credentials=C.credentials,x.headers||(this.headers=new p(C.headers)),this.method=C.method,this.mode=C.mode,this.signal=C.signal,!B&&C._bodyInit!=null&&(B=C._bodyInit,C.bodyUsed=!0)}else this.url=String(C);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new p(x.headers)),this.method=P(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal||function(){if("AbortController"in a){var U=new AbortController;return U.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(B),(this.method==="GET"||this.method==="HEAD")&&(x.cache==="no-store"||x.cache==="no-cache")){var R=/([?&])_=[^&]*/;if(R.test(this.url))this.url=this.url.replace(R,"$1_="+new Date().getTime());else{var M=/\?/;this.url+=(M.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})};function O(C){var x=new FormData;return C.trim().split("&").forEach(function(B){if(B){var R=B.split("="),M=R.shift().replace(/\+/g," "),U=R.join("=").replace(/\+/g," ");x.append(decodeURIComponent(M),decodeURIComponent(U))}}),x}function S(C){var x=new p,B=C.replace(/\r?\n[\t ]+/g," ");return B.split("\r").map(function(R){return R.indexOf(`
89`)===0?R.substr(1,R.length):R}).forEach(function(R){var M=R.split(":"),U=M.shift().trim();if(U){var z=M.join(":").trim();try{x.append(U,z)}catch(H){console.warn("Response "+H.message)}}}),x}_.call(y.prototype);function k(C,x){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>
vendor: 5,331 bytes, line 89
89=200&&this.status<300,this.statusText=x.statusText===void 0?"":""+x.statusText,this.headers=new p(x.headers),this.url=x.url||"",this._initBody(C)}_.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},k.error=function(){var C=new k(null,{status:200,statusText:""});return C.ok=!1,C.status=0,C.type="error",C};var L=[301,302,303,307,308];k.redirect=function(C,x){if(L.indexOf(x)===-1)throw new RangeError("Invalid status code");return new k(null,{status:x,headers:{location:C}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(x,B){this.message=x,this.name=B;var R=Error(x);this.stack=R.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function T(C,x){return new Promise(function(B,R){var M=new y(C,x);if(M.signal&&M.signal.aborted)return R(new o.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function z(){U.abort()}U.onload=function(){var V={statusText:U.statusText,headers:S(U.getAllResponseHeaders()||"")};M.url.indexOf("file://")===0&&(U.status<200||U.status>599)?V.status=200:V.status=U.status,V.url="responseURL"in U?U.responseURL:V.headers.get("X-Request-URL");var G="response"in U?U.response:U.responseText;setTimeout(function(){B(new k(G,V))},0)},U.onerror=function(){setTimeout(function(){R(new TypeError("Network request failed"))},0)},U.ontimeout=function(){setTimeout(function(){R(new TypeError("Network request timed out"))},0)},U.onabort=function(){setTimeout(function(){R(new o.DOMException("Aborted","AbortError"))},0)};function H(V){try{return V===""&&a.location.href?a.location.href:V}catch{return V}}if(U.open(M.method,H(M.url),!0),M.credentials==="include"?U.withCredentials=!0:M.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&(c.blob?U.responseType="blob":c.arrayBuffer&&(U.responseType="arraybuffer")),x&&typeof x.headers=="object"&&!(x.headers instanceof p||a.Headers&&x.headers instanceof a.Headers)){var Y=[];Object.getOwnPropertyNames(x.headers).forEach(function(V){Y.push(h(V)),U.setRequestHeader(V,f(x.headers[V]))}),M.headers.forEach(function(V,G){Y.indexOf(G)===-1&&U.setRequestHeader(G,V)})}else M.headers.forEach(function(V,G){U.setRequestHeader(G,V)});M.signal&&(M.signal.addEventListener("abort",z),U.onreadystatechange=function(){U.readyState===4&&M.signal.removeEventListener("abort",z)}),U.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return T.polyfill=!0,a.fetch||(a.fetch=T,a.Headers=p,a.Request=y,a.Response=k),o.Headers=p,o.Request=y,o.Response=k,o.fetch=T,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=r.fetch?r:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(Rg,Rg.exports)),Rg.exports}var Eoe=voe();const SC=ec(Eoe);var Coe=Object.defineProperty,xoe=Object.defineProperties,_oe=Object.getOwnPropertyDescriptors,IC=Object.getOwnPropertySymbols,Soe=Object.prototype.hasOwnProperty,Ioe=Object.prototype.propertyIsEnumerable,$C=(t,e,r)=>e in t?Coe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,AC=(t,e)=>{for(var r in e||(e={}))Soe.call(e,r)&&$C(t,r,e[r]);if(IC)for(var r of IC(e))Ioe.call(e,r)&&$C(t,r,e[r]);return t},PC=(t,e)=>xoe(t,_oe(e));const $oe={Accept:"application/json","Content-Type":"application/json"},Aoe="POST",TC={headers:$oe,method:Aoe},OC=10;let ur=class{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new Nr.EventEmitter,this.isAvailable=!1,this.registering=!1,!KE(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const r=zo(e),n=await(await SC(this.url,PC(AC({},TC),{body:r}))).json();this.onPayload({data:n})}catch(r){this.onError(e.id,r)}}async register(e=this.url){if(!KE(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const r=zo({id:1,jsonrpc:"2.0",method:"test",params:[]});await SC(e,PC(AC({},TC),{body:r}))}this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;
89const r=typeof e.data=="string"?Fa(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),s=P0(e,i);this.events.emit("payload",s)}parseError(e,r=this.url){return iN(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>OC&&this.events.setMaxListeners(OC)}};const NC="error",Poe="wss://relay.walletconnect.org",Toe="wc",Ooe="universal_provider",Bg=`${Toe}@2:${Ooe}:`,TN="https://rpc.walletconnect.org/v1/",nh="generic",Noe=`${TN}bundler`,xs={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function Jv(t){return t==null||typeof t!="object"&&typeof t!="function"}function ON(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function NN(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const koe="[object RegExp]",kN="[object String]",RN="[object Number]",BN="[object Boolean]",DN="[object Arguments]",Roe="[object Symbol]",Boe="[object Date]",Doe="[object Map]",Loe="[object Set]",Moe="[object Array]",Uoe="[object ArrayBuffer]",joe="[object Object]",zoe="[object DataView]",Foe="[object Uint8Array]",qoe="[object Uint8ClampedArray]",Hoe="[object Uint16Array]",Voe="[object Uint32Array]",Woe="[object Int8Array]",Koe="[object Int16Array]",Zoe="[object Int32Array]",Goe="[object Float32Array]",Yoe="[object Float64Array]";function Xv(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Joe(t,e){return ch(t,void 0,t,new Map,e)}function ch(t,e,r,n=new Map,i=void 0){const s=i==null?void 0:i(t,e,r,n);if(s!=null)return s;if(Jv(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){const o=new Array(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=ch(t[a],a,r,n,i);return Object.hasOwn(t,"index")&&(o.index=t.index),Object.hasOwn(t,"input")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){const o=new Map;n.set(t,o);for(const[a,c]of t)o.set(a,ch(c,a,r,n,i));return o}if(t instanceof Set){const o=new Set;n.set(t,o);for(const a of t)o.add(ch(a,void 0,r,n,i));return o}if(typeof Oe<"u"&&Oe.isBuffer(t))return t.subarray();if(Xv(t)){const o=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=ch(t[a],a,r,n,i);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,o),Dl(o,t,r,n,i),o}if(typeof File<"u"&&t instanceof File){const o=new File([t],t.name,{type:t.type});return n.set(t,o),Dl(o,t,r,n,i),o}if(t instanceof Blob){const o=new Blob([t],{type:t.type});return n.set(t,o),Dl(o,t,r,n,i),o}if(t instanceof Error){const o=new t.constructor;return n.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,Dl(o,t,r,n,i),o}if(typeof t=="object"&&Xoe(t)){const o=Object.create(Object.getPrototypeOf(t));return n.set(t,o),Dl(o,t,r,n,i),o}return t}function Dl(t,e,r=t,n,i){const s=[...Object.keys(e),...ON(e)];for(let o=0;o<s.length;o++){const a=s[o],c=Object.getOwnPropertyDescriptor(t,a);(c==null||c.writable)&&(t[a]=ch(e[a],a,r,n,i))}}function Xoe(t){switch(NN(t)){case DN:case Moe:case Uoe:case zoe:case BN:case Boe:case Goe:case Yoe:case Woe:case Koe:case Zoe:case Doe:case RN:case joe:case koe:case Loe:case kN:case Roe:case Foe:case qoe:case Hoe:case Voe:return!0;default:return!1}}function Qoe(t,e){return Joe(t,(r,n,i,s)=>{if(typeof t=="object")switch(Object.prototype.toString.call(t)){case RN:case kN:case BN:{const o=new t.constructor(t==null?void 0:t.valueOf());return Dl(o,t),o}case DN:{const o={};return Dl(o,t),o.length=t.length,o[Symbol.iterator]=t[Symbol.iterator],o}default:return}})}function kC(t){return Qoe(t)}function RC(t){return t!==null&&typeof t=="object"&&NN(t)==="[object Arguments]"}function BC(t){return typeof t=="object"&&t!==null}function eae(){}function tae(t){return Xv(t)}function rae(t){var r;if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;
89if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!((r=Object.getOwnPropertyDescriptor(t,Symbol.toStringTag))!=null&&r.writable)?!1:t.toString()===`[object ${n}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function nae(t){if(Jv(t))return t;if(Array.isArray(t)||Xv(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const n=new r(t);return n.lastIndex=t.lastIndex,n}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){const n=new r(t.message);return n.stack=t.stack,n.name=t.name,n.cause=t.cause,n}if(typeof File<"u"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const n=Object.create(e);return Object.assign(n,t)}return t}function iae(t,...e){const r=e.slice(0,-1),n=e[e.length-1];let i=t;for(let s=0;s<r.length;s++){const o=r[s];i=N4(i,o,n,new Map)}return i}function N4(t,e,r,n){if(Jv(t)&&(t=Object(t)),e==null||typeof e!="object")return t;if(n.has(e))return nae(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}const i=[...Object.keys(e),...ON(e)];for(let s=0;s<i.length;s++){const o=i[s];let a=e[o],c=t[o];if(RC(a)&&(a={...a}),RC(c)&&(c={...c}),typeof Oe<"u"&&Oe.isBuffer(a)&&(a=kC(a)),Array.isArray(a))if(typeof c=="object"&&c!=null){const u=[],d=Reflect.ownKeys(c);for(let h=0;h<d.length;h++){const f=d[h];u[f]=c[f]}c=u}else c=[];const l=r(c,a,o,t,e,n);l!=null?t[o]=l:Array.isArray(a)||BC(c)&&BC(a)?t[o]=N4(c,a,r,n):c==null&&rae(a)?t[o]=N4({},a,r,n):c==null&&tae(a)?t[o]=kC(a):(c===void 0||a!==void 0)&&(t[o]=a)}return t}function sae(t,...e){return iae(t,...e,eae)}var oae=Object.defineProperty,aae=Object.defineProperties,cae=Object.getOwnPropertyDescriptors,DC=Object.getOwnPropertySymbols,lae=Object.prototype.hasOwnProperty,uae=Object.prototype.propertyIsEnumerable,LC=(t,e,r)=>e in t?oae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Dg=(t,e)=>{for(var r in e||(e={}))lae.call(e,r)&&LC(t,r,e[r]);if(DC)for(var r of DC(e))uae.call(e,r)&&LC(t,r,e[r]);return t},dae=(t,e)=>aae(t,cae(e));function Bi(t,e,r){var n;const i=mh(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${TN}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Ku(t){return t.includes(":")?t.split(":")[1]:t}function LN(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function hae(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function MC(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>{var n,i;return((n=r==null?void 0:r.chains)==null?void 0:n.length)&&((i=r==null?void 0:r.chains)==null?void 0:i.length)>0}))}function Lg(t={},e={}){const r=MC(UC(t)),n=MC(UC(e));return sae(r,n)}function UC(t){var e,r,n,i,s;const o={};if(!Ro(t))return o;for(const[a,c]of Object.entries(t)){const l=am(a)?[a]:c.chains,u=c.methods||[],d=c.events||[],h=c.rpcMap||{},f=ah(a);o[f]=dae(Dg(Dg({},o[f]),c),{chains:ko(l,(e=o[f])==null?void 0:e.chains),methods:ko(u,(r=o[f])==null?void 0:r.methods),events:ko(d,(n=o[f])==null?void 0:n.events)}),(Ro(h)||Ro(((i=o[f])==null?void 0:i.rpcMap)||{}))&&(o[f].rpcMap=Dg(Dg({},h),(s=o[f])==null?void 0:s.rpcMap))}return o}function jC(t){return t.includes(":")?t.split(":")[2]:t}function zC(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=am(r)?[r]:n.chains?n.chains:LN(n.accounts);e[r]={chains:a,methods:i,events:s,accounts:o}}return e}function i5(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):(t=t.includes(":")?t.split(":")[1]:t,isNaN(Number(t))?t:Number(t))}const MN={},gt=t=>MN[t],s5=(t,e)=>{MN[t]=e};var fae=Object.defineProperty,FC=Object.getOwnPropertySymbols,pae=Object.prototype.hasOwnProperty,gae=Object.prototype.propertyIsEnumerable,qC=(t,e,r)=>e in t?fae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,HC=(t,e)=>{for(var r in e||(e={}))pae.call(e,r)&&qC(t,r,e[r]);if(FC)for(var r of FC(e))gae.call(e,r)&&qC(t,r,e[r]);return t};const VC="eip155",wae=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],mae=t=>t&&t.startsWith("0x")?BigInt(t).toString(10):t,o5=t=>t&&t.startsWith("0x")?t:`0x${BigInt(t).toString(16)}`,WC=t=>Object.keys(t).filter(e=>wae.includes(e)).reduce((e,r)=>(e[r]=t[r],e),{}),yae=(t,e,r)=>{const{sessionProperties:n={},scopedProperties:i={}}=t,s={};if(!Ro(i)&&!Ro(n))return;const o=WC(n);for(const a of r){const c=mae(a);if(!c)continue;s[o5(c)]=o;const l=i==null?void 0:i[`${VC}:${c}`];if(l){const u=l==null?void 0:l[`${VC}:${c}:${e}`];s[o5(c)]=HC(HC({},s[o5(c)]),WC(u||l))}}for(const[a,c]of Object.entries(s))Object.keys(c).length===0&&delete s[a];return Object.keys(s).length>0?s:void 0};var bae=Object.defineProperty,vae=(t,e,r)=>e in t?bae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Sd=(t,e,r)=>vae(t,typeof e!="symbol"?e+"":e,r);let Eae=class{constructor(e){Sd(this,"name","polkadot"),Sd(this,"client"),Sd(this,"httpProviders"),Sd(this,"events"),Sd(this,"namespace"),Sd(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Ku(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var Cae=Object.defineProperty,xae=Object.defineProperties,_ae=Object.getOwnPropertyDescriptors,KC=Object.getOwnPropertySymbols,Sae=Object.prototype.hasOwnProperty,Iae=Object.prototype.propertyIsEnumerable,k4=(t,e,r)=>e in t?Cae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ZC=(t,e)=>{for(var r in e||(e={}))Sae.call(e,r)&&k4(t,r,e[r]);if(KC)for(var r of KC(e))Iae.call(e,r)&&k4(t,r,e[r]);return t},GC=(t,e)=>
vendor: 4,696 bytes, line 89
89xae(t,_ae(e)),Id=(t,e,r)=>k4(t,typeof e!="symbol"?e+"":e,r);let $ae=class{constructor(e){Id(this,"name","eip155"),Id(this,"client"),Id(this,"chainId"),Id(this,"namespace"),Id(this,"httpProviders"),Id(this,"events"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const n=r||Bi(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=parseInt(Ku(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var r,n,i,s,o;const a=(n=(r=e.request)==null?void 0:r.params)==null?void 0:n[0],c=((s=(i=e.request)==null?void 0:i.params)==null?void 0:s[1])||[];if(!a)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const l=this.client.session.get(e.topic),u=((o=l==null?void 0:l.sessionProperties)==null?void 0:o.capabilities)||{},d=`${a}${c.join(",")}`,h=u==null?void 0:u[d];if(h)return h;let f;try{f=yae(l,a,c)}catch(p){console.warn("Failed to extract capabilities from session",p)}if(f)return f;const g=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:GC(ZC({},l.sessionProperties||{}),{capabilities:GC(ZC({},u||{}),{[d]:g})})})}catch(p){console.warn("Failed to update session with capabilities",p)}return g}async getCallStatus(e){var r,n;const i=this.client.session.get(e.topic),s=(r=i.sessionProperties)==null?void 0:r.bundler_name;if(s){const a=this.getBundlerUrl(e.chainId,s);try{return await this.getUserOperationReceipt(a,e)}catch(c){console.warn("Failed to fetch call status from bundler",c,a)}}const o=(n=i.sessionProperties)==null?void 0:n.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(a){console.warn("Failed to fetch call status from custom bundler",a,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,r){var n;const i=new URL(e),s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(On("eth_getUserOperationReceipt",[(n=r.request.params)==null?void 0:n[0]]))});if(!s.ok)throw new Error(`Failed to fetch user operation receipt - ${s.status}`);return await s.json()}
89getBundlerUrl(e,r){return`${Noe}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${r}`}};var Aae=Object.defineProperty,Pae=(t,e,r)=>e in t?Aae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$d=(t,e,r)=>Pae(t,typeof e!="symbol"?e+"":e,r);let Tae=class{constructor(e){$d(this,"name","solana"),$d(this,"client"),$d(this,"httpProviders"),$d(this,"events"),$d(this,"namespace"),$d(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Ku(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var Oae=Object.defineProperty,Nae=(t,e,r)=>e in t?Oae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ad=(t,e,r)=>Nae(t,typeof e!="symbol"?e+"":e,r);let kae=class{constructor(e){Ad(this,"name","cosmos"),Ad(this,"client"),Ad(this,"httpProviders"),Ad(this,"events"),Ad(this,"namespace"),Ad(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Ku(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var Rae=Object.defineProperty,Bae=(t,e,r)=>e in t?Rae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pd=(t,e,r)=>Bae(t,typeof e!="symbol"?e+"":e,r);let Dae=class{constructor(e){Pd(this,"name","algorand"),Pd(this,"client"),Pd(this,"httpProviders"),Pd(this,"events"),Pd(this,"namespace"),Pd(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||Bi(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new nr(new ur(n,gt("disableProviderPing")))}};var Lae=Object.defineProperty,Mae=(t,e,r)=>e in t?Lae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Td=(t,e,r)=>Mae(t,typeof e!="symbol"?e+"":e,r);let Uae=class{constructor(e){Td(this,"name","cip34"),Td(this,"client"),Td(this,"httpProviders"),Td(this,"events"),Td(this,"namespace"),Td(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const n=this.getCardanoRPCUrl(r),i=Ku(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var jae=Object.defineProperty,zae=(t,e,r)=>e in t?jae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Od=(t,e,r)=>zae(t,typeof e!="symbol"?e+"":e,r);let Fae=class{constructor(e){Od(this,"name","elrond"),Od(this,"client"),Od(this,"httpProviders"),Od(this,"events"),Od(this,"namespace"),Od(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Ku(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var qae=Object.defineProperty,Hae=(t,e,r)=>e in t?qae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Nd=(t,e,r)=>Hae(t,typeof e!="symbol"?e+"":e,r);let Vae=class{constructor(e){Nd(this,"name","multiversx"),Nd(this,"client"),Nd(this,"httpProviders"),Nd(this,"events"),Nd(this,"namespace"),Nd(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Ku(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var Wae=Object.defineProperty,Kae=(t,e,r)=>e in t?Wae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,kd=(t,e,r)=>Kae(t,typeof e!="symbol"?e+"":e,r);let Zae=class{constructor(e){kd(this,"name","near"),kd(this,"client"),kd(this,"httpProviders"),kd(this,"events"),kd(this,"namespace"),kd(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||Bi(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace);return typeof n>"u"?void 0:new nr(new ur(n,gt("disableProviderPing")))}};var Gae=Object.defineProperty,Yae=(t,e,r)=>e in t?Gae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Rd=(t,e,r)=>Yae(t,typeof e!="symbol"?e+"":e,r);let Jae=class{constructor(e){Rd(this,"name","tezos"),Rd(this,"client"),Rd(this,"httpProviders"),Rd(this,"events"),Rd(this,"namespace"),Rd(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||Bi(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{e[r]=this.createHttpProvider(r)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace);return typeof n>"u"?void 0:new nr(new ur(n))}};var Xae=Object.defineProperty,Qae=(t,e,r)=>e in t?Xae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Bd=(t,e,r)=>Qae(t,typeof e!="symbol"?e+"":e,r);let ece=class{constructor(e){Bd(this,"name",nh),Bd(this,"client"),Bd(this,"httpProviders"),Bd(this,"events"),Bd(this,"namespace"),Bd(this,"chainId"),this.namespace=e.namespace,this.events=gt("events"),this.client=gt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(xs.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.ch
89ainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){var e,r;const n={};return(r=(e=this.namespace)==null?void 0:e.accounts)==null||r.forEach(i=>{const s=mh(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){const r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Bi(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,gt("disableProviderPing")))}};var tce=Object.defineProperty,rce=Object.defineProperties,nce=Object.getOwnPropertyDescriptors,YC=Object.getOwnPropertySymbols,ice=Object.prototype.hasOwnProperty,sce=Object.prototype.propertyIsEnumerable,R4=(t,e,r)=>e in t?tce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Mg=(t,e)=>{for(var r in e||(e={}))ice.call(e,r)&&R4(t,r,e[r]);if(YC)for(var r of YC(e))sce.call(e,r)&&R4(t,r,e[r]);return t},a5=(t,e)=>rce(t,nce(e)),Yi=(t,e,r)=>R4(t,typeof e!="symbol"?e+"":e,r);let oce=class UN{constructor(e){Yi(this,"client"),Yi(this,"namespaces"),Yi(this,"optionalNamespaces"),Yi(this,"sessionProperties"),Yi(this,"scopedProperties"),Yi(this,"events",new v0),Yi(this,"rpcProviders",{}),Yi(this,"session"),Yi(this,"providerOpts"),Yi(this,"logger"),Yi(this,"uri"),Yi(this,"disableProviderPing",!1),this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:al(cl({level:(e==null?void 0:e.logger)||NC})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new UN(e);return await r.initialize(),r}async request(e,r,n){const[i,s]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:Mg({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,r,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>r(null,ll(s,o))).catch(o=>r(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:rr("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,r){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:n,response:i}=await this.client.authenticate(e,r);n&&(this.uri=n,this.events.emit("display_uri",n));const s=await i();if(this.session=s.session,this.session){const o=zC(this.session.namespaces);this.namespaces=Lg(this.namespaces,o),await this.persist("namespaces",this.namespaces),this.onConnect()}return s}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){const{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});r&&(this.uri=r,this.events.emit("display_uri",r));const i=await n();this.session=i;const s=zC(i.namespaces);return this.namespaces=Lg(this.namespaces,s),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;const[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===nh?s.setDefaultChain(`${n}:${i}`,r):s.setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(Ba(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,r;if(this.client=this.providerOpts.client||await boe.init({core:this.providerOpts.core,logger:this.providerOpts.logger||NC,relayUrl:this.providerOpts.relayUrl||Poe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(n){throw this.logger.error("Failed to get session",n),new Error(`The provided session: ${(r=(e=this.providerOpts)==null?void 0:e.session)==null?void 0:r.topic} doesn't exist in the Sign client`)}else{const n=this.client.session.getAll();this.session=n[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(r=>ah(r)))];s5("client",this.client),s5("events",this.events),s5("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=hae(r,this.session);if((n==null?void 0:n.length)===0)return;const i=LN(n),s=Lg(this.namespaces,this.optionalNamespaces),o=a5(Mg({},s[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new $ae({namespace:o});break;case"algorand":this.rpcProviders[r]=new Dae({namespace:o});break;case"solana":this.rpcProviders[r]=new Tae({namespace:o});break;case"cosmos":this.rpcProviders[r]=new kae({namespace:o});break;case"polkadot":this.rpcProviders[r]=new Eae({namespace:o});break;case"cip34":this.rpcProviders[r]=new Uae({namespace:o});break;case"elrond":this.rpcProviders[r]=new Fae({namespace:o});break;case"multiversx":this.rpcProviders[r]=new Vae({namespace:o});break;case"near":this.rpcProviders[r]=new Zae({namespace:o});break;case"tezos":this.rpcProviders[r]=new Jae({namespace:o});break;default:this.rpcProviders[nh]?this.rpcProviders[nh].updateNamespace(o):this.rpcProviders[nh]=new ece({namespace:o})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{var r;const{topic:n}=e;n===((r=this.session)==null?void 0:r.topic)&&this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{var r;const{params:n,topic:i}=e;if(i!==((r=this.session)==null?void 0:r.topic))return;const{event:s}=n;if(s.name==="accountsChanged"){const o=s.data;o&&Ba(o)&&this.events.emit("accountsChanged",o.map(jC))}else if(s.name==="chainChanged"){const o=n.chainId,a=n.event.data,c=ah(o),l=i5(o)!==i5(a)?`${c}:${i5(a)}`:o;this.onChainChanged(l)}else this.events.emit(s.name,s.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n,i;if(e!==((n=this.session)==null?void 0:n.topic))return;const{namespaces:s}=r,o=(i=this.client)==null?void 0:i.session.get(e);this.session=a5(Mg({},o),{namespaces:s}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{var r;e.topic===((r=this.session)==null?void 0:r.topic)&&(await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",a5(Mg({},rr("USER_DISCONNECTED")),{data:e.topic})))}),this.on(xs.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[nh]}
89onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r={},optionalNamespaces:n={},sessionProperties:i,scopedProperties:s}=e;this.optionalNamespaces=Lg(r,n),this.sessionProperties=i,this.scopedProperties=s}validateChain(e){const[r,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>ah(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=ah(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged(e,r=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);if(!i)return;this.updateNamespaceChain(n,i),this.events.emit("chainChanged",i);const s=this.getProvider(n).getDefaultChain();r||this.getProvider(n).setDefaultChain(i),this.emitAccountsChangedOnChainChange({namespace:n,previousChainId:s,newChainId:e}),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:e,previousChainId:r,newChainId:n}){var i,s;try{if(r===n)return;const o=(s=(i=this.session)==null?void 0:i.namespaces[e])==null?void 0:s.accounts;if(!o)return;const a=o.filter(c=>c.includes(`${n}:`)).map(jC);if(!Ba(a))return;this.events.emit("accountsChanged",a)}catch(o){this.logger.warn("Failed to emit accountsChanged on chain change",o)}}updateNamespaceChain(e,r){if(!this.namespaces)return;const n=this.namespaces[e]?e:`${e}:${r}`,i={chains:[],methods:[],events:[],defaultChain:r};this.namespaces[n]?this.namespaces[n]&&(this.namespaces[n].defaultChain=r):this.namespaces[n]=i}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,r){var n;const i=((n=this.session)==null?void 0:n.topic)||"";await this.client.core.storage.setItem(`${Bg}/${e}${i}`,r)}async getFromStore(e){var r;const n=((r=this.session)==null?void 0:r.topic)||"";return await this.client.core.storage.getItem(`${Bg}/${e}${n}`)}async deleteFromStore(e){var r;const n=((r=this.session)==null?void 0:r.topic)||"";await this.client.core.storage.removeItem(`${Bg}/${e}${n}`)}async cleanupStorage(){var e;try{if(((e=this.client)==null?void 0:e.session.length)>0)return;const r=await this.client.core.storage.getKeys();for(const n of r)n.startsWith(Bg)&&await this.client.core.storage.removeItem(n)}catch(r){this.logger.warn("Failed to cleanup storage",r)}}};const c_e=oce;var c5={exports:{}},JC;function jN(){return JC||(JC=1,function(t){var e={single_source_shortest_paths:function(r,n,i){var s={},o={};o[n]=0;var a=e.PriorityQueue.make();a.push(n,0);for(var c,l,u,d,h,f,g,p,w;!a.empty();){c=a.pop(),l=c.value,d=c.cost,h=r[l]||{};for(u in h)h.hasOwnProperty(u)&&(f=h[u],g=d+f,p=o[u],w=typeof o[u]>"u",(w||p>g)&&(o[u]=g,a.push(u,g),s[u]=l))}if(typeof i<"u"&&typeof o[i]>"u"){var m=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(m)}return s},extract_shortest_path_from_predecessor_list:function(r,n){for(var i=[],s=n;s;)i.push(s),r[s],s=r[s];return i.reverse(),i},find_path:function(r,n,i){var s=e.single_source_shortest_paths(r,n,i);return e.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(r){var n=e.PriorityQueue,i={},s;r=r||{};for(s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);return i.queue=[],i.sorter=r.sorter||n.default_sorter,i},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var i={value:r,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e}(c5)),c5.exports}var m2={exports:{}},ace=m2.exports,XC;function cce(){return XC||(XC=1,function(t,e){(function(r,n){t.exports=n()})(ace,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var n=["th","st","nd","rd"],i=r%100;return"["+r+(n[(i-20)%10]||n[i]||n[0])+"]"}}})}(m2)),m2.exports}var lce=cce();const uce=ec(lce);var QC={};const En={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"ID_AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122"}
89,CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],HTTP_STATUS_CODES:{SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(typeof sr<"u"&&typeof QC<"u"?QC.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org"},dce={caipNetworkIdToNumber(t){return t?Number(t.split(":")[1]):void 0},parseEvmChainId(t){return typeof t=="string"?this.caipNetworkIdToNumber(t):t},getNetworksByNamespace(t,e){return(t==null?void 0:t.filter(r=>r.chainNamespace===e))||[]},getFirstNetworkByNamespace(t,e){return this.getNetworksByNamespace(t,e)[0]},getNetworkNameByCaipNetworkId(t,e){var i;if(!e)return;const r=t.find(s=>s.caipNetworkId===e);if(r)return r.name;const[n]=e.split(":");return((i=En.CHAIN_NAME_MAP)==null?void 0:i[n])||void 0}};var hce=20,fce=1,O0=1e6,pce=1e6,gce=-7,wce=21,mce=!1,Np="[big.js] ",Zu=Np+"Invalid ",um=Zu+"decimal places",yce=Zu+"rounding mode",zN=Np+"Division by zero",Tt={},Bo=void 0,bce=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function FN(){function t(e){var r=this;if(!(r instanceof t))return e===Bo?FN():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(Zu+"value");e=e===0&&1/e<0?"-0":String(e)}vce(r,e)}r.constructor=t}return t.prototype=Tt,t.DP=hce,t.RM=fce,t.NE=gce,t.PE=wce,t.strict=mce,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function vce(t,e){var r,n,i;if(!bce.test(e))throw Error(Zu+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),i=e.length,n=0;n<i&&e.charAt(n)=="0";)++n;if(n==i)t.c=[t.e=0];else{for(;i>0&&e.charAt(--i)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}return t}function Gu(t,e,r,n){var i=t.c;if(r===Bo&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(yce);if(e<1)n=r===3&&(n||!!i[0])||e===0&&(r===1&&i[0]>=5||r===2&&(i[0]>5||i[0]===5&&(n||i[1]!==Bo))),i.length=1,n?(t.e=t.e-e+1,i[0]=1):i[0]=t.e=0;else if(e<i.length){if(n=r===1&&i[e]>=5||r===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==Bo||i[e-1]&1))||r===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++t.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return t}function Yu(t,e,r){var n=t.e,i=t.c.join(""),s=i.length;if(e)i=i.charAt(0)+(s>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>s)for(n-=s;n--;)i+="0";else n<s&&(i=i.slice(0,n)+"."+i.slice(n));else s>1&&(i=i.charAt(0)+"."+i.slice(1));return t.s<0&&r?"-"+i:i}Tt.abs=function(){var t=new this.constructor(this);return t.s=1,t};Tt.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,s=r.s,o=t.s,a=r.e,c=t.e;if(!n[0]||!i[0])return n[0]?s:i[0]?-o:0;if(s!=o)return s;if(e=s<0,a!=c)return a>c^e?1:-1;for(o=(a=n.length)<(c=i.length)?a:c,s=-1;++s<o;)if(n[s]!=i[s])return n[s]>i[s]^e?1:-1;return a==c?0:a>c^e?1:-1};Tt.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,s=e.s==t.s?1:-1,o=r.DP;if(o!==~~o||o<0||o>O0)throw Error(um);if(!i[0])throw Error(zN);if(!n[0])return t.s=s,t.c=[t.e=0],t;var a,c,l,u,d,h=i.slice(),f=a=i.length,g=n.length,p=n.slice(0,a),w=p.length,m=t,b=m.c=[],v=0,E=o+(m.e=e.e-t.e)+1;for(m.s=s,s=E<0?0:E,h.unshift(0);w++<a;)p.push(0);do{for(l=0;l<10;l++){if(a!=(w=p.length))u=a>w?1:-1;else for(d=-1,u=0;++d<a;)if(i[d]!=p[d]){u=i[d]>p[d]?1:-1;break}if(u<0){for(c=w==a?i:h;w;){if(p[--w]<c[w]){for(d=w;d&&!p[--d];)p[d]=9;--p[d],p[w]+=10}p[w]-=c[w]}for(;!p[0];)p.shift()}else break}b[v++]=u?l:++l,p[0]&&u?p[w]=n[f]||0:p=[n[f]]}while((f++<g||p[0]!==Bo)&&s--);return!b[0]&&v!=1&&(b.shift(),m.e--,E--),v>E&&Gu(m,E,r.RM,p[0]!==Bo),m};Tt.eq=function(t){return this.cmp(t)===0};Tt.gt=function(t){return this.cmp(t)>0};Tt.gte=function(t){return this.cmp(t)>-1};Tt.lt=function(t){return this.cmp(t)<0};Tt.lte=function(t){return this.cmp(t)<1};Tt.minus=Tt.sub=function(t){var e,r,n,i,s=this,o=s.constructor,a=s.s,c=(t=new o(t)).s;if(a!=c)return t.s=-c,s.plus(t);var l=s.c.slice(),u=s.e,d=t.c,h=t.e;if(!l[0]||!d[0])return d[0]?t.s=-c:l[0]?t=new o(s):t.s=1,t;if(a=u-h){for((i=a<0)?(a=-a,n=l):(h=u,n=d),n.reverse(),c=a;c--;)n.push(0);n.reverse()}else for(r=((i=l.length<d.length)?l:d).length,a=c=0;c<r;c++)if(l[c]!=d[c]){i=l[c]<d[c];break}if(i&&(n=l,l=d,d=n,t.s=-t.s),(c=(r=d.length)-(e=l.length))>0)for(;c--;)l[e++]=0;for(c=e;r>a;){if(l[--r]<d[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=d[r]}for(;l[--c]===0;)l.pop();for(;l[0]===0;)l.shift(),--h;return l[0]||(t.s=1,l=[h=0]),t.c=l,t.e=h,t};Tt.mod=function(t){var e,r=this,n=r.constructor,i=r.s,s=(t=new n(t)).s;if(!t.c[0])throw Error(zN);return r.s=t.s=1,e=t.cmp(r)==1,r.s=i,t.s=s,e?new n(r):(i=n.DP,s=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=i,n.RM=s,this.minus(r.times(t)))};Tt.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};Tt.plus=Tt.add=function(t){var e,r,n,i=this,s=i.constructor;if(t=new s(t),i.s!=t.s)return t.s=-t.s,i.minus(t);var o=i.e,a=i.c,c=t.e,l=t.c;if(!a[0]||!l[0])return l[0]||(a[0]?t=new s(i):t.s=i.s),t;if(a=a.slice(),e=o-c){for(e>0?(c=o,n=l):(e=-e,n=a),n.reverse();e--;)n.push(0);n.reverse()}for(a.length-l.length<0&&(n=l,l=a,a=n),e=l.length,r=0;e;a[e]%=10)r=(a[--e]=a[e]+l[e]+r)/10|0;
89for(r&&(a.unshift(r),++c),e=a.length;a[--e]===0;)a.pop();return t.c=a,t.e=c,t};Tt.pow=function(t){var e=this,r=new e.constructor("1"),n=r,i=t<0;if(t!==~~t||t<-1e6||t>pce)throw Error(Zu+"exponent");for(i&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return i?r.div(n):n};Tt.prec=function(t,e){if(t!==~~t||t<1||t>O0)throw Error(Zu+"precision");return Gu(new this.constructor(this),t,e)};Tt.round=function(t,e){if(t===Bo)t=0;else if(t!==~~t||t<-1e6||t>O0)throw Error(um);return Gu(new this.constructor(this),t+this.e+1,e)};Tt.sqrt=function(){var t,e,r,n=this,i=n.constructor,s=n.s,o=n.e,a=new i("0.5");if(!n.c[0])return new i(n);if(s<0)throw Error(Np+"No square root");s=Math.sqrt(+Yu(n,!0,!0)),s===0||s===1/0?(e=n.c.join(""),e.length+o&1||(e+="0"),s=Math.sqrt(e),o=((o+1)/2|0)-(o<0||o&1),t=new i((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+o)):t=new i(s+""),o=t.e+(i.DP+=4);do r=t,t=a.times(r.plus(n.div(r)));while(r.c.slice(0,o).join("")!==t.c.slice(0,o).join(""));return Gu(t,(i.DP-=4)+t.e+1,i.RM)};Tt.times=Tt.mul=function(t){var e,r=this,n=r.constructor,i=r.c,s=(t=new n(t)).c,o=i.length,a=s.length,c=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!s[0])return t.c=[t.e=0],t;for(t.e=c+l,o<a&&(e=i,i=s,s=e,l=o,o=a,a=l),e=new Array(l=o+a);l--;)e[l]=0;for(c=a;c--;){for(a=0,l=o+c;l>c;)a=e[l]+s[c]*i[l-c-1]+a,e[l--]=a%10,a=a/10|0;e[l]=a}for(a?++t.e:e.shift(),c=e.length;!e[--c];)e.pop();return t.c=e,t};Tt.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Bo){if(t!==~~t||t<0||t>O0)throw Error(um);for(r=Gu(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return Yu(r,!0,!!n)};Tt.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Bo){if(t!==~~t||t<0||t>O0)throw Error(um);for(r=Gu(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return Yu(r,!1,!!n)};Tt[Symbol.for("nodejs.util.inspect.custom")]=Tt.toJSON=Tt.toString=function(){var t=this,e=t.constructor;return Yu(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};Tt.toNumber=function(){var t=+Yu(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(Np+"Imprecise conversion");return t};Tt.toPrecision=function(t,e){var r=this,n=r.constructor,i=r.c[0];if(t!==Bo){if(t!==~~t||t<1||t>O0)throw Error(Zu+"precision");for(r=Gu(new n(r),t,e);r.c.length<t;)r.c.push(0)}return Yu(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!i)};Tt.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(Np+"valueOf disallowed");return Yu(t,t.e<=e.NE||t.e>=e.PE,!0)};var Oo=FN();const Ece={bigNumber(t){return t?new Oo(t):new Oo(0)},multiply(t,e){if(t===void 0||e===void 0)return new Oo(0);const r=new Oo(t),n=new Oo(e);return r.times(n)},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})},parseLocalStringToNumber(t){return t===void 0?0:parseFloat(t.replace(/,/gu,""))}},Cce=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],xce=[{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],_ce=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],Sce={getERC20Abi:t=>En.USDT_CONTRACT_ADDRESSES.includes(t)?_ce:Cce,getSwapAbi:()=>xce},l_e={validateCaipAddress(t){var e;if(((e=t.split(":"))==null?void 0:e.length)!==3)throw new Error("Invalid CAIP Address");return t},parseCaipAddress(t){const e=t.split(":");if(e.length!==3)throw new Error(`Invalid CAIP-10 address: ${t}`);const[r,n,i]=e;if(!r||!n||!i)throw new Error(`Invalid CAIP-10 address: ${t}`);return{chainNamespace:r,chainId:n,address:i}},parseCaipNetworkId(t){const e=t.split(":");if(e.length!==2)throw new Error(`Invalid CAIP-2 network id: ${t}`);const[r,n]=e;if(!r||!n)throw new Error(`Invalid CAIP-2 network id: ${t}`);return{chainNamespace:r,chainId:n}}},Fe={WALLET_ID:"@appkit/wallet_id",WALLET_NAME:"@appkit/wallet_name",SOLANA_WALLET:"@appkit/solana_wallet",SOLANA_CAIP_CHAIN:"@appkit/solana_caip_chain",ACTIVE_CAIP_NETWORK_ID:"@appkit/active_caip_network_id",CONNECTED_SOCIAL:"@appkit/connected_social",CONNECTED_SOCIAL_USERNAME:"@appkit-wallet/SOCIAL_USERNAME",RECENT_WALLETS:"@appkit/recent_wallets",DEEPL
89INK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",ACTIVE_NAMESPACE:"@appkit/active_namespace",CONNECTED_NAMESPACES:"@appkit/connected_namespaces",CONNECTION_STATUS:"@appkit/connection_status",SIWX_AUTH_TOKEN:"@appkit/siwx-auth-token",SIWX_NONCE_TOKEN:"@appkit/siwx-nonce-token",TELEGRAM_SOCIAL_PROVIDER:"@appkit/social_provider",NATIVE_BALANCE_CACHE:"@appkit/native_balance_cache",PORTFOLIO_CACHE:"@appkit/portfolio_cache",ENS_CACHE:"@appkit/ens_cache",IDENTITY_CACHE:"@appkit/identity_cache",PREFERRED_ACCOUNT_TYPES:"@appkit/preferred_account_types",CONNECTIONS:"@appkit/connections"};function l5(t){if(!t)throw new Error("Namespace is required for CONNECTED_CONNECTOR_ID");return`@appkit/${t}:connected_connector_id`}const Le={setItem(t,e){$f()&&e!==void 0&&localStorage.setItem(t,e)},getItem(t){if($f())return localStorage.getItem(t)||void 0},removeItem(t){$f()&&localStorage.removeItem(t)},clear(){$f()&&localStorage.clear()}};function $f(){return typeof window<"u"&&typeof localStorage<"u"}function Fc(t,e){return e==="light"?{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(230, 100%, 67%, 1)","--w3m-background":"#121313"}}const Ice=Symbol(),ex=Object.getPrototypeOf,B4=new WeakMap,$ce=t=>t&&(B4.has(t)?B4.get(t):ex(t)===Object.prototype||ex(t)===Array.prototype),Ace=t=>$ce(t)&&t[Ice]||null,tx=(t,e=!0)=>{B4.set(t,e)},J2={},u5=t=>typeof t=="object"&&t!==null,Dc=new WeakMap,Af=new WeakSet,Pce=(t=Object.is,e=(l,u)=>new Proxy(l,u),r=l=>u5(l)&&!Af.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),n=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},i=new WeakMap,s=(l,u,d=n)=>{const h=i.get(l);if((h==null?void 0:h[0])===u)return h[1];const f=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return tx(f,!0),i.set(l,[u,f]),Reflect.ownKeys(l).forEach(g=>{if(Object.getOwnPropertyDescriptor(f,g))return;const p=Reflect.get(l,g),{enumerable:w}=Reflect.getOwnPropertyDescriptor(l,g),m={value:p,enumerable:w,configurable:!0};if(Af.has(p))tx(p,!1);else if(p instanceof Promise)delete m.value,m.get=()=>d(p);else if(Dc.has(p)){const[b,v]=Dc.get(p);m.value=s(b,v(),d)}Object.defineProperty(f,g,m)}),Object.preventExtensions(f)},o=new WeakMap,a=[1,1],c=l=>{if(!u5(l))throw new Error("object required");const u=o.get(l);if(u)return u;let d=a[0];const h=new Set,f=(y,O=++a[0])=>{d!==O&&(d=O,h.forEach(S=>S(y,O)))};let g=a[1];const p=(y=++a[1])=>(g!==y&&!h.size&&(g=y,m.forEach(([O])=>{const S=O[1](y);S>d&&(d=S)})),d),w=y=>(O,S)=>{const k=[...O];k[1]=[y,...k[1]],f(k,S)},m=new Map,b=(y,O)=>{if((J2?"production":void 0)!=="production"&&m.has(y))throw new Error("prop listener already exists");if(h.size){const S=O[3](w(y));m.set(y,[O,S])}else m.set(y,[O])},v=y=>{var O;const S=m.get(y);S&&(m.delete(y),(O=S[1])==null||O.call(S))},E=y=>(h.add(y),h.size===1&&m.forEach(([S,k],L)=>{if((J2?"production":void 0)!=="production"&&k)throw new Error("remove already exists");const T=S[3](w(L));m.set(L,[S,T])}),()=>{h.delete(y),h.size===0&&m.forEach(([S,k],L)=>{k&&(k(),m.set(L,[S]))})}),I=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),A=e(I,{deleteProperty(y,O){const S=Reflect.get(y,O);v(O);const k=Reflect.deleteProperty(y,O);return k&&f(["delete",[O],S]),k},set(y,O,S,k){const L=Reflect.has(y,O),T=Reflect.get(y,O,k);if(L&&(t(T,S)||o.has(S)&&t(T,o.get(S))))return!0;v(O),u5(S)&&(S=Ace(S)||S);let C=S;if(S instanceof Promise)S.then(x=>{S.status="fulfilled",S.value=x,f(["resolve",[O],x])}).catch(x=>{S.status="rejected",S.reason=x,f(["reject",[O],x])});else{!Dc.has(S)&&r(S)&&(C=c(S));const x=!Af.has(C)&&Dc.get(C);x&&b(O,x)}return Reflect.set(y,O,C,k),f(["set",[O],S,T]),!0}});o.set(l,A);const P=[I,p,s,E];return Dc.set(A,P),Reflect.ownKeys(l).forEach(y=>{const O=Object.getOwnPropertyDescriptor(l,y);"value"in O&&(A[y]=l[y],delete O.value,delete O.writable),Object.defineProperty(I,y,O)}),A})=>[c,Dc,Af,t,e,r,n,i,s,o,a],[Tce]=Pce();function Xt(t={}){return Tce(t)}function Ln(t,e,r){const n=Dc.get(t);(J2?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i;const s=[],o=n[3];let a=!1;const l=o(u=>
89{s.push(u),i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function L1(t,e){const r=Dc.get(t);(J2?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");const[n,i,s]=r;return s(n,i(),e)}function Lh(t){return Af.add(t),t}const Oce=Symbol(),rx=Object.getPrototypeOf,D4=new WeakMap,Nce=t=>t&&(D4.has(t)?D4.get(t):rx(t)===Object.prototype||rx(t)===Array.prototype),kce=t=>Nce(t)&&t[Oce]||null,nx=(t,e=!0)=>{D4.set(t,e)},X2={},Qv=t=>typeof t=="object"&&t!==null,Rce=t=>Qv(t)&&!kp.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),qN=(t,e)=>{const r=L4.get(t);if((r==null?void 0:r[0])===e)return r[1];const n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return nx(n,!0),L4.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;const s=Reflect.get(t,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,i),a={value:s,enumerable:o,configurable:!0};if(kp.has(s))nx(s,!1);else if(rl.has(s)){const[c,l]=rl.get(s);a.value=qN(c,l())}Object.defineProperty(n,i,a)}),Object.preventExtensions(n)},Bce=(t,e,r,n)=>({deleteProperty(i,s){const o=Reflect.get(i,s);r(s);const a=Reflect.deleteProperty(i,s);return a&&n(["delete",[s],o]),a},set(i,s,o,a){const c=!t()&&Reflect.has(i,s),l=Reflect.get(i,s,a);if(c&&(ix(l,o)||M1.has(o)&&ix(l,M1.get(o))))return!0;r(s),Qv(o)&&(o=kce(o)||o);const u=!rl.has(o)&&Lce(o)?Rt(o):o;return e(s,u),Reflect.set(i,s,u,a),n(["set",[s],o,l]),!0}}),rl=new WeakMap,kp=new WeakSet,L4=new WeakMap,Pf=[1,1],M1=new WeakMap;let ix=Object.is,Dce=(t,e)=>new Proxy(t,e),Lce=Rce,Mce=qN,Uce=Bce;function Rt(t={}){if(!Qv(t))throw new Error("object required");const e=M1.get(t);if(e)return e;let r=Pf[0];const n=new Set,i=(w,m=++Pf[0])=>{r!==m&&(r=m,n.forEach(b=>b(w,m)))};let s=Pf[1];const o=(w=++Pf[1])=>(s!==w&&!n.size&&(s=w,c.forEach(([m])=>{const b=m[1](w);b>r&&(r=b)})),r),a=w=>(m,b)=>{const v=[...m];v[1]=[w,...v[1]],i(v,b)},c=new Map,l=(w,m)=>{const b=!kp.has(m)&&rl.get(m);if(b){if((X2?"production":void 0)!=="production"&&c.has(w))throw new Error("prop listener already exists");if(n.size){const v=b[2](a(w));c.set(w,[b,v])}else c.set(w,[b])}},u=w=>{var m;const b=c.get(w);b&&(c.delete(w),(m=b[1])==null||m.call(b))},d=w=>(n.add(w),n.size===1&&c.forEach(([b,v],E)=>{if((X2?"production":void 0)!=="production"&&v)throw new Error("remove already exists");const I=b[2](a(E));c.set(E,[b,I])}),()=>{n.delete(w),n.size===0&&c.forEach(([b,v],E)=>{v&&(v(),c.set(E,[b]))})});let h=!0;const f=Uce(()=>h,l,u,i),g=Dce(t,f);M1.set(t,g);const p=[t,o,d];return rl.set(g,p),Reflect.ownKeys(t).forEach(w=>{const m=Object.getOwnPropertyDescriptor(t,w);"value"in m&&m.writable&&(g[w]=t[w])}),h=!1,g}function Gr(t,e,r){const n=rl.get(t);(X2?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i;const s=[],o=n[2];let a=!1;const l=o(u=>{s.push(u),i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function U1(t){const e=rl.get(t);(X2?"production":void 0)!=="production"&&!e&&console.warn("Please use proxy object");const[r,n]=e;return Mce(r,n())}function Mh(t){return kp.add(t),t}function jce(){return{proxyStateMap:rl,refSet:kp,snapCache:L4,versionHolder:Pf,proxyCache:M1}}function Sn(t,e,r,n){let i=t[e];return Ln(t,()=>{const s=t[e];Object.is(i,s)||r(i=s)})}function zce(t){const e=Xt({data:Array.from([]),has(r){return this.data.some(n=>n[0]===r)},set(r,n){const i=this.data.find(s=>s[0]===r);return i?i[1]=n:this.data.push([r,n]),this},get(r){var n;return(n=this.data.find(i=>i[0]===r))==null?void 0:n[1]},delete(r){const n=this.data.findIndex(i=>i[0]===r);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(r){this.data.forEach(n=>{r(n[1],n[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[1]).values()}
89,entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(e,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(e),e}const HN=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:"",supportedChains:["eip155"]},{label:"Meld.io",name:"meld",feeRange:"1-2%",url:"https://meldcrypto.com",supportedChains:["eip155","solana"]}],Fce="WXETMuFUQmqqybHuRkSgxv:25B8LJHSfpG6LVjR2ytU5Cwh7Z4Sch2ocoU",Pi={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,BALANCE_SUPPORTED_CHAINS:["eip155","solana"],NAMES_SUPPORTED_CHAIN_NAMESPACES:["eip155"],NATIVE_TOKEN_ADDRESS:{eip155:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",solana:"So11111111111111111111111111111111111111111",polkadot:"0x",bip122:"0x",cosmos:"0x"},CONVERT_SLIPPAGE_TOLERANCE:1,CONNECT_LABELS:{MOBILE:"Open and continue in the wallet app"},SEND_SUPPORTED_NAMESPACES:["eip155","solana"],DEFAULT_REMOTE_FEATURES:{swaps:["1inch"],onramp:["coinbase","meld"],email:!0,socials:["google","x","discord","farcaster","github","apple","facebook"],activity:!0,reownBranding:!0},DEFAULT_REMOTE_FEATURES_DISABLED:{email:!1,socials:!1,swaps:!1,onramp:!1,activity:!1,reownBranding:!1},DEFAULT_FEATURES:{receive:!0,send:!0,emailShowWallets:!0,connectorTypeOrder:["walletConnect","recent","injected","featured","custom","external","recommended"],analytics:!0,allWallets:!0,legalCheckbox:!1,smartSessions:!1,collapseWallets:!1,walletFeaturesOrder:["onramp","swaps","receive","send"],connectMethodsOrder:void 0,pay:!1},DEFAULT_ACCOUNT_TYPES:{bip122:"payment",eip155:"smartAccount",polkadot:"eoa",solana:"eoa"},ADAPTER_TYPES:{UNIVERSAL:"universal"}},je={cacheExpiry:{portfolio:3e4,nativeBalance:3e4,ens:3e5,identity:3e5},isCacheExpired(t,e){return Date.now()-t>e},getActiveNetworkProps(){const t=je.getActiveNamespace(),e=je.getActiveCaipNetworkId(),r=e?e.split(":")[1]:void 0,n=r?isNaN(Number(r))?r:Number(r):void 0;return{namespace:t,caipNetworkId:e,chainId:n}},setWalletConnectDeepLink({name:t,href:e}){try{Le.setItem(Fe.DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const t=Le.getItem(Fe.DEEPLINK_CHOICE);if(t)return JSON.parse(t)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{Le.removeItem(Fe.DEEPLINK_CHOICE)}catch{console.info("Unable to delete WalletConnect deep link")}},setActiveNamespace(t){try{Le.setItem(Fe.ACTIVE_NAMESPACE,t)}catch{console.info("Unable to set active namespace")}},setActiveCaipNetworkId(t){try{Le.setItem(Fe.ACTIVE_CAIP_NETWORK_ID,t),je.setActiveNamespace(t.split(":")[0])}catch{console.info("Unable to set active caip network id")}},getActiveCaipNetworkId(){try{return Le.getItem(Fe.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to get active caip network id");return}},deleteActiveCaipNetworkId(){try{Le.removeItem(Fe.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to delete active caip network id")}},deleteConnectedConnectorId(t){try{const e=l5(t);Le.removeItem(e)}catch{console.info("Unable to delete connected connector id")}},setAppKitRecent(t){try{const e=je.getRecentWallets();e.find(n=>n.id===t.id)||(e.unshift(t),e.length>2&&e.pop(),Le.setItem(Fe.RECENT_WALLETS,JSON.stringify(e)))}catch{console.info("Unable to set AppKit recent")}},getRecentWallets(){try{const t=Le.getItem(Fe.RECENT_WALLETS);return t?JSON.parse(t):[]}catch{console.info("Unable to get AppKit recent")}return[]},setConnectedConnectorId(t,e){try{const r=l5(t);Le.setItem(r,e)}catch{console.info("Unable to set Connected Connector Id")}},getActiveNamespace(){try{return Le.getItem(Fe.ACTIVE_NAMESPACE)}catch{console.info("Unable to get active namespace")}},getConnectedConnectorId(t){if(t)try{const e=l5(t);return Le.getItem(e)}catch{console.info("Unable to get connected connector id in namespace ",t)}},setConnectedSocialProvider(t){try{Le.setItem(Fe.CONNECTED_SOCIAL,t)}catch{console.info("Unable to set connected social provider")}},getConnectedSocialProvider(){try{return Le.getItem(Fe.CONNECTED_SOCIAL)}catch{console.info("Unable to get connected social provider")}}
89,deleteConnectedSocialProvider(){try{Le.removeItem(Fe.CONNECTED_SOCIAL)}catch{console.info("Unable to delete connected social provider")}},getConnectedSocialUsername(){try{return Le.getItem(Fe.CONNECTED_SOCIAL_USERNAME)}catch{console.info("Unable to get connected social username")}},getStoredActiveCaipNetworkId(){var r;const t=Le.getItem(Fe.ACTIVE_CAIP_NETWORK_ID);return(r=t==null?void 0:t.split(":"))==null?void 0:r[1]},setConnectionStatus(t){try{Le.setItem(Fe.CONNECTION_STATUS,t)}catch{console.info("Unable to set connection status")}},getConnectionStatus(){try{return Le.getItem(Fe.CONNECTION_STATUS)}catch{return}},getConnectedNamespaces(){try{const t=Le.getItem(Fe.CONNECTED_NAMESPACES);return t!=null&&t.length?t.split(","):[]}catch{return[]}},setConnectedNamespaces(t){try{const e=Array.from(new Set(t));Le.setItem(Fe.CONNECTED_NAMESPACES,e.join(","))}catch{console.info("Unable to set namespaces in storage")}},addConnectedNamespace(t){try{const e=je.getConnectedNamespaces();e.includes(t)||(e.push(t),je.setConnectedNamespaces(e))}catch{console.info("Unable to add connected namespace")}},removeConnectedNamespace(t){try{const e=je.getConnectedNamespaces(),r=e.indexOf(t);r>-1&&(e.splice(r,1),je.setConnectedNamespaces(e))}catch{console.info("Unable to remove connected namespace")}},getTelegramSocialProvider(){try{return Le.getItem(Fe.TELEGRAM_SOCIAL_PROVIDER)}catch{return console.info("Unable to get telegram social provider"),null}},setTelegramSocialProvider(t){try{Le.setItem(Fe.TELEGRAM_SOCIAL_PROVIDER,t)}catch{console.info("Unable to set telegram social provider")}}
89,removeTelegramSocialProvider(){try{Le.removeItem(Fe.TELEGRAM_SOCIAL_PROVIDER)}catch{console.info("Unable to remove telegram social provider")}},getBalanceCache(){let t={};try{const e=Le.getItem(Fe.PORTFOLIO_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get balance cache")}return t},removeAddressFromBalanceCache(t){try{const e=je.getBalanceCache();Le.setItem(Fe.PORTFOLIO_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove address from balance cache",t)}},getBalanceCacheForCaipAddress(t){try{const r=je.getBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.portfolio))return r.balance;je.removeAddressFromBalanceCache(t)}catch{console.info("Unable to get balance cache for address",t)}},updateBalanceCache(t){try{const e=je.getBalanceCache();e[t.caipAddress]=t,Le.setItem(Fe.PORTFOLIO_CACHE,JSON.stringify(e))}catch{console.info("Unable to update balance cache",t)}},getNativeBalanceCache(){let t={};try{const e=Le.getItem(Fe.NATIVE_BALANCE_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get balance cache")}return t},removeAddressFromNativeBalanceCache(t){try{const e=je.getBalanceCache();Le.setItem(Fe.NATIVE_BALANCE_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove address from balance cache",t)}},getNativeBalanceCacheForCaipAddress(t){try{const r=je.getNativeBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.nativeBalance))return r;console.info("Discarding cache for address",t),je.removeAddressFromBalanceCache(t)}catch{console.info("Unable to get balance cache for address",t)}},updateNativeBalanceCache(t){try{const e=je.getNativeBalanceCache();e[t.caipAddress]=t,Le.setItem(Fe.NATIVE_BALANCE_CACHE,JSON.stringify(e))}catch{console.info("Unable to update balance cache",t)}},getEnsCache(){let t={};try{const e=Le.getItem(Fe.ENS_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get ens name cache")}return t},getEnsFromCacheForAddress(t){try{const r=je.getEnsCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.ens))return r.ens;je.removeEnsFromCache(t)}catch{console.info("Unable to get ens name from cache",t)}},updateEnsCache(t){try{const e=je.getEnsCache();e[t.address]=t,Le.setItem(Fe.ENS_CACHE,JSON.stringify(e))}catch{console.info("Unable to update ens name cache",t)}},removeEnsFromCache(t){try{const e=je.getEnsCache();Le.setItem(Fe.ENS_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove ens name from cache",t)}},getIdentityCache(){let t={};try{const e=Le.getItem(Fe.IDENTITY_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get identity cache")}return t},getIdentityFromCacheForAddress(t){try{const r=je.getIdentityCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.identity))return r.identity;je.removeIdentityFromCache(t)}catch{console.info("Unable to get identity from cache",t)}},updateIdentityCache(t){try{const e=je.getIdentityCache();e[t.address]={identity:t.identity,timestamp:t.timestamp},Le.setItem(Fe.IDENTITY_CACHE,JSON.stringify(e))}catch{console.info("Unable to update identity cache",t)}},removeIdentityFromCache(t){try{const e=je.getIdentityCache();Le.setItem(Fe.IDENTITY_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove identity from cache",t)}},clearAddressCache(){try{Le.removeItem(Fe.PORTFOLIO_CACHE),Le.removeItem(Fe.NATIVE_BALANCE_CACHE),Le.removeItem(Fe.ENS_CACHE),Le.removeItem(Fe.IDENTITY_CACHE)}catch{console.info("Unable to clear address cache")}},setPreferredAccountTypes(t){try{Le.setItem(Fe.PREFERRED_ACCOUNT_TYPES,JSON.stringify(t))}catch{console.info("Unable to set preferred account types",t)}},getPreferredAccountTypes(){try{const t=Le.getItem(Fe.PREFERRED_ACCOUNT_TYPES);return t?JSON.parse(t):{}}catch{console.info("Unable to get preferred account types")}return{}},setConnections(t,e){try{const r={...je.getConnections(),[e]:t};Le.setItem(Fe.CONNECTIONS,JSON.stringify(r))}catch(r){console.error("Unable to sync connections to storage",r)}},getConnections(){try{const t=Le.getItem(Fe.CONNECTIONS);return t?JSON.parse(t):{}}catch(t){return console.error("Unable to get connections from storage",t),{}}}},it={isMobile(){var t;return this.isClient()?!!(typeof(window==null?void 0:window.matchMedia)=="function"&&((t=window==null?void 0:window.matchMedia("(pointer:coarse)"))!=null&&t.matches)||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(t,e=""){return t==null?void 0:t.caipNetworkId.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){if(!this.isMobile())return!1;const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return it.isMobile()&&t.includes("android")},isIos(){if(!this.isMobile())return!1;const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return t.includes("iphone")||t.includes("ipad")},isSafari(){return this.isClient()?(window==null?void 0:window.navigator.userAgent.toLowerCase()).includes("safari"):!1}
89,isClient(){return typeof window<"u"},isPairingExpired(t){return t?t-Date.now()<=Pi.TEN_SEC_MS:!0},isAllowedRetry(t,e=Pi.ONE_SEC_MS){return Date.now()-t>=e},copyToClopboard(t){navigator.clipboard.writeText(t)},isIframe(){try{return(window==null?void 0:window.self)!==(window==null?void 0:window.top)}catch{return!1}},isSafeApp(){var t,e;if(it.isClient()&&window.self!==window.top)try{const r=(e=(t=window==null?void 0:window.location)==null?void 0:t.ancestorOrigins)==null?void 0:e[0],n="https://app.safe.global";if(r){const i=new URL(r),s=new URL(n);return i.hostname===s.hostname}}catch{return!1}return!1},getPairingExpiry(){return Date.now()+Pi.FOUR_MINUTES_MS},getNetworkId(t){return t==null?void 0:t.split(":")[1]},getPlainAddress(t){return t==null?void 0:t.split(":")[2]},async wait(t){return new Promise(e=>{setTimeout(e,t)})},debounce(t,e=500){let r;return(...n)=>{function i(){t(...n)}r&&clearTimeout(r),r=setTimeout(i,e)}},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},formatNativeUrl(t,e,r=null){if(it.isHttpUrl(t))return this.formatUniversalUrl(t,e);let n=t,i=r;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),i&&!(i!=null&&i.endsWith("/"))&&(i=`${i}/`),this.isTelegram()&&this.isAndroid()&&(e=encodeURIComponent(e));const s=encodeURIComponent(e);return{redirect:`${n}wc?uri=${s}`,redirectUniversalLink:i?`${i}wc?uri=${s}`:void 0,href:n}},formatUniversalUrl(t,e){if(!it.isHttpUrl(t))return this.formatNativeUrl(t,e);let r=t;r.endsWith("/")||(r=`${r}/`);const n=encodeURIComponent(e);return{redirect:`${r}wc?uri=${n}`,href:r}},getOpenTargetForPlatform(t){return t==="popupWindow"?t:this.isTelegram()?je.getTelegramSocialProvider()?"_top":"_blank":t},openHref(t,e,r){window==null||window.open(t,this.getOpenTargetForPlatform(e),r||"noreferrer noopener")},returnOpenHref(t,e,r){return window==null?void 0:window.open(t,this.getOpenTargetForPlatform(e),r||"noreferrer noopener")},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},isPWA(){var r,n,i;if(typeof window>"u")return!1;const t=(n=(r=window.matchMedia)==null?void 0:r.call(window,"(display-mode: standalone)"))==null?void 0:n.matches,e=(i=window==null?void 0:window.navigator)==null?void 0:i.standalone;return!!(t||e)},async preloadImage(t){const e=new Promise((r,n)=>{const i=new Image;i.onload=r,i.onerror=n,i.crossOrigin="anonymous",i.src=t});return Promise.race([e,it.wait(2e3)])},formatBalance(t,e){let r="0.000";if(typeof t=="string"){const n=Number(t);if(n){const i=Math.floor(n*1e3)/1e3;i&&(r=i.toString())}}return`${r}${e?` ${e}`:""}`},formatBalance2(t,e){var n;let r;if(t==="0")r="0";else if(typeof t=="string"){const i=Number(t);i&&(r=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return{value:r??"0",rest:r==="0"?"000":"",symbol:e}},getApiUrl(){return En.W3M_API_URL},getBlockchainApiUrl(){return En.BLOCKCHAIN_API_RPC_URL},getAnalyticsUrl(){return En.PULSE_API_URL},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})},parseError(t){var e,r;return typeof t=="string"?t:typeof((r=(e=t==null?void 0:t.issues)==null?void 0:e[0])==null?void 0:r.message)=="string"?t.issues[0].message:t instanceof Error?t.message:"Unknown error"},sortRequestedNetworks(t,e=[]){const r={};return e&&t&&(t.forEach((n,i)=>{r[n]=i}),e.sort((n,i)=>{const s=r[n.id],o=r[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(t){let e=0;for(const r of t)e+=r.value??0;return e},formatTokenBalance(t){const e=t.toFixed(2),[r,n]=e.split(".");return{dollars:r,pennies:n}},isAddress(t,e="eip155"){switch(e){case"eip155":if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)||/^(?:0x)?[0-9A-F]{40}$/iu.test(t))return!0}else return!1;return!1;case"solana":return/[1-9A-HJ-NP-Za-km-z]{32,44}$/iu.test(t);default:return!1}},uniqueBy(t,e){const r=new Set;return t.filter(n=>{const i=n[e];return r.has(i)?!1:(r.add(i),!0)})},generateSdkVersion(t,e,r){const i=t.length===0?Pi.ADAPTER_TYPES.UNIVERSAL:t.map(s=>s.adapterType).join(",");return`${e}-${i}-${r}`},createAccount(t,e,r,n,i){return{namespace:t,address:e,type:r,publicKey:n,path:i}},isCaipAddress(t){if(typeof t!="string")return!1;const e=t.split(":"),r=e[0];return e.filter(Boolean).length===3&&r in En.CHAIN_NAME_MAP},isMac(){const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return t.includes("macintosh")&&!t.includes("safari")},formatTelegramSocialLoginUrl(t){const e=`--${encodeURIComponent(window==null?void 0:window.location.href)}`,r="state=";if(new URL(t).host==="auth.magic.link"){const i="provider_authorization_url=",s=t.substring(t.indexOf(i)+i.length),o=this.injectIntoUrl(decodeURIComponent(s),r,e);return t.replace(s,encodeURIComponent(o))}return this.injectIntoUrl(t,r,e)},injectIntoUrl(t,e,r){const n=t.indexOf(e);if(n===-1)throw new Error(`${e} parameter not found in the URL: ${t}`);const i=t.indexOf("&",n),s=e.length,o=i!==-1?i:t.length,a=t.substring(0,n+s),c=t.substring(n+s,o),l=t.substring(i),u=c+r;return a+u+l}};async function cf(...t){const e=await fetch(...t);if(!e.ok)throw new Error(`HTTP status code: ${e.status}`,{cause:e});return e}let Rp=class{constructor({baseUrl:e,clientId:r}){this.baseUrl=e,this.clientId=r}async get({headers:e,signal:r,cache:n,...i}){const s=this.createUrl(i);return(await cf(s,{method:"GET",headers:e,signal:r,cache:n})).json()}async getBlob({headers:e,signal:r,...n}){const i=this.createUrl(n);return(await cf(i,{method:"GET",headers:e,signal:r})).blob()}async post({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await cf(s,{method:"POST",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await cf(s,{method:"PUT",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await cf(s,{method:"DELETE",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:r}){const n=new URL(e,this.baseUrl);return r&&Object.entries(r).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),this.clientId&&n.searchParams.append("clientId",this.clientId),n}};const qce={getFeatureValue(t,e){const r=e==null?void 0:e[t];return r===void 0?Pi.DEFAULT_FEATURES[t]:r}
89,filterSocialsByPlatform(t){if(!t||!t.length)return t;if(it.isTelegram()){if(it.isIos())return t.filter(e=>e!=="google");if(it.isMac())return t.filter(e=>e!=="x");if(it.isAndroid())return t.filter(e=>!["facebook","x"].includes(e))}return t}},Pe=Xt({features:Pi.DEFAULT_FEATURES,projectId:"",sdkType:"appkit",sdkVersion:"html-wagmi-undefined",defaultAccountTypes:Pi.DEFAULT_ACCOUNT_TYPES,enableNetworkSwitch:!0,experimental_preferUniversalLinks:!1,remoteFeatures:{}}),ot={state:Pe,subscribeKey(t,e){return Sn(Pe,t,e)},setOptions(t){Object.assign(Pe,t)},setRemoteFeatures(t){var r;if(!t)return;const e={...Pe.remoteFeatures,...t};Pe.remoteFeatures=e,(r=Pe.remoteFeatures)!=null&&r.socials&&(Pe.remoteFeatures.socials=qce.filterSocialsByPlatform(Pe.remoteFeatures.socials))},setFeatures(t){if(!t)return;Pe.features||(Pe.features=Pi.DEFAULT_FEATURES);const e={...Pe.features,...t};Pe.features=e},setProjectId(t){Pe.projectId=t},setCustomRpcUrls(t){Pe.customRpcUrls=t},setAllWallets(t){Pe.allWallets=t},setIncludeWalletIds(t){Pe.includeWalletIds=t},setExcludeWalletIds(t){Pe.excludeWalletIds=t},setFeaturedWalletIds(t){Pe.featuredWalletIds=t},setTokens(t){Pe.tokens=t},setTermsConditionsUrl(t){Pe.termsConditionsUrl=t},setPrivacyPolicyUrl(t){Pe.privacyPolicyUrl=t},setCustomWallets(t){Pe.customWallets=t},setIsSiweEnabled(t){Pe.isSiweEnabled=t},setIsUniversalProvider(t){Pe.isUniversalProvider=t},setSdkVersion(t){Pe.sdkVersion=t},setMetadata(t){Pe.metadata=t},setDisableAppend(t){Pe.disableAppend=t},setEIP6963Enabled(t){Pe.enableEIP6963=t},setDebug(t){Pe.debug=t},setEnableWalletConnect(t){Pe.enableWalletConnect=t},setEnableWalletGuide(t){Pe.enableWalletGuide=t},setEnableAuthLogger(t){Pe.enableAuthLogger=t},setEnableWallets(t){Pe.enableWallets=t},setPreferUniversalLinks(t){Pe.experimental_preferUniversalLinks=t},setHasMultipleAddresses(t){Pe.hasMultipleAddresses=t},setSIWX(t){Pe.siwx=t},setConnectMethodsOrder(t){Pe.features={...Pe.features,connectMethodsOrder:t}},setWalletFeaturesOrder(t){Pe.features={...Pe.features,walletFeaturesOrder:t}},setSocialsOrder(t){Pe.remoteFeatures={...Pe.remoteFeatures,socials:t}},setCollapseWallets(t){Pe.features={...Pe.features,collapseWallets:t}},setEnableEmbedded(t){Pe.enableEmbedded=t},setAllowUnsupportedChain(t){Pe.allowUnsupportedChain=t},setManualWCControl(t){Pe.manualWCControl=t},setEnableNetworkSwitch(t){Pe.enableNetworkSwitch=t},setDefaultAccountTypes(t={}){Object.entries(t).forEach(([e,r])=>{r&&(Pe.defaultAccountTypes[e]=r)})},setUniversalProviderConfigOverride(t){Pe.universalProviderConfigOverride=t},getUniversalProviderConfigOverride(){return Pe.universalProviderConfigOverride},getSnapshot(){return L1(Pe)}},Hce=Object.freeze({enabled:!0,events:[]}),Vce=new Rp({baseUrl:it.getAnalyticsUrl(),clientId:null}),Wce=5,Kce=60*1e3,Ec=Xt({...Hce}),Zce={state:Ec,subscribeKey(t,e){return Sn(Ec,t,e)},async sendError(t,e){if(!Ec.enabled)return;const r=Date.now();if(Ec.events.filter(s=>{const o=new Date(s.properties.timestamp||"").getTime();return r-o<Kce}).length>=Wce)return;const i={type:"error",event:e,properties:{errorType:t.name,errorMessage:t.message,stackTrace:t.stack,timestamp:new Date().toISOString()}};Ec.events.push(i);try{if(typeof window>"u")return;const{projectId:s,sdkType:o,sdkVersion:a}=ot.state;await Vce.post({path:"/e",params:{projectId:s,st:o,sv:a||"html-wagmi-4.2.2"},body:{eventId:it.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:new Date().toISOString(),props:{type:"error",event:e,errorType:t.name,errorMessage:t.message,stackTrace:t.stack}}})}catch{}},enable(){Ec.enabled=!0},disable(){Ec.enabled=!1},clearEvents(){Ec.events=[]}};let M4=class U4 extends Error{constructor(e,r,n){super(e),this.name="AppKitError",this.category=r,this.originalError=n,Object.setPrototypeOf(this,U4.prototype);let i=!1;if(n instanceof Error&&typeof n.stack=="string"&&n.stack){const s=n.stack,o=s.indexOf(`
90`);if(o>-1){const a=s.substring(o+1);this.stack=`${this.name}: ${this.message}
91${a}`,i=!0}}i||(Error.captureStackTrace?Error.captureStackTrace(this,U4):this.stack||(this.stack=`${this.name}: ${this.message}`))}};function sx(t,e){const r=t instanceof M4?t:new M4(t instanceof Error?t.message:String(t),e,t);throw Zce.sendError(r,r.category),r}function fi(t,e="INTERNAL_SDK_ERROR"){const r={};return Object.keys(t).forEach(n=>{const i=t[n];if(typeof i=="function"){let s=i;i.constructor.name==="AsyncFunction"?s=async(...o)=>{try{return await i(...o)}catch(a){return sx(a,e)}}:s=(...o)=>{try{return i(...o)}catch(a){return sx(a,e)}},r[n]=s}else r[n]=i}),r}const $o={PHANTOM:{id:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",url:"https://phantom.app"},SOLFLARE:{id:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",url:"https://solflare.com"},COINBASE:{id:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",url:"https://go.cb-w.com"}},Gce={handleMobileDeeplinkRedirect(t,e){const r=window.location.href,n=encodeURIComponent(r);if(t===$o.PHANTOM.id&&!("phantom"in window)){const i=r.startsWith("https")?"https":"http",s=r.split("/")[2],o=encodeURIComponent(`${i}://${s}`);window.location.href=`${$o.PHANTOM.url}/ul/browse/${n}?ref=${o}`}t===$o.SOLFLARE.id&&!("solflare"in window)&&(window.location.href=`${$o.SOLFLARE.url}/ul/v1/browse/${n}?ref=${n}`),e===En.CHAIN.SOLANA&&t===$o.COINBASE.id&&!("coinbaseSolana"in window)&&(window.location.href=`${$o.COINBASE.url}/dapp?cb_url=${n}`)}},bi=Xt({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),Yce={state:bi,subscribeNetworkImages(t){return Ln(bi.networkImages,()=>t(bi.networkImages))},subscribeKey(t,e){return Sn(bi,t,e)},subscribe(t){return Ln(bi,()=>t(bi))},setWalletImage(t,e){bi.walletImages[t]=e},setNetworkImage(t,e){bi.networkImages[t]=e},setChainImage(t,e){bi.chainImages[t]=e},setConnectorImage(t,e){bi.connectorImages={...bi.connectorImages,[t]:e}},setTokenImage(t,e){bi.tokenImages[t]=e},setCurrencyImage(t,e){bi.currencyImages[t]=e}},js=fi(Yce),Jce={eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"a1b58899-f671-4276-6a5e-56ca5bd59700",polkadot:"",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00",cosmos:""},d5=Xt({networkImagePromises:{}}),Xce={async fetchWalletImage(t){if(t)return await Me._fetchWalletImage(t),this.getWalletImageById(t)},async fetchNetworkImage(t){if(!t)return;const e=this.getNetworkImageById(t);return e||(d5.networkImagePromises[t]||(d5.networkImagePromises[t]=Me._fetchNetworkImage(t)),await d5.networkImagePromises[t],this.getNetworkImageById(t))},getWalletImageById(t){if(t)return js.state.walletImages[t]},getWalletImage(t){if(t!=null&&t.image_url)return t==null?void 0:t.image_url;if(t!=null&&t.image_id)return js.state.walletImages[t.image_id]},getNetworkImage(t){var e,r,n;if((e=t==null?void 0:t.assets)!=null&&e.imageUrl)return(r=t==null?void 0:t.assets)==null?void 0:r.imageUrl;if((n=t==null?void 0:t.assets)!=null&&n.imageId)return js.state.networkImages[t.assets.imageId]},getNetworkImageById(t){if(t)return js.state.networkImages[t]},getConnectorImage(t){if(t!=null&&t.imageUrl)return t.imageUrl;if(t!=null&&t.imageId)return js.state.connectorImages[t.imageId]},getChainImage(t){return js.state.networkImages[Jce[t]]}},Cc=Xt({message:"",variant:"info",open:!1}),Qce={state:Cc,subscribeKey(t,e){return Sn(Cc,t,e)},open(t,e){const{debug:r}=ot.state,{shortMessage:n,longMessage:i}=t;r&&(Cc.message=n,Cc.variant=e,Cc.open=!0),i&&console.error(typeof i=="function"?i():i)},close(){Cc.open=!1,Cc.message="",Cc.variant="info"}},VN=fi(Qce),ele=it.getAnalyticsUrl(),tle=new Rp({baseUrl:ele,clientId:null}),rle=["MODAL_CREATED"],la=Xt({timestamp:Date.now(),reportedErrors:{},data:{type:"track",event:"MODAL_CREATED"}}),qr={state:la,subscribe(t){return Ln(la,()=>t(la))},getSdkProperties(){const{projectId:t,sdkType:e,sdkVersion:r}=ot.state;return{projectId:t,st:e,sv:r||"html-wagmi-4.2.2"}},async _sendAnalyticsEvent(t){try{const e=Jt.state.address;if(rle.includes(t.data.event)||typeof window>"u")return;await tle.post({path:"/e",params:qr.getSdkProperties(),body:{eventId:it.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:t.timestamp,props:{...t.data,address:e}}}),la.reportedErrors.FORBIDDEN=!1}
91catch(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===En.HTTP_STATUS_CODES.FORBIDDEN&&!la.reportedErrors.FORBIDDEN&&(VN.open({shortMessage:"Invalid App Configuration",longMessage:`Origin ${$f()?window.origin:"uknown"} not found on Allowlist - update configuration on cloud.reown.com`},"error"),la.reportedErrors.FORBIDDEN=!0)}},sendEvent(t){var e;la.timestamp=Date.now(),la.data=t,(e=ot.state.features)!=null&&e.analytics&&qr._sendAnalyticsEvent(la)}},nle=it.getApiUrl(),Hn=new Rp({baseUrl:nle,clientId:null}),ile=40,ox=4,sle=20,qe=Xt({promises:{},page:1,count:0,featured:[],allFeatured:[],recommended:[],allRecommended:[],wallets:[],filteredWallets:[],search:[],isAnalyticsEnabled:!1,excludedWallets:[],isFetchingRecommendedWallets:!1}),Me={state:qe,subscribeKey(t,e){return Sn(qe,t,e)},_getSdkProperties(){const{projectId:t,sdkType:e,sdkVersion:r}=ot.state;return{projectId:t,st:e||"appkit",sv:r||"html-wagmi-4.2.2"}},_filterOutExtensions(t){return ot.state.isUniversalProvider?t.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):t},async _fetchWalletImage(t){const e=`${Hn.baseUrl}/getWalletImage/${t}`,r=await Hn.getBlob({path:e,params:Me._getSdkProperties()});js.setWalletImage(t,URL.createObjectURL(r))},async _fetchNetworkImage(t){const e=`${Hn.baseUrl}/public/getAssetImage/${t}`,r=await Hn.getBlob({path:e,params:Me._getSdkProperties()});js.setNetworkImage(t,URL.createObjectURL(r))},async _fetchConnectorImage(t){const e=`${Hn.baseUrl}/public/getAssetImage/${t}`,r=await Hn.getBlob({path:e,params:Me._getSdkProperties()});js.setConnectorImage(t,URL.createObjectURL(r))},async _fetchCurrencyImage(t){const e=`${Hn.baseUrl}/public/getCurrencyImage/${t}`,r=await Hn.getBlob({path:e,params:Me._getSdkProperties()});js.setCurrencyImage(t,URL.createObjectURL(r))},async _fetchTokenImage(t){const e=`${Hn.baseUrl}/public/getTokenImage/${t}`,r=await Hn.getBlob({path:e,params:Me._getSdkProperties()});js.setTokenImage(t,URL.createObjectURL(r))},_filterWalletsByPlatform(t){return it.isMobile()?t==null?void 0:t.filter(r=>r.mobile_link||r.id===$o.COINBASE.id?!0:ee.state.activeChain==="solana"&&(r.id===$o.SOLFLARE.id||r.id===$o.PHANTOM.id)):t},async fetchProjectConfig(){return(await Hn.get({path:"/appkit/v1/config",params:Me._getSdkProperties()})).features},async fetchAllowedOrigins(){try{const{allowedOrigins:t}=await Hn.get({path:"/projects/v1/origins",params:Me._getSdkProperties()});return t}catch{return[]}},async fetchNetworkImages(){const t=ee.getAllRequestedCaipNetworks(),e=t==null?void 0:t.map(({assets:r})=>r==null?void 0:r.imageId).filter(Boolean).filter(r=>!Xce.getNetworkImageById(r));e&&await Promise.allSettled(e.map(r=>Me._fetchNetworkImage(r)))},async fetchConnectorImages(){const{connectors:t}=Ze.state,e=t.map(({imageId:r})=>r).filter(Boolean);await Promise.allSettled(e.map(r=>Me._fetchConnectorImage(r)))},async fetchCurrencyImages(t=[]){await Promise.allSettled(t.map(e=>Me._fetchCurrencyImage(e)))},async fetchTokenImages(t=[]){await Promise.allSettled(t.map(e=>Me._fetchTokenImage(e)))},async fetchWallets(t){var s;const e=t.exclude??[];Me._getSdkProperties().sv.startsWith("html-core-")&&e.push(...Object.values($o).map(o=>o.id));const n=await Hn.get({path:"/getWallets",params:{...Me._getSdkProperties(),...t,page:String(t.page),entries:String(t.entries),include:(s=t.include)==null?void 0:s.join(","),exclude:e.join(",")}});return{data:Me._filterWalletsByPlatform(n==null?void 0:n.data)||[],count:n==null?void 0:n.count}},async fetchFeaturedWallets(){const{featuredWalletIds:t}=ot.state;if(t!=null&&t.length){const e={...Me._getSdkProperties(),page:1,entries:(t==null?void 0:t.length)??ox,include:t},{data:r}=await Me.fetchWallets(e),n=[...r].sort((s,o)=>t.indexOf(s.id)-t.indexOf(o.id)),i=n.map(s=>s.image_id).filter(Boolean);await Promise.allSettled(i.map(s=>Me._fetchWalletImage(s))),qe.featured=n,qe.allFeatured=n}},async fetchRecommendedWallets(){try{qe.isFetchingRecommendedWallets=!0;const{includeWalletIds:t,excludeWalletIds:e,featuredWalletIds:r}=ot.state,n=[...e??[],...r??[]].filter(Boolean),i=ee.getRequestedCaipNetworkIds().join(","),s={page:1,entries:ox,include:t,exclude:n,chains:i},{data:o,count:a}=await Me.fetchWallets(s),c=je.getRecentWallets(),l=o.map(d=>
91d.image_id).filter(Boolean),u=c.map(d=>d.image_id).filter(Boolean);await Promise.allSettled([...l,...u].map(d=>Me._fetchWalletImage(d))),qe.recommended=o,qe.allRecommended=o,qe.count=a??0}catch{}finally{qe.isFetchingRecommendedWallets=!1}},async fetchWalletsByPage({page:t}){const{includeWalletIds:e,excludeWalletIds:r,featuredWalletIds:n}=ot.state,i=ee.getRequestedCaipNetworkIds().join(","),s=[...qe.recommended.map(({id:u})=>u),...r??[],...n??[]].filter(Boolean),o={page:t,entries:ile,include:e,exclude:s,chains:i},{data:a,count:c}=await Me.fetchWallets(o),l=a.slice(0,sle).map(u=>u.image_id).filter(Boolean);await Promise.allSettled(l.map(u=>Me._fetchWalletImage(u))),qe.wallets=it.uniqueBy([...qe.wallets,...Me._filterOutExtensions(a)],"id").filter(u=>{var d;return(d=u.chains)==null?void 0:d.some(h=>i.includes(h))}),qe.count=c>qe.count?c:qe.count,qe.page=t},async initializeExcludedWallets({ids:t}){const e={page:1,entries:t.length,include:t},{data:r}=await Me.fetchWallets(e);r&&r.forEach(n=>{qe.excludedWallets.push({rdns:n.rdns,name:n.name})})},async searchWallet({search:t,badge:e}){const{includeWalletIds:r,excludeWalletIds:n}=ot.state,i=ee.getRequestedCaipNetworkIds().join(",");qe.search=[];const s={page:1,entries:100,search:t==null?void 0:t.trim(),badge_type:e,include:r,exclude:n,chains:i},{data:o}=await Me.fetchWallets(s);qr.sendEvent({type:"track",event:"SEARCH_WALLET",properties:{badge:e??"",search:t??""}});const a=o.map(c=>c.image_id).filter(Boolean);await Promise.allSettled([...a.map(c=>Me._fetchWalletImage(c)),it.wait(300)]),qe.search=Me._filterOutExtensions(o)},initPromise(t,e){const r=qe.promises[t];return r||(qe.promises[t]=e())},prefetch({fetchConnectorImages:t=!0,fetchFeaturedWallets:e=!0,fetchRecommendedWallets:r=!0,fetchNetworkImages:n=!0}={}){const i=[t&&Me.initPromise("connectorImages",Me.fetchConnectorImages),e&&Me.initPromise("featuredWallets",Me.fetchFeaturedWallets),r&&Me.initPromise("recommendedWallets",Me.fetchRecommendedWallets),n&&Me.initPromise("networkImages",Me.fetchNetworkImages)].filter(Boolean);return Promise.allSettled(i)},prefetchAnalyticsConfig(){var t;(t=ot.state.features)!=null&&t.analytics&&Me.fetchAnalyticsConfig()},async fetchAnalyticsConfig(){try{const{isAnalyticsEnabled:t}=await Hn.get({path:"/getAnalyticsConfig",params:Me._getSdkProperties()});ot.setFeatures({analytics:t})}catch{ot.setFeatures({analytics:!1})}},filterByNamespaces(t){if(!(t!=null&&t.length)){qe.featured=qe.allFeatured,qe.recommended=qe.allRecommended;return}const e=ee.getRequestedCaipNetworkIds().join(",");qe.featured=qe.allFeatured.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),qe.recommended=qe.allRecommended.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),qe.filteredWallets=qe.wallets.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))})},clearFilterByNamespaces(){qe.filteredWallets=[]},setFilterByNamespace(t){if(!t){qe.featured=qe.allFeatured,qe.recommended=qe.allRecommended;return}const e=ee.getRequestedCaipNetworkIds().join(",");qe.featured=qe.allFeatured.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),qe.recommended=qe.allRecommended.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),qe.filteredWallets=qe.wallets.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))})}},Ot=Xt({view:"Connect",history:["Connect"],transactionStack:[]}),ole={state:Ot,subscribeKey(t,e){return Sn(Ot,t,e)},pushTransactionStack(t){Ot.transactionStack.push(t)},popTransactionStack(t){const e=Ot.transactionStack.pop();if(!e)return;const{onSuccess:r,onError:n,onCancel:i}=e;switch(t){case"success":r==null||r();break;case"error":n==null||n(),Ge.goBack();break;case"cancel":i==null||i(),Ge.goBack();break}},push(t,e){t!==Ot.view&&(Ot.view=t,Ot.history.push(t),Ot.data=e)},reset(t,e){Ot.view=t,Ot.history=[t],Ot.data=e},replace(t,e){Ot.history.at(-1)===t||(Ot.view=t,Ot.history[Ot.history.length-1]=t,Ot.data=e)},goBack(){var n;const t=ee.state.activeCaipAddress,e=Ge.state.view==="ConnectingFarcaster",r=!t&&e;if(Ot.history.length>1){Ot.history.pop();const[i]=Ot.history.slice(-1);i&&(t&&i==="Connect"?Ot.view="Account":Ot.view=i)}else vn.close();(n=Ot.data)!=null&&n.wallet&&(Ot.data.wallet=void 0),setTimeout(()=>{var i,s,o;if(r){Jt.setFarcasterUrl(void 0,ee.state.activeChain);const a=Ze.getAuthConnector();(i=a==null?void 0:a.provider)==null||i.reload();const c=L1(ot.state);(o=(s=a==null?void 0:a.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:c.metadata,sdkVersion:c.sdkVersion,projectId:c.projectId,sdkType:c.sdkType})}},100)},goBackToIndex(t){if(Ot.history.length>1){Ot.history=Ot.history.slice(0,t+1);const[e]=Ot.history.slice(-1);e&&(Ot.view=e)}},goBackOrCloseModal(){Ge.state.history.length>1?Ge.goBack():vn.close()}},Ge=fi(ole),ua=Xt({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),j4={state:ua,subscribe(t){return Ln(ua,()=>t(ua))},setThemeMode(t){ua.themeMode=t;try{const e=Ze.getAuthConnector();if(e){const r=j4.getSnapshot().themeVariables;e.provider.syncTheme({themeMode:t,themeVariables:r,w3mThemeVariables:Fc(r,t)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(t){ua.themeVariables={...ua.themeVariables,...t};try{const e=Ze.getAuthConnector();if(e){const r=j4.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:r,w3mThemeVariables:Fc(ua.themeVariables,ua.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot(){return L1(ua)}},Ug=fi(j4),WN={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0},dt=Xt({allConnectors:[],connectors:[],activeConnector:void 0,filterByNamespace:void 0,activeConnectorIds:{...WN},filterByNamespaceMap:{eip155:!0,solana:!0,polkadot:!0,bip122:!0,cosmos:!0}}),ale={state:dt,subscribe(t){return Ln(dt,()=>{t(dt)})},subscribeKey(t,e){return Sn(dt,t,e)}
91,initialize(t){t.forEach(e=>{const r=je.getConnectedConnectorId(e);r&&Ze.setConnectorId(r,e)})},setActiveConnector(t){t&&(dt.activeConnector=Lh(t))},setConnectors(t){t.filter(i=>!dt.allConnectors.some(s=>s.id===i.id&&Ze.getConnectorName(s.name)===Ze.getConnectorName(i.name)&&s.chain===i.chain)).forEach(i=>{i.type!=="MULTI_CHAIN"&&dt.allConnectors.push(Lh(i))});const r=Ze.getEnabledNamespaces(),n=Ze.getEnabledConnectors(r);dt.connectors=Ze.mergeMultiChainConnectors(n)},filterByNamespaces(t){Object.keys(dt.filterByNamespaceMap).forEach(e=>{dt.filterByNamespaceMap[e]=!1}),t.forEach(e=>{dt.filterByNamespaceMap[e]=!0}),Ze.updateConnectorsForEnabledNamespaces()},filterByNamespace(t,e){dt.filterByNamespaceMap[t]=e,Ze.updateConnectorsForEnabledNamespaces()},updateConnectorsForEnabledNamespaces(){const t=Ze.getEnabledNamespaces(),e=Ze.getEnabledConnectors(t),r=Ze.areAllNamespacesEnabled();dt.connectors=Ze.mergeMultiChainConnectors(e),r?Me.clearFilterByNamespaces():Me.filterByNamespaces(t)},getEnabledNamespaces(){return Object.entries(dt.filterByNamespaceMap).filter(([t,e])=>e).map(([t])=>t)},getEnabledConnectors(t){return dt.allConnectors.filter(e=>t.includes(e.chain))},areAllNamespacesEnabled(){return Object.values(dt.filterByNamespaceMap).every(t=>t)},mergeMultiChainConnectors(t){const e=Ze.generateConnectorMapByName(t),r=[];return e.forEach(n=>{const i=n[0],s=(i==null?void 0:i.id)===En.CONNECTOR_ID.AUTH;n.length>1&&i?r.push({name:i.name,imageUrl:i.imageUrl,imageId:i.imageId,connectors:[...n],type:s?"AUTH":"MULTI_CHAIN",chain:"eip155",id:(i==null?void 0:i.id)||""}):i&&r.push(i)}),r},generateConnectorMapByName(t){const e=new Map;return t.forEach(r=>{const{name:n}=r,i=Ze.getConnectorName(n);if(!i)return;const s=e.get(i)||[];s.find(a=>a.chain===r.chain)||s.push(r),e.set(i,s)}),e},getConnectorName(t){return t&&({"Trust Wallet":"Trust"}[t]||t)},getUniqueConnectorsByName(t){const e=[];return t.forEach(r=>{e.find(n=>n.chain===r.chain)||e.push(r)}),e},addConnector(t){var e,r,n;if(t.id===En.CONNECTOR_ID.AUTH){const i=t,s=L1(ot.state),o=Ug.getSnapshot().themeMode,a=Ug.getSnapshot().themeVariables;(r=(e=i==null?void 0:i.provider)==null?void 0:e.syncDappData)==null||r.call(e,{metadata:s.metadata,sdkVersion:s.sdkVersion,projectId:s.projectId,sdkType:s.sdkType}),(n=i==null?void 0:i.provider)==null||n.syncTheme({themeMode:o,themeVariables:a,w3mThemeVariables:Fc(a,o)}),Ze.setConnectors([t])}else Ze.setConnectors([t])},getAuthConnector(t){var n;const e=t||ee.state.activeChain,r=dt.connectors.find(i=>i.id===En.CONNECTOR_ID.AUTH);if(r)return(n=r==null?void 0:r.connectors)!=null&&n.length?r.connectors.find(s=>s.chain===e):r},getAnnouncedConnectorRdns(){return dt.connectors.filter(t=>t.type==="ANNOUNCED").map(t=>{var e;return(e=t.info)==null?void 0:e.rdns})},getConnectorById(t){return dt.allConnectors.find(e=>e.id===t)},getConnector(t,e){return dt.allConnectors.filter(n=>n.chain===ee.state.activeChain).find(n=>{var i;return n.explorerId===t||((i=n.info)==null?void 0:i.rdns)===e})},syncIfAuthConnector(t){var s,o;if(t.id!=="ID_AUTH")return;const e=t,r=L1(ot.state),n=Ug.getSnapshot().themeMode,i=Ug.getSnapshot().themeVariables;(o=(s=e==null?void 0:e.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:r.metadata,sdkVersion:r.sdkVersion,sdkType:r.sdkType,projectId:r.projectId}),e.provider.syncTheme({themeMode:n,themeVariables:i,w3mThemeVariables:Fc(i,n)})},getConnectorsByNamespace(t){const e=dt.allConnectors.filter(r=>r.chain===t);return Ze.mergeMultiChainConnectors(e)},selectWalletConnector(t){const e=Ze.getConnector(t.id,t.rdns),r=ee.state.activeChain;Gce.handleMobileDeeplinkRedirect((e==null?void 0:e.explorerId)||t.id,r),e?Ge.push("ConnectingExternal",{connector:e}):Ge.push("ConnectingWalletConnect",{wallet:t})},getConnectors(t){return t?Ze.getConnectorsByNamespace(t):Ze.mergeMultiChainConnectors(dt.allConnectors)},setFilterByNamespace(t){dt.filterByNamespace=t,dt.connectors=Ze.getConnectors(t),Me.setFilterByNamespace(t)},setConnectorId(t,e){t&&(dt.activeConnectorIds={...dt.activeConnectorIds,[e]:t},je.setConnectedConnectorId(e,t))},removeConnectorId(t){dt.activeConnectorIds={...dt.activeConnectorIds,[t]:void 0},je.deleteConnectedConnectorId(t)},getConnectorId(t){if(t)return dt.activeConnectorIds[t]},isConnected(t){return t?!!dt.activeConnectorIds[t]:Object.values(dt.activeConnectorIds).some(e=>!!e)},resetConnectorIds(){dt.activeConnectorIds={...WN}}},Ze=fi(ale),Zf={ACCOUNT_TYPES:{SMART_ACCOUNT:"smartAccount"}},Tl=Object.freeze({message:"",variant:"success",svg:void 0,open:!1,autoClose:!0}),Sr=Xt({...Tl}),cle={state:Sr,subscribeKey(t,e){return Sn(Sr,t,e)},showLoading(t,e={}){this._showMessage({message:t,variant:"loading",...e})},showSuccess(t){this._showMessage({message:t,variant:"success"})},showSvg(t,e){this._showMessage({message:t,svg:e})},showError(t){const e=it.parseError(t);this._showMessage({message:e,variant:"error"})},hide(){Sr.message=Tl.message,Sr.variant=Tl.variant,Sr.svg=Tl.svg,Sr.open=Tl.open,Sr.autoClose=Tl.autoClose},_showMessage({message:t,svg:e,variant:r="success",autoClose:n=Tl.autoClose}){Sr.open?(Sr.open=!1,setTimeout(()=>{Sr.message=t,Sr.variant=r,Sr.svg=e,Sr.open=!0,Sr.autoClose=n},150)):(Sr.message=t,Sr.variant=r,Sr.svg=e,Sr.open=!0,Sr.autoClose=n)}},$a=cle,Vt=Xt({transactions:[],coinbaseTransactions:{},transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),lle={state:Vt,subscribe(t){return Ln(Vt,()=>t(Vt))},setLastNetworkInView(t){Vt.lastNetworkInView=t},async fetchTransactions(t,e){var r,n;if(!t)throw new Error("Transactions can't be fetched without an accountAddress");Vt.loading=!0;try{const i=await Re.fetchTransactions({account:t,cursor:Vt.next,onramp:e,cache:e==="coinbase"?"no-cache":void 0,chainId:(r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId}),s=Tf.filterSpamTransactions(i.data),o=Tf.filterByConnectedChain(s),a=[...Vt.transactions,...o];Vt.loading=!1,e==="coinbase"?Vt.coinbaseTransactions=Tf.groupTransactionsByYearAndMonth(Vt.coinbaseTransactions,i.data):(Vt.transactions=a,Vt.transactionsByYear=Tf.groupTransactionsByYearAndMonth(Vt.transactionsByYear,o)),Vt.empty=a.length===0,Vt.next=i.next?i.next:void 0}catch{const s=ee.state.activeChain;qr.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:t,projectId:ot.state.projectId,cursor:Vt.next,isSmartAccount:((n=Jt.state.preferredAccountTypes)==null?void 0:n[s])===Zf.ACCOUNT_TYPES.SMART_ACCOUNT}}),$a.showError("Failed to fetch transactions"),Vt.loading=!1,Vt.empty=!0,Vt.next=void 0}},groupTransactionsByYearAndMonth(t={},e=[]){const r=t;return e.forEach(n=>{const i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),o=r[i]??{},c=(o[s]??[]).filter(l=>
91l.id!==n.id);r[i]={...o,[s]:[...c,n].sort((l,u)=>new Date(u.metadata.minedAt).getTime()-new Date(l.metadata.minedAt).getTime())}}),r},filterSpamTransactions(t){return t.filter(e=>!e.transfers.every(n=>{var i;return((i=n.nft_info)==null?void 0:i.flags.is_spam)===!0}))},filterByConnectedChain(t){var n;const e=(n=ee.state.activeCaipNetwork)==null?void 0:n.caipNetworkId;return t.filter(i=>i.metadata.chain===e)},clearCursor(){Vt.next=void 0},resetTransactions(){Vt.transactions=[],Vt.transactionsByYear={},Vt.lastNetworkInView=void 0,Vt.loading=!1,Vt.empty=!1,Vt.next=void 0}},Tf=fi(lle,"API_ERROR"),Mt=Xt({connections:new Map,wcError:!1,buffering:!1,status:"disconnected"});let xl;const ule={state:Mt,subscribeKey(t,e){return Sn(Mt,t,e)},_getClient(){return Mt._client},setClient(t){Mt._client=Lh(t)},async connectWalletConnect(){var t,e,r,n;if(it.isTelegram()||it.isSafari()&&it.isIos()){if(xl){await xl,xl=void 0;return}if(!it.isPairingExpired(Mt==null?void 0:Mt.wcPairingExpiry)){const i=Mt.wcUri;Mt.wcUri=i;return}xl=(e=(t=Ye._getClient())==null?void 0:t.connectWalletConnect)==null?void 0:e.call(t).catch(()=>{}),Ye.state.status="connecting",await xl,xl=void 0,Mt.wcPairingExpiry=void 0,Ye.state.status="connected"}else await((n=(r=Ye._getClient())==null?void 0:r.connectWalletConnect)==null?void 0:n.call(r))},async connectExternal(t,e,r=!0){var n,i;await((i=(n=Ye._getClient())==null?void 0:n.connectExternal)==null?void 0:i.call(n,t)),r&&ee.setActiveNamespace(e)},async reconnectExternal(t){var r,n;await((n=(r=Ye._getClient())==null?void 0:r.reconnectExternal)==null?void 0:n.call(r,t));const e=t.chain||ee.state.activeChain;e&&Ze.setConnectorId(t.id,e)},async setPreferredAccountType(t,e){var n;vn.setLoading(!0,ee.state.activeChain);const r=Ze.getAuthConnector();r&&(Jt.setPreferredAccountType(t,e),await r.provider.setPreferredAccount(t),je.setPreferredAccountTypes(Jt.state.preferredAccountTypes??{[e]:t}),await Ye.reconnectExternal(r),vn.setLoading(!1,ee.state.activeChain),qr.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:t,network:((n=ee.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)||""}}))},async signMessage(t){var e;return(e=Ye._getClient())==null?void 0:e.signMessage(t)},parseUnits(t,e){var r;return(r=Ye._getClient())==null?void 0:r.parseUnits(t,e)},formatUnits(t,e){var r;return(r=Ye._getClient())==null?void 0:r.formatUnits(t,e)},async sendTransaction(t){var e;return(e=Ye._getClient())==null?void 0:e.sendTransaction(t)},async getCapabilities(t){var e;return(e=Ye._getClient())==null?void 0:e.getCapabilities(t)},async grantPermissions(t){var e;return(e=Ye._getClient())==null?void 0:e.grantPermissions(t)},async walletGetAssets(t){var e;return((e=Ye._getClient())==null?void 0:e.walletGetAssets(t))??{}},async estimateGas(t){var e;return(e=Ye._getClient())==null?void 0:e.estimateGas(t)},async writeContract(t){var e;return(e=Ye._getClient())==null?void 0:e.writeContract(t)},async getEnsAddress(t){var e;return(e=Ye._getClient())==null?void 0:e.getEnsAddress(t)},async getEnsAvatar(t){var e;return(e=Ye._getClient())==null?void 0:e.getEnsAvatar(t)},checkInstalled(t){var e,r;return((r=(e=Ye._getClient())==null?void 0:e.checkInstalled)==null?void 0:r.call(e,t))||!1},resetWcConnection(){Mt.wcUri=void 0,Mt.wcPairingExpiry=void 0,Mt.wcLinking=void 0,Mt.recentWallet=void 0,Mt.status="disconnected",Tf.resetTransactions(),je.deleteWalletConnectDeepLink()},resetUri(){Mt.wcUri=void 0,Mt.wcPairingExpiry=void 0,xl=void 0},finalizeWcConnection(){var r,n;const{wcLinking:t,recentWallet:e}=Ye.state;t&&je.setWalletConnectDeepLink(t),e&&je.setAppKitRecent(e),qr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:t?"mobile":"qrcode",name:((n=(r=Ge.state.data)==null?void 0:r.wallet)==null?void 0:n.name)||"Unknown"}})},setWcBasic(t){Mt.wcBasic=t},setUri(t){Mt.wcUri=t,Mt.wcPairingExpiry=it.getPairingExpiry()},setWcLinking(t){Mt.wcLinking=t},setWcError(t){Mt.wcError=t,Mt.buffering=!1},setRecentWallet(t){Mt.recentWallet=t},setBuffering(t){Mt.buffering=t},setStatus(t){Mt.status=t},async disconnect(t){var e;try{await((e=Ye._getClient())==null?void 0:e.disconnect(t))}catch(r){throw new M4("Failed to disconnect","INTERNAL_SDK_ERROR",r)}},setConnections(t,e){Mt.connections.set(e,t)},switchAccount({connection:t,address:e,namespace:r}){if(Ze.state.activeConnectorIds[r]===t.connectorId){const s=ee.state.activeCaipNetwork;if(s){const o=`${r}:${s.id}:${e}`;Jt.setCaipAddress(o,r)}else console.warn(`No current network found for namespace "${r}"`)}else{const s=Ze.getConnector(t.connectorId);s?Ye.connectExternal(s,r):console.warn(`No connector found for namespace "${r}"`)}}},Ye=fi(ule),Dd=Xt({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0,initialized:!1}),yh={state:Dd,subscribe(t){return Ln(Dd,()=>t(Dd))},subscribeOpen(t){return Sn(Dd,"open",t)},set(t){Object.assign(Dd,{...Dd,...t})}},h5={createBalance(t,e){const r={name:t.metadata.name||"",symbol
91:t.metadata.symbol||"",decimals:t.metadata.decimals||0,value:t.metadata.value||0,price:t.metadata.price||0,iconUrl:t.metadata.iconUrl||""};return{name:r.name,symbol:r.symbol,chainId:e,address:t.address==="native"?void 0:this.convertAddressToCAIP10Address(t.address,e),value:r.value,price:r.price,quantity:{decimals:r.decimals.toString(),numeric:this.convertHexToBalance({hex:t.balance,decimals:r.decimals})},iconUrl:r.iconUrl}},convertHexToBalance({hex:t,decimals:e}){return Ow(BigInt(t),e)},convertAddressToCAIP10Address(t,e){return`${e}:${t}`},createCAIP2ChainId(t,e){return`${e}:${parseInt(t,16)}`},getChainIdHexFromCAIP2ChainId(t){const e=t.split(":");if(e.length<2||!e[1])return"0x0";const r=e[1],n=parseInt(r,10);return isNaN(n)?"0x0":`0x${n.toString(16)}`},isWalletGetAssetsResponse(t){return typeof t!="object"||t===null?!1:Object.values(t).every(e=>Array.isArray(e)&&e.every(r=>this.isValidAsset(r)))},isValidAsset(t){return typeof t=="object"&&t!==null&&typeof t.address=="string"&&typeof t.balance=="string"&&(t.type==="ERC20"||t.type==="NATIVE")&&typeof t.metadata=="object"&&t.metadata!==null&&typeof t.metadata.name=="string"&&typeof t.metadata.symbol=="string"&&typeof t.metadata.decimals=="number"&&typeof t.metadata.price=="number"&&typeof t.metadata.iconUrl=="string"}},ax={async getMyTokensWithBalance(t){const e=Jt.state.address,r=ee.state.activeCaipNetwork;if(!e||!r)return[];if(r.chainNamespace==="eip155"){const i=await this.getEIP155Balances(e,r);if(i)return this.filterLowQualityTokens(i)}const n=await Re.getBalance(e,r.caipNetworkId,t);return this.filterLowQualityTokens(n.balances)},async getEIP155Balances(t,e){var r,n;try{const i=h5.getChainIdHexFromCAIP2ChainId(e.caipNetworkId),s=await Ye.getCapabilities(t);if(!((n=(r=s==null?void 0:s[i])==null?void 0:r.assetDiscovery)!=null&&n.supported))return null;const o=await Ye.walletGetAssets({account:t,chainFilter:[i]});return h5.isWalletGetAssetsResponse(o)?(o[i]||[]).map(c=>h5.createBalance(c,e.caipNetworkId)):null}catch{return null}},filterLowQualityTokens(t){return t.filter(e=>e.quantity.decimals!=="0")},mapBalancesToSwapTokens(t){return(t==null?void 0:t.map(e=>({...e,address:e!=null&&e.address?e.address:ee.getActiveNetworkTokenAddress(),decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1})))||[]}},It=Xt({tokenBalances:[],loading:!1}),dle={state:It,subscribe(t){return Ln(It,()=>t(It))},subscribeKey(t,e){return Sn(It,t,e)},setToken(t){t&&(It.token=Lh(t))},setTokenAmount(t){It.sendTokenAmount=t},setReceiverAddress(t){It.receiverAddress=t},setReceiverProfileImageUrl(t){It.receiverProfileImageUrl=t},setReceiverProfileName(t){It.receiverProfileName=t},setNetworkBalanceInUsd(t){It.networkBalanceInUSD=t},setLoading(t){It.loading=t},async sendToken(){var t;try{switch(Et.setLoading(!0),(t=ee.state.activeCaipNetwork)==null?void 0:t.chainNamespace){case"eip155":await Et.sendEvmToken();return;case"solana":await Et.sendSolanaToken();return;default:throw new Error("Unsupported chain")}}finally{Et.setLoading(!1)}},async sendEvmToken(){var r,n,i,s;const t=ee.state.activeChain,e=(r=Jt.state.preferredAccountTypes)==null?void 0:r[t];if(!Et.state.sendTokenAmount||!Et.state.receiverAddress)throw new Error("An amount and receiver address are required");if(!Et.state.token)throw new Error("A token is required");(n=Et.state.token)!=null&&n.address?(qr.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:e===Zf.ACCOUNT_TYPES.SMART_ACCOUNT,token:Et.state.token.address,amount:Et.state.sendTokenAmount,network:((i=ee.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)||""}}),await Et.sendERC20Token({receiverAddress:Et.state.receiverAddress,tokenAddress:Et.state.token.address,sendTokenAmount:Et.state.sendTokenAmount,decimals:Et.state.token.quantity.decimals})):(qr.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:e===Zf.ACCOUNT_TYPES.SMART_ACCOUNT,token:Et.state.token.symbol||"",amount:Et.state.sendTokenAmount,network:((s=ee.state.activeCaipNetwork)==null?void 0:s.caipNetworkId)||""}}),await Et.sendNativeToken({receiverAddress:Et.state.receiverAddress,sendTokenAmount:Et.state.sendTokenAmount,decimals:Et.state.token.quantity.decimals}))},async fetchTokenBalance(t){var s,o;It.loading=!0;const e=(s=ee.state.activeCaipNetwork)==null?void 0:s.caipNetworkId,r=(o=ee.state.activeCaipNetwork)==null?void 0:o.chainNamespace,n=ee.state.activeCaipAddress,i=n?it.getPlainAddress(n):void 0;if(It.lastRetry&&!it.isAllowedRetry(It.lastRetry,30*Pi.ONE_SEC_MS))return It.loading=!1,[];try{if(i&&e&&r){const a=await ax.getMyTokensWithBalance();return It.tokenBalances=a,It.lastRetry=void 0,a}}catch(a){It.lastRetry=Date.now(),t==null||t(a),$a.showError("Token Balance Unavailable")}finally{It.loading=!1}return[]},fetchNetworkBalance(){if(It.tokenBalances.length===0)return;const t=ax.mapBalancesToSwapTokens(It.tokenBalances);if(!t)return;const e=t.find(r=>r.address===ee.getActiveNetworkTokenAddress());e&&(It.networkBalanceInUSD=e?Ece.multiply(e.quantity.numeric,e.price).toString():"0")},async sendNativeToken(t){var s,o,a,c;Ge.pushTransactionStack({});const e=t.receiverAddress,r=Jt.state.address,n=Ye.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));await Ye.sendTransaction({chainNamespace:"eip155",to:e,address:r,data:"0x",value:n??BigInt(0)}),qr.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:((s=Jt.state.preferredAccountTypes)==null?void 0:s.eip155)===Zf.ACCOUNT_TYPES.SMART_ACCOUNT,token:((o=Et.state.token)==null?void 0:o.symbol)||"",amount:t.
91sendTokenAmount,network:((a=ee.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)||""}}),(c=Ye._getClient())==null||c.updateBalance("eip155"),Et.resetSend()},async sendERC20Token(t){Ge.pushTransactionStack({onSuccess(){Ge.replace("Account")}});const e=Ye.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));if(Jt.state.address&&t.sendTokenAmount&&t.receiverAddress&&t.tokenAddress){const r=it.getPlainAddress(t.tokenAddress);await Ye.writeContract({fromAddress:Jt.state.address,tokenAddress:r,args:[t.receiverAddress,e??BigInt(0)],method:"transfer",abi:Sce.getERC20Abi(r),chainNamespace:"eip155"}),Et.resetSend()}},async sendSolanaToken(){var t;if(!Et.state.sendTokenAmount||!Et.state.receiverAddress)throw new Error("An amount and receiver address are required");Ge.pushTransactionStack({onSuccess(){Ge.replace("Account")}}),await Ye.sendTransaction({chainNamespace:"solana",to:Et.state.receiverAddress,value:Et.state.sendTokenAmount}),(t=Ye._getClient())==null||t.updateBalance("solana"),Et.resetSend()},resetSend(){It.token=void 0,It.sendTokenAmount=void 0,It.receiverAddress=void 0,It.receiverProfileImageUrl=void 0,It.receiverProfileName=void 0,It.loading=!1,It.tokenBalances=[]}},Et=fi(dle),f5={currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[],user:void 0},jg={caipNetwork:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]},we=Xt({chains:zce(),activeCaipAddress:void 0,activeChain:void 0,activeCaipNetwork:void 0,noAdapters:!1,universalAdapter:{networkControllerClient:void 0,connectionControllerClient:void 0},isSwitchingNamespace:!1}),hle={state:we,subscribe(t){return Ln(we,()=>{t(we)})},subscribeKey(t,e){return Sn(we,t,e)},subscribeChainProp(t,e,r){let n;return Ln(we.chains,()=>{var s;const i=r||we.activeChain;if(i){const o=(s=we.chains.get(i))==null?void 0:s[t];n!==o&&(n=o,e(o))}})},initialize(t,e,r){const{chainId:n,namespace:i}=je.getActiveNetworkProps(),s=e==null?void 0:e.find(u=>u.id.toString()===(n==null?void 0:n.toString())),a=t.find(u=>(u==null?void 0:u.namespace)===i)||(t==null?void 0:t[0]),c=t.map(u=>u.namespace).filter(u=>u!==void 0),l=ot.state.enableEmbedded?new Set([...c]):new Set([...(e==null?void 0:e.map(u=>u.chainNamespace))??[]]);((t==null?void 0:t.length)===0||!a)&&(we.noAdapters=!0),we.noAdapters||(we.activeChain=a==null?void 0:a.namespace,we.activeCaipNetwork=s,ee.setChainNetworkData(a==null?void 0:a.namespace,{caipNetwork:s}),we.activeChain&&yh.set({activeChain:a==null?void 0:a.namespace})),l.forEach(u=>{const d=e==null?void 0:e.filter(h=>h.chainNamespace===u);ee.state.chains.set(u,{namespace:u,networkState:Xt({...jg,caipNetwork:d==null?void 0:d[0]}),accountState:Xt(f5),caipNetworks:d??[],...r}),ee.setRequestedCaipNetworks(d??[],u)})},removeAdapter(t){var e,r;if(we.activeChain===t){const n=Array.from(we.chains.entries()).find(([i])=>i!==t);if(n){const i=(r=(e=n[1])==null?void 0:e.caipNetworks)==null?void 0:r[0];i&&ee.setActiveCaipNetwork(i)}}we.chains.delete(t)},addAdapter(t,{networkControllerClient:e,connectionControllerClient:r},n){we.chains.set(t.namespace,{namespace:t.namespace,networkState:{...jg,caipNetwork:n[0]},accountState:f5,caipNetworks:n,connectionControllerClient:r,networkControllerClient:e}),ee.setRequestedCaipNetworks((n==null?void 0:n.filter(i=>i.chainNamespace===t.namespace))??[],t.namespace)},addNetwork(t){var r;const e=we.chains.get(t.chainNamespace);if(e){const n=[...e.caipNetworks||[]];(r=e.caipNetworks)!=null&&r.find(i=>i.id===t.id)||n.push(t),we.chains.set(t.chainNamespace,{...e,caipNetworks:n}),ee.setRequestedCaipNetworks(n,t.chainNamespace),Ze.filterByNamespace(t.chainNamespace,!0)}},removeNetwork(t,e){var n,i,s;const r=we.chains.get(t);if(r){const o=((n=we.activeCaipNetwork)==null?void 0:n.id)===e,a=[...((i=r.caipNetworks)==null?void 0:i.filter(c=>c.id!==e))||[]];o&&((s=r==null?void 0:r.caipNetworks)!=null&&s[0])&&ee.setActiveCaipNetwork(r.caipNetworks[0]),we.chains.set(t,{...r,caipNetworks:a}),ee.setRequestedCaipNetworks(a||[],t),a.length===0&&Ze.filterByNamespace(t,!1)}},setAdapterNetworkState(t,e){const r=we.chains.get(t);r&&(r.networkState={...r.networkState||jg,...e},we.chains.set(t,r))},setChainAccountData(t,e,r=!0){if(!t)throw new Error("Chain is required to update chain account data");const n=we.chains.get(t);if(n){const i={...n.accountState||f5,...e};we.chains.set(t,{...n,accountState:i}),(we.chains.size===1||we.activeChain===t)&&(e.caipAddress&&(we.activeCaipAddress=e.caipAddress),Jt.replaceState(i))}},setChainNetworkData(t,e){if(!t)return;const r=we.chains.get(t);if(r){const n={...r.networkState||jg,...e};we.chains.set(t,{...r,networkState:n})}}
91,setAccountProp(t,e,r,n=!0){ee.setChainAccountData(r,{[t]:e},n),t==="status"&&e==="disconnected"&&r&&Ze.removeConnectorId(r)},setActiveNamespace(t){var n,i;we.activeChain=t;const e=t?we.chains.get(t):void 0,r=(n=e==null?void 0:e.networkState)==null?void 0:n.caipNetwork;r!=null&&r.id&&t&&(we.activeCaipAddress=(i=e==null?void 0:e.accountState)==null?void 0:i.caipAddress,we.activeCaipNetwork=r,ee.setChainNetworkData(t,{caipNetwork:r}),je.setActiveCaipNetworkId(r==null?void 0:r.caipNetworkId),yh.set({activeChain:t,selectedNetworkId:r==null?void 0:r.caipNetworkId}))},setActiveCaipNetwork(t){var n,i,s;if(!t)return;we.activeChain!==t.chainNamespace&&ee.setIsSwitchingNamespace(!0);const e=we.chains.get(t.chainNamespace);we.activeChain=t.chainNamespace,we.activeCaipNetwork=t,ee.setChainNetworkData(t.chainNamespace,{caipNetwork:t}),(n=e==null?void 0:e.accountState)!=null&&n.address?we.activeCaipAddress=`${t.chainNamespace}:${t.id}:${(i=e==null?void 0:e.accountState)==null?void 0:i.address}`:we.activeCaipAddress=void 0,ee.setAccountProp("caipAddress",we.activeCaipAddress,t.chainNamespace),e&&Jt.replaceState(e.accountState),Et.resetSend(),yh.set({activeChain:we.activeChain,selectedNetworkId:(s=we.activeCaipNetwork)==null?void 0:s.caipNetworkId}),je.setActiveCaipNetworkId(t.caipNetworkId),!ee.checkIfSupportedNetwork(t.chainNamespace)&&ot.state.enableNetworkSwitch&&!ot.state.allowUnsupportedChain&&!Ye.state.wcBasic&&ee.showUnsupportedChainUI()},addCaipNetwork(t){var r;if(!t)return;const e=we.chains.get(t.chainNamespace);e&&((r=e==null?void 0:e.caipNetworks)==null||r.push(t))},async switchActiveNamespace(t){var i;if(!t)return;const e=t!==ee.state.activeChain,r=(i=ee.getNetworkData(t))==null?void 0:i.caipNetwork,n=ee.getCaipNetworkByNamespace(t,r==null?void 0:r.id);e&&n&&await ee.switchActiveNetwork(n)},async switchActiveNetwork(t){var i;const e=ee.state.chains.get(ee.state.activeChain),r=!((i=e==null?void 0:e.caipNetworks)!=null&&i.some(s=>{var o;return s.id===((o=we.activeCaipNetwork)==null?void 0:o.id)})),n=ee.getNetworkControllerClient(t.chainNamespace);if(n){try{await n.switchCaipNetwork(t),r&&vn.close()}catch{Ge.goBack()}qr.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:t.caipNetworkId}})}},getNetworkControllerClient(t){const e=t||we.activeChain,r=we.chains.get(e);if(!r)throw new Error("Chain adapter not found");if(!r.networkControllerClient)throw new Error("NetworkController client not set");return r.networkControllerClient},getConnectionControllerClient(t){const e=t||we.activeChain;if(!e)throw new Error("Chain is required to get connection controller client");const r=we.chains.get(e);if(!(r!=null&&r.connectionControllerClient))throw new Error("ConnectionController client not set");return r.connectionControllerClient},getAccountProp(t,e){var i;let r=we.activeChain;if(e&&(r=e),!r)return;const n=(i=we.chains.get(r))==null?void 0:i.accountState;if(n)return n[t]},getNetworkProp(t,e){var n;const r=(n=we.chains.get(e))==null?void 0:n.networkState;if(r)return r[t]},getRequestedCaipNetworks(t){const e=we.chains.get(t),{approvedCaipNetworkIds:r=[],requestedCaipNetworks:n=[]}=(e==null?void 0:e.networkState)||{};return it.sortRequestedNetworks(r,n)},getAllRequestedCaipNetworks(){const t=[];return we.chains.forEach(e=>{const r=ee.getRequestedCaipNetworks(e.namespace);t.push(...r)}),t},setRequestedCaipNetworks(t,e){ee.setAdapterNetworkState(e,{requestedCaipNetworks:t});const n=ee.getAllRequestedCaipNetworks().map(s=>s.chainNamespace),i=Array.from(new Set(n));Ze.filterByNamespaces(i)},getAllApprovedCaipNetworkIds(){const t=[];return we.chains.forEach(e=>{const r=ee.getApprovedCaipNetworkIds(e.namespace);t.push(...r)}),t},getActiveCaipNetwork(){return we.activeCaipNetwork},getActiveCaipAddress(){return we.activeCaipAddress},getApprovedCaipNetworkIds(t){var n;const e=we.chains.get(t);return((n=e==null?void 0:e.networkState)==null?void 0:n.approvedCaipNetworkIds)||[]},async setApprovedCaipNetworksData(t){const e=ee.getNetworkControllerClient(),r=await(e==null?void 0:e.getApprovedCaipNetworksData());ee.setAdapterNetworkState(t,{approvedCaipNetworkIds:r==null?void 0:r.approvedCaipNetworkIds,supportsAllNetworks:r==null?void 0:r.supp
91ortsAllNetworks})},checkIfSupportedNetwork(t,e){const r=e||we.activeCaipNetwork,n=ee.getRequestedCaipNetworks(t);return n.length?n==null?void 0:n.some(i=>i.id===(r==null?void 0:r.id)):!0},checkIfSupportedChainId(t){if(!we.activeChain)return!0;const e=ee.getRequestedCaipNetworks(we.activeChain);return e==null?void 0:e.some(r=>r.id===t)},setSmartAccountEnabledNetworks(t,e){ee.setAdapterNetworkState(e,{smartAccountEnabledNetworks:t})},checkIfSmartAccountEnabled(){var n;const t=dce.caipNetworkIdToNumber((n=we.activeCaipNetwork)==null?void 0:n.caipNetworkId),e=we.activeChain;if(!e||!t)return!1;const r=ee.getNetworkProp("smartAccountEnabledNetworks",e);return!!(r!=null&&r.includes(Number(t)))},getActiveNetworkTokenAddress(){var n,i;const t=((n=we.activeCaipNetwork)==null?void 0:n.chainNamespace)||"eip155",e=((i=we.activeCaipNetwork)==null?void 0:i.id)||1,r=Pi.NATIVE_TOKEN_ADDRESS[t];return`${t}:${e}:${r}`},showUnsupportedChainUI(){vn.open({view:"UnsupportedChain"})},checkIfNamesSupported(){const t=we.activeCaipNetwork;return!!(t!=null&&t.chainNamespace&&Pi.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(t.chainNamespace))},resetNetwork(t){ee.setAdapterNetworkState(t,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]})},resetAccount(t){const e=t;if(!e)throw new Error("Chain is required to set account prop");we.activeCaipAddress=void 0,ee.setChainAccountData(e,{smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountTypes:void 0,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0,allAccounts:[],user:void 0,status:"disconnected"}),Ze.removeConnectorId(e)},setIsSwitchingNamespace(t){we.isSwitchingNamespace=t},getFirstCaipNetworkSupportsAuthConnector(){var r,n;const t=[];let e;if(we.chains.forEach(i=>{En.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(s=>s===i.namespace)&&i.namespace&&t.push(i.namespace)}),t.length>0){const i=t[0];return e=i?(n=(r=we.chains.get(i))==null?void 0:r.caipNetworks)==null?void 0:n[0]:void 0,e}},getAccountData(t){var e;return t?(e=ee.state.chains.get(t))==null?void 0:e.accountState:Jt.state},getNetworkData(t){var r;const e=t||we.activeChain;if(e)return(r=ee.state.chains.get(e))==null?void 0:r.networkState},getCaipNetworkByNamespace(t,e){var i,s,o;if(!t)return;const r=ee.state.chains.get(t),n=(i=r==null?void 0:r.caipNetworks)==null?void 0:i.find(a=>a.id===e);return n||((s=r==null?void 0:r.networkState)==null?void 0:s.caipNetwork)||((o=r==null?void 0:r.caipNetworks)==null?void 0:o[0])},getRequestedCaipNetworkIds(){const t=Ze.state.filterByNamespace;return(t?[we.chains.get(t)]:Array.from(we.chains.values())).flatMap(r=>(r==null?void 0:r.caipNetworks)||[]).map(r=>r.caipNetworkId)},getCaipNetworks(t){return t?ee.getRequestedCaipNetworks(t):ee.getAllRequestedCaipNetworks()}},ee=fi(hle),fle={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},KN=it.getBlockchainApiUrl(),Vn=Xt({clientId:null,api:new Rp({baseUrl:KN,clientId:null}),supportedChains:{http:[],ws:[]}}),Re={state:Vn,async get(t){const{st:e,sv:r}=Re.getSdkProperties(),n=ot.state.projectId,i={...t.params||{},st:e,sv:r,projectId:n};return Vn.api.get({...t,params:i})},getSdkProperties(){const{sdkType:t,sdkVersion:e}=ot.state;return{st:t||"unknown",sv:e||"unknown"}},async isNetworkSupported(t){if(!t)return!1;
91try{Vn.supportedChains.http.length||await Re.getSupportedNetworks()}catch{return!1}return Vn.supportedChains.http.includes(t)},async getSupportedNetworks(){try{const t=await Re.get({path:"v1/supported-chains"});return Vn.supportedChains=t,t}catch{return Vn.supportedChains}},async fetchIdentity({address:t,caipNetworkId:e}){if(!await Re.isNetworkSupported(e))return{avatar:"",name:""};const n=je.getIdentityFromCacheForAddress(t);if(n)return n;const i=await Re.get({path:`/v1/identity/${t}`,params:{sender:ee.state.activeCaipAddress?it.getPlainAddress(ee.state.activeCaipAddress):void 0}});return je.updateIdentityCache({address:t,identity:i,timestamp:Date.now()}),i},async fetchTransactions({account:t,cursor:e,onramp:r,signal:n,cache:i,chainId:s}){var a;return await Re.isNetworkSupported((a=ee.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)?Re.get({path:`/v1/account/${t}/history`,params:{cursor:e,onramp:r,chainId:s},signal:n,cache:i}):{data:[],next:void 0}},async fetchSwapQuote({amount:t,userAddress:e,from:r,to:n,gasPrice:i}){var o;return await Re.isNetworkSupported((o=ee.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)?Re.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{amount:t,userAddress:e,from:r,to:n,gasPrice:i}}):{quotes:[]}},async fetchSwapTokens({chainId:t}){var r;return await Re.isNetworkSupported((r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Re.get({path:"/v1/convert/tokens",params:{chainId:t}}):{tokens:[]}},async fetchTokenPrice({addresses:t}){var r;return await Re.isNetworkSupported((r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Vn.api.post({path:"/v1/fungible/price",body:{currency:"usd",addresses:t,projectId:ot.state.projectId},headers:{"Content-Type":"application/json"}}):{fungibles:[]}},async fetchSwapAllowance({tokenAddress:t,userAddress:e}){var n;return await Re.isNetworkSupported((n=ee.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)?Re.get({path:"/v1/convert/allowance",params:{tokenAddress:t,userAddress:e},headers:{"Content-Type":"application/json"}}):{allowance:"0"}},async fetchGasPrice({chainId:t}){var i;const{st:e,sv:r}=Re.getSdkProperties();if(!await Re.isNetworkSupported((i=ee.state.activeCaipNetwork)==null?void 0:i.caipNetworkId))throw new Error("Network not supported for Gas Price");return Re.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json"},params:{chainId:t,st:e,sv:r}})},async generateSwapCalldata({amount:t,from:e,to:r,userAddress:n,disableEstimate:i}){var o;if(!await Re.isNetworkSupported((o=ee.state.activeCaipNetwork)==null?void 0:o.caipNetworkId))throw new Error("Network not supported for Swaps");return Vn.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:t,eip155:{slippage:Pi.CONVERT_SLIPPAGE_TOLERANCE},projectId:ot.state.projectId,from:e,to:r,userAddress:n,disableEstimate:i}})},async generateApproveCalldata({from:t,to:e,userAddress:r}){var o;const{st:n,sv:i}=Re.getSdkProperties();if(!await Re.isNetworkSupported((o=ee.state.activeCaipNetwork)==null?void 0:o.caipNetworkId))throw new Error("Network not supported for Swaps");return Re.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json"},params:{userAddress:r,from:t,to:e,st:n,sv:i}})},async getBalance(t,e,r){var l;const{st:n,sv:i}=Re.getSdkProperties();if(!await Re.isNetworkSupported((l=ee.state.activeCaipNetwork)==null?void 0:l.caipNetworkId))return $a.showError("Token Balance Unavailable"),{balances:[]};const o=`${e}:${t}`,a=je.getBalanceCacheForCaipAddress(o);if(a)return a;const c=await Re.get({path:`/v1/account/${t}/balance`,params:{currency:"usd",chainId:e,forceUpdate:r,st:n,sv:i}});return je.updateBalanceCache({caipAddress:o,balance:c,timestamp:Date.now()}),c},async lookupEnsName(t){var r;return await Re.isNetworkSupported((r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Re.get({path:`/v1/profile/account/${t}`,params:{apiVersion:"2"}}):{addresses:{},attributes:[]}},async reverseLookupEnsName({address:t}){var r;return await Re.isNetworkSupported((r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Re.get({path:`/v1/profile/reverse/${t}`,params:{sender:Jt.state.address,apiVersion:"2"}}):[]},async getEnsNameSuggestions(t){var r;return await Re.isNetworkSupported((r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Re.get({path:`/v1/profile/suggestions/${t}`,params:{zone:"reown.id"}}):{suggestions:[]}},async registerEnsName({coinType:t,address:e,message:r,signature:n}){var s;return await Re.isNetworkSupported((s=ee.state.activeCaipNetwork)==null?void 0:s.caipNetworkId)?Vn.api.post({path:"/v1/profile/account",body:{coin_type:t,address:e,message:r,signature:n},headers:{"Content-Type":"application/json"}}):{success:!1}},async generateOnRampURL({destinationWallets:t,partnerUserId:e,defaultNetwork:r,purchaseAmount:n,paymentAmount:i}){var a;
91return await Re.isNetworkSupported((a=ee.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)?(await Vn.api.post({path:"/v1/generators/onrampurl",params:{projectId:ot.state.projectId},body:{destinationWallets:t,defaultNetwork:r,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url:""},async getOnrampOptions(){var e;if(!await Re.isNetworkSupported((e=ee.state.activeCaipNetwork)==null?void 0:e.caipNetworkId))return{paymentCurrencies:[],purchaseCurrencies:[]};try{return await Re.get({path:"/v1/onramp/options"})}catch{return fle}},async getOnrampQuote({purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}){var i;try{return await Re.isNetworkSupported((i=ee.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)?await Vn.api.post({path:"/v1/onramp/quote",params:{projectId:ot.state.projectId},body:{purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}}):null}catch{return{coinbaseFee:{amount:r,currency:e.id},networkFee:{amount:r,currency:e.id},paymentSubtotal:{amount:r,currency:e.id},paymentTotal:{amount:r,currency:e.id},purchaseAmount:{amount:r,currency:e.id},quoteId:"mocked-quote-id"}}},async getSmartSessions(t){var r;return await Re.isNetworkSupported((r=ee.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Re.get({path:`/v1/sessions/${t}`}):[]},async revokeSmartSession(t,e,r){var i;return await Re.isNetworkSupported((i=ee.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)?Vn.api.post({path:`/v1/sessions/${t}/revoke`,params:{projectId:ot.state.projectId},body:{pci:e,signature:r}}):{success:!1}},setClientId(t){Vn.clientId=t,Vn.api=new Rp({baseUrl:KN,clientId:t})}},Ji=Xt({currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[]}),ple={state:Ji,replaceState(t){t&&Object.assign(Ji,Lh(t))},subscribe(t){return ee.subscribeChainProp("accountState",e=>{if(e)return t(e)})},subscribeKey(t,e,r){let n;return ee.subscribeChainProp("accountState",i=>{if(i){const s=i[t];n!==s&&(n=s,e(s))}},r)},setStatus(t,e){ee.setAccountProp("status",t,e)},getCaipAddress(t){return ee.getAccountProp("caipAddress",t)},setCaipAddress(t,e){const r=t?it.getPlainAddress(t):void 0;e===ee.state.activeChain&&(ee.state.activeCaipAddress=t),ee.setAccountProp("caipAddress",t,e),ee.setAccountProp("address",r,e)},setBalance(t,e,r){ee.setAccountProp("balance",t,r),ee.setAccountProp("balanceSymbol",e,r)},setProfileName(t,e){ee.setAccountProp("profileName",t,e)},setProfileImage(t,e){ee.setAccountProp("profileImage",t,e)},setUser(t,e){ee.setAccountProp("user",t,e)},setAddressExplorerUrl(t,e){ee.setAccountProp("addressExplorerUrl",t,e)},setSmartAccountDeployed(t,e){ee.setAccountProp("smartAccountDeployed",t,e)},setCurrentTab(t){ee.setAccountProp("currentTab",t,ee.state.activeChain)},setTokenBalance(t,e){t&&ee.setAccountProp("tokenBalance",t,e)},setShouldUpdateToAddress(t,e){ee.setAccountProp("shouldUpdateToAddress",t,e)},setAllAccounts(t,e){ee.setAccountProp("allAccounts",t,e)},addAddressLabel(t,e,r){const n=ee.getAccountProp("addressLabels",r)||new Map;n.set(t,e),ee.setAccountProp("addressLabels",n,r)},removeAddressLabel(t,e){const r=ee.getAccountProp("addressLabels",e)||new Map;r.delete(t),ee.setAccountProp("addressLabels",r,e)},setConnectedWalletInfo(t,e){ee.setAccountProp("connectedWalletInfo",t,e,!1)},setPreferredAccountType(t,e){ee.setAccountProp("preferredAccountTypes",{...Ji.preferredAccountTypes,[e]:t},e)},setPreferredAccountTypes(t){Ji.preferredAccountTypes=t},setSocialProvider(t,e){t&&ee.setAccountProp("socialProvider",t,e)},setSocialWindow(t,e){ee.setAccountProp("socialWindow",t?Lh(t):void 0,e)},setFarcasterUrl(t,e){ee.setAccountProp("farcasterUrl",t,e)},async fetchTokenBalance(t){var s,o;Ji.balanceLoading=!0;const e=(s=ee.state.activeCaipNetwork)==null?void 0:s.caipNetworkId,r=(o=ee.state.activeCaipNetwork)==null?void 0:o.chainNamespace,n=ee.state.activeCaipAddress,i=n?it.getPlainAddress(n):void 0;if(Ji.lastRetry&&!it.isAllowedRetry(Ji.lastRetry,30*Pi.ONE_SEC_MS))return Ji.balanceLoading=!1,[];try{if(i&&e&&r){const c=(await Re.getBalance(i,e)).balances.filter(l=>l.quantity.decimals!=="0");return Jt.setTokenBalance(c,r),Ji.lastRetry=void 0,Ji.balanceLoading=!1,c}}catch(a){Ji.lastRetry=Date.now(),t==null||t(a),$a.showError("Token Balance Unavailable")}finally{Ji.balanceLoading=!1}return[]},resetAccount(t){ee.resetAccount(t)}},Jt=fi(ple),gle={onSwitchNetwork({network:t,ignoreSwitchConfirmation:e=!1}){const r=ee.state.activeCaipNetwork,n=Ge.state.data;if(t.id===(r==null?void 0:r.id))return;const s=Jt.getCaipAddress(ee.state.activeChain),o=t.chainNamespace!==ee.state.activeChain,a=Jt.getCaipAddress(t.chainNamespace),l=Ze.getConnectorId(ee.state.activeChain)===En.CONNECTOR_ID.AUTH,u=En.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(d=>d===t.chainNamespace);e||l&&u?Ge.push("SwitchNetwork",{...n,network:t}):s&&o&&!a?Ge.push("SwitchActiveChain",{switchToChain:t.chainNamespace,navigateTo:"Connect",navigateWithReplace:!0,network:t}):Ge.push("SwitchNetwork",{...n,network:t})}},Wn=Xt({loading:!1,loadingNamespaceMap:new Map,open:!1,shake:!1,namespace:void 0}),wle={state:Wn,subscribe(t){return Ln(Wn,()=>t(Wn))},subscribeKey(t,e){return Sn(Wn,t,e)},async open(t){var o,a;const e=Jt.state.status==="connected",r=t==null?void 0:t.namespace,n=ee.state.activeChain,i=r&&r!==n,s=(o=ee.getAccountData(t==null?void 0:t.namespace))==null?void 0:o.caipAddress;if(Ye.state.wcBasic?Me.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1}):await Me.prefetch({fetchConnectorImages:!e,fetchFeaturedWallets:!e,fetchRecommendedWallets:!e}
91),Ze.setFilterByNamespace(t==null?void 0:t.namespace),vn.setLoading(!0,r),r&&i){const c=((a=ee.getNetworkData(r))==null?void 0:a.caipNetwork)||ee.getRequestedCaipNetworks(r)[0];c&&gle.onSwitchNetwork({network:c,ignoreSwitchConfirmation:!0})}else{const c=ee.state.noAdapters;ot.state.manualWCControl||c&&!s?it.isMobile()?Ge.reset("AllWallets"):Ge.reset("ConnectingWalletConnectBasic"):t!=null&&t.view?Ge.reset(t.view,t.data):s?Ge.reset("Account"):Ge.reset("Connect")}Wn.open=!0,yh.set({open:!0}),qr.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:!!s}})},close(){const t=ot.state.enableEmbedded,e=!!ee.state.activeCaipAddress;Wn.open&&qr.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:e}}),Wn.open=!1,Ge.reset("Connect"),vn.clearLoading(),t?e?Ge.replace("Account"):Ge.push("Connect"):yh.set({open:!1}),Ye.resetUri()},setLoading(t,e){e&&Wn.loadingNamespaceMap.set(e,t),Wn.loading=t,yh.set({loading:t})},clearLoading(){Wn.loadingNamespaceMap.clear(),Wn.loading=!1},shake(){Wn.shake||(Wn.shake=!0,setTimeout(()=>{Wn.shake=!1},500))}},vn=fi(wle),Gf={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},z4={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},mle={providers:HN,selectedProvider:null,error:null,purchaseCurrency:Gf,paymentCurrency:z4,purchaseCurrencies:[Gf],paymentCurrencies:[],quotesLoading:!1},at=Xt(mle),yle={state:at,subscribe(t){return Ln(at,()=>t(at))},subscribeKey(t,e){return Sn(at,t,e)},setSelectedProvider(t){if(t&&t.name==="meld"){const e=ee.state.activeChain===En.CHAIN.SOLANA?"SOL":"USDC",r=Jt.state.address??"",n=new URL(t.url);n.searchParams.append("publicKey",Fce),n.searchParams.append("destinationCurrencyCode",e),n.searchParams.append("walletAddress",r),n.searchParams.append("externalCustomerId",ot.state.projectId),at.selectedProvider={...t,url:n.toString()}}else at.selectedProvider=t},setOnrampProviders(t){if(Array.isArray(t)&&t.every(e=>typeof e=="string")){const e=t,r=HN.filter(n=>e.includes(n.name));at.providers=r}else at.providers=[]},setPurchaseCurrency(t){at.purchaseCurrency=t},setPaymentCurrency(t){at.paymentCurrency=t},setPurchaseAmount(t){cx.state.purchaseAmount=t},setPaymentAmount(t){cx.state.paymentAmount=t},async getAvailableCurrencies(){const t=await Re.getOnrampOptions();at.purchaseCurrencies=t.purchaseCurrencies,at.paymentCurrencies=t.paymentCurrencies,at.paymentCurrency=t.paymentCurrencies[0]||z4,at.purchaseCurrency=t.purchaseCurrencies[0]||Gf,await Me.fetchCurrencyImages(t.paymentCurrencies.map(e=>e.id)),await Me.fetchTokenImages(t.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var t,e;at.quotesLoading=!0;try{const r=await Re.getOnrampQuote({purchaseCurrency:at.purchaseCurrency,paymentCurrency:at.paymentCurrency,amount:((t=at.paymentAmount)==null?void 0:t.toString())||"0",network:(e=at.purchaseCurrency)==null?void 0:e.symbol});return at.quotesLoading=!1,at.purchaseAmount=Number(r==null?void 0:r.purchaseAmount.amount),r}catch(r){return at.error=r.message,at.quotesLoading=!1,null}finally{at.quotesLoading=!1}},resetState(){at.selectedProvider=null,at.error=null,at.purchaseCurrency=Gf,at.paymentCurrency=z4,at.purchaseCurrencies=[Gf],at.paymentCurrencies=[],at.paymentAmount=void 0,at.purchaseAmount=void 0,at.quotesLoading=!1}},cx=fi(yle),Os=Xt({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),ble={state:Os,subscribe(t){return Ln(Os,()=>t(Os))},subscribeKey(t,e){return Sn(Os,t,e)},showTooltip({message:t,triggerRect:e,variant:r}){Os.open=!0,Os.message=t,Os.triggerRect=e,Os.variant=r},hide(){Os.open=!1,Os.message="",Os.triggerRect={width:0,height:0,top:0,left:0}}},d_e=fi(ble),lx=2147483648,vle={convertEVMChainIdToCoinType(t){if(t>=lx)throw new Error("Invalid chainId");return(lx|t)>>>0}},Xi=Xt({suggestions:[],loading:!1}),Ele={state:Xi,subscribe(t){return Ln(Xi,()=>t(Xi))},subscribeKey(t,e){return Sn(Xi,t,e)},async resolveName(t){var e,r;try{return await Re.lookupEnsName(t)}catch(n){const i=n;throw new Error(((r=(e=i==null?void 0:i.reasons)==null?void 0:e[0])==null?void 0:r.description)||"Error resolving name")}},async isNameRegistered(t){try{return await Re.lookupEnsName(t),!0}catch{return!1}},async getSuggestions(t){try{Xi.loading=!0,Xi.suggestions=[];const e=await Re.getEnsNameSuggestions(t);return Xi.suggestions=e.suggestions.map(r=>({...r,name:r.name}))||[],Xi.suggestions}catch(e){const r=p5.parseEnsApiError(e,"Error fetching name suggestions");throw new Error(r)}finally{Xi.loading=!1}},async getNamesForAddress(t){try{if(!ee.state.activeCaipNetwork)return[];
91const r=je.getEnsFromCacheForAddress(t);if(r)return r;const n=await Re.reverseLookupEnsName({address:t});return je.updateEnsCache({address:t,ens:n,timestamp:Date.now()}),n}catch(e){const r=p5.parseEnsApiError(e,"Error fetching names for address");throw new Error(r)}},async registerName(t){const e=ee.state.activeCaipNetwork;if(!e)throw new Error("Network not found");const r=Jt.state.address,n=Ze.getAuthConnector();if(!r||!n)throw new Error("Address or auth connector not found");Xi.loading=!0;try{const i=JSON.stringify({name:t,attributes:{},timestamp:Math.floor(Date.now()/1e3)});Ge.pushTransactionStack({onCancel(){Ge.replace("RegisterAccountName")}});const s=await Ye.signMessage(i);Xi.loading=!1;const o=e.id;if(!o)throw new Error("Network not found");const a=vle.convertEVMChainIdToCoinType(Number(o));await Re.registerEnsName({coinType:a,address:r,signature:s,message:i}),Jt.setProfileName(t,e.chainNamespace),Ge.replace("RegisterAccountNameSuccess")}catch(i){const s=p5.parseEnsApiError(i,`Error registering name ${t}`);throw Ge.replace("RegisterAccountName"),new Error(s)}finally{Xi.loading=!1}},validateName(t){return/^[a-zA-Z0-9-]{4,}$/u.test(t)},parseEnsApiError(t,e){var n,i;const r=t;return((i=(n=r==null?void 0:r.reasons)==null?void 0:n[0])==null?void 0:i.description)||e}},p5=fi(Ele);var Cle=Object.defineProperty,xle=(t,e,r)=>e in t?Cle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ux=(t,e,r)=>xle(t,typeof e!="symbol"?e+"":e,r);let _le=class extends qi{constructor(e){super(),this.opts=e,ux(this,"protocol","wc"),ux(this,"version",2)}};var Sle=Object.defineProperty,Ile=(t,e,r)=>e in t?Sle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$le=(t,e,r)=>Ile(t,e+"",r);let Ale=class extends qi{constructor(e,r){super(),this.core=e,this.logger=r,$le(this,"records",new Map)}},Ple=class{constructor(e,r){this.logger=e,this.core=r}},Tle=class extends qi{constructor(e,r){super(),this.relayer=e,this.logger=r}},Ole=class extends qi{constructor(e){super()}},Nle=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}},kle=class extends qi{constructor(e,r){super(),this.relayer=e,this.logger=r}},Rle=class extends qi{constructor(e,r){super(),this.core=e,this.logger=r}},Ble=class{constructor(e,r,n){this.core=e,this.logger=r,this.store=n}},Dle=class{constructor(e,r){this.projectId=e,this.logger=r}},Lle=class{constructor(e,r,n){this.core=e,this.logger=r,this.telemetryEnabled=n}};var Mle=Object.defineProperty,Ule=(t,e,r)=>e in t?Mle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dx=(t,e,r)=>Ule(t,typeof e!="symbol"?e+"":e,r);let jle=class{constructor(e){this.opts=e,dx(this,"protocol","wc"),dx(this,"version",2)}},zle=class{constructor(e){this.client=e}};function j1(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function hx(t){return j1(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const ZN="2.23.2";let lf={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:`viem@${ZN}`};class bu extends Error{constructor(e,r={}){var a;const n=(()=>{var c;return r.cause instanceof bu?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),i=r.cause instanceof bu&&r.cause.docsPath||r.docsPath,s=(a=lf.getDocsUrl)==null?void 0:a.call(lf,{...r,docsPath:i}),o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...lf.version?[`Version: ${lf.version}`]:[]].join(`
92`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=ZN}walk(e){return GN(this,e)}}function GN(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?GN(t.cause,e):e?null:t}class YN extends bu{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}}function N0(t,{dir:e,size:r=32}={}){return typeof t=="string"?Fle(t,{dir:e,size:r}):qle(t,{dir:e,size:r})}function Fle(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new YN({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function qle(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new YN({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const s=e==="right";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}class Hle extends bu{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class Vle extends bu{constructor({givenSize:e,maxSize:r}
92){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function k0(t,{size:e}){if(hx(t)>e)throw new Vle({givenSize:hx(t),maxSize:e})}function F4(t,e={}){const{signed:r}=e;e.size&&k0(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return n<=s?n:n-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function Wle(t,e={}){return Number(F4(t,e))}const Kle=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function q4(t,e={}){return typeof t=="number"||typeof t=="bigint"?XN(t,e):typeof t=="string"?Yle(t,e):typeof t=="boolean"?Zle(t,e):JN(t,e)}function Zle(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(k0(r,{size:e.size}),N0(r,{size:e.size})):r}function JN(t,e={}){let r="";for(let i=0;i<t.length;i++)r+=Kle[t[i]];const n=`0x${r}`;return typeof e.size=="number"?(k0(n,{size:e.size}),N0(n,{dir:"right",size:e.size})):n}function XN(t,e={}){const{signed:r,size:n}=e,i=BigInt(t);let s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&r?-s-1n:0;if(s&&i>s||i<o){const c=typeof t=="bigint"?"n":"";throw new Hle({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}const a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?N0(a,{size:n}):a}const Gle=new TextEncoder;function Yle(t,e={}){const r=Gle.encode(t);return JN(r,e)}const Jle=new TextEncoder;function Xle(t,e={}){return typeof t=="number"||typeof t=="bigint"?eue(t,e):typeof t=="boolean"?Qle(t,e):j1(t)?QN(t,e):ek(t,e)}function Qle(t,e={}){const r=new Uint8Array(1);return r[0]=Number(t),typeof e.size=="number"?(k0(r,{size:e.size}),N0(r,{size:e.size})):r}const da={zero:48,nine:57,A:65,F:70,a:97,f:102};function fx(t){if(t>=da.zero&&t<=da.nine)return t-da.zero;if(t>=da.A&&t<=da.F)return t-(da.A-10);if(t>=da.a&&t<=da.f)return t-(da.a-10)}function QN(t,e={}){let r=t;e.size&&(k0(r,{size:e.size}),r=N0(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){const c=fx(n.charCodeAt(a++)),l=fx(n.charCodeAt(a++));if(c===void 0||l===void 0)throw new bu(`Invalid byte sequence ("${n[a-2]}${n[a-1]}" in "${n}").`);s[o]=c*16+l}return s}function eue(t,e){const r=XN(t,e);return QN(r)}function ek(t,e={}){const r=Jle.encode(t);return typeof e.size=="number"?(k0(r,{size:e.size}),N0(r,{dir:"right",size:e.size})):r}function Q2(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function tue(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Bp(t,...e){if(!tue(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function rue(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Q2(t.outputLen),Q2(t.blockLen)}function Uh(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function tk(t,e){Bp(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const zg=BigInt(2**32-1),px=BigInt(32);function nue(t,e=!1){return e?{h:Number(t&zg),l:Number(t>>px&zg)}:{h:Number(t>>px&zg)|0,l:Number(t&zg)|0}}function iue(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=nue(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}const sue=(t,e,r)=>t<<r|e>>>32-r,oue=(t,e,r)=>e<<r|t>>>32-r,aue=(t,e,r)=>e<<r-32|t>>>64-r,cue=(t,e,r)=>t<<r-32|e>>>64-r,Ld=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function lue(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function g5(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function po(t,e){return t<<32-e|t>>>e}const gx=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function uue(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function wx(t){for(let e=0;e<t.length;e++)t[e]=uue(t[e])}function due(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function dm(t){return typeof t=="string"&&(t=due(t)),Bp(t),t}function hue(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Bp(i),e+=i.length}
92const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}class e8{clone(){return this._cloneInto()}}function rk(t){const e=n=>t().update(dm(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function fue(t=32){if(Ld&&typeof Ld.getRandomValues=="function")return Ld.getRandomValues(new Uint8Array(t));if(Ld&&typeof Ld.randomBytes=="function")return Ld.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}const nk=[],ik=[],sk=[],pue=BigInt(0),uf=BigInt(1),gue=BigInt(2),wue=BigInt(7),mue=BigInt(256),yue=BigInt(113);for(let t=0,e=uf,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],nk.push(2*(5*n+r)),ik.push((t+1)*(t+2)/2%64);let i=pue;for(let s=0;s<7;s++)e=(e<<uf^(e>>wue)*yue)%mue,e&gue&&(i^=uf<<(uf<<BigInt(s))-uf);sk.push(i)}const[bue,vue]=iue(sk,!0),mx=(t,e,r)=>r>32?aue(t,e,r):sue(t,e,r),yx=(t,e,r)=>r>32?cue(t,e,r):oue(t,e,r);function Eue(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=mx(l,u,1)^r[a],h=yx(l,u,1)^r[a+1];for(let f=0;f<50;f+=10)t[o+f]^=d,t[o+f+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=ik[o],c=mx(i,s,a),l=yx(i,s,a),u=nk[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=bue[n],t[1]^=vue[n]}r.fill(0)}class t8 extends e8{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Q2(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=lue(this.state)}keccak(){gx||wx(this.state32),Eue(this.state32,this.rounds),gx||wx(this.state32),this.posOut=0,this.pos=0}update(e){Uh(this);const{blockLen:r,state:n}=this;e=dm(e);const i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Uh(this,!1),Bp(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Q2(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(tk(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new t8(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Cue=(t,e,r)=>rk(()=>new t8(e,t,r)),xue=Cue(1,136,256/8);function ok(t,e){const r=e||"hex",n=xue(j1(t,{strict:!1})?Xle(t):t);return r==="bytes"?n:q4(n)}class _ue extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const w5=new _ue(8192);function Sue(t,e){if(w5.has(`${t}.${e}`))return w5.get(`${t}.${e}`);const r=t.substring(2).toLowerCase(),n=ok(ek(r),"bytes"),i=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return w5.set(`${t}.${e}`,s),s}function Iue(t){const e=ok(`0x${t.substring(4)}`).substring(26);return Sue(`0x${e}`)}async function $ue({hash:t,signature:e}){const r=j1(t)?t:q4(t),{secp256k1:n}
vendor: 28,778 bytes, line 92
92=await J(async()=>{const{secp256k1:o}=await Promise.resolve().then(()=>wde);return{secp256k1:o}},void 0);return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){const{r:l,s:u,v:d,yParity:h}=e,f=Number(h??d),g=bx(f);return new n.Signature(F4(l),F4(u)).addRecoveryBit(g)}const o=j1(e)?e:q4(e),a=Wle(`0x${o.slice(130)}`),c=bx(a);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function bx(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}async function Aue({hash:t,signature:e}){return Iue(await $ue({hash:t,signature:e}))}function Pue(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function Tue(t,e,r){return t&e^~t&r}function Oue(t,e,r){return t&e^t&r^e&r}class Nue extends e8{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=g5(this.buffer)}update(e){Uh(this);const{view:r,buffer:n,blockLen:i}=this;e=dm(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=g5(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Uh(this),tk(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;Pue(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=g5(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}}const kue=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),xc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_c=new Uint32Array(64);class Rue extends Nue{constructor(){super(64,32,8,!1),this.A=xc[0]|0,this.B=xc[1]|0,this.C=xc[2]|0,this.D=xc[3]|0,this.E=xc[4]|0,this.F=xc[5]|0,this.G=xc[6]|0,this.H=xc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)_c[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=_c[d-15],f=_c[d-2],g=po(h,7)^po(h,18)^h>>>3,p=po(f,17)^po(f,19)^f>>>10;_c[d]=p+_c[d-7]+g+_c[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=po(a,6)^po(a,11)^po(a,25),f=u+h+Tue(a,c,l)+kue[d]+_c[d]|0,p=(po(n,2)^po(n,13)^po(n,22))+Oue(n,i,s)|0;u=l,l=c,c=a,a=o+f|0,o=s,s=i,i=n,n=f+p|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){_c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Bue=rk(()=>new Rue);class ak extends e8{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,rue(e);const n=dm(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return Uh(this),this.iHash.update(e),this}digestInto(e){Uh(this),Bp(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:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ck=(t,e,r)=>new ak(t,e).update(r).digest();ck.create=(t,e)=>new ak(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hm=BigInt(0),fm=BigInt(1),Due=BigInt(2);function vu(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Dp(t){if(!vu(t))throw new Error("Uint8Array expected")}function jh(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}const Lue=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function zh(t){Dp(t);let e="";for(let r=0;r<t.length;r++)e+=Lue[t[r]];return e}function lh(t){const e=t.toString(16);return e.length&1?"0"+e:e}function r8(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?hm:BigInt("0x"+t)}const ha={_0:48,_9:57,A:65,F:70,a:97,f:102};function vx(t){if(t>=ha._0&&t<=ha._9)return t-ha._0;if(t>=ha.A&&t<=ha.F)return t-(ha.A-10);if(t>=ha.a&&t<=ha.f)return t-(ha.a-10)}function Fh(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=vx(t.charCodeAt(s)),a=vx(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function su(t){return r8(zh(t))}function n8(t){return Dp(t),r8(zh(Uint8Array.from(t).reverse()))}function qh(t,e){return Fh(t.toString(16).padStart(e*2,"0"))}function i8(t,e){return qh(t,e).reverse()}function Mue(t){return Fh(lh(t))}function Us(t,e,r){let n;if(typeof e=="string")try{n=Fh(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(vu(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}function z1(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Dp(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}function Uue(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function jue(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const m5=t=>typeof t=="bigint"&&hm<=t;function pm(t,e,r){return m5(t)&&m5(e)&&m5(r)&&e<=t&&t<r}function ou(t,e,r,n){if(!pm(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function lk(t){let e;for(e=0;t>hm;t>>=fm,e+=1);return e}function zue(t,e){return t>>BigInt(e)&fm}function Fue(t,e,r){return t|(r?fm:hm)<<BigInt(e)}const s8=t=>(Due<<BigInt(t-1))-fm,y5=t=>new Uint8Array(t),Ex=t=>Uint8Array.from(t);function uk(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=y5(t),i=y5(t),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...d)=>r(i,n,...d),c=(d=y5())=>{i=a(Ex([0]),d),n=a(),d.length!==0&&(i=a(Ex([1]),d),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const h=[];for(;d<e;){n=a();const f=n.slice();h.push(f),d+=n.length}return z1(...h)};return(d,h)=>{o(),c(d);let f;for(;!(f=h(l()));)c();return o(),f}}const que={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||vu(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Lp(t,e,r={}){const n=(i,s,o)=>{const a=que[s];if(typeof a!="function")throw new Error("invalid validator function");const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+c)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}const Hue=()=>{throw new Error("not implemented")};function H4(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const Vue=Object.freeze(Object.defineProperty({__proto__:null,aInRange:ou,abool:jh,abytes:Dp,bitGet:zue,bitLen:lk,bitMask:s8,bitSet:Fue,bytesToHex:zh,bytesToNumberBE:su,bytesToNumberLE:n8,concatBytes:z1,createHmacDrbg:uk,ensureBytes:Us,equalBytes:Uue,hexToBytes:Fh,hexToNumber:r8,inRange:pm,isBytes:vu,memoized:H4,notImplemented:Hue,numberToBytesBE:qh,numberToBytesLE:i8,numberToHexUnpadded:lh,numberToVarBytesBE:Mue,utf8ToBytes:jue,validateObject:Lp},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wr=BigInt(0),hr=BigInt(1),Ll=BigInt(2),Wue=BigInt(3),V4=BigInt(4),Cx=BigInt(5),xx=BigInt(8);function ni(t,e){const r=t%e;return r>=Wr?r:e+r}function Kue(t,e,r){if(e<Wr)throw new Error("invalid exponent, negatives unsupported");if(r<=Wr)throw new Error("invalid modulus");if(r===hr)return Wr;let n=hr;for(;e>Wr;)e&hr&&(n=n*t%r),t=t*t%r,e>>=hr;return n}function Qi(t,e,r){let n=t;for(;e-- >Wr;)n*=n,n%=r;return n}function W4(t,e){if(t===Wr)throw new Error("invert: expected non-zero number");if(e<=Wr)throw new Error("invert: expected positive modulus, got "+e);let r=ni(t,e),n=e,i=Wr,s=hr;for(;r!==Wr;){const a=n/r,c=n%r,l=i-s*a;n=r,r=c,i=s,s=l}if(n!==hr)throw new Error("invert: does not exist");return ni(i,e)}function Zue(t){const e=(t-hr)/Ll;let r,n,i;for(r=t-hr,n=0;r%Ll===Wr;r/=Ll,n++);for(i=Ll;i<t&&Kue(i,e,t)!==t-hr;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const o=(t+hr)/V4;return function(c,l){const u=c.pow(l,o);if(!c.eql(c.sqr(u),l))throw new Error("Cannot find square root");return u}}const s=(r+hr)/Ll;return function(a,c){if(a.pow(c,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let l=n,u=a.pow(a.mul(a.ONE,i),r),d=a.pow(c,s),h=a.pow(c,r);for(;!a.eql(h,a.ONE);){if(a.eql(h,a.ZERO))return a.ZERO;let f=1;for(let p=a.sqr(h);f<l&&!a.eql(p,a.ONE);f++)p=a.sqr(p);const g=a.pow(u,hr<<BigInt(l-f-1));u=a.sqr(g),d=a.mul(d,g),h=a.mul(h,u),l=f}return d}}function Gue(t){if(t%V4===Wue){const e=(t+hr)/V4;return function(n,i){const s=n.pow(i,e);if(!n.eql(n.sqr(s),i))throw new Error("Cannot find square root");return s}}if(t%xx===Cx){const e=(t-Cx)/xx;return function(n,i){const s=n.mul(i,Ll),o=n.pow(s,e),a=n.mul(i,o),c=n.mul(n.mul(a,Ll),o),l=n.mul(a,n.sub(c,n.ONE));if(!n.eql(n.sqr(l),i))throw new Error("Cannot find square root");return l}}return Zue(t)}const Yue=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Jue(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=Yue.reduce((n,i)=>(n[i]="function",n),e);return Lp(t,r)}function Xue(t,e,r){if(r<Wr)throw new Error("invalid exponent, negatives unsupported");if(r===Wr)return t.ONE;if(r===hr)return e;let n=t.ONE,i=e;for(;r>Wr;)r&hr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=hr;return n}function Que(t,e){const r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function dk(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function hk(t,e,r=!1,n={}){if(t<=Wr)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:s}=dk(t,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:s8(i),ZERO:Wr,ONE:hr,create:c=>ni(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Wr<=c&&c<t},is0:c=>c===Wr,isOdd:c=>(c&hr)===hr,neg:c=>ni(-c,t),eql:(c,l)=>c===l,sqr:c=>ni(c*c,t),add:(c,l)=>ni(c+l,t),sub:(c,l)=>ni(c-l,t),mul:(c,l)=>ni(c*l,t),pow:(c,l)=>Xue(a,c,l),div:(c,l)=>ni(c*W4(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>W4(c,t),sqrt:n.sqrt||(c=>(o||(o=Gue(t)),o(a,c))),invertBatch:c=>Que(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?i8(c,s):qh(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?n8(c):su(c)}});return Object.freeze(a)}function fk(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function pk(t){const e=fk(t);return e+Math.ceil(e/2)}function ede(t,e,r=!1){const n=t.length,i=fk(e),s=pk(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?n8(t):su(t),a=ni(o,e-hr)+hr;return r?i8(a,i):qh(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _x=BigInt(0),Fg=BigInt(1);function b5(t,e){const r=e.negate();return t?r:e}function gk(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function v5(t,e){gk(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function tde(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function rde(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const E5=new WeakMap,wk=new WeakMap;function C5(t){return wk.get(t)||1}function nde(t,e){return{constTimeNegate:b5,hasPrecomputes(r){return C5(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>_x;)n&Fg&&(i=i.add(s)),s=s.double(),n>>=Fg;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=v5(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){const{windows:s,windowSize:o}=v5(r,e);let a=t.ZERO,c=t.BASE;const l=BigInt(2**r-1),u=2**r,d=BigInt(r);for(let h=0;h<s;h++){const f=h*o;let g=Number(i&l);i>>=d,g>o&&(g-=u,i+=Fg);const p=f,w=f+Math.abs(g)-1,m=h%2!==0,b=g<0;g===0?c=c.add(b5(m,n[p])):a=a.add(b5(b,n[w]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){const{windows:o,windowSize:a}=v5(r,e),c=BigInt(2**r-1),l=2**r,u=BigInt(r);for(let d=0;d<o;d++){const h=d*a;if(i===_x)break;let f=Number(i&c);if(i>>=u,f>a&&(f-=l,i+=Fg),f===0)continue;let g=n[h+Math.abs(f)-1];f<0&&(g=g.negate()),s=s.add(g)}return s},getPrecomputes(r,n,i){let s=E5.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&E5.set(n,i(s))),s},wNAFCached(r,n,i){const s=C5(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=C5(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){gk(n,e),wk.set(r,n),E5.delete(r)}}}function ide(t,e,r,n){if(tde(r,t),rde(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=t.ZERO,s=lk(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o;let u=i;for(let d=l;d>=0;d-=o){c.fill(i);for(let f=0;f<n.length;f++){const g=n[f],p=Number(g>>BigInt(d)&BigInt(a));c[p]=c[p].add(r[f])}let h=i;for(let f=c.length-1,g=i;f>0;f--)g=g.add(c[f]),h=h.add(g);if(u=u.add(h),d!==0)for(let f=0;f<o;f++)u=u.double()}return u}function mk(t){return Jue(t.Fp),Lp(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...dk(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Sx(t){t.lowS!==void 0&&jh("lowS",t.lowS),t.prehash!==void 0&&jh("prehash",t.prehash)}function sde(t){const e=mk(t);Lp(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:ode,hexToBytes:ade}=Vue;class cde extends Error{constructor(e=""){super(e)}}const _a={Err:cde,_tlv:{encode:(t,e)=>{const{Err:r}=_a;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=lh(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?lh(i.length/2|128):"";return lh(t)+s+i+e},decode(t,e){const{Err:r}=_a;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=_a;if(t<Aa)throw new e("integer: negative integers are not allowed");let r=lh(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=_a;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return ode(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=_a,i=typeof t=="string"?ade(t):t;Dp(i);const{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=_a,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},Aa=BigInt(0),Ur=BigInt(1);BigInt(2);const Ix=BigInt(3);BigInt(4);function lde(t){const e=sde(t),{Fp:r}=e,n=hk(e.n,e.nBitLength),i=e.toBytes||((p,w,m)=>{const b=w.toAffine();return z1(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),s=e.fromBytes||(p=>{const w=p.subarray(1),m=r.fromBytes(w.subarray(0,r.BYTES)),b=r.fromBytes(w.subarray(r.BYTES,2*r.BYTES));return{x:m,y:b}});function o(p){const{a:w,b:m}=e,b=r.sqr(p),v=r.mul(b,p);return r.add(r.add(v,r.mul(p,w)),m)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function a(p){return pm(p,Ur,e.n)}function c(p){const{allowedPrivateKeyLengths:w,nByteLength:m,wrapPrivateKey:b,n:v}=e;if(w&&typeof p!="bigint"){if(vu(p)&&(p=zh(p)),typeof p!="string"||!w.includes(p.length))throw new Error("invalid private key");p=p.padStart(m*2,"0")}let E;try{E=typeof p=="bigint"?p:su(Us("private key",p,m))}catch{throw new Error("invalid private key, expected hex or "+m+" bytes, got "+typeof p)}return b&&(E=ni(E,v)),ou("private key",E,Ur,v),E}function l(p){if(!(p instanceof h))throw new Error("ProjectivePoint expected")}const u=H4((p,w)=>{const{px:m,py:b,pz:v}=p;if(r.eql(v,r.ONE))return{x:m,y:b};const E=p.is0();w==null&&(w=E?r.ONE:r.inv(v));const I=r.mul(m,w),_=r.mul(b,w),A=r.mul(v,w);if(E)return{x:r.ZERO,y:r.ZERO};if(!r.eql(A,r.ONE))throw new Error("invZ was invalid");return{x:I,y:_}}),d=H4(p=>{if(p.is0()){if(e.allowInfinityPoint&&!r.is0(p.py))return;throw new Error("bad point: ZERO")}const{x:w,y:m}=p.toAffine();if(!r.isValid(w)||!r.isValid(m))throw new Error("bad point: x or y not FE");const b=r.sqr(m),v=o(w);if(!r.eql(b,v))throw new Error("bad point: equation left != right");if(!p.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class h{constructor(w,m,b){if(this.px=w,this.py=m,this.pz=b,w==null||!r.isValid(w))throw new Error("x required");if(m==null||!r.isValid(m))throw new Error("y required");if(b==null||!r.isValid(b))throw new Error("z required");Object.freeze(this)}static fromAffine(w){const{x:m,y:b}=w||{};if(!w||!r.isValid(m)||!r.isValid(b))throw new Error("invalid affine point");if(w instanceof h)throw new Error("projective point not allowed");const v=E=>r.eql(E,r.ZERO);return v(m)&&v(b)?h.ZERO:new h(m,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){const m=r.invertBatch(w.map(b=>b.pz));return w.map((b,v)=>b.toAffine(m[v])).map(h.fromAffine)}static fromHex(w){const m=h.fromAffine(s(Us("pointHex",w)));return m.assertValidity(),m}static fromPrivateKey(w){return h.BASE.multiply(c(w))}static msm(w,m){return ide(h,n,w,m)}_setWindowSize(w){g.setWindowSize(this,w)}assertValidity(){d(this)}hasEvenY(){const{y:w}=this.toAffine();if(r.isOdd)return!r.isOdd(w);throw new Error("Field doesn't support isOdd")}equals(w){l(w);const{px:m,py:b,pz:v}=this,{px:E,py:I,pz:_}=w,A=r.eql(r.mul(m,_),r.mul(E,v)),P=r.eql(r.mul(b,_),r.mul(I,v));return A&&P}negate(){return new h(this.px,r.neg(this.py),this.pz)}double(){const{a:w,b:m}=e,b=r.mul(m,Ix),{px:v,py:E,pz:I}=this;let _=r.ZERO,A=r.ZERO,P=r.ZERO,y=r.mul(v,v),O=r.mul(E,E),S=r.mul(I,I),k=r.mul(v,E);return k=r.add(k,k),P=r.mul(v,I),P=r.add(P,P),_=r.mul(w,P),A=r.mul(b,S),A=r.add(_,A),_=r.sub(O,A),A=r.add(O,A),A=r.mul(_,A),_=r.mul(k,_),P=r.mul(b,P),S=r.mul(w,S),k=r.sub(y,S),k=r.mul(w,k),k=r.add(k,P),P=r.add(y,y),y=r.add(P,y),y=r.add(y,S),y=r.mul(y,k),A=r.add(A,y),S=r.mul(E,I),S=r.add(S,S),y=r.mul(S,k),_=r.sub(_,y),P=r.mul(S,O),P=r.add(P,P),P=r.add(P,P),new h(_,A,P)}add(w){l(w);const{px:m,py:b,pz:v}=this,{px:E,py:I,pz:_}=w;let A=r.ZERO,P=r.ZERO,y=r.ZERO;const O=e.a,S=r.mul(e.b,Ix);let k=r.mul(m,E),L=r.mul(b,I),T=r.mul(v,_),C=r.add(m,b),x=r.add(E,I);C=r.mul(C,x),x=r.add(k,L),C=r.sub(C,x),x=r.add(m,v);let B=r.add(E,_);return x=r.mul(x,B),B=r.add(k,T),x=r.sub(x,B),B=r.add(b,v),A=r.add(I,_),B=r.mul(B,A),A=r.add(L,T),B=r.sub(B,A),y=r.mul(O,x),A=r.mul(S,T),y=r.add(A,y),A=r.sub(L,y),y=r.add(L,y),P=r.mul(A,y),L=r.add(k,k),L=r.add(L,k),T=r.mul(O,T),x=r.mul(S,x),L=r.add(L,T),T=r.sub(k,T),T=r.mul(O,T),x=r.add(x,T),k=r.mul(L,x),P=r.add(P,k),k=r.mul(B,x),A=r.mul(C,A),A=r.sub(A,k),k=r.mul(C,L),y=r.mul(B,y),y=r.add(y,k),new h(A,P,y)}subtract(w){return this.add(w.negate())}is0(){return this.equals(h.ZERO)}wNAF(w){return g.wNAFCached(this,w,h.normalizeZ)}multiplyUnsafe(w){const{endo:m,n:b}=e;ou("scalar",w,Aa,b);const v=h.ZERO;if(w===Aa)return v;if(this.is0()||w===Ur)return this;if(!m||g.hasPrecomputes(this))return g.wNAFCachedUnsafe(this,w,h.normalizeZ);let{k1neg:E,k1:I,k2neg:_,k2:A}=m.splitScalar(w),P=v,y=v,O=this;for(;I>Aa||A>Aa;)I&Ur&&(P=P.add(O)),A&Ur&&(y=y.add(O)),O=O.double(),I>>=Ur,A>>=Ur;return E&&(P=P.negate()),_&&(y=y.negate()),y=new h(r.mul(y.px,m.beta),y.py,y.pz),P.add(y)}multiply(w){const{endo:m,n:b}=e;ou("scalar",w,Ur,b);let v,E;if(m){const{k1neg:I,k1:_,k2neg:A,k2:P}=m.splitScalar(w);let{p:y,f:O}=this.wNAF(_),{p:S,f:k}=this.wNAF(P);y=g.constTimeNegate(I,y),S=g.constTimeNegate(A,S),S=new h(r.mul(S.px,m.beta),S.py,S.pz),v=y.add(S),E=O.add(k)}else{const{p:I,f:_}=this.wNAF(w);v=I,E=_}return h.normalizeZ([v,E])[0]}multiplyAndAddUnsafe(w,m,b){const v=h.BASE,E=(_,A)=>A===Aa||A===Ur||!_.equals(v)?_.multiplyUnsafe(A):_.multiply(A),I=E(this,m).add(E(w,b));return I.is0()?void 0:I}toAffine(w){return u(this,w)}isTorsionFree(){const{h:w,isTorsionFree:m}=e;if(w===Ur)return!0;if(m)return m(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:w,clearCofactor:m}=e;return w===Ur?this:m?m(h,this):this.multiplyUnsafe(e.h)}toRawBytes(w=!0){return jh("isCompressed",w),this.assertValidity(),i(h,this,w)}toHex(w=!0){return jh("isCompressed",w),zh(this.toRawBytes(w))}}h.BASE=new h(e.Gx,e.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const f=e.nBitLength,g=nde(h,e.endo?Math.ceil(f/2):f);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:a}}function ude(t){const e=mk(t);return Lp(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function dde(t){const e=ude(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(T){return ni(T,n)}function a(T){return W4(T,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:u,isWithinCurveOrder:d}=lde({...e,toBytes(T,C,x){const B=C.toAffine(),R=r.toBytes(B.x),M=z1;return jh("isCompressed",x),x?M(Uint8Array.from([C.hasEvenY()?2:3]),R):M(Uint8Array.from([4]),R,r.toBytes(B.y))},fromBytes(T){const C=T.length,x=T[0],B=T.subarray(1);if(C===i&&(x===2||x===3)){const R=su(B);if(!pm(R,Ur,r.ORDER))throw new Error("Point is not on curve");const M=u(R);let U;try{U=r.sqrt(M)}catch(Y){const V=Y instanceof Error?": "+Y.message:"";throw new Error("Point is not on curve"+V)}const z=(U&Ur)===Ur;return(x&1)===1!==z&&(U=r.neg(U)),{x:R,y:U}}else if(C===s&&x===4){const R=r.fromBytes(B.subarray(0,r.BYTES)),M=r.fromBytes(B.subarray(r.BYTES,2*r.BYTES));return{x:R,y:M}}else{const R=i,M=s;throw new Error("invalid Point, expected length of "+R+", or uncompressed "+M+", got "+C)}}}),h=T=>zh(qh(T,e.nByteLength));function f(T){const C=n>>Ur;return T>C}function g(T){return f(T)?o(-T):T}const p=(T,C,x)=>su(T.slice(C,x));class w{constructor(C,x,B){this.r=C,this.s=x,this.recovery=B,this.assertValidity()}static fromCompact(C){const x=e.nByteLength;return C=Us("compactSignature",C,x*2),new w(p(C,0,x),p(C,x,2*x))}static fromDER(C){const{r:x,s:B}=_a.toSig(Us("DER",C));return new w(x,B)}assertValidity(){ou("r",this.r,Ur,n),ou("s",this.s,Ur,n)}addRecoveryBit(C){return new w(this.r,this.s,C)}recoverPublicKey(C){const{r:x,s:B,recovery:R}=this,M=_(Us("msgHash",C));if(R==null||![0,1,2,3].includes(R))throw new Error("recovery id invalid");const U=R===2||R===3?x+e.n:x;if(U>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const z=(R&1)===0?"02":"03",H=c.fromHex(z+h(U)),Y=a(U),V=o(-M*Y),G=o(B*Y),re=c.BASE.multiplyAndAddUnsafe(H,V,G);if(!re)throw new Error("point at infinify");return re.assertValidity(),re}hasHighS(){return f(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return Fh(this.toDERHex())}toDERHex(){return _a.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Fh(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const m={isValidPrivateKey(T){try{return l(T),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const T=pk(e.n);return ede(e.randomBytes(T),e.n)},precompute(T=8,C=c.BASE){return C._setWindowSize(T),C.multiply(BigInt(3)),C}};function b(T,C=!0){return c.fromPrivateKey(T).toRawBytes(C)}function v(T){const C=vu(T),x=typeof T=="string",B=(C||x)&&T.length;return C?B===i||B===s:x?B===2*i||B===2*s:T instanceof c}function E(T,C,x=!0){if(v(T))throw new Error("first arg must be private key");if(!v(C))throw new Error("second arg must be public key");return c.fromHex(C).multiply(l(T)).toRawBytes(x)}const I=e.bits2int||function(T){if(T.length>8192)throw new Error("input is too large");
92const C=su(T),x=T.length*8-e.nBitLength;return x>0?C>>BigInt(x):C},_=e.bits2int_modN||function(T){return o(I(T))},A=s8(e.nBitLength);function P(T){return ou("num < 2^"+e.nBitLength,T,Aa,A),qh(T,e.nByteLength)}function y(T,C,x=O){if(["recovered","canonical"].some(ce=>ce in x))throw new Error("sign() legacy options not supported");const{hash:B,randomBytes:R}=e;let{lowS:M,prehash:U,extraEntropy:z}=x;M==null&&(M=!0),T=Us("msgHash",T),Sx(x),U&&(T=Us("prehashed msgHash",B(T)));const H=_(T),Y=l(C),V=[P(Y),P(H)];if(z!=null&&z!==!1){const ce=z===!0?R(r.BYTES):z;V.push(Us("extraEntropy",ce))}const G=z1(...V),re=H;function de(ce){const ae=I(ce);if(!d(ae))return;const be=a(ae),Ce=c.BASE.multiply(ae).toAffine(),ze=o(Ce.x);if(ze===Aa)return;const Qe=o(be*o(re+ze*Y));if(Qe===Aa)return;let vt=(Ce.x===ze?0:2)|Number(Ce.y&Ur),Qt=Qe;return M&&f(Qe)&&(Qt=g(Qe),vt^=1),new w(ze,Qt,vt)}return{seed:G,k2sig:de}}const O={lowS:e.lowS,prehash:!1},S={lowS:e.lowS,prehash:!1};function k(T,C,x=O){const{seed:B,k2sig:R}=y(T,C,x),M=e;return uk(M.hash.outputLen,M.nByteLength,M.hmac)(B,R)}c.BASE._setWindowSize(8);function L(T,C,x,B=S){var vt;const R=T;C=Us("msgHash",C),x=Us("publicKey",x);const{lowS:M,prehash:U,format:z}=B;if(Sx(B),"strict"in B)throw new Error("options.strict was renamed to lowS");if(z!==void 0&&z!=="compact"&&z!=="der")throw new Error("format must be compact or der");const H=typeof R=="string"||vu(R),Y=!H&&!z&&typeof R=="object"&&R!==null&&typeof R.r=="bigint"&&typeof R.s=="bigint";if(!H&&!Y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let V,G;try{if(Y&&(V=new w(R.r,R.s)),H){try{z!=="compact"&&(V=w.fromDER(R))}catch(Qt){if(!(Qt instanceof _a.Err))throw Qt}!V&&z!=="der"&&(V=w.fromCompact(R))}G=c.fromHex(x)}catch{return!1}if(!V||M&&V.hasHighS())return!1;U&&(C=e.hash(C));const{r:re,s:de}=V,ce=_(C),ae=a(de),be=o(ce*ae),Ce=o(re*ae),ze=(vt=c.BASE.multiplyAndAddUnsafe(G,be,Ce))==null?void 0:vt.toAffine();return ze?o(ze.x)===re:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:E,sign:k,verify:L,ProjectivePoint:c,Signature:w,utils:m}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hde(t){return{hash:t,hmac:(e,...r)=>ck(t,e,hue(...r)),randomBytes:fue}}function fde(t,e){const r=n=>dde({...t,...hde(n)});return{...r(e),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const yk=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),$x=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),pde=BigInt(1),K4=BigInt(2),Ax=(t,e)=>(t+e/K4)/e;function gde(t){const e=yk,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,d=Qi(u,r,e)*u%e,h=Qi(d,r,e)*u%e,f=Qi(h,K4,e)*l%e,g=Qi(f,i,e)*f%e,p=Qi(g,
92s,e)*g%e,w=Qi(p,a,e)*p%e,m=Qi(w,c,e)*w%e,b=Qi(m,a,e)*p%e,v=Qi(b,r,e)*u%e,E=Qi(v,o,e)*g%e,I=Qi(E,n,e)*l%e,_=Qi(I,K4,e);if(!Z4.eql(Z4.sqr(_),t))throw new Error("Cannot find square root");return _}const Z4=hk(yk,void 0,void 0,{sqrt:gde}),bk=fde({a:BigInt(0),b:BigInt(7),Fp:Z4,n:$x,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=$x,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-pde*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,o=BigInt("0x100000000000000000000000000000000"),a=Ax(s*t,e),c=Ax(-n*t,e);let l=ni(t-a*r-c*i,e),u=ni(-a*n-c*s,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},Bue);BigInt(0);bk.ProjectivePoint;const wde=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:bk},Symbol.toStringTag,{value:"Module"}));function vk(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function Yf(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));const r=vk(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function Ek(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Px=Ek("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),x5=Ek("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=vk(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Ck={utf8:Px,"utf-8":Px,hex:Rh.base16,latin1:x5,ascii:x5,binary:x5,...Rh};function ds(t,e="utf8"){const r=Ck[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):r.decoder.decode(`${r.prefix}${t}`)}function Oi(t,e="utf8"){const r=Ck[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var mde={};const yde=":";function bh(t){const[e,r]=t.split(yde);return{namespace:e,reference:r}}function xk(t,e){return t.includes(":")?[t]:e.chains||[]}var bde=Object.defineProperty,vde=Object.defineProperties,Ede=Object.getOwnPropertyDescriptors,Tx=Object.getOwnPropertySymbols,Cde=Object.prototype.hasOwnProperty,xde=Object.prototype.propertyIsEnumerable,Ox=(t,e,r)=>e in t?bde(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Nx=(t,e)=>{for(var r in e||(e={}))Cde.call(e,r)&&Ox(t,r,e[r]);if(Tx)for(var r of Tx(e))xde.call(e,r)&&Ox(t,r,e[r]);return t},_de=(t,e)=>vde(t,Ede(e));const Sde="ReactNative",Ti={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Ide="js";function ew(){return typeof sr<"u"&&typeof sr.versions<"u"&&typeof sr.versions.node<"u"}function ul(){return!Zr.getDocument()&&!!Zr.getNavigator()&&navigator.product===Sde}function $de(){return ul()&&typeof he<"u"&&typeof(he==null?void 0:he.Platform)<"u"&&(he==null?void 0:he.Platform.OS)==="android"}function Ade(){return ul()&&typeof he<"u"&&typeof(he==null?void 0:he.Platform)<"u"&&(he==null?void 0:he.Platform.OS)==="ios"}function R0(){return!ew()&&!!Zr.getNavigator()&&!!Zr.getDocument()}function Mp(){return ul()?Ti.reactNative:ew()?Ti.node:R0()?Ti.browser:Ti.unknown}function kx(){var t;try{return ul()&&typeof he<"u"&&typeof(he==null?void 0:he.Application)<"u"?(t=he.Application)==null?void 0:t.applicationId:void 0}catch{return}}function Pde(t,e){const r=new URLSearchParams(t);for(const n of Object.keys(e).sort())if(e.hasOwnProperty(n)){const i=e[n];i!==void 0&&r.set(n,i)}return r.toString()}function Tde(t){var e,r;const n=_k();try{return t!=null&&t.url&&n.url&&new URL(t.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),t.url=n.url),(e=t==null?void 0:t.icons)!=null&&e.length&&t.icons.length>0&&(t.icons=t.icons.filter(i=>i!=="")),_de(Nx(Nx({},n),t),{url:(t==null?void 0:t.url)||n.url,name:(t==null?void 0:t.name)||n.name,description:(t==null?void 0:t.description)||n.description,icons:(r=t==null?void 0:t.icons)!=null&&r.length&&t.icons.length>0?t.icons:n.icons})}catch(i){return console.warn("Error populating app metadata",i),t||n}}function _k(){return _P.getWindowMetadata()||{name:"",description:"",url:"",icons:[""]}}function Ode(){if(Mp()===Ti.reactNative&&typeof he<"u"&&typeof(he==null?void 0:he.Platform)<"u"){const{OS:r,Version:n}=he.Platform;return[r,n].join("-")}const t=vP();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function Nde(){var t;const e=Mp();return e===Ti.browser?[e,((t=Zr.getLocation())==null?void 0:t.host)||"unknown"].join(":"):e}function Sk(t,e,r){const n=Ode(),i=Nde();return[[t,e].join("-"),[Ide,r].join("-"),n,i].join("/")}function kde({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a,packageName:c}){const l=r.split("?"),u=Sk(t,e,n),d={auth:i,ua:u,projectId:s,useOnCloseEvent:o,packageName:c||void 0,bundleId:a||void 0},h=Pde(l[1]||"",d);return l[0]+"?"+h}function Xl(t,e){return t.filter(r=>e.includes(r)).length===t.length}function G4(t){return Object.fromEntries(t.entries())}function Y4(t){return new Map(Object.entries(t))}function Ol(t=X.FIVE_MINUTES,e){const r=X.toMiliseconds(t||X.FIVE_MINUTES);let n,i,s,o;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a),o=Promise.resolve(a))},reject:a=>
vendor: 5,131 bytes, line 92
92{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,c)=>{if(o)return a(o);s=setTimeout(()=>{const l=new Error(e);o=Promise.reject(l),c(l)},r),n=a,i=c})}}function qc(t,e,r){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(r)),e);try{const o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function Ik(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function Rde(t){return Ik("topic",t)}function Bde(t){return Ik("id",t)}function $k(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function Ar(t,e){return X.fromMiliseconds(Date.now()+X.toMiliseconds(t))}function Lc(t){return Date.now()>=X.toMiliseconds(t)}function _t(t,e){return`${t}${e?`:${e}`:""}`}function Do(t=[],e=[]){return[...new Set([...t,...e])]}async function Dde({id:t,topic:e,wcDeepLink:r}){var n;try{if(!r)return;const i=typeof r=="string"?JSON.parse(r):r,s=i==null?void 0:i.href;if(typeof s!="string")return;const o=Lde(s,t,e),a=Mp();if(a===Ti.browser){if(!((n=Zr.getDocument())!=null&&n.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}Mde(o)}else a===Ti.reactNative&&typeof(he==null?void 0:he.Linking)<"u"&&await he.Linking.openURL(o)}catch(i){console.error(i)}}function Lde(t,e,r){const n=`requestId=${e}&sessionTopic=${r}`;t.endsWith("/")&&(t=t.slice(0,-1));let i=`${t}`;if(t.startsWith("https://t.me")){const s=t.includes("?")?"&startapp=":"?startapp=";i=`${i}${s}${Fde(n,!0)}`}else i=`${i}/wc?${n}`;return i}function Mde(t){let e="_self";zde()?e="_top":(jde()||t.startsWith("https://")||t.startsWith("http://"))&&(e="_blank"),window.open(t,e,"noreferrer noopener")}async function Ude(t,e){let r="";try{if(R0()&&(r=localStorage.getItem(e),r))return r;r=await t.getItem(e)}catch(n){console.error(n)}return r}function Rx(t,e){if(!t.includes(e))return null;const r=t.split(/([&,?,=])/),n=r.indexOf(e);return r[n+2]}function Bx(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function o8(){return typeof sr<"u"&&mde.IS_VITEST==="true"}function jde(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function zde(){try{return window.self!==window.top}catch{return!1}}function Fde(t,e=!1){const r=Oe.from(t).toString("base64");return e?r.replace(/[=]/g,""):r}function Ak(t){return Oe.from(t,"base64").toString("utf-8")}function qde(t){return new Promise(e=>setTimeout(e,t))}function F1(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Hde(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Up(t,...e){if(!Hde(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function a8(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");F1(t.outputLen),F1(t.blockLen)}function Hh(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Pk(t,e){Up(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const qg=BigInt(2**32-1),Dx=BigInt(32);function Vde(t,e=!1){return e?{h:Number(t&qg),l:Number(t>>Dx&qg)}:{h:Number(t>>Dx&qg)|0,l:Number(t&qg)|0}}function Wde(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=Vde(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}const Kde=(t,e,r)=>t<<r|e>>>32-r,Zde=(t,e,r)=>e<<r|t>>>32-r,Gde=(t,e,r)=>e<<r-32|t>>>64-r,Yde=(t,e,r)=>t<<r-32|e>>>64-r,Md=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Jde(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function _5(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function go(t,e){return t<<32-e|t>>>e}const Lx=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Xde(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function Mx(t){for(let e=0;e<t.length;e++)t[e]=Xde(t[e])}function Qde(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function Vh(t){return typeof t=="string"&&(t=Qde(t)),Up(t),t}function ehe(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Up(i),e+=i.length}
92const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let c8=class{clone(){return this._cloneInto()}};function Tk(t){const e=n=>t().update(Vh(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function B0(t=32){if(Md&&typeof Md.getRandomValues=="function")return Md.getRandomValues(new Uint8Array(t));if(Md&&typeof Md.randomBytes=="function")return Md.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}const Ok=[],Nk=[],kk=[],the=BigInt(0),df=BigInt(1),rhe=BigInt(2),nhe=BigInt(7),ihe=BigInt(256),she=BigInt(113);for(let t=0,e=df,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],Ok.push(2*(5*n+r)),Nk.push((t+1)*(t+2)/2%64);let i=the;for(let s=0;s<7;s++)e=(e<<df^(e>>nhe)*she)%ihe,e&rhe&&(i^=df<<(df<<BigInt(s))-df);kk.push(i)}const[ohe,ahe]=Wde(kk,!0),Ux=(t,e,r)=>r>32?Gde(t,e,r):Kde(t,e,r),jx=(t,e,r)=>r>32?Yde(t,e,r):Zde(t,e,r);function che(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=Ux(l,u,1)^r[a],h=jx(l,u,1)^r[a+1];for(let f=0;f<50;f+=10)t[o+f]^=d,t[o+f+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=Nk[o],c=Ux(i,s,a),l=jx(i,s,a),u=Ok[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=ohe[n],t[1]^=ahe[n]}r.fill(0)}let lhe=class Rk extends c8{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,F1(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Jde(this.state)}keccak(){Lx||Mx(this.state32),che(this.state32,this.rounds),Lx||Mx(this.state32),this.posOut=0,this.pos=0}update(e){Hh(this);const{blockLen:r,state:n}=this;e=Vh(e);const i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Hh(this,!1),Up(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return F1(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Pk(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new Rk(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const uhe=(t,e,r)=>Tk(()=>new lhe(e,t,r)),dhe=uhe(1,136,256/8),hhe="https://rpc.walletconnect.org/v1";function Bk(t){const e=`�Ethereum Signed Message:
93${t.length}`,r=new TextEncoder().encode(e+t);return"0x"+Oe.from(dhe(r)).toString("hex")}async function fhe(t,e,r,n,i,s){switch(r.t){case"eip191":return await phe(t,e,r.s);case"eip1271":return await ghe(t,e,r.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function phe(t,e,r){return(await Aue({hash:Bk(e),signature:r})).toLowerCase()===t.toLowerCase()}async function ghe(t,e,r,n,i,s){const o=bh(n);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{const a="0x1626ba7e",c="0000000000000000000000000000000000000000000000000000000000000040",l="0000000000000000000000000000000000000000000000000000000000000041",u=r.substring(2),d=Bk(e).substring(2),h=a+d+c+l+u,f=await fetch(`${s||hhe}/?chainId=${n}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:whe(),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:h},"latest"]})}),{result:g}=await f.json();return g?g.slice(0,a.length).toLowerCase()===a.toLowerCase():!1}catch(a){return console.error("isValidEip1271Signature: ",a),!1}}function whe(){return Date.now()+Math.floor(Math.random()*1e3)}function mhe(t){const e=atob(t),r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o);const n=r[0];if(n===0)throw new Error("No signatures found");const i=1+n*64;if(r.length<i)throw new Error("Transaction data too short for claimed signature count");if(r.length<100)throw new Error("Transaction too short");const s=Oe.from(t,"base64").slice(1,65);return x0.encode(s)}var yhe=Object.defineProperty,bhe=Object.defineProperties,vhe=Object.getOwnPropertyDescriptors,zx=Object.getOwnPropertySymbols,Ehe=Object.prototype.hasOwnProperty,Che=Object.prototype.propertyIsEnumerable,Fx=(t,e,r)=>e in t?yhe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xhe=(t,e)=>{for(var r in e||(e={}))Ehe.call(e,r)&&Fx(t,r,e[r]);if(zx)for(var r of zx(e))Che.call(e,r)&&Fx(t,r,e[r]);return t},_he=(t,e)=>bhe(t,vhe(e));const She="did:pkh:",l8=t=>t==null?void 0:t.split(":"),Ihe=t=>{const e=t&&l8(t);if(e)return t.includes(She)?e[3]:e[1]},J4=t=>{const e=t&&l8(t);if(e)return e[2]+":"+e[3]},tw=t=>{const e=t&&l8(t);if(e)return e.pop()};async function qx(t){const{cacao:e,projectId:r}=t,{s:n,p:i}=e,s=Dk(i,i.iss),o=tw(i.iss);return await fhe(o,s,n,J4(i.iss),r)}const Dk=(t,e)=>{const r=`${t.domain} wants you to sign in with your Ethereum account:`,n=tw(e);if(!t.aud&&!t.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=t.statement||void 0;const s=`URI: ${t.aud||t.uri}`,o=`Version: ${t.version}`,a=`Chain ID: ${Ihe(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,u=t.exp?`Expiration Time: ${t.exp}`:void 0,d=t.nbf?`Not Before: ${t.nbf}`:void 0,h=t.requestId?`Request ID: ${t.requestId}`:void 0,f=t.resources?`Resources:${t.resources.map(p=>`
94- ${p}`).join("")}`:void 0,g=y2(t.resources);if(g){const p=q1(g);
vendor: 12,775 bytes, lines 94-95
94i=Bhe(i,p)}return[r,n,"",i,"",s,o,a,c,l,u,d,h,f].filter(p=>p!=null).join(`
95`)};function $he(t){return Oe.from(JSON.stringify(t)).toString("base64")}function Ahe(t){return JSON.parse(Oe.from(t,"base64").toString("utf-8"))}function Eu(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");const e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(r=>{const n=t.att[r];if(Array.isArray(n))throw new Error(`Resource must be an object: ${r}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(n).forEach(i=>{const s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function Phe(t,e,r,n={}){return r==null||r.sort((i,s)=>i.localeCompare(s)),{att:{[t]:The(e,r,n)}}}function The(t,e,r={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const n=e.map(i=>({[`${t}/${i}`]:[r]}));return Object.assign({},...n)}function Lk(t){return Eu(t),`urn:recap:${$he(t).replace(/=/g,"")}`}function q1(t){const e=Ahe(t.replace("urn:recap:",""));return Eu(e),e}function Ohe(t,e,r){const n=Phe(t,e,r);return Lk(n)}function Nhe(t){return t&&t.includes("urn:recap:")}function khe(t,e){const r=q1(t),n=q1(e),i=Rhe(r,n);return Lk(i)}function Rhe(t,e){Eu(t),Eu(e);const r=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return r.forEach(i=>{var s,o;Object.keys(((s=t.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;n.att[i]=_he(xhe({},n.att[i]),{[a]:((c=t.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),n}function Bhe(t="",e){Eu(e);const r="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(r))return t;const n=[];let i=0;Object.keys(e.att).forEach(a=>{const c=Object.keys(e.att[a]).map(d=>({ability:d.split("/")[0],action:d.split("/")[1]}));c.sort((d,h)=>d.action.localeCompare(h.action));const l={};c.forEach(d=>{l[d.ability]||(l[d.ability]=[]),l[d.ability].push(d.action)});const u=Object.keys(l).map(d=>(i++,`(${i}) '${d}': '${l[d].join("', '")}' for '${a}'.`));n.push(u.join(", ").replace(".,","."))});const s=n.join(" "),o=`${r}${s}`;return`${t?t+" ":""}${o}`}function Hx(t){var e;const r=q1(t);Eu(r);const n=(e=r.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function Vx(t){const e=q1(t);Eu(e);const r=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&r.push(i[0].chains)})}),[...new Set(r.flat())]}function y2(t){if(!t)return;const e=t==null?void 0:t[t.length-1];return Nhe(e)?e:void 0}function S5(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Mk(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Ii(t,...e){if(!Mk(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Wx(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Dhe(t,e){Ii(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Kx(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}const Kc=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Lhe=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Mhe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Mhe)throw new Error("Non little-endian hardware is not supported");function Uhe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function X4(t){if(typeof t=="string")t=Uhe(t);else if(Mk(t))t=Q4(t);else throw new Error("Uint8Array expected, got "+typeof t);return t}function jhe(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function zhe(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}const Fhe=(t,e)=>{function r(n,...i){if(Ii(n),t.nonceLength!==void 0){const l=i[0];if(!l)throw new Error("nonce / iv required");t.varSizeNonce?Ii(l):Ii(l,t.nonceLength)}const s=t.tagLength;s&&i[1]!==void 0&&Ii(i[1]);const o=e(n,...i),a=(l,u)=>{if(u!==void 0){if(l!==2)throw new Error("cipher output not supported");Ii(u)}};let c=!1;return{encrypt(l,u){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,Ii(l),a(o.encrypt.length,u),o.encrypt(l,u)},decrypt(l,u){if(Ii(l),s&&l.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return a(o.decrypt.length,u),o.decrypt(l,u)}}}return Object.assign(r,t),r};function Zx(t,e,r=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(r&&!qhe(e))throw new Error("invalid output, must be aligned");return e}function Gx(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s);t.setUint32(e+4,o,n),t.setUint32(e+0,a,n)}function qhe(t){return t.byteOffset%4===0}function Q4(t){return Uint8Array.from(t)}function Wh(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}const Uk=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),Hhe=Uk("expand 16-byte k"),Vhe=Uk("expand 32-byte k"),Whe=Kc(Hhe),Khe=Kc(Vhe);function ht(t,e){return t<<e|t>>>32-e}function e6(t){return t.byteOffset%4===0}const Hg=64,Zhe=16,jk=2**32-1,Yx=new Uint32Array;function Ghe(t,e,r,n,i,s,o,a){const c=i.length,l=new Uint8Array(Hg),u=Kc(l),d=e6(i)&&e6(s),h=d?Kc(i):Yx,f=d?Kc(s):Yx;for(let g=0;g<c;o++){if(t(e,r,n,u,o,a),o>=jk)throw new Error("arx: counter overflow");const p=Math.min(Hg,c-g);if(d&&p===Hg){const w=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let m=0,b;m<Zhe;m++)b=w+m,f[b]=h[b]^u[m];g+=Hg;continue}for(let w=0,m;w<p;w++)m=g+w,s[m]=i[m]^l[w];g+=p}}function Yhe(t,e){const{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=jhe({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!="function")throw new Error("core must be a function");return S5(i),S5(o),Kx(s),Kx(r),(a,c,l,u,d=0)=>{Ii(a),Ii(c),Ii(l);const h=l.length;if(u===void 0&&(u=new Uint8Array(h)),Ii(u),S5(d),d<0||d>=jk)throw new Error("arx: counter overflow");if(u.length<h)throw new Error(`arx: output (${u.length}) is shorter than data (${h})`);const f=[];let g=a.length,p,w;if(g===32)f.push(p=Q4(a)),w=Khe;else if(g===16&&r)p=new Uint8Array(32),p.set(a),p.set(a,16),w=Whe,f.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${g}`);e6(c)||f.push(c=Q4(c));const m=Kc(p);if(n){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");n(w,m,Kc(c.subarray(0,16)),m),c=c.subarray(16)}const b=16-i;if(b!==c.length)throw new Error(`arx: nonce must be ${b} or 16 bytes`);if(b!==12){const E=new Uint8Array(12);E.set(c,s?0:12-c.length),c=E,f.push(c)}const v=Kc(c);return Ghe(t,w,m,v,l,u,d,o),Wh(...f),u}}const tn=(t,e)=>t[e++]&255|(t[e++]&255)<<8;class Jhe{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=X4(e),Ii(e,32);const r=tn(e,0),n=tn(e,2),i=tn(e,4),s=tn(e,6),o=tn(e,8),a=tn(e,10),c=tn(e,12),l=tn(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=tn(e,16+2*u)}process(e,r,n=!1){const i=n?0:2048,{h:s,r:o}=this,a=o[0],c=o[1],l=o[2],u=o[3],d=o[4],h=o[5],f=o[6],g=o[7],p=o[8],w=o[9],m=tn(e,r+0),b=tn(e,r+2),v=tn(e,r+4),E=tn(e,r+6),I=tn(e,r+8),_=tn(e,r+10),A=tn(e,r+12),P=tn(e,r+14);let y=s[0]+(m&8191),O=s[1]+((m>>>13|b<<3)&8191),S=s[2]+((b>>>10|v<<6)&8191),k=s[3]+((v>>>7|E<<9)&8191),L=s[4]+((E>>>4|I<<12)&8191),T=s[5]+(I>>>1&8191),C=s[6]+((I>>>14|_<<2)&8191),x=s[7]+((_>>>11|A<<5)&8191),B=s[8]+((A>>>8|P<<8)&8191),R=s[9]+(P>>>5|i),M=0,U=M+y*a+O*(5*w)+S*(5*p)+k*(5*g)+L*(5*f);M=U>>>13,U&=8191,U+=T*(5*h)+C*(5*d)+x*(5*u)+B*(5*l)+R*(5*c),M+=U>>>13,U&=8191;let z=M+y*c+O*a+S*(5*w)+k*(5*p)+L*(5*g);M=z>>>13,z&=8191,z+=T*(5*f)+C*(5*h)+x*(5*d)+B*(5*u)+R*(5*l),M+=z>>>13,z&=8191;let H=M+y*l+O*c+S*a+k*(5*w)+L*(5*p);M=H>>>13,H&=8191,H+=T*(5*g)+C*(5*f)+x*(5*h)+B*(5*d)+R*(5*u),M+=H>>>13,H&=8191;let Y=M+y*u+O*l+S*c+k*a+L*(5*w);M=Y>>>13,Y&=8191,Y+=T*(5*p)+C*(5*g)+x*(5*f)+B*(5*h)+R*(5*d),M+=Y>>>13,Y&=8191;let V=M+y*d+O*u+S*l+k*c+L*a;M=V>>>13,V&=8191,V+=T*(5*w)+C*(5*p)+x*(5*g)+B*(5*f)+R*(5*h),M+=V>>>13,V&=8191;let G=M+y*h+O*d+S*u+k*l+L*c;M=G>>>13,G&=8191,G+=T*a+C*(5*w)+x*(5*p)+B*(5*g)+R*(5*f),M+=G>>>13,G&=8191;let re=M+y*f+O*h+S*d+k*u+L*l;M=re>>>13,re&=8191,re+=T*c+C*a+x*(5*w)+B*(5*p)+R*(5*g),M+=re>>>13,re&=8191;let de=M+y*g+O*f+S*h+k*d+L*u;M=de>>>13,de&=8191,de+=T*l+C*c+x*a+B*(5*w)+R*(5*p),M+=de>>>13,de&=8191;let ce=M+y*p+O*g+S*f+k*h+L*d;M=ce>>>13,ce&=8191,ce+=T*u+C*l+x*c+B*a+R*(5*w),M+=ce>>>13,ce&=8191;let ae=M+y*w+O*p+S*g+k*f+L*h;M=ae>>>13,ae&=8191,ae+=T*d+C*u+x*l+B*c+R*a,M+=ae>>>13,ae&=8191,M=(M<<2)+M|0,M=M+U|0,U=M&8191,M=M>>>13,z+=M,s[0]=U,s[1]=z,s[2]=H,s[3]=Y,s[4]=V,s[5]=G,s[6]=re,s[7]=de,s[8]=ce,s[9]=ae}finalize(){const{h:e,pad:r}=this,n=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let s=(i^1)-1;for(let a=0;a<10;a++)n[a]&=s;s=~s;for(let a=0;a<10;a++)e[a]=e[a]&s|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+r[0];e[0]=o&65535;for(let a=1;a<8;a++)o=(e[a]+r[a]|0)+(o>>>16)|0,e[a]=o&65535;Wh(n)}update(e){Wx(this);const{buffer:r,blockLen:n}=this;e=X4(e);const i=e.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);if(o===n){for(;n<=i-s;s+=n)this.process(e,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(r,0,!1),this.pos=0)}return this}destroy(){Wh(this.h,this.r,this.buffer,this.pad)}digestInto(e){Wx(this),Dhe(e,this),this.finished=!0;const{buffer:r,h:n}=this;let{pos:i}=this;if(i){for(r[i++]=1;i<16;i++)r[i]=0;this.process(r,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)e[s++]=n[o]>>>0,e[s++]=n[o]>>>8;return e}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}}function Xhe(t){const e=(n,i)=>t(i).update(X4(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}const Qhe=Xhe(t=>new Jhe(t));function e0e(t,e,r,n,i,s=20){let o=t[0],a=t[1],c=t[2],l=t[3],u=e[0],d=e[1],h=e[2],f=e[3],g=e[4],p=e[5],w=e[6],m=e[7],b=i,v=r[0],E=r[1],I=r[2],_=o,A=a,P=c,y=l,O=u,S=d,k=h,L=f,T=g,C=p,x=w,B=m,R=b,M=v,U=E,z=I;for(let Y=0;Y<s;Y+=2)_=_+O|0,R=ht(R^_,16),T=T+R|0,O=ht(O^T,12),_=_+O|0,R=ht(R^_,8),T=T+R|0,O=ht(O^T,7),A=A+S|0,M=ht(M^A,16),C=C+M|0,S=ht(S^C,12),A=A+S|0,M=ht(M^A,8),C=C+M|0,S=ht(S^C,7),P=P+k|0,U=ht(U^P,16),x=x+U|0,k=ht(k^x,12),P=P+k|0,U=ht(U^P,8),x=x+U|0,k=ht(k^x,7),y=y+L|0,z=ht(z^y,16),B=B+z|0,L=ht(L^B,12),y=y+L|0,z=ht(z^y,8),B=B+z|0,L=ht(L^B,7),_=_+S|0,z=ht(z^_,16),x=x+z|0,S=ht(S^x,12),_=_+S|0,z=ht(z^_,8),x=x+z|0,S=ht(S^x,7),A=A+k|0,R=ht(R^A,16),B=B+R|0,k=ht(k^B,12),A=A+k|0,R=ht(R^A,8),B=B+R|0,k=ht(k^B,7),P=P+L|0,M=ht(M^P,16),T=T+M|0,L=ht(L^T,12),P=P+L|0,M=ht(M^P,8),T=T+M|0,L=ht(L^T,7),y=y+O|0,U=ht(U^y,16),C=C+U|0,O=ht(O^C,12),y=y+O|0,U=ht(U^y,8),C=C+U|0,O=ht(O^C,7);let H=0;n[H++]=o+_|0,n[H++]=a+A|0,n[H++]=c+P|0,n[H++]=l+y|0,n[H++]=u+O|0,n[H++]=d+S|0,n[H++]=h+k|0,n[H++]=f+L|0,n[H++]=g+T|0,n[H++]=p+C|0,n[H++]=w+x|0,n[H++]=m+B|0,n[H++]=b+R|0,n[H++]=v+M|0,n[H++]=E+U|0,n[H++]=I+z|0}const t0e=Yhe(e0e,{counterRight:!1,counterLength:4,allowShortKeys:!1}),r0e=new Uint8Array(16),Jx=(t,e)=>{t.update(e);const r=e.length%16;r&&t.update(r0e.subarray(r))}
95,n0e=new Uint8Array(32);function Xx(t,e,r,n,i){const s=t(e,r,n0e),o=Qhe.create(s);i&&Jx(o,i),Jx(o,n);const a=new Uint8Array(16),c=Lhe(a);Gx(c,0,BigInt(i?i.length:0),!0),Gx(c,8,BigInt(n.length),!0),o.update(a);const l=o.digest();return Wh(s,a),l}const i0e=t=>(e,r,n)=>({encrypt(i,s){const o=i.length;s=Zx(o+16,s,!1),s.set(i);const a=s.subarray(0,-16);t(e,r,a,a,1);const c=Xx(t,e,r,a,n);return s.set(c,o),Wh(c),s},decrypt(i,s){s=Zx(i.length-16,s,!1);const o=i.subarray(0,-16),a=i.subarray(-16),c=Xx(t,e,r,o,n);if(!zhe(a,c))throw new Error("invalid tag");return s.set(i.subarray(0,-16)),t(e,r,s,s,1),Wh(c),s}}),zk=Fhe({blockSize:64,nonceLength:12,tagLength:16},i0e(t0e));let Fk=class extends c8{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,a8(e);const n=Vh(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return Hh(this),this.iHash.update(e),this}digestInto(e){Hh(this),Up(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:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const gm=(t,e,r)=>new Fk(t,e).update(r).digest();gm.create=(t,e)=>new Fk(t,e);function s0e(t,e,r){return a8(t),r===void 0&&(r=new Uint8Array(t.outputLen)),gm(t,Vh(r),Vh(e))}const I5=new Uint8Array([0]),Qx=new Uint8Array;function o0e(t,e,r,n=32){if(a8(t),F1(n),n>255*t.outputLen)throw new Error("Length should be <= 255*HashLen");const i=Math.ceil(n/t.outputLen);r===void 0&&(r=Qx);const s=new Uint8Array(i*t.outputLen),o=gm.create(t,e),a=o._cloneInto(),c=new Uint8Array(o.outputLen);for(let l=0;l<i;l++)I5[0]=l+1,a.update(l===0?Qx:c).update(r).update(I5).digestInto(c),s.set(c,t.outputLen*l),o._cloneInto(a);return o.destroy(),a.destroy(),c.fill(0),I5.fill(0),s.slice(0,n)}const a0e=(t,e,r,n,i)=>o0e(t,s0e(t,e,r),n,i);function c0e(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function l0e(t,e,r){return t&e^~t&r}function u0e(t,e,r){return t&e^t&r^e&r}let d0e=class extends c8{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=_5(this.buffer)}update(e){Hh(this);const{view:r,buffer:n,blockLen:i}=this;e=Vh(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=_5(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Hh(this),Pk(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;c0e(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=_5(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}};const h0e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
vendor: 4,495 bytes, line 95
95734187,3204031479,3329325298]),Sc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ic=new Uint32Array(64);class f0e extends d0e{constructor(){super(64,32,8,!1),this.A=Sc[0]|0,this.B=Sc[1]|0,this.C=Sc[2]|0,this.D=Sc[3]|0,this.E=Sc[4]|0,this.F=Sc[5]|0,this.G=Sc[6]|0,this.H=Sc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)Ic[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=Ic[d-15],f=Ic[d-2],g=go(h,7)^go(h,18)^h>>>3,p=go(f,17)^go(f,19)^f>>>10;Ic[d]=p+Ic[d-7]+g+Ic[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=go(a,6)^go(a,11)^go(a,25),f=u+h+l0e(a,c,l)+h0e[d]+Ic[d]|0,g=(go(n,2)^go(n,13)^go(n,22))+u0e(n,i,s)|0;u=l,l=c,c=a,a=o+f|0,o=s,s=i,i=n,n=f+g|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){Ic.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const jp=Tk(()=>new f0e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wm=BigInt(0),mm=BigInt(1),p0e=BigInt(2);function Cu(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function zp(t){if(!Cu(t))throw new Error("Uint8Array expected")}function Kh(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}const g0e=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Zh(t){zp(t);let e="";for(let r=0;r<t.length;r++)e+=g0e[t[r]];return e}function uh(t){const e=t.toString(16);return e.length&1?"0"+e:e}function u8(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?wm:BigInt("0x"+t)}const fa={_0:48,_9:57,A:65,F:70,a:97,f:102};function e_(t){if(t>=fa._0&&t<=fa._9)return t-fa._0;if(t>=fa.A&&t<=fa.F)return t-(fa.A-10);if(t>=fa.a&&t<=fa.f)return t-(fa.a-10)}function Gh(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=e_(t.charCodeAt(s)),a=e_(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function au(t){return u8(Zh(t))}function H1(t){return zp(t),u8(Zh(Uint8Array.from(t).reverse()))}function Yh(t,e){return Gh(t.toString(16).padStart(e*2,"0"))}function ym(t,e){return Yh(t,e).reverse()}function w0e(t){return Gh(uh(t))}function Si(t,e,r){let n;if(typeof e=="string")try{n=Gh(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(Cu(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}function V1(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];zp(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}function m0e(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function y0e(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const $5=t=>typeof t=="bigint"&&wm<=t;function bm(t,e,r){return $5(t)&&$5(e)&&$5(r)&&e<=t&&t<r}function Da(t,e,r,n){if(!bm(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function qk(t){let e;for(e=0;t>wm;t>>=mm,e+=1);return e}function b0e(t,e){return t>>BigInt(e)&mm}function v0e(t,e,r){return t|(r?mm:wm)<<BigInt(e)}const d8=t=>(p0e<<BigInt(t-1))-mm,A5=t=>new Uint8Array(t),t_=t=>Uint8Array.from(t);function Hk(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=A5(t),i=A5(t),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...u)=>r(i,n,...u),c=(u=A5())=>{i=a(t_([0]),u),n=a(),u.length!==0&&(i=a(t_([1]),u),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const d=[];for(;u<e;){n=a();const h=n.slice();d.push(h),u+=n.length}return V1(...d)};return(u,d)=>{o(),c(u);let h;for(;
95!(h=d(l()));)c();return o(),h}}const E0e={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||Cu(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function D0(t,e,r={}){const n=(i,s,o)=>{const a=E0e[s];if(typeof a!="function")throw new Error("invalid validator function");const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+c)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}const C0e=()=>{throw new Error("not implemented")};function t6(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}var x0e=Object.freeze({__proto__:null,isBytes:Cu,abytes:zp,abool:Kh,bytesToHex:Zh,numberToHexUnpadded:uh,hexToNumber:u8,hexToBytes:Gh,bytesToNumberBE:au,bytesToNumberLE:H1,numberToBytesBE:Yh,numberToBytesLE:ym,numberToVarBytesBE:w0e,ensureBytes:Si,concatBytes:V1,equalBytes:m0e,utf8ToBytes:y0e,inRange:bm,aInRange:Da,bitLen:qk,bitGet:b0e,bitSet:v0e,b
vendor: 5,718 bytes, line 95
95itMask:d8,createHmacDrbg:Hk,validateObject:D0,notImplemented:C0e,memoized:t6});const Kr=BigInt(0),fr=BigInt(1),Ml=BigInt(2),_0e=BigInt(3),r6=BigInt(4),r_=BigInt(5),n_=BigInt(8);function ii(t,e){const r=t%e;return r>=Kr?r:e+r}function Vk(t,e,r){if(e<Kr)throw new Error("invalid exponent, negatives unsupported");if(r<=Kr)throw new Error("invalid modulus");if(r===fr)return Kr;let n=fr;for(;e>Kr;)e&fr&&(n=n*t%r),t=t*t%r,e>>=fr;return n}function Ls(t,e,r){let n=t;for(;e-- >Kr;)n*=n,n%=r;return n}function n6(t,e){if(t===Kr)throw new Error("invert: expected non-zero number");if(e<=Kr)throw new Error("invert: expected positive modulus, got "+e);let r=ii(t,e),n=e,i=Kr,s=fr;for(;r!==Kr;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==fr)throw new Error("invert: does not exist");return ii(i,e)}function S0e(t){const e=(t-fr)/Ml;let r,n,i;for(r=t-fr,n=0;r%Ml===Kr;r/=Ml,n++);for(i=Ml;i<t&&Vk(i,e,t)!==t-fr;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const o=(t+fr)/r6;return function(a,c){const l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error("Cannot find square root");return l}}const s=(r+fr)/Ml;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let c=n,l=o.pow(o.mul(o.ONE,i),r),u=o.pow(a,s),d=o.pow(a,r);for(;!o.eql(d,o.ONE);){if(o.eql(d,o.ZERO))return o.ZERO;let h=1;for(let g=o.sqr(d);h<c&&!o.eql(g,o.ONE);h++)g=o.sqr(g);const f=o.pow(l,fr<<BigInt(c-h-1));l=o.sqr(f),u=o.mul(u,f),d=o.mul(d,l),c=h}return u}}function I0e(t){if(t%r6===_0e){const e=(t+fr)/r6;return function(r,n){const i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(t%n_===r_){const e=(t-r_)/n_;return function(r,n){const i=r.mul(n,Ml),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,Ml),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error("Cannot find square root");return c}}return S0e(t)}const $0e=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function A0e(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=$0e.reduce((n,i)=>(n[i]="function",n),e);return D0(t,r)}function P0e(t,e,r){if(r<Kr)throw new Error("invalid exponent, negatives unsupported");if(r===Kr)return t.ONE;if(r===fr)return e;let n=t.ONE,i=e;for(;r>Kr;)r&fr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=fr;return n}function T0e(t,e){const r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function Wk(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Kk(t,e,r=!1,n={}){if(t<=Kr)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:s}=Wk(t,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:d8(i),ZERO:Kr,ONE:fr,create:c=>ii(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Kr<=c&&c<t},is0:c=>c===Kr,isOdd:c=>(c&fr)===fr,neg:c=>ii(-c,t),eql:(c,l)=>c===l,sqr:c=>ii(c*c,t),add:(c,l)=>ii(c+l,t),sub:(c,l)=>ii(c-l,t),mul:(c,l)=>ii(c*l,t),pow:(c,l)=>P0e(a,c,l),div:(c,l)=>ii(c*n6(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>n6(c,t),sqrt:n.sqrt||(c=>(o||(o=I0e(t)),o(a,c))),invertBatch:c=>T0e(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?ym(c,s):Yh(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?H1(c):au(c)}});return Object.freeze(a)}function Zk(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function Gk(t){const e=Zk(t);return e+Math.ceil(e/2)}function O0e(t,e,r=!1){const n=t.length,i=Zk(e),s=Gk(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?H1(t):au(t),a=ii(o,e-fr)+fr;return r?ym(a,i):Yh(a,i)}const i_=BigInt(0),Vg=BigInt(1);function P5(t,e){const r=e.negate();return t?r:e}function Yk(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function T5(t,e){Yk(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function N0e(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function k0e(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const O5=new WeakMap,Jk=new WeakMap;function N5(t){return Jk.get(t)||1}function R0e(t,e){return{constTimeNegate:P5,hasPrecomputes(r){return N5(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>i_;)n&Vg&&(i=i.add(s)),s=s.double(),n>>=Vg;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=T5(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){const{windows:s,windowSize:o}=T5(r,e);let a=t.ZERO,c=t.BASE;const l=BigInt(2**r-1),u=2**r,d=BigInt(r);for(let h=0;h<s;h++){const f=h*o;let g=Number(i&l);i>>=d,g>o&&(g-=u,i+=Vg);const p=f,w=f+Math.abs(g)-1,m=h%2!==0,b=g<0;g===0?c=c.add(P5(m,n[p])):a=a.add(P5(b,n[w]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){const{windows:o,windowSize:a}=T5(r,e),c=BigInt(2**r-1),l=2**r,u=BigInt(r);for(let d=0;d<o;d++){const h=d*a;if(i===i_)break;let f=Number(i&c);if(i>>=u,f>a&&(f-=l,i+=Vg),f===0)continue;let g=n[h+Math.abs(f)-1];f<0&&(g=g.negate()),s=s.add(g)}return s},getPrecomputes(r,n,i){let s=O5.get(n);
95return s||(s=this.precomputeWindow(n,r),r!==1&&O5.set(n,i(s))),s},wNAFCached(r,n,i){const s=N5(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=N5(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){Yk(n,e),Jk.set(r,n),O5.delete(r)}}}function B0e(t,e,r,n){if(N0e(r,t),k0e(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=t.ZERO,s=qk(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o;let u=i;for(let d=l;d>=0;d-=o){c.fill(i);for(let f=0;f<n.length;f++){const g=n[f],p=Number(g>>BigInt(d)&BigInt(a));c[p]=c[p].add(r[f])}let h=i;for(let f=c.length-1,g=i;f>0;f--)g=g.add(c[f]),h=h.add(g);if(u=u.add(h),d!==0)for(let f=0;f<o;f++)u=u.double()}return u}function Xk(t){return A0e(t.Fp),D0(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Wk(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const Ud=BigInt(0),k5=BigInt(1);function D0e(t){return D0(t,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...t})}function L0e(t){const e=D0e(t),{P:r}=e,n=b=>ii(b,r),i=e.montgomeryBits,s=Math.ceil(i/8),o=e.nByteLength,a=e.adjustScalarBytes||(b=>b),c=e.powPminus2||(b=>Vk(b,r-BigInt(2),r));function l(b,v,E){const I=n(b*(v-E));return v=n(v-I),E=n(E+I),[v,E]}const u=(e.a-BigInt(2))/BigInt(4);function d(b,v){Da("u",b,Ud,r),Da("scalar",v,Ud,r);const E=v,I=b;let _=k5,A=Ud,P=b,y=k5,O=Ud,S;for(let L=BigInt(i-1);L>=Ud;L--){const T=E>>L&k5;O^=T,S=l(O,_,P),_=S[0],P=S[1],S=l(O,A,y),A=S[0],y=S[1],O=T;const C=_+A,x=n(C*C),B=_-A,R=n(B*B),M=x-R,U=P+y,z=P-y,H=n(z*C),Y=n(U*B),V=H+Y,G=H-Y;P=n(V*V),y=n(I*n(G*G)),_=n(x*R),A=n(M*(x+n(u*M)))}S=l(O,_,P),_=S[0],P=S[1],S=l(O,A,y),A=S[0],y=S[1];const k=c(A);return n(_*k)}function h(b){return ym(n(b),s)}function f(b){const v=Si("u coordinate",b,s);return o===32&&(v[31]&=127),H1(v)}function g(b){const v=Si("scalar",b),E=v.length;if(E!==s&&E!==o){let I=""+s+" or "+o;throw new Error("invalid scalar, expected "+I+" bytes, got "+E)}return H1(a(v))}function p(b,v){const E=f(v),I=g(b),_=d(E,I);if(_===Ud)throw new Error("invalid private or public key received");return h(_)}const w=h(e.Gu);function m(b){return p(b,w)}return{scalarMult:p,scalarMultBase:m,getSharedSecret:(b,v)=>p(b,v),getPublicKey:b=>m(b),utils:{randomPrivateKey:()=>e.randomBytes(e.nByteLength)},GuBytes:w}}const i6=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949");BigInt(0);const M0e=BigInt(1),s_=BigInt(2),U0e=BigInt(3),j0e=BigInt(5);BigInt(8);function z0e(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=i6,o=t*t%s*t%s,a=Ls(o,s_,s)*o%s,c=Ls(a,M0e,s)*t%s,l=Ls(c,j0e,s)*c%s,u=Ls(l,e,s)*l%s,d=Ls(u,r,s)*u%s,h=Ls(d,n,s)*d%s,f=Ls(h,i,s)*h%s,g=Ls(f,i,s)*h%s,p=Ls(g,e,s)*l%s;return{pow_p_5_8:Ls(p,s_,s)*t%s,b2:o}}function F0e(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const s6=L0e({P:i6,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:t=>{const e=i6,{pow_p_5_8:r,b2:n}=z0e(t);return ii(Ls(r,U0e,e)*n,e)},adjustScalarBytes:F0e,randomBytes:B0});function o_(t){t.lowS!==void 0&&Kh("lowS",t.lowS),t.prehash!==void 0&&Kh("prehash",t.prehash)}function q0e(t){const e=Xk(t);D0(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:H0e,hexToBytes:V0e}=x0e;class W0e extends Error{constructor(e=""){super(e)}}const Sa={Err:W0e,_tlv:{encode:(t,e)=>{const{Err:r}=Sa;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=uh(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?uh(i.length/2|128):"";return uh(t)+s+i+e},decode(t,e){const{Err:r}=Sa;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);
vendor: 5,112 bytes, line 95
95if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=Sa;if(t<Pa)throw new e("integer: negative integers are not allowed");let r=uh(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=Sa;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return H0e(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=Sa,i=typeof t=="string"?V0e(t):t;zp(i);const{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=Sa,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},Pa=BigInt(0),jr=BigInt(1);BigInt(2);const a_=BigInt(3);BigInt(4);function K0e(t){const e=q0e(t),{Fp:r}=e,n=Kk(e.n,e.nBitLength),i=e.toBytes||((p,w,m)=>{const b=w.toAffine();return V1(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),s=e.fromBytes||(p=>{const w=p.subarray(1),m=r.fromBytes(w.subarray(0,r.BYTES)),b=r.fromBytes(w.subarray(r.BYTES,2*r.BYTES));return{x:m,y:b}});function o(p){const{a:w,b:m}=e,b=r.sqr(p),v=r.mul(b,p);return r.add(r.add(v,r.mul(p,w)),m)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function a(p){return bm(p,jr,e.n)}function c(p){const{allowedPrivateKeyLengths:w,nByteLength:m,wrapPrivateKey:b,n:v}=e;if(w&&typeof p!="bigint"){if(Cu(p)&&(p=Zh(p)),typeof p!="string"||!w.includes(p.length))throw new Error("invalid private key");p=p.padStart(m*2,"0")}let E;try{E=typeof p=="bigint"?p:au(Si("private key",p,m))}catch{throw new Error("invalid private key, expected hex or "+m+" bytes, got "+typeof p)}return b&&(E=ii(E,v)),Da("private key",E,jr,v),E}function l(p){if(!(p instanceof h))throw new Error("ProjectivePoint expected")}const u=t6((p,w)=>{const{px:m,py:b,pz:v}=p;if(r.eql(v,r.ONE))return{x:m,y:b};const E=p.is0();w==null&&(w=E?r.ONE:r.inv(v));const I=r.mul(m,w),_=r.mul(b,w),A=r.mul(v,w);if(E)return{x:r.ZERO,y:r.ZERO};if(!r.eql(A,r.ONE))throw new Error("invZ was invalid");return{x:I,y:_}}),d=t6(p=>{if(p.is0()){if(e.allowInfinityPoint&&!r.is0(p.py))return;throw new Error("bad point: ZERO")}const{x:w,y:m}=p.toAffine();if(!r.isValid(w)||!r.isValid(m))throw new Error("bad point: x or y not FE");const b=r.sqr(m),v=o(w);if(!r.eql(b,v))throw new Error("bad point: equation left != right");if(!p.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class h{constructor(w,m,b){if(this.px=w,this.py=m,this.pz=b,w==null||!r.isValid(w))throw new Error("x required");if(m==null||!r.isValid(m))throw new Error("y required");if(b==null||!r.isValid(b))throw new Error("z required");Object.freeze(this)}static fromAffine(w){const{x:m,y:b}=w||{};if(!w||!r.isValid(m)||!r.isValid(b))throw new Error("invalid affine point");if(w instanceof h)throw new Error("projective point not allowed");const v=E=>r.eql(E,r.ZERO);return v(m)&&v(b)?h.ZERO:new h(m,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){const m=r.invertBatch(w.map(b=>b.pz));return w.map((b,v)=>b.toAffine(m[v])).map(h.fromAffine)}static fromHex(w){const m=h.fromAffine(s(Si("pointHex",w)));return m.assertValidity(),m}static fromPrivateKey(w){return h.BASE.multiply(c(w))}static msm(w,m){return B0e(h,n,w,m)}_setWindowSize(w){g.setWindowSize(this,w)}assertValidity(){d(this)}hasEvenY(){const{y:w}=this.toAffine();if(r.isOdd)return!r.isOdd(w);throw new Error("Field doesn't support isOdd")}equals(w){l(w);const{px:m,py:b,pz:v}=this,{px:E,py:I,pz:_}=w,A=r.eql(r.mul(m,_),r.mul(E,v)),P=r.eql(r.mul(b,_),r.mul(I,v));return A&&P}negate(){return new h(this.px,r.neg(this.py),this.pz)}double(){const{a:w,b:m}=e,b=r.mul(m,a_),{px:v,py:E,pz:I}=this;let _=r.ZERO,A=r.ZERO,P=r.ZERO,y=r.mul(v,v),O=r.mul(E,E),S=r.mul(I,I),k=r.mul(v,E);return k=r.add(k,k),P=r.mul(v,I),P=r.add(P,P),_=r.mul(w,P),A=r.mul(b,S),A=r.add(_,A),_=r.sub(O,A),A=r.add(O,A),A=r.mul(_,A),_=r.mul(k,_),P=r.mul(b,P),S=r.mul(w,S),k=r.sub(y,S),k=r.mul(w,k),k=r.add(k,P),P=r.add(y,y),y=r.add(P,y),y=r.add(y,S),y=r.mul(y,k),A=r.add(A,y),S=r.mul(E,I),S=r.add(S,S),y=r.mul(S,k),_=r.sub(_,y),P=r.mul(S,O),P=r.add(P,P),P=r.add(P,P),new h(_,A,P)}add(w){l(w);const{px:m,py:b,pz:v}=this,{px:E,py:I,pz:_}=w;let A=r.ZERO,P=r.ZERO,y=r.ZERO;const O=e.a,S=r.mul(e.b,a_);let k=r.mul(m,E),L=r.mul(b,I),T=r.mul(v,_),C=r.add(m,b),x=r.add(E,I);C=r.mul(C,x),x=r.add(k,L),C=r.sub(C,x),x=r.add(m,v);let B=r.add(E,_);return x=r.mul(x,B),B=r.add(k,T),x=r.sub(x,B),B=r.add(b,v),A=r.add(I,_),B=r.mul(B,A),A=r.add(L,T),B=r.sub(
95B,A),y=r.mul(O,x),A=r.mul(S,T),y=r.add(A,y),A=r.sub(L,y),y=r.add(L,y),P=r.mul(A,y),L=r.add(k,k),L=r.add(L,k),T=r.mul(O,T),x=r.mul(S,x),L=r.add(L,T),T=r.sub(k,T),T=r.mul(O,T),x=r.add(x,T),k=r.mul(L,x),P=r.add(P,k),k=r.mul(B,x),A=r.mul(C,A),A=r.sub(A,k),k=r.mul(C,L),y=r.mul(B,y),y=r.add(y,k),new h(A,P,y)}subtract(w){return this.add(w.negate())}is0(){return this.equals(h.ZERO)}wNAF(w){return g.wNAFCached(this,w,h.normalizeZ)}multiplyUnsafe(w){const{endo:m,n:b}=e;Da("scalar",w,Pa,b);const v=h.ZERO;if(w===Pa)return v;if(this.is0()||w===jr)return this;if(!m||g.hasPrecomputes(this))return g.wNAFCachedUnsafe(this,w,h.normalizeZ);let{k1neg:E,k1:I,k2neg:_,k2:A}=m.splitScalar(w),P=v,y=v,O=this;for(;I>Pa||A>Pa;)I&jr&&(P=P.add(O)),A&jr&&(y=y.add(O)),O=O.double(),I>>=jr,A>>=jr;return E&&(P=P.negate()),_&&(y=y.negate()),y=new h(r.mul(y.px,m.beta),y.py,y.pz),P.add(y)}multiply(w){const{endo:m,n:b}=e;Da("scalar",w,jr,b);let v,E;if(m){const{k1neg:I,k1:_,k2neg:A,k2:P}=m.splitScalar(w);let{p:y,f:O}=this.wNAF(_),{p:S,f:k}=this.wNAF(P);y=g.constTimeNegate(I,y),S=g.constTimeNegate(A,S),S=new h(r.mul(S.px,m.beta),S.py,S.pz),v=y.add(S),E=O.add(k)}else{const{p:I,f:_}=this.wNAF(w);v=I,E=_}return h.normalizeZ([v,E])[0]}multiplyAndAddUnsafe(w,m,b){const v=h.BASE,E=(_,A)=>A===Pa||A===jr||!_.equals(v)?_.multiplyUnsafe(A):_.multiply(A),I=E(this,m).add(E(w,b));return I.is0()?void 0:I}toAffine(w){return u(this,w)}isTorsionFree(){const{h:w,isTorsionFree:m}=e;if(w===jr)return!0;if(m)return m(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:w,clearCofactor:m}=e;return w===jr?this:m?m(h,this):this.multiplyUnsafe(e.h)}toRawBytes(w=!0){return Kh("isCompressed",w),this.assertValidity(),i(h,this,w)}toHex(w=!0){return Kh("isCompressed",w),Zh(this.toRawBytes(w))}}h.BASE=new h(e.Gx,e.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const f=e.nBitLength,g=R0e(h,e.endo?Math.ceil(f/2):f);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:a}}function Z0e(t){const e=Xk(t);return D0(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function G0e(t){const e=Z0e(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(T){return ii(T,n)}function a(T){return n6(T,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:u,isWithinCurveOrder:d}=K0e({...e,toBytes(T,C,x){const B=C.toAffine(),R=r.toBytes(B.x),M=V1;return Kh("isCompressed",x),x?M(Uint8Array.from([C.hasEvenY()?2:3]),R):M(Uint8Array.from([4]),R,r.toBytes(B.y))},fromBytes(T){const C=T.length,x=T[0],B=T.subarray(1);if(C===i&&(x===2||x===3)){const R=au(B);if(!bm(R,jr,r.ORDER))throw new Error("Point is not on curve");const M=u(R);let U;try{U=r.sqrt(M)}catch(H){const Y=H instanceof Error?": "+H.message:"";throw new Error("Point is not on curve"+Y)}const z=(U&jr)===jr;return(x&1)===1!==z&&(U=r.neg(U)),{x:R,y:U}}else if(C===s&&x===4){const R=r.fromBytes(B.subarray(0,r.BYTES)),M=r.fromBytes(B.subarray(r.BYTES,2*r.BYTES));return{x:R,y:M}}else{const R=i,M=s;throw new Error("invalid Point, expected length of "+R+", or uncompressed "+M+", got "+C)}}}),h=T=>Zh(Yh(T,e.nByteLength));function f(T){const C=n>>jr;return T>C}function g(T){return f(T)?o(-T):T}const p=(T,C,x)=>au(T.slice(C,x));class w{constructor(C,x,B){this.r=C,this.s=x,this.recovery=B,this.assertValidity()}static fromCompact(C){const x=e.nByteLength;return C=Si("compactSignature",C,x*2),new w(p(C,0,x),p(C,x,2*x))}static fromDER(C){const{r:x,s:B}=Sa.toSig(Si("DER",C));return new w(x,B)}assertValidity(){Da("r",this.r,jr,n),Da("s",this.s,jr,n)}addRecoveryBit(C){return new w(this.r,this.s,C)}recoverPublicKey(C){const{r:x,s:B,recovery:R}=this,M=_(Si("msgHash",C));if(R==null||![0,1,2,3].includes(R))throw new Error("recovery id invalid");const U=R===2||R===3?x+e.n:x;if(U>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const z=(R&1)===0?"02":"03",H=c.fromHex(z+h(U)),Y=a(U),V=o(-M*Y),G=o(B*Y),re=c.BASE.multiplyAndAddUnsafe(H,V,G);if(!re)throw new Error("point at infinify");return re.assertValidity(),re}hasHighS(){return f(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return Gh(this.toDERHex())}toDERHex(){return Sa.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Gh(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const m={isValidPrivateKey(T){try{return l(T),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const T=Gk(e.n);return O0e(e.randomBytes(T),e.n)},precompute(T=8,C=c.BASE){return C._setWindowSize(T),C.multiply(BigInt(3)),C}};function b(T,C=!0){return c.fromPrivateKey(T).toRawBytes(C)}function v(T){const C=Cu(T),x=typeof T=="string",B=(C||x)&&T.length;return C?B===i||B===s:x?B===2*i||B===2*s:T instanceof c}function E(T,C,x=!0){if(v(T))throw new Error("first arg must be private key");if(!v(C))throw new Error("second arg must be public key");return c.fromHex(C).multiply(l(T)).toRawBytes(x)}const I=e.bits2int||function(T){if(T.length>8192)throw new Error("input is too large");
vendor: 5,050 bytes, line 95
95const C=au(T),x=T.length*8-e.nBitLength;return x>0?C>>BigInt(x):C},_=e.bits2int_modN||function(T){return o(I(T))},A=d8(e.nBitLength);function P(T){return Da("num < 2^"+e.nBitLength,T,Pa,A),Yh(T,e.nByteLength)}function y(T,C,x=O){if(["recovered","canonical"].some(ce=>ce in x))throw new Error("sign() legacy options not supported");const{hash:B,randomBytes:R}=e;let{lowS:M,prehash:U,extraEntropy:z}=x;M==null&&(M=!0),T=Si("msgHash",T),o_(x),U&&(T=Si("prehashed msgHash",B(T)));const H=_(T),Y=l(C),V=[P(Y),P(H)];if(z!=null&&z!==!1){const ce=z===!0?R(r.BYTES):z;V.push(Si("extraEntropy",ce))}const G=V1(...V),re=H;function de(ce){const ae=I(ce);if(!d(ae))return;const be=a(ae),Ce=c.BASE.multiply(ae).toAffine(),ze=o(Ce.x);if(ze===Pa)return;const Qe=o(be*o(re+ze*Y));if(Qe===Pa)return;let vt=(Ce.x===ze?0:2)|Number(Ce.y&jr),Qt=Qe;return M&&f(Qe)&&(Qt=g(Qe),vt^=1),new w(ze,Qt,vt)}return{seed:G,k2sig:de}}const O={lowS:e.lowS,prehash:!1},S={lowS:e.lowS,prehash:!1};function k(T,C,x=O){const{seed:B,k2sig:R}=y(T,C,x),M=e;return Hk(M.hash.outputLen,M.nByteLength,M.hmac)(B,R)}c.BASE._setWindowSize(8);function L(T,C,x,B=S){var Qe;const R=T;C=Si("msgHash",C),x=Si("publicKey",x);const{lowS:M,prehash:U,format:z}=B;if(o_(B),"strict"in B)throw new Error("options.strict was renamed to lowS");if(z!==void 0&&z!=="compact"&&z!=="der")throw new Error("format must be compact or der");const H=typeof R=="string"||Cu(R),Y=!H&&!z&&typeof R=="object"&&R!==null&&typeof R.r=="bigint"&&typeof R.s=="bigint";if(!H&&!Y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let V,G;try{if(Y&&(V=new w(R.r,R.s)),H){try{z!=="compact"&&(V=w.fromDER(R))}catch(vt){if(!(vt instanceof Sa.Err))throw vt}!V&&z!=="der"&&(V=w.fromCompact(R))}G=c.fromHex(x)}catch{return!1}if(!V||M&&V.hasHighS())return!1;U&&(C=e.hash(C));const{r:re,s:de}=V,ce=_(C),ae=a(de),be=o(ce*ae),Ce=o(re*ae),ze=(Qe=c.BASE.multiplyAndAddUnsafe(G,be,Ce))==null?void 0:Qe.toAffine();return ze?o(ze.x)===re:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:E,sign:k,verify:L,ProjectivePoint:c,Signature:w,utils:m}}function Y0e(t){return{hash:t,hmac:(e,...r)=>gm(t,e,ehe(...r)),randomBytes:B0}}function J0e(t,e){const r=n=>G0e({...t,...Y0e(n)});return{...r(e),create:r}}const Qk=Kk(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),X0e=Qk.create(BigInt("-3")),Q0e=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),efe=J0e({a:X0e,b:Q0e,Fp:Qk,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},jp),eR="base10",Dn="base16",Hs="base64pad",Uc="base64url",Fp="utf8",tR=0,La=1,qp=2,tfe=0,c_=1,Jf=12,h8=32;function rfe(){const t=s6.utils.randomPrivateKey(),e=s6.getPublicKey(t);return{privateKey:Oi(t,Dn),publicKey:Oi(e,Dn)}}function o6(){const t=B0(h8);return Oi(t,Dn)}function nfe(t,e){const r=s6.getSharedSecret(ds(t,Dn),ds(e,Dn)),n=a0e(jp,r,void 0,void 0,h8);return Oi(n,Dn)}function b2(t){const e=jp(ds(t,Dn));return Oi(e,Dn)}function Ao(t){const e=jp(ds(t,Fp));return Oi(e,Dn)}function rR(t){return ds(`${t}`,eR)}function xu(t){return Number(Oi(t,eR))}function nR(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function iR(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}function ife(t){const e=rR(typeof t.type<"u"?t.type:tR);if(xu(e)===La&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?ds(t.senderPublicKey,Dn):void 0,n=typeof t.iv<"u"?ds(t.iv,Dn):B0(Jf),i=ds(t.symKey,Dn),s=zk(i,n).encrypt(ds(t.message,Fp)),o=sR({type:e,sealed:s,iv:n,senderPublicKey:r});return t.encoding===Uc?nR(o):o}function sfe(t){const e=ds(t.symKey,Dn),{sealed:r,iv:n}=W1({encoded:t.encoded,encoding:t.encoding}),i=zk(e,n).decrypt(r);if(i===null)throw new Error("Failed to decrypt");return Oi(i,Fp)}function ofe(t,e){const r=rR(qp),n=B0(Jf),i=ds(t,Fp),s=sR({type:r,sealed:i,iv:n});return e===Uc?nR(s):s}function afe(t,e){const{sealed:r}=W1({encoded:t,encoding:e});return Oi(r,Fp)}function sR(t){if(xu(t.type)===qp)return Oi(Yf([t.type,t.sealed]),Hs);if(xu(t.type)===La){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Oi(Yf([t.type,t.senderPublicKey,t.iv,t.sealed]),Hs)}return Oi(Yf([t.type,t.iv,t.sealed]),Hs)}function W1(t){const e=(t.encoding||Hs)===Uc?iR(t.encoded):t.encoded,r=ds(e,Hs),n=r.slice(tfe,c_),i=c_;if(xu(n)===La){const c=i+h8,l=c+Jf,u=r.slice(i,c),d=r.slice(c,l),h=r.slice(l);return{type:n,sealed:h,iv:d,senderPublicKey:u}}if(xu(n)===qp){const c=r.slice(i),l=B0(Jf);return{type:n,sealed:c,iv:l}}const s=i+Jf,o=r.slice(i,s),a=r.slice(s);return{type:n,sealed:a,iv:o}}function cfe(t,e){const r=W1({encoded:t,encoding:e==null?void 0:e.encoding});return oR({type:xu(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Oi(r.
95senderPublicKey,Dn):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function oR(t){const e=(t==null?void 0:t.type)||tR;if(e===La){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function l_(t){return t.type===La&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}function u_(t){return t.type===qp}function lfe(t){const e=Oe.from(t.x,"base64"),r=Oe.from(t.y,"base64");return Yf([new Uint8Array([4]),e,r])}function ufe(t,e){const[r,n,i]=t.split("."),s=Oe.from(iR(i),"base64");if(s.length!==64)throw new Error("Invalid signature length");const o=s.slice(0,32),a=s.slice(32,64),c=`${r}.${n}`,l=jp(c),u=lfe(e);if(!efe.verify(Yf([o,a]),l,u))throw new Error("Invalid signature");return kh(t).payload}const dfe="irn";function rw(t){return(t==null?void 0:t.relay)||{protocol:dfe}}function Of(t){const e=JT[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}function hfe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=t[i];r[s]=o}}),r}function d_(t){if(!t.includes("wc:")){const l=Ak(t);l!=null&&l.includes("wc:")&&(t=l)}t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=new URLSearchParams(s),a={};o.forEach((l,u)=>{a[u]=l});
95const c=typeof a.methods=="string"?a.methods.split(","):void 0;return{protocol:n,topic:ffe(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:hfe(a),methods:c,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function ffe(t){return t.startsWith("//")?t.substring(2):t}function pfe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const s=i,o=r+e+s;t[s]&&(n[o]=t[s])}),n}function h_(t){const e=new URLSearchParams,r=pfe(t.relay);Object.keys(r).sort().forEach(i=>{e.set(i,r[i])}),e.set("symKey",t.symKey),t.expiryTimestamp&&e.set("expiryTimestamp",t.expiryTimestamp.toString()),t.methods&&e.set("methods",t.methods.join(","));const n=e.toString();return`${t.protocol}:${t.topic}@${t.version}?${n}`}function Wg(t,e,r){return`${t}?wc_ev=${r}&topic=${e}`}var gfe=Object.defineProperty,wfe=Object.defineProperties,mfe=Object.getOwnPropertyDescriptors,f_=Object.getOwnPropertySymbols,yfe=Object.prototype.hasOwnProperty,bfe=Object.prototype.propertyIsEnumerable,p_=(t,e,r)=>e in t?gfe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vfe=(t,e)=>{for(var r in e||(e={}))yfe.call(e,r)&&p_(t,r,e[r]);if(f_)for(var r of f_(e))bfe.call(e,r)&&p_(t,r,e[r]);return t},Efe=(t,e)=>wfe(t,mfe(e));function L0(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function Cfe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...L0(r.accounts))}),e}function xfe(t,e){const r=[];return Object.values(t).forEach(n=>{L0(n.accounts).includes(e)&&r.push(...n.methods)}),r}function _fe(t,e){const r=[];return Object.values(t).forEach(n=>{L0(n.accounts).includes(e)&&r.push(...n.events)}),r}function vm(t){return t.includes(":")}function dh(t){return vm(t)?t.split(":")[0]:t}function g_(t){var e,r,n;const i={};if(!Gc(t))return i;for(const[s,o]of Object.entries(t)){const a=vm(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],u=dh(s);i[u]=Efe(vfe({},i[u]),{chains:Do(a,(e=i[u])==null?void 0:e.chains),methods:Do(c,(r=i[u])==null?void 0:r.methods),events:Do(l,(n=i[u])==null?void 0:n.events)})}return i}function Sfe(t){const e={};return t==null||t.forEach(r=>{var n;const[i,s]=r.split(":");e[i]||(e[i]={accounts:[],chains:[],events:[],methods:[]}),e[i].accounts.push(r),(n=e[i].chains)==null||n.push(`${i}:${s}`)}),e}function w_(t,e){e=e.map(n=>n.replace("did:pkh:",""));const r=Sfe(e);for(const[n,i]of Object.entries(r))i.methods?i.methods=Do(i.methods,t):i.methods=t,i.events=["chainChanged","accountsChanged"];return r}function Ife(t,e){var r,n,i,s,o,a;const c=g_(t),l=g_(e),u={},d=Object.keys(c).concat(Object.keys(l));for(const h of d)u[h]={chains:Do((r=c[h])==null?void 0:r.chains,(n=l[h])==null?void 0:n.chains),methods:Do((i=c[h])==null?void 0:i.methods,(s=l[h])==null?void 0:s.methods),events:Do((o=c[h])==null?void 0:o.events,(a=l[h])==null?void 0:a.events)};return u}const $fe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Afe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function pe(t,e){const{message:r,code:n}=Afe[t];return{message:e?`${r} ${e}`:r,code:n}}function kt(t,e){const{message:r,code:n}=$fe[t];return{message:e?`${r} ${e}`:r,code:n}}function Zc(t,e){return!!Array.isArray(t)}function Gc(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function on(t){return typeof t>"u"}function xr(t,e){return e&&on(t)?!0:typeof t=="string"&&!!t.trim().length}function f8(t,e){return e&&on(t)?!0:typeof t=="number"&&!isNaN(t)}function Pfe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let s=!0;return Xl(i,n)?(n.forEach(o=>{const{accounts:a,methods:c,events:l}=t.namespaces[o],u=L0(a),d=r[o];(!Xl(xk(o,d),u)||!Xl(d.methods,c)||!Xl(d.events,l))&&(s=!1)}),s):!1}function nw(t){return xr(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function Tfe(t){if(xr(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&nw(r)}}return!1}function Ofe(t){function e(r){try{return typeof new URL(r)<"u"}catch{return!1}}try{if(xr(t,!1)){if(e(t))return!0;const r=Ak(t);return e(r)}}catch{}return!1}function Nfe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function kfe(t){return t==null?void 0:t.topic}function Rfe(t,e){let r=null;return xr(t==null?void 0:t.publicKey,!1)||(r=pe("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function m_(t){let e=!0;return Zc(t)?t.length&&(e=t.every(r=>xr(r,!1))):e=!1,e}function Bfe(t,e,r){let n=null;return Zc(e)&&e.length?e.forEach(i=>
95{n||nw(i)||(n=kt("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):nw(t)||(n=kt("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Dfe(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;const o=Bfe(i,xk(i,s),`${e} ${r}`);o&&(n=o)}),n}function Lfe(t,e){let r=null;return Zc(t)?t.forEach(n=>{r||Tfe(n)||(r=kt("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=kt("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function Mfe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Lfe(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function Ufe(t,e){let r=null;return m_(t==null?void 0:t.methods)?m_(t==null?void 0:t.events)||(r=kt("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=kt("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function aR(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Ufe(n,`${e}, namespace`);i&&(r=i)}),r}function jfe(t,e,r){let n=null;if(t&&Gc(t)){const i=aR(t,e);i&&(n=i);const s=Dfe(t,e,r);s&&(n=s)}else n=pe("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function R5(t,e){let r=null;if(t&&Gc(t)){const n=aR(t,e);n&&(r=n);const i=Mfe(t,e);i&&(r=i)}else r=pe("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function cR(t){return xr(t.protocol,!0)}function zfe(t,e){let r=!1;return t?t&&Zc(t)&&t.length&&t.forEach(n=>{r=cR(n)}):r=!0,r}function Ffe(t){return typeof t=="number"}function Qn(t){return typeof t<"u"&&typeof t!==null}function qfe(t){return!(!t||typeof t!="object"||!t.code||!f8(t.code,!1)||!t.message||!xr(t.message,!1))}function Hfe(t){return!(on(t)||!xr(t.method,!1))}function Vfe(t){return!(on(t)||on(t.result)&&on(t.error)||!f8(t.id,!1)||!xr(t.jsonrpc,!1))}function Wfe(t){return!(on(t)||!xr(t.name,!1))}function y_(t,e){return!(!nw(e)||!Cfe(t).includes(e))}function Kfe(t,e,r){return xr(r,!1)?xfe(t,e).includes(r):!1}function Zfe(t,e,r){return xr(r,!1)?_fe(t,e).includes(r):!1}function b_(t,e,r){let n=null;const i=Gfe(t),s=Yfe(e),o=Object.keys(i),a=Object.keys(s),c=v_(Object.keys(t)),l=v_(Object.keys(e)),u=c.filter(d=>!l.includes(d));return u.length&&(n=pe("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
96      Required: ${u.toString()}
97      Received: ${Object.keys(e).toString()}`)),Xl(o,a)||(n=pe("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
98      Required: ${o.toString()}
99      Approved: ${a.toString()}`)),Object.keys(e).forEach(d=>{if(!d.includes(":")||n)return;const h=L0(e[d].accounts);h.includes(d)||(n=pe("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${d}
100        Required: ${d}
101        Approved: ${h.toString()}`))}),o.forEach(d=>{n||(Xl(i[d].methods,s[d].methods)?Xl(i[d].events,s[d].events)||(n=pe("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${d}`)):n=pe("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${d}`))}),n}function Gfe(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function v_(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function Yfe(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=L0(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function Jfe(t,e){return f8(t,!1)&&t<=e.max&&t>=e.min}function E_(){const t=Mp();return new Promise(e=>{switch(t){case Ti.browser:e(Xfe());break;case Ti.reactNative:e(Qfe());break;case Ti.node:e(e1e());break;default:e(!0)}})}
101function Xfe(){return R0()&&(navigator==null?void 0:navigator.onLine)}async function Qfe(){if(ul()&&typeof he<"u"&&he!=null&&he.NetInfo){const t=await(he==null?void 0:he.NetInfo.fetch());return t==null?void 0:t.isConnected}return!0}function e1e(){return!0}function t1e(t){switch(Mp()){case Ti.browser:r1e(t);break;case Ti.reactNative:n1e(t);break}}function r1e(t){!ul()&&R0()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function n1e(t){ul()&&typeof he<"u"&&he!=null&&he.NetInfo&&(he==null||he.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}function i1e(){var t;return R0()&&Zr.getDocument()?((t=Zr.getDocument())==null?void 0:t.visibilityState)==="visible":!0}const B5={};class hf{static get(e){return B5[e]}static set(e,r){B5[e]=r}static delete(e){delete B5[e]}}function s1e(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function lR(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const C_=lR("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),D5=lR("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=s1e(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),o1e={utf8:C_,"utf-8":C_,hex:Rh.base16,latin1:D5,ascii:D5,binary:D5,...Rh};function a1e(t,e="utf8"){const r=o1e[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var c1e={};const uR="wc",dR=2,a6="core",qo=`${uR}@2:${a6}:`,l1e={logger:"error"},u1e={database:":memory:"},d1e="crypto",x_="client_ed25519_seed",h1e=X.ONE_DAY,f1e="keychain",p1e="0.3",g1e="messages",w1e="0.3",__=X.SIX_HOURS,m1e="publisher",hR="irn",y1e="error",fR="wss://relay.walletconnect.org",b1e="relayer",Hr={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},v1e="_subscription",es={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},E1e=.1,c6="2.21.0",Yt={link_mode:"link_mode",relay:"relay"},v2={inbound:"inbound",outbound:"outbound"},C1e="0.3",x1e="WALLETCONNECT_CLIENT_ID",S_="WALLETCONNECT_LINK_MODE_APPS",xi={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},_1e="subscription",S1e="0.3",I1e="pairing",$1e="0.3",ff={wc_pairingDelete:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:X.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:X.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:X.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:X.ONE_DAY,prompt:!1,tag:0},res:{ttl:X.ONE_DAY,prompt:!1,tag:0}}},Ul={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Ns={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},A1e="history",P1e="0.3",T1e="expirer",is={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},O1e="0.3",N1e="verify-api",k1e="https://verify.walletconnect.com",pR="https://verify.walletconnect.org",Xf=pR,R1e=`${Xf}/v3`,B1e=[k1e,pR],D1e="echo",L1e="https://echo.walletconnect.com",Co={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},va={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},ks={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},_l={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},Sl={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"}
vendor: 6,594 bytes, line 101
101,pf={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},M1e=.1,U1e="event-client",j1e=86400,z1e="https://pulse.walletconnect.org/batch";function F1e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var p=0,w=0,m=0,b=g.length;m!==b&&g[m]===0;)m++,p++;for(var v=(b-m)*u+1>>>0,E=new Uint8Array(v);m!==b;){for(var I=g[m],_=0,A=v-1;(I!==0||_<w)&&A!==-1;A--,_++)I+=256*E[A]>>>0,E[A]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");w=_,m++}for(var P=v-w;P!==v&&E[P]===0;)P++;for(var y=c.repeat(p);P<v;++P)y+=t.charAt(E[P]);return y}function h(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var p=0;if(g[p]!==" "){for(var w=0,m=0;g[p]===c;)w++,p++;for(var b=(g.length-p)*l+1>>>0,v=new Uint8Array(b);g[p];){var E=r[g.charCodeAt(p)];if(E===255)return;for(var I=0,_=b-1;(E!==0||I<m)&&_!==-1;_--,I++)E+=a*v[_]>>>0,v[_]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");m=I,p++}if(g[p]!==" "){for(var A=b-m;A!==b&&v[A]===0;)A++;for(var P=new Uint8Array(w+(b-A)),y=w;A!==b;)P[y++]=v[A++];return P}}}function f(g){var p=h(g);if(p)return p;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:h,decode:f}}var q1e=F1e,H1e=q1e;const gR=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},V1e=t=>new TextEncoder().encode(t),W1e=t=>new TextDecoder().decode(t);class K1e{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Z1e{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return wR(this,e)}}class G1e{constructor(e){this.decoders=e}or(e){return wR(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const wR=(t,e)=>new G1e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class Y1e{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new K1e(e,r,n),this.decoder=new Z1e(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Em=({name:t,prefix:e,encode:r,decode:n})=>new Y1e(t,e,r,n),Hp=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=H1e(r,e);return Em({prefix:t,name:e,encode:n,decode:s=>gR(i(s))})},J1e=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const d=i[t[u]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|d,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},X1e=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},hn=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Em({prefix:e,name:t,encode(i){return X1e(i,n,r)},decode(i){return J1e(i,n,r,t)}}),Q1e=Em({prefix:"\0",name:"identity",encode:t=>W1e(t),decode:t=>V1e(t)});var epe=Object.freeze({__proto__:null,identity:Q1e});const tpe=hn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var rpe=Object.freeze({__proto__:null,base2:tpe});const npe=hn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var ipe=Object.freeze({__proto__:null,base8:npe});const spe=Hp({prefix:"9",name:"base10",alphabet:"0123456789"});var ope=Object.freeze({__proto__:null,base10:spe});const ape=hn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cpe=hn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var lpe=Object.freeze({__proto__:null,base16:ape,base16upper:cpe});const upe=hn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),dpe=hn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),hpe=hn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),fpe=hn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ppe=hn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),gpe=hn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),wpe=hn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),mpe=hn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ype=hn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var bpe=Object.freeze({__proto__:null,base32:upe,base32upper:dpe,base32pad:hpe,base32padupper:fpe,base32hex:ppe,base32hexupper:gpe,base32hexpad:wpe,base32hexpadupper:mpe,base32z:ype});const vpe=Hp({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Epe=Hp({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});
vendor: 5,292 bytes, line 101
101var Cpe=Object.freeze({__proto__:null,base36:vpe,base36upper:Epe});const xpe=Hp({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),_pe=Hp({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Spe=Object.freeze({__proto__:null,base58btc:xpe,base58flickr:_pe});const Ipe=hn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),$pe=hn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ape=hn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ppe=hn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Tpe=Object.freeze({__proto__:null,base64:Ipe,base64pad:$pe,base64url:Ape,base64urlpad:Ppe});const mR=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ope=mR.reduce((t,e,r)=>(t[r]=e,t),[]),Npe=mR.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function kpe(t){return t.reduce((e,r)=>(e+=Ope[r],e),"")}function Rpe(t){const e=[];for(const r of t){const n=Npe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const Bpe=Em({prefix:"🚀",name:"base256emoji",encode:kpe,decode:Rpe});var Dpe=Object.freeze({__proto__:null,base256emoji:Bpe}),Lpe=yR,I_=128,Mpe=-128,Upe=Math.pow(2,31);function yR(t,e,r){e=e||[],r=r||0;for(var n=r;t>=Upe;)e[r++]=t&255|I_,t/=128;for(;t&Mpe;)e[r++]=t&255|I_,t>>>=7;return e[r]=t|0,yR.bytes=r-n+1,e}var jpe=l6,zpe=128,$_=127;function l6(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw l6.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&$_)<<i:(o&$_)*Math.pow(2,i),i+=7}while(o>=zpe);return l6.bytes=s-n,r}var Fpe=Math.pow(2,7),qpe=Math.pow(2,14),Hpe=Math.pow(2,21),Vpe=Math.pow(2,28),Wpe=Math.pow(2,35),Kpe=Math.pow(2,42),Zpe=Math.pow(2,49),Gpe=Math.pow(2,56),Ype=Math.pow(2,63),Jpe=function(t){return t<Fpe?1:t<qpe?2:t<Hpe?3:t<Vpe?4:t<Wpe?5:t<Kpe?6:t<Zpe?7:t<Gpe?8:t<Ype?9:10},Xpe={encode:Lpe,decode:jpe,encodingLength:Jpe},bR=Xpe;const A_=(t,e,r=0)=>(bR.encode(t,e,r),e),P_=t=>bR.encodingLength(t),u6=(t,e)=>{const r=e.byteLength,n=P_(t),i=n+P_(r),s=new Uint8Array(i+r);return A_(t,s,0),A_(r,s,n),s.set(e,i),new Qpe(t,r,e,s)};class Qpe{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const vR=({name:t,code:e,encode:r})=>new ege(t,e,r);class ege{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?u6(this.code,r):r.then(n=>u6(this.code,n))}else throw Error("Unknown type, must be binary type")}}const ER=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),tge=vR({name:"sha2-256",code:18,encode:ER("SHA-256")}),rge=vR({name:"sha2-512",code:19,encode:ER("SHA-512")});var nge=Object.freeze({__proto__:null,sha256:tge,sha512:rge});const CR=0,ige="identity",xR=gR,sge=t=>u6(CR,xR(t)),oge={code:CR,name:ige,encode:xR,digest:sge};var age=Object.freeze({__proto__:null,identity:oge});new TextEncoder,new TextDecoder;const T_={...epe,...rpe,...ipe,...ope,...lpe,...bpe,...Cpe,...Spe,...Tpe,...Dpe};({...nge,...age});function cge(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function _R(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const O_=_R("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),L5=_R("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=cge(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),lge={utf8:O_,"utf-8":O_,hex:T_.base16,latin1:L5,ascii:L5,binary:L5,...T_};function uge(t,e="utf8"){const r=lge[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):r.decoder.decode(`${r.prefix}${t}`)}var dge=Object.defineProperty,hge=(t,e,r)=>e in t?dge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}
vendor: 4,614 bytes, line 101
101):t[e]=r,wo=(t,e,r)=>hge(t,typeof e!="symbol"?e+"":e,r);class fge{constructor(e,r){this.core=e,this.logger=r,wo(this,"keychain",new Map),wo(this,"name",f1e),wo(this,"version",p1e),wo(this,"initialized",!1),wo(this,"storagePrefix",qo),wo(this,"init",async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}}),wo(this,"has",n=>(this.isInitialized(),this.keychain.has(n))),wo(this,"set",async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()}),wo(this,"get",n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=pe("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i}),wo(this,"del",async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()}),this.core=e,this.logger=St(r,this.name)}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,G4(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Y4(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var pge=Object.defineProperty,gge=(t,e,r)=>e in t?pge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,rn=(t,e,r)=>gge(t,typeof e!="symbol"?e+"":e,r);class wge{constructor(e,r,n){this.core=e,this.logger=r,rn(this,"name",d1e),rn(this,"keychain"),rn(this,"randomSessionIdentifier",o6()),rn(this,"initialized",!1),rn(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),rn(this,"hasKeys",i=>(this.isInitialized(),this.keychain.has(i))),rn(this,"getClientId",async()=>{this.isInitialized();const i=await this.getClientSeed(),s=F2(i);return Nv(s.publicKey)}),rn(this,"generateKeyPair",()=>{this.isInitialized();const i=rfe();return this.setPrivateKey(i.publicKey,i.privateKey)}),rn(this,"signJWT",async i=>{this.isInitialized();const s=await this.getClientSeed(),o=F2(s),a=this.randomSessionIdentifier;return await VT(a,i,h1e,o)}),rn(this,"generateSharedKey",(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),c=nfe(a,s);return this.setSymKey(c,o)}),rn(this,"setSymKey",async(i,s)=>{this.isInitialized();const o=s||b2(i);return await this.keychain.set(o,i),o}),rn(this,"deleteKeyPair",async i=>{this.isInitialized(),await this.keychain.del(i)}),rn(this,"deleteSymKey",async i=>{this.isInitialized(),await this.keychain.del(i)}),rn(this,"encode",async(i,s,o)=>{this.isInitialized();const a=oR(o),c=zo(s);if(u_(a))return ofe(c,o==null?void 0:o.encoding);if(l_(a)){const h=a.senderPublicKey,f=a.receiverPublicKey;i=await this.generateSharedKey(h,f)}const l=this.getSymKey(i),{type:u,senderPublicKey:d}=a;return ife({type:u,symKey:l,message:c,senderPublicKey:d,encoding:o==null?void 0:o.encoding})}),rn(this,"decode",async(i,s,o)=>{this.isInitialized();const a=cfe(s,o);if(u_(a)){const c=afe(s,o==null?void 0:o.encoding);return Fa(c)}if(l_(a)){const c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(i),l=sfe({symKey:c,encoded:s,encoding:o==null?void 0:o.encoding});return Fa(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}}),rn(this,"getPayloadType",(i,s=Hs)=>{const o=W1({encoded:i,encoding:s});return xu(o.type)}),rn(this,"getPayloadSenderPublicKey",(i,s=Hs)=>{const o=W1({encoded:i,encoding:s});return o.senderPublicKey?a1e(o.senderPublicKey,Dn):void 0}),this.core=e,this.logger=St(r,this.name),this.keychain=n||new fge(this.core,this.logger)}get context(){return qt(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(x_)}catch{e=o6(),await this.keychain.set(x_,e)}return uge(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var mge=Object.defineProperty,yge=Object.defineProperties,bge=Object.getOwnPropertyDescriptors,N_=Object.getOwnPropertySymbols,vge=Object.prototype.hasOwnProperty,Ege=Object.prototype.propertyIsEnumerable,d6=(t,e,r)=>e in t?mge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cge=(t,e)=>{for(var r in e||(e={}))vge.call(e,r)&&d6(t,r,e[r]);if(N_)for(var r of N_(e))Ege.call(e,r)&&d6(t,r,e[r]);return t},xge=(t,e)=>
101yge(t,bge(e)),vi=(t,e,r)=>d6(t,typeof e!="symbol"?e+"":e,r);class _ge extends Ple{constructor(e,r){super(e,r),this.logger=e,this.core=r,vi(this,"messages",new Map),vi(this,"messagesWithoutClientAck",new Map),vi(this,"name",g1e),vi(this,"version",w1e),vi(this,"initialized",!1),vi(this,"storagePrefix",qo),vi(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n);const i=await this.getRelayerMessagesWithoutClientAck();typeof i<"u"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),vi(this,"set",async(n,i,s)=>{this.isInitialized();const o=Ao(i);let a=this.messages.get(n);if(typeof a>"u"&&(a={}),typeof a[o]<"u")return o;if(a[o]=i,this.messages.set(n,a),s===v2.inbound){const c=this.messagesWithoutClientAck.get(n)||{};this.messagesWithoutClientAck.set(n,xge(Cge({},c),{[o]:i}))}return await this.persist(),o}),vi(this,"get",n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i}),vi(this,"getWithoutAck",n=>{this.isInitialized();const i={};for(const s of n){const o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),vi(this,"has",(n,i)=>{this.isInitialized();const s=this.get(n),o=Ao(i);return typeof s[o]<"u"}),vi(this,"ack",async(n,i)=>{this.isInitialized();const s=this.messagesWithoutClientAck.get(n);if(typeof s>"u")return;const o=Ao(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(n):this.messagesWithoutClientAck.set(n,s),await this.persist()}),vi(this,"del",async n=>{this.isInitialized(),this.messages.delete(n),this.messagesWithoutClientAck.delete(n),await this.persist()}),this.logger=St(e,this.name),this.core=r}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,G4(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,G4(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Y4(e):void 0}async getRelayerMessagesWithoutClientAck(){const e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof e<"u"?Y4(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var Sge=Object.defineProperty,Ige=Object.defineProperties,$ge=Object.getOwnPropertyDescriptors,k_=Object.getOwnPropertySymbols,Age=Object.prototype.hasOwnProperty,Pge=Object.prototype.propertyIsEnumerable,h6=(t,e,r)=>e in t?Sge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Kg=(t,e)=>{for(var r in e||(e={}))Age.call(e,r)&&h6(t,r,e[r]);if(k_)for(var r of k_(e))Pge.call(e,r)&&h6(t,r,e[r]);return t},M5=(t,e)=>Ige(t,$ge(e)),Rs=(t,e,r)=>h6(t,typeof e!="symbol"?e+"":e,r);class Tge extends Tle{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,Rs(this,"events",new Nr.EventEmitter),Rs(this,"name",m1e),Rs(this,"queue",new Map),Rs(this,"publishTimeout",X.toMiliseconds(X.ONE_MINUTE)),Rs(this,"initialPublishTimeout",X.toMiliseconds(X.ONE_SECOND*15)),Rs(this,"needsTransportRestart",!1),Rs(this,"publish",async(n,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});const a=(s==null?void 0:s.ttl)||__,c=rw(s),l=(s==null?void 0:s.prompt)||!1,u=(s==null?void 0:s.tag)||0,d=(s==null?void 0:s.id)||Ai().toString(),h={topic:n,message:i,opts:{ttl:a,relay:c,prompt:l,tag:u,id:d,attestation:s==null?void 0:s.attestation,tvf:s==null?void 0:s.tvf}},f=`Failed to publish payload, please try again. id:${d} tag:${u}`;try{const g=new Promise(async p=>{const w=({id:b})=>{h.opts.id===b&&(this.removeRequestFromQueue(b),this.relayer.events.removeListener(Hr.publish,w),p(h))};this.relayer.events.on(Hr.publish,w);const m=qc(new Promise((b,v)=>{this.rpcPublish({topic:n,message:i,ttl:a,prompt:l,tag:u,id:d,attestation:s==null?void 0:s.attestation,tvf:s==null?void 0:s.tvf}).then(b).catch(E=>{this.logger.warn(E,E==null?void 0:E.message),v(E)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${d} tag:${u}`);try{await m,this.events.removeListener(Hr.publish,w)}catch(b){this.queue.set(d,M5(Kg({},h),{attempt:1})),this.logger.warn(b,b==null?void 0:b.message)}});this.logger.trace({type:"method",method:"publish",params:{id:d,topic:n,message:i,opts:s}}),await qc(g,this.publishTimeout,f)}catch(g){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(g),(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw g}finally{this.queue.delete(d)}}),Rs(this,"on",(n,i)=>{this.events.on(n,i)}),Rs(this,"once",(n,i)=>{this.events.once(n,i)}),Rs(this,"off",(n,i)=>{this.events.off(n,i)}),Rs(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.relayer=e,this.logger=St(r,this.name),this.registerEventListeners()}get context(){return qt(this.logger)}async rpcPublish(e){var r,n,i,s;const{topic:o,message:a,ttl:c=__,prompt:l,tag:u,id:d,attestation:h,tvf:f}=e,g={method:Of(rw().protocol).publish,params:Kg({topic:o,message:a,ttl:c,prompt:l,tag:u,attestation:h},f),id:d};on((r=g.params)==null?void 0:r.prompt)&&((n=g.params)==null||delete n.prompt),on((i=g.params)==null?void 0:i.tag)&&((s=g.params)==null||delete s.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:g});const p=await this.relayer.request(g);return this.relayer.events.emit(Hr.publish,e),this.logger.debug("Successfully Published Payload"),p}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,r)=>{const n=e.attempt+1;this.queue.set(r,M5(Kg({},e),{attempt:n}));const{topic:i,message:s,opts:o,attestation:a}=e;this.logger.warn({},`Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${n}`),await this.rpcPublish(M5(Kg({},e),{topic:i,message:s,ttl:o.ttl,prompt:o.prompt,tag:o.tag,id:o.id,attestation:a,tvf:o.tvf})),this.logger.warn({},`Publisher: queue->published: ${e.opts.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(Hi.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Hr.connection_stalled);return}this.checkQueue()}),this.relayer.on(Hr.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}var Oge=Object.defineProperty,Nge=(t,e,r)=>e in t?Oge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jd=(t,e,r)=>Nge(t,typeof e!="symbol"?e+"":e,r);class kge{constructor(){jd(this,"map",new Map),jd(this,"set",(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])}),jd(this,"get",e=>this.map.get(e)||[]),jd(this,"exists",(e,r)=>this.get(e).includes(r)),jd(this,"delete",(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(s=>s!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),jd(this,"clear",()=>{this.map.clear()})}
vendor: 9,626 bytes, line 101
101get topics(){return Array.from(this.map.keys())}}var Rge=Object.defineProperty,Bge=Object.defineProperties,Dge=Object.getOwnPropertyDescriptors,R_=Object.getOwnPropertySymbols,Lge=Object.prototype.hasOwnProperty,Mge=Object.prototype.propertyIsEnumerable,f6=(t,e,r)=>e in t?Rge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gf=(t,e)=>{for(var r in e||(e={}))Lge.call(e,r)&&f6(t,r,e[r]);if(R_)for(var r of R_(e))Mge.call(e,r)&&f6(t,r,e[r]);return t},U5=(t,e)=>Bge(t,Dge(e)),Ut=(t,e,r)=>f6(t,typeof e!="symbol"?e+"":e,r);class Uge extends kle{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,Ut(this,"subscriptions",new Map),Ut(this,"topicMap",new kge),Ut(this,"events",new Nr.EventEmitter),Ut(this,"name",_1e),Ut(this,"version",S1e),Ut(this,"pending",new Map),Ut(this,"cached",[]),Ut(this,"initialized",!1),Ut(this,"storagePrefix",qo),Ut(this,"subscribeTimeout",X.toMiliseconds(X.ONE_MINUTE)),Ut(this,"initialSubscribeTimeout",X.toMiliseconds(X.ONE_SECOND*15)),Ut(this,"clientId"),Ut(this,"batchSubscribeTopicsLimit",500),Ut(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),Ut(this,"subscribe",async(n,i)=>{this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=rw(i),o={topic:n,relay:s,transportType:i==null?void 0:i.transportType};this.pending.set(n,o);const a=await this.rpcSubscribe(n,s,i);return typeof a=="string"&&(this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}}),Ut(this,"unsubscribe",async(n,i)=>{this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)}),Ut(this,"isSubscribed",n=>new Promise(i=>{i(this.topicMap.topics.includes(n))})),Ut(this,"isKnownTopic",n=>new Promise(i=>{i(this.topicMap.topics.includes(n)||this.pending.has(n)||this.cached.some(s=>s.topic===n))})),Ut(this,"on",(n,i)=>{this.events.on(n,i)}),Ut(this,"once",(n,i)=>{this.events.once(n,i)}),Ut(this,"off",(n,i)=>{this.events.off(n,i)}),Ut(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),Ut(this,"start",async()=>{await this.onConnect()}),Ut(this,"stop",async()=>{await this.onDisconnect()}),Ut(this,"restart",async()=>{await this.restore(),await this.onRestart()}),Ut(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const n=[];this.pending.forEach(i=>{n.push(i)}),await this.batchSubscribe(n)}),Ut(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(Hi.pulse,async()=>{await this.checkPending()}),this.events.on(xi.created,async n=>{const i=xi.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()}),this.events.on(xi.deleted,async n=>{const i=xi.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()})}),this.relayer=e,this.logger=St(r,this.name),this.clientId=""}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=rw(n);await this.restartToComplete({topic:e,id:r,relay:i}),await this.rpcUnsubscribe(e,r,i);const s=kt("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r,n){var i;(!n||(n==null?void 0:n.transportType)===Yt.relay)&&await this.restartToComplete({topic:e,id:e,relay:r});const s={method:Of(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});const o=(i=n==null?void 0:n.internal)==null?void 0:i.throwOnFailedPublish;try{const a=await this.getSubscriptionId(e);if((n==null?void 0:n.transportType)===Yt.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(u=>this.logger.warn(u))},X.toMiliseconds(X.ONE_SECOND)),a;const c=new Promise(async u=>{const d=h=>{h.topic===e&&(this.events.removeListener(xi.created,d),u(h.id))};this.events.on(xi.created,d);try{const h=await qc(new Promise((f,g)=>{this.relayer.request(s).catch(p=>{this.logger.warn(p,p==null?void 0:p.message),g(p)}).then(f)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(xi.created,d),u(h)}catch{}}),l=await qc(c,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!l&&o)throw new Error(`Subscribing to ${e} failed, please try again`);return l?a:null}catch(a){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Hr.connection_stalled),o)throw a}return null}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:Of(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await qc(new Promise(i=>{this.relayer.request(n).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(Hr.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const r=e[0].relay,n={method:Of(r.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let i;try{i=await await qc(new Promise((s,o)=>{this.relayer.request(n).catch(a=>{this.logger.warn(a),o(a)}).then(s)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(Hr.connection_stalled)}return i}rpcUnsubscribe(e,r,n){const i={method:Of(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,U5(gf({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,gf({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r)}addSubscription(e,r){this.subscriptions.set(e,gf({},r)),this.topicMap.set(r.topic,e),this.events.emit(xi.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:n}=pe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(xi.deleted,U5(gf({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(xi.sync)}async onRestart(){if(this.cached.length){const e=[...this.cached],r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<r;n++){const i=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(xi.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=pe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async r=>U5(gf({}
101,r),{id:await this.getSubscriptionId(r.topic)})))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await qde(X.toMiliseconds(X.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(e){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return Ao(e+await this.getClientId())}}var jge=Object.defineProperty,B_=Object.getOwnPropertySymbols,zge=Object.prototype.hasOwnProperty,Fge=Object.prototype.propertyIsEnumerable,p6=(t,e,r)=>e in t?jge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D_=(t,e)=>{for(var r in e||(e={}))zge.call(e,r)&&p6(t,r,e[r]);if(B_)for(var r of B_(e))Fge.call(e,r)&&p6(t,r,e[r]);return t},ft=(t,e,r)=>p6(t,typeof e!="symbol"?e+"":e,r);class qge extends Ole{constructor(e){super(e),ft(this,"protocol","wc"),ft(this,"version",2),ft(this,"core"),ft(this,"logger"),ft(this,"events",new Nr.EventEmitter),ft(this,"provider"),ft(this,"messages"),ft(this,"subscriber"),ft(this,"publisher"),ft(this,"name",b1e),ft(this,"transportExplicitlyClosed",!1),ft(this,"initialized",!1),ft(this,"connectionAttemptInProgress",!1),ft(this,"relayUrl"),ft(this,"projectId"),ft(this,"packageName"),ft(this,"bundleId"),ft(this,"hasExperiencedNetworkDisruption",!1),ft(this,"pingTimeout"),ft(this,"heartBeatTimeout",X.toMiliseconds(X.THIRTY_SECONDS+X.FIVE_SECONDS)),ft(this,"reconnectTimeout"),ft(this,"connectPromise"),ft(this,"reconnectInProgress",!1),ft(this,"requestsInFlight",[]),ft(this,"connectTimeout",X.toMiliseconds(X.ONE_SECOND*15)),ft(this,"request",async r=>{var n,i;this.logger.debug("Publishing Request Payload");const s=r.id||Ai().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:r.method,topic:(n=r.params)==null?void 0:n.topic},"relayer.request - publishing...");const o=`${s}:${((i=r.params)==null?void 0:i.tag)||""}`;this.requestsInFlight.push(o);const a=await this.provider.request(r);return this.requestsInFlight=this.requestsInFlight.filter(c=>c!==o),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),ft(this,"resetPingTimeout",()=>{ew()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var r,n,i,s;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(s=(i=(n=(r=this.provider)==null?void 0:r.connection)==null?void 0:n.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o==null?void 0:o.message)}},this.heartBeatTimeout))}),ft(this,"onPayloadHandler",r=>{this.onProviderPayload(r),this.resetPingTimeout()}),ft(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(Hr.connect)}),ft(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),ft(this,"onProviderErrorHandler",r=>{this.logger.fatal(`Fatal socket error: ${r.message}`),this.events.emit(Hr.error,r),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),ft(this,"registerProviderListeners",()=>{this.provider.on(es.payload,this.onPayloadHandler),this.provider.on(es.connect,this.onConnectHandler),this.provider.on(es.disconnect,this.onDisconnectHandler),this.provider.on(es.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?St(e.logger,this.name):al(cl({level:e.logger||y1e})),this.messages=new _ge(this.logger,e.core),this.subscriber=new Uge(this,this.logger),this.publisher=new Tge(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||fR,this.projectId=e.projectId,$de()?this.packageName=kx():Ade()&&(this.bundleId=kx()),this.provider={}}
101async init(){if(this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.subscriber.hasAnyTopics)try{await this.transportOpen()}catch(e){this.logger.warn(e,e==null?void 0:e.message)}}get context(){return qt(this.logger)}get connected(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===1||!1}get connecting(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===0||this.connectPromise!==void 0||!1}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now(),transportType:Yt.relay},v2.outbound)}async subscribe(e,r){var n,i,s;this.isInitialized(),(!(r!=null&&r.transportType)||(r==null?void 0:r.transportType)==="relay")&&await this.toEstablishConnection();const o=typeof((n=r==null?void 0:r.internal)==null?void 0:n.throwOnFailedPublish)>"u"?!0:(i=r==null?void 0:r.internal)==null?void 0:i.throwOnFailedPublish;let a=((s=this.subscriber.topicMap.get(e))==null?void 0:s[0])||"",c;const l=u=>{u.topic===e&&(this.subscriber.off(xi.created,l),c())};return await Promise.all([new Promise(u=>{c=u,this.subscriber.on(xi.created,l)}),new Promise(async(u,d)=>{a=await this.subscriber.subscribe(e,D_({internal:{throwOnFailedPublish:o}},r)).catch(h=>{o&&d(h)})||a,u()})]),a}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await qc(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.warn("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(r,n)=>{await this.connect(e).then(r).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await E_())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const r=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${r.length} message events sorted`);for(const n of r)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i,"Error while processing batch message event: "+(i==null?void 0:i.message))}this.logger.trace(`Batch of ${r.length} message events processed`)}async onLinkMessageEvent(e,r){const{topic:n}=e;if(!r.sessionExists){const i=Ar(X.FIVE_MINUTES),s={topic:n,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(n,s)}this.events.emit(Hr.message,e),await this.recordMessageEvent(e,v2.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let r=1;for(;r<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${r}...`),await this.createProvider(),await new Promise(async(n,i)=>{const s=()=>
vendor: 51,442 bytes, line 101
101{i(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(es.disconnect,s),await qc(new Promise((o,a)=>{this.provider.connect().then(o).catch(a)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(es.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,a)=>{const c=()=>{a(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(es.disconnect,c),await this.subscriber.start().then(o).catch(a).finally(()=>{this.provider.off(es.disconnect,c)})}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){await this.subscriber.stop();const i=n;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${r}`);break}await new Promise(n=>setTimeout(n,X.toMiliseconds(r*1))),r++}}startPingTimeout(){var e,r,n,i,s;if(ew())try{(r=(e=this.provider)==null?void 0:e.connection)!=null&&r.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o==null?void 0:o.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new nr(new cN(kde({sdkVersion:c6,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,r){const{topic:n,message:i}=e;await this.messages.set(n,i,r)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isKnownTopic(r))return this.logger.warn(`Ignoring message for unknown topic ${r}`),!0;const i=this.messages.has(r,n);return i&&this.logger.warn(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),T0(e)){if(!e.method.endsWith(v1e))return;const r=e.params,{topic:n,message:i,publishedAt:s,attestation:o}=r.data,a={topic:n,message:i,publishedAt:s,transportType:Yt.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(D_({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else Vu(e)&&this.events.emit(Hr.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,v2.inbound),this.events.emit(Hr.message,e))}async acknowledgePayload(e){const r=ll(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(es.payload,this.onPayloadHandler),this.provider.off(es.connect,this.onConnectHandler),this.provider.off(es.disconnect,this.onDisconnectHandler),this.provider.off(es.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await E_();t1e(async r=>{e!==r&&(e=r,r?await this.transportOpen().catch(n=>this.logger.error(n,n==null?void 0:n.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(Hi.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&i1e())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(r){this.logger.warn(r,r==null?void 0:r.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Hr.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e==null?void 0:e.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},X.toMiliseconds(E1e)))))}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function Hge(){}function L_(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function M_(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function U_(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Vge="[object RegExp]",Wge="[object String]",Kge="[object Number]",Zge="[object Boolean]",j_="[object Arguments]",Gge="[object Symbol]",Yge="[object Date]",Jge="[object Map]",Xge="[object Set]",Qge="[object Array]",e2e="[object Function]",t2e="[object ArrayBuffer]",j5="[object Object]",r2e="[object Error]",n2e="[object DataView]",i2e="[object Uint8Array]",s2e="[object Uint8ClampedArray]",o2e="[object Uint16Array]",a2e="[object Uint32Array]",c2e="[object BigUint64Array]",l2e="[object Int8Array]",u2e="[object Int16Array]",d2e="[object Int32Array]",h2e="[object BigInt64Array]",f2e="[object Float32Array]",p2e="[object Float64Array]";function g2e(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function w2e(t,e,r){return Nf(t,e,void 0,void 0,void 0,void 0,r)}function Nf(t,e,r,n,i,s,o){const a=o(t,e,r,n,i,s);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return Qf(t,e,s,o)}return Qf(t,e,s,o)}function Qf(t,e,r,n){if(Object.is(t,e))return!0;let i=U_(t),s=U_(e);if(i===j_&&(i=j5),s===j_&&(s=j5),i!==s)return!1;switch(i){case Wge:return t.toString()===e.toString();case Kge:{const c=t.valueOf(),l=e.valueOf();return g2e(c,l)}case Zge:case Yge:case Gge:return Object.is(t.valueOf(),e.valueOf());case Vge:return t.source===e.source&&t.flags===e.flags;case e2e:return t===e}r=r??new Map;const o=r.get(t),a=r.get(e);if(o!=null&&a!=null)return o===e;r.set(t,e),r.set(e,t);try{switch(i){case Jge:{if(t.size!==e.size)return!1;for(const[c,l]of t.entries())if(!e.has(c)||!Nf(l,e.get(c),c,t,e,r,n))return!1;return!0}case Xge:{if(t.size!==e.size)return!1;const c=Array.from(t.values()),l=Array.from(e.values());for(let u=0;u<c.length;u++){const d=c[u],h=l.findIndex(f=>Nf(d,f,void 0,t,e,r,n));if(h===-1)return!1;l.splice(h,1)}return!0}case Qge:case i2e:case s2e:case o2e:case a2e:case c2e:case l2e:case u2e:case d2e:case h2e:case f2e:case p2e:{if(typeof Oe<"u"&&Oe.isBuffer(t)!==Oe.isBuffer(e)||t.length!==e.length)return!1;for(let c=0;c<t.length;c++)if(!Nf(t[c],e[c],c,t,e,r,n))return!1;return!0}case t2e:return t.byteLength!==e.byteLength?!1:Qf(new Uint8Array(t),new Uint8Array(e),r,n);case n2e:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:Qf(new Uint8Array(t),new Uint8Array(e),r,n);case r2e:return t.name===e.name&&t.message===e.message;case j5:{if(!(Qf(t.constructor,e.constructor,r,n)||L_(t)&&L_(e)))return!1;const c=[...Object.keys(t),...M_(t)],l=[...Object.keys(e),...M_(e)];if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++){const d=c[u],h=t[d];if(!Object.hasOwn(e,d))return!1;const f=e[d];if(!Nf(h,f,d,t,e,r,n))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}function m2e(t,e){return w2e(t,e,Hge)}var y2e=Object.defineProperty,z_=Object.getOwnPropertySymbols,b2e=Object.prototype.hasOwnProperty,v2e=Object.prototype.propertyIsEnumerable,g6=(t,e,r)=>e in t?y2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,F_=(t,e)=>{for(var r in e||(e={}))b2e.call(e,r)&&g6(t,r,e[r]);if(z_)for(var r of z_(e))v2e.call(e,r)&&g6(t,r,e[r]);return t},Kn=(t,e,r)=>g6(t,typeof e!="symbol"?e+"":e,r);class Ju extends Nle{constructor(e,r,n,i=qo,s=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,Kn(this,"map",new Map),Kn(this,"version",C1e),Kn(this,"cached",[]),Kn(this,"initialized",!1),Kn(this,"getKey"),Kn(this,"storagePrefix",qo),Kn(this,"recentlyDeleted",[]),Kn(this,"recentlyDeletedLimit",200),Kn(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!on(o)?this.map.set(this.getKey(o),o):Nfe(o)?this.map.set(o.id,o):kfe(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),Kn(this,"set",async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())}),Kn(this,"get",o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o))),Kn(this,"getAll",o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>m2e(a[c],o[c]))):this.values)),Kn(this,"update",async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const c=F_(F_({},this.getData(o)),a);this.map.set(o,c),await this.persist()}),Kn(this,"delete",async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=St(r,this.name),this.storagePrefix=i,this.getKey=s}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){if(this.recentlyDeleted.includes(e)){const{message:i}=pe("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=pe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=pe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var E2e=Object.defineProperty,C2e=(t,e,r)=>e in t?E2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,rt=(t,e,r)=>C2e(t,typeof e!="symbol"?e+"":e,r);class x2e{constructor(e,r){this.core=e,this.logger=r,rt(this,"name",I1e),rt(this,"version",$1e),rt(this,"events",new v0),rt(this,"pairings"),rt(this,"initialized",!1),rt(this,"storagePrefix",qo),rt(this,"ignoredPayloadTypes",[La]),rt(this,"registeredMethods",[]),rt(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),rt(this,"register",({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]}),rt(this,"create",async n=>{this.isInitialized();const i=o6(),s=await this.core.crypto.setSymKey(i),o=Ar(X.FIVE_MINUTES),a={protocol:hR},c={topic:s,expiry:o,relay:a,active:!1,methods:n==null?void 0:n.methods},l=h_({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n==null?void 0:n.methods});return this.events.emit(Ul.create,c),this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s,{transportType:n==null?void 0:n.transportType}),{topic:s,uri:l}}),rt(this,"pair",async n=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:n==null?void 0:n.uri,trace:[Co.pairing_started]}});this.isValidPair(n,i);const{topic:s,symKey:o,relay:a,expiryTimestamp:c,methods:l}=d_(n.uri);i.props.properties.topic=s,i.addTrace(Co.pairing_uri_validation_success),i.addTrace(Co.pairing_uri_not_expired);let u;if(this.pairings.keys.includes(s)){if(u=this.pairings.get(s),i.addTrace(Co.existing_pairing),u.active)throw i.setError(va.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(Co.pairing_not_expired)}const d=c||Ar(X.FIVE_MINUTES),h={topic:s,relay:a,expiry:d,active:!1,methods:l};this.core.expirer.set(s,d),await this.pairings.set(s,h),i.addTrace(Co.store_new_pairing),n.activatePairing&&await this.activate({topic:s}),this.events.emit(Ul.create,h),i.addTrace(Co.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(Co.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(va.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:a})}catch(f){throw i.setError(va.subscribe_pairing_topic_failure),f}return i.addTrace(Co.subscribe_pairing_topic_success),h}),rt(this,"activate",async({topic:n})=>{this.isInitialized();const i=Ar(X.FIVE_MINUTES);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})}),rt(this,"ping",async n=>{this.isInitialized(),await this.isValidPing(n),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:c}=Ol();this.events.once(_t("pairing_ping",s),({error:l})=>{l?c(l):a()}),await o()}}),rt(this,"updateExpiry",async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})}),rt(this,"updateMetadata",async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})}),rt(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),rt(this,"disconnect",async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",kt("USER_DISCONNECTED")),await this.deletePairing(i))}),rt(this,"formatUriFromPairing",n=>{this.isInitialized();const{topic:i,relay:s,expiry:o,methods:a}=n,c=this.core.crypto.keychain.get(i);return h_({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:c,relay:s,expiryTimestamp:o,methods:a})}),rt(this,"sendRequest",async(n,i,s)=>{const o=On(i,s),a=await this.core.crypto.encode(n,o),c=ff[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id}),rt(this,"sendResult",async(n,i,s)=>{const o=ll(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=ff[c].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),rt(this,"sendError",async(n,i,s)=>{const o=P0(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=ff[c]?ff[c].res:ff.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),rt(this,"deletePairing",async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,kt("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),rt(this,"cleanup",async()=>{const n=this.pairings.getAll().filter(i=>Lc(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))}),rt(this,"onRelayEventRequest",async n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return await this.onPairingPingRequest(i,s);case"wc_pairingDelete":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),rt(this,"onRelayEventResponse",async n=>{const{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}}),rt(this,"onPairingPingRequest",async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(Ul.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),rt(this,"onPairingPingResponse",(n,i)=>{const{id:s}=i;setTimeout(()=>{Tr(i)?this.events.emit(_t("pairing_ping",s),{}):cr(i)&&this.events.emit(_t("pairing_ping",s),{error:i.error})},500)}),rt(this,"onPairingDeleteRequest",async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Ul.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),rt(this,"onUnknownRpcMethodRequest",async(n,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=kt("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}}),rt(this,"onUnknownRpcMethodResponse",n=>{this.registeredMethods.includes(n)||this.logger.error(kt("WC_METHOD_UNSUPPORTED",n))}),rt(this,"isValidPair",(n,i)=>{var s;if(!Qn(n)){const{message:a}=pe("MISSING_OR_INVALID",`pair() params: ${n}`);throw i.setError(va.malformed_pairing_uri),new Error(a)}if(!Ofe(n.uri)){const{message:a}=pe("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw i.setError(va.malformed_pairing_uri),new Error(a)}const o=d_(n==null?void 0:n.uri);if(!((s=o==null?void 0:o.relay)!=null&&s.protocol)){const{message:a}=pe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(va.malformed_pairing_uri),new Error(a)}if(!(o!=null&&o.symKey)){const{message:a}=pe("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(va.malformed_pairing_uri),new Error(a)}if(o!=null&&o.expiryTimestamp&&X.toMiliseconds(o==null?void 0:o.expiryTimestamp)<Date.now()){i.setError(va.pairing_expired);const{message:a}=pe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(a)}}),rt(this,"isValidPing",async n=>{if(!Qn(n)){const{message:s}=pe("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)}),rt(this,"isValidDisconnect",async n=>{if(!Qn(n)){const{message:s}=pe("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)}),rt(this,"isValidPairingTopic",async n=>{if(!xr(n,!1)){const{message:i}=pe("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=pe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(Lc(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=pe("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=St(r,this.name),this.pairings=new Ju(this.core,this.logger,this.name,this.storagePrefix)}get context(){return qt(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Hr.message,async e=>{const{topic:r,message:n,transportType:i}=e;if(this.pairings.keys.includes(r)&&i!==Yt.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{const s=await this.core.crypto.decode(r,n);T0(s)?(this.core.history.set(r,s),await this.onRelayEventRequest({topic:r,payload:s})):Vu(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:r,payload:s}),this.core.history.delete(r,s.id)),await this.core.relayer.messages.ack(r,n)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(is.expired,async e=>{const{topic:r}=$k(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(Ul.expire,{topic:r}))})}}var _2e=Object.defineProperty,S2e=(t,e,r)=>e in t?_2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e,r)=>S2e(t,typeof e!="symbol"?e+"":e,r);class I2e extends Ale{constructor(e,r){super(e,r),this.core=e,this.logger=r,nn(this,"records",new Map),nn(this,"events",new Nr.EventEmitter),nn(this,"name",A1e),nn(this,"version",P1e),nn(this,"cached",[]),nn(this,"initialized",!1),nn(this,"storagePrefix",qo),nn(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),nn(this,"set",(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:Ar(X.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(Ns.created,o)}),nn(this,"resolve",async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=cr(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(Ns.updated,i))}),nn(this,"get",async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i))),nn(this,"delete",(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(Ns.deleted,s)}}),this.persist()}),nn(this,"exists",async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1)),nn(this,"on",(n,i)=>{this.events.on(n,i)}),nn(this,"once",(n,i)=>{this.events.once(n,i)}),nn(this,"off",(n,i)=>{this.events.off(n,i)}),nn(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=St(r,this.name)}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:On(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=pe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Ns.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=pe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Ns.created,e=>{const r=Ns.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(Ns.updated,e=>{const r=Ns.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(Ns.deleted,e=>{const r=Ns.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.core.heartbeat.on(Hi.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(r=>{X.toMiliseconds(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.records.delete(r.id),this.events.emit(Ns.deleted,r,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var $2e=Object.defineProperty,A2e=(t,e,r)=>e in t?$2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yn=(t,e,r)=>A2e(t,typeof e!="symbol"?e+"":e,r);class P2e extends Rle{constructor(e,r){super(e,r),this.core=e,this.logger=r,yn(this,"expirations",new Map),yn(this,"events",new Nr.EventEmitter),yn(this,"name",T1e),yn(this,"version",O1e),yn(this,"cached",[]),yn(this,"initialized",!1),yn(this,"storagePrefix",qo),yn(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),yn(this,"has",n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}}),yn(this,"set",(n,i)=>{this.isInitialized();const s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(is.created,{target:s,expiration:o})}),yn(this,"get",n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)}),yn(this,"del",n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(is.deleted,{target:i,expiration:s})}}),yn(this,"on",(n,i)=>{this.events.on(n,i)}),yn(this,"once",(n,i)=>{this.events.once(n,i)}),yn(this,"off",(n,i)=>{this.events.off(n,i)}),yn(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=St(r,this.name)}get context(){return qt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return Rde(e);if(typeof e=="number")return Bde(e);const{message:r}=pe("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(is.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=pe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=pe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;X.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(is.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(Hi.pulse,()=>this.checkExpirations()),this.events.on(is.created,e=>{const r=is.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(is.expired,e=>{const r=is.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(is.deleted,e=>{const r=is.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var T2e=Object.defineProperty,O2e=(t,e,r)=>e in t?T2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vr=(t,e,r)=>O2e(t,typeof e!="symbol"?e+"":e,r);class N2e extends Ble{constructor(e,r,n){super(e,r,n),this.core=e,this.logger=r,this.store=n,vr(this,"name",N1e),vr(this,"abortController"),vr(this,"isDevEnv"),vr(this,"verifyUrlV3",R1e),vr(this,"storagePrefix",qo),vr(this,"version",dR),vr(this,"publicKey"),vr(this,"fetchPromise"),vr(this,"init",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&X.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),vr(this,"register",async i=>{if(!R0()||this.isDevEnv)return;const s=window.location.origin,{id:o,decryptedId:a}=i,c=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${a}`;try{const l=Zr.getDocument(),u=this.startAbortTimer(X.ONE_SECOND*5),d=await new Promise((h,f)=>{const g=()=>{window.removeEventListener("message",w),l.body.removeChild(p),f("attestation aborted")};this.abortController.signal.addEventListener("abort",g);const p=l.createElement("iframe");p.src=c,p.style.display="none",p.addEventListener("error",g,{signal:this.abortController.signal});const w=m=>{if(m.data&&typeof m.data=="string")try{const b=JSON.parse(m.data);if(b.type==="verify_attestation"){if(kh(b.attestation).payload.id!==o)return;clearInterval(u),l.body.removeChild(p),this.abortController.signal.removeEventListener("abort",g),window.removeEventListener("message",w),h(b.attestation===null?"":b.attestation)}}catch(b){this.logger.warn(b)}};l.body.appendChild(p),window.addEventListener("message",w,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",d),d}catch(l){this.logger.warn(l)}return""}),vr(this,"resolve",async i=>{if(this.isDevEnv)return"";const{attestationId:s,hash:o,encryptedId:a}=i;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(kh(s).payload.id!==a)return;const l=await this.isValidJwtAttestation(s);if(l){if(!l.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return l}}if(!o)return;const c=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(o,c)}),vr(this,"fetchAttestation",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);const o=this.startAbortTimer(X.ONE_SECOND*5),a=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),a.status===200?await a.json():void 0}),vr(this,"getVerifyUrl",i=>{let s=i||Xf;return B1e.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${Xf}`),s=Xf),s}),vr(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(X.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),vr(this,"persistPublicKey",async i=>{this.logger.debug("persisting public key to local storage",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),vr(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),vr(this,"isValidJwtAttestation",async i=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}const o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}}),vr(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),vr(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i}),vr(this,"validateAttestation",(i,s)=>{const o=ufe(i,s.publicKey),a={hasExpired:X.toMiliseconds(o.exp)<Date.now(),payload:o};if(a.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:a.payload.origin,isScam:a.payload.isScam,isVerified:a.payload.isVerified}}),this.logger=St(r,this.name),this.abortController=new AbortController,this.isDevEnv=o8(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return qt(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),X.toMiliseconds(e))}}var k2e=Object.defineProperty,R2e=(t,e,r)=>e in t?k2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,q_=(t,e,r)=>R2e(t,typeof e!="symbol"?e+"":e,r);class B2e extends Dle{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,q_(this,"context",D1e),q_(this,"registerDeviceToken",async n=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${L1e}/${this.projectId}/clients`;await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})}),this.logger=St(r,this.context)}}var D2e=Object.defineProperty,H_=Object.getOwnPropertySymbols,L2e=Object.prototype.hasOwnProperty,M2e=Object.prototype.propertyIsEnumerable,w6=(t,e,r)=>e in t?D2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wf=(t,e)=>{for(var r in e||(e={}))L2e.call(e,r)&&w6(t,r,e[r]);if(H_)for(var r of H_(e))M2e.call(e,r)&&w6(t,r,e[r]);return t},Br=(t,e,r)=>w6(t,typeof e!="symbol"?e+"":e,r);class U2e extends Lle{constructor(e,r,n=!0){super(e,r,n),this.core=e,this.logger=r,Br(this,"context",U1e),Br(this,"storagePrefix",qo),Br(this,"storageVersion",M1e),Br(this,"events",new Map),Br(this,"shouldPersist",!1),Br(this,"init",async()=>{if(!o8())try{const i={eventId:Bx(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:Sk(this.core.relayer.protocol,this.core.relayer.version,c6)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),Br(this,"createEvent",i=>{const{event:s="ERROR",type:o="",properties:{topic:a,trace:c}}=i,l=Bx(),u=this.core.projectId||"",d=Date.now(),h=wf({eventId:l,timestamp:d,props:{event:s,type:o,properties:{topic:a,trace:c}},bundleId:u,domain:this.getAppDomain()},this.setMethods(l));return this.telemetryEnabled&&(this.events.set(l,h),this.shouldPersist=!0),h}),Br(this,"getEvent",i=>{const{eventId:s,topic:o}=i;if(s)return this.events.get(s);const a=Array.from(this.events.values()).find(c=>c.props.properties.topic===o);if(a)return wf(wf({},a),this.setMethods(a.eventId))}),Br(this,"deleteEvent",i=>{const{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),Br(this,"setEventListeners",()=>{this.core.heartbeat.on(Hi.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{X.fromMiliseconds(Date.now())-X.fromMiliseconds(i.timestamp)>j1e&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),Br(this,"setMethods",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),Br(this,"addTrace",(i,s)=>{const o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),Br(this,"setError",(i,s)=>{const o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),Br(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),Br(this,"restore",async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,wf(wf({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),Br(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),Br(this,"sendEvent",async i=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${z1e}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${c6}${s}`,{method:"POST",body:JSON.stringify(i)})}),Br(this,"getAppDomain",()=>_k().url),this.logger=St(r,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var j2e=Object.defineProperty,V_=Object.getOwnPropertySymbols,z2e=Object.prototype.hasOwnProperty,F2e=Object.prototype.propertyIsEnumerable,m6=(t,e,r)=>e in t?j2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,W_=(t,e)=>{for(var r in e||(e={}))z2e.call(e,r)&&m6(t,r,e[r]);if(V_)for(var r of V_(e))F2e.call(e,r)&&m6(t,r,e[r]);return t},Wt=(t,e,r)=>m6(t,typeof e!="symbol"?e+"":e,r);let q2e=class SR extends _le{constructor(e){var r;super(e),Wt(this,"protocol",uR),Wt(this,"version",dR),Wt(this,"name",a6),Wt(this,"relayUrl"),Wt(this,"projectId"),Wt(this,"customStoragePrefix"),Wt(this,"events",new Nr.EventEmitter),Wt(this,"logger"),Wt(this,"heartbeat"),Wt(this,"relayer"),Wt(this,"crypto"),Wt(this,"storage"),Wt(this,"history"),Wt(this,"expirer"),Wt(this,"pairing"),Wt(this,"verify"),Wt(this,"echoClient"),Wt(this,"linkModeSupportedApps"),Wt(this,"eventClient"),Wt(this,"initialized",!1),Wt(this,"logChunkController"),Wt(this,"on",(a,c)=>this.events.on(a,c)),Wt(this,"once",(a,c)=>this.events.once(a,c)),Wt(this,"off",(a,c)=>this.events.off(a,c)),Wt(this,"removeListener",(a,c)=>this.events.removeListener(a,c)),Wt(this,"dispatchEnvelope",({topic:a,message:c,sessionExists:l})=>{if(!a||!c)return;const u={topic:a,message:c,publishedAt:Date.now(),transportType:Yt.link_mode};this.relayer.onLinkMessageEvent(u,{sessionExists:l})});const n=this.getGlobalCore(e==null?void 0:e.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(a){console.warn("Failed to copy global core",a)}this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||fR,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const i=cl({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:l1e.logger,name:a6}),{logger:s,chunkLoggerController:o}=tN({opts:i,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=o,(r=this.logChunkController)!=null&&r.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,c;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((c=this.logChunkController)==null||c.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=St(s,this.name),this.heartbeat=new YO,this.crypto=new wge(this,this.logger,e==null?void 0:e.keychain),this.history=new I2e(this,this.logger),this.expirer=new P2e(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new QO(W_(W_({},u1e),e==null?void 0:e.storageOptions)),this.relayer=new qge({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new x2e(this,this.logger),this.verify=new N2e(this,this.logger,this.storage),this.echoClient=new B2e(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new U2e(this,this.logger,e==null?void 0:e.telemetryEnabled),this.setGlobalCore(this)}static async init(e){const r=new SR(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(x1e,n),r}get context(){return qt(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(S_,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(S_)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}getGlobalCore(e=""){try{if(this.isGlobalCoreDisabled())return;const r=`_walletConnectCore_${e}`,n=`${r}_count`;return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[n]} times.`),globalThis[r]}catch(r){console.warn("Failed to get global WalletConnect core",r);return}}setGlobalCore(e){var r;try{if(this.isGlobalCoreDisabled())return;const n=`_walletConnectCore_${((r=e.opts)==null?void 0:r.customStoragePrefix)||""}`;globalThis[n]=e}catch(n){console.warn("Failed to set global WalletConnect core",n)}}isGlobalCoreDisabled(){try{return typeof sr<"u"&&c1e.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}};const H2e=q2e,IR="wc",$R=2,AR="client",p8=`${IR}@${$R}:${AR}:`,z5={name:AR,logger:"error"},K_="WALLETCONNECT_DEEPLINK_CHOICE",V2e="proposal",Z_="Proposal expired",W2e="session",zd=X.SEVEN_DAYS,K2e="engine",Dr={wc_sessionPropose:{req:{ttl:X.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1104},res:{ttl:X.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1106},res:{ttl:X.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:X.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:X.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1112},res:{ttl:X.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:X.ONE_DAY,prompt:!1,tag:1114},res:{ttl:X.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:X.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:X.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:X.FIVE_MINUTES,prompt:!1,tag:1119}}},F5={min:X.FIVE_MINUTES,max:X.SEVEN_DAYS},mo={idle:"IDLE",active:"ACTIVE"},G_={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"}},Z2e="request",G2e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],Y2e="wc",J2e="auth",X2e="authKeys",Q2e="pairingTopics",ewe="requests",Cm=`${Y2e}@${1.5}:${J2e}:`,E2=`${Cm}:PUB_KEY`;var twe=Object.defineProperty,rwe=Object.defineProperties,nwe=Object.getOwnPropertyDescriptors,Y_=Object.getOwnPropertySymbols,iwe=Object.prototype.hasOwnProperty,swe=Object.prototype.propertyIsEnumerable,y6=(t,e,r)=>e in t?twe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jt=(t,e)=>{for(var r in e||(e={}))iwe.call(e,r)&&y6(t,r,e[r]);if(Y_)for(var r of Y_(e))swe.call(e,r)&&y6(t,r,e[r]);return t},An=(t,e)=>rwe(t,nwe(e)),ue=(t,e,r)=>y6(t,typeof e!="symbol"?e+"":e,r);class owe extends zle{constructor(e){super(e),ue(this,"name",K2e),ue(this,"events",new v0),ue(this,"initialized",!1),ue(this,"requestQueue",{state:mo.idle,queue:[]}),ue(this,"sessionRequestQueue",{state:mo.idle,queue:[]}),ue(this,"requestQueueDelay",X.ONE_SECOND),ue(this,"expectedPairingMethodMap",new Map),ue(this,"recentlyDeletedMap",new Map),ue(this,"recentlyDeletedLimit",200),ue(this,"relayMessageCache",[]),ue(this,"pendingSessions",new Map),ue(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(Dr)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},X.toMiliseconds(this.requestQueueDelay)))}),ue(this,"connect",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const n=An(jt({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n),n.optionalNamespaces=Ife(n.requiredNamespaces,n.optionalNamespaces),n.requiredNamespaces={};const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,scopedProperties:c,relays:l}=n;let u=i,d,h=!1;try{if(u){const _=this.client.core.pairing.pairings.get(u);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),h=_.active}}catch(_){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),_}if(!u||!h){const{topic:_,uri:A}=await this.client.core.pairing.create();u=_,d=A}if(!u){const{message:_}=pe("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(_)}const f=await this.client.core.crypto.generateKeyPair(),g=Dr.wc_sessionPropose.req.ttl||X.FIVE_MINUTES,p=Ar(g),w=An(jt(jt({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:hR}],proposer:{publicKey:f,metadata:this.client.metadata},expiryTimestamp:p,pairingTopic:u},a&&{sessionProperties:a}),c&&{scopedProperties:c}),{id:zr()}),m=_t("session_connect",w.id),{reject:b,resolve:v,done:E}=Ol(g,Z_),I=({id:_})=>{_===w.id&&(this.client.events.off("proposal_expire",I),this.pendingSessions.delete(w.id),this.events.emit(m,{error:{message:Z_,code:0}}))};return this.client.events.on("proposal_expire",I),this.events.once(m,({error:_,session:A})=>{this.client.events.off("proposal_expire",I),_?b(_):A&&v(A)}),await this.sendRequest({topic:u,method:"wc_sessionPropose",params:w,throwOnFailedPublish:!0,clientRpcId:w.id}),await this.setProposal(w.id,w),{uri:d,approval:E}}),ue(this,"pair",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(r)}catch(n){throw this.client.logger.error("pair() failed"),n}}),ue(this,"approve",async r=>{var n,i,s;const o=this.client.core.eventClient.createEvent({properties:{topic:(n=r==null?void 0:r.id)==null?void 0:n.toString(),trace:[ks.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(y){throw o.setError(_l.no_internet_connection),y}try{await this.isValidProposalId(r==null?void 0:r.id)}catch(y){throw this.client.logger.error(`approve() -> proposal.get(${r==null?void 0:r.id}) failed`),o.setError(_l.proposal_not_found),y}try{await this.isValidApprove(r)}catch(y){throw this.client.logger.error("approve() -> isValidApprove() failed"),o.setError(_l.session_approve_namespace_validation_failure),y}const{id:a,relayProtocol:c,namespaces:l,sessionProperties:u,scopedProperties:d,sessionConfig:h}=r,f=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:o.eventId});const{pairingTopic:g,proposer:p,requiredNamespaces:w,optionalNamespaces:m}=f;let b=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:g});b||(b=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:ks.session_approve_started,properties:{topic:g,trace:[ks.session_approve_started,ks.session_namespaces_validation_success]}}));const v=await this.client.core.crypto.generateKeyPair(),E=p.publicKey,I=await this.client.core.crypto.generateSharedKey(v,E),_=jt(jt(jt({relay:{protocol:c??"irn"},namespaces:l,controller:{publicKey:v,metadata:this.client.metadata},expiry:Ar(zd)},u&&{sessionProperties:u}),d&&{scopedProperties:d}),h&&{sessionConfig:h}),A=Yt.relay;b.addTrace(ks.subscribing_session_topic);try{await this.client.core.relayer.subscribe(I,{transportType:A})}catch(y){throw b.setError(_l.subscribe_session_topic_failure),y}b.addTrace(ks.subscribe_session_topic_success);const P=An(jt({},_),{topic:I,requiredNamespaces:w,optionalNamespaces:m,pairingTopic:g,acknowledged:!1,self:_.controller,peer:{publicKey:p.publicKey,metadata:p.metadata},controller:v,transportType:Yt.relay});await this.client.session.set(I,P),b.addTrace(ks.store_session);try{b.addTrace(ks.publishing_session_settle),await this.sendRequest({topic:I,method:"wc_sessionSettle",params:_,throwOnFailedPublish:!0}).catch(y=>{throw b==null||b.setError(_l.session_settle_publish_failure),y}),b.addTrace(ks.session_settle_publish_success),b.addTrace(ks.publishing_session_approve),await this.sendResult({id:a,topic:g,result:{relay:{protocol:c??"irn"},responderPublicKey:v},throwOnFailedPublish:!0}).catch(y=>{throw b==null||b.setError(_l.session_approve_publish_failure),y}),b.addTrace(ks.session_approve_publish_success)}catch(y){throw this.client.logger.error(y),this.client.session.delete(I,kt("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(I),y}return this.client.core.eventClient.deleteEvent({eventId:b.eventId}),await this.client.core.pairing.updateMetadata({topic:g,metadata:p.metadata}),await this.client.proposal.delete(a,kt("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:g}),await this.setExpiry(I,Ar(zd)),{topic:I,acknowledged:()=>Promise.resolve(this.client.session.get(I))}}),ue(this,"reject",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(r)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:n,reason:i}=r;let s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}
101s&&(await this.sendError({id:n,topic:s,error:i,rpcOpts:Dr.wc_sessionPropose.reject}),await this.client.proposal.delete(n,kt("USER_DISCONNECTED")))}),ue(this,"update",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(r)}catch(d){throw this.client.logger.error("update() -> isValidUpdate() failed"),d}const{topic:n,namespaces:i}=r,{done:s,resolve:o,reject:a}=Ol(),c=zr(),l=Ai().toString(),u=this.client.session.get(n).namespaces;return this.events.once(_t("session_update",c),({error:d})=>{d?a(d):o()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(d=>{this.client.logger.error(d),this.client.session.update(n,{namespaces:u}),a(d)}),{acknowledged:s}}),ue(this,"extend",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(r)}catch(c){throw this.client.logger.error("extend() -> isValidExtend() failed"),c}const{topic:n}=r,i=zr(),{done:s,resolve:o,reject:a}=Ol();return this.events.once(_t("session_extend",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(n,Ar(zd)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}}),ue(this,"request",async r=>{this.isInitialized();try{await this.isValidRequest(r)}catch(m){throw this.client.logger.error("request() -> isValidRequest() failed"),m}const{chainId:n,request:i,topic:s,expiry:o=Dr.wc_sessionRequest.req.ttl}=r,a=this.client.session.get(s);(a==null?void 0:a.transportType)===Yt.relay&&await this.confirmOnlineStateOrThrow();const c=zr(),l=Ai().toString(),{done:u,resolve:d,reject:h}=Ol(o,"Request expired. Please try again.");this.events.once(_t("session_request",c),({error:m,result:b})=>{m?h(m):d(b)});const f="wc_sessionRequest",g=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(g)return await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:f,params:{request:An(jt({},i),{expiryTimestamp:Ar(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0,appLink:g}).catch(m=>h(m)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:c}),await u();const p={request:An(jt({},i),{expiryTimestamp:Ar(o)}),chainId:n},w=this.shouldSetTVF(f,p);return await Promise.all([new Promise(async m=>{await this.sendRequest(jt({clientRpcId:c,relayRpcId:l,topic:s,method:f,params:p,expiry:o,throwOnFailedPublish:!0},w&&{tvf:this.getTVFParams(c,p)})).catch(b=>h(b)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:c}),m()}),new Promise(async m=>{var b;if(!((b=a.sessionConfig)!=null&&b.disableDeepLink)){const v=await Ude(this.client.core.storage,K_);await Dde({id:c,topic:s,wcDeepLink:v})}m()}),u()]).then(m=>m[2])}),ue(this,"respond",async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:s}=i,o=this.client.session.get(n);o.transportType===Yt.relay&&await this.confirmOnlineStateOrThrow();const a=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Tr(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0,appLink:a}):cr(i)&&await this.sendError({id:s,topic:n,error:i.error,appLink:a}),this.cleanupAfterResponse(r)}),ue(this,"ping",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(r)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=zr(),s=Ai().toString(),{done:o,resolve:a,reject:c}=Ol();this.events.once(_t("session_ping",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:n}))}),ue(this,"emit",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(r);
vendor: 11,982 bytes, line 101
101const{topic:n,event:i,chainId:s}=r,o=Ai().toString(),a=zr();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:a})}),ue(this,"disconnect",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(r);const{topic:n}=r;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:kt("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=pe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),ue(this,"find",r=>(this.isInitialized(),this.client.session.getAll().filter(n=>Pfe(n,r)))),ue(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),ue(this,"authenticate",async(r,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(r);const s=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?Yt.link_mode:Yt.relay;o===Yt.relay&&await this.confirmOnlineStateOrThrow();const{chains:a,statement:c="",uri:l,domain:u,nonce:d,type:h,exp:f,nbf:g,methods:p=[],expiry:w}=r,m=[...r.resources||[]],{topic:b,uri:v}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:b,uri:v}});const E=await this.client.core.crypto.generateKeyPair(),I=b2(E);if(await Promise.all([this.client.auth.authKeys.set(E2,{responseTopic:I,publicKey:E}),this.client.auth.pairingTopics.set(I,{topic:I,pairingTopic:b})]),await this.client.core.relayer.subscribe(I,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${b}`),p.length>0){const{namespace:M}=bh(a[0]);let U=Ohe(M,"request",p);y2(m)&&(U=khe(U,m.pop())),m.push(U)}const _=w&&w>Dr.wc_sessionAuthenticate.req.ttl?w:Dr.wc_sessionAuthenticate.req.ttl,A={authPayload:{type:h??"caip122",chains:a,statement:c,aud:l,domain:u,version:"1",nonce:d,iat:new Date().toISOString(),exp:f,nbf:g,resources:m},requester:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:Ar(_)},P={eip155:{chains:a,methods:[...new Set(["personal_sign",...p])],events:["chainChanged","accountsChanged"]}},y={requiredNamespaces:{},optionalNamespaces:P,relays:[{protocol:"irn"}],pairingTopic:b,proposer:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:Ar(Dr.wc_sessionPropose.req.ttl),id:zr()},{done:O,resolve:S,reject:k}=Ol(_,"Request expired"),L=zr(),T=_t("session_connect",y.id),C=_t("session_request",L),x=async({error:M,session:U})=>{this.events.off(C,B),M?k(M):U&&S({session:U})},B=async M=>{var U,z,H;if(await this.deletePendingAuthRequest(L,{message:"fulfilled",code:0}),M.error){const ae=kt("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return M.error.code===ae.code?void 0:(this.events.off(T,x),k(M.error.message))}await this.deleteProposal(y.id),this.events.off(T,x);const{cacaos:Y,responder:V}=M.result,G=[],re=[];for(const ae of Y){await qx({cacao:ae,projectId:this.client.core.projectId})||(this.client.logger.error(ae,"Signature verification failed"),k(kt("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:be}=ae,Ce=y2(be.resources),ze=[J4(be.iss)],Qe=tw(be.iss);if(Ce){const vt=Hx(Ce),Qt=Vx(Ce);G.push(...vt),ze.push(...Qt)}for(const vt of ze)re.push(`${vt}:${Qe}`)}const de=await this.client.core.crypto.generateSharedKey(E,V.publicKey);let ce;G.length>0&&(ce={topic:de,acknowledged:!0,self:{publicKey:E,metadata:this.client.metadata},peer:V,controller:V.publicKey,expiry:Ar(zd),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:b,namespaces:w_([...new Set(G)],[...new Set(re)]),transportType:o},await this.client.core.relayer.subscribe(de,{transportType:o}),await this.client.session.set(de,ce),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:V.metadata}),ce=this.client.session.get(de)),(U=this.client.metadata.redirect)!=null&&U.linkMode&&(z=V.metadata.redirect)!=null&&z.linkMode&&(H=V.metadata.redirect)!=null&&H.universal&&n&&(this.client.core.addLinkModeSupportedApp(V.metadata.redirect.universal),this.client.session.update(de,{transportType:Yt.link_mode})),S({auths:Y,session:ce})};this.events.once(T,x),this.events.once(C,B);let R;try{if(s){const M=On("wc_sessionAuthenticate",A,L);this.client.core.history.set(b,M);const U=await this.client.core.crypto.encode("",M,{type:qp,encoding:Uc});R=Wg(n,b,U)}else await Promise.all([this.sendRequest({topic:b,method:"wc_sessionAuthenticate",params:A,expiry:r.expiry,throwOnFailedPublish:!0,clientRpcId:L}),this.sendRequest({topic:b,method:"wc_sessionPropose",params:y,expiry:Dr.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:y.id})])}catch(M){throw this.events.off(T,x),this.events.off(C,B),M}return await this.setProposal(y.id,y),await this.setAuthRequest(L,{request:An(jt({},A),{verifyContext:{}}),pairingTopic:b,transportType:o}),{uri:R??v,response:O}}),ue(this,"approveSessionAuthenticate",async r=>{const{id:n,auths:i}=r,s=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[Sl.authenticated_session_approve_started]}});try{this.isInitialized()}catch(w){throw s.setError(pf.no_internet_connection),w}const o=this.getPendingAuthRequest(n);if(!o)throw s.setError(pf.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);const a=o.transportType||Yt.relay;a===Yt.relay&&await this.confirmOnlineStateOrThrow();const c=o.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),u=b2(c),d={type:La,receiverPublicKey:c,senderPublicKey:l},h=[],f=[];for(const w of i){if(!await qx({cacao:w,projectId:this.client.core.projectId})){s.setError(pf.invalid_cacao);const I=kt("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:u,error:I,encodeOpts:d}),new Error(I.message)}s.addTrace(Sl.cacaos_verified);const{p:m}=w,b=y2(m.resources),v=[J4(m.iss)],E=tw(m.iss);if(b){const I=Hx(b),_=Vx(b);h.push(...I),v.push(..._)}for(const I of v)f.push(`${I}:${E}`)}const g=await this.client.core.crypto.generateSharedKey(l,c);s.addTrace(Sl.create_authenticated_session_topic);let p;if((h==null?void 0:h.length)>0){p={topic:g,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:c,metadata:o.requester.metadata},controller:c,expiry:Ar(zd),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:w_([...new Set(h)],[...new Set(f)]),transportType:a},s.addTrace(Sl.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(g,{transportType:a})}catch(w){throw s.setError(pf.subscribe_authenticated_session_topic_failure),w}s.addTrace(Sl.subscribe_authenticated_session_topic_success),await this.client.session.set(g,p),s.addTrace(Sl.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(Sl.publishing_authenticated_session_approve);try{await this.sendResult({topic:u,id:n,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,a)})}catch(w){throw s.setError(pf.authenticated_session_approve_publish_failure),w}return await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:p}}),ue(this,"rejectSessionAuthenticate",async r=>{this.isInitialized();const{id:n,reason:i}=r,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);s.transportType===Yt.relay&&await this.confirmOnlineStateOrThrow();const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=b2(o),l={type:La,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:Dr.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.client.proposal.delete(n,kt("USER_DISCONNECTED"))}),ue(this,"formatAuthMessage",r=>{this.isInitialized();const{request:n,iss:i}=r;return Dk(n,i)}),ue(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const r=this.relayMessageCache.shift();r&&await this.onRelayMessage(r)}catch(r){this.client.logger.error(r)}},50)}),ue(this,"cleanupDuplicatePairings",async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===r.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}}),ue(this,"deleteSession",async r=>{var n;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=r,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,kt("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(K_).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,kt("USER_DISCONNECTED"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=mo.idle),o&&this.client.events.emit("session_delete",{id:a,topic:i})}),ue(this,"deleteProposal",async(r,n)=>{if(n)try{const i=this.client.proposal.get(r),s=this.client.core.eventClient.getEvent({topic:i.pairingTopic});s==null||s.setError(_l.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(r,kt("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,"proposal")}),ue(this,"deletePendingSessionRequest",async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==r),i&&(this.sessionRequestQueue.state=mo.idle,this.client.events.emit("session_request_expire",{id:r}))}),ue(this,"deletePendingAuthRequest",async(r,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])}),ue(this,"setExpiry",async(r,n)=>{this.client.session.keys.includes(r)&&(this.client.core.expirer.set(r,n),await this.client.session.update(r,{expiry:n}))}),ue(this,"setProposal",async(r,n)=>{this.client.core.expirer.set(r,Ar(Dr.wc_sessionPropose.req.ttl)),await this.client.proposal.set(r,n)}),ue(this,"setAuthRequest",async(r,n)=>{const{request:i,pairingTopic:s,transportType:o=Yt.relay}=n;this.client.core.expirer.set(r,i.expiryTimestamp),await this.client.auth.requests.set(r,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:r,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),ue(this,"setPendingSessionRequest",async r=>{const{id:n,topic:i,params:s,verifyContext:o}=r,a=s.request.expiryTimestamp||Ar(Dr.wc_sessionRequest.req.ttl);
101this.client.core.expirer.set(n,a),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o})}),ue(this,"sendRequest",async r=>{const{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l,appLink:u,tvf:d}=r,h=On(i,s,c);let f;const g=!!u;try{const m=g?Uc:Hs;f=await this.client.core.crypto.encode(n,h,{encoding:m})}catch(m){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),m}let p;if(G2e.includes(i)){const m=Ao(JSON.stringify(h)),b=Ao(f);p=await this.client.core.verify.register({id:b,decryptedId:m})}const w=Dr[i].req;if(w.attestation=p,o&&(w.ttl=o),a&&(w.id=a),this.client.core.history.set(n,h),g){const m=Wg(u,n,f);await he.Linking.openURL(m,this.client.name)}else{const m=Dr[i].req;o&&(m.ttl=o),a&&(m.id=a),m.tvf=An(jt({},d),{correlationId:h.id}),l?(m.internal=An(jt({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,f,m)):this.client.core.relayer.publish(n,f,m).catch(b=>this.client.logger.error(b))}return h.id}),ue(this,"sendResult",async r=>{const{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a,appLink:c}=r,l=ll(n,s);let u;const d=c&&typeof(he==null?void 0:he.Linking)<"u";try{const g=d?Uc:Hs;u=await this.client.core.crypto.encode(i,l,An(jt({},a||{}),{encoding:g}))}catch(g){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),g}let h,f;try{h=await this.client.core.history.get(i,n);const g=h.request;try{this.shouldSetTVF(g.method,g.params)&&(f=this.getTVFParams(n,g.params,s))}catch(p){this.client.logger.warn("sendResult() -> getTVFParams() failed",p)}}catch(g){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),g}if(d){const g=Wg(c,i,u);await he.Linking.openURL(g,this.client.name)}else{const g=h.request.method,p=Dr[g].res;p.tvf=An(jt({},f),{correlationId:n}),o?(p.internal=An(jt({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,u,p)):this.client.core.relayer.publish(i,u,p).catch(w=>this.client.logger.error(w))}await this.client.core.history.resolve(l)}),ue(this,"sendError",async r=>{const{id:n,topic:i,error:s,encodeOpts:o,rpcOpts:a,appLink:c}=r,l=P0(n,s);let u;const d=c&&typeof(he==null?void 0:he.Linking)<"u";try{const f=d?Uc:Hs;u=await this.client.core.crypto.encode(i,l,An(jt({},o||{}),{encoding:f}))}catch(f){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),f}let h;try{h=await this.client.core.history.get(i,n)}catch(f){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),f}if(d){const f=Wg(c,i,u);await he.Linking.openURL(f,this.client.name)}else{const f=h.request.method,g=a||Dr[f].res;this.client.core.relayer.publish(i,u,g)}await this.client.core.history.resolve(l)}),ue(this,"cleanup",async()=>{const r=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;Lc(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{Lc(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),ue(this,"onProviderMessageEvent",async r=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(r):await this.onRelayMessage(r)}),ue(this,"onRelayEventRequest",async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()}),ue(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===mo.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=mo.active;const r=this.requestQueue.queue.shift();if(r)try{await this.processRequest(r)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=mo.idle}),ue(this,"processRequest",async r=>{const{topic:n,payload:i,attestation:s,transportType:o,encryptedId:a}=r,c=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:c}))switch(c){case"wc_sessionPropose":return await this.onSessionProposeRequest
vendor: 12,767 bytes, line 101
101({topic:n,payload:i,attestation:s,encryptedId:a});case"wc_sessionSettle":return await this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(n,i);case"wc_sessionPing":return await this.onSessionPingRequest(n,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});case"wc_sessionEvent":return await this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});default:return this.client.logger.info(`Unsupported request method ${c}`)}}),ue(this,"onRelayEventResponse",async r=>{const{topic:n,payload:i,transportType:s}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),ue(this,"onRelayEventUnknownPayload",r=>{const{topic:n}=r,{message:i}=pe("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),ue(this,"shouldIgnorePairingRequest",r=>{const{topic:n,requestMethod:i}=r,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),ue(this,"onSessionProposeRequest",async r=>{const{topic:n,payload:i,attestation:s,encryptedId:o}=r,{params:a,id:c}=i;try{const l=this.client.core.eventClient.getEvent({topic:n});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),l==null||l.setError(va.proposal_listener_not_found)),this.isValidConnect(jt({},i.params));const u=a.expiryTimestamp||Ar(Dr.wc_sessionPropose.req.ttl),d=jt({id:c,pairingTopic:n,expiryTimestamp:u},a);await this.setProposal(c,d);const h=await this.getVerifyContext({attestationId:s,hash:Ao(JSON.stringify(i)),encryptedId:o,metadata:d.proposer.metadata});l==null||l.addTrace(Co.emit_session_proposal),this.client.events.emit("session_proposal",{id:c,params:d,verifyContext:h})}catch(l){await this.sendError({id:c,topic:n,error:l,rpcOpts:Dr.wc_sessionPropose.autoReject}),this.client.logger.error(l)}}),ue(this,"onSessionProposeResponse",async(r,n,i)=>{const{id:s}=n;if(Tr(n)){const{result:o}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const a=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const c=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:c});const l=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const u=await this.client.core.crypto.generateSharedKey(c,l);this.pendingSessions.set(s,{sessionTopic:u,pairingTopic:r,proposalId:s,publicKey:c});const d=await this.client.core.relayer.subscribe(u,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:d}),await this.client.core.pairing.activate({topic:r})}else if(cr(n)){await this.client.proposal.delete(s,kt("USER_DISCONNECTED"));const o=_t("session_connect",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:n.error})}}),ue(this,"onSessionSettleRequest",async(r,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:u,scopedProperties:d,sessionConfig:h}=n.params,f=[...this.pendingSessions.values()].find(w=>w.sessionTopic===r);if(!f)return this.client.logger.error(`Pending session not found for topic ${r}`);const g=this.client.proposal.get(f.proposalId),p=An(jt(jt(jt({topic:r,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:f.pairingTopic,requiredNamespaces:g.requiredNamespaces,optionalNamespaces:g.optionalNamespaces,controller:a.publicKey,self:{publicKey:f.publicKey,metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},u&&{sessionProperties:u}),d&&{scopedProperties:d}),h&&{sessionConfig:h}),{transportType:Yt.relay});await this.client.session.set(p.topic,p),await this.setExpiry(p.topic,p.expiry),await this.client.core.pairing.updateMetadata({topic:f.pairingTopic,metadata:p.peer.metadata}),this.client.events.emit("session_connect",{session:p}),this.events.emit(_t("session_connect",f.proposalId),{session:p}),this.pendingSessions.delete(f.proposalId),this.deleteProposal(f.proposalId,!1),this.cleanupDuplicatePairings(p),await this.sendResult({id:n.id,topic:r,result:!0,throwOnFailedPublish:!0})}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),ue(this,"onSessionSettleResponse",async(r,n)=>{const{id:i}=n;Tr(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(_t("session_approve",i),{})):cr(n)&&(await this.client.session.delete(r,kt("USER_DISCONNECTED")),this.events.emit(_t("session_approve",i),{error:n.error}))}),ue(this,"onSessionUpdateRequest",async(r,n)=>{const{params:i,id:s}=n;try{const o=`${r}_session_update`,a=hf.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:r,error:kt("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(jt({topic:r},i));try{hf.set(o,s),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:r,result:!0,throwOnFailedPublish:!0})}catch(c){throw hf.delete(o),c}this.client.events.emit("session_update",{id:s,topic:r,params:i})}catch(o){await this.sendError({id:s,topic:r,error:o}),this.client.logger.error(o)}}),ue(this,"isRequestOutOfSync",(r,n)=>n.toString().slice(0,-3)<r.toString().slice(0,-3)),ue(this,"onSessionUpdateResponse",(r,n)=>{const{id:i}=n,s=_t("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Tr(n)?this.events.emit(_t("session_update",i),{}):cr(n)&&this.events.emit(_t("session_update",i),{error:n.error})}),ue(this,"onSessionExtendRequest",async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Ar(zd)),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),ue(this,"onSessionExtendResponse",(r,n)=>{const{id:i}=n,s=_t("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Tr(n)?this.events.emit(_t("session_extend",i),{}):cr(n)&&this.events.emit(_t("session_extend",i),{error:n.error})}),ue(this,"onSessionPingRequest",async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),ue(this,"onSessionPingResponse",(r,n)=>{const{id:i}=n,s=_t("session_ping",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Tr(n)?this.events.emit(_t("session_ping",i),{}):cr(n)&&this.events.emit(_t("session_ping",i),{error:n.error})},500)}),ue(this,"onSessionDeleteRequest",async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),Promise.all([new Promise(s=>{this.client.core.relayer.once(Hr.publish,async()=>{s(await this.deleteSession({topic:r,id:i}))})}),this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:r,error:kt("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),ue(this,"onSessionRequest",async r=>{var n,i,s;const{topic:o,payload:a,attestation:c,encryptedId:l,transportType:u}=r,{id:d,params:h}=a;try{await this.isValidRequest(jt({topic:o},h));const f=this.client.session.get(o),g=await this.getVerifyContext({attestationId:c,hash:Ao(JSON.stringify(On("wc_sessionRequest",h,d))),encryptedId:l,metadata:f.peer.metadata,transportType:u}),p={id:d,topic:o,params:h,verifyContext:g};await this.setPendingSessionRequest(p),u===Yt.link_mode&&(n=f.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=f.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(p):(this.addSessionRequestToSessionRequestQueue(p),this.processSessionRequestQueue())}catch(f){await this.sendError({id:d,topic:o,error:f}),this.client.logger.error(f)}}),ue(this,"onSessionRequestResponse",(r,n)=>{const{id:i}=n,s=_t("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Tr(n)?this.events.emit(_t("session_request",i),{result:n.result}):cr(n)&&this.events.emit(_t("session_request",i),{error:n.error})}),ue(this,"onSessionEventRequest",async(r,n)=>{const{id:i,params:s}=n;try{const o=`${r}_session_event_${s.event.name}`,a=hf.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(jt({topic:r},s)),this.client.events.emit("session_event",{id:i,topic:r,params:s}),hf.set(o,i)}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),ue(this,"onSessionAuthenticateResponse",(r,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:r,payload:n}),Tr(n)?this.events.emit(_t("session_request",i),{result:n.result}):cr(n)&&this.events.emit(_t("session_request",i),{error:n.error})}),ue(this,"onSessionAuthenticateRequest",async r=>{var n;const{topic:i,payload:s,attestation:o,encryptedId:a,transportType:c}=r;try{const{requester:l,authPayload:u,expiryTimestamp:d}=s.params,h=await this.getVerifyContext({attestationId:o,hash:Ao(JSON.stringify(s)),encryptedId:a,metadata:l.metadata,transportType:c}),f={requester:l,pairingTopic:i,id:s.id,authPayload:u,verifyContext:h,expiryTimestamp:d};await this.setAuthRequest(s.id,{request:f,pairingTopic:i,transportType:c}),c===Yt.link_mode&&(n=l.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:s.params,id:s.id,verifyContext:h})}catch(l){this.client.logger.error(l);const u=s.params.requester.publicKey,d=await this.client.core.crypto.generateKeyPair(),h=this.getAppLinkIfEnabled(s.params.requester.metadata,c),f={type:La,receiverPublicKey:u,senderPublicKey:d};await this.sendError({id:s.id,topic:i,error:l,encodeOpts:f,rpcOpts:Dr.wc_sessionAuthenticate.autoReject,appLink:h})}}),ue(this,"addSessionRequestToSessionRequestQueue",r=>{this.sessionRequestQueue.queue.push(r)}),ue(this,"cleanupAfterResponse",r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=mo.idle,this.processSessionRequestQueue()},X.toMiliseconds(this.requestQueueDelay))}),ue(this,"cleanupPendingSentRequestsForTopic",({topic:r,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===r&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=_t("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(_t("session_request",s.request.id),{error:n})})}),ue(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===mo.active){this.client.logger.info("session request queue is already active.");return}const r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=mo.active,this.emitSessionRequest(r)}catch(n){this.client.logger.error(n)}}),ue(this,"emitSessionRequest",r=>{this.client.events.emit("session_request",r)}),ue(this,"onPairingCreated",r=>{if(r.methods&&this.expectedPairingMethodMap.set(r.topic,r.methods),r.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);
101n&&this.onSessionProposeRequest({topic:r.topic,payload:On("wc_sessionPropose",An(jt({},n),{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties,scopedProperties:n.scopedProperties}),n.id)})}),ue(this,"isValidConnect",async r=>{if(!Qn(r)){const{message:l}=pe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:a,relays:c}=r;if(on(n)||await this.isValidPairingTopic(n),!zfe(c)){const{message:l}=pe("MISSING_OR_INVALID",`connect() relays: ${c}`);throw new Error(l)}if(!on(i)&&Gc(i)!==0){const l="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(l):this.client.logger.warn(l),this.validateNamespaces(i,"requiredNamespaces")}if(!on(s)&&Gc(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),on(o)||this.validateSessionProps(o,"sessionProperties"),!on(a)){this.validateSessionProps(a,"scopedProperties");const l=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(a).every(u=>l.includes(u)))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(l)}`)}}),ue(this,"validateNamespaces",(r,n)=>{const i=jfe(r,"connect()",n);if(i)throw new Error(i.message)}),ue(this,"isValidApprove",async r=>{if(!Qn(r))throw new Error(pe("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:a}=r;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const c=this.client.proposal.get(n),l=R5(i,"approve()");if(l)throw new Error(l.message);const u=b_(c.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!xr(s,!0)){const{message:d}=pe("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(d)}if(on(o)||this.validateSessionProps(o,"sessionProperties"),!on(a)){this.validateSessionProps(a,"scopedProperties");const d=new Set(Object.keys(i));if(!Object.keys(a).every(h=>d.has(h)))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(d).join(", ")}`)}}),ue(this,"isValidReject",async r=>{if(!Qn(r)){const{message:s}=pe("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(s)}const{id:n,reason:i}=r;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!qfe(i)){const{message:s}=pe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),ue(this,"isValidSessionSettleRequest",r=>{if(!Qn(r)){const{message:l}=pe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(l)}const{relay:n,controller:i,namespaces:s,expiry:o}=r;if(!cR(n)){const{message:l}=pe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const a=Rfe(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const c=R5(s,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(Lc(o)){const{message:l}=pe("EXPIRED","onSessionSettleRequest()");throw new Error(l)}}),ue(this,"isValidUpdate",async r=>{if(!Qn(r)){const{message:c}=pe("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}const{topic:n,namespaces:i}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const s=this.client.session.get(n),o=R5(i,"update()");if(o)throw new Error(o.message);const a=b_(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)}),ue(this,"isValidExtend",async r=>{if(!Qn(r)){const{message:i}=pe("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)}),ue(this,"isValidRequest",async r=>{if(!Qn(r)){const{message:c}=pe("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}const{topic:n,request:i,chainId:s,expiry:o}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!y_(a,s)){const{message:c}=pe("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(c)}if(!Hfe(i)){const{message:c}=pe("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!Kfe(a,s,i.method)){const{message:c}=pe("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!Jfe(o,F5)){const{message:c}=pe("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${F5.min} and ${F5.max}`);throw new Error(c)}}),ue(this,"isValidRespond",async r=>{var n;if(!Qn(r)){const{message:o}=pe("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(o)}const{topic:i,response:s}=r;try{await this.isValidSessionTopic(i)}catch(o){throw(n=r==null?void 0:r.response)!=null&&n.id&&this.cleanupAfterResponse(r),o}
101if(!Vfe(s)){const{message:o}=pe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),ue(this,"isValidPing",async r=>{if(!Qn(r)){const{message:i}=pe("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),ue(this,"isValidEmit",async r=>{if(!Qn(r)){const{message:a}=pe("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(a)}const{topic:n,event:i,chainId:s}=r;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!y_(o,s)){const{message:a}=pe("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!Wfe(i)){const{message:a}=pe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!Zfe(o,s,i.name)){const{message:a}=pe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}}),ue(this,"isValidDisconnect",async r=>{if(!Qn(r)){const{message:i}=pe("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),ue(this,"isValidAuthenticate",r=>{const{chains:n,uri:i,domain:s,nonce:o}=r;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!xr(i,!1))throw new Error("uri is required parameter");if(!xr(s,!1))throw new Error("domain is required parameter");if(!xr(o,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(c=>bh(c).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=bh(n[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),ue(this,"getVerifyContext",async r=>{const{attestationId:n,hash:i,encryptedId:s,metadata:o,transportType:a}=r,c={verified:{verifyUrl:o.verifyUrl||Xf,validation:"UNKNOWN",origin:o.url||""}};try{if(a===Yt.link_mode){const u=this.getAppLinkIfEnabled(o,a);return c.verified.validation=u&&new URL(u).origin===new URL(o.url).origin?"VALID":"INVALID",c}const l=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(o.url).origin?"VALID":"INVALID")}catch(l){this.client.logger.warn(l)}return this.client.logger.debug(`Verify context: ${JSON.stringify(c)}`),c}),ue(this,"validateSessionProps",(r,n)=>{Object.values(r).forEach((i,s)=>{if(i==null){const{message:o}=pe("MISSING_OR_INVALID",`${n} must contain an existing value for each key. Received: ${i} for key ${Object.keys(r)[s]}`);throw new Error(o)}})}),ue(this,"getPendingAuthRequest",r=>{const n=this.client.auth.requests.get(r);return typeof n=="object"?n:void 0}),ue(this,"addToRecentlyDeleted",(r,n)=>{if(this.recentlyDeletedMap.set(r,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),ue(this,"checkRecentlyDeleted",r=>{const n=this.recentlyDeletedMap.get(r);if(n){const{message:i}=pe("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${r}`);throw new Error(i)}}),ue(this,"isLinkModeEnabled",(r,n)=>{var i,s,o,a,c,l,u,d,h;return!r||n!==Yt.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((a=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:a.universal)!==void 0&&((l=(c=this.client.metadata)==null?void 0:c.redirect)==null?void 0:l.universal)!==""&&((u=r==null?void 0:r.redirect)==null?void 0:u.universal)!==void 0&&((d=r==null?void 0:r.redirect)==null?void 0:d.universal)!==""&&((h=r==null?void 0:r.redirect)==null?void 0:h.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(r.redirect.universal)&&typeof(he==null?void 0:he.Linking)<"u"}),ue(this,"getAppLinkIfEnabled",(r,n)=>{var i;return this.isLinkModeEnabled(r,n)?(i=r==null?void 0:r.redirect)==null?void 0:i.universal:void 0}),ue(this,"handleLinkModeMessage",({url:r})=>{if(!r||!r.includes("wc_ev")||!r.includes("topic"))return;const n=Rx(r,"topic")||"",i=decodeURIComponent(Rx(r,"wc_ev")||""),s=this.client.session.keys.includes(n);s&&this.client.session.update(n,{transportType:Yt.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:s})}),ue(this,"registerLinkModeListeners",async()=>{var r;if(o8()||ul()&&(r=this.client.metadata.redirect)!=null&&r.linkMode){const n=he==null?void 0:he.Linking;if(typeof n<"u"){n.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),ue(this,"shouldSetTVF",(r,n)=>{if(!n||r!=="wc_sessionRequest")return!1;const{request:i}=n;return Object.keys(G_).includes(i.method)}),ue(this,"getTVFParams",(r,n,i)=>{var s,o;try{const a=n.request.method,c=this.extractTxHashesFromResult(a,i);return An(jt({correlationId:r,rpcMethods:[a],chainId:n.chainId},this.isValidContractData(n.request.params)&&{contractAddresses:[(o=(s=n.request.params)==null?void 0:s[0])==null?void 0:o.to]}),{txHashes:c})}catch(a){this.client.logger.warn("Error getting TVF params",a)}return{}}),ue(this,"isValidContractData",r=>{var n;if(!r)return!1;try{const i=(r==null?void 0:r.data)||((n=r==null?void 0:r[0])==null?void 0:n.data);if(!i.startsWith("0x"))return!1;const s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),ue(this,"extractTxHashesFromResult",(r,n)=>{try{const i=G_[r];
vendor: 5,422 bytes, line 101
101if(typeof n=="string")return[n];const s=n[i.key];if(Zc(s))return r==="solana_signAllTransactions"?s.map(o=>mhe(o)):s;if(typeof s=="string")return[s]}catch(i){this.client.logger.warn("Error extracting tx hashes from result",i)}return[]})}async processPendingMessageEvents(){try{const e=this.client.session.keys,r=this.client.core.relayer.messages.getWithoutAck(e);for(const[n,i]of Object.entries(r))for(const s of i)try{await this.onProviderMessageEvent({topic:n,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${n}, message: ${s}`)}}catch(e){this.client.logger.warn("processPendingMessageEvents failed",e)}}isInitialized(){if(!this.initialized){const{message:e}=pe("NOT_INITIALIZED",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Hr.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){const{topic:r,message:n,attestation:i,transportType:s}=e,{publicKey:o}=this.client.auth.authKeys.keys.includes(E2)?this.client.auth.authKeys.get(E2):{publicKey:void 0};try{const a=await this.client.core.crypto.decode(r,n,{receiverPublicKey:o,encoding:s===Yt.link_mode?Uc:Hs});T0(a)?(this.client.core.history.set(r,a),await this.onRelayEventRequest({topic:r,payload:a,attestation:i,transportType:s,encryptedId:Ao(n)})):Vu(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:r,payload:a,transportType:s}),this.client.core.history.delete(r,a.id)):await this.onRelayEventUnknownPayload({topic:r,payload:a,transportType:s}),await this.client.core.relayer.messages.ack(r,n)}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(is.expired,async e=>{const{topic:r,id:n}=$k(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,pe("EXPIRED"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,pe("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession({topic:r,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Ul.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(Ul.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!xr(e,!1)){const{message:r}=pe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=pe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(Lc(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=pe("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!xr(e,!1)){const{message:r}=pe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:r}=pe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(Lc(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:r}=pe("EXPIRED",`session topic: ${e}`);throw new Error(r)}if(!this.client.core.crypto.keychain.has(e)){const{message:r}=pe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(xr(e,!1)){const{message:r}=pe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=pe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!Ffe(e)){const{message:r}=pe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=pe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(Lc(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:r}=pe("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class awe extends Ju{constructor(e,r){super(e,r,V2e,p8),this.core=e,this.logger=r}}let cwe=class extends Ju{constructor(e,r){super(e,r,W2e,p8),this.core=e,this.logger=r}};class lwe extends Ju{constructor(e,r){super(e,r,Z2e,p8,n=>n.id),this.core=e,this.logger=r}}class uwe extends Ju{constructor(e,r){super(e,r,X2e,Cm,()=>E2),this.core=e,this.logger=r}}class dwe extends Ju{constructor(e,r){super(e,r,Q2e,Cm),this.core=e,this.logger=r}}class hwe extends Ju{constructor(e,r){super(e,r,ewe,Cm,n=>n.id),this.core=e,this.logger=r}}var fwe=Object.defineProperty,pwe=(t,e,r)=>e in t?fwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,q5=(t,e,r)=>pwe(t,typeof e!="symbol"?e+"":e,r);class gwe{constructor(e,r){this.core=e,this.logger=r,q5(this,"authKeys"),q5(this,"pairingTopics"),q5(this,"requests"),this.authKeys=new uwe(this.core,this.logger),this.pairingTopics=new dwe(this.core,this.logger),this.requests=new hwe(this.core,this.logger)}
101async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var wwe=Object.defineProperty,mwe=(t,e,r)=>e in t?wwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nt=(t,e,r)=>mwe(t,typeof e!="symbol"?e+"":e,r);let ywe=class PR extends jle{constructor(e){super(e),nt(this,"protocol",IR),nt(this,"version",$R),nt(this,"name",z5.name),nt(this,"metadata"),nt(this,"core"),nt(this,"logger"),nt(this,"events",new Nr.EventEmitter),nt(this,"engine"),nt(this,"session"),nt(this,"proposal"),nt(this,"pendingRequest"),nt(this,"auth"),nt(this,"signConfig"),nt(this,"on",(n,i)=>this.events.on(n,i)),nt(this,"once",(n,i)=>this.events.once(n,i)),nt(this,"off",(n,i)=>this.events.off(n,i)),nt(this,"removeListener",(n,i)=>this.events.removeListener(n,i)),nt(this,"removeAllListeners",n=>this.events.removeAllListeners(n)),nt(this,"connect",async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"pair",async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"approve",async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"reject",async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"update",async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"extend",async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"request",async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"respond",async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"ping",async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"emit",async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"disconnect",async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"find",n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}}),nt(this,"authenticate",async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(s){throw this.logger.error(s.message),s}}),nt(this,"formatAuthMessage",n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"approveSessionAuthenticate",async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),nt(this,"rejectSessionAuthenticate",async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),this.name=(e==null?void 0:e.name)||z5.name,this.metadata=Tde(e==null?void 0:e.metadata),this.signConfig=e==null?void 0:e.signConfig;const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:al(cl({level:(e==null?void 0:e.logger)||z5.logger}));this.core=(e==null?void 0:e.core)||new H2e(e),this.logger=St(r,this.name),this.session=new cwe(this.core,this.logger),this.proposal=new awe(this.core,this.logger),this.pendingRequest=new lwe(this.core,this.logger),this.engine=new owe(this),this.auth=new gwe(this.core,this.logger)}static async init(e){const r=new PR(e);return await r.initialize(),r}get context(){return qt(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success"),setTimeout(()=>{this.engine.processRelayMessageCache()},X.toMiliseconds(X.ONE_SECOND))}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};
101const J_="error",bwe="wss://relay.walletconnect.org",vwe="wc",Ewe="universal_provider",Zg=`${vwe}@2:${Ewe}:`,TR="https://rpc.walletconnect.org/v1/",ih="generic",Cwe=`${TR}bundler`,_s={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function xwe(){}function g8(t){return t==null||typeof t!="object"&&typeof t!="function"}function w8(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function _we(t){if(g8(t))return t;if(Array.isArray(t)||w8(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const n=new r(t);return n.lastIndex=t.lastIndex,n}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){const n=new r(t.message);return n.stack=t.stack,n.name=t.name,n.cause=t.cause,n}if(typeof File<"u"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const n=Object.create(e);return Object.assign(n,t)}return t}function X_(t){return typeof t=="object"&&t!==null}function OR(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function NR(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Swe="[object RegExp]",kR="[object String]",RR="[object Number]",BR="[object Boolean]",DR="[object Arguments]",Iwe="[object Symbol]",$we="[object Date]",Awe="[object Map]",Pwe="[object Set]",Twe="[object Array]",Owe="[object ArrayBuffer]",Nwe="[object Object]",kwe="[object DataView]",Rwe="[object Uint8Array]",Bwe="[object Uint8ClampedArray]",Dwe="[object Uint16Array]",Lwe="[object Uint32Array]",Mwe
101="[object Int8Array]",Uwe="[object Int16Array]",jwe="[object Int32Array]",zwe="[object Float32Array]",Fwe="[object Float64Array]";function qwe(t,e){return hh(t,void 0,t,new Map,e)}function hh(t,e,r,n=new Map,i=void 0){const s=i==null?void 0:i(t,e,r,n);if(s!=null)return s;if(g8(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){const o=new Array(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=hh(t[a],a,r,n,i);return Object.hasOwn(t,"index")&&(o.index=t.index),Object.hasOwn(t,"input")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){const o=new Map;n.set(t,o);for(const[a,c]of t)o.set(a,hh(c,a,r,n,i));return o}if(t instanceof Set){const o=new Set;n.set(t,o);for(const a of t)o.add(hh(a,void 0,r,n,i));return o}if(typeof Oe<"u"&&Oe.isBuffer(t))return t.subarray();if(w8(t)){const o=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=hh(t[a],a,r,n,i);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,o),jl(o,t,r,n,i),o}if(typeof File<"u"&&t instanceof File){const o=new File([t],t.name,{type:t.type});return n.set(t,o),jl(o,t,r,n,i),o}if(t instanceof Blob){const o=new Blob([t],{type:t.type});return n.set(t,o),jl(o,t,r,n,i),o}if(t instanceof Error){const o=new t.constructor;return n.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,jl(o,t,r,n,i),o}if(typeof t=="object"&&Hwe(t)){const o=Object.create(Object.getPrototypeOf(t));return n.set(t,o),jl(o,t,r,n,i),o}return t}function jl(t,e,r=t,n,i){const s=[...Object.keys(e),...OR(e)];for(let o=0;o<s.length;o++){const a=s[o],c=Object.getOwnPropertyDescriptor(t,a);(c==null||c.writable)&&(t[a]=hh(e[a],a,r,n,i))}}function Hwe(t){switch(NR(t)){case DR:case Twe:case Owe:case kwe:case BR:case $we:case zwe:case Fwe:case Mwe:case Uwe:case jwe:case Awe:case RR:case Nwe:case Swe:case Pwe:case kR:case Iwe:case Rwe:case Bwe:case Dwe:case Lwe:return!0;default:return!1}}function Vwe(t,e){return qwe(t,(r,n,i,s)=>{if(typeof t=="object")switch(Object.prototype.toString.call(t)){case RR:case kR:case BR:{const o=new t.constructor(t==null?void 0:t.valueOf());return jl(o,t),o}case DR:{const o={};return jl(o,t),o.length=t.length,o[Symbol.iterator]=t[Symbol.iterator],o}default:return}})}function Q_(t){return Vwe(t)}function eS(t){return t!==null&&typeof t=="object"&&NR(t)==="[object Arguments]"}function Wwe(t){return w8(t)}function Kwe(t){var r;if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!((r=Object.getOwnPropertyDescriptor(t,Symbol.toStringTag))!=null&&r.writable)?!1:t.toString()===`[object ${n}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Zwe(t,...e){const r=e.slice(0,-1),n=e[e.length-1];let i=t;for(let s=0;s<r.length;s++){const o=r[s];i=b6(i,o,n,new Map)}return i}function b6(t,e,r,n){if(g8(t)&&(t=Object(t)),e==null||typeof e!="object")return t;if(n.has(e))return _we(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}const i=[...Object.keys(e),...OR(e)];for(let s=0;s<i.length;s++){const o=i[s];let a=e[o],c=t[o];if(eS(a)&&(a={...a}),eS(c)&&(c={...c}),typeof Oe<"u"&&Oe.isBuffer(a)&&(a=Q_(a)),Array.isArray(a))if(typeof c=="object"&&c!=null){const u=[],d=Reflect.ownKeys(c);for(let h=0;h<d.length;h++){const f=d[h];u[f]=c[f]}c=u}else c=[];const l=r(c,a,o,t,e,n);l!=null?t[o]=l:Array.isArray(a)||X_(c)&&X_(a)?t[o]=b6(c,a,r,n):c==null&&Kwe(a)?t[o]=b6({},a,r,n):c==null&&Wwe(a)?t[o]=Q_(a):(c===void 0||a!==void 0)&&(t[o]=a)}return t}function Gwe(t,...e){return Zwe(t,...e,xwe)}var Ywe=Object.defineProperty,Jwe=Object.defineProperties,Xwe=Object.getOwnPropertyDescriptors,tS=Object.getOwnPropertySymbols,Qwe=Object.prototype.hasOwnProperty,eme=Object.prototype.propertyIsEnumerable,rS=(t,e,r)=>e in t?Ywe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gg=(t,e)=>{for(var r in e||(e={}))Qwe.call(e,r)&&rS(t,r,e[r]);if(tS)for(var r of tS(e))eme.call(e,r)&&rS(t,r,e[r]);return t},tme=(t,e)=>Jwe(t,Xwe(e));function Di(t,e,r){var n;const i=bh(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${TR}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Xu(t){return t.includes(":")?t.split(":")[1]:t}function LR(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function rme(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>
101{const s=e.namespaces[i].accounts;n.push(...s)}),n}function Yg(t={},e={}){const r=nS(t),n=nS(e);return Gwe(r,n)}function nS(t){var e,r,n,i,s;const o={};if(!Gc(t))return o;for(const[a,c]of Object.entries(t)){const l=vm(a)?[a]:c.chains,u=c.methods||[],d=c.events||[],h=c.rpcMap||{},f=dh(a);o[f]=tme(Gg(Gg({},o[f]),c),{chains:Do(l,(e=o[f])==null?void 0:e.chains),methods:Do(u,(r=o[f])==null?void 0:r.methods),events:Do(d,(n=o[f])==null?void 0:n.events)}),(Gc(h)||Gc(((i=o[f])==null?void 0:i.rpcMap)||{}))&&(o[f].rpcMap=Gg(Gg({},h),(s=o[f])==null?void 0:s.rpcMap))}return o}function iS(t){return t.includes(":")?t.split(":")[2]:t}function sS(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=vm(r)?[r]:n.chains?n.chains:LR(n.accounts);e[r]={chains:a,methods:i,events:s,accounts:o}}return e}function H5(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):(t=t.includes(":")?t.split(":")[1]:t,isNaN(Number(t))?t:Number(t))}const MR={},wt=t=>MR[t],V5=(t,e)=>{MR[t]=e};var nme=Object.defineProperty,ime=(t,e,r)=>e in t?nme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Fd=(t,e,r)=>ime(t,typeof e!="symbol"?e+"":e,r);class sme{constructor(e){Fd(this,"name","polkadot"),Fd(this,"client"),Fd(this,"httpProviders"),Fd(this,"events"),Fd(this,"namespace"),Fd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Xu(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var ome=Object.defineProperty,ame=Object.defineProperties,cme=Object.getOwnPropertyDescriptors,oS=Object.getOwnPropertySymbols,lme=Object.prototype.hasOwnProperty,ume=Object.prototype.propertyIsEnumerable,v6=(t,e,r)=>e in t?ome(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,aS=(t,e)=>{for(var r in e||(e={}))lme.call(e,r)&&v6(t,r,e[r]);if(oS)for(var r of oS(e))ume.call(e,r)&&v6(t,r,e[r]);return t},cS=(t,e)=>ame(t,cme(e)),qd=(t,e,r)=>v6(t,typeof e!="symbol"?e+"":e,r);class dme{constructor(e){qd(this,"name","eip155"),qd(this,"client"),qd(this,"chainId"),qd(this,"namespace"),qd(this,"httpProviders"),qd(this,"events"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const n=r||Di(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=parseInt(Xu(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var r,n,i,s,o;const a=(n=(r=e.request)==null?void 0:r.params)==null?void 0:n[0],c=((s=(i=e.request)==null?void 0:i.params)==null?void 0:s[1])||[],l=`${a}${c.join(",")}`;if(!a)throw new Error("Missing address parameter in `wallet_getCapabilities` request");
101const u=this.client.session.get(e.topic),d=((o=u==null?void 0:u.sessionProperties)==null?void 0:o.capabilities)||{};if(d!=null&&d[l])return d==null?void 0:d[l];const h=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:cS(aS({},u.sessionProperties||{}),{capabilities:cS(aS({},d||{}),{[l]:h})})})}catch(f){console.warn("Failed to update session with capabilities",f)}return h}async getCallStatus(e){var r,n;const i=this.client.session.get(e.topic),s=(r=i.sessionProperties)==null?void 0:r.bundler_name;if(s){const a=this.getBundlerUrl(e.chainId,s);try{return await this.getUserOperationReceipt(a,e)}catch(c){console.warn("Failed to fetch call status from bundler",c,a)}}const o=(n=i.sessionProperties)==null?void 0:n.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(a){console.warn("Failed to fetch call status from custom bundler",a,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,r){var n;const i=new URL(e),s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(On("eth_getUserOperationReceipt",[(n=r.request.params)==null?void 0:n[0]]))});if(!s.ok)throw new Error(`Failed to fetch user operation receipt - ${s.status}`);return await s.json()}getBundlerUrl(e,r){return`${Cwe}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${r}`}}var hme=Object.defineProperty,fme=(t,e,r)=>e in t?hme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Hd=(t,e,r)=>fme(t,typeof e!="symbol"?e+"":e,r);class pme{constructor(e){Hd(this,"name","solana"),Hd(this,"client"),Hd(this,"httpProviders"),Hd(this,"events"),Hd(this,"namespace"),Hd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Xu(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var gme=Object.defineProperty,wme=(t,e,r)=>e in t?gme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Vd=(t,e,r)=>wme(t,typeof e!="symbol"?e+"":e,r);class mme{constructor(e){Vd(this,"name","cosmos"),Vd(this,"client"),
101Vd(this,"httpProviders"),Vd(this,"events"),Vd(this,"namespace"),Vd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Xu(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var yme=Object.defineProperty,bme=(t,e,r)=>e in t?yme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Wd=(t,e,r)=>bme(t,typeof e!="symbol"?e+"":e,r);class vme{constructor(e){Wd(this,"name","algorand"),Wd(this,"client"),Wd(this,"httpProviders"),Wd(this,"events"),Wd(this,"namespace"),Wd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||Di(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new nr(new ur(n,wt("disableProviderPing")))}}var Eme=Object.defineProperty,Cme=(t,e,r)=>e in t?Eme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Kd=(t,e,r)=>Cme(t,typeof e!="symbol"?e+"":e,r);class xme{constructor(e){Kd(this,"name","cip34"),Kd(this,"client"),Kd(this,"httpProviders"),Kd(this,"events"),Kd(this,"namespace"),Kd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const n=this.getCardanoRPCUrl(r),i=Xu(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var _me=Object.defineProperty,Sme=(t,e,r)=>e in t?_me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Zd=(t,e,r)=>Sme(t,typeof e!="symbol"?e+"":e,r);class Ime{constructor(e){Zd(this,"name","elrond"),Zd(this,"client"),Zd(this,"httpProviders"),Zd(this,"events"),Zd(this,"namespace"),Zd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Xu(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var $me=Object.defineProperty,Ame=(t,e,r)=>e in t?$me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gd=(t,e,r)=>Ame(t,typeof e!="symbol"?e+"":e,r);class Pme{constructor(e){Gd(this,"name","multiversx"),Gd(this,"client"),Gd(this,"httpProviders"),Gd(this,"events"),Gd(this,"namespace"),Gd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Xu(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var Tme=Object.defineProperty,Ome=(t,e,r)=>e in t?Tme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Yd=(t,e,r)=>Ome(t,typeof e!="symbol"?e+"":e,r);class Nme{constructor(e){Yd(this,"name","near"),Yd(this,"client"),Yd(this,"httpProviders"),Yd(this,"events"),Yd(this,"namespace"),Yd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||Di(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace);return typeof n>"u"?void 0:new nr(new ur(n,wt("disableProviderPing")))}}var kme=Object.defineProperty,Rme=(t,e,r)=>e in t?kme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Jd=(t,e,r)=>Rme(t,typeof e!="symbol"?e+"":e,r);class Bme{constructor(e){Jd(this,"name","tezos"),Jd(this,"client"),Jd(this,"httpProviders"),Jd(this,"events"),Jd(this,"namespace"),Jd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||Di(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{e[r]=this.createHttpProvider(r)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace);return typeof n>"u"?void 0:new nr(new ur(n))}}var Dme=Object.defineProperty,Lme=(t,e,r)=>e in t?Dme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xd=(t,e,r)=>Lme(t,typeof e!="symbol"?e+"":e,r);class Mme{constructor(e){Xd(this,"name",ih),Xd(this,"client"),Xd(this,"httpProviders"),Xd(this,"events"),Xd(this,"namespace"),Xd(this,"chainId"),this.namespace=e.namespace,this.events=wt("events"),this.client=wt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(_s.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){var e,r;const n={};return(r=(e=this.namespace)==null?void 0:e.accounts)==null||r.forEach(i=>
101{const s=bh(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){const r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Di(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new nr(new ur(n,wt("disableProviderPing")))}}var Ume=Object.defineProperty,jme=Object.defineProperties,zme=Object.getOwnPropertyDescriptors,lS=Object.getOwnPropertySymbols,Fme=Object.prototype.hasOwnProperty,qme=Object.prototype.propertyIsEnumerable,E6=(t,e,r)=>e in t?Ume(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Jg=(t,e)=>{for(var r in e||(e={}))Fme.call(e,r)&&E6(t,r,e[r]);if(lS)for(var r of lS(e))qme.call(e,r)&&E6(t,r,e[r]);return t},W5=(t,e)=>jme(t,zme(e)),ts=(t,e,r)=>E6(t,typeof e!="symbol"?e+"":e,r);let P_e=class UR{constructor(e){ts(this,"client"),ts(this,"namespaces"),ts(this,"optionalNamespaces"),ts(this,"sessionProperties"),ts(this,"scopedProperties"),ts(this,"events",new v0),ts(this,"rpcProviders",{}),ts(this,"session"),ts(this,"providerOpts"),ts(this,"logger"),ts(this,"uri"),ts(this,"disableProviderPing",!1),this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:al(cl({level:(e==null?void 0:e.logger)||J_})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new UR(e);return await r.initialize(),r}async request(e,r,n){const[i,s]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:Jg({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,r,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>r(null,ll(s,o))).catch(o=>r(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:kt("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,r){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:n,response:i}=await this.client.authenticate(e,r);n&&(this.uri=n,this.events.emit("display_uri",n));const s=await i();if(this.session=s.session,this.session){const o=sS(this.session.namespaces);this.namespaces=Yg(this.namespaces,o),await this.persist("namespaces",this.namespaces),this.onConnect()}return s}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){const{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});r&&(this.uri=r,this.events.emit("display_uri",r));const i=await n();this.session=i;const s=sS(i.namespaces);return this.namespaces=Yg(this.namespaces,s),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;const[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===ih?s.setDefaultChain(`${n}:${i}`,r):s.setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(Zc(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,r;if(this.client=this.providerOpts.client||await ywe.init({core:this.providerOpts.core,logger:this.providerOpts.logger||J_,relayUrl:this.providerOpts.relayUrl||bwe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(n){throw this.logger.error("Failed to get session",n),new Error(`The provided session: ${(r=(e=this.providerOpts)==null?void 0:e.session)==null?void 0:r.topic} doesn't exist in the Sign client`)}else{const n=this.client.session.getAll();this.session=n[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(r=>dh(r)))];V5("client",this.client),V5("events",this.events),V5("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=rme(r,this.session),i=LR(n),s=Yg(this.namespaces,this.optionalNamespaces),o=W5(Jg({},s[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new dme({namespace:o});break;case"algorand":this.rpcProviders[r]=new vme({namespace:o});break;case"solana":this.rpcProviders[r]=new pme({namespace:o});break;case"cosmos":this.rpcProviders[r]=new mme({namespace:o});break;case"polkadot":this.rpcProviders[r]=new sme({namespace:o});break;case"cip34":this.rpcProviders[r]=new xme({namespace:o});break;case"elrond":this.rpcProviders[r]=new Ime({namespace:o});break;case"multiversx":this.rpcProviders[r]=new Pme({namespace:o});break;case"near":this.rpcProviders[r]=new Nme({namespace:o});break;case"tezos":this.rpcProviders[r]=new Bme({namespace:o});break;default:this.rpcProviders[ih]?this.rpcProviders[ih].updateNamespace(o):this.rpcProviders[ih]=new Mme({namespace:o})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{var r;const{topic:n}=e;n===((r=this.session)==null?void 0:r.topic)&&this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{var r;const{params:n,topic:i}=e;if(i!==((r=this.session)==null?void 0:r.topic))return;const{event:s}=n;if(s.name==="accountsChanged"){const o=s.data;o&&Zc(o)&&this.events.emit("accountsChanged",o.map(iS))}else if(s.name==="chainChanged"){const o=n.chainId,a=n.event.data,c=dh(o),l=H5(o)!==H5(a)?`${c}:${H5(a)}`:o;this.onChainChanged(l)}else this.events.emit(s.name,s.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n,i;if(e!==((n=this.session)==null?void 0:n.topic))return;const{namespaces:s}=r,o=(i=this.client)==null?void 0:i.session.get(e);this.session=W5(Jg({},o),{namespaces:s}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{var r;e.topic===((r=this.session)==null?void 0:r.topic)&&(await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",W5(Jg({},kt("USER_DISCONNECTED")),{data:e.topic})))}),this.on(_s.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[ih]}
101onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r={},optionalNamespaces:n={},sessionProperties:i,scopedProperties:s}=e;this.optionalNamespaces=Yg(r,n),this.sessionProperties=i,this.scopedProperties=s}validateChain(e){const[r,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>dh(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=dh(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged(e,r=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);if(!i)return;this.updateNamespaceChain(n,i),this.events.emit("chainChanged",i);const s=this.getProvider(n).getDefaultChain();r||this.getProvider(n).setDefaultChain(i),this.emitAccountsChangedOnChainChange({namespace:n,previousChainId:s,newChainId:e}),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:e,previousChainId:r,newChainId:n}){var i,s;try{if(r===n)return;const o=(s=(i=this.session)==null?void 0:i.namespaces[e])==null?void 0:s.accounts;if(!o)return;const a=o.filter(c=>c.includes(`${n}:`)).map(iS);if(!Zc(a))return;this.events.emit("accountsChanged",a)}catch(o){this.logger.warn("Failed to emit accountsChanged on chain change",o)}}updateNamespaceChain(e,r){if(!this.namespaces)return;const n=this.namespaces[e]?e:`${e}:${r}`,i={chains:[],methods:[],events:[],defaultChain:r};this.namespaces[n]?this.namespaces[n]&&(this.namespaces[n].defaultChain=r):this.namespaces[n]=i}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,r){var n;const i=((n=this.session)==null?void 0:n.topic)||"";await this.client.core.storage.setItem(`${Zg}/${e}${i}`,r)}async getFromStore(e){var r;const n=((r=this.session)==null?void 0:r.topic)||"";return await this.client.core.storage.getItem(`${Zg}/${e}${n}`)}async deleteFromStore(e){var r;const n=((r=this.session)==null?void 0:r.topic)||"";await this.client.core.storage.removeItem(`${Zg}/${e}${n}`)}async cleanupStorage(){var e;try{if(((e=this.client)==null?void 0:e.session.length)>0)return;const r=await this.client.core.storage.getKeys();for(const n of r)n.startsWith(Zg)&&await this.client.core.storage.removeItem(n)}catch(r){this.logger.warn("Failed to cleanup storage",r)}}};const C2={getSIWX(){return ot.state.siwx},async initializeIfEnabled(){var s;const t=ot.state.siwx,e=ee.getActiveCaipAddress();if(!(t&&e))return;const[r,n,i]=e.split(":");if(ee.checkIfSupportedNetwork(r))try{if((await t.getSessions(`${r}:${n}`,i)).length)return;await vn.open({view:"SIWXSignMessage"})}catch(o){console.error("SIWXUtil:initializeIfEnabled",o),qr.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties()}),await((s=Ye._getClient())==null?void 0:s.disconnect().catch(console.error)),Ge.reset("Connect"),$a.showError("A problem occurred while trying initialize authentication")}},async requestSignMessage(){const t=ot.state.siwx,e=it.getPlainAddress(ee.getActiveCaipAddress()),r=ee.getActiveCaipNetwork(),n=Ye._getClient();if(!t)throw new Error("SIWX is not enabled");if(!e)throw new Error("No ActiveCaipAddress found");if(!r)throw new Error("No ActiveCaipNetwork or client found");if(!n)throw new Error("No ConnectionController client found");try{const i=await t.createMessage({chainId:r.caipNetworkId,accountAddress:e}),s=i.toString();Ze.getConnectorId(r.chainNamespace)===En.CONNECTOR_ID.AUTH&&Ge.pushTransactionStack({});const a=await n.signMessage(s);await t.addSession({data:i,message:s,signature:a}),vn.close(),qr.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:this.getSIWXEventProperties()})}catch(i){const s=this.getSIWXEventProperties();(!vn.state.open||Ge.state.view==="ApproveTransaction")&&await vn.open({view:"SIWXSignMessage"}),s.isSmartAccount?$a.showError("This application might not support Smart Accounts"):$a.showError("Signature declined"),qr.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:s}),console.error("SWIXUtil:requestSignMessage",i)}},async cancelSignMessage(){var t;try{const e=this.getSIWX();((t=e==null?void 0:e.getRequired)==null?void 0:t.call(e))?await Ye.disconnect():vn.close(),Ge.reset("Connect"),qr.sendEvent({event:"CLICK_CANCEL_SIWX",type:"track",properties:this.getSIWXEventProperties()})}catch(e){console.error("SIWXUtil:cancelSignMessage",e)}},async getSessions(){const t=ot.state.siwx,e=it.getPlainAddress(ee.getActiveCaipAddress()),r
101=ee.getActiveCaipNetwork();return t&&e&&r?t.getSessions(r.caipNetworkId,e):[]},async isSIWXCloseDisabled(){var e;const t=this.getSIWX();if(t){const r=Ge.state.view==="ApproveTransaction",n=Ge.state.view==="SIWXSignMessage";if(r||n)return((e=t.getRequired)==null?void 0:e.call(t))&&(await this.getSessions()).length===0}return!1},async universalProviderAuthenticate({universalProvider:t,chains:e,methods:r}){var a,c,l;const n=C2.getSIWX(),i=new Set(e.map(u=>u.split(":")[0]));if(!n||i.size!==1||!i.has("eip155"))return!1;const s=await n.createMessage({chainId:((a=ee.getActiveCaipNetwork())==null?void 0:a.caipNetworkId)||"",accountAddress:""}),o=await t.authenticate({nonce:s.nonce,domain:s.domain,uri:s.uri,exp:s.expirationTime,iat:s.issuedAt,nbf:s.notBefore,requestId:s.requestId,version:s.version,resources:s.resources,statement:s.statement,chainId:s.chainId,methods:r,chains:[s.chainId,...e.filter(u=>u!==s.chainId)]});if($a.showLoading("Authenticating...",{autoClose:!1}),Jt.setConnectedWalletInfo({...o.session.peer.metadata,name:o.session.peer.metadata.name,icon:(c=o.session.peer.metadata.icons)==null?void 0:c[0],type:"WALLET_CONNECT"},Array.from(i)[0]),(l=o==null?void 0:o.auths)!=null&&l.length){const u=o.auths.map(d=>{const h=t.client.formatAuthMessage({request:d.p,iss:d.p.iss});return{data:{...d.p,accountAddress:d.p.iss.split(":").slice(-1).join(""),chainId:d.p.iss.split(":").slice(2,4).join(":"),uri:d.p.aud,version:d.p.version||s.version,expirationTime:d.p.exp,issuedAt:d.p.iat,notBefore:d.p.nbf},message:h,signature:d.s.s,cacao:d}});try{await n.setSessions(u),qr.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:C2.getSIWXEventProperties()})}catch(d){throw console.error("SIWX:universalProviderAuth - failed to set sessions",d),qr.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:C2.getSIWXEventProperties()}),await t.disconnect().catch(console.error),d}finally{$a.hide()}}return!0},getSIWXEventProperties(){var e,r;const t=ee.state.activeChain;return{network:((e=ee.state.activeCaipNetwork)==null?void 0:e.caipNetworkId)||"",isSmartAccount:((r=Jt.state.preferredAccountTypes)==null?void 0:r[t])===Zf.ACCOUNT_TYPES.SMART_ACCOUNT}},async clearSessions(){const t=this.getSIWX();t&&await t.setSessions([])}},T_e={isUnsupportedChainView(){return Ge.state.view==="UnsupportedChain"||Ge.state.view==="SwitchNetwork"&&Ge.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){vn.shake();return}if(await C2.isSIWXCloseDisabled()){vn.shake();return}vn.close()}};/**
102 * @license
103 * Copyright 2019 Google LLC
104 * SPDX-License-Identifier: BSD-3-Clause
105 */const x2=globalThis,m8=x2.ShadowRoot&&(x2.ShadyCSS===void 0||x2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,y8=Symbol(),uS=new WeakMap;let jR=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==y8)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(m8&&e===void 0){const n=r!==void 0&&r.length===1;n&&(e=uS.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&uS.set(r,e))}return e}toString(){return this.cssText}};const ir=t=>new jR(typeof t=="string"?t:t+"",void 0,y8),ne=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new jR(r,t,y8)},Hme=(t,e)=>{if(m8)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of e){const n=document.createElement("style"),i=x2.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},dS=m8?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const n of e.cssRules)r+=n.cssText;return ir(r)})(t):t;/**
106 * @license
107 * Copyright 2017 Google LLC
108 * SPDX-License-Identifier: BSD-3-Clause
109 */const{is:Vme,defineProperty:Wme,getOwnPropertyDescriptor:Kme,getOwnPropertyNames:Zme,getOwnPropertySymbols:Gme,getPrototypeOf:Yme}=Object,Yc=globalThis,hS=Yc.trustedTypes,Jme=hS?hS.emptyScript:"",K5=Yc.reactiveElementPolyfillSupport,e1=(t,e)=>t,iw={toAttribute(t,e){switch(e){case Boolean:t=t?Jme:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},b8=(t,e)=>!Vme(t,e),fS={attribute:!0,type:String,converter:iw,reflect:!1,useDefault:!1,hasChanged:b8};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Yc.litPropertyMetadata??(Yc.litPropertyMetadata=new WeakMap);let sh=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=fS){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Wme(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){const{get:i,set:s}=Kme(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);s==null||s.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??fS}static _$Ei(){if(this.hasOwnProperty(e1("elementProperties")))return;const e=Yme(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(e1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(e1("properties"))){const r=this.properties,n=[...Zme(r),...Gme(r)];for(const i of n)this.createProperty(i,r[i])}const e=this[Symbol.metadata];if(e!==null){const r=litPropertyMetadata.get(e);if(r!==void 0)for(const[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)r.unshift(dS(i))}else e!==void 0&&r.push(dS(e));return r}static _$Eu(e,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(r=>r(this))}addController(e){var r;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)==null||r.call(e))}
vendor: 4,275 bytes, lines 109-115
109removeController(e){var r;(r=this._$EO)==null||r.delete(e)}_$E_(){const e=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Hme(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(r=>{var n;return(n=r.hostDisconnected)==null?void 0:n.call(r)})}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){var s;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const o=(((s=n.converter)==null?void 0:s.toAttribute)!==void 0?n.converter:iw).toAttribute(r,n.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,r){var s,o;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const a=n.getPropertyOptions(i),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)==null?void 0:s.fromAttribute)!==void 0?a.converter:iw;this._$Em=i,this[i]=c.fromAttribute(r,a.type)??((o=this._$Ej)==null?void 0:o.get(i))??null,this._$Em=null}}requestUpdate(e,r,n){var i;if(e!==void 0){const s=this.constructor,o=this[e];if(n??(n=s.getPropertyOptions(e)),!((n.hasChanged??b8)(o,r)||n.useDefault&&n.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??r??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i){const{wrapped:a}=o,c=this[s];a!==!0||this._$AL.has(s)||c===void 0||this.C(s,void 0,o,c)}}let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),(n=this._$EO)==null||n.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(r)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(r)}willUpdate(e){}_$AE(e){var r;(r=this._$EO)==null||r.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(e){}firstUpdated(e){}};sh.elementStyles=[],sh.shadowRootOptions={mode:"open"},sh[e1("elementProperties")]=new Map,sh[e1("finalized")]=new Map,K5==null||K5({ReactiveElement:sh}),(Yc.reactiveElementVersions??(Yc.reactiveElementVersions=[])).push("2.1.0");/**
110 * @license
111 * Copyright 2017 Google LLC
112 * SPDX-License-Identifier: BSD-3-Clause
113 */const t1=globalThis,sw=t1.trustedTypes,pS=sw?sw.createPolicy("lit-html",{createHTML:t=>t}):void 0,zR="$lit$",jc=`lit$${Math.random().toFixed(9).slice(2)}$`,FR="?"+jc,Xme=`<${FR}>`,_u=document,K1=()=>_u.createComment(""),Z1=t=>t===null||typeof t!="object"&&typeof t!="function",v8=Array.isArray,Qme=t=>v8(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Z5=`[ 	
114\f\r]`,mf=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gS=/-->/g,wS=/>/g,Il=RegExp(`>|${Z5}(?:([^\\s"'>=/]+)(${Z5}*=${Z5}*(?:[^ 	
115\f\r"'\`<>=]|("|')|))|$)`,"g"),mS=/'/g,yS=/"/g,qR=/^(?:script|style|textarea|title)$/i,HR=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}
vendor: 4,728 bytes, line 115
115),q=HR(1),W=HR(2),Ha=Symbol.for("lit-noChange"),pr=Symbol.for("lit-nothing"),bS=new WeakMap,Ql=_u.createTreeWalker(_u,129);function VR(t,e){if(!v8(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return pS!==void 0?pS.createHTML(e):e}const e3e=(t,e)=>{const r=t.length-1,n=[];let i,s=e===2?"<svg>":e===3?"<math>":"",o=mf;for(let a=0;a<r;a++){const c=t[a];let l,u,d=-1,h=0;for(;h<c.length&&(o.lastIndex=h,u=o.exec(c),u!==null);)h=o.lastIndex,o===mf?u[1]==="!--"?o=gS:u[1]!==void 0?o=wS:u[2]!==void 0?(qR.test(u[2])&&(i=RegExp("</"+u[2],"g")),o=Il):u[3]!==void 0&&(o=Il):o===Il?u[0]===">"?(o=i??mf,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?Il:u[3]==='"'?yS:mS):o===yS||o===mS?o=Il:o===gS||o===wS?o=mf:(o=Il,i=void 0);const f=o===Il&&t[a+1].startsWith("/>")?" ":"";s+=o===mf?c+Xme:d>=0?(n.push(l),c.slice(0,d)+zR+c.slice(d)+jc+f):c+jc+(d===-2?a:f)}return[VR(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};class G1{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,o=0;const a=e.length-1,c=this.parts,[l,u]=e3e(e,r);if(this.el=G1.createElement(l,n),Ql.currentNode=this.el.content,r===2||r===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=Ql.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const d of i.getAttributeNames())if(d.endsWith(zR)){const h=u[o++],f=i.getAttribute(d).split(jc),g=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:g[2],strings:f,ctor:g[1]==="."?r3e:g[1]==="?"?n3e:g[1]==="@"?i3e:xm}),i.removeAttribute(d)}else d.startsWith(jc)&&(c.push({type:6,index:s}),i.removeAttribute(d));if(qR.test(i.tagName)){const d=i.textContent.split(jc),h=d.length-1;if(h>0){i.textContent=sw?sw.emptyScript:"";for(let f=0;f<h;f++)i.append(d[f],K1()),Ql.nextNode(),c.push({type:2,index:++s});i.append(d[h],K1())}}}else if(i.nodeType===8)if(i.data===FR)c.push({type:2,index:s});else{let d=-1;for(;(d=i.data.indexOf(jc,d+1))!==-1;)c.push({type:7,index:s}),d+=jc.length-1}s++}}static createElement(e,r){const n=_u.createElement("template");return n.innerHTML=e,n}}function Jh(t,e,r=t,n){var o,a;if(e===Ha)return e;let i=n!==void 0?(o=r._$Co)==null?void 0:o[n]:r._$Cl;const s=Z1(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(e=Jh(t,i._$AS(t,e.values),i,n)),e}class t3e{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:r},parts:n}=this._$AD,i=((e==null?void 0:e.creationScope)??_u).importNode(r,!0);Ql.currentNode=i;let s=Ql.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new Vp(s,s.nextSibling,this,e):c.type===1?l=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(l=new s3e(s,this,e)),this._$AV.push(l),c=n[++a]}o!==(c==null?void 0:c.index)&&(s=Ql.nextNode(),o++)}return Ql.currentNode=_u,i}p(e){let r=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}}class Vp{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=pr,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Jh(this,e,r),Z1(e)?e===pr||e==null||e===""?(this._$AH!==pr&&this._$AR(),this._$AH=pr):e!==this._$AH&&e!==Ha&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Qme(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==pr&&Z1(this._$AH)?this._$AA.nextSibling.data=e:this.T(_u.createTextNode(e)),this._$AH=e}$(e){var s;const{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=G1.createElement(VR(n.h,n.h[0]),this.options)),n);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(r);else{const o=new t3e(i,this),a=o.u(this.options);o.p(r),this.T(a),this._$AH=o}}_$AC(e){let r=bS.get(e.strings);return r===void 0&&bS.set(e.strings,r=new G1(e)),r}k(e){v8(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,i=0;for(const s of e)i===r.length?r.push(n=new Vp(this.O(K1()),this.O(K1()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){var n;
115for((n=this._$AP)==null?void 0:n.call(this,!1,!0,r);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var r;this._$AM===void 0&&(this._$Cv=e,(r=this._$AP)==null||r.call(this,e))}}class xm{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=pr,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=pr}_$AI(e,r=this,n,i){const s=this.strings;let o=!1;if(s===void 0)e=Jh(this,e,r,0),o=!Z1(e)||e!==this._$AH&&e!==Ha,o&&(this._$AH=e);else{const a=e;let c,l;for(e=s[0],c=0;c<s.length-1;c++)l=Jh(this,a[n+c],r,c),l===Ha&&(l=this._$AH[c]),o||(o=!Z1(l)||l!==this._$AH[c]),l===pr?e=pr:e!==pr&&(e+=(l??"")+s[c+1]),this._$AH[c]=l}o&&!i&&this.j(e)}j(e){e===pr?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class r3e extends xm{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===pr?void 0:e}}class n3e extends xm{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==pr)}}class i3e extends xm{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=Jh(this,e,r,0)??pr)===Ha)return;const n=this._$AH,i=e===pr&&n!==pr||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==pr&&(n===pr||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,e):this._$AH.handleEvent(e)}}class s3e{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Jh(this,e)}}const G5=t1.litHtmlPolyfillSupport;G5==null||G5(G1,Vp),(t1.litHtmlVersions??(t1.litHtmlVersions=[])).push("3.3.0");const o3e=(t,e,r)=>{const n=(r==null?void 0:r.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const s=(r==null?void 0:r.renderBefore)??null;n._$litPart$=i=new Vp(e.insertBefore(K1(),s),s,void 0,r??{})}return i._$AI(t),i};/**
116 * @license
117 * Copyright 2017 Google LLC
118 * SPDX-License-Identifier: BSD-3-Clause
119 */const cu=globalThis;let oe=class extends sh{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=o3e(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Ha}};var jI;oe._$litElement$=!0,oe.finalized=!0,(jI=cu.litElementHydrateSupport)==null||jI.call(cu,{LitElement:oe});const Y5=cu.litElementPolyfillSupport;Y5==null||Y5({LitElement:oe});(cu.litElementVersions??(cu.litElementVersions=[])).push("4.2.0");let r1,Jc,Xc;function R_e(t,e){r1=document.createElement("style"),Jc=document.createElement("style"),Xc=document.createElement("style"),r1.textContent=vh(t).core.cssText,Jc.textContent=vh(t).dark.cssText,Xc.textContent=vh(t).light.cssText,document.head.appendChild(r1),document.head.appendChild(Jc),document.head.appendChild(Xc),a3e(e)}function a3e(t){Jc&&Xc&&(t==="light"?(Jc.removeAttribute("media"),Xc.media="enabled"):(Xc.removeAttribute("media"),Jc.media="enabled"))}function B_e(t){r1&&Jc&&Xc&&(r1.textContent=vh(t).core.cssText,Jc.textContent=vh(t).dark.cssText,Xc.textContent=vh(t).light.cssText)}function vh(t){return{core:ne`
120      @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
121      @keyframes w3m-shake {
122        0% {
123          transform: scale(1) rotate(0deg);
124        }
125        20% {
126          transform: scale(1) rotate(-1deg);
127        }
128        40% {
129          transform: scale(1) rotate(1.5deg);
130        }
131        60% {
132          transform: scale(1) rotate(-1.5deg);
133        }
134        80% {
135          transform: scale(1) rotate(1deg);
136        }
137        100% {
138          transform: scale(1) rotate(0deg);
139        }
140      }
141      @keyframes w3m-iframe-fade-out {
142        0% {
143          opacity: 1;
144        }
145        100% {
146          opacity: 0;
147        }
148      }
149      @keyframes w3m-iframe-zoom-in {
150        0% {
151          transform: translateY(50px);
152          opacity: 0;
153        }
154        100% {
155          transform: translateY(0px);
156          opacity: 1;
157        }
158      }
159      @keyframes w3m-iframe-zoom-in-mobile {
160        0% {
161          transform: scale(0.95);
162          opacity: 0;
163        }
164        100% {
165          transform: scale(1);
166          opacity: 1;
167        }
168      }
169      :root {
170        --w3m-modal-width: 360px;
171        --w3m-color-mix-strength: ${ir(t!=null&&t["--w3m-color-mix-strength"]?`${t["--w3m-color-mix-strength"]}%`:"0%")};
172        --w3m-font-family: ${ir((t==null?void 0:t["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")};
173        --w3m-font-size-master: ${ir((t==null?void 0:t["--w3m-font-size-master"])||"10px")};
174        --w3m-border-radius-master: ${ir((t==null?void 0:t["--w3m-border-radius-master"])||"4px")};
175        --w3m-z-index: ${ir((t==null?void 0:t["--w3m-z-index"])||
vendor: 15,824 bytes, lines 175-601
175999)};
176
177        --wui-font-family: var(--w3m-font-family);
178
179        --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);
180        --wui-font-size-micro: var(--w3m-font-size-master);
181        --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);
182        --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);
183        --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);
184        --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);
185        --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);
186        --wui-font-size-title-6: calc(var(--w3m-font-size-master) * 2.2);
187        --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);
188        --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);
189
190        --wui-border-radius-5xs: var(--w3m-border-radius-master);
191        --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);
192        --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);
193        --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);
194        --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);
195        --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);
196        --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);
197        --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);
198        --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);
199
200        --wui-font-weight-light: 400;
201        --wui-font-weight-regular: 500;
202        --wui-font-weight-medium: 600;
203        --wui-font-weight-bold: 700;
204
205        --wui-letter-spacing-2xl: -1.6px;
206        --wui-letter-spacing-medium-title: -0.96px;
207        --wui-letter-spacing-title-6: -0.88px;
208        --wui-letter-spacing-large: -0.8px;
209        --wui-letter-spacing-medium: -0.72px;
210        --wui-letter-spacing-paragraph: -0.64px;
211        --wui-letter-spacing-small: -0.56px;
212        --wui-letter-spacing-tiny: -0.48px;
213        --wui-letter-spacing-micro: -0.2px;
214        --wui-letter-spacing-mini: -0.16px;
215
216        --wui-spacing-0: 0px;
217        --wui-spacing-4xs: 2px;
218        --wui-spacing-3xs: 4px;
219        --wui-spacing-xxs: 6px;
220        --wui-spacing-2xs: 7px;
221        --wui-spacing-xs: 8px;
222        --wui-spacing-1xs: 10px;
223        --wui-spacing-s: 12px;
224        --wui-spacing-m: 14px;
225        --wui-spacing-l: 16px;
226        --wui-spacing-2l: 18px;
227        --wui-spacing-xl: 20px;
228        --wui-spacing-xxl: 24px;
229        --wui-spacing-2xl: 32px;
230        --wui-spacing-3xl: 40px;
231        --wui-spacing-4xl: 90px;
232        --wui-spacing-5xl: 95px;
233
234        --wui-icon-box-size-xxs: 14px;
235        --wui-icon-box-size-xs: 20px;
236        --wui-icon-box-size-sm: 24px;
237        --wui-icon-box-size-md: 32px;
238        --wui-icon-box-size-mdl: 36px;
239        --wui-icon-box-size-lg: 40px;
240        --wui-icon-box-size-2lg: 48px;
241        --wui-icon-box-size-xl: 64px;
242
243        --wui-icon-size-inherit: inherit;
244        --wui-icon-size-xxs: 10px;
245        --wui-icon-size-xs: 12px;
246        --wui-icon-size-sm: 14px;
247        --wui-icon-size-md: 16px;
248        --wui-icon-size-mdl: 18px;
249        --wui-icon-size-lg: 20px;
250        --wui-icon-size-xl: 24px;
251        --wui-icon-size-xxl: 28px;
252
253        --wui-wallet-image-size-inherit: inherit;
254        --wui-wallet-image-size-sm: 40px;
255        --wui-wallet-image-size-md: 56px;
256        --wui-wallet-image-size-lg: 80px;
257
258        --wui-visual-size-size-inherit: inherit;
259        --wui-visual-size-sm: 40px;
260        --wui-visual-size-md: 55px;
261        --wui-visual-size-lg: 80px;
262
263        --wui-box-size-md: 100px;
264        --wui-box-size-lg: 120px;
265
266        --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);
267        --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);
268
269        --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);
270        --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);
271        --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);
272
273        --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);
274
275        --wui-duration-lg: 200ms;
276        --wui-duration-md: 125ms;
277        --wui-duration-sm: 75ms;
278
279        --wui-path-network-sm: path(
280          'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'
281        );
282
283        --wui-path-network-md: path(
284          'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'
285        );
286
287        --wui-path-network-lg: path(
288          'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'
289        );
290
291        --wui-width-network-sm: 36px;
292        --wui-width-network-md: 48px;
293        --wui-width-network-lg: 86px;
294
295        --wui-height-network-sm: 40px;
296        --wui-height-network-md: 54px;
297        --wui-height-network-lg: 96px;
298
299        --wui-icon-size-network-xs: 12px;
300        --wui-icon-size-network-sm: 16px;
301        --wui-icon-size-network-md: 24px;
302        --wui-icon-size-network-lg: 42px;
303
304        --wui-color-inherit: inherit;
305
306        --wui-color-inverse-100: #fff;
307        --wui-color-inverse-000: #000;
308
309        --wui-cover: rgba(20, 20, 20, 0.8);
310
311        --wui-color-modal-bg: var(--wui-color-modal-bg-base);
312
313        --wui-color-accent-100: var(--wui-color-accent-base-100);
314        --wui-color-accent-090: var(--wui-color-accent-base-090);
315        --wui-color-accent-080: var(--wui-color-accent-base-080);
316
317        --wui-color-success-100: var(--wui-color-success-base-100);
318        --wui-color-success-125: var(--wui-color-success-base-125);
319
320        --wui-color-warning-100: var(--wui-color-warning-base-100);
321
322        --wui-color-error-100: var(--wui-color-error-base-100);
323        --wui-color-error-125: var(--wui-color-error-base-125);
324
325        --wui-color-blue-100: var(--wui-color-blue-base-100);
326        --wui-color-blue-90: var(--wui-color-blue-base-90);
327
328        --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);
329        --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);
330        --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);
331        --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);
332
333        --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100);
334
335        --wui-avatar-border: var(--wui-avatar-border-base);
336
337        --wui-thumbnail-border: var(--wui-thumbnail-border-base);
338
339        --wui-wallet-button-bg: var(--wui-wallet-button-bg-base);
340
341        --wui-box-shadow-blue: var(--wui-color-accent-glass-020);
342      }
343
344      @supports (background: color-mix(in srgb, white 50%, black)) {
345        :root {
346          --wui-color-modal-bg: color-mix(
347            in srgb,
348            var(--w3m-color-mix) var(--w3m-color-mix-strength),
349            var(--wui-color-modal-bg-base)
350          );
351
352          --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent);
353
354          --wui-color-accent-100: color-mix(
355            in srgb,
356            var(--wui-color-accent-base-100) 100%,
357            transparent
358          );
359          --wui-color-accent-090: color-mix(
360            in srgb,
361            var(--wui-color-accent-base-100) 90%,
362            transparent
363          );
364          --wui-color-accent-080: color-mix(
365            in srgb,
366            var(--wui-color-accent-base-100) 80%,
367            transparent
368          );
369          --wui-color-accent-glass-090: color-mix(
370            in srgb,
371            var(--wui-color-accent-base-100) 90%,
372            transparent
373          );
374          --wui-color-accent-glass-080: color-mix(
375            in srgb,
376            var(--wui-color-accent-base-100) 80%,
377            transparent
378          );
379          --wui-color-accent-glass-020: color-mix(
380            in srgb,
381            var(--wui-color-accent-base-100) 20%,
382            transparent
383          );
384          --wui-color-accent-glass-015: color-mix(
385            in srgb,
386            var(--wui-color-accent-base-100) 15%,
387            transparent
388          );
389          --wui-color-accent-glass-010: color-mix(
390            in srgb,
391            var(--wui-color-accent-base-100) 10%,
392            transparent
393          );
394          --wui-color-accent-glass-005: color-mix(
395            in srgb,
396            var(--wui-color-accent-base-100) 5%,
397            transparent
398          );
399          --wui-color-accent-002: color-mix(
400            in srgb,
401            var(--wui-color-accent-base-100) 2%,
402            transparent
403          );
404
405          --wui-color-fg-100: color-mix(
406            in srgb,
407            var(--w3m-color-mix) var(--w3m-color-mix-strength),
408            var(--wui-color-fg-100)
409          );
410          --wui-color-fg-125: color-mix(
411            in srgb,
412            var(--w3m-color-mix) var(--w3m-color-mix-strength),
413            var(--wui-color-fg-125)
414          );
415          --wui-color-fg-150: color-mix(
416            in srgb,
417            var(--w3m-color-mix) var(--w3m-color-mix-strength),
418            var(--wui-color-fg-150)
419          );
420          --wui-color-fg-175: color-mix(
421            in srgb,
422            var(--w3m-color-mix) var(--w3m-color-mix-strength),
423            var(--wui-color-fg-175)
424          );
425          --wui-color-fg-200: color-mix(
426            in srgb,
427            var(--w3m-color-mix) var(--w3m-color-mix-strength),
428            var(--wui-color-fg-200)
429          );
430          --wui-color-fg-225: color-mix(
431            in srgb,
432            var(--w3m-color-mix) var(--w3m-color-mix-strength),
433            var(--wui-color-fg-225)
434          );
435          --wui-color-fg-250: color-mix(
436            in srgb,
437            var(--w3m-color-mix) var(--w3m-color-mix-strength),
438            var(--wui-color-fg-250)
439          );
440          --wui-color-fg-275: color-mix(
441            in srgb,
442            var(--w3m-color-mix) var(--w3m-color-mix-strength),
443            var(--wui-color-fg-275)
444          );
445          --wui-color-fg-300: color-mix(
446            in srgb,
447            var(--w3m-color-mix) var(--w3m-color-mix-strength),
448            var(--wui-color-fg-300)
449          );
450          --wui-color-fg-325: color-mix(
451            in srgb,
452            var(--w3m-color-mix) var(--w3m-color-mix-strength),
453            var(--wui-color-fg-325)
454          );
455          --wui-color-fg-350: color-mix(
456            in srgb,
457            var(--w3m-color-mix) var(--w3m-color-mix-strength),
458            var(--wui-color-fg-350)
459          );
460
461          --wui-color-bg-100: color-mix(
462            in srgb,
463            var(--w3m-color-mix) var(--w3m-color-mix-strength),
464            var(--wui-color-bg-100)
465          );
466          --wui-color-bg-125: color-mix(
467            in srgb,
468            var(--w3m-color-mix) var(--w3m-color-mix-strength),
469            var(--wui-color-bg-125)
470          );
471          --wui-color-bg-150: color-mix(
472            in srgb,
473            var(--w3m-color-mix) var(--w3m-color-mix-strength),
474            var(--wui-color-bg-150)
475          );
476          --wui-color-bg-175: color-mix(
477            in srgb,
478            var(--w3m-color-mix) var(--w3m-color-mix-strength),
479            var(--wui-color-bg-175)
480          );
481          --wui-color-bg-200: color-mix(
482            in srgb,
483            var(--w3m-color-mix) var(--w3m-color-mix-strength),
484            var(--wui-color-bg-200)
485          );
486          --wui-color-bg-225: color-mix(
487            in srgb,
488            var(--w3m-color-mix) var(--w3m-color-mix-strength),
489            var(--wui-color-bg-225)
490          );
491          --wui-color-bg-250: color-mix(
492            in srgb,
493            var(--w3m-color-mix) var(--w3m-color-mix-strength),
494            var(--wui-color-bg-250)
495          );
496          --wui-color-bg-275: color-mix(
497            in srgb,
498            var(--w3m-color-mix) var(--w3m-color-mix-strength),
499            var(--wui-color-bg-275)
500          );
501          --wui-color-bg-300: color-mix(
502            in srgb,
503            var(--w3m-color-mix) var(--w3m-color-mix-strength),
504            var(--wui-color-bg-300)
505          );
506          --wui-color-bg-325: color-mix(
507            in srgb,
508            var(--w3m-color-mix) var(--w3m-color-mix-strength),
509            var(--wui-color-bg-325)
510          );
511          --wui-color-bg-350: color-mix(
512            in srgb,
513            var(--w3m-color-mix) var(--w3m-color-mix-strength),
514            var(--wui-color-bg-350)
515          );
516
517          --wui-color-success-100: color-mix(
518            in srgb,
519            var(--w3m-color-mix) var(--w3m-color-mix-strength),
520            var(--wui-color-success-base-100)
521          );
522          --wui-color-success-125: color-mix(
523            in srgb,
524            var(--w3m-color-mix) var(--w3m-color-mix-strength),
525            var(--wui-color-success-base-125)
526          );
527
528          --wui-color-warning-100: color-mix(
529            in srgb,
530            var(--w3m-color-mix) var(--w3m-color-mix-strength),
531            var(--wui-color-warning-base-100)
532          );
533
534          --wui-color-error-100: color-mix(
535            in srgb,
536            var(--w3m-color-mix) var(--w3m-color-mix-strength),
537            var(--wui-color-error-base-100)
538          );
539          --wui-color-blue-100: color-mix(
540            in srgb,
541            var(--w3m-color-mix) var(--w3m-color-mix-strength),
542            var(--wui-color-blue-base-100)
543          );
544          --wui-color-blue-90: color-mix(
545            in srgb,
546            var(--w3m-color-mix) var(--w3m-color-mix-strength),
547            var(--wui-color-blue-base-90)
548          );
549          --wui-color-error-125: color-mix(
550            in srgb,
551            var(--w3m-color-mix) var(--w3m-color-mix-strength),
552            var(--wui-color-error-base-125)
553          );
554
555          --wui-icon-box-bg-error-100: color-mix(
556            in srgb,
557            var(--w3m-color-mix) var(--w3m-color-mix-strength),
558            var(--wui-icon-box-bg-error-base-100)
559          );
560          --wui-icon-box-bg-accent-100: color-mix(
561            in srgb,
562            var(--w3m-color-mix) var(--w3m-color-mix-strength),
563            var(--wui-icon-box-bg-blue-base-100)
564          );
565          --wui-icon-box-bg-success-100: color-mix(
566            in srgb,
567            var(--w3m-color-mix) var(--w3m-color-mix-strength),
568            var(--wui-icon-box-bg-success-base-100)
569          );
570          --wui-icon-box-bg-inverse-100: color-mix(
571            in srgb,
572            var(--w3m-color-mix) var(--w3m-color-mix-strength),
573            var(--wui-icon-box-bg-inverse-base-100)
574          );
575
576          --wui-all-wallets-bg-100: color-mix(
577            in srgb,
578            var(--w3m-color-mix) var(--w3m-color-mix-strength),
579            var(--wui-all-wallets-bg-100)
580          );
581
582          --wui-avatar-border: color-mix(
583            in srgb,
584            var(--w3m-color-mix) var(--w3m-color-mix-strength),
585            var(--wui-avatar-border-base)
586          );
587
588          --wui-thumbnail-border: color-mix(
589            in srgb,
590            var(--w3m-color-mix) var(--w3m-color-mix-strength),
591            var(--wui-thumbnail-border-base)
592          );
593
594          --wui-wallet-button-bg: color-mix(
595            in srgb,
596            var(--w3m-color-mix) var(--w3m-color-mix-strength),
597            var(--wui-wallet-button-bg-base)
598          );
599        }
600      }
601    `,
601light:ne`
602      :root {
603        --w3m-color-mix: ${ir((t==null?void 0:t["--w3m-color-mix"])||"#fff")};
604        --w3m-accent: ${ir(Fc(t,"dark")["--w3m-accent"])};
605        --w3m-default: #fff;
606
607        --wui-color-modal-bg-base: ${ir(Fc(t,"dark")["--w3m-background"])};
608        --wui-color-accent-base-100: var(--w3m-accent);
609
610        --wui-color-blueberry-100: hsla(230, 100%, 67%, 1);
611        --wui-color-blueberry-090: hsla(231, 76%, 61%, 1);
612        --wui-color-blueberry-080: hsla(230, 59%, 55%, 1);
613        --wui-color-blueberry-050: hsla(231, 100%, 70%, 0.1);
614
615        --wui-color-fg-100: #e4e7e7;
616        --wui-color-fg-125: #d0d5d5;
617        --wui-color-fg-150: #a8b1b1;
618        --wui-color-fg-175: #a8b0b0;
619        --wui-color-fg-200: #949e9e;
620        --wui-color-fg-225: #868f8f;
621        --wui-color-fg-250: #788080;
622        --wui-color-fg-275: #788181;
623        --wui-color-fg-300: #6e7777;
624        --wui-color-fg-325: #9a9a9a;
625        --wui-color-fg-350: #363636;
626
627        --wui-color-bg-100: #141414;
628        --wui-color-bg-125: #191a1a;
629        --wui-color-bg-150: #1e1f1f;
630        --wui-color-bg-175: #222525;
631        --wui-color-bg-200: #272a2a;
632        --wui-color-bg-225: #2c3030;
633        --wui-color-bg-250: #313535;
634        --wui-color-bg-275: #363b3b;
635        --wui-color-bg-300: #3b4040;
636        --wui-color-bg-325: #252525;
637        --wui-color-bg-350: #ffffff;
638
639        --wui-color-success-base-100: #26d962;
640        --wui-color-success-base-125: #30a46b;
641
642        --wui-color-warning-base-100: #f3a13f;
643
644        --wui-color-error-base-100: #f25a67;
645        --wui-color-error-base-125: #df4a34;
646
647        --wui-color-blue-base-100: rgba(102, 125, 255, 1);
648        --wui-color-blue-base-90: rgba(102, 125, 255, 0.9);
649
650        --wui-color-success-glass-001: rgba(38, 217, 98, 0.01);
651        --wui-color-success-glass-002: rgba(38, 217, 98, 0.02);
652        --wui-color-success-glass-005: rgba(38, 217, 98, 0.05);
653        --wui-color-success-glass-010: rgba(38, 217, 98, 0.1);
654        --wui-color-success-glass-015: rgba(38, 217, 98, 0.15);
655        --wui-color-success-glass-020: rgba(38, 217, 98, 0.2);
656        --wui-color-success-glass-025: rgba(38, 217, 98, 0.25);
657        --wui-color-success-glass-030: rgba(38, 217, 98, 0.3);
658        --wui-color-success-glass-060: rgba(38, 217, 98, 0.6);
659        --wui-color-success-glass-080: rgba(38, 217, 98, 0.8);
660
661        --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2);
662
663        --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2);
664
665        --wui-color-error-glass-001: rgba(242, 90, 103, 0.01);
666        --wui-color-error-glass-002: rgba(242, 90, 103, 0.02);
667        --wui-color-error-glass-005: rgba(242, 90, 103, 0.05);
668        --wui-color-error-glass-010: rgba(242, 90, 103, 0.1);
669        --wui-color-error-glass-015: rgba(242, 90, 103, 0.15);
670        --wui-color-error-glass-020: rgba(242, 90, 103, 0.2);
671        --wui-color-error-glass-025: rgba(242, 90, 103, 0.25);
672        --wui-color-error-glass-030: rgba(242, 90, 103, 0.3);
673        --wui-color-error-glass-060: rgba(242, 90, 103, 0.6);
674        --wui-color-error-glass-080: rgba(242, 90, 103, 0.8);
675
676        --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2);
677
678        --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01);
679        --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02);
680        --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05);
681        --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1);
682        --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15);
683        --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2);
684        --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25);
685        --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3);
686        --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6);
687        --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8);
688        --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9);
689
690        --wui-color-dark-glass-100: rgba(42, 42, 42, 1);
691
692        --wui-icon-box-bg-error-base-100: #3c2426;
693        --wui-icon-box-bg-blue-base-100: #20303f;
694        --wui-icon-box-bg-success-base-100: #1f3a28;
695        --wui-icon-box-bg-inverse-base-100: #243240;
696
697        --wui-all-wallets-bg-100: #222b35;
698
699        --wui-avatar-border-base: #252525;
700
701        --wui-thumbnail-border-base: #252525;
702
703        --wui-wallet-button-bg-base: var(--wui-color-bg-125);
704
705        --w3m-card-embedded-shadow-color: rgb(17 17 18 / 25%);
706      }
707    `,dark:ne`
708      :root {
709        --w3m-color-mix: ${ir((t==null?void 0:t["--w3m-color-mix"])||"#000")};
710        --w3m-accent: ${ir(Fc(t,"light")["--w3m-accent"])};
711        --w3m-default: #000;
712
713        --wui-color-modal-bg-base: ${ir(Fc(t,"light")["--w3m-background"])};
714        --wui-color-accent-base-100: var(--w3m-accent);
715
716        --wui-color-blueberry-100: hsla(231, 100%, 70%, 1);
717        --wui-color-blueberry-090: hsla(231, 97%, 72%, 1);
718        --wui-color-blueberry-080: hsla(231, 92%, 74%, 1);
719
720        --wui-color-fg-100: #141414;
721        --wui-color-fg-125: #2d3131;
722        --wui-color-fg-150: #474d4d;
723        --wui-color-fg-175: #636d6d;
724        --wui-color-fg-200: #798686;
725        --wui-color-fg-225: #828f8f;
726        --wui-color-fg-250: #8b9797;
727        --wui-color-fg-275: #95a0a0;
728        --wui-color-fg-300: #9ea9a9;
729        --wui-color-fg-325: #9a9a9a;
730        --wui-color-fg-350: #d0d0d0;
731
732        --wui-color-bg-100: #ffffff;
733        --wui-color-bg-125: #f5fafa;
734        --wui-color-bg-150: #f3f8f8;
735        --wui-color-bg-175: #eef4f4;
736        --wui-color-bg-200: #eaf1f1;
737        --wui-color-bg-225: #e5eded;
738        --wui-color-bg-250: #e1e9e9;
739        --wui-color-bg-275: #dce7e7;
740        --wui-color-bg-300: #d8e3e3;
741        --wui-color-bg-325: #f3f3f3;
742        --wui-color-bg-350: #202020;
743
744        --wui-color-success-base-100: #26b562;
745        --wui-color-success-base-125: #30a46b;
746
747        --wui-color-warning-base-100: #f3a13f;
748
749        --wui-color-error-base-100: #f05142;
750        --wui-color-error-base-125: #df4a34;
751
752        --wui-color-blue-base-100: rgba(102, 125, 255, 1);
753        --wui-color-blue-base-90: rgba(102, 125, 255, 0.9);
754
755        --wui-color-success-glass-001: rgba(38, 181, 98, 0.01);
756        --wui-color-success-glass-002: rgba(38, 181, 98, 0.02);
757        --wui-color-success-glass-005: rgba(38, 181, 98, 0.05);
758        --wui-color-success-glass-010: rgba(38, 181, 98, 0.1);
759        --wui-color-success-glass-015: rgba(38, 181, 98, 0.15);
760        --wui-color-success-glass-020: rgba(38, 181, 98, 0.2);
761        --wui-color-success-glass-025: rgba(38, 181, 98, 0.25);
762        --wui-color-success-glass-030: rgba(38, 181, 98, 0.3);
763        --wui-color-success-glass-060: rgba(38, 181, 98, 0.6);
764        --wui-color-success-glass-080: rgba(38, 181, 98, 0.8);
765
766        --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2);
767
768        --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2);
769
770        --wui-color-error-glass-001: rgba(240, 81, 66, 0.01);
771        --wui-color-error-glass-002: rgba(240, 81, 66, 0.02);
772        --wui-color-error-glass-005: rgba(240, 81, 66, 0.05);
773        --wui-color-error-glass-010: rgba(240, 81, 66, 0.1);
774        --wui-color-error-glass-015: rgba(240, 81, 66, 0.15);
775        --wui-color-error-glass-020: rgba(240, 81, 66, 0.2);
776        --wui-color-error-glass-025: rgba(240, 81, 66, 0.25);
777        --wui-color-error-glass-030: rgba(240, 81, 66, 0.3);
778        --wui-color-error-glass-060: rgba(240, 81, 66, 0.6);
779        --wui-color-error-glass-080: rgba(240, 81, 66, 0.8);
780
781        --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2);
782
783        --wui-icon-box-bg-error-base-100: #f4dfdd;
784        --wui-icon-box-bg-blue-base-100: #d9ecfb;
785        --wui-icon-box-bg-success-base-100: #daf0e4;
786        --wui-icon-box-bg-inverse-base-100: #dcecfc;
787
788        --wui-all-wallets-bg-100: #e8f1fa;
789
790        --wui-avatar-border-base: #f3f4f4;
791
792        --wui-thumbnail-border-base: #eaefef;
793
794        --wui-wallet-button-bg-base: var(--wui-color-bg-125);
795
796        --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01);
797        --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02);
798        --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05);
799        --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1);
800        --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15);
801        --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2);
802        --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25);
803        --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3);
804        --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6);
805        --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8);
806        --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9);
807
808        --wui-color-dark-glass-100: rgba(233, 233, 233, 1);
809
810        --w3m-card-embedded-shadow-color: rgb(224 225 233 / 25%);
811      }
812    `}}const bt=ne`
813  *,
814  *::after,
815  *::before,
816  :host {
817    margin: 0;
818    padding: 0;
819    box-sizing: border-box;
820    font-style: normal;
821    text-rendering: optimizeSpeed;
822    -webkit-font-smoothing: antialiased;
823    -moz-osx-font-smoothing: grayscale;
824    -webkit-tap-highlight-color: transparent;
825    font-family: var(--wui-font-family);
826    backface-visibility: hidden;
827  }
828`,fn=ne`
829  button,
830  a {
831    cursor: pointer;
832    display: flex;
833    justify-content: center;
834    align-items: center;
835    position: relative;
836    transition:
837      color var(--wui-duration-lg) var(--wui-ease-out-power-1),
838      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),
839      border var(--wui-duration-lg) var(--wui-ease-out-power-1),
840      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
841      box-shadow var(--wui-duration-lg) var(--wui-ease-out-power-1);
842    will-change: background-color, color, border, box-shadow, border-radius;
843    outline: none;
844    border: none;
845    column-gap: var(--wui-spacing-3xs);
846    background-color: transparent;
847    text-decoration: none;
848  }
849
850  wui-flex {
851    transition: border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);
852    will-change: border-radius;
853  }
854
855  button:disabled > wui-wallet-image,
856  button:disabled > wui-all-wallets-image,
857  button:disabled > wui-network-image,
858  button:disabled > wui-image,
859  button:disabled > wui-transaction-visual,
860  button:disabled > wui-logo {
861    filter: grayscale(1);
862  }
863
864  @media (hover: hover) and (pointer: fine) {
865    button:hover:enabled {
866      background-color: var(--wui-color-gray-glass-005);
867    }
868
869    button:active:enabled {
870      background-color: var(--wui-color-gray-glass-010);
871    }
872  }
873
874  button:disabled > wui-icon-box {
875    opacity: 0.5;
876  }
877
878  input {
879    border: none;
880    outline: none;
881    appearance: none;
882  }
883`,Wp=ne`
884  .wui-color-inherit {
885    color: var(--wui-color-inherit);
886  }
887
888  .wui-color-accent-100 {
889    color: var(--wui-color-accent-100);
890  }
891
892  .wui-color-error-100 {
893    color: var(--wui-color-error-100);
894  }
895
896  .wui-color-blue-100 {
897    color: var(--wui-color-blue-100);
898  }
899
900  .wui-color-blue-90 {
901    color: var(--wui-color-blue-90);
902  }
903
904  .wui-color-error-125 {
905    color: var(--wui-color-error-125);
906  }
907
908  .wui-color-success-100 {
909    color: var(--wui-color-success-100);
910  }
911
912  .wui-color-success-125 {
913    color: var(--wui-color-success-125);
914  }
915
916  .wui-color-inverse-100 {
917    color: var(--wui-color-inverse-100);
918  }
919
920  .wui-color-inverse-000 {
921    color: var(--wui-color-inverse-000);
922  }
923
924  .wui-color-fg-100 {
925    color: var(--wui-color-fg-100);
926  }
927
928  .wui-color-fg-200 {
929    color: var(--wui-color-fg-200);
930  }
931
932  .wui-color-fg-300 {
933    color: var(--wui-color-fg-300);
934  }
935
936  .wui-color-fg-325 {
937    color: var(--wui-color-fg-325);
938  }
939
940  .wui-color-fg-350 {
941    color: var(--wui-color-fg-350);
942  }
943
944  .wui-bg-color-inherit {
945    background-color: var(--wui-color-inherit);
946  }
947
948  .wui-bg-color-blue-100 {
949    background-color: var(--wui-color-accent-100);
950  }
951
952  .wui-bg-color-error-100 {
953    background-color: var(--wui-color-error-100);
954  }
955
956  .wui-bg-color-error-125 {
957    background-color: var(--wui-color-error-125);
958  }
959
960  .wui-bg-color-success-100 {
961    background-color: var(--wui-color-success-100);
962  }
963
964  .wui-bg-color-success-125 {
965    background-color: var(--wui-color-success-100);
966  }
967
968  .wui-bg-color-inverse-100 {
969    background-color: var(--wui-color-inverse-100);
970  }
971
972  .wui-bg-color-inverse-000 {
973    background-color: var(--wui-color-inverse-000);
974  }
975
976  .wui-bg-color-fg-100 {
977    background-color: var(--wui-color-fg-100);
978  }
979
980  .wui-bg-color-fg-200 {
981    background-color: var(--wui-color-fg-200);
982  }
983
984  .wui-bg-color-fg-300 {
985    background-color: var(--wui-color-fg-300);
986  }
987
988  .wui-color-fg-325 {
989    background-color: var(--wui-color-fg-325);
990  }
991
992  .wui-color-fg-350 {
993    background-color: var(--wui-color-fg-350);
994  }
995`,bn={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:r,truncate:n}){return t.length<=e+r?t:n==="end"?`${t.substring(0,e)}...`:n==="start"?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(t){const r=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),n=this.hexToRgb(r),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),o=100-3*Number(i==null?void 0:i.replace("px","")),a=`${o}% ${o}% at 65% 40%`,c=[];for(let l=0;l<5;l+=1){const u=this.tintColor(n,.15*l);c.push(`rgb(${u[0]}, ${u[1]}, ${u[2]})`)}return`
996    --local-color-1: ${c[0]};
997    --local-color-2: ${c[1]};
998    --local-color-3: ${c[2]};
999    --local-color-4: ${c[3]};
1000    --local-color-5: ${c[4]};
1001    --local-radial-circle: ${a}
1002   `},hexToRgb(t){const e=parseInt(t,16),r=e>>16&255,n=e>>8&255,i=e&255;return[r,n,i]},tintColor(t,e){const[r,n,i]=t,s=Math.round(r+(255-r)*e),o=Math.round(n+(255-n)*e),a=Math.round(i+(255-i)*e);return[s,o,a]},isNumber(t){return{number:/^[0-9]+$/u}.number.test(t)},getColorTheme(t){var e;return t||(typeof window<"u"&&window.matchMedia?(e=window.matchMedia("(prefers-color-scheme: dark)"))!=null&&e.matches?"dark":"light":"dark")},splitBalance(t){const e=t.split(".");return e.length===2?[e[0],e[1]]:["0","00"]},roundNumber(t,e,r){return t.toString().length>=e?Number(t).toFixed(r):t},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}};function c3e(t,e){const{kind:r,elements:n}=e;return{kind:r,elements:n,finisher(i){customElements.get(t)||customElements.define(t,i)}}}function l3e(t,e){return customElements.get(t)||customElements.define(t,e),e}function mt(t){return function(r){return typeof r=="function"?l3e(t,r):c3e(t,r)}}function Jr(t,e,r,n){let i=t[e];return Gr(t,()=>{const s=t[e];Object.is(i,s)||r(i=s)})}const{proxyStateMap:u3e,snapCache:d3e}=jce(),Xg=t=>u3e.has(t);function h3e(t){const e=[];let r=0;const n=new Map,i=new WeakMap,s=()=>{const l=d3e.get(a),u=l==null?void 0:l[1];if(u&&!i.has(u)){const d=new Map(n);i.set(u,d)}},o=l=>i.get(l)||n,a={data:e,index:r,epoch:0,get size(){return Xg(this)||s(),o(this).size},get(l){const d=o(this).get(l);if(d===void 0){this.epoch;return}return this.data[d]},has(l){const u=o(this);return this.epoch,u.has(l)},set(l,u){if(!Xg(this))throw new Error("Cannot perform mutations on a snapshot");const d=n.get(l);return d===void 0?(n.set(l,this.index),this.data[this.index++]=u):this.data[d]=u,this.epoch++,this},delete(l){if(!Xg(this))throw new Error("Cannot perform mutations on a snapshot");const u=n.get(l);return u===void 0?!1:(delete this.data[u],n.delete(l),this.epoch++,!0)},clear(){if(!Xg(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,n.clear()},forEach(l){this.epoch,o(this).forEach((d,h)=>{l(this.data[d],h,this)})},*entries(){this.epoch;const l=o(this);for(const[u,d]of l)yield[u,this.data[d]]},*keys(){this.epoch;const l=o(this);for(const u of l.keys())yield u},*values(){this.epoch;const l=o(this);for(const u of l.values())yield this.data[u]},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return"Map"},toJSON(){return new Map(this.entries())}},c=Rt(a);return Object.defineProperties(c,{size:{enumerable:!1},index:{enumerable:!1},epoch:{enumerable:!1},data:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(c),c}ph.extend(MB);ph.extend(FB);const f3e={...uce,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}},p3e=["January","February","March","April","May","June","July","August","September","October","November","December"];ph.locale("en-web3-modal",f3e);const vS={getMonthNameByIndex(t){return p3e[t]},getYear(t=new Date().toISOString()){return ph(t).year()},getRelativeDateFromNow(t){return ph(t).locale("en-web3-modal").fromNow(!0)},formatDate(t,e="DD MMM"){return ph(t).format(e)}};var ES={};const Be={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"ID_AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122"}
1002,CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],HTTP_STATUS_CODES:{SERVER_ERROR:500,TOO_MANY_REQUESTS:429,SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(typeof sr<"u"&&typeof ES<"u"?ES.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",REMOTE_FEATURES_ALERTS:{MULTI_WALLET_NOT_ENABLED:{DEFAULT:{shortMessage:"Multi-Wallet Not Enabled",longMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com."},CONNECTIONS_HOOK:{shortMessage:"Multi-Wallet Not Enabled",longMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnections hook."},CONNECTION_HOOK:{shortMessage:"Multi-Wallet Not Enabled",longMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnection hook."}}}},g3e={caipNetworkIdToNumber(t){return t?Number(t.split(":")[1]):void 0},parseEvmChainId(t){return typeof t=="string"?this.caipNetworkIdToNumber(t):t},getNetworksByNamespace(t,e){return(t==null?void 0:t.filter(r=>r.chainNamespace===e))||[]},getFirstNetworkByNamespace(t,e){return this.getNetworksByNamespace(t,e)[0]},getNetworkNameByCaipNetworkId(t,e){var i;if(!e)return;const r=t.find(s=>s.caipNetworkId===e);if(r)return r.name;const[n]=e.split(":");return((i=Be.CHAIN_NAME_MAP)==null?void 0:i[n])||void 0}},zt={bigNumber(t){return t?new Oo(t):new Oo(0)},multiply(t,e){if(t===void 0||e===void 0)return new Oo(0);const r=new Oo(t),n=new Oo(e);return r.times(n)},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})},parseLocalStringToNumber(t){return t===void 0?0:parseFloat(t.replace(/,/gu,""))}},D_e={numericInputKeyDown(t,e,r){const n=["Backspace","Meta","Ctrl","a","A","c","C","x","X","v","V","ArrowLeft","ArrowRight","Tab"],i=t.metaKey||t.ctrlKey,s=t.key,o=s.toLocaleLowerCase(),a=o==="a",c=o==="c",l=o==="v",u=o==="x",d=s===",",h=s===".",f=s>="0"&&s<="9";!i&&(a||c||l||u)&&t.preventDefault(),e==="0"&&!d&&!h&&s==="0"&&t.preventDefault(),e==="0"&&f&&(r(s),t.preventDefault()),(d||h)&&(e||(r("0."),t.preventDefault()),(e!=null&&e.includes(".")||e!=null&&e.includes(","))&&t.preventDefault()),!f&&!n.includes(s)&&!h&&!d&&t.preventDefault()}},w3e=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],m3e=[{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],y3e=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],b3e={getERC20Abi:t=>Be.USDT_CONTRACT_ADDRESSES.includes(t)?y3e:w3e,getSwapAbi:()=>m3e},L_e={URLS:{FAQ:"https://walletconnect.com/faq"}},kf={validateCaipAddress(t){var e;if(((e=t.split(":"))==null?void 0:e.length)!==3)throw new Error("Invalid CAIP Address");return t},parseCaipAddress(t){const e=t.split(":");if(e.length!==3)throw new Error(`Invalid CAIP-10 address: ${t}`);const[r,n,i]=e;if(!r||!n||!i)throw new Error(`Invalid CAIP-10 address: ${t}`);return{chainNamespace:r,chainId:n,address:i}},parseCaipNetworkId(t){const e=t.split(":");if(e.length!==2)throw new Error(`Invalid CAIP-2 network id: ${t}`);const[r,n]=e;if(!r||!n)throw new Error(`Invalid CAIP-2 network id: ${t}`);return{chainNamespace:r,chainId:n}}},De={WALLET_ID:"@appkit/wallet_id",WALLET_NAME:"@appkit/wallet_name",SOLANA_WALLET:"@appkit/solana_wallet",SOLANA_CAIP_CHAIN:"@appkit/solana_caip_chain",ACTIVE_CAIP_NETWORK_ID:"@appkit/active_caip_network_id",CONNECTED_SOCIAL:"@appkit/connected_social",CONNECTED_SOCIAL_USERNAME:"@appkit-wallet/SOCIAL_USERNAME",RECENT_WALLETS:"@appkit/recent_wallets",DEEPL
1002INK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",ACTIVE_NAMESPACE:"@appkit/active_namespace",CONNECTED_NAMESPACES:"@appkit/connected_namespaces",CONNECTION_STATUS:"@appkit/connection_status",SIWX_AUTH_TOKEN:"@appkit/siwx-auth-token",SIWX_NONCE_TOKEN:"@appkit/siwx-nonce-token",TELEGRAM_SOCIAL_PROVIDER:"@appkit/social_provider",NATIVE_BALANCE_CACHE:"@appkit/native_balance_cache",PORTFOLIO_CACHE:"@appkit/portfolio_cache",ENS_CACHE:"@appkit/ens_cache",IDENTITY_CACHE:"@appkit/identity_cache",PREFERRED_ACCOUNT_TYPES:"@appkit/preferred_account_types",CONNECTIONS:"@appkit/connections",DISCONNECTED_CONNECTOR_IDS:"@appkit/disconnected_connector_ids"};function J5(t){if(!t)throw new Error("Namespace is required for CONNECTED_CONNECTOR_ID");return`@appkit/${t}:connected_connector_id`}const Ne={setItem(t,e){Rf()&&e!==void 0&&localStorage.setItem(t,e)},getItem(t){if(Rf())return localStorage.getItem(t)||void 0},removeItem(t){Rf()&&localStorage.removeItem(t)},clear(){Rf()&&localStorage.clear()}};function Rf(){return typeof window<"u"&&typeof localStorage<"u"}function Hc(t,e){return e==="light"?{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(230, 100%, 67%, 1)","--w3m-background":"#121313"}}var CS={};const X5=(typeof sr<"u"&&typeof CS<"u"?CS.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",WR=[{label:"Meld.io",name:"meld",feeRange:"1-2%",url:"https://meldcrypto.com",supportedChains:["eip155","solana"]}],v3e="WXETMuFUQmqqybHuRkSgxv:25B8LJHSfpG6LVjR2ytU5Cwh7Z4Sch2ocoU",cn={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,FIVE_SEC_MS:5e3,THREE_SEC_MS:3e3,ONE_SEC_MS:1e3,SECURE_SITE:X5,SECURE_SITE_DASHBOARD:`${X5}/dashboard`,SECURE_SITE_FAVICON:`${X5}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],SWAP_SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],SWAP_POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","METAL","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],BALANCE_SUPPORTED_CHAINS:[Be.CHAIN.EVM,Be.CHAIN.SOLANA],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:56","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NAMES_SUPPORTED_CHAIN_NAMESPACES:[Be.CHAIN.EVM],ONRAMP_SUPPORTED_CHAIN_NAMESPACES:[Be.CHAIN.EVM,Be.CHAIN.SOLANA],ACTIVITY_ENABLED_CHAIN_NAMESPACES:[Be.CHAIN.EVM],NATIVE_TOKEN_ADDRESS:{eip155:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",solana:"So11111111111111111111111111111111111111111",polkadot:"0x",bip122:"0x",cosmos:"0x"},CONVERT_SLIPPAGE_TOLERANCE:1,CONNECT_LABELS:{MOBILE:"Open and continue in the wallet app",WEB:"Open and continue in the wallet app"},SEND_SUPPORTED_NAMESPACES:[Be.CHAIN.EVM,Be.CHAIN.SOLANA],DEFAULT_REMOTE_FEATURES:{swaps:["1inch"],onramp:["meld"],email:!0,socials:["google","x","discord","farcaster","github","apple","facebook"],activity:!0,reownBranding:!0,multiWallet:!1},DEFAULT_REMOTE_FEATURES_DISABLED:{email:!1,socials:!1,swaps:!1,onramp:!1,activity:!1,reownBranding:!1},DEFAULT_FEATURES:{receive:!0,send:!0,emailShowWallets:!0,connectorTypeOrder:["walletConnect","recent","injected","featured","custom","external","recommended"],analytics:!0,allWallets:!0,legalCheckbox:!1,smartSessions:!1,collapseWallets:!1,walletFeaturesOrder:["onramp","swaps","receive","send"],connectMethodsOrder:void 0,pay:!1},DEFAULT_SOCIALS:["google","x","farcaster","discord","apple","github","facebook"],DEFAULT_ACCOUNT_TYPES:{bip122:"payment",eip155:"smartAccount",polkadot:"eoa",solana:"eoa"},ADAPTER_TYPES:{UNIVERSAL:"universal",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",BITCOIN:"bitcoin"},SIWX_DEFAULTS:{signOutOnDisconnect:!0}},Ae={cacheExpiry:{portfolio:3e4,nativeBalance:3e4,ens:3e5,identity:3e5},isCacheExpired(t,e){return Date.now()-t>e},getActiveNetworkProps(){const t=Ae.getActiveNamespace(),e=Ae.getActiveCaipNetworkId(),r=e?e.split(":")[1]:void 0,n=r?isNaN(Number(r))?r:Number(r):void 0;return{namespace:t,caipNetworkId:e,chainId:n}},setWalletConnectDeepLink({name:t,href:e}){try{Ne.setItem(De.DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const t=Ne.getItem(De.DEEPLINK_CHOICE);if(t)return JSON.parse(t)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{Ne.removeItem(De.DEEPLINK_CHOICE)}catch{console.info("Unable to delete WalletConnect deep link")}},setActiveNamespace(t){try{Ne.setItem(De.ACTIVE_NAMESPACE,t)}catch{console.info("Unable to set active namespace")}},setActiveCaipNetworkId(t){try{Ne.setItem(De.ACTIVE_CAIP_NETWORK_ID,t),Ae.setActiveNamespace(t.split(":")[0])}catch{console.info("Unable to set active caip network id")}},getActiveCaipNetworkId(){try{return Ne.getItem(De.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to get active caip network id");return}},deleteActiveCaipNetworkId(){try{Ne.removeItem(De.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to delete active caip network id")}},deleteConnectedConnectorId(t){try{const e=J5(t);Ne.removeItem(e)}catch{console.info("Unable to delete connected connector id")}},setAppKitRecent(t){try{const e=Ae.getRecentWallets();e.find(n=>n.id===t.id)||(e.unshift(t),e.length>2&&e.pop(),Ne.setItem(De.RECENT_WALLETS,JSON.stringify(e)))}catch{console.info("Unable to set AppKit recent")}},getRecentWallets(){try{const t=Ne.getItem(De.RECENT_WALLETS);return t?JSON.parse(t):[]}
1002catch{console.info("Unable to get AppKit recent")}return[]},setConnectedConnectorId(t,e){try{const r=J5(t);Ne.setItem(r,e)}catch{console.info("Unable to set Connected Connector Id")}},getActiveNamespace(){try{return Ne.getItem(De.ACTIVE_NAMESPACE)}catch{console.info("Unable to get active namespace")}},getConnectedConnectorId(t){if(t)try{const e=J5(t);return Ne.getItem(e)}catch{console.info("Unable to get connected connector id in namespace",t)}},setConnectedSocialProvider(t){try{Ne.setItem(De.CONNECTED_SOCIAL,t)}catch{console.info("Unable to set connected social provider")}},getConnectedSocialProvider(){try{return Ne.getItem(De.CONNECTED_SOCIAL)}catch{console.info("Unable to get connected social provider")}},deleteConnectedSocialProvider(){try{Ne.removeItem(De.CONNECTED_SOCIAL)}catch{console.info("Unable to delete connected social provider")}},getConnectedSocialUsername(){try{return Ne.getItem(De.CONNECTED_SOCIAL_USERNAME)}catch{console.info("Unable to get connected social username")}},getStoredActiveCaipNetworkId(){var r;const t=Ne.getItem(De.ACTIVE_CAIP_NETWORK_ID);return(r=t==null?void 0:t.split(":"))==null?void 0:r[1]},setConnectionStatus(t){try{Ne.setItem(De.CONNECTION_STATUS,t)}catch{console.info("Unable to set connection status")}},getConnectionStatus(){try{return Ne.getItem(De.CONNECTION_STATUS)}catch{return}},getConnectedNamespaces(){try{const t=Ne.getItem(De.CONNECTED_NAMESPACES);return t!=null&&t.length?t.split(","):[]}catch{return[]}},setConnectedNamespaces(t){try{const e=Array.from(new Set(t));Ne.setItem(De.CONNECTED_NAMESPACES,e.join(","))}catch{console.info("Unable to set namespaces in storage")}},addConnectedNamespace(t){try{const e=Ae.getConnectedNamespaces();e.includes(t)||(e.push(t),Ae.setConnectedNamespaces(e))}catch{console.info("Unable to add connected namespace")}},removeConnectedNamespace(t){try{const e=Ae.getConnectedNamespaces(),r=e.indexOf(t);r>-1&&(e.splice(r,1),Ae.setConnectedNamespaces(e))}catch{console.info("Unable to remove connected namespace")}},getTelegramSocialProvider(){try{return Ne.getItem(De.TELEGRAM_SOCIAL_PROVIDER)}catch{return console.info("Unable to get telegram social provider"),null}},setTelegramSocialProvider(t){try{Ne.setItem(De.TELEGRAM_SOCIAL_PROVIDER,t)}catch{console.info("Unable to set telegram social provider")}},removeTelegramSocialProvider(){try{Ne.removeItem(De.TELEGRAM_SOCIAL_PROVIDER)}catch{console.info("Unable to remove telegram social provider")}},getBalanceCache(){let t={};try{const e=Ne.getItem(De.PORTFOLIO_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get balance cache")}return t},removeAddressFromBalanceCache(t){try{const e=Ae.getBalanceCache();Ne.setItem(De.PORTFOLIO_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove address from balance cache",t)}},getBalanceCacheForCaipAddress(t){try{const r=Ae.getBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.portfolio))return r.balance;Ae.removeAddressFromBalanceCache(t)}catch{console.info("Unable to get balance cache for address",t)}},updateBalanceCache(t){try{const e=Ae.getBalanceCache();e[t.caipAddress]=t,Ne.setItem(De.PORTFOLIO_CACHE,JSON.stringify(e))}catch{console.info("Unable to update balance cache",t)}},getNativeBalanceCache(){let t={};try{const e=Ne.getItem(De.NATIVE_BALANCE_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get balance cache")}return t},removeAddressFromNativeBalanceCache(t){try{const e=Ae.getBalanceCache();Ne.setItem(De.NATIVE_BALANCE_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove address from balance cache",t)}},getNativeBalanceCacheForCaipAddress(t){try{const r=Ae.getNativeBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.nativeBalance))return r;console.info("Discarding cache for address",t),Ae.removeAddressFromBalanceCache(t)}catch{console.info("Unable to get balance cache for address",t)}},updateNativeBalanceCache(t){try{const e=Ae.getNativeBalanceCache();e[t.caipAddress]=t,Ne.setItem(De.NATIVE_BALANCE_CACHE,JSON.stringify(e))}catch{console.info("Unable to update balance cache",t)}},getEnsCache(){let t={};try{const e=Ne.getItem(De.ENS_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get ens name cache")}return t}
1002,getEnsFromCacheForAddress(t){try{const r=Ae.getEnsCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.ens))return r.ens;Ae.removeEnsFromCache(t)}catch{console.info("Unable to get ens name from cache",t)}},updateEnsCache(t){try{const e=Ae.getEnsCache();e[t.address]=t,Ne.setItem(De.ENS_CACHE,JSON.stringify(e))}catch{console.info("Unable to update ens name cache",t)}},removeEnsFromCache(t){try{const e=Ae.getEnsCache();Ne.setItem(De.ENS_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove ens name from cache",t)}},getIdentityCache(){let t={};try{const e=Ne.getItem(De.IDENTITY_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get identity cache")}return t},getIdentityFromCacheForAddress(t){try{const r=Ae.getIdentityCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.identity))return r.identity;Ae.removeIdentityFromCache(t)}catch{console.info("Unable to get identity from cache",t)}},updateIdentityCache(t){try{const e=Ae.getIdentityCache();e[t.address]={identity:t.identity,timestamp:t.timestamp},Ne.setItem(De.IDENTITY_CACHE,JSON.stringify(e))}catch{console.info("Unable to update identity cache",t)}},removeIdentityFromCache(t){try{const e=Ae.getIdentityCache();Ne.setItem(De.IDENTITY_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove identity from cache",t)}},clearAddressCache(){try{Ne.removeItem(De.PORTFOLIO_CACHE),Ne.removeItem(De.NATIVE_BALANCE_CACHE),Ne.removeItem(De.ENS_CACHE),Ne.removeItem(De.IDENTITY_CACHE)}catch{console.info("Unable to clear address cache")}},setPreferredAccountTypes(t){try{Ne.setItem(De.PREFERRED_ACCOUNT_TYPES,JSON.stringify(t))}catch{console.info("Unable to set preferred account types",t)}},getPreferredAccountTypes(){try{const t=Ne.getItem(De.PREFERRED_ACCOUNT_TYPES);return t?JSON.parse(t):{}}catch{console.info("Unable to get preferred account types")}return{}},setConnections(t,e){try{const r=Ae.getConnections(),n=r[e]??[],i=new Map;for(const o of n)i.set(o.connectorId,{...o});for(const o of t){const a=i.get(o.connectorId),c=o.connectorId===Be.CONNECTOR_ID.AUTH;if(a&&!c){const l=new Set(a.accounts.map(d=>d.address.toLowerCase())),u=o.accounts.filter(d=>!l.has(d.address.toLowerCase()));a.accounts.push(...u)}else i.set(o.connectorId,{...o})}const s={...r,[e]:Array.from(i.values())};Ne.setItem(De.CONNECTIONS,JSON.stringify(s))}catch(r){console.error("Unable to sync connections to storage",r)}},getConnections(){try{const t=Ne.getItem(De.CONNECTIONS);return t?JSON.parse(t):{}}catch(t){return console.error("Unable to get connections from storage",t),{}}},deleteAddressFromConnection({connectorId:t,address:e,namespace:r}){try{const n=Ae.getConnections(),i=n[r]??[],s=new Map(i.map(a=>[a.connectorId,a])),o=s.get(t);o&&(o.accounts.filter(c=>c.address.toLowerCase()!==e.toLowerCase()).length===0?s.delete(t):s.set(t,{...o,accounts:o.accounts.filter(c=>c.address.toLowerCase()!==e.toLowerCase())})),Ne.setItem(De.CONNECTIONS,JSON.stringify({...n,[r]:Array.from(s.values())}))}catch{console.error(`Unable to remove address "${e}" from connector "${t}" in namespace "${r}"`)}},getDisconnectedConnectorIds(){try{const t=Ne.getItem(De.DISCONNECTED_CONNECTOR_IDS);return t?JSON.parse(t):{}}catch{console.info("Unable to get disconnected connector ids")}return{}},addDisconnectedConnectorId(t,e){try{const r=Ae.getDisconnectedConnectorIds(),n=r[e]??[];n.push(t),Ne.setItem(De.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[e]:Array.from(new Set(n))}))}catch{console.error(`Unable to set disconnected connector id "${t}" for namespace "${e}"`)}},removeDisconnectedConnectorId(t,e){try{const r=Ae.getDisconnectedConnectorIds();let n=r[e]??[];n=n.filter(i=>i.toLowerCase()!==t.toLowerCase()),Ne.setItem(De.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[e]:Array.from(new Set(n))}))}catch{console.error(`Unable to remove disconnected connector id "${t}" for namespace "${e}"`)}},isConnectorDisconnected(t,e){try{return(Ae.getDisconnectedConnectorIds()[e]??[]).some(i=>i.toLowerCase()===t.toLowerCase())}catch{console.info(`Unable to get disconnected connector id "${t}" for namespace "${e}"`)}return!1}},Ve={isMobile(){var t;return this.isClient()?!!(window!=null&&window.matchMedia&&typeof window.matchMedia=="function"&&((t=window.matchMedia("(pointer:coarse)"))!=null&&t.matches)||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(t,e=""){return t==null?void 0:t.caipNetworkId.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){if(!this.isMobile())return!1;const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return Ve.isMobile()&&t.includes("android")},isIos(){if(!this.isMobile())return!1;const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return t.includes("iphone")||t.includes("ipad")},isSafari(){return this.isClient()?(window==null?void 0:window.navigator.userAgent.toLowerCase()).includes("safari"):!1}
1002,isClient(){return typeof window<"u"},isPairingExpired(t){return t?t-Date.now()<=cn.TEN_SEC_MS:!0},isAllowedRetry(t,e=cn.ONE_SEC_MS){return Date.now()-t>=e},copyToClopboard(t){navigator.clipboard.writeText(t)},isIframe(){try{return(window==null?void 0:window.self)!==(window==null?void 0:window.top)}catch{return!1}},isSafeApp(){var t,e;if(Ve.isClient()&&window.self!==window.top)try{const r=(e=(t=window==null?void 0:window.location)==null?void 0:t.ancestorOrigins)==null?void 0:e[0],n="https://app.safe.global";if(r){const i=new URL(r),s=new URL(n);return i.hostname===s.hostname}}catch{return!1}return!1},getPairingExpiry(){return Date.now()+cn.FOUR_MINUTES_MS},getNetworkId(t){return t==null?void 0:t.split(":")[1]},getPlainAddress(t){return t==null?void 0:t.split(":")[2]},async wait(t){return new Promise(e=>{setTimeout(e,t)})},debounce(t,e=500){let r;return(...n)=>{function i(){t(...n)}r&&clearTimeout(r),r=setTimeout(i,e)}},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},formatNativeUrl(t,e,r=null){if(Ve.isHttpUrl(t))return this.formatUniversalUrl(t,e);let n=t,i=r;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),i&&!(i!=null&&i.endsWith("/"))&&(i=`${i}/`),this.isTelegram()&&this.isAndroid()&&(e=encodeURIComponent(e));const s=encodeURIComponent(e);return{redirect:`${n}wc?uri=${s}`,redirectUniversalLink:i?`${i}wc?uri=${s}`:void 0,href:n}},formatUniversalUrl(t,e){if(!Ve.isHttpUrl(t))return this.formatNativeUrl(t,e);let r=t;r.endsWith("/")||(r=`${r}/`);const n=encodeURIComponent(e);return{redirect:`${r}wc?uri=${n}`,href:r}},getOpenTargetForPlatform(t){return t==="popupWindow"?t:this.isTelegram()?Ae.getTelegramSocialProvider()?"_top":"_blank":t},openHref(t,e,r){window==null||window.open(t,this.getOpenTargetForPlatform(e),r||"noreferrer noopener")},returnOpenHref(t,e,r){return window==null?void 0:window.open(t,this.getOpenTargetForPlatform(e),r||"noreferrer noopener")},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},isPWA(){var r,n;if(typeof window>"u")return!1;const t=window!=null&&window.matchMedia&&typeof window.matchMedia=="function"?(r=window.matchMedia("(display-mode: standalone)"))==null?void 0:r.matches:!1,e=(n=window==null?void 0:window.navigator)==null?void 0:n.standalone;return!!(t||e)},async preloadImage(t){const e=new Promise((r,n)=>{const i=new Image;i.onload=r,i.onerror=n,i.crossOrigin="anonymous",i.src=t});return Promise.race([e,Ve.wait(2e3)])},formatBalance(t,e){let r="0.000";if(typeof t=="string"){const n=Number(t);if(n){const i=Math.floor(n*1e3)/1e3;i&&(r=i.toString())}}return`${r}${e?` ${e}`:""}`},formatBalance2(t,e){var n;let r;if(t==="0")r="0";else if(typeof t=="string"){const i=Number(t);i&&(r=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return{value:r??"0",rest:r==="0"?"000":"",symbol:e}},getApiUrl(){return Be.W3M_API_URL},getBlockchainApiUrl(){return Be.BLOCKCHAIN_API_RPC_URL},getAnalyticsUrl(){return Be.PULSE_API_URL},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})},parseError(t){var e,r;return typeof t=="string"?t:typeof((r=(e=t==null?void 0:t.issues)==null?void 0:e[0])==null?void 0:r.message)=="string"?t.issues[0].message:t instanceof Error?t.message:"Unknown error"},sortRequestedNetworks(t,e=[]){const r={};return e&&t&&(t.forEach((n,i)=>{r[n]=i}),e.sort((n,i)=>{const s=r[n.id],o=r[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(t){let e=0;for(const r of t)e+=r.value??0;return e},formatTokenBalance(t){const e=t.toFixed(2),[r,n]=e.split(".");return{dollars:r,pennies:n}},isAddress(t,e="eip155"){switch(e){case"eip155":if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)||/^(?:0x)?[0-9A-F]{40}$/iu.test(t))return!0}else return!1;return!1;case"solana":return/[1-9A-HJ-NP-Za-km-z]{32,44}$/iu.test(t);default:return!1}},uniqueBy(t,e){const r=new Set;return t.filter(n=>{const i=n[e];return r.has(i)?!1:(r.add(i),!0)})},generateSdkVersion(t,e,r){const i=t.length===0?cn.ADAPTER_TYPES.UNIVERSAL:t.map(s=>s.adapterType).join(",");return`${e}-${i}-${r}`},createAccount(t,e,r,n,i){return{namespace:t,address:e,type:r,publicKey:n,path:i}},isCaipAddress(t){if(typeof t!="string")return!1;const e=t.split(":"),r=e[0];return e.filter(Boolean).length===3&&r in Be.CHAIN_NAME_MAP},getAccount(t){return t?typeof t=="string"?{address:t,chainId:void 0}:{address:t.address,chainId:t.chainId}:{address:void 0,chainId:void 0}},isMac(){const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return t.includes("macintosh")&&!t.includes("safari")},formatTelegramSocialLoginUrl(t){const e=`--${encodeURIComponent(window==null?void 0:window.location.href)}`,r="state=";if(new URL(t).host==="auth.magic.link"){const i="provider_authorization_url=",s=t.substring(t.indexOf(i)+i.length),o=this.injectIntoUrl(decodeURIComponent(s),r,e);return t.replace(s,encodeURIComponent(o))}return this.injectIntoUrl(t,r,e)},injectIntoUrl(t,e,r){const n=t.indexOf(e);if(n===-1)throw new Error(`${e} parameter not found in the URL: ${t}`);const i=t.indexOf("&",n),s=e.length,o=i!==-1?i:t.length,a=t.substring(0,n+s),c=t.substring(n+s,o),l=t.substring(i),u=c+r;return a+u+l}};async function yf(...t){const e=await fetch(...t);if(!e.ok)throw new Error(`HTTP status code: ${e.status}`,{cause:e});return e}class Kp{constructor({baseUrl:e,clientId:r}){this.baseUrl=e,this.clientId=r}async get({headers:e,signal:r,cache:n,...i}){const s=this.createUrl(i);return(await yf(s,{method:"GET",headers:e,signal:r,cache:n})).json()}async getBlob({headers:e,signal:r,...n}){const i=this.createUrl(n);return(await yf(i,{method:"GET",headers:e,signal:r})).blob()}async post({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await yf(s,{method:"POST",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await yf(s,{method:"PUT",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await yf(s,{method:"DELETE",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:r}){const n=new URL(e,this.baseUrl);return r&&Object.entries(r).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),this.clientId&&n.searchParams.append("clientId",this.clientId),n}}const E3e={getFeatureValue(t,e){const r=e==null?void 0:e[t];return r===void 0?cn.DEFAULT_FEATURES[t]:r}
1002,filterSocialsByPlatform(t){if(!t||!t.length)return t;if(Ve.isTelegram()){if(Ve.isIos())return t.filter(e=>e!=="google");if(Ve.isMac())return t.filter(e=>e!=="x");if(Ve.isAndroid())return t.filter(e=>!["facebook","x"].includes(e))}return t}},xe=Rt({features:cn.DEFAULT_FEATURES,projectId:"",sdkType:"appkit",sdkVersion:"html-wagmi-undefined",defaultAccountTypes:cn.DEFAULT_ACCOUNT_TYPES,enableNetworkSwitch:!0,experimental_preferUniversalLinks:!1,remoteFeatures:{}}),Xe={state:xe,subscribeKey(t,e){return Jr(xe,t,e)},setOptions(t){Object.assign(xe,t)},setRemoteFeatures(t){var r,n;if(!t)return;const e={...xe.remoteFeatures,...t};xe.remoteFeatures=e,(r=xe.remoteFeatures)!=null&&r.socials&&(xe.remoteFeatures.socials=E3e.filterSocialsByPlatform(xe.remoteFeatures.socials)),(n=xe.features)!=null&&n.pay&&(xe.remoteFeatures.email=!1,xe.remoteFeatures.socials=!1)},setFeatures(t){var r;if(!t)return;xe.features||(xe.features=cn.DEFAULT_FEATURES);const e={...xe.features,...t};xe.features=e,(r=xe.features)!=null&&r.pay&&xe.remoteFeatures&&(xe.remoteFeatures.email=!1,xe.remoteFeatures.socials=!1)},setProjectId(t){xe.projectId=t},setCustomRpcUrls(t){xe.customRpcUrls=t},setAllWallets(t){xe.allWallets=t},setIncludeWalletIds(t){xe.includeWalletIds=t},setExcludeWalletIds(t){xe.excludeWalletIds=t},setFeaturedWalletIds(t){xe.featuredWalletIds=t},setTokens(t){xe.tokens=t},setTermsConditionsUrl(t){xe.termsConditionsUrl=t},setPrivacyPolicyUrl(t){xe.privacyPolicyUrl=t},setCustomWallets(t){xe.customWallets=t},setIsSiweEnabled(t){xe.isSiweEnabled=t},setIsUniversalProvider(t){xe.isUniversalProvider=t},setSdkVersion(t){xe.sdkVersion=t},setMetadata(t){xe.metadata=t},setDisableAppend(t){xe.disableAppend=t},setEIP6963Enabled(t){xe.enableEIP6963=t},setDebug(t){xe.debug=t},setEnableWalletConnect(t){xe.enableWalletConnect=t},setEnableWalletGuide(t){xe.enableWalletGuide=t},setEnableAuthLogger(t){xe.enableAuthLogger=t},setEnableWallets(t){xe.enableWallets=t},setPreferUniversalLinks(t){xe.experimental_preferUniversalLinks=t},setSIWX(t){if(t)for(const[e,r]of Object.entries(cn.SIWX_DEFAULTS))t[e]??(t[e]=r);xe.siwx=t},setConnectMethodsOrder(t){xe.features={...xe.features,connectMethodsOrder:t}},setWalletFeaturesOrder(t){xe.features={...xe.features,walletFeaturesOrder:t}},setSocialsOrder(t){xe.remoteFeatures={...xe.remoteFeatures,socials:t}},setCollapseWallets(t){xe.features={...xe.features,collapseWallets:t}},setEnableEmbedded(t){xe.enableEmbedded=t},setAllowUnsupportedChain(t){xe.allowUnsupportedChain=t},setManualWCControl(t){xe.manualWCControl=t},setEnableNetworkSwitch(t){xe.enableNetworkSwitch=t},setEnableReconnect(t){xe.enableReconnect=t},setDefaultAccountTypes(t={}){Object.entries(t).forEach(([e,r])=>{r&&(xe.defaultAccountTypes[e]=r)})},setUniversalProviderConfigOverride(t){xe.universalProviderConfigOverride=t},getUniversalProviderConfigOverride(){return xe.universalProviderConfigOverride},getSnapshot(){return U1(xe)}},C3e=Object.freeze({enabled:!0,events:[]}),x3e=new Kp({baseUrl:Ve.getAnalyticsUrl(),clientId:null}),_3e=5,S3e=60*1e3,$c=Rt({...C3e}),I3e={state:$c,subscribeKey(t,e){return Jr($c,t,e)},async sendError(t,e){if(!$c.enabled)return;const r=Date.now();if($c.events.filter(s=>{const o=new Date(s.properties.timestamp||"").getTime();return r-o<S3e}).length>=_3e)return;const i={type:"error",event:e,properties:{errorType:t.name,errorMessage:t.message,stackTrace:t.stack,timestamp:new Date().toISOString()}};$c.events.push(i);try{if(typeof window>"u")return;const{projectId:s,sdkType:o,sdkVersion:a}=Xe.state;await x3e.post({path:"/e",params:{projectId:s,st:o,sv:a||"html-wagmi-4.2.2"},body:{eventId:Ve.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:new Date().toISOString(),props:{type:"error",event:e,errorType:t.name,errorMessage:t.message,stackTrace:t.stack}}})}catch{}},enable(){$c.enabled=!0},disable(){$c.enabled=!1},clearEvents(){$c.events=[]}};class Xh extends Error{constructor(e,r,n){super(e),this.name="AppKitError",this.category=r,this.originalError=n,Object.setPrototypeOf(this,Xh.prototype);let i=!1;
1002if(n instanceof Error&&typeof n.stack=="string"&&n.stack){const s=n.stack,o=s.indexOf(`
1003`);if(o>-1){const a=s.substring(o+1);this.stack=`${this.name}: ${this.message}
1004${a}`,i=!0}}i||(Error.captureStackTrace?Error.captureStackTrace(this,Xh):this.stack||(this.stack=`${this.name}: ${this.message}`))}}function xS(t,e){const r=t instanceof Xh?t:new Xh(t instanceof Error?t.message:String(t),e,t);throw I3e.sendError(r,r.category),r}function jn(t,e="INTERNAL_SDK_ERROR"){const r={};return Object.keys(t).forEach(n=>{const i=t[n];if(typeof i=="function"){let s=i;i.constructor.name==="AsyncFunction"?s=async(...o)=>{try{return await i(...o)}catch(a){return xS(a,e)}}:s=(...o)=>{try{return i(...o)}catch(a){return xS(a,e)}},r[n]=s}else r[n]=i}),r}var Qh={};const $3e="https://secure.walletconnect.org/sdk",M_e=(typeof sr<"u"&&typeof Qh<"u"?Qh.NEXT_PUBLIC_SECURE_SITE_SDK_URL:void 0)||$3e,U_e=(typeof sr<"u"&&typeof Qh<"u"?Qh.NEXT_PUBLIC_DEFAULT_LOG_LEVEL:void 0)||"error",j_e=(typeof sr<"u"&&typeof Qh<"u"?Qh.NEXT_PUBLIC_SECURE_SITE_SDK_VERSION:void 0)||"4",z_e={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@appkit-wallet/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",SOCIAL_USERNAME:"SOCIAL_USERNAME",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",APP_CONNECT_FARCASTER:"@w3m-app/CONNECT_FARCASTER",APP_GET_FARCASTER_URI:"@w3m-app/GET_FARCASTER_URI",APP_RELOAD:"@w3m-app/RELOAD",APP_RPC_ABORT:"@w3m-app/RPC_ABORT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_CONNECT_FARCASTER_SUCCESS:"@w3m-frame/CONNECT_FARCASTER_SUCCESS",FRAME_CONNECT_FARCASTER_ERROR:"@w3m-frame/CONNECT_FARCASTER_ERROR",FRAME_GET_FARCASTER_URI_SUCCESS:"@w3m-frame/GET_FARCASTER_URI_SUCCESS",FRAME_GET_FARCASTER_URI_ERROR:"@w3m-frame/GET_FARCASTER_URI_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",FRAME_READY:"@w3m-frame/READY",FRAME_RELOAD_SUCCESS:"@w3m-frame/RELOAD_SUCCESS",FRAME_RELOAD_ERROR:"@w3m-frame/RELOAD_ERROR",FRAME_RPC_ABORT_SUCCESS:"@w3m-frame/RPC_ABORT_SUCCESS",FRAME_RPC_ABORT_ERROR:"@w3m-frame/RPC_ABORT_ERROR",RPC_RESPONSE_TYPE_ER
1004ROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},Lo={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter","wallet_getCapabilities","wallet_getCallsStatus","eth_getUserOperationReceipt","eth_estimateUserOperationGas","eth_getUserOperationByHash","eth_supportedEntryPoints","wallet_getAssets"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction","solana_signMessage","solana_signTransaction","solana_signAllTransactions","solana_signAndSendTransaction","wallet_sendCalls","wallet_grantPermissions","wallet_revokePermissions","eth_sendUserOperation"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}},Po={PHANTOM:{id:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",url:"https://phantom.app"},SOLFLARE:{id:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",url:"https://solflare.com"},COINBASE:{id:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",url:"https://go.cb-w.com"}},A3e={handleMobileDeeplinkRedirect(t,e){const r=window.location.href,n=encodeURIComponent(r);if(t===Po.PHANTOM.id&&!("phantom"in window)){const i=r.startsWith("https")?"https":"http",s=r.split("/")[2],o=encodeURIComponent(`${i}://${s}`);window.location.href=`${Po.PHANTOM.url}/ul/browse/${n}?ref=${o}`}t===Po.SOLFLARE.id&&!("solflare"in window)&&(window.location.href=`${Po.SOLFLARE.url}/ul/v1/browse/${n}?ref=${n}`),e===Be.CHAIN.SOLANA&&t===Po.COINBASE.id&&!("coinbaseSolana"in window)&&(window.location.href=`${Po.COINBASE.url}/dapp?cb_url=${n}`)}},Ei=Rt({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),P3e={state:Ei,subscribeNetworkImages(t){return Gr(Ei.networkImages,()=>t(Ei.networkImages))},subscribeKey(t,e){return Jr(Ei,t,e)},subscribe(t){return Gr(Ei,()=>t(Ei))},setWalletImage(t,e){Ei.walletImages[t]=e},setNetworkImage(t,e){Ei.networkImages[t]=e},setChainImage(t,e){Ei.chainImages[t]=e},setConnectorImage(t,e){Ei.connectorImages={...Ei.connectorImages,[t]:e}},setTokenImage(t,e){Ei.tokenImages[t]=e},setCurrencyImage(t,e){Ei.currencyImages[t]=e}},zs=jn(P3e),T3e={eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"a1b58899-f671-4276-6a5e-56ca5bd59700",polkadot:"",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00",cosmos:""},Q5=Rt({networkImagePromises:{}}),O3e={async fetchWalletImage(t){if(t)return await Ue._fetchWalletImage(t),this.getWalletImageById(t)},async fetchNetworkImage(t){if(!t)return;const e=this.getNetworkImageById(t);return e||(Q5.networkImagePromises[t]||(Q5.networkImagePromises[t]=Ue._fetchNetworkImage(t)),await Q5.networkImagePromises[t],this.getNetworkImageById(t))},getWalletImageById(t){if(t)return zs.state.walletImages[t]},getWalletImage(t){if(t!=null&&t.image_url)return t==null?void 0:t.image_url;if(t!=null&&t.image_id)return zs.state.walletImages[t.image_id]},getNetworkImage(t){var e,r,n;if((e=t==null?void 0:t.assets)!=null&&e.imageUrl)return(r=t==null?void 0:t.assets)==null?void 0:r.imageUrl;if((n=t==null?void 0:t.assets)!=null&&n.imageId)return zs.state.networkImages[t.assets.imageId]},getNetworkImageById(t){if(t)return zs.state.networkImages[t]},getConnectorImage(t){var e;if(t!=null&&t.imageUrl)return t.imageUrl;if((e=t==null?void 0:t.info)!=null&&e.icon)return t.info.icon;if(t!=null&&t.imageId)return zs.state.connectorImages[t.imageId]},getChainImage(t){return zs.state.networkImages[T3e[t]]}},Ac=Rt({message:"",variant:"info",open:!1}),N3e={state:Ac,subscribeKey(t,e){return Jr(Ac,t,e)},open(t,e){const{debug:r}=Xe.state,{shortMessage:n,longMessage:i}=t;r&&(Ac.message=n,Ac.variant=e,Ac.open=!0),i&&console.error(typeof i=="function"?i():i)},close(){Ac.open=!1,Ac.message="",Ac.variant="info"}}
1004,E8=jn(N3e),k3e=Ve.getAnalyticsUrl(),R3e=new Kp({baseUrl:k3e,clientId:null}),B3e=["MODAL_CREATED"],pa=Rt({timestamp:Date.now(),reportedErrors:{},data:{type:"track",event:"MODAL_CREATED"}}),Kt={state:pa,subscribe(t){return Gr(pa,()=>t(pa))},getSdkProperties(){const{projectId:t,sdkType:e,sdkVersion:r}=Xe.state;return{projectId:t,st:e,sv:r||"html-wagmi-4.2.2"}},async _sendAnalyticsEvent(t){try{const e=yt.state.address;if(B3e.includes(t.data.event)||typeof window>"u")return;await R3e.post({path:"/e",params:Kt.getSdkProperties(),body:{eventId:Ve.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:t.timestamp,props:{...t.data,address:e}}}),pa.reportedErrors.FORBIDDEN=!1}catch(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===Be.HTTP_STATUS_CODES.FORBIDDEN&&!pa.reportedErrors.FORBIDDEN&&(E8.open({shortMessage:"Invalid App Configuration",longMessage:`Origin ${Rf()?window.origin:"uknown"} not found on Allowlist - update configuration on cloud.reown.com`},"error"),pa.reportedErrors.FORBIDDEN=!0)}},sendEvent(t){var e;pa.timestamp=Date.now(),pa.data=t,((e=Xe.state.features)!=null&&e.analytics||t.event==="INITIALIZE")&&Kt._sendAnalyticsEvent(pa)}},D3e=Ve.getApiUrl(),Zn=new Kp({baseUrl:D3e,clientId:null}),L3e=40,_S=4,M3e=20,He=Rt({promises:{},page:1,count:0,featured:[],allFeatured:[],recommended:[],allRecommended:[],wallets:[],filteredWallets:[],search:[],isAnalyticsEnabled:!1,excludedWallets:[],isFetchingRecommendedWallets:!1}),Ue={state:He,subscribeKey(t,e){return Jr(He,t,e)},_getSdkProperties(){const{projectId:t,sdkType:e,sdkVersion:r}=Xe.state;return{projectId:t,st:e||"appkit",sv:r||"html-wagmi-4.2.2"}},_filterOutExtensions(t){return Xe.state.isUniversalProvider?t.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):t},async _fetchWalletImage(t){const e=`${Zn.baseUrl}/getWalletImage/${t}`,r=await Zn.getBlob({path:e,params:Ue._getSdkProperties()});zs.setWalletImage(t,URL.createObjectURL(r))},async _fetchNetworkImage(t){const e=`${Zn.baseUrl}/public/getAssetImage/${t}`,r=await Zn.getBlob({path:e,params:Ue._getSdkProperties()});zs.setNetworkImage(t,URL.createObjectURL(r))},async _fetchConnectorImage(t){const e=`${Zn.baseUrl}/public/getAssetImage/${t}`,r=await Zn.getBlob({path:e,params:Ue._getSdkProperties()});zs.setConnectorImage(t,URL.createObjectURL(r))},async _fetchCurrencyImage(t){const e=`${Zn.baseUrl}/public/getCurrencyImage/${t}`,r=await Zn.getBlob({path:e,params:Ue._getSdkProperties()});zs.setCurrencyImage(t,URL.createObjectURL(r))},async _fetchTokenImage(t){const e=`${Zn.baseUrl}/public/getTokenImage/${t}`,r=await Zn.getBlob({path:e,params:Ue._getSdkProperties()});zs.setTokenImage(t,URL.createObjectURL(r))},_filterWalletsByPlatform(t){return Ve.isMobile()?t==null?void 0:t.filter(r=>r.mobile_link||r.id===Po.COINBASE.id?!0:Z.state.activeChain==="solana"&&(r.id===Po.SOLFLARE.id||r.id===Po.PHANTOM.id)):t},async fetchProjectConfig(){return(await Zn.get({path:"/appkit/v1/config",params:Ue._getSdkProperties()})).features},async fetchAllowedOrigins(){try{const{allowedOrigins:t}=await Zn.get({path:"/projects/v1/origins",params:Ue._getSdkProperties()});return t}catch(t){if(t instanceof Error&&t.cause instanceof Response){const e=t.cause.status;if(e===Be.HTTP_STATUS_CODES.TOO_MANY_REQUESTS)throw new Error("RATE_LIMITED",{cause:t});if(e>=Be.HTTP_STATUS_CODES.SERVER_ERROR&&e<600)throw new Error("SERVER_ERROR",{cause:t});return[]}return[]}},async fetchNetworkImages(){const t=Z.getAllRequestedCaipNetworks(),e=t==null?void 0:t.map(({assets:r})=>r==null?void 0:r.imageId).filter(Boolean).filter(r=>!O3e.getNetworkImageById(r));e&&await Promise.allSettled(e.map(r=>Ue._fetchNetworkImage(r)))},async fetchConnectorImages(){const{connectors:t}=ke.state,e=t.map(({imageId:r})=>r).filter(Boolean);await Promise.allSettled(e.map(r=>Ue._fetchConnectorImage(r)))},async fetchCurrencyImages(t=[]){await Promise.allSettled(t.map(e=>Ue._fetchCurrencyImage(e)))},async fetchTokenImages(t=[]){await Promise.allSettled(t.map(e=>Ue._fetchTokenImage(e)))},async fetchWallets(t){var s;const e=t.exclude??[];Ue._getSdkProperties().sv.startsWith("html-core-")&&e.push(...Object.values(Po).map(o=>o.id));const n=await Zn.get({path:"/getWallets",params:{...Ue._getSdkProperties(),...t,page:String(t.page),entries:String(t.entries),include:(s=t.include)==null?void 0:s.join(","),exclude:e.join(",")}});return{data:Ue._filterWalletsByPlatform(n==null?void 0:n.data)||[],count:n==null?void 0:n.count}},async fetchFeaturedWallets(){const{featuredWalletIds:t}=Xe.state;if(t!=null&&t.length){const e={...Ue._getSdkProperties(),page:1,entries:(t==null?void 0:t.length)??_S,include:t},{data:r}=await Ue.fetchWallets(e),n=[...r].sort((s,o)=>t.indexOf(s.id)-t.indexOf(o.id)),i=n.map(s=>
1004s.image_id).filter(Boolean);await Promise.allSettled(i.map(s=>Ue._fetchWalletImage(s))),He.featured=n,He.allFeatured=n}},async fetchRecommendedWallets(){try{He.isFetchingRecommendedWallets=!0;const{includeWalletIds:t,excludeWalletIds:e,featuredWalletIds:r}=Xe.state,n=[...e??[],...r??[]].filter(Boolean),i=Z.getRequestedCaipNetworkIds().join(","),s={page:1,entries:_S,include:t,exclude:n,chains:i},{data:o,count:a}=await Ue.fetchWallets(s),c=Ae.getRecentWallets(),l=o.map(d=>d.image_id).filter(Boolean),u=c.map(d=>d.image_id).filter(Boolean);await Promise.allSettled([...l,...u].map(d=>Ue._fetchWalletImage(d))),He.recommended=o,He.allRecommended=o,He.count=a??0}catch{}finally{He.isFetchingRecommendedWallets=!1}},async fetchWalletsByPage({page:t}){const{includeWalletIds:e,excludeWalletIds:r,featuredWalletIds:n}=Xe.state,i=Z.getRequestedCaipNetworkIds().join(","),s=[...He.recommended.map(({id:u})=>u),...r??[],...n??[]].filter(Boolean),o={page:t,entries:L3e,include:e,exclude:s,chains:i},{data:a,count:c}=await Ue.fetchWallets(o),l=a.slice(0,M3e).map(u=>u.image_id).filter(Boolean);await Promise.allSettled(l.map(u=>Ue._fetchWalletImage(u))),He.wallets=Ve.uniqueBy([...He.wallets,...Ue._filterOutExtensions(a)],"id").filter(u=>{var d;return(d=u.chains)==null?void 0:d.some(h=>i.includes(h))}),He.count=c>He.count?c:He.count,He.page=t},async initializeExcludedWallets({ids:t}){const e={page:1,entries:t.length,include:t},{data:r}=await Ue.fetchWallets(e);r&&r.forEach(n=>{He.excludedWallets.push({rdns:n.rdns,name:n.name})})},async searchWallet({search:t,badge:e}){const{includeWalletIds:r,excludeWalletIds:n}=Xe.state,i=Z.getRequestedCaipNetworkIds().join(",");He.search=[];const s={page:1,entries:100,search:t==null?void 0:t.trim(),badge_type:e,include:r,exclude:n,chains:i},{data:o}=await Ue.fetchWallets(s);Kt.sendEvent({type:"track",event:"SEARCH_WALLET",properties:{badge:e??"",search:t??""}});const a=o.map(c=>c.image_id).filter(Boolean);await Promise.allSettled([...a.map(c=>Ue._fetchWalletImage(c)),Ve.wait(300)]),He.search=Ue._filterOutExtensions(o)},initPromise(t,e){const r=He.promises[t];return r||(He.promises[t]=e())},prefetch({fetchConnectorImages:t=!0,fetchFeaturedWallets:e=!0,fetchRecommendedWallets:r=!0,fetchNetworkImages:n=!0}={}){const i=[t&&Ue.initPromise("connectorImages",Ue.fetchConnectorImages),e&&Ue.initPromise("featuredWallets",Ue.fetchFeaturedWallets),r&&Ue.initPromise("recommendedWallets",Ue.fetchRecommendedWallets),n&&Ue.initPromise("networkImages",Ue.fetchNetworkImages)].filter(Boolean);return Promise.allSettled(i)},prefetchAnalyticsConfig(){var t;(t=Xe.state.features)!=null&&t.analytics&&Ue.fetchAnalyticsConfig()},async fetchAnalyticsConfig(){try{const{isAnalyticsEnabled:t}=await Zn.get({path:"/getAnalyticsConfig",params:Ue._getSdkProperties()});Xe.setFeatures({analytics:t})}catch{Xe.setFeatures({analytics:!1})}},filterByNamespaces(t){if(!(t!=null&&t.length)){He.featured=He.allFeatured,He.recommended=He.allRecommended;return}const e=Z.getRequestedCaipNetworkIds().join(",");He.featured=He.allFeatured.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),He.recommended=He.allRecommended.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),He.filteredWallets=He.wallets.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))})},clearFilterByNamespaces(){He.filteredWallets=[]},setFilterByNamespace(t){if(!t){He.featured=He.allFeatured,He.recommended=He.allRecommended;return}const e=Z.getRequestedCaipNetworkIds().join(",");He.featured=He.allFeatured.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),He.recommended=He.allRecommended.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),He.filteredWallets=He.wallets.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))})}},Nt=Rt({view:"Connect",history:["Connect"],transactionStack:[]}),U3e={state:Nt,subscribeKey(t,e){return Jr(Nt,t,e)},pushTransactionStack(t){Nt.transactionStack.push(t)},popTransactionStack(t){const e=Nt.transactionStack.pop();if(!e)return;const{onSuccess:r,onError:n,onCancel:i}=e;switch(t){case"success":r==null||r();break;case"error":n==null||n(),Se.goBack();break;case"cancel":i==null||i(),Se.goBack();break}},push(t,e){t!==Nt.view&&(Nt.view=t,Nt.history.push(t),Nt.data=e)},reset(t,e){Nt.view=t,Nt.history=[t],Nt.data=e},replace(t,e){Nt.history.at(-1)===t||(Nt.view=t,Nt.history[Nt.history.length-1]=t,Nt.data=e)},goBack(){var n;const t=Z.state.activeCaipAddress,e=Se.state.view==="ConnectingFarcaster",r=!t&&e;if(Nt.history.length>1){Nt.history.pop();const[i]=Nt.history.slice(-1);i&&(t&&i==="Connect"?Nt.view="Account":Nt.view=i)}else At.close();(n=Nt.data)!=null&&n.wallet&&(Nt.data.wallet=void 0),setTimeout(()=>{var i,s,o;if(r){yt.setFarcasterUrl(void 0,Z.state.activeChain);const a=ke.getAuthConnector();(i=a==null?void 0:a.provider)==null||i.reload();const c=U1(Xe.state);(o=(s=a==null?void 0:a.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:c.metadata,sdkVersion:c.sdkVersion,projectId:c.projectId,sdkType:c.sdkType})}},100)},goBackToIndex(t){if(Nt.history.length>1){Nt.history=Nt.history.slice(0,t+1);const[e]=Nt.history.slice(-1);e&&(Nt.view=e)}},goBackOrCloseModal(){Se.state.history.length>1?Se.goBack():At.close()}},Se=jn(U3e),ga=Rt({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),C6={state:ga,subscribe(t){return Gr(ga,()=>t(ga))},setThemeMode(t){ga.themeMode=t;try{const e=ke.getAuthConnector();if(e){const r=C6.getSnapshot().themeVariables;e.provider.syncTheme({themeMode:t,themeVariables:r,w3mThemeVariables:Hc(r,t)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(t){ga.themeVariables={...ga.themeVariables,...t};try{const e=ke.getAuthConnector();if(e){const r=C6.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:r,w3mThemeVariables:Hc(ga.themeVariables,ga.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot(){return U1(ga)}},Qg=jn(C6),KR={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0},pt=Rt({allConnectors:[],connectors:[],activeConnector:void 0,filterByNamespace:void 0,activeConnectorIds:{...KR},filterByNamespaceMap:{eip155:!0,solana:!0,polkadot:!0,bip122:!0,cosmos:!0}}),j3e={state:pt,subscribe(t){return Gr(pt,()=>{t(pt)})},subscribeKey(t,e){return Jr(pt,t,e)}
1004,initialize(t){t.forEach(e=>{const r=Ae.getConnectedConnectorId(e);r&&ke.setConnectorId(r,e)})},setActiveConnector(t){t&&(pt.activeConnector=Mh(t))},setConnectors(t){t.filter(i=>!pt.allConnectors.some(s=>s.id===i.id&&ke.getConnectorName(s.name)===ke.getConnectorName(i.name)&&s.chain===i.chain)).forEach(i=>{i.type!=="MULTI_CHAIN"&&pt.allConnectors.push(Mh(i))});const r=ke.getEnabledNamespaces(),n=ke.getEnabledConnectors(r);pt.connectors=ke.mergeMultiChainConnectors(n)},filterByNamespaces(t){Object.keys(pt.filterByNamespaceMap).forEach(e=>{pt.filterByNamespaceMap[e]=!1}),t.forEach(e=>{pt.filterByNamespaceMap[e]=!0}),ke.updateConnectorsForEnabledNamespaces()},filterByNamespace(t,e){pt.filterByNamespaceMap[t]=e,ke.updateConnectorsForEnabledNamespaces()},updateConnectorsForEnabledNamespaces(){const t=ke.getEnabledNamespaces(),e=ke.getEnabledConnectors(t),r=ke.areAllNamespacesEnabled();pt.connectors=ke.mergeMultiChainConnectors(e),r?Ue.clearFilterByNamespaces():Ue.filterByNamespaces(t)},getEnabledNamespaces(){return Object.entries(pt.filterByNamespaceMap).filter(([t,e])=>e).map(([t])=>t)},getEnabledConnectors(t){return pt.allConnectors.filter(e=>t.includes(e.chain))},areAllNamespacesEnabled(){return Object.values(pt.filterByNamespaceMap).every(t=>t)},mergeMultiChainConnectors(t){const e=ke.generateConnectorMapByName(t),r=[];return e.forEach(n=>{const i=n[0],s=(i==null?void 0:i.id)===Be.CONNECTOR_ID.AUTH;n.length>1&&i?r.push({name:i.name,imageUrl:i.imageUrl,imageId:i.imageId,connectors:[...n],type:s?"AUTH":"MULTI_CHAIN",chain:"eip155",id:(i==null?void 0:i.id)||""}):i&&r.push(i)}),r},generateConnectorMapByName(t){const e=new Map;return t.forEach(r=>{const{name:n}=r,i=ke.getConnectorName(n);if(!i)return;const s=e.get(i)||[];s.find(a=>a.chain===r.chain)||s.push(r),e.set(i,s)}),e},getConnectorName(t){return t&&({"Trust Wallet":"Trust"}[t]||t)},getUniqueConnectorsByName(t){const e=[];return t.forEach(r=>{e.find(n=>n.chain===r.chain)||e.push(r)}),e},addConnector(t){var e,r,n;if(t.id===Be.CONNECTOR_ID.AUTH){const i=t,s=U1(Xe.state),o=Qg.getSnapshot().themeMode,a=Qg.getSnapshot().themeVariables;(r=(e=i==null?void 0:i.provider)==null?void 0:e.syncDappData)==null||r.call(e,{metadata:s.metadata,sdkVersion:s.sdkVersion,projectId:s.projectId,sdkType:s.sdkType}),(n=i==null?void 0:i.provider)==null||n.syncTheme({themeMode:o,themeVariables:a,w3mThemeVariables:Hc(a,o)}),ke.setConnectors([t])}else ke.setConnectors([t])},getAuthConnector(t){var n;const e=t||Z.state.activeChain,r=pt.connectors.find(i=>i.id===Be.CONNECTOR_ID.AUTH);if(r)return(n=r==null?void 0:r.connectors)!=null&&n.length?r.connectors.find(s=>s.chain===e):r},getAnnouncedConnectorRdns(){return pt.connectors.filter(t=>t.type==="ANNOUNCED").map(t=>{var e;return(e=t.info)==null?void 0:e.rdns})},getConnectorById(t){return pt.allConnectors.find(e=>e.id===t)},getConnector(t,e){return pt.allConnectors.filter(n=>n.chain===Z.state.activeChain).find(n=>{var i;return n.explorerId===t||((i=n.info)==null?void 0:i.rdns)===e})},syncIfAuthConnector(t){var s,o;if(t.id!=="ID_AUTH")return;const e=t,r=U1(Xe.state),n=Qg.getSnapshot().themeMode,i=Qg.getSnapshot().themeVariables;(o=(s=e==null?void 0:e.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:r.metadata,sdkVersion:r.sdkVersion,sdkType:r.sdkType,projectId:r.projectId}),e.provider.syncTheme({themeMode:n,themeVariables:i,w3mThemeVariables:Hc(i,n)})},getConnectorsByNamespace(t){const e=pt.allConnectors.filter(r=>r.chain===t);return ke.mergeMultiChainConnectors(e)},canSwitchToSmartAccount(t){return Z.checkIfSmartAccountEnabled()&&Mo(t)===Lo.ACCOUNT_TYPES.EOA},selectWalletConnector(t){const e=ke.getConnector(t.id,t.rdns);A3e.handleMobileDeeplinkRedirect((e==null?void 0:e.explorerId)||t.id,Z.state.activeChain),e?Se.pu
1004sh("ConnectingExternal",{connector:e,wallet:t}):Se.push("ConnectingWalletConnect",{wallet:t})},getConnectors(t){return t?ke.getConnectorsByNamespace(t):ke.mergeMultiChainConnectors(pt.allConnectors)},setFilterByNamespace(t){pt.filterByNamespace=t,pt.connectors=ke.getConnectors(t),Ue.setFilterByNamespace(t)},setConnectorId(t,e){t&&(pt.activeConnectorIds={...pt.activeConnectorIds,[e]:t},Ae.setConnectedConnectorId(e,t))},removeConnectorId(t){pt.activeConnectorIds={...pt.activeConnectorIds,[t]:void 0},Ae.deleteConnectedConnectorId(t)},getConnectorId(t){if(t)return pt.activeConnectorIds[t]},isConnected(t){return t?!!pt.activeConnectorIds[t]:Object.values(pt.activeConnectorIds).some(e=>!!e)},resetConnectorIds(){pt.activeConnectorIds={...KR}}},ke=jn(j3e),z3e=1e3,bf={checkNamespaceConnectorId(t,e){return ke.getConnectorId(t)===e},isSocialProvider(t){return cn.DEFAULT_REMOTE_FEATURES.socials.includes(t)},connectWalletConnect({walletConnect:t,connector:e,closeModalOnConnect:r=!0,redirectViewOnModalClose:n="Connect",onOpen:i,onConnect:s}){return new Promise((o,a)=>{if(t&&ke.setActiveConnector(e),i==null||i(Ve.isMobile()&&t),n){const l=At.subscribeKey("open",u=>{u||(Se.state.view!==n&&Se.replace(n),l(),a(new Error("Modal closed")))})}const c=Z.subscribeKey("activeCaipAddress",l=>{l&&(s==null||s(),r&&At.close(),c(),o(kf.parseCaipAddress(l)))})})},connectExternal(t){return new Promise((e,r)=>{const n=Z.subscribeKey("activeCaipAddress",i=>{i&&(At.close(),n(),e(kf.parseCaipAddress(i)))});_e.connectExternal(t,t.chain).catch(()=>{n(),r(new Error("Connection rejected"))})})},connectSocial({social:t,closeModalOnConnect:e=!0,onOpenFarcaster:r,onConnect:n}){let i=yt.state.socialWindow,s=yt.state.socialProvider,o=!1,a=null;const c=Z.subscribeKey("activeCaipAddress",l=>{l&&(e&&At.close(),c())});return new Promise((l,u)=>{async function d(f){var g,p;if((g=f.data)!=null&&g.resultUri)if(f.origin===Be.SECURE_SITE_SDK_ORIGIN){window.removeEventListener("message",d,!1);try{const w=ke.getAuthConnector();if(w&&!o){i&&(i.close(),yt.setSocialWindow(void 0,Z.state.activeChain),i=yt.state.socialWindow),o=!0;const m=f.data.resultUri;if(s&&Kt.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:s}}),s){Ae.setConnectedSocialProvider(s),await _e.connectExternal({id:w.id,type:w.type,socialUri:m},w.chain);const b=Z.state.activeCaipAddress;if(!b){u(new Error("Failed to connect"));return}l(kf.parseCaipAddress(b)),Kt.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:s,caipNetworkId:(p=Z.getActiveCaipNetwork())==null?void 0:p.caipNetworkId}})}}}catch{s&&Kt.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:s}}),u(new Error("Failed to connect"))}}else s&&Kt.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:s}})}async function h(){if(t&&(yt.setSocialProvider(t,Z.state.activeChain),s=yt.state.socialProvider,Kt.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:s}})),s==="farcaster"){r==null||r();const f=At.subscribeKey("open",p=>{!p&&t==="farcaster"&&(u(new Error("Popup closed")),n==null||n(),f())}),g=ke.getAuthConnector();if(g&&!yt.state.farcasterUrl)try{const{url:p}=await g.provider.getFarcasterUri();yt.setFarcasterUrl(p,Z.state.activeChain)}catch{u(new Error("Failed to connect to farcaster"))}}else{const f=ke.getAuthConnector();a=Ve.returnOpenHref(`${Be.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes");try{if(f&&s){const{uri:g}=await f.provider.getSocialRedirectUri({provider:s});if(a&&g){yt.setSocialWindow(a,Z.state.activeChain),i=yt.state.socialWindow,a.location.href=g;const p=setInterval(()=>{i!=null&&i.closed&&!o&&(u(new Error("Popup closed")),clearInterval(p))},1e3);window.addEventListener("message",d,!1)}else a==null||a.close(),u(new Error("Failed to initiate social connection"))}}catch{u(new Error("Failed to initiate social connection")),a==null||a.close()}}}h()})},connectEmail({closeModalOnConnect:t=!0,redirectViewOnModalClose:e="Connect",onOpen:r,onConnect:n}){return new Promise((i,s)=>{if(r==null||r(),e){const a=At.subscribeKey("open",c=>{c||(Se.state.view!==e&&Se.replace(e),a(),s(new Error("Modal closed")))})}const o=Z.subscribeKey("activeCaipAddress",a=>{a&&(n==null||n(),t&&At.close(),o(),i(kf.parseCaipAddress(a)))})})},async updateEmail(){const t=Ae.getConnectedConnectorId(Z.state.activeChain),e=ke.getAuthConnector();if(!e)throw new Error("No auth connector found");if(t!==Be.CONNECTOR_ID.AUTH)throw new Error("Not connected to email or social");const r=e.provider.getEmail()??"";return Se.push("UpdateEmailWallet",{email:r,redirectView:void 0}),new Promise((n,i)=>{const s=setInterval(()=>{const a=e.provider.getEmail()??"";a!==r&&(At.close(),clearInterval(s),o(),n({email:a}))},z3e),o=At.subscribeKey("open",a=>
1004{a||(Se.state.view!=="Connect"&&Se.push("Connect"),clearInterval(s),o(),i(new Error("Modal closed")))})})},canSwitchToSmartAccount(t){return Z.checkIfSmartAccountEnabled()&&Mo(t)===Lo.ACCOUNT_TYPES.EOA}};function C8(){var n,i;const t=((n=Z.state.activeCaipNetwork)==null?void 0:n.chainNamespace)||"eip155",e=((i=Z.state.activeCaipNetwork)==null?void 0:i.id)||1,r=cn.NATIVE_TOKEN_ADDRESS[t];return`${t}:${e}:${r}`}function Mo(t){var r;return(r=Z.getAccountData(t))==null?void 0:r.preferredAccountType}const ZR={getConnectionStatus(t,e){const r=ke.state.activeConnectorIds[e],n=_e.getConnections(e);return!!r&&t.connectorId===r?"connected":n.some(o=>o.connectorId.toLowerCase()===t.connectorId.toLowerCase())?"active":"disconnected"},excludeConnectorAddressFromConnections({connections:t,connectorId:e,addresses:r}){return t.map(n=>{if((e?n.connectorId.toLowerCase()===e.toLowerCase():!1)&&r){const s=n.accounts.filter(o=>!r.some(c=>c.toLowerCase()===o.address.toLowerCase()));return{...n,accounts:s}}return n})},excludeExistingConnections(t,e){const r=new Set(t);return e.filter(n=>!r.has(n.connectorId))},getConnectionsByConnectorId(t,e){return t.filter(r=>r.connectorId.toLowerCase()===e.toLowerCase())},getConnectionsData(t){var a;const e=!!((a=Xe.state.remoteFeatures)!=null&&a.multiWallet),r=ke.state.activeConnectorIds[t],n=_e.getConnections(t),s=(_e.state.recentConnections.get(t)??[]).filter(c=>ke.getConnectorById(c.connectorId)),o=ZR.excludeExistingConnections([...n.map(c=>c.connectorId),...r?[r]:[]],s);return e?{connections:n,recentConnections:o}:{connections:n.filter(c=>c.connectorId.toLowerCase()===(r==null?void 0:r.toLowerCase())),recentConnections:[]}}},Nl=Object.freeze({message:"",variant:"success",svg:void 0,open:!1,autoClose:!0}),Ir=Rt({...Nl}),F3e={state:Ir,subscribeKey(t,e){return Jr(Ir,t,e)},showLoading(t,e={}){this._showMessage({message:t,variant:"loading",...e})},showSuccess(t){this._showMessage({message:t,variant:"success"})},showSvg(t,e){this._showMessage({message:t,svg:e})},showError(t){const e=Ve.parseError(t);this._showMessage({message:e,variant:"error"})},hide(){Ir.message=Nl.message,Ir.variant=Nl.variant,Ir.svg=Nl.svg,Ir.open=Nl.open,Ir.autoClose=Nl.autoClose},_showMessage({message:t,svg:e,variant:r="success",autoClose:n=Nl.autoClose}){Ir.open?(Ir.open=!1,setTimeout(()=>{Ir.message=t,Ir.variant=r,Ir.svg=e,Ir.open=!0,Ir.autoClose=n},150)):(Ir.message=t,Ir.variant=r,Ir.svg=e,Ir.open=!0,Ir.autoClose=n)}},Er=F3e,tr=Rt({transactions:[],transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),q3e={state:tr,subscribe(t){return Gr(tr,()=>t(tr))},setLastNetworkInView(t){tr.lastNetworkInView=t},async fetchTransactions(t){var e;if(!t)throw new Error("Transactions can't be fetched without an accountAddress");tr.loading=!0;try{const r=await Ie.fetchTransactions({account:t,cursor:tr.next,chainId:(e=Z.state.activeCaipNetwork)==null?void 0:e.caipNetworkId}),n=_2.filterSpamTransactions(r.data),i=_2.filterByConnectedChain(n),s=[...tr.transactions,...i];tr.loading=!1,tr.transactions=s,tr.transactionsByYear=_2.groupTransactionsByYearAndMonth(tr.transactionsByYear,i),tr.empty=s.length===0,tr.next=r.next?r.next:void 0}catch{const n=Z.state.activeChain;Kt.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:t,projectId:Xe.state.projectId,cursor:tr.next,isSmartAccount:Mo(n)===Lo.ACCOUNT_TYPES.SMART_ACCOUNT}}),Er.showError("Failed to fetch transactions"),tr.loading=!1,tr.empty=!0,tr.next=void 0}},groupTransactionsByYearAndMonth(t={},e=[]){const r=t;return e.forEach(n=>{const i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),o=r[i]??{},c=(o[s]??[]).filter(l=>l.id!==n.id);r[i]={...o,[s]:[...c,n].sort((l,u)=>new Date(u.metadata.minedAt).getTime()-new Date(l.metadata.minedAt).getTime())}}),r},filterSpamTransactions(t){return t.filter(e=>!e.transfers.every(n=>{var i;return((i=n.nft_info)==null?void 0:i.flags.is_spam)===!0}))},filterByConnectedChain(t){var n;const e=(n=Z.state.activeCaipNetwork)==null?void 0:n.caipNetworkId;return t.filter(i=>i.metadata.chain===e)}
1004,clearCursor(){tr.next=void 0},resetTransactions(){tr.transactions=[],tr.transactionsByYear={},tr.lastNetworkInView=void 0,tr.loading=!1,tr.empty=!1,tr.next=void 0}},_2=jn(q3e,"API_ERROR"),st=Rt({connections:new Map,recentConnections:new Map,isSwitchingConnection:!1,wcError:!1,buffering:!1,status:"disconnected"});let $l;const H3e={state:st,subscribe(t){return Gr(st,()=>t(st))},subscribeKey(t,e){return Jr(st,t,e)},_getClient(){return st._client},setClient(t){st._client=Mh(t)},initialize(t){const e=t.filter(r=>!!r.namespace).map(r=>r.namespace);_e.syncStorageConnections(e)},syncStorageConnections(t){const e=Ae.getConnections(),r=t??Array.from(Z.state.chains.keys());for(const n of r){const i=e[n]??[],s=new Map(st.recentConnections);s.set(n,i),st.recentConnections=s}},getConnections(t){return t?st.connections.get(t)??[]:[]},hasAnyConnection(t){const e=_e.state.connections;return Array.from(e.values()).flatMap(r=>r).some(({connectorId:r})=>r===t)},async connectWalletConnect(){var t,e,r,n;if(Ve.isTelegram()||Ve.isSafari()&&Ve.isIos()){if($l){await $l,$l=void 0;return}if(!Ve.isPairingExpired(st==null?void 0:st.wcPairingExpiry)){const i=st.wcUri;st.wcUri=i;return}$l=(e=(t=_e._getClient())==null?void 0:t.connectWalletConnect)==null?void 0:e.call(t).catch(()=>{}),_e.state.status="connecting",await $l,$l=void 0,st.wcPairingExpiry=void 0,_e.state.status="connected"}else await((n=(r=_e._getClient())==null?void 0:r.connectWalletConnect)==null?void 0:n.call(r))},async connectExternal(t,e,r=!0){var i,s;const n=await((s=(i=_e._getClient())==null?void 0:i.connectExternal)==null?void 0:s.call(i,t));return r&&Z.setActiveNamespace(e),n},async reconnectExternal(t){var r,n;await((n=(r=_e._getClient())==null?void 0:r.reconnectExternal)==null?void 0:n.call(r,t));const e=t.chain||Z.state.activeChain;e&&ke.setConnectorId(t.id,e)},async setPreferredAccountType(t,e){var n;if(!e)return;At.setLoading(!0,Z.state.activeChain);const r=ke.getAuthConnector();r&&(yt.setPreferredAccountType(t,e),await r.provider.setPreferredAccount(t),Ae.setPreferredAccountTypes(Object.entries(Z.state.chains).reduce((i,[s,o])=>{const a=s,c=Mo(a);return c!==void 0&&(i[a]=c),i},{})),await _e.reconnectExternal(r),At.setLoading(!1,Z.state.activeChain),Kt.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:t,network:((n=Z.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)||""}}))},async signMessage(t){var e;return(e=_e._getClient())==null?void 0:e.signMessage(t)},parseUnits(t,e){var r;return(r=_e._getClient())==null?void 0:r.parseUnits(t,e)},formatUnits(t,e){var r;return(r=_e._getClient())==null?void 0:r.formatUnits(t,e)},async sendTransaction(t){var e;return(e=_e._getClient())==null?void 0:e.sendTransaction(t)},async getCapabilities(t){var e;return(e=_e._getClient())==null?void 0:e.getCapabilities(t)},async grantPermissions(t){var e;return(e=_e._getClient())==null?void 0:e.grantPermissions(t)},async walletGetAssets(t){var e;return((e=_e._getClient())==null?void 0:e.walletGetAssets(t))??{}},async estimateGas(t){var e;return(e=_e._getClient())==null?void 0:e.estimateGas(t)},async writeContract(t){var e;return(e=_e._getClient())==null?void 0:e.writeContract(t)},async getEnsAddress(t){var e;return(e=_e._getClient())==null?void 0:e.getEnsAddress(t)},async getEnsAvatar(t){var e;return(e=_e._getClient())==null?void 0:e.getEnsAvatar(t)},checkInstalled(t){var e,r;return((r=(e=_e._getClient())==null?void 0:e.checkInstalled)==null?void 0:r.call(e,t))||!1},resetWcConnection(){st.wcUri=void 0,st.wcPairingExpiry=void 0,st.wcLinking=void 0,st.recentWallet=void 0,st.status="disconnected",_2.resetTransactions(),Ae.deleteWalletConnectDeepLink()},resetUri(){st.wcUri=void 0,st.wcPairingExpiry=void 0,$l=void 0},finalizeWcConnection(){var r,n,i;const{wcLinking:t,recentWallet:e}=_e.state;t&&Ae.setWalletConnectDeepLink(t),e&&Ae.setAppKitRecent(e),Kt.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:t?"mobile":"qrcode",name:((n=(r=Se.state.data)==null?void 0:r.wallet)==null?void 0:n.name)||"Unknown",caipNetworkId:(i=Z.getActiveCaipNetwork())==null?void 0:i.caipNetworkId}})},setWcBasic(t){st.wcBasic=t},setUri(t){st.wcUri=t,st.wcPairingExpiry=Ve.getPairingExpiry()},setWcLinking(t){st.wcLinking=t},setWcError(t){st.wcError=t,st.buffering=!1}
1004,setRecentWallet(t){st.recentWallet=t},setBuffering(t){st.buffering=t},setStatus(t){st.status=t},setIsSwitchingConnection(t){st.isSwitchingConnection=t},async disconnect({id:t,namespace:e,initialDisconnect:r}={}){var n;try{await((n=_e._getClient())==null?void 0:n.disconnect({id:t,chainNamespace:e,initialDisconnect:r}))}catch(i){throw new Xh("Failed to disconnect","INTERNAL_SDK_ERROR",i)}},setConnections(t,e){const r=new Map(st.connections);r.set(e,t),st.connections=r},async handleAuthAccountSwitch({address:t,namespace:e}){var i,s;const r=(s=(i=yt.state.user)==null?void 0:i.accounts)==null?void 0:s.find(o=>o.type==="smartAccount"),n=r&&r.address.toLowerCase()===t.toLowerCase()&&bf.canSwitchToSmartAccount(e)?"smartAccount":"eoa";await _e.setPreferredAccountType(n,e)},async handleActiveConnection({connection:t,namespace:e,address:r}){const n=ke.getConnectorById(t.connectorId),i=t.connectorId===Be.CONNECTOR_ID.AUTH;if(!n)throw new Error(`No connector found for connection: ${t.connectorId}`);if(i)i&&r&&await _e.handleAuthAccountSwitch({address:r,namespace:e});else{const s=await _e.connectExternal({id:n.id,type:n.type,provider:n.provider,address:r,chain:e},e);return s==null?void 0:s.address}return r},async handleDisconnectedConnection({connection:t,namespace:e,address:r,closeModalOnConnect:n}){var l,u;const i=ke.getConnectorById(t.connectorId),s=(u=(l=t.auth)==null?void 0:l.name)==null?void 0:u.toLowerCase(),o=t.connectorId===Be.CONNECTOR_ID.AUTH,a=t.connectorId===Be.CONNECTOR_ID.WALLET_CONNECT;if(!i)throw new Error(`No connector found for connection: ${t.connectorId}`);let c;if(o)if(s&&bf.isSocialProvider(s)){const{address:d}=await bf.connectSocial({social:s,closeModalOnConnect:n,onOpenFarcaster(){At.open({view:"ConnectingFarcaster"})},onConnect(){Se.replace("ProfileWallets")}});c=d}else{const{address:d}=await bf.connectEmail({closeModalOnConnect:n,onOpen(){At.open({view:"EmailLogin"})},onConnect(){Se.replace("ProfileWallets")}});c=d}else if(a){const{address:d}=await bf.connectWalletConnect({walletConnect:!0,connector:i,closeModalOnConnect:n,onOpen(h){At.open({view:h?"AllWallets":"ConnectingWalletConnect"})},onConnect(){Se.replace("ProfileWallets")}});c=d}else{const d=await _e.connectExternal({id:i.id,type:i.type,provider:i.provider,chain:e},e);d&&(c=d.address)}return o&&r&&await _e.handleAuthAccountSwitch({address:r,namespace:e}),c},async switchConnection({connection:t,address:e,namespace:r,closeModalOnConnect:n,onChange:i}){let s;const o=yt.getCaipAddress(r);if(o){const{address:c}=kf.parseCaipAddress(o);s=c}const a=ZR.getConnectionStatus(t,r);switch(a){case"connected":case"active":{const c=await _e.handleActiveConnection({connection:t,namespace:r,address:e});if(s&&c){const l=c.toLowerCase()!==s.toLowerCase();i==null||i({address:c,namespace:r,hasSwitchedAccount:l,hasSwitchedWallet:a==="active"})}break}case"disconnected":{const c=await _e.handleDisconnectedConnection({connection:t,namespace:r,address:e,closeModalOnConnect:n});c&&(i==null||i({address:c,namespace:r,hasSwitchedAccount:!0,hasSwitchedWallet:!0}));break}default:throw new Error(`Invalid connection status: ${a}`)}}},_e=jn(H3e),Qd=Rt({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0,initialized:!1}),eu={state:Qd,subscribe(t){return Gr(Qd,()=>t(Qd))},subscribeOpen(t){return Jr(Qd,"open",t)},set(t){Object.assign(Qd,{...Qd,...t})}},Bf={async getTokenList(){var n;const t=Z.state.activeCaipNetwork,e=await Ie.fetchSwapTokens({chainId:t==null?void 0:t.caipNetworkId});return((n=e==null?void 0:e.tokens)==null?void 0:n.map(i=>({...i,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0})))||[]},async fetchGasPrice(){var e;const t=Z.state.activeCaipNetwork;if(!t)return null;try{switch(t.chainNamespace){case"solana":const r=(e=await(_e==null?void 0:_e.estimateGas({chainNamespace:"solana"})))==null?void 0:e.toString();return{standard:r,fast:r,instant:r};case"eip155":default:return await Ie.fetchGasPrice({chainId:t.caipNetworkId})}}catch{return null}},async fetchSwapAllowance({tokenAddress:t,userAddress:e,sourceTokenAmount:r,sourceTokenDecimals:n}){const i=await Ie.fetchSwapAllowance({tokenAddress:t,userAddress:e});if(i!=null&&i.allowance&&r&&n){const s=_e.parseUnits(r,n)||0;return BigInt(i.allowance)>=s}return!1},async getMyTokensWithBalance(t){const e=await _m.getMyTokensWithBalance(t);return yt.setTokenBalance(e,Z.state.activeChain),this.mapBalancesToSwapTokens(e)},mapBalancesToSwapTokens(t){return(t==null?void 0:t.map(e=>({...e,address:e!=null&&e.address?e.address:C8(),decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1})))||[]}},$t=Rt({tokenBalances:[],loading:!1}),V3e={state:$t,subscribe(t){return Gr($t,()=>t($t))},subscribeKey(t,e){return Jr($t,t,e)},setToken(t){t&&($t.token=Mh(t))},setTokenAmount(t){$t.sendTokenAmount=t},setReceiverAddress(t){$t.receiverAddress=t},setReceiverProfileImageUrl(t){$t.receiverProfileImageUrl=t},setReceiverProfileName(t){$t.receiverProfileName=t},setNetworkBalanceInUsd(t){$t.networkBalanceInUSD=t},setLoading(t){$t.loading=t},async sendToken(){var t;try{switch(Ct.setLoading(!0),(t=Z.state.activeCaipNetwork)==null?void 0:t.chainNamespace){case"eip155":await Ct.sendEvmToken();return;case"solana":await Ct.sendSolanaToken();return;default:throw new Error("Unsupported chain")}}finally{Ct.setLoading(!1)}},async sendEvmToken(){var r,n,i;const t=Z.state.activeChain;if(!t)throw new Error("SendController:sendEvmToken - activeChainNamespace is required");const e=Mo(t);if(!Ct.state.sendTokenAmount||!Ct.state.receiverAddress)throw new Error("An amount and receiver address are required");if(!Ct.state.token)throw new Error("A token is required");(r=Ct.state.token)!=null&&r.address?(Kt.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:e===Lo.ACCOUNT_TYPES.SMART_ACCOUNT,token:Ct.state.token.address,amount:Ct.state.sendTokenAmount,network:((n=Z.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)||""}}),await Ct.sendERC20Token({receiverAddress:Ct.state.receiverAddress,tokenAddress:Ct.state.token.address,sendTokenAmount:Ct.state.sendTokenAmount,decimals:Ct.state.token.quantity.decimals})):(Kt.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:e===Lo.ACCOUNT_TYPES.SMART_ACCOUNT,token:Ct.state.token.symbol||"",amount:Ct.state.sendTokenAmount,network:((i=Z.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)||""}}),await Ct.sendNativeToken({receiverAddress:Ct.state.receiverAddress,sendTokenAmount:Ct.state.sendTokenAmount,decimals:Ct.state.token.quantity.decimals}))},async fetchTokenBalance(t){var s,o;$t.loading=!0;const e=(s=Z.state.activeCaipNetwork)==null?void 0:s.caipNetworkId,r=(o=Z.state.activeCaipNetwork)==null?void 0:o.chainNamespace,n=Z.state.activeCaipAddress,i=n?Ve.getPlainAddress(n):void 0;if($t.lastRetry&&!Ve.isAllowedRetry($t.lastRetry,30*cn.ONE_SEC_MS))return $t.loading=!1,[];try{if(i&&e&&r){const a=await _m.getMyTokensWithBalance();return $t.tokenBalances=a,$t.lastRetry=void 0,a}}catch(a){$t.lastRetry=Date.now(),t==null||t(a),Er.showError("Token Balance Unavailable")}finally{$t.loading=!1}return[]},fetchNetworkBalance(){if($t.tokenBalances.length===0)return;const t=Bf.mapBalancesToSwapTokens($t.tokenBalances);if(!t)return;const e=t.find(r=>r.address===C8());e&&($t.networkBalanceInUSD=e?zt.multiply(e.quantity.numeric,e.price).toString():"0")},async sendNativeToken(t){var s,o,a;Se.pushTransactionStack({});const e=t.receiverAddress,r=yt.state.address,n=_e.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));await _e.sendTransaction({chainNamespace:Be.CHAIN.EVM,to:e,address:r,data:"0x",value:n??BigInt(0)}),Kt.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:Mo("eip155")===Lo.ACCOUNT_TYPES.SMART_ACCOUNT,token:((s=Ct.state.token)==null?void 0:s.symbol)||"",amount:t.
1004sendTokenAmount,network:((o=Z.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)||""}}),(a=_e._getClient())==null||a.updateBalance("eip155"),Ct.resetSend()},async sendERC20Token(t){Se.pushTransactionStack({onSuccess(){Se.replace("Account")}});const e=_e.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));if(yt.state.address&&t.sendTokenAmount&&t.receiverAddress&&t.tokenAddress){const r=Ve.getPlainAddress(t.tokenAddress);if(!r)throw new Error("SendController:sendERC20Token - tokenAddress is required");await _e.writeContract({fromAddress:yt.state.address,tokenAddress:r,args:[t.receiverAddress,e??BigInt(0)],method:"transfer",abi:b3e.getERC20Abi(r),chainNamespace:Be.CHAIN.EVM}),Ct.resetSend()}},async sendSolanaToken(){var t;if(!Ct.state.sendTokenAmount||!Ct.state.receiverAddress)throw new Error("An amount and receiver address are required");Se.pushTransactionStack({onSuccess(){Se.replace("Account")}}),await _e.sendTransaction({chainNamespace:"solana",to:Ct.state.receiverAddress,value:Ct.state.sendTokenAmount}),(t=_e._getClient())==null||t.updateBalance("solana"),Ct.resetSend()},resetSend(){$t.token=void 0,$t.sendTokenAmount=void 0,$t.receiverAddress=void 0,$t.receiverProfileImageUrl=void 0,$t.receiverProfileName=void 0,$t.loading=!1,$t.tokenBalances=[]}},Ct=jn(V3e),ey={currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,user:void 0,preferredAccountType:void 0},e2={caipNetwork:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]},ge=Rt({chains:h3e(),activeCaipAddress:void 0,activeChain:void 0,activeCaipNetwork:void 0,noAdapters:!1,universalAdapter:{networkControllerClient:void 0,connectionControllerClient:void 0},isSwitchingNamespace:!1}),W3e={state:ge,subscribe(t){return Gr(ge,()=>{t(ge)})},subscribeKey(t,e){return Jr(ge,t,e)},subscribeChainProp(t,e,r){let n;return Gr(ge.chains,()=>{var s;const i=r||ge.activeChain;if(i){const o=(s=ge.chains.get(i))==null?void 0:s[t];n!==o&&(n=o,e(o))}})},initialize(t,e,r){const{chainId:n,namespace:i}=Ae.getActiveNetworkProps(),s=e==null?void 0:e.find(u=>u.id.toString()===(n==null?void 0:n.toString())),a=t.find(u=>(u==null?void 0:u.namespace)===i)||(t==null?void 0:t[0]),c=t.map(u=>u.namespace).filter(u=>u!==void 0),l=Xe.state.enableEmbedded?new Set([...c]):new Set([...(e==null?void 0:e.map(u=>u.chainNamespace))??[]]);((t==null?void 0:t.length)===0||!a)&&(ge.noAdapters=!0),ge.noAdapters||(ge.activeChain=a==null?void 0:a.namespace,ge.activeCaipNetwork=s,Z.setChainNetworkData(a==null?void 0:a.namespace,{caipNetwork:s}),ge.activeChain&&eu.set({activeChain:a==null?void 0:a.namespace})),l.forEach(u=>{const d=e==null?void 0:e.filter(g=>g.chainNamespace===u),h=Ae.getPreferredAccountTypes()||{},f={...Xe.state.defaultAccountTypes,...h};Z.state.chains.set(u,{namespace:u,networkState:Rt({...e2,caipNetwork:d==null?void 0:d[0]}),accountState:Rt({...ey,preferredAccountType:f[u]}),caipNetworks:d??[],...r}),Z.setRequestedCaipNetworks(d??[],u)})},removeAdapter(t){var e,r;if(ge.activeChain===t){const n=Array.from(ge.chains.entries()).find(([i])=>i!==t);if(n){const i=(r=(e=n[1])==null?void 0:e.caipNetworks)==null?void 0:r[0];i&&Z.setActiveCaipNetwork(i)}}ge.chains.delete(t)},addAdapter(t,{networkControllerClient:e,connectionControllerClient:r},n){if(!t.namespace)throw new Error("ChainController:addAdapter - adapter must have a namespace");ge.chains.set(t.namespace,{namespace:t.namespace,networkState:{...e2,caipNetwork:n[0]},accountState:ey,caipNetworks:n,connectionControllerClient:r,networkControllerClient:e}),Z.setRequestedCaipNetworks((n==null?void 0:n.filter(i=>i.chainNamespace===t.namespace))??[],t.namespace)},addNetwork(t){var r;const e=ge.chains.get(t.chainNamespace);if(e){const n=[...e.caipNetworks||[]];(r=e.caipNetworks)!=null&&r.find(i=>i.id===t.id)||n.push(t),ge.chains.set(t.chainNamespace,{...e,caipNetworks:n}),Z.setRequestedCaipNetworks(n,t.chainNamespace),ke.filterByNamespace(t.chainNamespace,!0)}},removeNetwork(t,e){var n,i,s;const r=ge.chains.get(t);if(r){const o=((n=ge.activeCaipNetwork)==null?void 0:n.id)===e,a=[...((i=r.caipNetworks)==null?void 0:i.filter(c=>c.id!==e))||[]];o&&((s=r==null?void 0:r.caipNetworks)!=null&&s[0])&&Z.setActiveCaipNetwork(r.caipNetworks[0]),ge.chains.set(t,{...r,caipNetworks:a}),Z.setRequestedCaipNetworks(a||[],t),a.length===0&&ke.filterByNamespace(t,!1)}},setAdapterNetworkState(t,e){const r=ge.chains.get(t);r&&(r.networkState={...r.networkState||e2,...e},ge.chains.set(t,r))},setChainAccountData(t,e,r=!0){if(!t)throw new Error("Chain is required to update chain account data");const n=ge.chains.get(t);if(n){const i={...n.accountState||ey,...e};ge.chains.set(t,{...n,accountState:i}),(ge.chains.size===1||ge.activeChain===t)&&(e.caipAddress&&(ge.activeCaipAddress=e.caipAddress),yt.replaceState(i))}},setChainNetworkData(t,e){if(!t)return;const r=ge.chains.get(t);if(r){const n={...r.networkState||e2,...e};ge.chains.set(t,{...r,networkState:n})}}
1004,setAccountProp(t,e,r,n=!0){Z.setChainAccountData(r,{[t]:e},n)},setActiveNamespace(t){var n,i;ge.activeChain=t;const e=t?ge.chains.get(t):void 0,r=(n=e==null?void 0:e.networkState)==null?void 0:n.caipNetwork;r!=null&&r.id&&t&&(ge.activeCaipAddress=(i=e==null?void 0:e.accountState)==null?void 0:i.caipAddress,ge.activeCaipNetwork=r,Z.setChainNetworkData(t,{caipNetwork:r}),Ae.setActiveCaipNetworkId(r==null?void 0:r.caipNetworkId),eu.set({activeChain:t,selectedNetworkId:r==null?void 0:r.caipNetworkId}))},setActiveCaipNetwork(t){var n,i,s;if(!t)return;ge.activeChain!==t.chainNamespace&&Z.setIsSwitchingNamespace(!0);const e=ge.chains.get(t.chainNamespace);ge.activeChain=t.chainNamespace,ge.activeCaipNetwork=t,Z.setChainNetworkData(t.chainNamespace,{caipNetwork:t}),(n=e==null?void 0:e.accountState)!=null&&n.address?ge.activeCaipAddress=`${t.chainNamespace}:${t.id}:${(i=e==null?void 0:e.accountState)==null?void 0:i.address}`:ge.activeCaipAddress=void 0,Z.setAccountProp("caipAddress",ge.activeCaipAddress,t.chainNamespace),e&&yt.replaceState(e.accountState),Ct.resetSend(),eu.set({activeChain:ge.activeChain,selectedNetworkId:(s=ge.activeCaipNetwork)==null?void 0:s.caipNetworkId}),Ae.setActiveCaipNetworkId(t.caipNetworkId),!Z.checkIfSupportedNetwork(t.chainNamespace)&&Xe.state.enableNetworkSwitch&&!Xe.state.allowUnsupportedChain&&!_e.state.wcBasic&&Z.showUnsupportedChainUI()},addCaipNetwork(t){var r;if(!t)return;const e=ge.chains.get(t.chainNamespace);e&&((r=e==null?void 0:e.caipNetworks)==null||r.push(t))},async switchActiveNamespace(t){var i;if(!t)return;const e=t!==Z.state.activeChain,r=(i=Z.getNetworkData(t))==null?void 0:i.caipNetwork,n=Z.getCaipNetworkByNamespace(t,r==null?void 0:r.id);e&&n&&await Z.switchActiveNetwork(n)},async switchActiveNetwork(t){var s;const e=Z.state.activeChain;if(!e)throw new Error("ChainController:switchActiveNetwork - namespace is required");const r=Z.state.chains.get(e),n=!((s=r==null?void 0:r.caipNetworks)!=null&&s.some(o=>{var a;return o.id===((a=ge.activeCaipNetwork)==null?void 0:a.id)})),i=Z.getNetworkControllerClient(t.chainNamespace);if(i){try{await i.switchCaipNetwork(t),n&&At.close()}catch{Se.goBack()}Kt.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:t.caipNetworkId}})}},getNetworkControllerClient(t){const e=t||ge.activeChain;if(!e)throw new Error("ChainController:getNetworkControllerClient - chain is required");const r=ge.chains.get(e);if(!r)throw new Error("Chain adapter not found");if(!r.networkControllerClient)throw new Error("NetworkController client not set");return r.networkControllerClient},getConnectionControllerClient(t){const e=t||ge.activeChain;if(!e)throw new Error("Chain is required to get connection controller client");const r=ge.chains.get(e);if(!(r!=null&&r.connectionControllerClient))throw new Error("ConnectionController client not set");return r.connectionControllerClient},getAccountProp(t,e){var i;let r=ge.activeChain;if(e&&(r=e),!r)return;const n=(i=ge.chains.get(r))==null?void 0:i.accountState;if(n)return n[t]},getNetworkProp(t,e){var n;const r=(n=ge.chains.get(e))==null?void 0:n.networkState;if(r)return r[t]},getRequestedCaipNetworks(t){const e=ge.chains.get(t),{approvedCaipNetworkIds:r=[],requestedCaipNetworks:n=[]}=(e==null?void 0:e.networkState)||{};return Ve.sortRequestedNetworks(r,n).filter(o=>o==null?void 0:o.id)},getAllRequestedCaipNetworks(){const t=[];return ge.chains.forEach(e=>{if(!e.namespace)throw new Error("ChainController:getAllRequestedCaipNetworks - chainAdapter must have a namespace");const r=Z.getRequestedCaipNetworks(e.namespace);t.push(...r)}),t},setRequestedCaipNetworks(t,e){Z.setAdapterNetworkState(e,{requestedCaipNetworks:t});const n=Z.getAllRequestedCaipNetworks().map(s=>s.chainNamespace),i=Array.from(new Set(n));ke.filterByNamespaces(i)},getAllApprovedCaipNetworkIds(){const t=[];return ge.chains.forEach(e=>{if(!e.namespace)throw new Error("ChainController:getAllApprovedCaipNetworkIds - chainAdapter must have a namespace");const r=Z.getApprovedCaipNetworkIds(e.namespace);t.push(...r)}),t},getActiveCaipNetwork(t){var e,r;return t?(r=(e=ge.chains.get(t))==null?void 0:e.networkState)==null?void 0:r.caipNetwork:ge.activeCaipNetwork},getActiveCaipAddress(){return ge.activeCaipAddress},getApprovedCaipNetworkIds(t){var n;const e=ge.chains.get(t);return((n=e==null?void 0:e.networkState)==null?void 0:n.approvedCaipNetworkIds)||[]},async setApprovedCaipNetworksData(t){const e=Z.getNetworkControllerClient(),r=await(e==null?void 0:e.getApprovedCaipNetworksData());Z.setAdapterNetworkState(t,{approvedCaipNetworkIds:r==null?void 0:r.approvedCaipNetworkIds,supportsAllNetworks:r==null?void 0:r.supp
1004ortsAllNetworks})},checkIfSupportedNetwork(t,e){var i;const r=e||((i=ge.activeCaipNetwork)==null?void 0:i.caipNetworkId),n=Z.getRequestedCaipNetworks(t);return n.length?n==null?void 0:n.some(s=>s.caipNetworkId===r):!0},checkIfSupportedChainId(t){if(!ge.activeChain)return!0;const e=Z.getRequestedCaipNetworks(ge.activeChain);return e==null?void 0:e.some(r=>r.id===t)},setSmartAccountEnabledNetworks(t,e){Z.setAdapterNetworkState(e,{smartAccountEnabledNetworks:t})},checkIfSmartAccountEnabled(){var n;const t=g3e.caipNetworkIdToNumber((n=ge.activeCaipNetwork)==null?void 0:n.caipNetworkId),e=ge.activeChain;if(!e||!t)return!1;const r=Z.getNetworkProp("smartAccountEnabledNetworks",e);return!!(r!=null&&r.includes(Number(t)))},showUnsupportedChainUI(){At.open({view:"UnsupportedChain"})},checkIfNamesSupported(){const t=ge.activeCaipNetwork;return!!(t!=null&&t.chainNamespace&&cn.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(t.chainNamespace))},resetNetwork(t){Z.setAdapterNetworkState(t,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})},resetAccount(t){const e=t;if(!e)throw new Error("Chain is required to set account prop");const r=Xe.state.defaultAccountTypes[e],n=Z.getAccountProp("preferredAccountType",e);ge.activeCaipAddress=void 0,Z.setChainAccountData(e,{smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountType:r||n,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0,user:void 0,status:"disconnected"}),ke.removeConnectorId(e)},setIsSwitchingNamespace(t){ge.isSwitchingNamespace=t},getFirstCaipNetworkSupportsAuthConnector(){var r,n;const t=[];let e;if(ge.chains.forEach(i=>{Be.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(s=>s===i.namespace)&&i.namespace&&t.push(i.namespace)}),t.length>0){const i=t[0];return e=i?(n=(r=ge.chains.get(i))==null?void 0:r.caipNetworks)==null?void 0:n[0]:void 0,e}},getAccountData(t){var e;return t?(e=Z.state.chains.get(t))==null?void 0:e.accountState:yt.state},getNetworkData(t){var r;const e=t||ge.activeChain;if(e)return(r=Z.state.chains.get(e))==null?void 0:r.networkState},getCaipNetworkByNamespace(t,e){var i,s,o;if(!t)return;const r=Z.state.chains.get(t),n=(i=r==null?void 0:r.caipNetworks)==null?void 0:i.find(a=>a.id===e);return n||((s=r==null?void 0:r.networkState)==null?void 0:s.caipNetwork)||((o=r==null?void 0:r.caipNetworks)==null?void 0:o[0])},getRequestedCaipNetworkIds(){const t=ke.state.filterByNamespace;return(t?[ge.chains.get(t)]:Array.from(ge.chains.values())).flatMap(r=>(r==null?void 0:r.caipNetworks)||[]).map(r=>r.caipNetworkId)},getCaipNetworks(t){return t?Z.getRequestedCaipNetworks(t):Z.getAllRequestedCaipNetworks()},setLastConnectedSIWECaipNetwork(t){ge.lastConnectedSIWECaipNetwork=t},getLastConnectedSIWECaipNetwork(){return ge.lastConnectedSIWECaipNetwork}},Z=jn(W3e),K3e={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},GR=Ve.getBlockchainApiUrl(),Gn=Rt({clientId:null,api:new Kp({baseUrl:GR,clientId:null}),supportedChains:{http:[],ws:[]}}),Ie={state:Gn,async get(t){const{st:e,sv:r}=Ie.getSdkProperties(),n=Xe.state.projectId,i={...t.params||{},st:e,sv:r,projectId:n};return Gn.api.get({...t,params:i})},getSdkProperties(){const{sdkType:t,sdkVersion:e}=Xe.state;return{st:t||"unknown",sv:e||"unknown"}},async isNetworkSupported(t){if(!t)return!1;
1004try{Gn.supportedChains.http.length||await Ie.getSupportedNetworks()}catch{return!1}return Gn.supportedChains.http.includes(t)},async getSupportedNetworks(){try{const t=await Ie.get({path:"v1/supported-chains"});return Gn.supportedChains=t,t}catch{return Gn.supportedChains}},async fetchIdentity({address:t,caipNetworkId:e}){if(!await Ie.isNetworkSupported(e))return{avatar:"",name:""};const n=Ae.getIdentityFromCacheForAddress(t);if(n)return n;const i=await Ie.get({path:`/v1/identity/${t}`,params:{sender:Z.state.activeCaipAddress?Ve.getPlainAddress(Z.state.activeCaipAddress):void 0}});return Ae.updateIdentityCache({address:t,identity:i,timestamp:Date.now()}),i},async fetchTransactions({account:t,cursor:e,signal:r,cache:n,chainId:i}){var o;return await Ie.isNetworkSupported((o=Z.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)?Ie.get({path:`/v1/account/${t}/history`,params:{cursor:e,chainId:i},signal:r,cache:n}):{data:[],next:void 0}},async fetchSwapQuote({amount:t,userAddress:e,from:r,to:n,gasPrice:i}){var o;return await Ie.isNetworkSupported((o=Z.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)?Ie.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{amount:t,userAddress:e,from:r,to:n,gasPrice:i}}):{quotes:[]}},async fetchSwapTokens({chainId:t}){var r;return await Ie.isNetworkSupported((r=Z.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Ie.get({path:"/v1/convert/tokens",params:{chainId:t}}):{tokens:[]}},async fetchTokenPrice({addresses:t}){var r;return await Ie.isNetworkSupported((r=Z.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Gn.api.post({path:"/v1/fungible/price",body:{currency:"usd",addresses:t,projectId:Xe.state.projectId},headers:{"Content-Type":"application/json"}}):{fungibles:[]}},async fetchSwapAllowance({tokenAddress:t,userAddress:e}){var n;return await Ie.isNetworkSupported((n=Z.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)?Ie.get({path:"/v1/convert/allowance",params:{tokenAddress:t,userAddress:e},headers:{"Content-Type":"application/json"}}):{allowance:"0"}},async fetchGasPrice({chainId:t}){var i;const{st:e,sv:r}=Ie.getSdkProperties();if(!await Ie.isNetworkSupported((i=Z.state.activeCaipNetwork)==null?void 0:i.caipNetworkId))throw new Error("Network not supported for Gas Price");return Ie.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json"},params:{chainId:t,st:e,sv:r}})},async generateSwapCalldata({amount:t,from:e,to:r,userAddress:n,disableEstimate:i}){var o;if(!await Ie.isNetworkSupported((o=Z.state.activeCaipNetwork)==null?void 0:o.caipNetworkId))throw new Error("Network not supported for Swaps");return Gn.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:t,eip155:{slippage:cn.CONVERT_SLIPPAGE_TOLERANCE},projectId:Xe.state.projectId,from:e,to:r,userAddress:n,disableEstimate:i}})},async generateApproveCalldata({from:t,to:e,userAddress:r}){var o;const{st:n,sv:i}=Ie.getSdkProperties();if(!await Ie.isNetworkSupported((o=Z.state.activeCaipNetwork)==null?void 0:o.caipNetworkId))throw new Error("Network not supported for Swaps");return Ie.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json"},params:{userAddress:r,from:t,to:e,st:n,sv:i}})},async getBalance(t,e,r){var l;const{st:n,sv:i}=Ie.getSdkProperties();if(!await Ie.isNetworkSupported((l=Z.state.activeCaipNetwork)==null?void 0:l.caipNetworkId))return Er.showError("Token Balance Unavailable"),{balances:[]};const o=`${e}:${t}`,a=Ae.getBalanceCacheForCaipAddress(o);if(a)return a;const c=await Ie.get({path:`/v1/account/${t}/balance`,params:{currency:"usd",chainId:e,forceUpdate:r,st:n,sv:i}});return Ae.updateBalanceCache({caipAddress:o,balance:c,timestamp:Date.now()}),c},async lookupEnsName(t){var r;return await Ie.isNetworkSupported((r=Z.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Ie.get({path:`/v1/profile/account/${t}`,params:{apiVersion:"2"}}):{addresses:{},attributes:[]}},async reverseLookupEnsName({address:t}){var r;return await Ie.isNetworkSupported((r=Z.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Ie.get({path:`/v1/profile/reverse/${t}`,params:{sender:yt.state.address,apiVersion:"2"}}):[]},async getEnsNameSuggestions(t){var r;return await Ie.isNetworkSupported((r=Z.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Ie.get({path:`/v1/profile/suggestions/${t}`,params:{zone:"reown.id"}}):{suggestions:[]}},async registerEnsName({coinType:t,address:e,message:r,signature:n}){var s;return await Ie.isNetworkSupported((s=Z.state.activeCaipNetwork)==null?void 0:s.caipNetworkId)?Gn.api.post({path:"/v1/profile/account",body:{coin_type:t,address:e,message:r,signature:n},headers:{"Content-Type":"application/json"}}):{success:!1}},async generateOnRampURL({destinationWallets:t,partnerUserId:e,defaultNetwork:r,purchaseAmount:n,paymentAmount:i}){var a;return await Ie.isNetworkSupported((a=Z.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)?(await Gn.api.post({path:"/v1/generators/onrampurl",params:{projectId:Xe.state.projectId},body:{destinationWallets:t,defaultNetwork:r,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url:""},async getOnrampOptions(){var e;if(!await Ie.isNetworkSupported((e=Z.state.activeCaipNetwork)==null?void 0:e.caipNetworkId))return{paymentCurrencies:[],purchaseCurrencies:[]};try{return await Ie.get({path:"/v1/onramp/options"})}catch{return K3e}},async getOnrampQuote({purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}){var i;try{return await Ie.isNetworkSupported((i=Z.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)?await Gn.api.post({path:"/v1/onramp/quote",params:{projectId:Xe.state.projectId},body:{purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}}):null}catch{return{networkFee:{amount:r,currency:e.id},paymentSubtotal:{amount:r,currency:e.id},paymentTotal:{amount:r,currency:e.id},purchaseAmount:{amount:r,currency:e.id},quoteId:"mocked-quote-id"}}},async getSmartSessions(t){var r;return await Ie.isNetworkSupported((r=Z.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Ie.get({path:`/v1/sessions/${t}`}):[]},async revokeSmartSession(t,e,r){var i;return await Ie.isNetworkSupported((i=Z.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)?Gn.api.post({path:`/v1/sessions/${t}/revoke`,params:{projectId:Xe.state.projectId},body:{pci:e,signature:r}}):{success:!1}},setClientId(t){Gn.clientId=t,Gn.api=new Kp({baseUrl:GR,clientId:t})}},ty={createBalance(t,e){const r={name:t.metadata.name||"",symbol
1004:t.metadata.symbol||"",decimals:t.metadata.decimals||0,value:t.metadata.value||0,price:t.metadata.price||0,iconUrl:t.metadata.iconUrl||""};return{name:r.name,symbol:r.symbol,chainId:e,address:t.address==="native"?void 0:this.convertAddressToCAIP10Address(t.address,e),value:r.value,price:r.price,quantity:{decimals:r.decimals.toString(),numeric:this.convertHexToBalance({hex:t.balance,decimals:r.decimals})},iconUrl:r.iconUrl}},convertHexToBalance({hex:t,decimals:e}){return Ow(BigInt(t),e)},convertAddressToCAIP10Address(t,e){return`${e}:${t}`},createCAIP2ChainId(t,e){return`${e}:${parseInt(t,16)}`},getChainIdHexFromCAIP2ChainId(t){const e=t.split(":");if(e.length<2||!e[1])return"0x0";const r=e[1],n=parseInt(r,10);return isNaN(n)?"0x0":`0x${n.toString(16)}`},isWalletGetAssetsResponse(t){return typeof t!="object"||t===null?!1:Object.values(t).every(e=>Array.isArray(e)&&e.every(r=>this.isValidAsset(r)))},isValidAsset(t){return typeof t=="object"&&t!==null&&typeof t.address=="string"&&typeof t.balance=="string"&&(t.type==="ERC20"||t.type==="NATIVE")&&typeof t.metadata=="object"&&t.metadata!==null&&typeof t.metadata.name=="string"&&typeof t.metadata.symbol=="string"&&typeof t.metadata.decimals=="number"&&typeof t.metadata.price=="number"&&typeof t.metadata.iconUrl=="string"}},_m={async getMyTokensWithBalance(t){const e=yt.state.address,r=Z.state.activeCaipNetwork,n=ke.getConnectorId("eip155")===Be.CONNECTOR_ID.AUTH;if(!e||!r)return[];const i=`${r.caipNetworkId}:${e}`,s=Ae.getBalanceCacheForCaipAddress(i);if(s)return s.balances;if(r.chainNamespace===Be.CHAIN.EVM&&n){const a=await this.getEIP155Balances(e,r);if(a)return this.filterLowQualityTokens(a)}const o=await Ie.getBalance(e,r.caipNetworkId,t);return this.filterLowQualityTokens(o.balances)},async getEIP155Balances(t,e){var r,n;try{const i=ty.getChainIdHexFromCAIP2ChainId(e.caipNetworkId),s=await _e.getCapabilities(t);if(!((n=(r=s==null?void 0:s[i])==null?void 0:r.assetDiscovery)!=null&&n.supported))return null;const o=await _e.walletGetAssets({account:t,chainFilter:[i]});if(!ty.isWalletGetAssetsResponse(o))return null;const c=(o[i]||[]).map(l=>ty.createBalance(l,e.caipNetworkId));return Ae.updateBalanceCache({caipAddress:`${e.caipNetworkId}:${t}`,balance:{balances:c},timestamp:Date.now()}),c}catch{return null}},filterLowQualityTokens(t){return t.filter(e=>e.quantity.decimals!=="0")}},yo=Rt({currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map}),Z3e={state:yo,replaceState(t){t&&Object.assign(yo,Mh(t))},subscribe(t){return Z.subscribeChainProp("accountState",e=>{if(e)return t(e)})},subscribeKey(t,e,r){let n;return Z.subscribeChainProp("accountState",i=>{if(i){const s=i[t];n!==s&&(n=s,e(s))}},r)},setStatus(t,e){Z.setAccountProp("status",t,e)},getCaipAddress(t){return Z.getAccountProp("caipAddress",t)},setCaipAddress(t,e){const r=t?Ve.getPlainAddress(t):void 0;e===Z.state.activeChain&&(Z.state.activeCaipAddress=t),Z.setAccountProp("caipAddress",t,e),Z.setAccountProp("address",r,e)},setBalance(t,e,r){Z.setAccountProp("balance",t,r),Z.setAccountProp("balanceSymbol",e,r)},setProfileName(t,e){Z.setAccountProp("profileName",t,e)},setProfileImage(t,e){Z.setAccountProp("profileImage",t,e)},setUser(t,e){Z.setAccountProp("user",t,e)},setAddressExplorerUrl(t,e){Z.setAccountProp("addressExplorerUrl",t,e)},setSmartAccountDeployed(t,e){Z.setAccountProp("smartAccountDeployed",t,e)},setCurrentTab(t){Z.setAccountProp("currentTab",t,Z.state.activeChain)},setTokenBalance(t,e){t&&Z.setAccountProp("tokenBalance",t,e)},setShouldUpdateToAddress(t,e){Z.setAccountProp("shouldUpdateToAddress",t,e)},addAddressLabel(t,e,r){const n=Z.getAccountProp("addressLabels",r)||new Map;n.set(t,e),Z.setAccountProp("addressLabels",n,r)},removeAddressLabel(t,e){const r=Z.getAccountProp("addressLabels",e)||new Map;r.delete(t),Z.setAccountProp("addressLabels",r,e)},setConnectedWalletInfo(t,e){Z.setAccountProp("connectedWalletInfo",t,e,!1)},setPreferredAccountType(t,e){Z.setAccountProp("preferredAccountType",t,e)},setSocialProvider(t,e){t&&Z.setAccountProp("socialProvider",t,e)},setSocialWindow(t,e){Z.setAccountProp("socialWindow",t?Mh(t):void 0,e)},setFarcasterUrl(t,e){Z.setAccountProp("farcasterUrl",t,e)},async fetchTokenBalance(t){var s,o;yo.balanceLoading=!0;const e=(s=Z.state.activeCaipNetwork)==null?void 0:s.caipNetworkId,r=(o=Z.state.activeCaipNetwork)==null?void 0:o.chainNamespace,n=Z.state.activeCaipAddress,i=n?Ve.getPlainAddress(n):void 0;if(yo.lastRetry&&!Ve.isAllowedRetry(yo.lastRetry,30*cn.ONE_SEC_MS))return yo.balanceLoading=!1,[];try{if(i&&e&&r){const a=await _m.getMyTokensWithBalance();return yt.setTokenBalance(a,r),yo.lastRetry=void 0,yo.balanceLoading=!1,a}}catch(a){yo.lastRetry=Date.now(),t==null||t(a),Er.showError("Token Balance Unavailable")}finally{yo.balanceLoading=!1}return[]},resetAccount(t){Z.resetAccount(t)}},yt=jn(Z3e),G3e={onSwitchNetwork({network:t,ignoreSwitchConfirmation:e=!1}){const r=Z.state.activeCaipNetwork,n=Se.state.data;if(t.id===(r==null?void 0:r.id))return;const s=yt.getCaipAddress(Z.state.activeChain),o=t.chainNamespace!==Z.state.activeChain,a=yt.getCaipAddress(t.chainNamespace),l=ke.getConnectorId(Z.state.activeChain)===Be.CONNECTOR_ID.AUTH,u=Be.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(d=>d===t.chainNamespace);
1004e||l&&u?Se.push("SwitchNetwork",{...n,network:t}):s&&o&&!a?Se.push("SwitchActiveChain",{switchToChain:t.chainNamespace,navigateTo:"Connect",navigateWithReplace:!0,network:t}):Se.push("SwitchNetwork",{...n,network:t})}},Yn=Rt({loading:!1,loadingNamespaceMap:new Map,open:!1,shake:!1,namespace:void 0}),Y3e={state:Yn,subscribe(t){return Gr(Yn,()=>t(Yn))},subscribeKey(t,e){return Jr(Yn,t,e)},async open(t){var s,o;const e=t==null?void 0:t.namespace,r=Z.state.activeChain,n=e&&e!==r,i=(s=Z.getAccountData(t==null?void 0:t.namespace))==null?void 0:s.caipAddress;if(_e.state.wcBasic?Ue.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1}):await Ue.prefetch(),ke.setFilterByNamespace(t==null?void 0:t.namespace),At.setLoading(!0,e),e&&n){const a=((o=Z.getNetworkData(e))==null?void 0:o.caipNetwork)||Z.getRequestedCaipNetworks(e)[0];a&&G3e.onSwitchNetwork({network:a,ignoreSwitchConfirmation:!0})}else{const a=Z.state.noAdapters;Xe.state.manualWCControl||a&&!i?Ve.isMobile()?Se.reset("AllWallets"):Se.reset("ConnectingWalletConnectBasic"):t!=null&&t.view?Se.reset(t.view,t.data):i?Se.reset("Account"):Se.reset("Connect")}Yn.open=!0,eu.set({open:!0}),Kt.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:!!i}})},close(){const t=Xe.state.enableEmbedded,e=!!Z.state.activeCaipAddress;Yn.open&&Kt.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:e}}),Yn.open=!1,Se.reset("Connect"),At.clearLoading(),t?e?Se.replace("Account"):Se.push("Connect"):eu.set({open:!1}),_e.resetUri()},setLoading(t,e){e&&Yn.loadingNamespaceMap.set(e,t),Yn.loading=t,eu.set({loading:t})},clearLoading(){Yn.loadingNamespaceMap.clear(),Yn.loading=!1,eu.set({loading:!1})},shake(){Yn.shake||(Yn.shake=!0,setTimeout(()=>{Yn.shake=!1},500))}},At=jn(Y3e),n1={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},x6={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},J3e={providers:WR,selectedProvider:null,error:null,purchaseCurrency:n1,paymentCurrency:x6,purchaseCurrencies:[n1],paymentCurrencies:[],quotesLoading:!1},ct=Rt(J3e),X3e={state:ct,subscribe(t){return Gr(ct,()=>t(ct))},subscribeKey(t,e){return Jr(ct,t,e)},setSelectedProvider(t){if(t&&t.name==="meld"){const e=Z.state.activeChain,r=e===Be.CHAIN.SOLANA?"SOL":"USDC",n=Z.getAccountProp("address",e)??"",i=new URL(t.url);i.searchParams.append("publicKey",v3e),i.searchParams.append("destinationCurrencyCode",r),i.searchParams.append("walletAddress",n),i.searchParams.append("externalCustomerId",Xe.state.projectId),ct.selectedProvider={...t,url:i.toString()}}else ct.selectedProvider=t},setOnrampProviders(t){if(Array.isArray(t)&&t.every(e=>typeof e=="string")){const e=t,r=WR.filter(n=>e.includes(n.name));ct.providers=r}else ct.providers=[]},setPurchaseCurrency(t){ct.purchaseCurrency=t},setPaymentCurrency(t){ct.paymentCurrency=t},setPurchaseAmount(t){SS.state.purchaseAmount=t},setPaymentAmount(t){SS.state.paymentAmount=t},async getAvailableCurrencies(){const t=await Ie.getOnrampOptions();ct.purchaseCurrencies=t.purchaseCurrencies,ct.paymentCurrencies=t.paymentCurrencies,ct.paymentCurrency=t.paymentCurrencies[0]||x6,ct.purchaseCurrency=t.purchaseCurrencies[0]||n1,await Ue.fetchCurrencyImages(t.paymentCurrencies.map(e=>e.id)),await Ue.fetchTokenImages(t.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var t,e;ct.quotesLoading=!0;try{const r=await Ie.getOnrampQuote({purchaseCurrency:ct.purchaseCurrency,paymentCurrency:ct.paymentCurrency,amount:((t=ct.paymentAmount)==null?void 0:t.toString())||"0",network:(e=ct.purchaseCurrency)==null?void 0:e.symbol});return ct.quotesLoading=!1,ct.purchaseAmount=Number(r==null?void 0:r.purchaseAmount.amount),r}catch(r){return ct.error=r.message,ct.quotesLoading=!1,null}finally{ct.quotesLoading=!1}},resetState(){ct.selectedProvider=null,ct.error=null,ct.purchaseCurrency=n1,ct.paymentCurrency=x6,ct.purchaseCurrencies=[n1],ct.paymentCurrencies=[],ct.paymentAmount=void 0,ct.purchaseAmount=void 0,ct.quotesLoading=!1}},SS=jn(X3e),Oc={getGasPriceInEther(t,e){const r=e*t;return Number(r)/1e18},getGasPriceInUSD(t,e,r){const n=Oc.getGasPriceInEther(e,r);return zt.bigNumber(t).times(n).toNumber()},getPriceImpact({sourceTokenAmount:t,sourceTokenPriceInUSD:e,toTokenPriceInUSD:r,toTokenAmount:n}){const i=zt.bigNumber(t).times(e),s=zt.bigNumber(n).times(r);return i.minus(s).div(i).times(100).toNumber()},getMaxSlippage(t,e){const r=zt.bigNumber(t).div(100);return zt.multiply(e,r).toNumber()},getProviderFee(t,e=.0085){return zt.bigNumber(t).times(e).toString()},isInsufficientNetworkTokenForGas(t,e){const r=e||"0";return zt.bigNumber(t).eq(0)?!0:zt.bigNumber(zt.bigNumber(r)).gt(t)},isInsufficientSourceTokenForSwap(t,e,r){var s,o;const n=(o=(s=r==null?void 0:r.find(a=>a.address===e))==null?void 0:s.quantity)==null?void 0:o.numeric;return zt.bigNumber(n||"0").lt(t)},getToTokenAmount({sourceToken:t,toToken:e,sourceTokenPrice:r,toTokenPrice:n,sourceTokenAmount:i}){if(i==="0"||!t||!e)return"0";const s=t.decimals,o=r,a=e.decimals,c=n;if(c<=0)return"0";const l=zt.bigNumber(i).times(.0085),d=zt.bigNumber(i).minus(l).times(zt.bigNumber(10).pow(s)),h=zt.bigNumber(o).div(c),f=s-a;return d.times(h).div(zt.bigNumber(10).pow(f)).div(zt.bigNumber(10).pow(a)).toFixed(a).toString()}},IS=15e4,Q3e=6,Pn={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:cn.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},Q=Rt(Pn),S2={state:Q,subscribe(t){return Gr(Q,()=>t(Q))},subscribeKey(t,e){return Jr(Q,t,e)},getParams(){var a,c,l,u,d,h,f,g;const t=Z.state.activeCaipAddress,e=Ve.getPlainAddress(t),r=C8(),n=ke.getConnectorId(Z.state.activeChain);if(!e)throw new Error("No address found to swap the tokens from.");const i=!((a=Q.toToken)!=null&&a.address)||!((c=Q.toToken)!=null&&c.decimals),s=!((l=Q.sourceToken)!=null&&l.address)||!((u=Q.sourceToken)!=null&&u.decimals)||!zt.bigNumber(Q.sourceTokenAmount).gt(0),o=!Q.sourceTokenAmount;return{networkAddress:r,fromAddress:e,fromCaipAddress:t,sourceTokenAddress:(d=Q.sourceToken)==null?void 0:d.address,toTokenAddress:(h=Q.toToken)==null?void 0:h.address,toTokenAmount:Q.toTokenAmount,toTokenDecimals:(f=Q.toToken)==null?void 0:f.decimals,sourceTokenAmount:Q.sourceTokenAmount,sourceTokenDecimals:(g=Q.sourceToken)==null?void 0:g.decimals,invalidToToken:i,invalidSourceToken:s,invalidSourceTokenAmount:o,availableToSwap:t&&!i&&!s&&!o,isAuthConnector:n===Be.CONNECTOR_ID.AUTH}},setSourceToken(t){if(!t){Q.sourceToken=t,Q.sourceTokenAmount="",Q.sourceTokenPriceInUSD=0;return}Q.sourceToken=t,Te.setTokenPrice(t.address,"sourceToken")},setSourceTokenAmount(t){Q.sourceTokenAmount=t},setToToken(t){if(!t){Q.toToken=t,Q.toTokenAmount="",Q.toTokenPriceInUSD=0;return}Q.toToken=t,Te.setTokenPrice(t.address,"toToken")},setToTokenAmount(t){Q.toTokenAmount=t?zt.formatNumberToLocalString(t,Q3e):""},async setTokenPrice(t,e){let r=Q.tokensPriceMap[t]||0;r||(Q.loadingPrices=!0,r=await Te.getAddressPrice(t)),e==="sourceToken"?Q.sourceTokenPriceInUSD=r:e==="toToken"&&(Q.toTokenPriceInUSD=r),Q.loadingPrices&&(Q.loadingPrices=!1),Te.getParams().availableToSwap&&Te.swapTokens()},switchTokens(){if(Q.initializing||!Q.initialized)return;const t=Q.toToken?{...Q.toToken}:void 0,e=Q.sourceToken?{...Q.sourceToken}:void 0,r=t&&Q.toTokenAmount===""?"1":Q.toTokenAmount;Te.setSourceToken(t),Te.setToToken(e),Te.setSourceTokenAmount(r),Te.setToTokenAmount(""),Te.swapTokens()},resetState(){Q.myTokensWithBalance=Pn.myTokensWithBalance,Q.tokensPriceMap=Pn.tokensPriceMap,Q.initialized=Pn.initialized,Q.sourceToken=Pn.sourceToken,Q.sourceTokenAmount=Pn.sourceTokenAmount,Q.sourceTokenPriceInUSD=Pn.sourceTokenPriceInUSD,Q.toToken=Pn.toToken,Q.toTokenAmount=Pn.toTokenAmount,Q.toTokenPriceInUSD=Pn.toTokenPriceInUSD,Q.networkPrice=Pn.networkPrice,Q.networkTokenSymbol=Pn.networkTokenSymbol,Q.networkBalanceInUSD=Pn.networkBalanceInUSD,Q.inputError=Pn.inputError,Q.myTokensWithBalance=Pn.myTokensWithBalance},resetValues(){var r;const{networkAddress:t}=Te.getParams(),e=(r=Q.tokens)==null?void 0:r.find(n=>n.address===t);Te.setSourceToken(e),Te.setToToken(void 0)},getApprovalLoadingState(){return Q.loadingApprovalTransaction},clearError(){Q.transactionError=void 0},async initializeState(){if(!Q.initializing){if(Q.initializing=!0,!Q.initialized)try{await Te.fetchTokens(),Q.initialized=!0}catch{Q.initialized=!1,Er.showError("Failed to initialize swap"),Se.goBack()}Q.initializing=!1}},async fetchTokens(){var r;const{networkAddress:t}=Te.getParams();await Te.getTokenList(),await Te.getNetworkTokenPrice(),await Te.getMyTokensWithBalance();const e=(r=Q.tokens)==null?void 0:r.find(n=>n.address===t);e&&(Q.networkTokenSymbol=e.symbol,Te.setSourceToken(e),Te.setSourceTokenAmount("1"))},async getTokenList(){const t=await Bf.getTokenList();Q.tokens=t,Q.popularTokens=t.sort((e,r)=>e.symbol<r.symbol?-1:e.symbol>r.symbol?1:0),Q.suggestedTokens=t.filter(e=>!!cn.SWAP_SUGGESTED_TOKENS.includes(e.symbol),{})},async getAddressPrice(t){var c,l;const e=Q.tokensPriceMap[t];if(e)return e;const r=await Ie.fetchTokenPrice({addresses:[t]}),n=(r==null?void 0:r.fungibles)||[],i=[...Q.tokens||[],...Q.myTokensWithBalance||[]],s=(c=i==null?void 0:i.find(u=>u.address===t))==null?void 0:c.symbol,o=((l=n.find(u=>u.symbol.toLowerCase()===(s==null?void 0:s.toLowerCase())))==null?void 0:l.price)||0,a=parseFloat(o.toString());return Q.tokensPriceMap[t]=a,a},async getNetworkTokenPrice(){var i;const{networkAddress:t}=Te.getParams(),r=(i=(await Ie.fetchTokenPrice({addresses:[t]}
1004).catch(()=>(Er.showError("Failed to fetch network token price"),{fungibles:[]}))).fungibles)==null?void 0:i[0],n=(r==null?void 0:r.price.toString())||"0";Q.tokensPriceMap[t]=parseFloat(n),Q.networkTokenSymbol=(r==null?void 0:r.symbol)||"",Q.networkPrice=n},async getMyTokensWithBalance(t){const e=await _m.getMyTokensWithBalance(t),r=Bf.mapBalancesToSwapTokens(e);r&&(await Te.getInitialGasPrice(),Te.setBalances(r))},setBalances(t){const{networkAddress:e}=Te.getParams(),r=Z.state.activeCaipNetwork;if(!r)return;const n=t.find(i=>i.address===e);t.forEach(i=>{Q.tokensPriceMap[i.address]=i.price||0}),Q.myTokensWithBalance=t.filter(i=>i.address.startsWith(r.caipNetworkId)),Q.networkBalanceInUSD=n?zt.multiply(n.quantity.numeric,n.price).toString():"0"},async getInitialGasPrice(){var e,r;const t=await Bf.fetchGasPrice();if(!t)return{gasPrice:null,gasPriceInUSD:null};switch((r=(e=Z.state)==null?void 0:e.activeCaipNetwork)==null?void 0:r.chainNamespace){case Be.CHAIN.SOLANA:return Q.gasFee=t.standard??"0",Q.gasPriceInUSD=zt.multiply(t.standard,Q.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(Q.gasFee),gasPriceInUSD:Number(Q.gasPriceInUSD)};case Be.CHAIN.EVM:default:const n=t.standard??"0",i=BigInt(n),s=BigInt(IS),o=Oc.getGasPriceInUSD(Q.networkPrice,s,i);return Q.gasFee=n,Q.gasPriceInUSD=o,{gasPrice:i,gasPriceInUSD:o}}},async swapTokens(){var s,o;const t=yt.state.address,e=Q.sourceToken,r=Q.toToken,n=zt.bigNumber(Q.sourceTokenAmount).gt(0);if(n||Te.setToTokenAmount(""),!r||!e||Q.loadingPrices||!n)return;Q.loadingQuote=!0;const i=zt.bigNumber(Q.sourceTokenAmount).times(10**e.decimals).round(0);try{const a=await Ie.fetchSwapQuote({userAddress:t,from:e.address,to:r.address,gasPrice:Q.gasFee,amount:i.toString()});Q.loadingQuote=!1;const c=(o=(s=a==null?void 0:a.quotes)==null?void 0:s[0])==null?void 0:o.toAmount;if(!c){E8.open({shortMessage:"Incorrect amount",longMessage:"Please enter a valid amount"},"error");return}const l=zt.bigNumber(c).div(10**r.decimals).toString();Te.setToTokenAmount(l),Te.hasInsufficientToken(Q.sourceTokenAmount,e.address)?Q.inputError="Insufficient balance":(Q.inputError=void 0,Te.setTransactionDetails())}catch{Q.loadingQuote=!1,Q.inputError="Insufficient balance"}},async getTransaction(){const{fromCaipAddress:t,availableToSwap:e}=Te.getParams(),r=Q.sourceToken,n=Q.toToken;if(!(!t||!e||!r||!n||Q.loadingQuote))try{Q.loadingBuildTransaction=!0;const i=await Bf.fetchSwapAllowance({userAddress:t,tokenAddress:r.address,sourceTokenAmount:Q.sourceTokenAmount,sourceTokenDecimals:r.decimals});let s;return i?s=await Te.createSwapTransaction():s=await Te.createAllowanceTransaction(),Q.loadingBuildTransaction=!1,Q.fetchError=!1,s}catch{Se.goBack(),Er.showError("Failed to check allowance"),Q.loadingBuildTransaction=!1,Q.approvalTransaction=void 0,Q.swapTransaction=void 0,Q.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:t,sourceTokenAddress:e,toTokenAddress:r}=Te.getParams();if(!(!t||!r)){if(!e)throw new Error("createAllowanceTransaction - No source token address found.");try{const n=await Ie.generateApproveCalldata({from:e,to:r,userAddress:t}),i=Ve.getPlainAddress(n.tx.from);if(!i)throw new Error("SwapController:createAllowanceTransaction - address is required");const s={data:n.tx.data,to:i,gasPrice:BigInt(n.tx.eip155.gasPrice),value:BigInt(n.tx.value),toAmount:Q.toTokenAmount};return Q.swapTransaction=void 0,Q.approvalTransaction={data:s.data,to:s.to,gasPrice:s.gasPrice,value:s.value,toAmount:s.toAmount},{data:s.data,to:s.to,gasPrice:s.gasPrice,value:s.value,toAmount:s.toAmount}}catch{Se.goBack(),Er.showError("Failed to create approval transaction"),Q.approvalTransaction=void 0,Q.swapTransaction=void 0,Q.fetchError=!0;return}}},async createSwapTransaction(){var o;const{networkAddress:t,fromCaipAddress:e,sourceTokenAmount:r}=Te.getParams(),n=Q.sourceToken,i=Q.toToken;if(!e||!r||!n||!i)return;const s=(o=_e.parseUnits(r,n.decimals))==null?void 0:o.toString();try{const a=await Ie.generateSwapCalldata({userAddress:e,from:n.address,to:i.address,amount:s,disableEstimate:!0}
1004),c=n.address===t,l=BigInt(a.tx.eip155.gas),u=BigInt(a.tx.eip155.gasPrice),d=Ve.getPlainAddress(a.tx.to);if(!d)throw new Error("SwapController:createSwapTransaction - address is required");const h={data:a.tx.data,to:d,gas:l,gasPrice:u,value:BigInt(c?s??"0":"0"),toAmount:Q.toTokenAmount};return Q.gasPriceInUSD=Oc.getGasPriceInUSD(Q.networkPrice,l,u),Q.approvalTransaction=void 0,Q.swapTransaction=h,h}catch{Se.goBack(),Er.showError("Failed to create transaction"),Q.approvalTransaction=void 0,Q.swapTransaction=void 0,Q.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){Er.showLoading("Approve limit increase in your wallet"),Se.replace("SwapPreview")},async sendTransactionForApproval(t){var i,s,o;const{fromAddress:e,isAuthConnector:r}=Te.getParams();Q.loadingApprovalTransaction=!0,r?Se.pushTransactionStack({onSuccess:Te.onEmbeddedWalletApprovalSuccess}):Er.showLoading("Approve limit increase in your wallet");try{await _e.sendTransaction({address:e,to:t.to,data:t.data,value:t.value,chainNamespace:Be.CHAIN.EVM}),await Te.swapTokens(),await Te.getTransaction(),Q.approvalTransaction=void 0,Q.loadingApprovalTransaction=!1}catch(a){const c=a;Q.transactionError=c==null?void 0:c.shortMessage,Q.loadingApprovalTransaction=!1,Er.showError((c==null?void 0:c.shortMessage)||"Transaction error"),Kt.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:(c==null?void 0:c.shortMessage)||(c==null?void 0:c.message)||"Unknown",network:((i=Z.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)||"",swapFromToken:((s=Te.state.sourceToken)==null?void 0:s.symbol)||"",swapToToken:((o=Te.state.toToken)==null?void 0:o.symbol)||"",swapFromAmount:Te.state.sourceTokenAmount||"",swapToAmount:Te.state.toTokenAmount||"",isSmartAccount:Mo(Be.CHAIN.EVM)===Lo.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(t){var o,a,c,l,u,d,h,f,g,p,w,m;if(!t)return;const{fromAddress:e,toTokenAmount:r,isAuthConnector:n}=Te.getParams();Q.loadingTransaction=!0;const i=`Swapping ${(o=Q.sourceToken)==null?void 0:o.symbol} to ${zt.formatNumberToLocalString(r,3)} ${(a=Q.toToken)==null?void 0:a.symbol}`,s=`Swapped ${(c=Q.sourceToken)==null?void 0:c.symbol} to ${zt.formatNumberToLocalString(r,3)} ${(l=Q.toToken)==null?void 0:l.symbol}`;n?Se.pushTransactionStack({onSuccess(){Se.replace("Account"),Er.showLoading(i),S2.resetState()}}):Er.showLoading("Confirm transaction in your wallet");try{const b=[(u=Q.sourceToken)==null?void 0:u.address,(d=Q.toToken)==null?void 0:d.address].join(","),v=await _e.sendTransaction({address:e,to:t.to,data:t.data,value:t.value,chainNamespace:Be.CHAIN.EVM});return Q.loadingTransaction=!1,Er.showSuccess(s),Kt.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((h=Z.state.activeCaipNetwork)==null?void 0:h.caipNetworkId)||"",swapFromToken:((f=Te.state.sourceToken)==null?void 0:f.symbol)||"",swapToToken:((g=Te.state.toToken)==null?void 0:g.symbol)||"",swapFromAmount:Te.state.sourceTokenAmount||"",swapToAmount:Te.state.toTokenAmount||"",isSmartAccount:Mo(Be.CHAIN.EVM)===Lo.ACCOUNT_TYPES.SMART_ACCOUNT}}),S2.resetState(),n||Se.replace("Account"),S2.getMyTokensWithBalance(b),v}catch(b){const v=b;Q.transactionError=v==null?void 0:v.shortMessage,Q.loadingTransaction=!1,Er.showError((v==null?void 0:v.shortMessage)||"Transaction error"),Kt.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:(v==null?void 0:v.shortMessage)||(v==null?void 0:v.message)||"Unknown",network:((p=Z.state.activeCaipNetwork)==null?void 0:p.caipNetworkId)||"",swapFromToken:((w=Te.state.sourceToken)==null?void 0:w.symbol)||"",swapToToken:((m=Te.state.toToken)==null?void 0:m.symbol)||"",swapFromAmount:Te.state.sourceTokenAmount||"",swapToAmount:Te.state.toTokenAmount||"",isSmartAccount:Mo(Be.CHAIN.EVM)===Lo.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(t,e){return Oc.isInsufficientSourceTokenForSwap(t,e,Q.myTokensWithBalance)},setTransactionDetails(){const{toTokenAddress:t,toTokenDecimals:e}=Te.getParams();!t||!e||(Q.gasPriceInUSD=Oc.getGasPriceInUSD(Q.networkPrice,BigInt(Q.gasFee),BigInt(IS)),Q.priceImpact=Oc.getPriceImpact({sourceTokenAmount:Q.sourceTokenAmount,sourceTokenPriceInUSD:Q.sourceTokenPriceInUSD,toTokenPriceInUSD:Q.toTokenPriceInUSD,toTokenAmount:Q.toTokenAmount}),Q.maxSlippage=Oc.getMaxSlippage(Q.slippage,Q.toTokenAmount),Q.providerFee=Oc.getProviderFee(Q.sourceTokenAmount))}},Te=jn(S2),Bs=Rt({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),e5e={state:Bs,subscribe(t){return Gr(Bs,()=>t(Bs))},subscribeKey(t,e){return Jr(Bs,t,e)},showTooltip({message:t,triggerRect:e,variant:r}){Bs.open=!0,Bs.message=t,Bs.triggerRect=e,Bs.variant=r},hide(){Bs.open=!1,Bs.message="",Bs.triggerRect={width:0,height:0,top:0,left:0}}},F_e=jn(e5e),$S=2147483648,t5e={convertEVMChainIdToCoinType(t){if(t>=$S)throw new Error("Invalid chainId");return($S|t)>>>0}},rs=Rt({suggestions:[],loading:!1}),r5e={state:rs,subscribe(t){return Gr(rs,()=>t(rs))},subscribeKey(t,e){return Jr(rs,t,e)},async resolveName(t){var e,r;try{return await Ie.lookupEnsName(t)}catch(n){const i=n;throw new Error(((r=(e=i==null?void 0:i.reasons)==null?void 0:e[0])==null?void 0:r.description)||"Error resolving name")}},async isNameRegistered(t){try{return await Ie.lookupEnsName(t),!0}catch{return!1}},async getSuggestions(t){try{rs.loading=!0,rs.suggestions=[];const e=await Ie.getEnsNameSuggestions(t);return rs.suggestions=e.suggestions.map(r=>({...r,name:r.name}))||[],rs.suggestions}catch(e){const r=ry.parseEnsApiError(e,"Error fetching name suggestions");throw new Error(r)}finally{rs.loading=!1}}
1004,async getNamesForAddress(t){try{if(!Z.state.activeCaipNetwork)return[];const r=Ae.getEnsFromCacheForAddress(t);if(r)return r;const n=await Ie.reverseLookupEnsName({address:t});return Ae.updateEnsCache({address:t,ens:n,timestamp:Date.now()}),n}catch(e){const r=ry.parseEnsApiError(e,"Error fetching names for address");throw new Error(r)}},async registerName(t){const e=Z.state.activeCaipNetwork,r=yt.state.address,n=ke.getAuthConnector();if(!e)throw new Error("Network not found");if(!r||!n)throw new Error("Address or auth connector not found");rs.loading=!0;try{const i=JSON.stringify({name:t,attributes:{},timestamp:Math.floor(Date.now()/1e3)});Se.pushTransactionStack({onCancel(){Se.replace("RegisterAccountName")}});const s=await _e.signMessage(i);rs.loading=!1;const o=e.id;if(!o)throw new Error("Network not found");const a=t5e.convertEVMChainIdToCoinType(Number(o));await Ie.registerEnsName({coinType:a,address:r,signature:s,message:i}),yt.setProfileName(t,e.chainNamespace),Se.replace("RegisterAccountNameSuccess")}catch(i){const s=ry.parseEnsApiError(i,`Error registering name ${t}`);throw Se.replace("RegisterAccountName"),new Error(s)}finally{rs.loading=!1}},validateName(t){return/^[a-zA-Z0-9-]{4,}$/u.test(t)},parseEnsApiError(t,e){var n,i;const r=t;return((i=(n=r==null?void 0:r.reasons)==null?void 0:n[0])==null?void 0:i.description)||e}},ry=jn(r5e),vf=Rt({isLegalCheckboxChecked:!1}
1004),q_e={state:vf,subscribe(t){return Gr(vf,()=>t(vf))},subscribeKey(t,e){return Jr(vf,t,e)},setIsLegalCheckboxChecked(t){vf.isLegalCheckboxChecked=t}};let Al=null;const kl={getSIWX(){return Xe.state.siwx},async initializeIfEnabled(t=Z.getActiveCaipAddress()){var s;const e=Xe.state.siwx;if(!(e&&t))return;const[r,n,i]=t.split(":");if(Z.checkIfSupportedNetwork(r,`${r}:${n}`))try{if(Al&&await Al,(await e.getSessions(`${r}:${n}`,i)).length)return;await At.open({view:"SIWXSignMessage"})}catch(o){console.error("SIWXUtil:initializeIfEnabled",o),Kt.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties()}),await((s=_e._getClient())==null?void 0:s.disconnect().catch(console.error)),Se.reset("Connect"),Er.showError("A problem occurred while trying initialize authentication")}},async requestSignMessage(){const t=Xe.state.siwx,e=Ve.getPlainAddress(Z.getActiveCaipAddress()),r=Z.getActiveCaipNetwork(),n=_e._getClient();if(!t)throw new Error("SIWX is not enabled");if(!e)throw new Error("No ActiveCaipAddress found");if(!r)throw new Error("No ActiveCaipNetwork or client found");if(!n)throw new Error("No ConnectionController client found");try{const i=await t.createMessage({chainId:r.caipNetworkId,accountAddress:e}),s=i.toString();ke.getConnectorId(r.chainNamespace)===Be.CONNECTOR_ID.AUTH&&Se.pushTransactionStack({});const a=await n.signMessage(s);await t.addSession({data:i,message:s,signature:a}),Z.setLastConnectedSIWECaipNetwork(r),At.close(),Kt.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:this.getSIWXEventProperties()})}catch(i){const s=this.getSIWXEventProperties();(!At.state.open||Se.state.view==="ApproveTransaction")&&await At.open({view:"SIWXSignMessage"}),Er.showError("Error signing message"),Kt.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:s}),console.error("SWIXUtil:requestSignMessage",i)}},async cancelSignMessage(){var t;try{const e=this.getSIWX();if((t=e==null?void 0:e.getRequired)==null?void 0:t.call(e)){const n=Z.getLastConnectedSIWECaipNetwork();if(n){const i=await(e==null?void 0:e.getSessions(n==null?void 0:n.caipNetworkId,Ve.getPlainAddress(Z.getActiveCaipAddress())||""));i&&i.length>0?await Z.switchActiveNetwork(n):await _e.disconnect()}else await _e.disconnect()}else At.close();At.close(),Kt.sendEvent({event:"CLICK_CANCEL_SIWX",type:"track",properties:this.getSIWXEventProperties()})}catch(e){console.error("SIWXUtil:cancelSignMessage",e)}},async getAllSessions(){const t=this.getSIWX(),e=Z.getAllRequestedCaipNetworks(),r=[];return await Promise.all(e.map(async n=>{const i=await(t==null?void 0:t.getSessions(n.caipNetworkId,Ve.getPlainAddress(Z.getActiveCaipAddress())||""));i&&r.push(...i)})),r},async getSessions(t){const e=Xe.state.siwx;let r=t==null?void 0:t.address;if(!r){const i=Z.getActiveCaipAddress();r=Ve.getPlainAddress(i)}let n=t==null?void 0:t.caipNetworkId;if(!n){const i=Z.getActiveCaipNetwork();n=i==null?void 0:i.caipNetworkId}return e&&r&&n?e.getSessions(n,r):[]},async isSIWXCloseDisabled(){var e;const t=this.getSIWX();if(t){const r=Se.state.view==="ApproveTransaction",n=Se.state.view==="SIWXSignMessage";if(r||n)return((e=t.getRequired)==null?void 0:e.call(t))&&(await this.get
1004Sessions()).length===0}return!1},async authConnectorAuthenticate({authConnector:t,chainId:e,socialUri:r,preferredAccountType:n,chainNamespace:i}){const s=kl.getSIWX();if(!s||!i.includes(Be.CHAIN.EVM)){const u=await t.connect({chainId:e,socialUri:r,preferredAccountType:n});return{address:u.address,chainId:u.chainId,accounts:u.accounts}}const o=`${i}:${e}`,a=await s.createMessage({chainId:o,accountAddress:"<<AccountAddress>>"}),c={accountAddress:a.accountAddress,chainId:a.chainId,domain:a.domain,uri:a.uri,version:a.version,nonce:a.nonce,notBefore:a.notBefore,statement:a.statement,resources:a.resources,requestId:a.requestId,issuedAt:a.issuedAt,expirationTime:a.expirationTime,serializedMessage:a.toString()},l=await t.connect({chainId:e,socialUri:r,siwxMessage:c,preferredAccountType:n});return c.accountAddress=l.address,c.serializedMessage=l.message||"",l.signature&&l.message&&await kl.addEmbeddedWalletSession(c,l.message,l.signature),{address:l.address,chainId:l.chainId,accounts:l.accounts}},async addEmbeddedWalletSession(t,e,r){if(Al)return Al;const n=kl.getSIWX();return n?(Al=n.addSession({data:t,message:e,signature:r}).finally(()=>{Al=null}),Al):Promise.resolve()},async universalProviderAuthenticate({universalProvider:t,chains:e,methods:r}){var a,c,l;const n=kl.getSIWX(),i=new Set(e.map(u=>u.split(":")[0]));if(!n||i.size!==1||!i.has("eip155"))return!1;const s=await n.createMessage({chainId:((a=Z.getActiveCaipNetwork())==null?void 0:a.caipNetworkId)||"",accountAddress:""}),o=await t.authenticate({nonce:s.nonce,domain:s.domain,uri:s.uri,exp:s.expirationTime,iat:s.issuedAt,nbf:s.notBefore,requestId:s.requestId,version:s.version,resources:s.resources,statement:s.statement,chainId:s.chainId,methods:r,chains:[s.chainId,...e.filter(u=>u!==s.chainId)]});if(Er.showLoading("Authenticating...",{autoClose:!1}),yt.setConnectedWalletInfo({...o.session.peer.metadata,name:o.session.peer.metadata.name,icon:(c=o.session.peer.metadata.icons)==null?void 0:c[0],type:"WALLET_CONNECT"},Array.from(i)[0]),(l=o==null?void 0:o.auths)!=null&&l.length){const u=o.auths.map(d=>{const h=t.client.formatAuthMessage({request:d.p,iss:d.p.iss});return{data:{...d.p,accountAddress:d.p.iss.split(":").slice(-1).join(""),chainId:d.p.iss.split(":").slice(2,4).join(":"),uri:d.p.aud,version:d.p.version||s.version,expirationTime:d.p.exp,issuedAt:d.p.iat,notBefore:d.p.nbf},message:h,signature:d.s.s,cacao:d}});try{await n.setSessions(u),Kt.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:kl.getSIWXEventProperties()})}catch(d){throw console.error("SIWX:universalProviderAuth - failed to set sessions",d),Kt.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:kl.getSIWXEventProperties()}),await t.disconnect().catch(console.error),d}finally{Er.hide()}}return!0},getSIWXEventProperties(){var e;const t=Z.state.activeChain;if(!t)throw new Error("SIWXUtil:getSIWXEventProperties - namespace is required");return{network:((e=Z.state.activeCaipNetwork)==null?void 0:e.caipNetworkId)||"",isSmartAccount:Mo(t)===Lo.ACCOUNT_TYPES.SMART_ACCOUNT}},async clearSessions(){const t=this.getSIWX();t&&await t.setSessions([])}},H_e={isUnsupportedChainView(){return Se.state.view==="UnsupportedChain"||Se.state.view==="SwitchNetwork"&&Se.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){At.shake();return}if(await kl.isSIWXCloseDisabled()){At.shake();return}At.close()}},V_e={interpolate(t,e,r){if(t.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=t[0]||0,i=t[1]||0,s=e[0]||0,o=e[1]||0;return r<n?s:r>i?o:(o-s)/(i-n)*(r-n)+s}};let i1,Qc,el;function W_e(t,e){i1=document.createElement("style"),Qc=document.createElement("style"),el=document.createElement("style"),i1.textContent=Eh(t).core.cssText,Qc.textContent=Eh(t).dark.cssText,el.textContent=Eh(t).light.cssText,document.head.appendChild(i1),document.head.appendChild(Qc),document.head.appendChild(el),n5e(e)}function n5e(t){Qc&&el&&(t==="light"?(Qc.removeAttribute("media"),el.media="enabled"):(el.removeAttribute("media"),Qc.media="enabled"))}function K_e(t){i1&&Qc&&el&&(i1.textContent=Eh(t).core.cssText,Qc.textContent=Eh(t).dark.cssText,el.textContent=Eh(t).light.cssText)}function Eh(t){return{core:ne`
1005      @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
1006      @keyframes w3m-shake {
1007        0% {
1008          transform: scale(1) rotate(0deg);
1009        }
1010        20% {
1011          transform: scale(1) rotate(-1deg);
1012        }
1013        40% {
1014          transform: scale(1) rotate(1.5deg);
1015        }
1016        60% {
1017          transform: scale(1) rotate(-1.5deg);
1018        }
1019        80% {
1020          transform: scale(1) rotate(1deg);
1021        }
1022        100% {
1023          transform: scale(1) rotate(0deg);
1024        }
1025      }
1026      @keyframes w3m-iframe-fade-out {
1027        0% {
1028          opacity: 1;
1029        }
1030        100% {
1031          opacity: 0;
1032        }
1033      }
1034      @keyframes w3m-iframe-zoom-in {
1035        0% {
1036          transform: translateY(50px);
1037          opacity: 0;
1038        }
1039        100% {
1040          transform: translateY(0px);
1041          opacity: 1;
1042        }
1043      }
1044      @keyframes w3m-iframe-zoom-in-mobile {
1045        0% {
1046          transform: scale(0.95);
1047          opacity: 0;
1048        }
1049        100% {
1050          transform: scale(1);
1051          opacity: 1;
1052        }
1053      }
1054      :root {
1055        --w3m-modal-width: 360px;
1056        --w3m-color-mix-strength: ${ir(t!=null&&t["--w3m-color-mix-strength"]?`${t["--w3m-color-mix-strength"]}%`:"0%")};
1057        --w3m-font-family: ${ir((t==null?void 0:t["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")};
1058        --w3m-font-size-master: ${ir((t==null?void 0:t["--w3m-font-size-master"])||"10px")};
1059        --w3m-border-radius-master: ${ir((t==null?void 0:t["--w3m-border-radius-master"])||"4px")};
1060        --w3m-z-index: ${ir((t==null?void 0:t["--w3m-z-index"])||
vendor: 15,824 bytes, lines 1060-1486
1060999)};
1061
1062        --wui-font-family: var(--w3m-font-family);
1063
1064        --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);
1065        --wui-font-size-micro: var(--w3m-font-size-master);
1066        --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);
1067        --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);
1068        --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);
1069        --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);
1070        --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);
1071        --wui-font-size-title-6: calc(var(--w3m-font-size-master) * 2.2);
1072        --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);
1073        --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);
1074
1075        --wui-border-radius-5xs: var(--w3m-border-radius-master);
1076        --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);
1077        --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);
1078        --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);
1079        --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);
1080        --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);
1081        --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);
1082        --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);
1083        --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);
1084
1085        --wui-font-weight-light: 400;
1086        --wui-font-weight-regular: 500;
1087        --wui-font-weight-medium: 600;
1088        --wui-font-weight-bold: 700;
1089
1090        --wui-letter-spacing-2xl: -1.6px;
1091        --wui-letter-spacing-medium-title: -0.96px;
1092        --wui-letter-spacing-title-6: -0.88px;
1093        --wui-letter-spacing-large: -0.8px;
1094        --wui-letter-spacing-medium: -0.72px;
1095        --wui-letter-spacing-paragraph: -0.64px;
1096        --wui-letter-spacing-small: -0.56px;
1097        --wui-letter-spacing-tiny: -0.48px;
1098        --wui-letter-spacing-micro: -0.2px;
1099        --wui-letter-spacing-mini: -0.16px;
1100
1101        --wui-spacing-0: 0px;
1102        --wui-spacing-4xs: 2px;
1103        --wui-spacing-3xs: 4px;
1104        --wui-spacing-xxs: 6px;
1105        --wui-spacing-2xs: 7px;
1106        --wui-spacing-xs: 8px;
1107        --wui-spacing-1xs: 10px;
1108        --wui-spacing-s: 12px;
1109        --wui-spacing-m: 14px;
1110        --wui-spacing-l: 16px;
1111        --wui-spacing-2l: 18px;
1112        --wui-spacing-xl: 20px;
1113        --wui-spacing-xxl: 24px;
1114        --wui-spacing-2xl: 32px;
1115        --wui-spacing-3xl: 40px;
1116        --wui-spacing-4xl: 90px;
1117        --wui-spacing-5xl: 95px;
1118
1119        --wui-icon-box-size-xxs: 14px;
1120        --wui-icon-box-size-xs: 20px;
1121        --wui-icon-box-size-sm: 24px;
1122        --wui-icon-box-size-md: 32px;
1123        --wui-icon-box-size-mdl: 36px;
1124        --wui-icon-box-size-lg: 40px;
1125        --wui-icon-box-size-2lg: 48px;
1126        --wui-icon-box-size-xl: 64px;
1127
1128        --wui-icon-size-inherit: inherit;
1129        --wui-icon-size-xxs: 10px;
1130        --wui-icon-size-xs: 12px;
1131        --wui-icon-size-sm: 14px;
1132        --wui-icon-size-md: 16px;
1133        --wui-icon-size-mdl: 18px;
1134        --wui-icon-size-lg: 20px;
1135        --wui-icon-size-xl: 24px;
1136        --wui-icon-size-xxl: 28px;
1137
1138        --wui-wallet-image-size-inherit: inherit;
1139        --wui-wallet-image-size-sm: 40px;
1140        --wui-wallet-image-size-md: 56px;
1141        --wui-wallet-image-size-lg: 80px;
1142
1143        --wui-visual-size-size-inherit: inherit;
1144        --wui-visual-size-sm: 40px;
1145        --wui-visual-size-md: 55px;
1146        --wui-visual-size-lg: 80px;
1147
1148        --wui-box-size-md: 100px;
1149        --wui-box-size-lg: 120px;
1150
1151        --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);
1152        --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);
1153
1154        --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);
1155        --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);
1156        --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);
1157
1158        --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);
1159
1160        --wui-duration-lg: 200ms;
1161        --wui-duration-md: 125ms;
1162        --wui-duration-sm: 75ms;
1163
1164        --wui-path-network-sm: path(
1165          'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'
1166        );
1167
1168        --wui-path-network-md: path(
1169          'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'
1170        );
1171
1172        --wui-path-network-lg: path(
1173          'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'
1174        );
1175
1176        --wui-width-network-sm: 36px;
1177        --wui-width-network-md: 48px;
1178        --wui-width-network-lg: 86px;
1179
1180        --wui-height-network-sm: 40px;
1181        --wui-height-network-md: 54px;
1182        --wui-height-network-lg: 96px;
1183
1184        --wui-icon-size-network-xs: 12px;
1185        --wui-icon-size-network-sm: 16px;
1186        --wui-icon-size-network-md: 24px;
1187        --wui-icon-size-network-lg: 42px;
1188
1189        --wui-color-inherit: inherit;
1190
1191        --wui-color-inverse-100: #fff;
1192        --wui-color-inverse-000: #000;
1193
1194        --wui-cover: rgba(20, 20, 20, 0.8);
1195
1196        --wui-color-modal-bg: var(--wui-color-modal-bg-base);
1197
1198        --wui-color-accent-100: var(--wui-color-accent-base-100);
1199        --wui-color-accent-090: var(--wui-color-accent-base-090);
1200        --wui-color-accent-080: var(--wui-color-accent-base-080);
1201
1202        --wui-color-success-100: var(--wui-color-success-base-100);
1203        --wui-color-success-125: var(--wui-color-success-base-125);
1204
1205        --wui-color-warning-100: var(--wui-color-warning-base-100);
1206
1207        --wui-color-error-100: var(--wui-color-error-base-100);
1208        --wui-color-error-125: var(--wui-color-error-base-125);
1209
1210        --wui-color-blue-100: var(--wui-color-blue-base-100);
1211        --wui-color-blue-90: var(--wui-color-blue-base-90);
1212
1213        --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);
1214        --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);
1215        --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);
1216        --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);
1217
1218        --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100);
1219
1220        --wui-avatar-border: var(--wui-avatar-border-base);
1221
1222        --wui-thumbnail-border: var(--wui-thumbnail-border-base);
1223
1224        --wui-wallet-button-bg: var(--wui-wallet-button-bg-base);
1225
1226        --wui-box-shadow-blue: var(--wui-color-accent-glass-020);
1227      }
1228
1229      @supports (background: color-mix(in srgb, white 50%, black)) {
1230        :root {
1231          --wui-color-modal-bg: color-mix(
1232            in srgb,
1233            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1234            var(--wui-color-modal-bg-base)
1235          );
1236
1237          --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent);
1238
1239          --wui-color-accent-100: color-mix(
1240            in srgb,
1241            var(--wui-color-accent-base-100) 100%,
1242            transparent
1243          );
1244          --wui-color-accent-090: color-mix(
1245            in srgb,
1246            var(--wui-color-accent-base-100) 90%,
1247            transparent
1248          );
1249          --wui-color-accent-080: color-mix(
1250            in srgb,
1251            var(--wui-color-accent-base-100) 80%,
1252            transparent
1253          );
1254          --wui-color-accent-glass-090: color-mix(
1255            in srgb,
1256            var(--wui-color-accent-base-100) 90%,
1257            transparent
1258          );
1259          --wui-color-accent-glass-080: color-mix(
1260            in srgb,
1261            var(--wui-color-accent-base-100) 80%,
1262            transparent
1263          );
1264          --wui-color-accent-glass-020: color-mix(
1265            in srgb,
1266            var(--wui-color-accent-base-100) 20%,
1267            transparent
1268          );
1269          --wui-color-accent-glass-015: color-mix(
1270            in srgb,
1271            var(--wui-color-accent-base-100) 15%,
1272            transparent
1273          );
1274          --wui-color-accent-glass-010: color-mix(
1275            in srgb,
1276            var(--wui-color-accent-base-100) 10%,
1277            transparent
1278          );
1279          --wui-color-accent-glass-005: color-mix(
1280            in srgb,
1281            var(--wui-color-accent-base-100) 5%,
1282            transparent
1283          );
1284          --wui-color-accent-002: color-mix(
1285            in srgb,
1286            var(--wui-color-accent-base-100) 2%,
1287            transparent
1288          );
1289
1290          --wui-color-fg-100: color-mix(
1291            in srgb,
1292            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1293            var(--wui-color-fg-100)
1294          );
1295          --wui-color-fg-125: color-mix(
1296            in srgb,
1297            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1298            var(--wui-color-fg-125)
1299          );
1300          --wui-color-fg-150: color-mix(
1301            in srgb,
1302            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1303            var(--wui-color-fg-150)
1304          );
1305          --wui-color-fg-175: color-mix(
1306            in srgb,
1307            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1308            var(--wui-color-fg-175)
1309          );
1310          --wui-color-fg-200: color-mix(
1311            in srgb,
1312            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1313            var(--wui-color-fg-200)
1314          );
1315          --wui-color-fg-225: color-mix(
1316            in srgb,
1317            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1318            var(--wui-color-fg-225)
1319          );
1320          --wui-color-fg-250: color-mix(
1321            in srgb,
1322            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1323            var(--wui-color-fg-250)
1324          );
1325          --wui-color-fg-275: color-mix(
1326            in srgb,
1327            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1328            var(--wui-color-fg-275)
1329          );
1330          --wui-color-fg-300: color-mix(
1331            in srgb,
1332            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1333            var(--wui-color-fg-300)
1334          );
1335          --wui-color-fg-325: color-mix(
1336            in srgb,
1337            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1338            var(--wui-color-fg-325)
1339          );
1340          --wui-color-fg-350: color-mix(
1341            in srgb,
1342            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1343            var(--wui-color-fg-350)
1344          );
1345
1346          --wui-color-bg-100: color-mix(
1347            in srgb,
1348            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1349            var(--wui-color-bg-100)
1350          );
1351          --wui-color-bg-125: color-mix(
1352            in srgb,
1353            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1354            var(--wui-color-bg-125)
1355          );
1356          --wui-color-bg-150: color-mix(
1357            in srgb,
1358            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1359            var(--wui-color-bg-150)
1360          );
1361          --wui-color-bg-175: color-mix(
1362            in srgb,
1363            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1364            var(--wui-color-bg-175)
1365          );
1366          --wui-color-bg-200: color-mix(
1367            in srgb,
1368            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1369            var(--wui-color-bg-200)
1370          );
1371          --wui-color-bg-225: color-mix(
1372            in srgb,
1373            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1374            var(--wui-color-bg-225)
1375          );
1376          --wui-color-bg-250: color-mix(
1377            in srgb,
1378            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1379            var(--wui-color-bg-250)
1380          );
1381          --wui-color-bg-275: color-mix(
1382            in srgb,
1383            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1384            var(--wui-color-bg-275)
1385          );
1386          --wui-color-bg-300: color-mix(
1387            in srgb,
1388            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1389            var(--wui-color-bg-300)
1390          );
1391          --wui-color-bg-325: color-mix(
1392            in srgb,
1393            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1394            var(--wui-color-bg-325)
1395          );
1396          --wui-color-bg-350: color-mix(
1397            in srgb,
1398            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1399            var(--wui-color-bg-350)
1400          );
1401
1402          --wui-color-success-100: color-mix(
1403            in srgb,
1404            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1405            var(--wui-color-success-base-100)
1406          );
1407          --wui-color-success-125: color-mix(
1408            in srgb,
1409            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1410            var(--wui-color-success-base-125)
1411          );
1412
1413          --wui-color-warning-100: color-mix(
1414            in srgb,
1415            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1416            var(--wui-color-warning-base-100)
1417          );
1418
1419          --wui-color-error-100: color-mix(
1420            in srgb,
1421            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1422            var(--wui-color-error-base-100)
1423          );
1424          --wui-color-blue-100: color-mix(
1425            in srgb,
1426            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1427            var(--wui-color-blue-base-100)
1428          );
1429          --wui-color-blue-90: color-mix(
1430            in srgb,
1431            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1432            var(--wui-color-blue-base-90)
1433          );
1434          --wui-color-error-125: color-mix(
1435            in srgb,
1436            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1437            var(--wui-color-error-base-125)
1438          );
1439
1440          --wui-icon-box-bg-error-100: color-mix(
1441            in srgb,
1442            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1443            var(--wui-icon-box-bg-error-base-100)
1444          );
1445          --wui-icon-box-bg-accent-100: color-mix(
1446            in srgb,
1447            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1448            var(--wui-icon-box-bg-blue-base-100)
1449          );
1450          --wui-icon-box-bg-success-100: color-mix(
1451            in srgb,
1452            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1453            var(--wui-icon-box-bg-success-base-100)
1454          );
1455          --wui-icon-box-bg-inverse-100: color-mix(
1456            in srgb,
1457            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1458            var(--wui-icon-box-bg-inverse-base-100)
1459          );
1460
1461          --wui-all-wallets-bg-100: color-mix(
1462            in srgb,
1463            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1464            var(--wui-all-wallets-bg-100)
1465          );
1466
1467          --wui-avatar-border: color-mix(
1468            in srgb,
1469            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1470            var(--wui-avatar-border-base)
1471          );
1472
1473          --wui-thumbnail-border: color-mix(
1474            in srgb,
1475            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1476            var(--wui-thumbnail-border-base)
1477          );
1478
1479          --wui-wallet-button-bg: color-mix(
1480            in srgb,
1481            var(--w3m-color-mix) var(--w3m-color-mix-strength),
1482            var(--wui-wallet-button-bg-base)
1483          );
1484        }
1485      }
1486    `,
1486light:ne`
1487      :root {
1488        --w3m-color-mix: ${ir((t==null?void 0:t["--w3m-color-mix"])||"#fff")};
1489        --w3m-accent: ${ir(Hc(t,"dark")["--w3m-accent"])};
1490        --w3m-default: #fff;
1491
1492        --wui-color-modal-bg-base: ${ir(Hc(t,"dark")["--w3m-background"])};
1493        --wui-color-accent-base-100: var(--w3m-accent);
1494
1495        --wui-color-blueberry-100: hsla(230, 100%, 67%, 1);
1496        --wui-color-blueberry-090: hsla(231, 76%, 61%, 1);
1497        --wui-color-blueberry-080: hsla(230, 59%, 55%, 1);
1498        --wui-color-blueberry-050: hsla(231, 100%, 70%, 0.1);
1499
1500        --wui-color-fg-100: #e4e7e7;
1501        --wui-color-fg-125: #d0d5d5;
1502        --wui-color-fg-150: #a8b1b1;
1503        --wui-color-fg-175: #a8b0b0;
1504        --wui-color-fg-200: #949e9e;
1505        --wui-color-fg-225: #868f8f;
1506        --wui-color-fg-250: #788080;
1507        --wui-color-fg-275: #788181;
1508        --wui-color-fg-300: #6e7777;
1509        --wui-color-fg-325: #9a9a9a;
1510        --wui-color-fg-350: #363636;
1511
1512        --wui-color-bg-100: #141414;
1513        --wui-color-bg-125: #191a1a;
1514        --wui-color-bg-150: #1e1f1f;
1515        --wui-color-bg-175: #222525;
1516        --wui-color-bg-200: #272a2a;
1517        --wui-color-bg-225: #2c3030;
1518        --wui-color-bg-250: #313535;
1519        --wui-color-bg-275: #363b3b;
1520        --wui-color-bg-300: #3b4040;
1521        --wui-color-bg-325: #252525;
1522        --wui-color-bg-350: #ffffff;
1523
1524        --wui-color-success-base-100: #26d962;
1525        --wui-color-success-base-125: #30a46b;
1526
1527        --wui-color-warning-base-100: #f3a13f;
1528
1529        --wui-color-error-base-100: #f25a67;
1530        --wui-color-error-base-125: #df4a34;
1531
1532        --wui-color-blue-base-100: rgba(102, 125, 255, 1);
1533        --wui-color-blue-base-90: rgba(102, 125, 255, 0.9);
1534
1535        --wui-color-success-glass-001: rgba(38, 217, 98, 0.01);
1536        --wui-color-success-glass-002: rgba(38, 217, 98, 0.02);
1537        --wui-color-success-glass-005: rgba(38, 217, 98, 0.05);
1538        --wui-color-success-glass-010: rgba(38, 217, 98, 0.1);
1539        --wui-color-success-glass-015: rgba(38, 217, 98, 0.15);
1540        --wui-color-success-glass-020: rgba(38, 217, 98, 0.2);
1541        --wui-color-success-glass-025: rgba(38, 217, 98, 0.25);
1542        --wui-color-success-glass-030: rgba(38, 217, 98, 0.3);
1543        --wui-color-success-glass-060: rgba(38, 217, 98, 0.6);
1544        --wui-color-success-glass-080: rgba(38, 217, 98, 0.8);
1545
1546        --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2);
1547
1548        --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2);
1549
1550        --wui-color-error-glass-001: rgba(242, 90, 103, 0.01);
1551        --wui-color-error-glass-002: rgba(242, 90, 103, 0.02);
1552        --wui-color-error-glass-005: rgba(242, 90, 103, 0.05);
1553        --wui-color-error-glass-010: rgba(242, 90, 103, 0.1);
1554        --wui-color-error-glass-015: rgba(242, 90, 103, 0.15);
1555        --wui-color-error-glass-020: rgba(242, 90, 103, 0.2);
1556        --wui-color-error-glass-025: rgba(242, 90, 103, 0.25);
1557        --wui-color-error-glass-030: rgba(242, 90, 103, 0.3);
1558        --wui-color-error-glass-060: rgba(242, 90, 103, 0.6);
1559        --wui-color-error-glass-080: rgba(242, 90, 103, 0.8);
1560
1561        --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2);
1562
1563        --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01);
1564        --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02);
1565        --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05);
1566        --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1);
1567        --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15);
1568        --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2);
1569        --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25);
1570        --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3);
1571        --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6);
1572        --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8);
1573        --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9);
1574
1575        --wui-color-dark-glass-100: rgba(42, 42, 42, 1);
1576
1577        --wui-icon-box-bg-error-base-100: #3c2426;
1578        --wui-icon-box-bg-blue-base-100: #20303f;
1579        --wui-icon-box-bg-success-base-100: #1f3a28;
1580        --wui-icon-box-bg-inverse-base-100: #243240;
1581
1582        --wui-all-wallets-bg-100: #222b35;
1583
1584        --wui-avatar-border-base: #252525;
1585
1586        --wui-thumbnail-border-base: #252525;
1587
1588        --wui-wallet-button-bg-base: var(--wui-color-bg-125);
1589
1590        --w3m-card-embedded-shadow-color: rgb(17 17 18 / 25%);
1591      }
1592    `,dark:ne`
1593      :root {
1594        --w3m-color-mix: ${ir((t==null?void 0:t["--w3m-color-mix"])||"#000")};
1595        --w3m-accent: ${ir(Hc(t,"light")["--w3m-accent"])};
1596        --w3m-default: #000;
1597
1598        --wui-color-modal-bg-base: ${ir(Hc(t,"light")["--w3m-background"])};
1599        --wui-color-accent-base-100: var(--w3m-accent);
1600
1601        --wui-color-blueberry-100: hsla(231, 100%, 70%, 1);
1602        --wui-color-blueberry-090: hsla(231, 97%, 72%, 1);
1603        --wui-color-blueberry-080: hsla(231, 92%, 74%, 1);
1604
1605        --wui-color-fg-100: #141414;
1606        --wui-color-fg-125: #2d3131;
1607        --wui-color-fg-150: #474d4d;
1608        --wui-color-fg-175: #636d6d;
1609        --wui-color-fg-200: #798686;
1610        --wui-color-fg-225: #828f8f;
1611        --wui-color-fg-250: #8b9797;
1612        --wui-color-fg-275: #95a0a0;
1613        --wui-color-fg-300: #9ea9a9;
1614        --wui-color-fg-325: #9a9a9a;
1615        --wui-color-fg-350: #d0d0d0;
1616
1617        --wui-color-bg-100: #ffffff;
1618        --wui-color-bg-125: #f5fafa;
1619        --wui-color-bg-150: #f3f8f8;
1620        --wui-color-bg-175: #eef4f4;
1621        --wui-color-bg-200: #eaf1f1;
1622        --wui-color-bg-225: #e5eded;
1623        --wui-color-bg-250: #e1e9e9;
1624        --wui-color-bg-275: #dce7e7;
1625        --wui-color-bg-300: #d8e3e3;
1626        --wui-color-bg-325: #f3f3f3;
1627        --wui-color-bg-350: #202020;
1628
1629        --wui-color-success-base-100: #26b562;
1630        --wui-color-success-base-125: #30a46b;
1631
1632        --wui-color-warning-base-100: #f3a13f;
1633
1634        --wui-color-error-base-100: #f05142;
1635        --wui-color-error-base-125: #df4a34;
1636
1637        --wui-color-blue-base-100: rgba(102, 125, 255, 1);
1638        --wui-color-blue-base-90: rgba(102, 125, 255, 0.9);
1639
1640        --wui-color-success-glass-001: rgba(38, 181, 98, 0.01);
1641        --wui-color-success-glass-002: rgba(38, 181, 98, 0.02);
1642        --wui-color-success-glass-005: rgba(38, 181, 98, 0.05);
1643        --wui-color-success-glass-010: rgba(38, 181, 98, 0.1);
1644        --wui-color-success-glass-015: rgba(38, 181, 98, 0.15);
1645        --wui-color-success-glass-020: rgba(38, 181, 98, 0.2);
1646        --wui-color-success-glass-025: rgba(38, 181, 98, 0.25);
1647        --wui-color-success-glass-030: rgba(38, 181, 98, 0.3);
1648        --wui-color-success-glass-060: rgba(38, 181, 98, 0.6);
1649        --wui-color-success-glass-080: rgba(38, 181, 98, 0.8);
1650
1651        --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2);
1652
1653        --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2);
1654
1655        --wui-color-error-glass-001: rgba(240, 81, 66, 0.01);
1656        --wui-color-error-glass-002: rgba(240, 81, 66, 0.02);
1657        --wui-color-error-glass-005: rgba(240, 81, 66, 0.05);
1658        --wui-color-error-glass-010: rgba(240, 81, 66, 0.1);
1659        --wui-color-error-glass-015: rgba(240, 81, 66, 0.15);
1660        --wui-color-error-glass-020: rgba(240, 81, 66, 0.2);
1661        --wui-color-error-glass-025: rgba(240, 81, 66, 0.25);
1662        --wui-color-error-glass-030: rgba(240, 81, 66, 0.3);
1663        --wui-color-error-glass-060: rgba(240, 81, 66, 0.6);
1664        --wui-color-error-glass-080: rgba(240, 81, 66, 0.8);
1665
1666        --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2);
1667
1668        --wui-icon-box-bg-error-base-100: #f4dfdd;
1669        --wui-icon-box-bg-blue-base-100: #d9ecfb;
1670        --wui-icon-box-bg-success-base-100: #daf0e4;
1671        --wui-icon-box-bg-inverse-base-100: #dcecfc;
1672
1673        --wui-all-wallets-bg-100: #e8f1fa;
1674
1675        --wui-avatar-border-base: #f3f4f4;
1676
1677        --wui-thumbnail-border-base: #eaefef;
1678
1679        --wui-wallet-button-bg-base: var(--wui-color-bg-125);
1680
1681        --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01);
1682        --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02);
1683        --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05);
1684        --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1);
1685        --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15);
1686        --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2);
1687        --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25);
1688        --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3);
1689        --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6);
1690        --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8);
1691        --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9);
1692
1693        --wui-color-dark-glass-100: rgba(233, 233, 233, 1);
1694
1695        --w3m-card-embedded-shadow-color: rgb(224 225 233 / 25%);
1696      }
1697    `}}const ve=ne`
1698  *,
1699  *::after,
1700  *::before,
1701  :host {
1702    margin: 0;
1703    padding: 0;
1704    box-sizing: border-box;
1705    font-style: normal;
1706    text-rendering: optimizeSpeed;
1707    -webkit-font-smoothing: antialiased;
1708    -moz-osx-font-smoothing: grayscale;
1709    -webkit-tap-highlight-color: transparent;
1710    font-family: var(--wui-font-family);
1711    backface-visibility: hidden;
1712  }
1713`,We=ne`
1714  button,
1715  a {
1716    cursor: pointer;
1717    display: flex;
1718    justify-content: center;
1719    align-items: center;
1720    position: relative;
1721    transition:
1722      color var(--wui-duration-lg) var(--wui-ease-out-power-1),
1723      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),
1724      border var(--wui-duration-lg) var(--wui-ease-out-power-1),
1725      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
1726      box-shadow var(--wui-duration-lg) var(--wui-ease-out-power-1);
1727    will-change: background-color, color, border, box-shadow, border-radius;
1728    outline: none;
1729    border: none;
1730    column-gap: var(--wui-spacing-3xs);
1731    background-color: transparent;
1732    text-decoration: none;
1733  }
1734
1735  wui-flex {
1736    transition: border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);
1737    will-change: border-radius;
1738  }
1739
1740  button:disabled > wui-wallet-image,
1741  button:disabled > wui-all-wallets-image,
1742  button:disabled > wui-network-image,
1743  button:disabled > wui-image,
1744  button:disabled > wui-transaction-visual,
1745  button:disabled > wui-logo {
1746    filter: grayscale(1);
1747  }
1748
1749  @media (hover: hover) and (pointer: fine) {
1750    button:hover:enabled {
1751      background-color: var(--wui-color-gray-glass-005);
1752    }
1753
1754    button:active:enabled {
1755      background-color: var(--wui-color-gray-glass-010);
1756    }
1757  }
1758
1759  button:disabled > wui-icon-box {
1760    opacity: 0.5;
1761  }
1762
1763  input {
1764    border: none;
1765    outline: none;
1766    appearance: none;
1767  }
1768`,Zp=ne`
1769  .wui-color-inherit {
1770    color: var(--wui-color-inherit);
1771  }
1772
1773  .wui-color-accent-100 {
1774    color: var(--wui-color-accent-100);
1775  }
1776
1777  .wui-color-error-100 {
1778    color: var(--wui-color-error-100);
1779  }
1780
1781  .wui-color-blue-100 {
1782    color: var(--wui-color-blue-100);
1783  }
1784
1785  .wui-color-blue-90 {
1786    color: var(--wui-color-blue-90);
1787  }
1788
1789  .wui-color-error-125 {
1790    color: var(--wui-color-error-125);
1791  }
1792
1793  .wui-color-success-100 {
1794    color: var(--wui-color-success-100);
1795  }
1796
1797  .wui-color-success-125 {
1798    color: var(--wui-color-success-125);
1799  }
1800
1801  .wui-color-inverse-100 {
1802    color: var(--wui-color-inverse-100);
1803  }
1804
1805  .wui-color-inverse-000 {
1806    color: var(--wui-color-inverse-000);
1807  }
1808
1809  .wui-color-fg-100 {
1810    color: var(--wui-color-fg-100);
1811  }
1812
1813  .wui-color-fg-200 {
1814    color: var(--wui-color-fg-200);
1815  }
1816
1817  .wui-color-fg-300 {
1818    color: var(--wui-color-fg-300);
1819  }
1820
1821  .wui-color-fg-325 {
1822    color: var(--wui-color-fg-325);
1823  }
1824
1825  .wui-color-fg-350 {
1826    color: var(--wui-color-fg-350);
1827  }
1828
1829  .wui-bg-color-inherit {
1830    background-color: var(--wui-color-inherit);
1831  }
1832
1833  .wui-bg-color-blue-100 {
1834    background-color: var(--wui-color-accent-100);
1835  }
1836
1837  .wui-bg-color-error-100 {
1838    background-color: var(--wui-color-error-100);
1839  }
1840
1841  .wui-bg-color-error-125 {
1842    background-color: var(--wui-color-error-125);
1843  }
1844
1845  .wui-bg-color-success-100 {
1846    background-color: var(--wui-color-success-100);
1847  }
1848
1849  .wui-bg-color-success-125 {
1850    background-color: var(--wui-color-success-100);
1851  }
1852
1853  .wui-bg-color-inverse-100 {
1854    background-color: var(--wui-color-inverse-100);
1855  }
1856
1857  .wui-bg-color-inverse-000 {
1858    background-color: var(--wui-color-inverse-000);
1859  }
1860
1861  .wui-bg-color-fg-100 {
1862    background-color: var(--wui-color-fg-100);
1863  }
1864
1865  .wui-bg-color-fg-200 {
1866    background-color: var(--wui-color-fg-200);
1867  }
1868
1869  .wui-bg-color-fg-300 {
1870    background-color: var(--wui-color-fg-300);
1871  }
1872
1873  .wui-color-fg-325 {
1874    background-color: var(--wui-color-fg-325);
1875  }
1876
1877  .wui-color-fg-350 {
1878    background-color: var(--wui-color-fg-350);
1879  }
1880`,Pt={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:r,truncate:n}){return t.length<=e+r?t:n==="end"?`${t.substring(0,e)}...`:n==="start"?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(t){const r=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),n=this.hexToRgb(r),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),o=100-3*Number(i==null?void 0:i.replace("px","")),a=`${o}% ${o}% at 65% 40%`,c=[];for(let l=0;l<5;l+=1){const u=this.tintColor(n,.15*l);c.push(`rgb(${u[0]}, ${u[1]}, ${u[2]})`)}return`
1881    --local-color-1: ${c[0]};
1882    --local-color-2: ${c[1]};
1883    --local-color-3: ${c[2]};
1884    --local-color-4: ${c[3]};
1885    --local-color-5: ${c[4]};
1886    --local-radial-circle: ${a}
1887   `},hexToRgb(t){const e=parseInt(t,16),r=e>>16&255,n=e>>8&255,i=e&255;return[r,n,i]},tintColor(t,e){const[r,n,i]=t,s=Math.round(r+(255-r)*e),o=Math.round(n+(255-n)*e),a=Math.round(i+(255-i)*e);return[s,o,a]},isNumber(t){return{number:/^[0-9]+$/u}.number.test(t)},getColorTheme(t){var e;return t||(typeof window<"u"&&window.matchMedia&&typeof window.matchMedia=="function"?(e=window.matchMedia("(prefers-color-scheme: dark)"))!=null&&e.matches?"dark":"light":"dark")},splitBalance(t){const e=t.split(".");return e.length===2?[e[0],e[1]]:["0","00"]},roundNumber(t,e,r){return t.toString().length>=e?Number(t).toFixed(r):t},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}},i5e=3,s5e=["receive","deposit","borrow","claim"],o5e=["withdraw","repay","burn"],AS={getTransactionGroupTitle(t,e){const r=vS.getYear(),n=vS.getMonthNameByIndex(e);return t===r?n:`${n} ${t}`},getTransactionImages(t){const[e,r]=t,n=!!e&&(t==null?void 0:t.every(o=>!!o.nft_info)),i=(t==null?void 0:t.length)>1;return(t==null?void 0:t.length)===2&&!n?[this.getTransactionImage(r),this.getTransactionImage(e)]:i?t.map(o=>this.getTransactionImage(o)):[this.getTransactionImage(e)]},getTransactionImage(t){return{type:AS.getTransactionTransferTokenType(t),url:AS.getTransactionImageURL(t)}},getTransactionImageURL(t){var i,s,o,a,c;let e;const r=!!(t!=null&&t.nft_info),n=!!(t!=null&&t.fungible_info);return t&&r?e=(o=(s=(i=t==null?void 0:t.nft_info)==null?void 0:i.content)==null?void 0:s.preview)==null?void 0:o.url:t&&n&&(e=(c=(a=t==null?void 0:t.fungible_info)==null?void 0:a.icon)==null?void 0:c.url),e},getTransactionTransferTokenType(t){if(t!=null&&t.fungible_info)return"FUNGIBLE";if(t!=null&&t.nft_info)return"NFT"},getTransactionDescriptions(t){var d,h,f;const e=(d=t==null?void 0:t.metadata)==null?void 0:d.operationType,r=t==null?void 0:t.transfers,n=((h=t==null?void 0:t.transfers)==null?void 0:h.length)>0,i=((f=t==null?void 0:t.transfers)==null?void 0:f.length)>1,s=n&&(r==null?void 0:r.every(g=>!!(g!=null&&g.fungible_info))),[o,a]=r;let c=this.getTransferDescription(o),l=this.getTransferDescription(a);if(!n)return(e==="send"||e==="receive")&&s?(c=Pt.getTruncateString({string:t==null?void 0:t.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=Pt.getTruncateString({string:t==null?void 0:t.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]):[t.metadata.status];if(i)return r.map(g=>this.getTransferDescription(g)).reverse();let u="";return s5e.includes(e)?u="+":o5e.includes(e)&&(u="-"),c=u.concat(c),[c]},getTransferDescription(t){var r;let e="";return t&&(t!=null&&t.nft_info?e=((r=t==null?void 0:t.nft_info)==null?void 0:r.name)||"-":t!=null&&t.fungible_info&&(e=this.getFungibleTransferDescription(t)||"-")),e},getFungibleTransferDescription(t){var n;return t?[this.getQuantityFixedValue(t==null?void 0:t.quantity.numeric),(n=t==null?void 0:t.fungible_info)==null?void 0:n.symbol].join(" ").trim():null},getQuantityFixedValue(t){return t?parseFloat(t).toFixed(i5e):null}};function a5e(t,e){const{kind:r,elements:n}=e;return{kind:r,elements:n,finisher(i){customElements.get(t)||customElements.define(t,i)}}}function c5e(t,e){return customElements.get(t)||customElements.define(t,e),e}function ye(t){return function(r){return typeof r=="function"?c5e(t,r):a5e(t,r)}}/**
1888 * @license
1889 * Copyright 2017 Google LLC
1890 * SPDX-License-Identifier: BSD-3-Clause
1891 */const l5e={attribute:!0,type:String,converter:iw,reflect:!1,hasChanged:b8},u5e=(t=l5e,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),n==="setter"&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),n==="accessor"){const{name:o}=r;return{set(a){const c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,t)},init(a){return a!==void 0&&this.C(o,void 0,t,a),a}}}if(n==="setter"){const{name:o}=r;return function(a){const c=this[o];e.call(this,a),this.requestUpdate(o,c,t)}}throw Error("Unsupported decorator location: "+n)};function D(t){return(e,r)=>typeof r=="object"?u5e(t,e,r):((n,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,n),o?Object.getOwnPropertyDescriptor(i,s):void 0})(t,e,r)}/**
1892 * @license
1893 * Copyright 2017 Google LLC
1894 * SPDX-License-Identifier: BSD-3-Clause
1895 */function Qu(t){return D({...t,state:!0,attribute:!1})}const d5e=ne`
1896  :host {
1897    display: flex;
1898    width: inherit;
1899    height: inherit;
1900  }
1901`;var Vi=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
1901a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Mn=class extends oe{render(){return this.style.cssText=`
1902      flex-direction: ${this.flexDirection};
1903      flex-wrap: ${this.flexWrap};
1904      flex-basis: ${this.flexBasis};
1905      flex-grow: ${this.flexGrow};
1906      flex-shrink: ${this.flexShrink};
1907      align-items: ${this.alignItems};
1908      justify-content: ${this.justifyContent};
1909      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
1910      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
1911      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
1912      padding-top: ${this.padding&&bn.getSpacingStyles(this.padding,0)};
1913      padding-right: ${this.padding&&bn.getSpacingStyles(this.padding,1)};
1914      padding-bottom: ${this.padding&&bn.getSpacingStyles(this.padding,2)};
1915      padding-left: ${this.padding&&bn.getSpacingStyles(this.padding,3)};
1916      margin-top: ${this.margin&&bn.getSpacingStyles(this.margin,0)};
1917      margin-right: ${this.margin&&bn.getSpacingStyles(this.margin,1)};
1918      margin-bottom: ${this.margin&&bn.getSpacingStyles(this.margin,2)};
1919      margin-left: ${this.margin&&bn.getSpacingStyles(this.margin,3)};
1920    `,q`<slot></slot>`}};Mn.styles=[bt,d5e];Vi([D()],Mn.prototype,"flexDirection",void 0);Vi([D()],Mn.prototype,"flexWrap",void 0);Vi([D()],Mn.prototype,"flexBasis",void 0);Vi([D()],Mn.prototype,"flexGrow",void 0);Vi([D()],Mn.prototype,"flexShrink",void 0);Vi([D()],Mn.prototype,"alignItems",void 0);Vi([D()],Mn.prototype,"justifyContent",void 0);Vi([D()],Mn.prototype,"columnGap",void 0);Vi([D()],Mn.prototype,"rowGap",void 0);Vi([D()],Mn.prototype,"gap",void 0);Vi([D()],Mn.prototype,"padding",void 0);Vi([D()],Mn.prototype,"margin",void 0);Mn=Vi([mt("wui-flex")],Mn);/**
1921 * @license
1922 * Copyright 2018 Google LLC
1923 * SPDX-License-Identifier: BSD-3-Clause
1924 */const Ft=t=>t??pr;/**
1925 * @license
1926 * Copyright 2020 Google LLC
1927 * SPDX-License-Identifier: BSD-3-Clause
1928 */const h5e=t=>t===null||typeof t!="object"&&typeof t!="function",f5e=t=>t.strings===void 0;/**
1929 * @license
1930 * Copyright 2017 Google LLC
1931 * SPDX-License-Identifier: BSD-3-Clause
1932 */const YR={ATTRIBUTE:1,CHILD:2},x8=t=>(...e)=>({_$litDirective$:t,values:e});let JR=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};/**
1933 * @license
1934 * Copyright 2017 Google LLC
1935 * SPDX-License-Identifier: BSD-3-Clause
1936 */const s1=(t,e)=>{var n;const r=t._$AN;if(r===void 0)return!1;for(const i of r)(n=i._$AO)==null||n.call(i,e,!1),s1(i,e);return!0},ow=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while((r==null?void 0:r.size)===0)},XR=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),w5e(e)}};function p5e(t){this._$AN!==void 0?(ow(this),this._$AM=t,XR(this)):this._$AM=t}function g5e(t,e=!1,r=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=r;s<n.length;s++)s1(n[s],!1),ow(n[s]);else n!=null&&(s1(n,!1),ow(n));else s1(this,t)}const w5e=t=>{t.type==YR.CHILD&&(t._$AP??(t._$AP=g5e),t._$AQ??(t._$AQ=p5e))};class QR extends JR{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),XR(this),this.isConnected=e._$AU}_$AO(e,r=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.call(this)),r&&(s1(this,e),ow(this))}setValue(e){if(f5e(this._$Ct))this._$Ct._$AI(e,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/**
1937 * @license
1938 * Copyright 2021 Google LLC
1939 * SPDX-License-Identifier: BSD-3-Clause
1940 */class m5e{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class y5e{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??(this.Y=new Promise(e=>this.Z=e))}resume(){var e;(e=this.Z)==null||e.call(this),this.Y=this.Z=void 0}}/**
1941 * @license
1942 * Copyright 2017 Google LLC
1943 * SPDX-License-Identifier: BSD-3-Clause
1944 */const PS=t=>!h5e(t)&&typeof t.then=="function",TS=1073741823;class b5e extends QR{constructor(){super(...arguments),this._$Cwt=TS,this._$Cbt=[],this._$CK=new m5e(this),this._$CX=new y5e}render(...e){return e.find(r=>!PS(r))??Ha}update(e,r){const n=this._$Cbt;let i=n.length;this._$Cbt=r;const s=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<r.length&&!(a>this._$Cwt);a++){const c=r[a];if(!PS(c))return this._$Cwt=a,c;a<i&&c===n[a]||(this._$Cwt=TS,i=0,Promise.resolve(c).then(async l=>{for(;o.get();)await o.get();const u=s.deref();if(u!==void 0){const d=u._$Cbt.indexOf(c);d>-1&&d<u._$Cwt&&(u._$Cwt=d,u.setValue(l))}}))}return Ha}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const eB=x8(b5e);let v5e=class{constructor(){this.cache=new Map}set(e,r){this.cache.set(e,r)}get(e){return this.cache.get(e)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}};const ny=new v5e,E5e=ne`
1945  :host {
1946    display: flex;
1947    aspect-ratio: var(--local-aspect-ratio);
1948    color: var(--local-color);
1949    width: var(--local-width);
1950  }
1951
1952  svg {
1953    width: inherit;
1954    height: inherit;
1955    object-fit: contain;
1956    object-position: center;
1957  }
1958
1959  .fallback {
1960    width: var(--local-width);
1961    height: var(--local-height);
1962  }
1963`;var Gp=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
1963a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const OS={add:async()=>(await J(async()=>{const{addSvg:t}=await Promise.resolve().then(()=>i6e);return{addSvg:t}},void 0)).addSvg,allWallets:async()=>(await J(async()=>{const{allWalletsSvg:t}=await Promise.resolve().then(()=>o6e);return{allWalletsSvg:t}},void 0)).allWalletsSvg,arrowBottomCircle:async()=>(await J(async()=>{const{arrowBottomCircleSvg:t}=await Promise.resolve().then(()=>c6e);return{arrowBottomCircleSvg:t}},void 0)).arrowBottomCircleSvg,appStore:async()=>(await J(async()=>{const{appStoreSvg:t}=await Promise.resolve().then(()=>u6e);return{appStoreSvg:t}},void 0)).appStoreSvg,apple:async()=>(await J(async()=>{const{appleSvg:t}=await Promise.resolve().then(()=>h6e);return{appleSvg:t}},void 0)).appleSvg,arrowBottom:async()=>(await J(async()=>{const{arrowBottomSvg:t}=await Promise.resolve().then(()=>p6e);return{arrowBottomSvg:t}},void 0)).arrowBottomSvg,arrowLeft:async()=>(await J(async()=>{const{arrowLeftSvg:t}=await Promise.resolve().then(()=>w6e);return{arrowLeftSvg:t}},void 0)).arrowLeftSvg,arrowRight:async()=>(await J(async()=>{const{arrowRightSvg:t}=await Promise.resolve().then(()=>y6e);return{arrowRightSvg:t}},void 0)).arrowRightSvg,arrowTop:async()=>(await J(async()=>{const{arrowTopSvg:t}=await Promise.resolve().then(()=>v6e);return{arrowTopSvg:t}},void 0)).arrowTopSvg,bank:async()=>(await J(async()=>{const{bankSvg:t}=await Promise.resolve().then(()=>C6e);return{bankSvg:t}},void 0)).bankSvg,browser:async()=>(await J(async()=>{const{browserSvg:t}=await Promise.resolve().then(()=>_6e);return{browserSvg:t}},void 0)).browserSvg,card:async()=>(await J(async()=>{const{cardSvg:t}=await Promise.resolve().then(()=>I6e);return{cardSvg:t}},void 0)).cardSvg,checkmark:async()=>(await J(async()=>{const{checkmarkSvg:t}=await Promise.resolve().then(()=>A6e);return{checkmarkSvg:t}},void 0)).checkmarkSvg,checkmarkBold:async()=>(await J(async()=>{const{checkmarkBoldSvg:t}=await Promise.resolve().then(()=>T6e);return{checkmarkBoldSvg:t}},void 0)).checkmarkBoldSvg,chevronBottom:async()=>(await J(async()=>{const{chevronBottomSvg:t}=await Promise.resolve().then(()=>N6e);return{chevronBottomSvg:t}},void 0)).chevronBottomSvg,chevronLeft:async()=>(await J(async()=>{const{chevronLeftSvg:t}=await Promise.resolve().then(()=>R6e);return{chevronLeftSvg:t}},void 0)).chevronLeftSvg,chevronRight:async()=>(await J(async()=>{const{chevronRightSvg:t}=await Promise.resolve().then(()=>D6e);return{chevronRightSvg:t}},void 0)).chevronRightSvg,chevronTop:async()=>(await J(async()=>{const{chevronTopSvg:t}=await Promise.resolve().then(()=>M6e);return{chevronTopSvg:t}},void 0)).chevronTopSvg,chromeStore:async()=>(await J(async()=>{const{chromeStoreSvg:t}=await Promise.resolve().then(()=>j6e);return{chromeStoreSvg:t}},void 0)).chromeStoreSvg,clock:async()=>(await J(async()=>{const{clockSvg:t}=await Promise.resolve().then(()=>F6e);return{clockSvg:t}},void 0)).clockSvg,close:async()=>(await J(async()=>{const{closeSvg:t}=await Promise.resolve().then(()=>H6e);return{closeSvg:t}},void 0)).closeSvg,compass:async()=>(await J(async()=>{const{compassSvg:t}=await Promise.resolve().then(()=>W6e);return{compassSvg:t}},void 0)).compassSvg,coinPlaceholder:async()=>(await J(async()=>{const{coinPlaceholderSvg:t}=await Promise.resolve().then(()=>Z6e);return{coinPlaceholderSvg:t}},void 0)).coinPlaceholderSvg,copy:async()=>(await J(async()=>{const{copySvg:t}=await Promise.resolve().then(()=>Y6e);return{copySvg:t}},void 0)).copySvg,cursor:async()=>(await J(async()=>{const{cursorSvg:t}=await Promise.resolve().then(()=>X6e);return{cursorSvg:t}},void 0)).cursorSvg,cursorTransparent:async()=>(await J(async()=>{const{cursorTransparentSvg:t}=await Promise.resolve().then(()=>eve);return{cursorTransparentSvg:t}},void 0)).cursorTransparentSvg,desktop:async()=>(await J(async()=>{const{desktopSvg:t}=await Promise.resolve().then(()=>rve);return{desktopSvg:t}},void 0)).desktopSvg,disconnect:async()=>(await J(async()=>{const{disconnectSvg:t}=await Promise.resolve().then(()=>ive);return{disconnectSvg:t}},void 0)).disconnectSvg,discord:async()=>
1963(await J(async()=>{const{discordSvg:t}=await Promise.resolve().then(()=>ove);return{discordSvg:t}},void 0)).discordSvg,etherscan:async()=>(await J(async()=>{const{etherscanSvg:t}=await Promise.resolve().then(()=>cve);return{etherscanSvg:t}},void 0)).etherscanSvg,extension:async()=>(await J(async()=>{const{extensionSvg:t}=await Promise.resolve().then(()=>uve);return{extensionSvg:t}},void 0)).extensionSvg,externalLink:async()=>(await J(async()=>{const{externalLinkSvg:t}=await Promise.resolve().then(()=>hve);return{externalLinkSvg:t}},void 0)).externalLinkSvg,facebook:async()=>(await J(async()=>{const{facebookSvg:t}=await Promise.resolve().then(()=>pve);return{facebookSvg:t}},void 0)).facebookSvg,farcaster:async()=>(await J(async()=>{const{farcasterSvg:t}=await Promise.resolve().then(()=>wve);return{farcasterSvg:t}},void 0)).farcasterSvg,filters:async()=>(await J(async()=>{const{filtersSvg:t}=await Promise.resolve().then(()=>yve);return{filtersSvg:t}},void 0)).filtersSvg,github:async()=>(await J(async()=>{const{githubSvg:t}=await Promise.resolve().then(()=>vve);return{githubSvg:t}},void 0)).githubSvg,google:async()=>(await J(async()=>{const{googleSvg:t}=await Promise.resolve().then(()=>Cve);return{googleSvg:t}},void 0)).googleSvg,helpCircle:async()=>(await J(async()=>{const{helpCircleSvg:t}=await Promise.resolve().then(()=>_ve);return{helpCircleSvg:t}},void 0)).helpCircleSvg,image:async()=>(await J(async()=>{const{imageSvg:t}=await Promise.resolve().then(()=>Ive);return{imageSvg:t}},void 0)).imageSvg,id:async()=>(await J(async()=>{const{idSvg:t}=await Promise.resolve().then(()=>Ave);return{idSvg:t}},void 0)).idSvg,infoCircle:async()=>(await J(async()=>{const{infoCircleSvg:t}=await Promise.resolve().then(()=>Tve);return{infoCircleSvg:t}},void 0)).infoCircleSvg,lightbulb:async()=>(await J(async()=>{const{lightbulbSvg:t}=await Promise.resolve().then(()=>Nve);return{lightbulbSvg:t}},void 0)).lightbulbSvg,mail:async()=>(await J(async()=>{const{mailSvg:t}=await Promise.resolve().then(()=>Rve);return{mailSvg:t}},void 0)).mailSvg,mobile:async()=>(await J(async()=>{const{mobileSvg:t}=await Promise.resolve().then(()=>Dve);return{mobileSvg:t}},void 0)).mobileSvg,more:async()=>(await J(async()=>{const{moreSvg:t}=await Promise.resolve().then(()=>Mve);return{moreSvg:t}},void 0)).moreSvg,networkPlaceholder:async()=>(await J(async()=>{const{networkPlaceholderSvg:t}=await Promise.resolve().then(()=>jve);return{networkPlaceholderSvg:t}},void 0)).networkPlaceholderSvg,nftPlaceholder:async()=>(await J(async()=>{const{nftPlaceholderSvg:t}=await Promise.resolve().then(()=>Fve);return{nftPlaceholderSvg:t}},void 0)).nftPlaceholderSvg,off:async()=>(await J(async()=>{const{offSvg:t}=await Promise.resolve().then(()=>Hve);return{offSvg:t}},void 0)).offSvg,playStore:async()=>(await J(async()=>{const{playStoreSvg:t}=await Promise.resolve().then(()=>Wve);return{playStoreSvg:t}},void 0)).playStoreSvg,plus:async()=>(await J(async()=>{const{plusSvg:t}=await Promise.resolve().then(()=>Zve);return{plusSvg:t}},void 0)).plusSvg,qrCode:async()=>(await J(async()=>{const{qrCodeIcon:t}=await Promise.resolve().then(()=>Yve);return{qrCodeIcon:t}},void 0)).qrCodeIcon,recycleHorizontal:async()=>(await J(async()=>{const{recycleHorizontalSvg:t}=await Promise.resolve().then(()=>Xve);return{recycleHorizontalSvg:t}},void 0)).recycleHorizontalSvg,refresh:async()=>(await J(async()=>{const{refreshSvg:t}=await Promise.resolve().then(()=>e8e);return{refreshSvg:t}},void 0)).refreshSvg,search:async()=>(await J(async()=>{const{searchSvg:t}=await Promise.resolve().then(()=>r8e);return{searchSvg:t}},void 0)).searchSvg,send:async()=>(await J(async()=>{const{sendSvg:t}=await Promise.resolve().then(()=>i8e);return{sendSvg:t}},void 0)).sendSvg,swapHorizontal:async()=>(await J(async()=>{const{swapHorizontalSvg:t}=await Promise.resolve().then(()=>o8e);return{swapHorizontalSvg:t}},void 0)).swapHorizontalSvg,swapHorizontalMedium:async()=>(await J(async()=>{const{swapHorizontalMediumSvg:t}=await Promise.resolve().then(()=>c8e);return{swapHorizontalMediumSvg:t}},void 0)).swapHorizontalMediumSvg,swapHorizontalBold:async()=>
1963(await J(async()=>{const{swapHorizontalBoldSvg:t}=await Promise.resolve().then(()=>u8e);return{swapHorizontalBoldSvg:t}},void 0)).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await J(async()=>{const{swapHorizontalRoundedBoldSvg:t}=await Promise.resolve().then(()=>h8e);return{swapHorizontalRoundedBoldSvg:t}},void 0)).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await J(async()=>{const{swapVerticalSvg:t}=await Promise.resolve().then(()=>p8e);return{swapVerticalSvg:t}},void 0)).swapVerticalSvg,telegram:async()=>(await J(async()=>{const{telegramSvg:t}=await Promise.resolve().then(()=>w8e);return{telegramSvg:t}},void 0)).telegramSvg,threeDots:async()=>(await J(async()=>{const{threeDotsSvg:t}=await Promise.resolve().then(()=>y8e);return{threeDotsSvg:t}},void 0)).threeDotsSvg,twitch:async()=>(await J(async()=>{const{twitchSvg:t}=await Promise.resolve().then(()=>v8e);return{twitchSvg:t}},void 0)).twitchSvg,twitter:async()=>(await J(async()=>{const{xSvg:t}=await Promise.resolve().then(()=>MI);return{xSvg:t}},void 0)).xSvg,twitterIcon:async()=>(await J(async()=>{const{twitterIconSvg:t}=await Promise.resolve().then(()=>x8e);return{twitterIconSvg:t}},void 0)).twitterIconSvg,verify:async()=>(await J(async()=>{const{verifySvg:t}=await Promise.resolve().then(()=>S8e);return{verifySvg:t}},void 0)).verifySvg,verifyFilled:async()=>(await J(async()=>{const{verifyFilledSvg:t}=await Promise.resolve().then(()=>$8e);return{verifyFilledSvg:t}},void 0)).verifyFilledSvg,wallet:async()=>(await J(async()=>{const{walletSvg:t}=await Promise.resolve().then(()=>P8e);return{walletSvg:t}},void 0)).walletSvg,walletConnect:async()=>(await J(async()=>{const{walletConnectSvg:t}=await Promise.resolve().then(()=>tb);return{walletConnectSvg:t}},void 0)).walletConnectSvg,walletConnectLightBrown:async()=>(await J(async()=>{const{walletConnectLightBrownSvg:t}=await Promise.resolve().then(()=>tb);return{walletConnectLightBrownSvg:t}},void 0)).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await J(async()=>{const{walletConnectBrownSvg:t}=await Promise.resolve().then(()=>tb);return{walletConnectBrownSvg:t}},void 0)).walletConnectBrownSvg,walletPlaceholder:async()=>(await J(async()=>{const{walletPlaceholderSvg:t}=await Promise.resolve().then(()=>R8e);return{walletPlaceholderSvg:t}},void 0)).walletPlaceholderSvg,warningCircle:async()=>(await J(async()=>{const{warningCircleSvg:t}=await Promise.resolve().then(()=>D8e);return{warningCircleSvg:t}},void 0)).warningCircleSvg,x:async()=>(await J(async()=>{const{xSvg:t}=await Promise.resolve().then(()=>MI);return{xSvg:t}},void 0)).xSvg,info:async()=>(await J(async()=>{const{infoSvg:t}=await Promise.resolve().then(()=>M8e);return{infoSvg:t}},void 0)).infoSvg,exclamationTriangle:async()=>(await J(async()=>{const{exclamationTriangleSvg:t}=await Promise.resolve().then(()=>j8e);return{exclamationTriangleSvg:t}},void 0)).exclamationTriangleSvg,reown:async()=>(await J(async()=>{const{reownSvg:t}=await Promise.resolve().then(()=>F8e);return{reownSvg:t}},void 0)).reownSvg};async function C5e(t){if(ny.has(t))return ny.get(t);const r=(OS[t]??OS.copy)();return ny.set(t,r),r}let Su=class extends oe{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=`
1964      --local-color: ${`var(--wui-color-${this.color});`}
1965      --local-width: ${`var(--wui-icon-size-${this.size});`}
1966      --local-aspect-ratio: ${this.aspectRatio}
1967    `,q`${eB(C5e(this.name),q`<div class="fallback"></div>`)}`}};Su.styles=[bt,Wp,E5e];Gp([D()],Su.prototype,"size",void 0);Gp([D()],Su.prototype,"name",void 0);Gp([D()],Su.prototype,"color",void 0);Gp([D()],Su.prototype,"aspectRatio",void 0);Su=Gp([mt("wui-icon")],Su);/**
1968 * @license
1969 * Copyright 2018 Google LLC
1970 * SPDX-License-Identifier: BSD-3-Clause
1971 */const Sm=x8(class extends JR{constructor(t){var e;if(super(t),t.type!==YR.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var n,i;
1971if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((n=this.nt)!=null&&n.has(s))&&this.st.add(s);return this.render(e)}const r=t.element.classList;for(const s of this.st)s in e||(r.remove(s),this.st.delete(s));for(const s in e){const o=!!e[s];o===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(o?(r.add(s),this.st.add(s)):(r.remove(s),this.st.delete(s)))}return Ha}}),x5e=ne`
1972  :host {
1973    display: inline-flex !important;
1974  }
1975
1976  slot {
1977    width: 100%;
1978    display: inline-block;
1979    font-style: normal;
1980    font-family: var(--wui-font-family);
1981    font-feature-settings:
1982      'tnum' on,
1983      'lnum' on,
1984      'case' on;
1985    line-height: 130%;
1986    font-weight: var(--wui-font-weight-regular);
1987    overflow: inherit;
1988    text-overflow: inherit;
1989    text-align: var(--local-align);
1990    color: var(--local-color);
1991  }
1992
1993  .wui-line-clamp-1 {
1994    overflow: hidden;
1995    display: -webkit-box;
1996    -webkit-box-orient: vertical;
1997    -webkit-line-clamp: 1;
1998  }
1999
2000  .wui-line-clamp-2 {
2001    overflow: hidden;
2002    display: -webkit-box;
2003    -webkit-box-orient: vertical;
2004    -webkit-line-clamp: 2;
2005  }
2006
2007  .wui-font-medium-400 {
2008    font-size: var(--wui-font-size-medium);
2009    font-weight: var(--wui-font-weight-light);
2010    letter-spacing: var(--wui-letter-spacing-medium);
2011  }
2012
2013  .wui-font-medium-600 {
2014    font-size: var(--wui-font-size-medium);
2015    letter-spacing: var(--wui-letter-spacing-medium);
2016  }
2017
2018  .wui-font-title-600 {
2019    font-size: var(--wui-font-size-title);
2020    letter-spacing: var(--wui-letter-spacing-title);
2021  }
2022
2023  .wui-font-title-6-600 {
2024    font-size: var(--wui-font-size-title-6);
2025    letter-spacing: var(--wui-letter-spacing-title-6);
2026  }
2027
2028  .wui-font-mini-700 {
2029    font-size: var(--wui-font-size-mini);
2030    letter-spacing: var(--wui-letter-spacing-mini);
2031    text-transform: uppercase;
2032  }
2033
2034  .wui-font-large-500,
2035  .wui-font-large-600,
2036  .wui-font-large-700 {
2037    font-size: var(--wui-font-size-large);
2038    letter-spacing: var(--wui-letter-spacing-large);
2039  }
2040
2041  .wui-font-2xl-500,
2042  .wui-font-2xl-600,
2043  .wui-font-2xl-700 {
2044    font-size: var(--wui-font-size-2xl);
2045    letter-spacing: var(--wui-letter-spacing-2xl);
2046  }
2047
2048  .wui-font-paragraph-400,
2049  .wui-font-paragraph-500,
2050  .wui-font-paragraph-600,
2051  .wui-font-paragraph-700 {
2052    font-size: var(--wui-font-size-paragraph);
2053    letter-spacing: var(--wui-letter-spacing-paragraph);
2054  }
2055
2056  .wui-font-small-400,
2057  .wui-font-small-500,
2058  .wui-font-small-600 {
2059    font-size: var(--wui-font-size-small);
2060    letter-spacing: var(--wui-letter-spacing-small);
2061  }
2062
2063  .wui-font-tiny-400,
2064  .wui-font-tiny-500,
2065  .wui-font-tiny-600 {
2066    font-size: var(--wui-font-size-tiny);
2067    letter-spacing: var(--wui-letter-spacing-tiny);
2068  }
2069
2070  .wui-font-micro-700,
2071  .wui-font-micro-600 {
2072    font-size: var(--wui-font-size-micro);
2073    letter-spacing: var(--wui-letter-spacing-micro);
2074    text-transform: uppercase;
2075  }
2076
2077  .wui-font-tiny-400,
2078  .wui-font-small-400,
2079  .wui-font-medium-400,
2080  .wui-font-paragraph-400 {
2081    font-weight: var(--wui-font-weight-light);
2082  }
2083
2084  .wui-font-large-700,
2085  .wui-font-paragraph-700,
2086  .wui-font-micro-700,
2087  .wui-font-mini-700 {
2088    font-weight: var(--wui-font-weight-bold);
2089  }
2090
2091  .wui-font-medium-600,
2092  .wui-font-medium-title-600,
2093  .wui-font-title-6-600,
2094  .wui-font-large-600,
2095  .wui-font-paragraph-600,
2096  .wui-font-small-600,
2097  .wui-font-tiny-600,
2098  .wui-font-micro-600 {
2099    font-weight: var(--wui-font-weight-medium);
2100  }
2101
2102  :host([disabled]) {
2103    opacity: 0.4;
2104  }
2105`;var Yp=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Iu=class extends oe{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left",this.lineClamp=void 0}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}
2105`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=`
2106      --local-align: ${this.align};
2107      --local-color: var(--wui-color-${this.color});
2108    `,q`<slot class=${Sm(e)}></slot>`}};Iu.styles=[bt,x5e];Yp([D()],Iu.prototype,"variant",void 0);Yp([D()],Iu.prototype,"color",void 0);Yp([D()],Iu.prototype,"align",void 0);Yp([D()],Iu.prototype,"lineClamp",void 0);Iu=Yp([mt("wui-text")],Iu);const _5e=ne`
2109  :host {
2110    display: inline-flex;
2111    justify-content: center;
2112    align-items: center;
2113    position: relative;
2114    overflow: hidden;
2115    background-color: var(--wui-color-gray-glass-020);
2116    border-radius: var(--local-border-radius);
2117    border: var(--local-border);
2118    box-sizing: content-box;
2119    width: var(--local-size);
2120    height: var(--local-size);
2121    min-height: var(--local-size);
2122    min-width: var(--local-size);
2123  }
2124
2125  @supports (background: color-mix(in srgb, white 50%, black)) {
2126    :host {
2127      background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);
2128    }
2129  }
2130`;var ic=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ys=class extends oe{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,r=this.size==="lg",n=this.size==="xl",i=r?"12%":"16%",s=r?"xxs":n?"s":"3xl",o=this.background==="gray",a=this.background==="opaque",c=this.backgroundColor==="accent-100"&&a||this.backgroundColor==="success-100"&&a||this.backgroundColor==="error-100"&&a||this.backgroundColor==="inverse-100"&&a;let l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(l=`var(--wui-color-gray-${this.backgroundColor})`),this.style.cssText=`
2131       --local-bg-value: ${l};
2132       --local-bg-mix: ${c||o?"100%":i};
2133       --local-border-radius: var(--wui-border-radius-${s});
2134       --local-size: var(--wui-icon-box-size-${this.size});
2135       --local-border: ${this.borderColor==="wui-color-bg-125"?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}
2136   `,q` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}};Ys.styles=[bt,fn,_5e];ic([D()],Ys.prototype,"size",void 0);ic([D()],Ys.prototype,"backgroundColor",void 0);ic([D()],Ys.prototype,"iconColor",void 0);ic([D()],Ys.prototype,"iconSize",void 0);ic([D()],Ys.prototype,"background",void 0);ic([D({type:Boolean})],Ys.prototype,"border",void 0);ic([D()],Ys.prototype,"borderColor",void 0);ic([D()],Ys.prototype,"icon",void 0);Ys=ic([mt("wui-icon-box")],Ys);const S5e=ne`
2137  :host {
2138    display: block;
2139    width: var(--local-width);
2140    height: var(--local-height);
2141  }
2142
2143  img {
2144    display: block;
2145    width: 100%;
2146    height: 100%;
2147    object-fit: cover;
2148    object-position: center center;
2149    border-radius: inherit;
2150  }
2151`;var Im=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let e0=class extends oe{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=`
2152      --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};
2153      --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};
2154      `,q`<img src=${this.src} alt=${this.alt} @error=${this.handleImageError} />`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:!0,composed:!0}))}};e0.styles=[bt,Wp,S5e];Im([D()],e0.prototype,"src",void 0);Im([D()],e0.prototype,"alt",void 0);Im([D()],e0.prototype,"size",void 0);e0=Im([mt("wui-image")],e0);const I5e=ne`
2155  :host {
2156    position: relative;
2157    background-color: var(--wui-color-gray-glass-002);
2158    display: flex;
2159    justify-content: center;
2160    align-items: center;
2161    width: var(--local-size);
2162    height: var(--local-size);
2163    border-radius: inherit;
2164    border-radius: var(--local-border-radius);
2165  }
2166
2167  :host > wui-flex {
2168    overflow: hidden;
2169    border-radius: inherit;
2170    border-radius: var(--local-border-radius);
2171  }
2172
2173  :host::after {
2174    content: '';
2175    position: absolute;
2176    top: 0;
2177    bottom: 0;
2178    left: 0;
2179    right: 0;
2180    border-radius: inherit;
2181    border: 1px solid var(--wui-color-gray-glass-010);
2182    pointer-events: none;
2183  }
2184
2185  :host([name='Extension'])::after {
2186    border: 1px solid var(--wui-color-accent-glass-010);
2187  }
2188
2189  :host([data-wallet-icon='allWallets']) {
2190    background-color: var(--wui-all-wallets-bg-100);
2191  }
2192
2193  :host([data-wallet-icon='allWallets'])::after {
2194    border: 1px solid var(--wui-color-accent-glass-010);
2195  }
2196
2197  wui-icon[data-parent-size='inherit'] {
2198    width: 75%;
2199    height: 75%;
2200    align-items: center;
2201  }
2202
2203  wui-icon[data-parent-size='sm'] {
2204    width: 18px;
2205    height: 18px;
2206  }
2207
2208  wui-icon[data-parent-size='md'] {
2209    width: 24px;
2210    height: 24px;
2211  }
2212
2213  wui-icon[data-parent-size='lg'] {
2214    width: 42px;
2215    height: 42px;
2216  }
2217
2218  wui-icon[data-parent-size='full'] {
2219    width: 100%;
2220    height: 100%;
2221  }
2222
2223  :host > wui-icon-box {
2224    position: absolute;
2225    overflow: hidden;
2226    right: -1px;
2227    bottom: -2px;
2228    z-index: 1;
2229    border: 2px solid var(--wui-color-bg-150, #1e1f1f);
2230    padding: 1px;
2231  }
2232`;var ed=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Va=class extends oe{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=`
2233       --local-border-radius: var(--wui-border-radius-${e});
2234       --local-size: var(--wui-wallet-image-size-${this.size});
2235   `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),q`
2236      <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
2237    `}templateVisual(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?q`<wui-icon
2238        data-parent-size="md"
2239        size="md"
2240        color="inherit"
2241        name=${this.walletIcon}
2242      ></wui-icon>`:q`<wui-icon
2243      data-parent-size=${this.size}
2244      size="inherit"
2245      color="inherit"
2246      name="walletPlaceholder"
2247    ></wui-icon>`}};Va.styles=[fn,bt,I5e];ed([D()],Va.prototype,"size",void 0);ed([D()],Va.prototype,"name",void 0);ed([D()],Va.prototype,"imageSrc",void 0);ed([D()],Va.prototype,"walletIcon",void 0);ed([D({type:Boolean})],Va.prototype,"installed",void 0);ed([D()],Va.prototype,"badgeSize",void 0);Va=ed([mt("wui-wallet-image")],Va);const $5e=ne`
2248  :host {
2249    position: relative;
2250    border-radius: var(--wui-border-radius-xxs);
2251    width: 40px;
2252    height: 40px;
2253    overflow: hidden;
2254    background: var(--wui-color-gray-glass-002);
2255    display: flex;
2256    justify-content: center;
2257    align-items: center;
2258    flex-wrap: wrap;
2259    gap: var(--wui-spacing-4xs);
2260    padding: 3.75px !important;
2261  }
2262
2263  :host::after {
2264    content: '';
2265    position: absolute;
2266    top: 0;
2267    bottom: 0;
2268    left: 0;
2269    right: 0;
2270    border-radius: inherit;
2271    border: 1px solid var(--wui-color-gray-glass-010);
2272    pointer-events: none;
2273  }
2274
2275  :host > wui-wallet-image {
2276    width: 14px;
2277    height: 14px;
2278    border-radius: var(--wui-border-radius-5xs);
2279  }
2280
2281  :host > wui-flex {
2282    padding: 2px;
2283    position: fixed;
2284    overflow: hidden;
2285    left: 34px;
2286    bottom: 8px;
2287    background: var(--dark-background-150, #1e1f1f);
2288    border-radius: 50%;
2289    z-index: 2;
2290    display: flex;
2291  }
2292`;var tB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
2292a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const iy=4;let aw=class extends oe{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<iy;return q`${this.walletImages.slice(0,iy).map(({src:r,walletName:n})=>q`
2293            <wui-wallet-image
2294              size="inherit"
2295              imageSrc=${r}
2296              name=${Ft(n)}
2297            ></wui-wallet-image>
2298          `)}
2299      ${e?[...Array(iy-this.walletImages.length)].map(()=>q` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null}
2300      <wui-flex>
2301        <wui-icon-box
2302          size="xxs"
2303          iconSize="xxs"
2304          iconcolor="success-100"
2305          backgroundcolor="success-100"
2306          icon="checkmark"
2307          background="opaque"
2308        ></wui-icon-box>
2309      </wui-flex>`}};aw.styles=[bt,$5e];tB([D({type:Array})],aw.prototype,"walletImages",void 0);aw=tB([mt("wui-all-wallets-image")],aw);const A5e=ne`
2310  :host {
2311    display: flex;
2312    justify-content: center;
2313    align-items: center;
2314    height: var(--wui-spacing-m);
2315    padding: 0 var(--wui-spacing-3xs) !important;
2316    border-radius: var(--wui-border-radius-5xs);
2317    transition:
2318      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
2319      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
2320    will-change: border-radius, background-color;
2321  }
2322
2323  :host > wui-text {
2324    transform: translateY(5%);
2325  }
2326
2327  :host([data-variant='main']) {
2328    background-color: var(--wui-color-accent-glass-015);
2329    color: var(--wui-color-accent-100);
2330  }
2331
2332  :host([data-variant='shade']) {
2333    background-color: var(--wui-color-gray-glass-010);
2334    color: var(--wui-color-fg-200);
2335  }
2336
2337  :host([data-variant='success']) {
2338    background-color: var(--wui-icon-box-bg-success-100);
2339    color: var(--wui-color-success-100);
2340  }
2341
2342  :host([data-variant='error']) {
2343    background-color: var(--wui-icon-box-bg-error-100);
2344    color: var(--wui-color-error-100);
2345  }
2346
2347  :host([data-size='lg']) {
2348    padding: 11px 5px !important;
2349  }
2350
2351  :host([data-size='lg']) > wui-text {
2352    transform: translateY(2%);
2353  }
2354`;var _8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Y1=class extends oe{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e=this.size==="md"?"mini-700":"micro-700";return q`
2355      <wui-text data-variant=${this.variant} variant=${e} color="inherit">
2356        <slot></slot>
2357      </wui-text>
2358    `}};Y1.styles=[bt,A5e];_8([D()],Y1.prototype,"variant",void 0);_8([D()],Y1.prototype,"size",void 0);Y1=_8([mt("wui-tag")],Y1);const P5e=ne`
2359  button {
2360    column-gap: var(--wui-spacing-s);
2361    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
2362    width: 100%;
2363    background-color: var(--wui-color-gray-glass-002);
2364    border-radius: var(--wui-border-radius-xs);
2365    color: var(--wui-color-fg-100);
2366  }
2367
2368  button > wui-text:nth-child(2) {
2369    display: flex;
2370    flex: 1;
2371  }
2372
2373  button:disabled {
2374    background-color: var(--wui-color-gray-glass-015);
2375    color: var(--wui-color-gray-glass-015);
2376  }
2377
2378  button:disabled > wui-tag {
2379    background-color: var(--wui-color-gray-glass-010);
2380    color: var(--wui-color-fg-300);
2381  }
2382
2383  wui-icon {
2384    color: var(--wui-color-fg-200) !important;
2385  }
2386`;var pi=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Cn=class extends oe{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return q`
2387      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
2388        ${this.templateAllWallets()} ${this.templateWalletImage()}
2389        <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
2390        ${this.templateStatus()}
2391      </button>
2392    `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?q` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?q` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?q`<wui-wallet-image
2393        size="sm"
2394        imageSrc=${this.imageSrc}
2395        name=${this.name}
2396        .installed=${this.installed}
2397      ></wui-wallet-image>`:!this.showAllWallets&&!this.imageSrc?q`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`:null}templateStatus(){return this.loading?q`<wui-loading-spinner
2398        size="lg"
2399        color=${this.loadingSpinnerColor}
2400      ></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?q`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?q`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};Cn.styles=[bt,fn,P5e];pi([D({type:Array})],Cn.prototype,"walletImages",void 0);pi([D()],Cn.prototype,"imageSrc",void 0);pi([D()],Cn.prototype,"name",void 0);pi([D()],Cn.prototype,"tagLabel",void 0);pi([D()],Cn.prototype,"tagVariant",void 0);pi([D()],Cn.prototype,"icon",void 0);pi([D()],Cn.prototype,"walletIcon",void 0);pi([D()],Cn.prototype,"tabIdx",void 0);pi([D({type:Boolean})],Cn.prototype,"installed",void 0);pi([D({type:Boolean})],Cn.prototype,"disabled",void 0);pi([D({type:Boolean})],Cn.prototype,"showAllWallets",void 0);pi([D({type:Boolean})],Cn.prototype,"loading",void 0);pi([D({type:String})],Cn.prototype,"loadingSpinnerColor",void 0);
2400Cn=pi([mt("wui-list-wallet")],Cn);const T5e=ne`
2401  :host {
2402    display: inline-flex;
2403    background-color: var(--wui-color-gray-glass-002);
2404    border-radius: var(--wui-border-radius-3xl);
2405    padding: var(--wui-spacing-3xs);
2406    position: relative;
2407    height: 36px;
2408    min-height: 36px;
2409    overflow: hidden;
2410  }
2411
2412  :host::before {
2413    content: '';
2414    position: absolute;
2415    pointer-events: none;
2416    top: 4px;
2417    left: 4px;
2418    display: block;
2419    width: var(--local-tab-width);
2420    height: 28px;
2421    border-radius: var(--wui-border-radius-3xl);
2422    background-color: var(--wui-color-gray-glass-002);
2423    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
2424    transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
2425    transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
2426    will-change: background-color, opacity;
2427  }
2428
2429  :host([data-type='flex'])::before {
2430    left: 3px;
2431    transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
2432  }
2433
2434  :host([data-type='flex']) {
2435    display: flex;
2436    padding: 0px 0px 0px 12px;
2437    gap: 4px;
2438  }
2439
2440  :host([data-type='flex']) > button > wui-text {
2441    position: absolute;
2442    left: 18px;
2443    opacity: 0;
2444  }
2445
2446  button[data-active='true'] > wui-icon,
2447  button[data-active='true'] > wui-text {
2448    color: var(--wui-color-fg-100);
2449  }
2450
2451  button[data-active='false'] > wui-icon,
2452  button[data-active='false'] > wui-text {
2453    color: var(--wui-color-fg-200);
2454  }
2455
2456  button[data-active='true']:disabled,
2457  button[data-active='false']:disabled {
2458    background-color: transparent;
2459    opacity: 0.5;
2460    cursor: not-allowed;
2461  }
2462
2463  button[data-active='true']:disabled > wui-text {
2464    color: var(--wui-color-fg-200);
2465  }
2466
2467  button[data-active='false']:disabled > wui-text {
2468    color: var(--wui-color-fg-300);
2469  }
2470
2471  button > wui-icon,
2472  button > wui-text {
2473    pointer-events: none;
2474    transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
2475    will-change: color;
2476  }
2477
2478  button {
2479    width: var(--local-tab-width);
2480    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
2481    will-change: background-color;
2482  }
2483
2484  :host([data-type='flex']) > button {
2485    width: 34px;
2486    position: relative;
2487    display: flex;
2488    justify-content: flex-start;
2489  }
2490
2491  button:hover:enabled,
2492  button:active:enabled {
2493    background-color: transparent !important;
2494  }
2495
2496  button:hover:enabled > wui-icon,
2497  button:active:enabled > wui-icon {
2498    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
2499    color: var(--wui-color-fg-125);
2500  }
2501
2502  button:hover:enabled > wui-text,
2503  button:active:enabled > wui-text {
2504    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
2505    color: var(--wui-color-fg-125);
2506  }
2507
2508  button {
2509    border-radius: var(--wui-border-radius-3xl);
2510  }
2511`;var dl=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ho=class extends oe{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`
2512      --local-tab: ${this.activeTab};
2513      --local-tab-width: ${this.localTabWidth};
2514    `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,r)=>{var i;const n=r===this.activeTab;return q`
2515        <button
2516          ?disabled=${this.disabled}
2517          @click=${()=>this.onTabClick(r)}
2518          data-active=${n}
2519          data-testid="tab-${(i=e.label)==null?void 0:i.toLowerCase()}"
2520        >
2521          ${this.iconTemplate(e)}
2522          <wui-text variant="small-600" color="inherit"> ${e.label} </wui-text>
2523        </button>
2524      `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?q`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,r){const n=this.buttons[this.activeTab],i=this.buttons[e],s=n==null?void 0:n.querySelector("wui-text"),o=i==null?void 0:i.querySelector("wui-text"),a=i==null?void 0:i.getBoundingClientRect(),c=o==null?void 0:o.getBoundingClientRect();n&&s&&!r&&e!==this.activeTab&&(s.animate([{opacity:0}
2524],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&a&&c&&o&&(e!==this.activeTab||r)&&(this.localTabWidth=`${Math.round(a.width+c.width)+6}px`,i.animate([{width:`${a.width+c.width}px`}],{duration:r?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:r?0:125,delay:r?0:200,fill:"forwards",easing:"ease"}))}};Ho.styles=[bt,fn,T5e];dl([D({type:Array})],Ho.prototype,"tabs",void 0);dl([D()],Ho.prototype,"onTabChange",void 0);dl([D({type:Array})],Ho.prototype,"buttons",void 0);dl([D({type:Boolean})],Ho.prototype,"disabled",void 0);dl([D()],Ho.prototype,"localTabWidth",void 0);dl([Qu()],Ho.prototype,"activeTab",void 0);dl([Qu()],Ho.prototype,"isDense",void 0);Ho=dl([mt("wui-tabs")],Ho);const O5e=ne`
2525  :host {
2526    display: flex;
2527  }
2528
2529  :host([data-size='sm']) > svg {
2530    width: 12px;
2531    height: 12px;
2532  }
2533
2534  :host([data-size='md']) > svg {
2535    width: 16px;
2536    height: 16px;
2537  }
2538
2539  :host([data-size='lg']) > svg {
2540    width: 24px;
2541    height: 24px;
2542  }
2543
2544  :host([data-size='xl']) > svg {
2545    width: 32px;
2546    height: 32px;
2547  }
2548
2549  svg {
2550    animation: rotate 2s linear infinite;
2551  }
2552
2553  circle {
2554    fill: none;
2555    stroke: var(--local-color);
2556    stroke-width: 4px;
2557    stroke-dasharray: 1, 124;
2558    stroke-dashoffset: 0;
2559    stroke-linecap: round;
2560    animation: dash 1.5s ease-in-out infinite;
2561  }
2562
2563  :host([data-size='md']) > svg > circle {
2564    stroke-width: 6px;
2565  }
2566
2567  :host([data-size='sm']) > svg > circle {
2568    stroke-width: 8px;
2569  }
2570
2571  @keyframes rotate {
2572    100% {
2573      transform: rotate(360deg);
2574    }
2575  }
2576
2577  @keyframes dash {
2578    0% {
2579      stroke-dasharray: 1, 124;
2580      stroke-dashoffset: 0;
2581    }
2582
2583    50% {
2584      stroke-dasharray: 90, 124;
2585      stroke-dashoffset: -35;
2586    }
2587
2588    100% {
2589      stroke-dashoffset: -125;
2590    }
2591  }
2592`;var S8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let J1=class extends oe{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: ${this.color==="inherit"?"inherit":`var(--wui-color-${this.color})`}`,this.dataset.size=this.size,q`<svg viewBox="25 25 50 50">
2593      <circle r="20" cy="50" cx="50"></circle>
2594    </svg>`}};J1.styles=[bt,O5e];S8([D()],J1.prototype,"color",void 0);S8([D()],J1.prototype,"size",void 0);J1=S8([mt("wui-loading-spinner")],J1);const N5e=ne`
2595  :host {
2596    width: var(--local-width);
2597    position: relative;
2598  }
2599
2600  button {
2601    border: none;
2602    border-radius: var(--local-border-radius);
2603    width: var(--local-width);
2604    white-space: nowrap;
2605  }
2606
2607  /* -- Sizes --------------------------------------------------- */
2608  button[data-size='md'] {
2609    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
2610    height: 36px;
2611  }
2612
2613  button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
2614    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
2615  }
2616
2617  button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
2618    padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
2619  }
2620
2621  button[data-size='lg'] {
2622    padding: var(--wui-spacing-m) var(--wui-spacing-2l);
2623    height: 48px;
2624  }
2625
2626  /* -- Variants --------------------------------------------------------- */
2627  button[data-variant='main'] {
2628    background-color: var(--wui-color-accent-100);
2629    color: var(--wui-color-inverse-100);
2630    border: none;
2631    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
2632  }
2633
2634  button[data-variant='inverse'] {
2635    background-color: var(--wui-color-inverse-100);
2636    color: var(--wui-color-inverse-000);
2637    border: none;
2638    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
2639  }
2640
2641  button[data-variant='accent'] {
2642    background-color: var(--wui-color-accent-glass-010);
2643    color: var(--wui-color-accent-100);
2644    border: none;
2645    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
2646  }
2647
2648  button[data-variant='accent-error'] {
2649    background: var(--wui-color-error-glass-015);
2650    color: var(--wui-color-error-100);
2651    border: none;
2652    box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);
2653  }
2654
2655  button[data-variant='accent-success'] {
2656    background: var(--wui-color-success-glass-015);
2657    color: var(--wui-color-success-100);
2658    border: none;
2659    box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);
2660  }
2661
2662  button[data-variant='neutral'] {
2663    background: transparent;
2664    color: var(--wui-color-fg-100);
2665    border: none;
2666    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
2667  }
2668
2669  /* -- Focus states --------------------------------------------------- */
2670  button[data-variant='main']:focus-visible:enabled {
2671    background-color: var(--wui-color-accent-090);
2672    box-shadow:
2673      inset 0 0 0 1px var(--wui-color-accent-100),
2674      0 0 0 4px var(--wui-color-accent-glass-020);
2675  }
2676  button[data-variant='inverse']:focus-visible:enabled {
2677    background-color: var(--wui-color-inverse-100);
2678    box-shadow:
2679      inset 0 0 0 1px var(--wui-color-gray-glass-010),
2680      0 0 0 4px var(--wui-color-accent-glass-020);
2681  }
2682  button[data-variant='accent']:focus-visible:enabled {
2683    background-color: var(--wui-color-accent-glass-010);
2684    box-shadow:
2685      inset 0 0 0 1px var(--wui-color-accent-100),
2686      0 0 0 4px var(--wui-color-accent-glass-020);
2687  }
2688  button[data-variant='accent-error']:focus-visible:enabled {
2689    background: var(--wui-color-error-glass-015);
2690    box-shadow:
2691      inset 0 0 0 1px var(--wui-color-error-100),
2692      0 0 0 4px var(--wui-color-error-glass-020);
2693  }
2694  button[data-variant='accent-success']:focus-visible:enabled {
2695    background: var(--wui-color-success-glass-015);
2696    box-shadow:
2697      inset 0 0 0 1px var(--wui-color-success-100),
2698      0 0 0 4px var(--wui-color-success-glass-020);
2699  }
2700  button[data-variant='neutral']:focus-visible:enabled {
2701    background: var(--wui-color-gray-glass-005);
2702    box-shadow:
2703      inset 0 0 0 1px var(--wui-color-gray-glass-010),
2704      0 0 0 4px var(--wui-color-gray-glass-002);
2705  }
2706
2707  /* -- Hover & Active states ----------------------------------------------------------- */
2708  @media (hover: hover) and (pointer: fine) {
2709    button[data-variant='main']:hover:enabled {
2710      background-color: var(--wui-color-accent-090);
2711    }
2712
2713    button[data-variant='main']:active:enabled {
2714      background-color: var(--wui-color-accent-080);
2715    }
2716
2717    button[data-variant='accent']:hover:enabled {
2718      background-color: var(--wui-color-accent-glass-015);
2719    }
2720
2721    button[data-variant='accent']:active:enabled {
2722      background-color: var(--wui-color-accent-glass-020);
2723    }
2724
2725    button[data-variant='accent-error']:hover:enabled {
2726      background: var(--wui-color-error-glass-020);
2727      color: var(--wui-color-error-100);
2728    }
2729
2730    button[data-variant='accent-error']:active:enabled {
2731      background: var(--wui-color-error-glass-030);
2732      color: var(--wui-color-error-100);
2733    }
2734
2735    button[data-variant='accent-success']:hover:enabled {
2736      background: var(--wui-color-success-glass-020);
2737      color: var(--wui-color-success-100);
2738    }
2739
2740    button[data-variant='accent-success']:active:enabled {
2741      background: var(--wui-color-success-glass-030);
2742      color: var(--wui-color-success-100);
2743    }
2744
2745    button[data-variant='neutral']:hover:enabled {
2746      background: var(--wui-color-gray-glass-002);
2747    }
2748
2749    button[data-variant='neutral']:active:enabled {
2750      background: var(--wui-color-gray-glass-005);
2751    }
2752
2753    button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
2754      padding-left: var(--wui-spacing-m);
2755    }
2756
2757    button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
2758      padding-right: var(--wui-spacing-m);
2759    }
2760  }
2761
2762  /* -- Disabled state --------------------------------------------------- */
2763  button:disabled {
2764    background-color: var(--wui-color-gray-glass-002);
2765    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
2766    color: var(--wui-color-gray-glass-020);
2767    cursor: not-allowed;
2768  }
2769
2770  button > wui-text {
2771    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
2772    will-change: opacity;
2773    opacity: var(--local-opacity-100);
2774  }
2775
2776  ::slotted(*) {
2777    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
2778    will-change: opacity;
2779    opacity: var(--local-opacity-100);
2780  }
2781
2782  wui-loading-spinner {
2783    position: absolute;
2784    left: 50%;
2785    top: 50%;
2786    transform: translate(-50%, -50%);
2787    opacity: var(--local-opacity-000);
2788  }
2789`;var Zo=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const NS={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},k5e={lg:"paragraph-600",md:"small-600"},R5e={lg:"md",md:"md"};let ws=class extends oe{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`
2790    --local-width: ${this.fullWidth?"100%":"auto"};
2791    --local-opacity-100: ${this.loading?0:1};
2792    --local-opacity-000: ${this.loading?1:0};
2793    --local-border-radius: var(--wui-border-radius-${this.borderRadius});
2794    `;const e=this.textVariant??k5e[this.size];return q`
2795      <button
2796        data-variant=${this.variant}
2797        data-icon-left=${this.hasIconLeft}
2798        data-icon-right=${this.hasIconRight}
2799        data-size=${this.size}
2800        ?disabled=${this.disabled}
2801      >
2802        ${this.loadingTemplate()}
2803        <slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot>
2804        <wui-text variant=${e} color="inherit">
2805          <slot></slot>
2806        </wui-text>
2807        <slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot>
2808      </button>
2809    `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const e=R5e[this.size],r=this.disabled?NS.disabled:NS[this.variant];return q`<wui-loading-spinner color=${r} size=${e}></wui-loading-spinner>`}return q``}};ws.styles=[bt,fn,N5e];Zo([D()],ws.prototype,"size",void 0);Zo([D({type:Boolean})],ws.prototype,"disabled",void 0);Zo([D({type:Boolean})],ws.prototype,"fullWidth",void 0);Zo([D({type:Boolean})],ws.prototype,"loading",void 0);Zo([D()],ws.prototype,"variant",void 0);Zo([D({type:Boolean})],ws.prototype,"hasIconLeft",void 0);Zo([D({type:Boolean})],ws.prototype,"hasIconRight",void 0);Zo([D()],ws.prototype,"borderRadius",void 0);Zo([D()],ws.prototype,"textVariant",void 0);ws=Zo([mt("wui-button")],ws);const B5e=ne`
2810  button {
2811    padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
2812    border-radius: var(--wui-border-radius-3xs);
2813    background-color: transparent;
2814    color: var(--wui-color-accent-100);
2815  }
2816
2817  button:disabled {
2818    background-color: transparent;
2819    color: var(--wui-color-gray-glass-015);
2820  }
2821
2822  button:hover {
2823    background-color: var(--wui-color-gray-glass-005);
2824  }
2825`;var $m=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let t0=class extends oe{constructor(){super(...arguments),this.tabIdx=void 0,this.disabled=!1,this.color="inherit"}render(){return q`
2826      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
2827        <slot name="iconLeft"></slot>
2828        <wui-text variant="small-600" color=${this.color}>
2829          <slot></slot>
2830        </wui-text>
2831        <slot name="iconRight"></slot>
2832      </button>
2833    `}};t0.styles=[bt,fn,B5e];$m([D()],t0.prototype,"tabIdx",void 0);$m([D({type:Boolean})],t0.prototype,"disabled",void 0);$m([D()],t0.prototype,"color",void 0);
2833t0=$m([mt("wui-link")],t0);const D5e=ne`
2834  :host {
2835    display: block;
2836    width: var(--wui-box-size-md);
2837    height: var(--wui-box-size-md);
2838  }
2839
2840  svg {
2841    width: var(--wui-box-size-md);
2842    height: var(--wui-box-size-md);
2843  }
2844
2845  rect {
2846    fill: none;
2847    stroke: var(--wui-color-accent-100);
2848    stroke-width: 4px;
2849    stroke-linecap: round;
2850    animation: dash 1s linear infinite;
2851  }
2852
2853  @keyframes dash {
2854    to {
2855      stroke-dashoffset: 0px;
2856    }
2857  }
2858`;var rB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let cw=class extends oe{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,n=36-e,i=116+n,s=245+n,o=360+n*1.75;return q`
2859      <svg viewBox="0 0 110 110" width="110" height="110">
2860        <rect
2861          x="2"
2862          y="2"
2863          width="106"
2864          height="106"
2865          rx=${e}
2866          stroke-dasharray="${i} ${s}"
2867          stroke-dashoffset=${o}
2868        />
2869      </svg>
2870    `}};cw.styles=[bt,D5e];rB([D({type:Number})],cw.prototype,"radius",void 0);cw=rB([mt("wui-loading-thumbnail")],cw);const L5e=ne`
2871  button {
2872    border: none;
2873    border-radius: var(--wui-border-radius-3xl);
2874  }
2875
2876  button[data-variant='main'] {
2877    background-color: var(--wui-color-accent-100);
2878    color: var(--wui-color-inverse-100);
2879    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
2880  }
2881
2882  button[data-variant='accent'] {
2883    background-color: var(--wui-color-accent-glass-010);
2884    color: var(--wui-color-accent-100);
2885    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
2886  }
2887
2888  button[data-variant='gray'] {
2889    background-color: transparent;
2890    color: var(--wui-color-fg-200);
2891    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
2892  }
2893
2894  button[data-variant='shade'] {
2895    background-color: transparent;
2896    color: var(--wui-color-accent-100);
2897    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
2898  }
2899
2900  button[data-size='sm'] {
2901    height: 32px;
2902    padding: 0 var(--wui-spacing-s);
2903  }
2904
2905  button[data-size='md'] {
2906    height: 40px;
2907    padding: 0 var(--wui-spacing-l);
2908  }
2909
2910  button[data-size='sm'] > wui-image {
2911    width: 16px;
2912    height: 16px;
2913  }
2914
2915  button[data-size='md'] > wui-image {
2916    width: 24px;
2917    height: 24px;
2918  }
2919
2920  button[data-size='sm'] > wui-icon {
2921    width: 12px;
2922    height: 12px;
2923  }
2924
2925  button[data-size='md'] > wui-icon {
2926    width: 14px;
2927    height: 14px;
2928  }
2929
2930  wui-image {
2931    border-radius: var(--wui-border-radius-3xl);
2932    overflow: hidden;
2933  }
2934
2935  button.disabled > wui-icon,
2936  button.disabled > wui-image {
2937    filter: grayscale(1);
2938  }
2939
2940  button[data-variant='main'] > wui-image {
2941    box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
2942  }
2943
2944  button[data-variant='shade'] > wui-image,
2945  button[data-variant='gray'] > wui-image {
2946    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
2947  }
2948
2949  @media (hover: hover) and (pointer: fine) {
2950    button[data-variant='main']:focus-visible {
2951      background-color: var(--wui-color-accent-090);
2952    }
2953
2954    button[data-variant='main']:hover:enabled {
2955      background-color: var(--wui-color-accent-090);
2956    }
2957
2958    button[data-variant='main']:active:enabled {
2959      background-color: var(--wui-color-accent-080);
2960    }
2961
2962    button[data-variant='accent']:hover:enabled {
2963      background-color: var(--wui-color-accent-glass-015);
2964    }
2965
2966    button[data-variant='accent']:active:enabled {
2967      background-color: var(--wui-color-accent-glass-020);
2968    }
2969
2970    button[data-variant='shade']:focus-visible,
2971    button[data-variant='gray']:focus-visible,
2972    button[data-variant='shade']:hover,
2973    button[data-variant='gray']:hover {
2974      background-color: var(--wui-color-gray-glass-002);
2975    }
2976
2977    button[data-variant='gray']:active,
2978    button[data-variant='shade']:active {
2979      background-color: var(--wui-color-gray-glass-005);
2980    }
2981  }
2982
2983  button.disabled {
2984    color: var(--wui-color-gray-glass-020);
2985    background-color: var(--wui-color-gray-glass-002);
2986    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
2987    pointer-events: none;
2988  }
2989`;var td=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
2989a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Wa=class extends oe{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const e=this.size==="sm"?"small-600":"paragraph-600";return q`
2990      <button
2991        class=${this.disabled?"disabled":""}
2992        data-variant=${this.variant}
2993        data-size=${this.size}
2994      >
2995        ${this.imageSrc?q`<wui-image src=${this.imageSrc}></wui-image>`:null}
2996        <wui-text variant=${e} color="inherit"> ${this.text} </wui-text>
2997        <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
2998      </button>
2999    `}};Wa.styles=[bt,fn,L5e];td([D()],Wa.prototype,"variant",void 0);td([D()],Wa.prototype,"imageSrc",void 0);td([D({type:Boolean})],Wa.prototype,"disabled",void 0);td([D()],Wa.prototype,"icon",void 0);td([D()],Wa.prototype,"size",void 0);td([D()],Wa.prototype,"text",void 0);Wa=td([mt("wui-chip-button")],Wa);const M5e=ne`
3000  wui-flex {
3001    width: 100%;
3002    background-color: var(--wui-color-gray-glass-002);
3003    border-radius: var(--wui-border-radius-xs);
3004  }
3005`;var Am=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let r0=class extends oe{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return q`
3006      <wui-flex
3007        justifyContent="space-between"
3008        alignItems="center"
3009        .padding=${["1xs","2l","1xs","2l"]}
3010      >
3011        <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
3012        <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight">
3013        </wui-chip-button>
3014      </wui-flex>
3015    `}};r0.styles=[bt,fn,M5e];Am([D({type:Boolean})],r0.prototype,"disabled",void 0);Am([D()],r0.prototype,"label",void 0);Am([D()],r0.prototype,"buttonLabel",void 0);r0=Am([mt("wui-cta-button")],r0);var eh={},sy,kS;function U5e(){return kS||(kS=1,sy=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),sy}var oy={},Pc={},RS;function rd(){if(RS)return Pc;RS=1;let t;const e=[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];return Pc.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},Pc.getSymbolTotalCodewords=function(n){return e[n]},Pc.getBCHDigit=function(r){let n=0;for(;r!==0;)n++,r>>>=1;return n},Pc.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');t=n},Pc.isKanjiModeEnabled=function(){return typeof t<"u"},Pc.toSJIS=function(n){return t(n)},Pc}var ay={},BS;function I8(){return BS||(BS=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.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: "+r)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,i){if(t.isValid(n))return n;try{return e(n)}catch{return i}}}(ay)),ay}var cy,DS;function j5e(){if(DS)return cy;DS=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const r=Math.floor(e/8);return(this.buffer[r]>>>7-e%8&1)===1},put:function(e,r){for(let n=0;n<r;n++)this.putBit((e>>>r-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),e&&(this.buffer[r]|=128>>>this.length%8),this.length++}},cy=t,cy}var ly,LS;function z5e(){if(LS)return ly;LS=1;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)}return t.prototype.set=function(e,r,n,i){const s=e*this.size+r;this.data[s]=n,i&&(this.reservedBit[s]=!0)},t.prototype.get=function(e,r){return this.data[e*this.size+r]},t.prototype.xor=function(e,r,n){this.data[e*this.size+r]^=n},t.prototype.isReserved=function(e,r){return this.reservedBit[e*this.size+r]},ly=t,ly}var uy={},MS;function F5e(){return MS||(MS=1,function(t){const e=rd().getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,s=e(n),o=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},t.getPositions=function(n){const i=[],s=t.getRowColCoords(n),o=s.length;for(let a=0;a<o;a++)for(let c=0;c<o;
vendor: 4,753 bytes, line 3015
3015c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||i.push([s[a],s[c]]);return i}}(uy)),uy}var dy={},US;function q5e(){if(US)return dy;US=1;const t=rd().getSymbolSize,e=7;return dy.getPositions=function(n){const i=t(n);return[[0,0],[i-e,0],[0,i-e]]},dy}var hy={},jS;function H5e(){return jS||(jS=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const s=i.size;let o=0,a=0,c=0,l=null,u=null;for(let d=0;d<s;d++){a=c=0,l=u=null;for(let h=0;h<s;h++){let f=i.get(d,h);f===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=f,a=1),f=i.get(h,d),f===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=f,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},t.getPenaltyN2=function(i){const s=i.size;let o=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const l=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},t.getPenaltyN3=function(i){const s=i.size;let o=0,a=0,c=0;for(let l=0;l<s;l++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|i.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|i.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},t.getPenaltyN4=function(i){let s=0;const o=i.data.length;for(let c=0;c<o;c++)s+=i.data[c];return Math.abs(Math.ceil(s*100/o/5)-10)*e.N4};function r(n,i,s){switch(n){case t.Patterns.PATTERN000:return(i+s)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(i+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return i*s%2+i*s%3===0;case t.Patterns.PATTERN110:return(i*s%2+i*s%3)%2===0;case t.Patterns.PATTERN111:return(i*s%3+(i+s)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(i,s){const o=s.size;for(let a=0;a<o;a++)for(let c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,r(i,c,a))},t.getBestMask=function(i,s){const o=Object.keys(t.Patterns).length;let a=0,c=1/0;for(let l=0;l<o;l++){s(l),t.applyMask(l,i);const u=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(l,i),u<c&&(c=u,a=l)}return a}}(hy)),hy}var t2={},zS;function nB(){if(zS)return t2;zS=1;const t=I8(),e=[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],r=[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];return t2.getBlocksCount=function(i,s){switch(s){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},t2.getTotalCodewordsCount=function(i,s){switch(s){case t.L:return r[(i-1)*4+0];case t.M:return r[(i-1)*4+1];case t.Q:return r[(i-1)*4+2];case t.H:return r[(i-1)*4+3];default:return}},t2}var fy={},Ef={},FS;function V5e(){if(FS)return Ef;FS=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let i=0;i<255;i++)t[i]=n,e[n]=i,n<<=1,n&256&&(n^=285);for(let i=255;i<512;i++)t[i]=t[i-255]}(),Ef.log=function(n){if(n<1)throw new Error("log("+n+")");return e[n]},Ef.exp=function(n){return t[n]},Ef.mul=function(n,i){return n===0||i===0?0:t[e[n]+e[i]]},Ef}var qS;function W5e(){return qS||(qS=1,function(t){const e=V5e();t.mul=function(n,i){const s=new Uint8Array(n.length+i.length-1);for(let o=0;o<n.length;o++)for(let a=0;a<i.length;a++)s[o+a]^=e.mul(n[o],i[a]);return s},t.mod=function(n,i){let s=new Uint8Array(n);for(;s.length-i.length>=0;){const o=s[0];for(let c=0;c<i.length;c++)s[c]^=e.mul(i[c],o);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},t.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let s=0;s<n;s++)i=t.mul(i,new Uint8Array([1,e.exp(s)]));return i}}(fy)),fy}var py,HS;
vendor: 10,192 bytes, lines 3015-3018
3015function K5e(){if(HS)return py;HS=1;const t=W5e();function e(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(n.length+this.degree);i.set(n);const s=t.mod(i,this.genPoly),o=this.degree-s.length;if(o>0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},py=e,py}var gy={},wy={},my={},VS;function iB(){return VS||(VS=1,my.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),my}var bo={},WS;function sB(){if(WS)return bo;WS=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";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 n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
3016]))+`;bo.KANJI=new RegExp(r,"g"),bo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),bo.BYTE=new RegExp(n,"g"),bo.NUMERIC=new RegExp(t,"g"),bo.ALPHANUMERIC=new RegExp(e,"g");const i=new RegExp("^"+r+"$"),s=new RegExp("^"+t+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return bo.testKanji=function(c){return i.test(c)},bo.testNumeric=function(c){return s.test(c)},bo.testAlphanumeric=function(c){return o.test(c)},bo}var KS;function nd(){return KS||(KS=1,function(t){const e=iB(),r=sB();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(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return r.testNumeric(s)?t.NUMERIC:r.testAlphanumeric(s)?t.ALPHANUMERIC:r.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.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: "+i)}}t.from=function(s,o){if(t.isValid(s))return s;try{return n(s)}catch{return o}}}(wy)),wy}var ZS;function Z5e(){return ZS||(ZS=1,function(t){const e=rd(),r=nB(),n=I8(),i=nd(),s=iB(),o=7973,a=e.getBCHDigit(o);function c(h,f,g){for(let p=1;p<=40;p++)if(f<=t.getCapacity(p,g,h))return p}function l(h,f){return i.getCharCountIndicator(h,f)+4}function u(h,f){let g=0;return h.forEach(function(p){const w=l(p.mode,f);g+=w+p.getBitsLength()}),g}function d(h,f){for(let g=1;g<=40;g++)if(u(h,g)<=t.getCapacity(g,f,i.MIXED))return g}t.from=function(f,g){return s.isValid(f)?parseInt(f,10):g},t.getCapacity=function(f,g,p){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=i.BYTE);const w=e.getSymbolTotalCodewords(f),m=r.getTotalCodewordsCount(f,g),b=(w-m)*8;if(p===i.MIXED)return b;const v=b-l(p,f);switch(p){case i.NUMERIC:return Math.floor(v/10*3);case i.ALPHANUMERIC:return Math.floor(v/11*2);case i.KANJI:return Math.floor(v/13);case i.BYTE:default:return Math.floor(v/8)}},t.getBestVersionForData=function(f,g){let p;const w=n.from(g,n.M);if(Array.isArray(f)){if(f.length>1)return d(f,w);if(f.length===0)return 1;p=f[0]}else p=f;return c(p.mode,p.getLength(),w)},t.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let g=f<<12;for(;e.getBCHDigit(g)-a>=0;)g^=o<<e.getBCHDigit(g)-a;return f<<12|g}}(gy)),gy}var yy={},GS;function G5e(){if(GS)return yy;GS=1;const t=rd(),e=1335,r=21522,n=t.getBCHDigit(e);return yy.getEncodedBits=function(s,o){const a=s.bit<<3|o;let c=a<<10;for(;t.getBCHDigit(c)-n>=0;)c^=e<<t.getBCHDigit(c)-n;return(a<<10|c)^r},yy}var by={},vy,YS;function Y5e(){if(YS)return vy;YS=1;const t=nd();function e(r){this.mode=t.NUMERIC,this.data=r.toString()}return e.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(n){let i,s,o;for(i=0;i+3<=this.data.length;i+=3)s=this.data.substr(i,3),o=parseInt(s,10),n.put(o,10);const a=this.data.length-i;a>0&&(s=this.data.substr(i),o=parseInt(s,10),n.put(o,a*3+1))},vy=e,vy}var Ey,JS;function J5e(){if(JS)return Ey;JS=1;const t=nd(),e=["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 r(n){this.mode=t.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(i){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),i.put(o,11)}this.data.length%2&&i.put(e.indexOf(this.data[s]),6)},Ey=r,Ey}var Cy,XS;function oB(){return XS||(XS=1,Cy=function(e){for(var r=[],n=e.length,i=0;i<n;i++){var s=e.charCodeAt(i);if(s>=55296&&s<=56319&&n>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){r.push(s);continue}if(s<2048){r.push(s>>6|192),r.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);continue}if(s>=65536&&s<=1114111){r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}),Cy}var xy,QS;function X5e(){if(QS)return xy;QS=1;const t=oB(),e=nd();function r(n){this.mode=e.BYTE,typeof n=="string"&&(n=t(n)),this.data=new Uint8Array(n)}return r.getBitsLength=function(i){return i*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){for(let i=0,s=this.data.length;i<s;i++)n.put(this.data[i],8)},xy=r,xy}var _y,eI;function Q5e(){if(eI)return _y;eI=1;const t=nd(),e=rd();function r(n){this.mode=t.KANJI,this.data=n}return r.getBitsLength=function(i){return i*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let i;for(i=0;i<this.data.length;i++){let s=e.toSJIS(this.data[i]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
3017Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),n.put(s,13)}},_y=r,_y}var tI;function eye(){return tI||(tI=1,function(t){const e=nd(),r=Y5e(),n=J5e(),i=X5e(),s=Q5e(),o=sB(),a=rd(),c=jN();function l(m){return unescape(encodeURIComponent(m)).length}function u(m,b,v){const E=[];let I;for(;(I=m.exec(v))!==null;)E.push({data:I[0],index:I.index,mode:b,length:I[0].length});return E}function d(m){const b=u(o.NUMERIC,e.NUMERIC,m),v=u(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let E,I;return a.isKanjiModeEnabled()?(E=u(o.BYTE,e.BYTE,m),I=u(o.KANJI,e.KANJI,m)):(E=u(o.BYTE_KANJI,e.BYTE,m),I=[]),b.concat(v,E,I).sort(function(A,P){return A.index-P.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function h(m,b){switch(b){case e.NUMERIC:return r.getBitsLength(m);case e.ALPHANUMERIC:return n.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return i.getBitsLength(m)}}function f(m){return m.reduce(function(b,v){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===v.mode?(b[b.length-1].data+=v.data,b):(b.push(v),b)},[])}function g(m){const b=[];for(let v=0;v<m.length;v++){const E=m[v];switch(E.mode){case e.NUMERIC:b.push([E,{data:E.data,mode:e.ALPHANUMERIC,length:E.length},{data:E.data,mode:e.BYTE,length:E.length}]);break;case e.ALPHANUMERIC:b.push([E,{data:E.data,mode:e.BYTE,length:E.length}]);break;case e.KANJI:b.push([E,{data:E.data,mode:e.BYTE,length:l(E.data)}]);break;case e.BYTE:b.push([{data:E.data,mode:e.BYTE,length:l(E.data)}])}}return b}function p(m,b){const v={},E={start:{}};let I=["start"];for(let _=0;_<m.length;_++){const A=m[_],P=[];for(let y=0;y<A.length;y++){const O=A[y],S=""+_+y;P.push(S),v[S]={node:O,lastCount:0},E[S]={};for(let k=0;k<I.length;k++){const L=I[k];v[L]&&v[L].node.mode===O.mode?(E[L][S]=h(v[L].lastCount+O.length,O.mode)-h(v[L].lastCount,O.mode),v[L].lastCount+=O.length):(v[L]&&(v[L].lastCount=O.length),E[L][S]=h(O.length,O.mode)+4+e.getCharCountIndicator(O.mode,b))}}I=P}for(let _=0;_<I.length;_++)E[I[_]].end=0;return{map:E,table:v}}function w(m,b){let v;const E=e.getBestModeForData(m);if(v=e.from(b,E),v!==e.BYTE&&v.bit<E.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(v)+`.
3018 Suggested mode is: `+e.toString(E));switch(v===e.KANJI&&!a.isKanjiModeEnabled()&&(v=e.BYTE),v){case e.NUMERIC:return new r(m);case e.ALPHANUMERIC:return new n(m);case e.KANJI:return new s(m);case e.BYTE:return new i(m)}}t.fromArray=function(b){return b.reduce(function(v,E){return typeof E=="string"?v.push(w(E,null)):E.data&&v.push(w(E.data,E.mode)),v},[])},t.fromString=function(b,v){const E=d(b,a.isKanjiModeEnabled()),I=g(E),_=p(I,v),A=c.find_path(_.map,"start","end"),P=[];for(let y=1;y<A.length-1;y++)P.push(_.table[A[y]].node);return t.fromArray(f(P))},t.rawSplit=function(b){return t.fromArray(d(b,a.isKanjiModeEnabled()))}}(by)),by}var rI;function tye(){if(rI)return oy;rI=1;const t=rd(),e=I8(),r=j5e(),n=z5e(),i=F5e(),s=q5e(),o=H5e(),a=nB(),c=K5e(),l=Z5e(),u=G5e(),d=nd(),h=eye();function f(_,A){const P=_.size,y=s.getPositions(A);for(let O=0;O<y.length;O++){const S=y[O][0],k=y[O][1];for(let L=-1;L<=7;L++)if(!(S+L<=-1||P<=S+L))for(let T=-1;T<=7;T++)k+T<=-1||P<=k+T||(L>=0&&L<=6&&(T===0||T===6)||T>=0&&T<=6&&(L===0||L===6)||L>=2&&L<=4&&T>=2&&T<=4?_.set(S+L,k+T,!0,!0):_.set(S+L,k+T,!1,!0))}}function g(_){const A=_.size;
vendor: 3,671 bytes, lines 3018-3021
3018for(let P=8;P<A-8;P++){const y=P%2===0;_.set(P,6,y,!0),_.set(6,P,y,!0)}}function p(_,A){const P=i.getPositions(A);for(let y=0;y<P.length;y++){const O=P[y][0],S=P[y][1];for(let k=-2;k<=2;k++)for(let L=-2;L<=2;L++)k===-2||k===2||L===-2||L===2||k===0&&L===0?_.set(O+k,S+L,!0,!0):_.set(O+k,S+L,!1,!0)}}function w(_,A){const P=_.size,y=l.getEncodedBits(A);let O,S,k;for(let L=0;L<18;L++)O=Math.floor(L/3),S=L%3+P-8-3,k=(y>>L&1)===1,_.set(O,S,k,!0),_.set(S,O,k,!0)}function m(_,A,P){const y=_.size,O=u.getEncodedBits(A,P);let S,k;for(S=0;S<15;S++)k=(O>>S&1)===1,S<6?_.set(S,8,k,!0):S<8?_.set(S+1,8,k,!0):_.set(y-15+S,8,k,!0),S<8?_.set(8,y-S-1,k,!0):S<9?_.set(8,15-S-1+1,k,!0):_.set(8,15-S-1,k,!0);_.set(y-8,8,1,!0)}function b(_,A){const P=_.size;let y=-1,O=P-1,S=7,k=0;for(let L=P-1;L>0;L-=2)for(L===6&&L--;;){for(let T=0;T<2;T++)if(!_.isReserved(O,L-T)){let C=!1;k<A.length&&(C=(A[k]>>>S&1)===1),_.set(O,L-T,C),S--,S===-1&&(k++,S=7)}if(O+=y,O<0||P<=O){O-=y,y=-y;break}}}function v(_,A,P){const y=new r;P.forEach(function(T){y.put(T.mode.bit,4),y.put(T.getLength(),d.getCharCountIndicator(T.mode,_)),T.write(y)});const O=t.getSymbolTotalCodewords(_),S=a.getTotalCodewordsCount(_,A),k=(O-S)*8;for(y.getLengthInBits()+4<=k&&y.put(0,4);y.getLengthInBits()%8!==0;)y.putBit(0);const L=(k-y.getLengthInBits())/8;for(let T=0;T<L;T++)y.put(T%2?17:236,8);return E(y,_,A)}function E(_,A,P){const y=t.getSymbolTotalCodewords(A),O=a.getTotalCodewordsCount(A,P),S=y-O,k=a.getBlocksCount(A,P),L=y%k,T=k-L,C=Math.floor(y/k),x=Math.floor(S/k),B=x+1,R=C-x,M=new c(R);let U=0;const z=new Array(k),H=new Array(k);let Y=0;const V=new Uint8Array(_.buffer);for(let ae=0;ae<k;ae++){const be=ae<T?x:B;z[ae]=V.slice(U,U+be),H[ae]=M.encode(z[ae]),U+=be,Y=Math.max(Y,be)}const G=new Uint8Array(y);let re=0,de,ce;for(de=0;de<Y;de++)for(ce=0;ce<k;ce++)de<z[ce].length&&(G[re++]=z[ce][de]);for(de=0;de<R;de++)for(ce=0;ce<k;ce++)G[re++]=H[ce][de];return G}function I(_,A,P,y){let O;if(Array.isArray(_))O=h.fromArray(_);else if(typeof _=="string"){let C=A;if(!C){const x=h.rawSplit(_);C=l.getBestVersionForData(x,P)}O=h.fromString(_,C||40)}else throw new Error("Invalid data");const S=l.getBestVersionForData(O,P);if(!S)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=S;else if(A<S)throw new Error(`
3019The chosen QR Code version cannot contain this amount of data.
3020Minimum version required to store current data is: `+S+`.
3021`);const k=v(A,P,O),L=t.getSymbolSize(A),T=new n(L);return f(T,A),g(T),p(T,A),m(T,P,0),A>=7&&w(T,A),b(T,k),isNaN(y)&&(y=o.getBestMask(T,m.bind(null,T,P))),o.applyMask(y,T),m(T,P,y),{modules:T,version:A,errorCorrectionLevel:P,maskPattern:y,segments:O}}return oy.create=function(A,P){if(typeof A>"u"||A==="")throw new Error("No input text");let y=e.M,O,S;return typeof P<"u"&&(y=e.from(P.errorCorrectionLevel,e.M),O=l.from(P.version),S=o.from(P.maskPattern),P.toSJISFunc&&t.setToSJISFunction(P.toSJISFunc)),I(A,O,y,S)},oy}var Sy={},Iy={},nI;function aB(){return nI||(nI=1,function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,o=n.scale||4;
3021return{width:s,scale:s?4:o,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},t.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},t.getImageWidth=function(n,i){const s=t.getScale(n,i);return Math.floor((n+i.margin*2)*s)},t.qrToImageData=function(n,i,s){const o=i.modules.size,a=i.modules.data,c=t.getScale(o,s),l=Math.floor((o+s.margin*2)*c),u=s.margin*c,d=[s.color.light,s.color.dark];for(let h=0;h<l;h++)for(let f=0;f<l;f++){let g=(h*l+f)*4,p=s.color.light;if(h>=u&&f>=u&&h<l-u&&f<l-u){const w=Math.floor((h-u)/c),m=Math.floor((f-u)/c);p=d[a[w*o+m]?1:0]}n[g++]=p.r,n[g++]=p.g,n[g++]=p.b,n[g]=p.a}}}(Iy)),Iy}var iI;function rye(){return iI||(iI=1,function(t){const e=aB();function r(i,s,o){i.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=o,s.width=o,s.style.height=o+"px",s.style.width=o+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(s,o,a){let c=a,l=o;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(l=n()),c=e.getOptions(c);const u=e.getImageWidth(s.modules.size,c),d=l.getContext("2d"),h=d.createImageData(u,u);return e.qrToImageData(h.data,s,c),r(d,l,u),d.putImageData(h,0,0),l},t.renderToDataURL=function(s,o,a){let c=a;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const l=t.render(s,o,c),u=c.type||"image/png",d=c.rendererOpts||{};return l.toDataURL(u,d.quality)}}(Sy)),Sy}var $y={},sI;function nye(){if(sI)return $y;sI=1;const t=aB();function e(i,s){const o=i.a/255,a=s+'="'+i.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function r(i,s,o){let a=i+s;return typeof o<"u"&&(a+=" "+o),a}function n(i,s,o){let a="",c=0,l=!1,u=0;for(let d=0;d<i.length;d++){const h=Math.floor(d%s),f=Math.floor(d/s);!h&&!l&&(l=!0),i[d]?(u++,d>0&&h>0&&i[d-1]||(a+=l?r("M",h+o,.5+f+o):r("m",c,0),c=0,l=!1),h+1<s&&i[d+1]||(a+=r("h",u),u=0)):c++}return a}return $y.render=function(s,o,a){const c=t.getOptions(o),l=s.modules.size,u=s.modules.data,d=l+c.margin*2,h=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",f="<path "+e(c.color.dark,"stroke")+' d="'+n(u,l,c.margin)+'"/>',g='viewBox="0 0 '+d+" "+d+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+g+' shape-rendering="crispEdges">'+h+f+`</svg>
3022`;return typeof a=="function"&&a(null,w),w},$y}var oI;function iye(){if(oI)return eh;oI=1;const t=U5e(),e=tye(),r=rye(),n=nye();function i(s,o,a,c,l){const u=[].slice.call(arguments,1),d=u.length,h=typeof u[d-1]=="function";if(!h&&!t())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=c=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=c,c=void 0):(l=c,c=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=c=void 0):d===2&&!o.getContext&&(c=a,a=o,o=void 0),new Promise(function(f,g){try{const p=e.create(a,c);f(s(p,o,c))}catch(p){g(p)}})}try{const f=e.create(a,c);l(null,s(f,o,c))}catch(f){l(f)}}return eh.create=e.create,eh.toCanvas=i.bind(null,r.render),eh.toDataURL=i.bind(null,r.renderToDataURL),eh.toString=i.bind(null,function(s,o,a){return n.render(s,a)}),eh}var sye=iye();const oye=ec(sye),aye=.1,aI=2.5,wa=7;function Ay(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+aye}function cye(t,e){const r=Array.prototype.slice.call(oye.create(t,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((i,s,o)=>(o%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const lye={generate({uri:t,size:e,logoSize:r,dotColor:n="#141414"}){const i="transparent",o=[],a=cye(t,"Q"),c=e/a.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:p,y:w})=>{const m=(a.length-wa)*c*p,b=(a.length-wa)*c*w,v=.45;for(let E=0;E<l.length;E+=1){const I=c*(wa-E*2);o.push(W`
3023            <rect
3024              fill=${E===2?n:i}
3025              width=${E===0?I-5:I}
3026              rx= ${E===0?(I-5)*v:I*v}
3027              ry= ${E===0?(I-5)*v:I*v}
3028              stroke=${n}
3029              stroke-width=${E===0?5:0}
3030              height=${E===0?I-5:I}
3031              x= ${E===0?b+c*E+5/2:b+c*E}
3032              y= ${E===0?m+c*E+5/2:m+c*E}
3033            />
3034          `)}});const u=Math.floor((r+25)/c),d=a.length/2-u/2,h=a.length/2+u/2-1,f=[];a.forEach((p,w)=>{p.forEach((m,b)=>{if(a[w][b]&&!(w<wa&&b<wa||w>a.length-(wa+1)&&b<wa||w<wa&&b>a.length-(wa+1))&&!(w>d&&w<h&&b>d&&b<h)){const v=w*c+c/2,E=b*c+c/2;f.push([v,E])}})});const g={};return f.forEach(([p,w])=>{var m;g[p]?(m=g[p])==null||m.push(w):g[p]=[w]}),Object.entries(g).map(([p,w])=>{const m=w.filter(b=>w.every(v=>!Ay(b,v,c)));return[Number(p),m]}
3034).forEach(([p,w])=>{w.forEach(m=>{o.push(W`<circle cx=${p} cy=${m} fill=${n} r=${c/aI} />`)})}),Object.entries(g).filter(([p,w])=>w.length>1).map(([p,w])=>{const m=w.filter(b=>w.some(v=>Ay(b,v,c)));return[Number(p),m]}).map(([p,w])=>{w.sort((b,v)=>b<v?-1:1);const m=[];for(const b of w){const v=m.find(E=>E.some(I=>Ay(b,I,c)));v?v.push(b):m.push([b])}return[p,m.map(b=>[b[0],b[b.length-1]])]}).forEach(([p,w])=>{w.forEach(([m,b])=>{o.push(W`
3035              <line
3036                x1=${p}
3037                x2=${p}
3038                y1=${m}
3039                y2=${b}
3040                stroke=${n}
3041                stroke-width=${c/(aI/2)}
3042                stroke-linecap="round"
3043              />
3044            `)})}),o}},uye=ne`
3045  :host {
3046    position: relative;
3047    user-select: none;
3048    display: block;
3049    overflow: hidden;
3050    aspect-ratio: 1 / 1;
3051    width: var(--local-size);
3052  }
3053
3054  :host([data-theme='dark']) {
3055    border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
3056    background-color: var(--wui-color-inverse-100);
3057    padding: var(--wui-spacing-l);
3058  }
3059
3060  :host([data-theme='light']) {
3061    box-shadow: 0 0 0 1px var(--wui-color-bg-125);
3062    background-color: var(--wui-color-bg-125);
3063  }
3064
3065  :host([data-clear='true']) > wui-icon {
3066    display: none;
3067  }
3068
3069  svg:first-child,
3070  wui-image,
3071  wui-icon {
3072    position: absolute;
3073    top: 50%;
3074    left: 50%;
3075    transform: translateY(-50%) translateX(-50%);
3076  }
3077
3078  wui-image {
3079    width: 25%;
3080    height: 25%;
3081    border-radius: var(--wui-border-radius-xs);
3082  }
3083
3084  wui-icon {
3085    width: 100%;
3086    height: 100%;
3087    color: var(--local-icon-color) !important;
3088    transform: translateY(-50%) translateX(-50%) scale(0.25);
3089  }
3090`;var sc=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const dye="#3396ff";let Js=class extends oe{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`
3091     --local-size: ${this.size}px;
3092     --local-icon-color: ${this.color??dye}
3093    `,q`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return W`
3094      <svg height=${e} width=${e}>
3095        ${lye.generate({uri:this.uri,size:e,logoSize:this.arenaClear?0:e/4,dotColor:this.color})}
3096      </svg>
3097    `}templateVisual(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?q`<wui-icon
3098        class="farcaster"
3099        size="inherit"
3100        color="inherit"
3101        name="farcaster"
3102      ></wui-icon>`:q`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};Js.styles=[bt,uye];sc([D()],Js.prototype,"uri",void 0);sc([D({type:Number})],Js.prototype,"size",void 0);sc([D()],Js.prototype,"theme",void 0);sc([D()],Js.prototype,"imageSrc",void 0);sc([D()],Js.prototype,"alt",void 0);sc([D()],Js.prototype,"color",void 0);sc([D({type:Boolean})],Js.prototype,"arenaClear",void 0);sc([D({type:Boolean})],Js.prototype,"farcaster",void 0);Js=sc([mt("wui-qr-code")],Js);const hye=ne`
3103  :host {
3104    display: block;
3105    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
3106    background: linear-gradient(
3107      120deg,
3108      var(--wui-color-bg-200) 5%,
3109      var(--wui-color-bg-200) 48%,
3110      var(--wui-color-bg-300) 55%,
3111      var(--wui-color-bg-300) 60%,
3112      var(--wui-color-bg-300) calc(60% + 10px),
3113      var(--wui-color-bg-200) calc(60% + 12px),
3114      var(--wui-color-bg-200) 100%
3115    );
3116    background-size: 250%;
3117    animation: shimmer 3s linear infinite reverse;
3118  }
3119
3120  :host([variant='light']) {
3121    background: linear-gradient(
3122      120deg,
3123      var(--wui-color-bg-150) 5%,
3124      var(--wui-color-bg-150) 48%,
3125      var(--wui-color-bg-200) 55%,
3126      var(--wui-color-bg-200) 60%,
3127      var(--wui-color-bg-200) calc(60% + 10px),
3128      var(--wui-color-bg-150) calc(60% + 12px),
3129      var(--wui-color-bg-150) 100%
3130    );
3131    background-size: 250%;
3132  }
3133
3134  @keyframes shimmer {
3135    from {
3136      background-position: -250% 0;
3137    }
3138    to {
3139      background-position: 250% 0;
3140    }
3141  }
3142`;var Jp=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
3142a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let $u=class extends oe{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`
3143      width: ${this.width};
3144      height: ${this.height};
3145      border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};
3146    `,q`<slot></slot>`}};$u.styles=[hye];Jp([D()],$u.prototype,"width",void 0);Jp([D()],$u.prototype,"height",void 0);Jp([D()],$u.prototype,"borderRadius",void 0);Jp([D()],$u.prototype,"variant",void 0);$u=Jp([mt("wui-shimmer")],$u);const fye="https://reown.com",pye=ne`
3147  .reown-logo {
3148    height: var(--wui-spacing-xxl);
3149  }
3150
3151  a {
3152    text-decoration: none;
3153    cursor: pointer;
3154  }
3155
3156  a:hover {
3157    opacity: 0.9;
3158  }
3159`;var gye=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let _6=class extends oe{render(){return q`
3160      <a
3161        data-testid="ux-branding-reown"
3162        href=${fye}
3163        rel="noreferrer"
3164        target="_blank"
3165        style="text-decoration: none;"
3166      >
3167        <wui-flex
3168          justifyContent="center"
3169          alignItems="center"
3170          gap="xs"
3171          .padding=${["0","0","l","0"]}
3172        >
3173          <wui-text variant="small-500" color="fg-100"> UX by </wui-text>
3174          <wui-icon name="reown" size="xxxl" class="reown-logo"></wui-icon>
3175        </wui-flex>
3176      </a>
3177    `}};_6.styles=[bt,fn,pye];_6=gye([mt("wui-ux-by-reown")],_6);/**
3178 * @license
3179 * Copyright 2020 Google LLC
3180 * SPDX-License-Identifier: BSD-3-Clause
3181 */const hl=()=>new wye;class wye{}const Py=new WeakMap,fl=x8(class extends QR{render(t){return pr}update(t,[e]){var n;const r=e!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=e,this.ht=(n=t.options)==null?void 0:n.host,this.rt(this.ct=t.element)),pr}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let r=Py.get(e);r===void 0&&(r=new WeakMap,Py.set(e,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return typeof this.G=="function"?(t=Py.get(this.ht??globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),mye=ne`
3182  :host {
3183    display: flex;
3184    align-items: center;
3185    justify-content: center;
3186  }
3187
3188  label {
3189    position: relative;
3190    display: inline-block;
3191    width: 32px;
3192    height: 22px;
3193  }
3194
3195  input {
3196    width: 0;
3197    height: 0;
3198    opacity: 0;
3199  }
3200
3201  span {
3202    position: absolute;
3203    cursor: pointer;
3204    top: 0;
3205    left: 0;
3206    right: 0;
3207    bottom: 0;
3208    background-color: var(--wui-color-blue-100);
3209    border-width: 1px;
3210    border-style: solid;
3211    border-color: var(--wui-color-gray-glass-002);
3212    border-radius: 999px;
3213    transition:
3214      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
3215      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md);
3216    will-change: background-color, border-color;
3217  }
3218
3219  span:before {
3220    position: absolute;
3221    content: '';
3222    height: 16px;
3223    width: 16px;
3224    left: 3px;
3225    top: 2px;
3226    background-color: var(--wui-color-inverse-100);
3227    transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg);
3228    will-change: transform;
3229    border-radius: 50%;
3230  }
3231
3232  input:checked + span {
3233    border-color: var(--wui-color-gray-glass-005);
3234    background-color: var(--wui-color-blue-100);
3235  }
3236
3237  input:not(:checked) + span {
3238    background-color: var(--wui-color-gray-glass-010);
3239  }
3240
3241  input:checked + span:before {
3242    transform: translateX(calc(100% - 7px));
3243  }
3244`;var cB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
3244a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let lw=class extends oe{constructor(){super(...arguments),this.inputElementRef=hl(),this.checked=void 0}render(){return q`
3245      <label>
3246        <input
3247          ${fl(this.inputElementRef)}
3248          type="checkbox"
3249          ?checked=${Ft(this.checked)}
3250          @change=${this.dispatchChangeEvent.bind(this)}
3251        />
3252        <span></span>
3253      </label>
3254    `}dispatchChangeEvent(){var e;this.dispatchEvent(new CustomEvent("switchChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.checked,bubbles:!0,composed:!0}))}};lw.styles=[bt,fn,Wp,mye];cB([D({type:Boolean})],lw.prototype,"checked",void 0);lw=cB([mt("wui-switch")],lw);const yye=ne`
3255  :host {
3256    height: 100%;
3257  }
3258
3259  button {
3260    display: flex;
3261    align-items: center;
3262    justify-content: center;
3263    column-gap: var(--wui-spacing-1xs);
3264    padding: var(--wui-spacing-xs) var(--wui-spacing-s);
3265    background-color: var(--wui-color-gray-glass-002);
3266    border-radius: var(--wui-border-radius-xs);
3267    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
3268    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
3269    will-change: background-color;
3270    cursor: pointer;
3271  }
3272
3273  wui-switch {
3274    pointer-events: none;
3275  }
3276`;var lB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let uw=class extends oe{constructor(){super(...arguments),this.checked=void 0}render(){return q`
3277      <button>
3278        <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
3279        <wui-switch ?checked=${Ft(this.checked)}></wui-switch>
3280      </button>
3281    `}};uw.styles=[bt,fn,yye];lB([D({type:Boolean})],uw.prototype,"checked",void 0);uw=lB([mt("wui-certified-switch")],uw);const bye=ne`
3282  button {
3283    background-color: var(--wui-color-fg-300);
3284    border-radius: var(--wui-border-radius-4xs);
3285    width: 16px;
3286    height: 16px;
3287  }
3288
3289  button:disabled {
3290    background-color: var(--wui-color-bg-300);
3291  }
3292
3293  wui-icon {
3294    color: var(--wui-color-bg-200) !important;
3295  }
3296
3297  button:focus-visible {
3298    background-color: var(--wui-color-fg-250);
3299    border: 1px solid var(--wui-color-accent-100);
3300  }
3301
3302  @media (hover: hover) and (pointer: fine) {
3303    button:hover:enabled {
3304      background-color: var(--wui-color-fg-250);
3305    }
3306
3307    button:active:enabled {
3308      background-color: var(--wui-color-fg-225);
3309    }
3310  }
3311`;var uB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let dw=class extends oe{constructor(){super(...arguments),this.icon="copy"}render(){return q`
3312      <button>
3313        <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
3314      </button>
3315    `}};dw.styles=[bt,fn,bye];uB([D()],dw.prototype,"icon",void 0);dw=uB([mt("wui-input-element")],dw);const vye=ne`
3316  :host {
3317    position: relative;
3318    width: 100%;
3319    display: inline-block;
3320    color: var(--wui-color-fg-275);
3321  }
3322
3323  input {
3324    width: 100%;
3325    border-radius: var(--wui-border-radius-xs);
3326    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
3327    background: var(--wui-color-gray-glass-002);
3328    font-size: var(--wui-font-size-paragraph);
3329    letter-spacing: var(--wui-letter-spacing-paragraph);
3330    color: var(--wui-color-fg-100);
3331    transition:
3332      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
3333      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
3334      box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
3335    will-change: background-color, border-color, box-shadow;
3336    caret-color: var(--wui-color-accent-100);
3337  }
3338
3339  input:disabled {
3340    cursor: not-allowed;
3341    border: 1px solid var(--wui-color-gray-glass-010);
3342  }
3343
3344  input:disabled::placeholder,
3345  input:disabled + wui-icon {
3346    color: var(--wui-color-fg-300);
3347  }
3348
3349  input::placeholder {
3350    color: var(--wui-color-fg-275);
3351  }
3352
3353  input:focus:enabled {
3354    background-color: var(--wui-color-gray-glass-005);
3355    -webkit-box-shadow:
3356      inset 0 0 0 1px var(--wui-color-accent-100),
3357      0px 0px 0px 4px var(--wui-box-shadow-blue);
3358    -moz-box-shadow:
3359      inset 0 0 0 1px var(--wui-color-accent-100),
3360      0px 0px 0px 4px var(--wui-box-shadow-blue);
3361    box-shadow:
3362      inset 0 0 0 1px var(--wui-color-accent-100),
3363      0px 0px 0px 4px var(--wui-box-shadow-blue);
3364  }
3365
3366  input:hover:enabled {
3367    background-color: var(--wui-color-gray-glass-005);
3368  }
3369
3370  wui-icon {
3371    position: absolute;
3372    top: 50%;
3373    transform: translateY(-50%);
3374    pointer-events: none;
3375  }
3376
3377  .wui-size-sm {
3378    padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
3379  }
3380
3381  wui-icon + .wui-size-sm {
3382    padding: 9px var(--wui-spacing-m) 10px 36px;
3383  }
3384
3385  wui-icon[data-input='sm'] {
3386    left: var(--wui-spacing-s);
3387  }
3388
3389  .wui-size-md {
3390    padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
3391  }
3392
3393  wui-icon + .wui-size-md,
3394  wui-loading-spinner + .wui-size-md {
3395    padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);
3396  }
3397
3398  wui-icon[data-input='md'] {
3399    left: var(--wui-spacing-l);
3400  }
3401
3402  .wui-size-lg {
3403    padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
3404    letter-spacing: var(--wui-letter-spacing-medium-title);
3405    font-size: var(--wui-font-size-medium-title);
3406    font-weight: var(--wui-font-weight-light);
3407    line-height: 130%;
3408    color: var(--wui-color-fg-100);
3409    height: 64px;
3410  }
3411
3412  .wui-padding-right-xs {
3413    padding-right: var(--wui-spacing-xs);
3414  }
3415
3416  .wui-padding-right-s {
3417    padding-right: var(--wui-spacing-s);
3418  }
3419
3420  .wui-padding-right-m {
3421    padding-right: var(--wui-spacing-m);
3422  }
3423
3424  .wui-padding-right-l {
3425    padding-right: var(--wui-spacing-l);
3426  }
3427
3428  .wui-padding-right-xl {
3429    padding-right: var(--wui-spacing-xl);
3430  }
3431
3432  .wui-padding-right-2xl {
3433    padding-right: var(--wui-spacing-2xl);
3434  }
3435
3436  .wui-padding-right-3xl {
3437    padding-right: var(--wui-spacing-3xl);
3438  }
3439
3440  .wui-padding-right-4xl {
3441    padding-right: var(--wui-spacing-4xl);
3442  }
3443
3444  .wui-padding-right-5xl {
3445    padding-right: var(--wui-spacing-5xl);
3446  }
3447
3448  wui-icon + .wui-size-lg,
3449  wui-loading-spinner + .wui-size-lg {
3450    padding-left: 50px;
3451  }
3452
3453  wui-icon[data-input='lg'] {
3454    left: var(--wui-spacing-l);
3455  }
3456
3457  .wui-size-mdl {
3458    padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);
3459  }
3460  wui-icon + .wui-size-mdl,
3461  wui-loading-spinner + .wui-size-mdl {
3462    padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;
3463  }
3464  wui-icon[data-input='mdl'] {
3465    left: var(--wui-spacing-m);
3466  }
3467
3468  input:placeholder-shown ~ ::slotted(wui-input-element),
3469  input:placeholder-shown ~ ::slotted(wui-icon) {
3470    opacity: 0;
3471    pointer-events: none;
3472  }
3473
3474  input::-webkit-outer-spin-button,
3475  input::-webkit-inner-spin-button {
3476    -webkit-appearance: none;
3477    margin: 0;
3478  }
3479
3480  input[type='number'] {
3481    -moz-appearance: textfield;
3482  }
3483
3484  ::slotted(wui-input-element),
3485  ::slotted(wui-icon) {
3486    position: absolute;
3487    top: 50%;
3488    transform: translateY(-50%);
3489  }
3490
3491  ::slotted(wui-input-element) {
3492    right: var(--wui-spacing-m);
3493  }
3494
3495  ::slotted(wui-icon) {
3496    right: 0px;
3497  }
3498`;var Go=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ms=class extends oe{constructor(){super(...arguments),this.inputElementRef=hl(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const e=`wui-padding-right-${this.inputRightPadding}`,n={[`wui-size-${this.size}`]:!0,[e]:!!this.inputRightPadding};return q`${this.templateIcon()}
3499      <input
3500        data-testid="wui-input-text"
3501        ${fl(this.inputElementRef)}
3502        class=${Sm(n)}
3503        type=${this.type}
3504        enterkeyhint=${Ft(this.enterKeyHint)}
3505        ?disabled=${this.disabled}
3506        placeholder=${this.placeholder}
3507        @input=${this.dispatchInputChangeEvent.bind(this)}
3508        .value=${this.value||""}
3509        tabindex=${Ft(this.tabIdx)}
3510      />
3511      <slot></slot>`}templateIcon(){return this.icon?q`<wui-icon
3512        data-input=${this.size}
3513        size=${this.size}
3514        color="inherit"
3515        name=${this.icon}
3516      ></wui-icon>`:null}dispatchInputChangeEvent(){var e;this.dispatchEvent(new CustomEvent("inputChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.value,bubbles:!0,composed:!0}))}};ms.styles=[bt,fn,vye];Go([D()],ms.prototype,"size",void 0);Go([D()],ms.prototype,"icon",void 0);Go([D({type:Boolean})],ms.prototype,"disabled",void 0);Go([D()],ms.prototype,"placeholder",void 0);Go([D()],ms.prototype,"type",void 0);Go([D()],ms.prototype,"keyHint",void 0);Go([D()],ms.prototype,"value",void 0);Go([D()],ms.prototype,"inputRightPadding",void 0);Go([D()],ms.prototype,"tabIdx",void 0);ms=Go([mt("wui-input-text")],ms);const Eye=ne`
3517  :host {
3518    position: relative;
3519    display: inline-block;
3520    width: 100%;
3521  }
3522`;var Cye=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let S6=class extends oe{constructor(){super(...arguments),this.inputComponentRef=hl()}render(){return q`
3523      <wui-input-text
3524        ${fl(this.inputComponentRef)}
3525        placeholder="Search wallet"
3526        icon="search"
3527        type="search"
3528        enterKeyHint="search"
3529        size="sm"
3530      >
3531        <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
3532      </wui-input-text>
3533    `}clearValue(){const e=this.inputComponentRef.value,r=e==null?void 0:e.inputElementRef.value;r&&(r.value="",r.focus(),r.dispatchEvent(new Event("input")))}};S6.styles=[bt,Eye];S6=Cye([mt("wui-search-bar")],S6);const xye=W`<svg  viewBox="0 0 48 54" fill="none">
3534  <path
3535    d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
3536  />
3537</svg>`,_ye=ne`
3538  :host {
3539    display: flex;
3540    flex-direction: column;
3541    align-items: center;
3542    width: 104px;
3543    row-gap: var(--wui-spacing-xs);
3544    padding: var(--wui-spacing-xs) 10px;
3545    background-color: var(--wui-color-gray-glass-002);
3546    border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
3547    position: relative;
3548  }
3549
3550  wui-shimmer[data-type='network'] {
3551    border: none;
3552    -webkit-clip-path: var(--wui-path-network);
3553    clip-path: var(--wui-path-network);
3554  }
3555
3556  svg {
3557    position: absolute;
3558    width: 48px;
3559    height: 54px;
3560    z-index: 1;
3561  }
3562
3563  svg > path {
3564    stroke: var(--wui-color-gray-glass-010);
3565    stroke-width: 1px;
3566  }
3567
3568  @media (max-width: 350px) {
3569    :host {
3570      width: 100%;
3571    }
3572  }
3573`;var dB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let hw=class extends oe{constructor(){super(...arguments),this.type="wallet"}render(){return q`
3574      ${this.shimmerTemplate()}
3575      <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
3576    `}shimmerTemplate(){return this.type==="network"?q` <wui-shimmer
3577          data-type=${this.type}
3578          width="48px"
3579          height="54px"
3580          borderRadius="xs"
3581        ></wui-shimmer>
3582        ${xye}`:q`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};hw.styles=[bt,fn,_ye];dB([D()],hw.prototype,"type",void 0);hw=dB([mt("wui-card-select-loader")],hw);const Sye=ne`
3583  :host {
3584    display: grid;
3585    width: inherit;
3586    height: inherit;
3587  }
3588`;var Ss=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
3588a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ui=class extends oe{render(){return this.style.cssText=`
3589      grid-template-rows: ${this.gridTemplateRows};
3590      grid-template-columns: ${this.gridTemplateColumns};
3591      justify-items: ${this.justifyItems};
3592      align-items: ${this.alignItems};
3593      justify-content: ${this.justifyContent};
3594      align-content: ${this.alignContent};
3595      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
3596      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
3597      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
3598      padding-top: ${this.padding&&bn.getSpacingStyles(this.padding,0)};
3599      padding-right: ${this.padding&&bn.getSpacingStyles(this.padding,1)};
3600      padding-bottom: ${this.padding&&bn.getSpacingStyles(this.padding,2)};
3601      padding-left: ${this.padding&&bn.getSpacingStyles(this.padding,3)};
3602      margin-top: ${this.margin&&bn.getSpacingStyles(this.margin,0)};
3603      margin-right: ${this.margin&&bn.getSpacingStyles(this.margin,1)};
3604      margin-bottom: ${this.margin&&bn.getSpacingStyles(this.margin,2)};
3605      margin-left: ${this.margin&&bn.getSpacingStyles(this.margin,3)};
3606    `,q`<slot></slot>`}};ui.styles=[bt,Sye];Ss([D()],ui.prototype,"gridTemplateRows",void 0);Ss([D()],ui.prototype,"gridTemplateColumns",void 0);Ss([D()],ui.prototype,"justifyItems",void 0);Ss([D()],ui.prototype,"alignItems",void 0);Ss([D()],ui.prototype,"justifyContent",void 0);Ss([D()],ui.prototype,"alignContent",void 0);Ss([D()],ui.prototype,"columnGap",void 0);Ss([D()],ui.prototype,"rowGap",void 0);Ss([D()],ui.prototype,"gap",void 0);Ss([D()],ui.prototype,"padding",void 0);Ss([D()],ui.prototype,"margin",void 0);ui=Ss([mt("wui-grid")],ui);const Iye=ne`
3607  button {
3608    column-gap: var(--wui-spacing-s);
3609    padding: 11px 18px 11px var(--wui-spacing-s);
3610    width: 100%;
3611    background-color: var(--wui-color-gray-glass-002);
3612    border-radius: var(--wui-border-radius-xs);
3613    color: var(--wui-color-fg-250);
3614    transition:
3615      color var(--wui-ease-out-power-1) var(--wui-duration-md),
3616      background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
3617    will-change: color, background-color;
3618  }
3619
3620  button[data-iconvariant='square'],
3621  button[data-iconvariant='square-blue'] {
3622    padding: 6px 18px 6px 9px;
3623  }
3624
3625  button > wui-flex {
3626    flex: 1;
3627  }
3628
3629  button > wui-image {
3630    width: 32px;
3631    height: 32px;
3632    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
3633    border-radius: var(--wui-border-radius-3xl);
3634  }
3635
3636  button > wui-icon {
3637    width: 36px;
3638    height: 36px;
3639    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
3640    will-change: opacity;
3641  }
3642
3643  button > wui-icon-box[data-variant='blue'] {
3644    box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);
3645  }
3646
3647  button > wui-icon-box[data-variant='overlay'] {
3648    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
3649  }
3650
3651  button > wui-icon-box[data-variant='square-blue'] {
3652    border-radius: var(--wui-border-radius-3xs);
3653    position: relative;
3654    border: none;
3655    width: 36px;
3656    height: 36px;
3657  }
3658
3659  button > wui-icon-box[data-variant='square-blue']::after {
3660    content: '';
3661    position: absolute;
3662    top: 0;
3663    bottom: 0;
3664    left: 0;
3665    right: 0;
3666    border-radius: inherit;
3667    border: 1px solid var(--wui-color-accent-glass-010);
3668    pointer-events: none;
3669  }
3670
3671  button > wui-icon:last-child {
3672    width: 14px;
3673    height: 14px;
3674  }
3675
3676  button:disabled {
3677    color: var(--wui-color-gray-glass-020);
3678  }
3679
3680  button[data-loading='true'] > wui-icon {
3681    opacity: 0;
3682  }
3683
3684  wui-loading-spinner {
3685    position: absolute;
3686    right: 18px;
3687    top: 50%;
3688    transform: translateY(-50%);
3689  }
3690`;var to=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Li=class extends oe{constructor(){super(...arguments),this.tabIdx=void 0,this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return q`
3691      <button
3692        ?disabled=${this.loading?!0:!!this.disabled}
3693        data-loading=${this.loading}
3694        data-iconvariant=${Ft(this.iconVariant)}
3695        tabindex=${Ft(this.tabIdx)}
3696      >
3697        ${this.loadingTemplate()} ${this.visualTemplate()}
3698        <wui-flex gap="3xs">
3699          <slot></slot>
3700        </wui-flex>
3701        ${this.chevronTemplate()}
3702      </button>
3703    `}visualTemplate(){if(this.variant==="image"&&this.imageSrc)return q`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if(this.iconVariant==="square"&&this.icon&&this.variant==="icon")return q`<wui-icon name=${this.icon}></wui-icon>`;if(this.variant==="icon"&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",r=this.iconVariant==="square-blue"?"mdl":"md",n=this.iconSize?this.iconSize:r;return q`
3704        <wui-icon-box
3705          data-variant=${this.iconVariant}
3706          icon=${this.icon}
3707          iconSize=${n}
3708          background="transparent"
3709          iconColor=${e}
3710          backgroundColor=${e}
3711          size=${r}
3712        ></wui-icon-box>
3713      `}return null}loadingTemplate(){return this.loading?q`<wui-loading-spinner
3714        data-testid="wui-list-item-loading-spinner"
3715        color="fg-300"
3716      ></wui-loading-spinner>`:q``}chevronTemplate(){return this.chevron?q`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};Li.styles=[bt,fn,Iye];to([D()],Li.prototype,"icon",void 0);to([D()],Li.prototype,"iconSize",void 0);to([D()],Li.prototype,"tabIdx",void 0);to([D()],Li.prototype,"variant",void 0);to([D()],Li.prototype,"iconVariant",void 0);to([D({type:Boolean})],Li.prototype,"disabled",void 0);to([D()],Li.prototype,"imageSrc",void 0);to([D()],Li.prototype,"alt",void 0);to([D({type:Boolean})],Li.prototype,"chevron",void 0);to([D({type:Boolean})],Li.prototype,"loading",void 0);
3716Li=to([mt("wui-list-item")],Li);const $ye=ne`
3717  :host {
3718    display: block;
3719    border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
3720    box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
3721    background-color: var(--wui-color-modal-bg);
3722    overflow: hidden;
3723  }
3724
3725  :host([data-embedded='true']) {
3726    box-shadow:
3727      0 0 0 1px var(--wui-color-gray-glass-005),
3728      0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
3729  }
3730`;var Aye=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let I6=class extends oe{render(){return q`<slot></slot>`}};I6.styles=[bt,$ye];I6=Aye([mt("wui-card")],I6);const Pye=ne`
3731  :host {
3732    display: flex;
3733    align-items: center;
3734    justify-content: center;
3735    padding: var(--wui-spacing-s);
3736    border-radius: var(--wui-border-radius-s);
3737    border: 1px solid var(--wui-color-dark-glass-100);
3738    box-sizing: border-box;
3739    background-color: var(--wui-color-bg-325);
3740    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
3741  }
3742
3743  wui-flex {
3744    width: 100%;
3745  }
3746
3747  wui-text {
3748    word-break: break-word;
3749    flex: 1;
3750  }
3751
3752  .close {
3753    cursor: pointer;
3754  }
3755
3756  .icon-box {
3757    height: 40px;
3758    width: 40px;
3759    border-radius: var(--wui-border-radius-3xs);
3760    background-color: var(--local-icon-bg-value);
3761  }
3762`;var Xp=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Au=class extends oe{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=`
3763      --local-icon-bg-value: var(--wui-color-${this.backgroundColor});
3764   `,q`
3765      <wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
3766        <wui-flex columnGap="xs" flexDirection="row" alignItems="center">
3767          <wui-flex
3768            flexDirection="row"
3769            alignItems="center"
3770            justifyContent="center"
3771            class="icon-box"
3772          >
3773            <wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon>
3774          </wui-flex>
3775          <wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text"
3776            >${this.message}</wui-text
3777          >
3778        </wui-flex>
3779        <wui-icon
3780          class="close"
3781          color="bg-350"
3782          size="sm"
3783          name="close"
3784          @click=${this.onClose}
3785        ></wui-icon>
3786      </wui-flex>
3787    `}onClose(){VN.close()}};Au.styles=[bt,Pye];Xp([D()],Au.prototype,"message",void 0);Xp([D()],Au.prototype,"backgroundColor",void 0);Xp([D()],Au.prototype,"iconColor",void 0);Xp([D()],Au.prototype,"icon",void 0);Au=Xp([mt("wui-alertbar")],Au);const Tye=ne`
3788  button {
3789    border-radius: var(--local-border-radius);
3790    color: var(--wui-color-fg-100);
3791    padding: var(--local-padding);
3792  }
3793
3794  @media (max-width: 700px) {
3795    button {
3796      padding: var(--wui-spacing-s);
3797    }
3798  }
3799
3800  button > wui-icon {
3801    pointer-events: none;
3802  }
3803
3804  button:disabled > wui-icon {
3805    color: var(--wui-color-bg-300) !important;
3806  }
3807
3808  button:disabled {
3809    background-color: transparent;
3810  }
3811`;var Qp=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Pu=class extends oe{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){const e=this.size==="lg"?"--wui-border-radius-xs":"--wui-border-radius-xxs",r=this.size==="lg"?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=`
3812    --local-border-radius: var(${e});
3813    --local-padding: var(${r});
3814`,q`
3815      <button ?disabled=${this.disabled}>
3816        <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
3817      </button>
3818    `}};Pu.styles=[bt,fn,Wp,Tye];Qp([D()],Pu.prototype,"size",void 0);Qp([D({type:Boolean})],Pu.prototype,"disabled",void 0);Qp([D()],Pu.prototype,"icon",void 0);Qp([D()],Pu.prototype,"iconColor",void 0);Pu=Qp([mt("wui-icon-link")],Pu);const Oye=ne`
3819  button {
3820    display: block;
3821    display: flex;
3822    align-items: center;
3823    padding: var(--wui-spacing-xxs);
3824    gap: var(--wui-spacing-xxs);
3825    transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
3826    border-radius: var(--wui-border-radius-xxs);
3827  }
3828
3829  wui-image {
3830    border-radius: 100%;
3831    width: var(--wui-spacing-xl);
3832    height: var(--wui-spacing-xl);
3833  }
3834
3835  wui-icon-box {
3836    width: var(--wui-spacing-xl);
3837    height: var(--wui-spacing-xl);
3838  }
3839
3840  button:hover {
3841    background-color: var(--wui-color-gray-glass-002);
3842  }
3843
3844  button:active {
3845    background-color: var(--wui-color-gray-glass-005);
3846  }
3847`;var hB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
3847a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let fw=class extends oe{constructor(){super(...arguments),this.imageSrc=""}render(){return q`<button>
3848      ${this.imageTemplate()}
3849      <wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
3850    </button>`}imageTemplate(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:q`<wui-icon-box
3851      size="xxs"
3852      iconColor="fg-200"
3853      backgroundColor="fg-100"
3854      background="opaque"
3855      icon="networkPlaceholder"
3856    ></wui-icon-box>`}};fw.styles=[bt,fn,Wp,Oye];hB([D()],fw.prototype,"imageSrc",void 0);fw=hB([mt("wui-select")],fw);const Nye=ne`
3857  :host {
3858    display: flex;
3859    column-gap: var(--wui-spacing-s);
3860    align-items: center;
3861    padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
3862    border-radius: var(--wui-border-radius-s);
3863    border: 1px solid var(--wui-color-gray-glass-005);
3864    box-sizing: border-box;
3865    background-color: var(--wui-color-bg-175);
3866    box-shadow:
3867      0px 14px 64px -4px rgba(0, 0, 0, 0.15),
3868      0px 8px 22px -6px rgba(0, 0, 0, 0.15);
3869
3870    max-width: 300px;
3871  }
3872
3873  :host wui-loading-spinner {
3874    margin-left: var(--wui-spacing-3xs);
3875  }
3876`;var id=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ka=class extends oe{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1,this.iconType="default"}render(){return q`
3877      ${this.templateIcon()}
3878      <wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
3879        >${this.message}</wui-text
3880      >
3881    `}templateIcon(){return this.loading?q`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:this.iconType==="default"?q`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:q`<wui-icon-box
3882      size="sm"
3883      iconSize="xs"
3884      iconColor=${this.iconColor}
3885      backgroundColor=${this.backgroundColor}
3886      icon=${this.icon}
3887      background="opaque"
3888    ></wui-icon-box>`}};Ka.styles=[bt,Nye];id([D()],Ka.prototype,"backgroundColor",void 0);id([D()],Ka.prototype,"iconColor",void 0);id([D()],Ka.prototype,"icon",void 0);id([D()],Ka.prototype,"message",void 0);id([D()],Ka.prototype,"loading",void 0);id([D()],Ka.prototype,"iconType",void 0);Ka=id([mt("wui-snackbar")],Ka);class kye{constructor(){this.cache=new Map}set(e,r){this.cache.set(e,r)}get(e){return this.cache.get(e)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}}const Ty=new kye,Rye=ne`
3889  :host {
3890    display: flex;
3891    aspect-ratio: var(--local-aspect-ratio);
3892    color: var(--local-color);
3893    width: var(--local-width);
3894  }
3895
3896  svg {
3897    width: inherit;
3898    height: inherit;
3899    object-fit: contain;
3900    object-position: center;
3901  }
3902
3903  .fallback {
3904    width: var(--local-width);
3905    height: var(--local-height);
3906  }
3907`;var eg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const cI={add:async()=>(await J(async()=>{const{addSvg:t}=await Promise.resolve().then(()=>H8e);return{addSvg:t}},void 0)).addSvg,allWallets:async()=>(await J(async()=>{const{allWalletsSvg:t}=await Promise.resolve().then(()=>W8e);return{allWalletsSvg:t}},void 0)).allWalletsSvg,arrowBottomCircle:async()=>(await J(async()=>{const{arrowBottomCircleSvg:t}=await Promise.resolve().then(()=>Z8e);return{arrowBottomCircleSvg:t}},void 0)).arrowBottomCircleSvg,appStore:async()=>(await J(async()=>{const{appStoreSvg:t}=await Promise.resolve().then(()=>Y8e);return{appStoreSvg:t}},void 0)).appStoreSvg,apple:async()=>
3907(await J(async()=>{const{appleSvg:t}=await Promise.resolve().then(()=>X8e);return{appleSvg:t}},void 0)).appleSvg,arrowBottom:async()=>(await J(async()=>{const{arrowBottomSvg:t}=await Promise.resolve().then(()=>e9e);return{arrowBottomSvg:t}},void 0)).arrowBottomSvg,arrowLeft:async()=>(await J(async()=>{const{arrowLeftSvg:t}=await Promise.resolve().then(()=>r9e);return{arrowLeftSvg:t}},void 0)).arrowLeftSvg,arrowRight:async()=>(await J(async()=>{const{arrowRightSvg:t}=await Promise.resolve().then(()=>i9e);return{arrowRightSvg:t}},void 0)).arrowRightSvg,arrowTop:async()=>(await J(async()=>{const{arrowTopSvg:t}=await Promise.resolve().then(()=>o9e);return{arrowTopSvg:t}},void 0)).arrowTopSvg,bank:async()=>(await J(async()=>{const{bankSvg:t}=await Promise.resolve().then(()=>c9e);return{bankSvg:t}},void 0)).bankSvg,browser:async()=>(await J(async()=>{const{browserSvg:t}=await Promise.resolve().then(()=>u9e);return{browserSvg:t}},void 0)).browserSvg,bin:async()=>(await J(async()=>{const{binSvg:t}=await Promise.resolve().then(()=>h9e);return{binSvg:t}},void 0)).binSvg,bitcoin:async()=>(await J(async()=>{const{bitcoinSvg:t}=await Promise.resolve().then(()=>p9e);return{bitcoinSvg:t}},void 0)).bitcoinSvg,card:async()=>(await J(async()=>{const{cardSvg:t}=await Promise.resolve().then(()=>w9e);return{cardSvg:t}},void 0)).cardSvg,checkmark:async()=>(await J(async()=>{const{checkmarkSvg:t}=await Promise.resolve().then(()=>y9e);return{checkmarkSvg:t}},void 0)).checkmarkSvg,checkmarkBold:async()=>(await J(async()=>{const{checkmarkBoldSvg:t}=await Promise.resolve().then(()=>v9e);return{checkmarkBoldSvg:t}},void 0)).checkmarkBoldSvg,chevronBottom:async()=>(await J(async()=>{const{chevronBottomSvg:t}=await Promise.resolve().then(()=>C9e);return{chevronBottomSvg:t}},void 0)).chevronBottomSvg,chevronLeft:async()=>(await J(async()=>{const{chevronLeftSvg:t}=await Promise.resolve().then(()=>_9e);return{chevronLeftSvg:t}},void 0)).chevronLeftSvg,chevronRight:async()=>(await J(async()=>{const{chevronRightSvg:t}=await Promise.resolve().then(()=>I9e);return{chevronRightSvg:t}},void 0)).chevronRightSvg,chevronTop:async()=>(await J(async()=>{const{chevronTopSvg:t}=await Promise.resolve().then(()=>A9e);return{chevronTopSvg:t}},void 0)).chevronTopSvg,chromeStore:async()=>(await J(async()=>{const{chromeStoreSvg:t}=await Promise.resolve().then(()=>T9e);return{chromeStoreSvg:t}},void 0)).chromeStoreSvg,clock:async()=>(await J(async()=>{const{clockSvg:t}=await Promise.resolve().then(()=>N9e);return{clockSvg:t}},void 0)).clockSvg,close:async()=>(await J(async()=>{const{closeSvg:t}=await Promise.resolve().then(()=>R9e);return{closeSvg:t}},void 0)).closeSvg,compass:async()=>(await J(async()=>{const{compassSvg:t}=await Promise.resolve().then(()=>D9e);return{compassSvg:t}},void 0)).compassSvg,coinPlaceholder:async()=>(await J(async()=>{const{coinPlaceholderSvg:t}=await Promise.resolve().then(()=>M9e);return{coinPlaceholderSvg:t}},void 0)).coinPlaceholderSvg,copy:async()=>(await J(async()=>{const{copySvg:t}=await Promise.resolve().then(()=>j9e);return{copySvg:t}},void 0)).copySvg,cursor:async()=>(await J(async()=>{const{cursorSvg:t}=await Promise.resolve().then(()=>F9e);return{cursorSvg:t}},void 0)).cursorSvg,cursorTransparent:async()=>(await J(async()=>{const{cursorTransparentSvg:t}=await Promise.resolve().then(()=>H9e);return{cursorTransparentSvg:t}},void 0)).cursorTransparentSvg,circle:async()=>(await J(async()=>{const{circleSvg:t}=await Promise.resolve().then(()=>W9e);return{circleSvg:t}},void 0)).circleSvg,desktop:async()=>(await J(async()=>{const{desktopSvg:t}=await Promise.resolve().then(()=>Z9e);return{desktopSvg:t}},void 0)).desktopSvg,disconnect:async()=>(await J(async()=>{const{disconnectSvg:t}=await Promise.resolve().then(()=>Y9e);return{disconnectSvg:t}},void 0)).disconnectSvg,discord:async()=>(await J(async()=>{const{discordSvg:t}=await Promise.resolve().then(()=>X9e);return{discordSvg:t}},void 0)).discordSvg,ethereum:async()=>(await J(async()=>{const{ethereumSvg:t}=await Promise.resolve().then(()=>e7e);return{ethereumSvg:t}},void 0)).ethereumSvg,etherscan:async()=>
3907(await J(async()=>{const{etherscanSvg:t}=await Promise.resolve().then(()=>r7e);return{etherscanSvg:t}},void 0)).etherscanSvg,extension:async()=>(await J(async()=>{const{extensionSvg:t}=await Promise.resolve().then(()=>i7e);return{extensionSvg:t}},void 0)).extensionSvg,externalLink:async()=>(await J(async()=>{const{externalLinkSvg:t}=await Promise.resolve().then(()=>o7e);return{externalLinkSvg:t}},void 0)).externalLinkSvg,facebook:async()=>(await J(async()=>{const{facebookSvg:t}=await Promise.resolve().then(()=>c7e);return{facebookSvg:t}},void 0)).facebookSvg,farcaster:async()=>(await J(async()=>{const{farcasterSvg:t}=await Promise.resolve().then(()=>u7e);return{farcasterSvg:t}},void 0)).farcasterSvg,filters:async()=>(await J(async()=>{const{filtersSvg:t}=await Promise.resolve().then(()=>h7e);return{filtersSvg:t}},void 0)).filtersSvg,github:async()=>(await J(async()=>{const{githubSvg:t}=await Promise.resolve().then(()=>p7e);return{githubSvg:t}},void 0)).githubSvg,google:async()=>(await J(async()=>{const{googleSvg:t}=await Promise.resolve().then(()=>w7e);return{googleSvg:t}},void 0)).googleSvg,helpCircle:async()=>(await J(async()=>{const{helpCircleSvg:t}=await Promise.resolve().then(()=>y7e);return{helpCircleSvg:t}},void 0)).helpCircleSvg,image:async()=>(await J(async()=>{const{imageSvg:t}=await Promise.resolve().then(()=>v7e);return{imageSvg:t}},void 0)).imageSvg,id:async()=>(await J(async()=>{const{idSvg:t}=await Promise.resolve().then(()=>C7e);return{idSvg:t}},void 0)).idSvg,infoCircle:async()=>(await J(async()=>{const{infoCircleSvg:t}=await Promise.resolve().then(()=>_7e);return{infoCircleSvg:t}},void 0)).infoCircleSvg,lightbulb:async()=>(await J(async()=>{const{lightbulbSvg:t}=await Promise.resolve().then(()=>I7e);return{lightbulbSvg:t}},void 0)).lightbulbSvg,mail:async()=>(await J(async()=>{const{mailSvg:t}=await Promise.resolve().then(()=>A7e);return{mailSvg:t}},void 0)).mailSvg,mobile:async()=>(await J(async()=>{const{mobileSvg:t}=await Promise.resolve().then(()=>T7e);return{mobileSvg:t}},void 0)).mobileSvg,more:async()=>(await J(async()=>{const{moreSvg:t}=await Promise.resolve().then(()=>N7e);return{moreSvg:t}},void 0)).moreSvg,networkPlaceholder:async()=>(await J(async()=>{const{networkPlaceholderSvg:t}=await Promise.resolve().then(()=>R7e);return{networkPlaceholderSvg:t}},void 0)).networkPlaceholderSvg,nftPlaceholder:async()=>(await J(async()=>{const{nftPlaceholderSvg:t}=await Promise.resolve().then(()=>D7e);return{nftPlaceholderSvg:t}},void 0)).nftPlaceholderSvg,off:async()=>(await J(async()=>{const{offSvg:t}=await Promise.resolve().then(()=>M7e);return{offSvg:t}},void 0)).offSvg,playStore:async()=>(await J(async()=>{const{playStoreSvg:t}=await Promise.resolve().then(()=>j7e);return{playStoreSvg:t}},void 0)).playStoreSvg,plus:async()=>(await J(async()=>{const{plusSvg:t}=await Promise.resolve().then(()=>F7e);return{plusSvg:t}},void 0)).plusSvg,qrCode:async()=>(await J(async()=>{const{qrCodeIcon:t}=await Promise.resolve().then(()=>H7e);return{qrCodeIcon:t}},void 0)).qrCodeIcon,recycleHorizontal:async()=>(await J(async()=>{const{recycleHorizontalSvg:t}=await Promise.resolve().then(()=>W7e);return{recycleHorizontalSvg:t}},void 0)).recycleHorizontalSvg,refresh:async()=>(await J(async()=>{const{refreshSvg:t}=await Promise.resolve().then(()=>Z7e);return{refreshSvg:t}},void 0)).refreshSvg,search:async()=>(await J(async()=>{const{searchSvg:t}=await Promise.resolve().then(()=>Y7e);return{searchSvg:t}},void 0)).searchSvg,send:async()=>(await J(async()=>{const{sendSvg:t}=await Promise.resolve().then(()=>X7e);return{sendSvg:t}},void 0)).sendSvg,swapHorizontal:async()=>(await J(async()=>{const{swapHorizontalSvg:t}=await Promise.resolve().then(()=>eEe);return{swapHorizontalSvg:t}},void 0)).swapHorizontalSvg,swapHorizontalMedium:async()=>(await J(async()=>{const{swapHorizontalMediumSvg:t}=await Promise.resolve().then(()=>rEe);return{swapHorizontalMediumSvg:t}},void 0)).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await J(async()=>{const{swapHorizontalBoldSvg:t}=await Promise.resolve().then(()=>iEe);return{swapHorizontalBoldSvg:t}},void 0)).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>
3907(await J(async()=>{const{swapHorizontalRoundedBoldSvg:t}=await Promise.resolve().then(()=>oEe);return{swapHorizontalRoundedBoldSvg:t}},void 0)).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await J(async()=>{const{swapVerticalSvg:t}=await Promise.resolve().then(()=>cEe);return{swapVerticalSvg:t}},void 0)).swapVerticalSvg,solana:async()=>(await J(async()=>{const{solanaSvg:t}=await Promise.resolve().then(()=>uEe);return{solanaSvg:t}},void 0)).solanaSvg,telegram:async()=>(await J(async()=>{const{telegramSvg:t}=await Promise.resolve().then(()=>hEe);return{telegramSvg:t}},void 0)).telegramSvg,threeDots:async()=>(await J(async()=>{const{threeDotsSvg:t}=await Promise.resolve().then(()=>pEe);return{threeDotsSvg:t}},void 0)).threeDotsSvg,twitch:async()=>(await J(async()=>{const{twitchSvg:t}=await Promise.resolve().then(()=>wEe);return{twitchSvg:t}},void 0)).twitchSvg,twitter:async()=>(await J(async()=>{const{xSvg:t}=await Promise.resolve().then(()=>UI);return{xSvg:t}},void 0)).xSvg,twitterIcon:async()=>(await J(async()=>{const{twitterIconSvg:t}=await Promise.resolve().then(()=>bEe);return{twitterIconSvg:t}},void 0)).twitterIconSvg,verify:async()=>(await J(async()=>{const{verifySvg:t}=await Promise.resolve().then(()=>EEe);return{verifySvg:t}},void 0)).verifySvg,verifyFilled:async()=>(await J(async()=>{const{verifyFilledSvg:t}=await Promise.resolve().then(()=>xEe);return{verifyFilledSvg:t}},void 0)).verifyFilledSvg,wallet:async()=>(await J(async()=>{const{walletSvg:t}=await Promise.resolve().then(()=>SEe);return{walletSvg:t}},void 0)).walletSvg,walletConnect:async()=>(await J(async()=>{const{walletConnectSvg:t}=await Promise.resolve().then(()=>rb);return{walletConnectSvg:t}},void 0)).walletConnectSvg,walletConnectLightBrown:async()=>(await J(async()=>{const{walletConnectLightBrownSvg:t}=await Promise.resolve().then(()=>rb);return{walletConnectLightBrownSvg:t}},void 0)).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await J(async()=>{const{walletConnectBrownSvg:t}=await Promise.resolve().then(()=>rb);return{walletConnectBrownSvg:t}},void 0)).walletConnectBrownSvg,walletPlaceholder:async()=>(await J(async()=>{const{walletPlaceholderSvg:t}=await Promise.resolve().then(()=>TEe);return{walletPlaceholderSvg:t}},void 0)).walletPlaceholderSvg,warningCircle:async()=>(await J(async()=>{const{warningCircleSvg:t}=await Promise.resolve().then(()=>NEe);return{warningCircleSvg:t}},void 0)).warningCircleSvg,x:async()=>(await J(async()=>{const{xSvg:t}=await Promise.resolve().then(()=>UI);return{xSvg:t}},void 0)).xSvg,info:async()=>(await J(async()=>{const{infoSvg:t}=await Promise.resolve().then(()=>REe);return{infoSvg:t}},void 0)).infoSvg,exclamationTriangle:async()=>(await J(async()=>{const{exclamationTriangleSvg:t}=await Promise.resolve().then(()=>DEe);return{exclamationTriangleSvg:t}},void 0)).exclamationTriangleSvg,reown:async()=>(await J(async()=>{const{reownSvg:t}=await Promise.resolve().then(()=>MEe);return{reownSvg:t}},void 0)).reownSvg,"x-mark":async()=>(await J(async()=>{const{xMarkSvg:t}=await Promise.resolve().then(()=>jEe);return{xMarkSvg:t}},void 0)).xMarkSvg};async function Bye(t){if(Ty.has(t))return Ty.get(t);const r=(cI[t]??cI.copy)();return Ty.set(t,r),r}let Tu=class extends oe{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=`
3908      --local-color: ${`var(--wui-color-${this.color});`}
3909      --local-width: ${`var(--wui-icon-size-${this.size});`}
3910      --local-aspect-ratio: ${this.aspectRatio}
3911    `,q`${eB(Bye(this.name),q`<div class="fallback"></div>`)}`}};Tu.styles=[ve,Zp,Rye];eg([D()],Tu.prototype,"size",void 0);eg([D()],Tu.prototype,"name",void 0);eg([D()],Tu.prototype,"color",void 0);eg([D()],Tu.prototype,"aspectRatio",void 0);Tu=eg([ye("wui-icon")],Tu);const Dye=ne`
3912  :host {
3913    display: block;
3914    width: var(--local-width);
3915    height: var(--local-height);
3916  }
3917
3918  :host([data-object-fit='cover']) img {
3919    object-fit: cover;
3920    object-position: center center;
3921  }
3922
3923  :host([data-object-fit='contain']) img {
3924    object-fit: contain;
3925    object-position: center center;
3926  }
3927
3928  img {
3929    display: block;
3930    width: 100%;
3931    height: 100%;
3932    border-radius: inherit;
3933  }
3934`;var tg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
3934a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ou=class extends oe{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0,this.objectFit="cover"}render(){return this.objectFit&&(this.dataset.objectFit=this.objectFit),this.style.cssText=`
3935      --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};
3936      --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};
3937      `,q`<img src=${this.src} alt=${this.alt} @error=${this.handleImageError} />`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:!0,composed:!0}))}};Ou.styles=[ve,Zp,Dye];tg([D()],Ou.prototype,"src",void 0);tg([D()],Ou.prototype,"alt",void 0);tg([D()],Ou.prototype,"size",void 0);tg([D()],Ou.prototype,"objectFit",void 0);Ou=tg([ye("wui-image")],Ou);const Lye=ne`
3938  :host {
3939    display: inline-flex !important;
3940  }
3941
3942  slot {
3943    width: 100%;
3944    display: inline-block;
3945    font-style: normal;
3946    font-family: var(--wui-font-family);
3947    font-feature-settings:
3948      'tnum' on,
3949      'lnum' on,
3950      'case' on;
3951    line-height: 130%;
3952    font-weight: var(--wui-font-weight-regular);
3953    overflow: inherit;
3954    text-overflow: inherit;
3955    text-align: var(--local-align);
3956    color: var(--local-color);
3957  }
3958
3959  .wui-line-clamp-1 {
3960    overflow: hidden;
3961    display: -webkit-box;
3962    -webkit-box-orient: vertical;
3963    -webkit-line-clamp: 1;
3964  }
3965
3966  .wui-line-clamp-2 {
3967    overflow: hidden;
3968    display: -webkit-box;
3969    -webkit-box-orient: vertical;
3970    -webkit-line-clamp: 2;
3971  }
3972
3973  .wui-font-medium-400 {
3974    font-size: var(--wui-font-size-medium);
3975    font-weight: var(--wui-font-weight-light);
3976    letter-spacing: var(--wui-letter-spacing-medium);
3977  }
3978
3979  .wui-font-medium-600 {
3980    font-size: var(--wui-font-size-medium);
3981    letter-spacing: var(--wui-letter-spacing-medium);
3982  }
3983
3984  .wui-font-title-600 {
3985    font-size: var(--wui-font-size-title);
3986    letter-spacing: var(--wui-letter-spacing-title);
3987  }
3988
3989  .wui-font-title-6-600 {
3990    font-size: var(--wui-font-size-title-6);
3991    letter-spacing: var(--wui-letter-spacing-title-6);
3992  }
3993
3994  .wui-font-mini-700 {
3995    font-size: var(--wui-font-size-mini);
3996    letter-spacing: var(--wui-letter-spacing-mini);
3997    text-transform: uppercase;
3998  }
3999
4000  .wui-font-large-500,
4001  .wui-font-large-600,
4002  .wui-font-large-700 {
4003    font-size: var(--wui-font-size-large);
4004    letter-spacing: var(--wui-letter-spacing-large);
4005  }
4006
4007  .wui-font-2xl-500,
4008  .wui-font-2xl-600,
4009  .wui-font-2xl-700 {
4010    font-size: var(--wui-font-size-2xl);
4011    letter-spacing: var(--wui-letter-spacing-2xl);
4012  }
4013
4014  .wui-font-paragraph-400,
4015  .wui-font-paragraph-500,
4016  .wui-font-paragraph-600,
4017  .wui-font-paragraph-700 {
4018    font-size: var(--wui-font-size-paragraph);
4019    letter-spacing: var(--wui-letter-spacing-paragraph);
4020  }
4021
4022  .wui-font-small-400,
4023  .wui-font-small-500,
4024  .wui-font-small-600 {
4025    font-size: var(--wui-font-size-small);
4026    letter-spacing: var(--wui-letter-spacing-small);
4027  }
4028
4029  .wui-font-tiny-400,
4030  .wui-font-tiny-500,
4031  .wui-font-tiny-600 {
4032    font-size: var(--wui-font-size-tiny);
4033    letter-spacing: var(--wui-letter-spacing-tiny);
4034  }
4035
4036  .wui-font-micro-700,
4037  .wui-font-micro-600,
4038  .wui-font-micro-500 {
4039    font-size: var(--wui-font-size-micro);
4040    letter-spacing: var(--wui-letter-spacing-micro);
4041    text-transform: uppercase;
4042  }
4043
4044  .wui-font-tiny-400,
4045  .wui-font-small-400,
4046  .wui-font-medium-400,
4047  .wui-font-paragraph-400 {
4048    font-weight: var(--wui-font-weight-light);
4049  }
4050
4051  .wui-font-large-700,
4052  .wui-font-paragraph-700,
4053  .wui-font-micro-700,
4054  .wui-font-mini-700 {
4055    font-weight: var(--wui-font-weight-bold);
4056  }
4057
4058  .wui-font-medium-600,
4059  .wui-font-medium-title-600,
4060  .wui-font-title-6-600,
4061  .wui-font-large-600,
4062  .wui-font-paragraph-600,
4063  .wui-font-small-600,
4064  .wui-font-tiny-600,
4065  .wui-font-micro-600 {
4066    font-weight: var(--wui-font-weight-medium);
4067  }
4068
4069  :host([disabled]) {
4070    opacity: 0.4;
4071  }
4072`;var rg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
4072a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Nu=class extends oe{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left",this.lineClamp=void 0}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=`
4073      --local-align: ${this.align};
4074      --local-color: var(--wui-color-${this.color});
4075    `,q`<slot class=${Sm(e)}></slot>`}};Nu.styles=[ve,Lye];rg([D()],Nu.prototype,"variant",void 0);rg([D()],Nu.prototype,"color",void 0);rg([D()],Nu.prototype,"align",void 0);rg([D()],Nu.prototype,"lineClamp",void 0);Nu=rg([ye("wui-text")],Nu);const Mye=ne`
4076  a {
4077    border: 1px solid var(--wui-color-gray-glass-010);
4078    border-radius: var(--wui-border-radius-3xl);
4079  }
4080
4081  wui-image {
4082    border-radius: var(--wui-border-radius-3xl);
4083    overflow: hidden;
4084  }
4085
4086  a.disabled > wui-icon:not(.image-icon),
4087  a.disabled > wui-image {
4088    filter: grayscale(1);
4089  }
4090
4091  a[data-variant='fill'] {
4092    color: var(--wui-color-inverse-100);
4093    background-color: var(--wui-color-accent-100);
4094  }
4095
4096  a[data-variant='shade'],
4097  a[data-variant='shadeSmall'] {
4098    background-color: transparent;
4099    background-color: var(--wui-color-gray-glass-010);
4100    color: var(--wui-color-fg-200);
4101  }
4102
4103  a[data-variant='success'] {
4104    column-gap: var(--wui-spacing-xxs);
4105    border: 1px solid var(--wui-color-success-glass-010);
4106    background-color: var(--wui-color-success-glass-010);
4107    color: var(--wui-color-success-100);
4108  }
4109
4110  a[data-variant='error'] {
4111    column-gap: var(--wui-spacing-xxs);
4112    border: 1px solid var(--wui-color-error-glass-010);
4113    background-color: var(--wui-color-error-glass-010);
4114    color: var(--wui-color-error-100);
4115  }
4116
4117  a[data-variant='transparent'] {
4118    column-gap: var(--wui-spacing-xxs);
4119    background-color: transparent;
4120    color: var(--wui-color-fg-150);
4121  }
4122
4123  a[data-variant='transparent'],
4124  a[data-variant='success'],
4125  a[data-variant='shadeSmall'],
4126  a[data-variant='error'] {
4127    padding: 7px var(--wui-spacing-s) 7px 10px;
4128  }
4129
4130  a[data-variant='transparent']:has(wui-text:first-child),
4131  a[data-variant='success']:has(wui-text:first-child),
4132  a[data-variant='shadeSmall']:has(wui-text:first-child),
4133  a[data-variant='error']:has(wui-text:first-child) {
4134    padding: 7px var(--wui-spacing-s);
4135  }
4136
4137  a[data-variant='fill'],
4138  a[data-variant='shade'] {
4139    column-gap: var(--wui-spacing-xs);
4140    padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)
4141      var(--wui-spacing-xs);
4142  }
4143
4144  a[data-variant='fill']:has(wui-text:first-child),
4145  a[data-variant='shade']:has(wui-text:first-child) {
4146    padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);
4147  }
4148
4149  a[data-variant='fill'] > wui-image,
4150  a[data-variant='shade'] > wui-image {
4151    width: 24px;
4152    height: 24px;
4153  }
4154
4155  a[data-variant='fill'] > wui-image {
4156    box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
4157  }
4158
4159  a[data-variant='shade'] > wui-image,
4160  a[data-variant='shadeSmall'] > wui-image {
4161    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
4162  }
4163
4164  a[data-variant='fill'] > wui-icon:not(.image-icon),
4165  a[data-variant='shade'] > wui-icon:not(.image-icon) {
4166    width: 14px;
4167    height: 14px;
4168  }
4169
4170  a[data-variant='transparent'] > wui-image,
4171  a[data-variant='success'] > wui-image,
4172  a[data-variant='shadeSmall'] > wui-image,
4173  a[data-variant='error'] > wui-image {
4174    width: 14px;
4175    height: 14px;
4176  }
4177
4178  a[data-variant='transparent'] > wui-icon:not(.image-icon),
4179  a[data-variant='success'] > wui-icon:not(.image-icon),
4180  a[data-variant='shadeSmall'] > wui-icon:not(.image-icon),
4181  a[data-variant='error'] > wui-icon:not(.image-icon) {
4182    width: 12px;
4183    height: 12px;
4184  }
4185
4186  a[data-variant='fill']:focus-visible {
4187    background-color: var(--wui-color-accent-090);
4188  }
4189
4190  a[data-variant='shade']:focus-visible,
4191  a[data-variant='shadeSmall']:focus-visible {
4192    background-color: var(--wui-color-gray-glass-015);
4193  }
4194
4195  a[data-variant='transparent']:focus-visible {
4196    background-color: var(--wui-color-gray-glass-005);
4197  }
4198
4199  a[data-variant='success']:focus-visible {
4200    background-color: var(--wui-color-success-glass-015);
4201  }
4202
4203  a[data-variant='error']:focus-visible {
4204    background-color: var(--wui-color-error-glass-015);
4205  }
4206
4207  a.disabled {
4208    color: var(--wui-color-gray-glass-015);
4209    background-color: var(--wui-color-gray-glass-015);
4210    pointer-events: none;
4211  }
4212
4213  @media (hover: hover) and (pointer: fine) {
4214    a[data-variant='fill']:hover {
4215      background-color: var(--wui-color-accent-090);
4216    }
4217
4218    a[data-variant='shade']:hover,
4219    a[data-variant='shadeSmall']:hover {
4220      background-color: var(--wui-color-gray-glass-015);
4221    }
4222
4223    a[data-variant='transparent']:hover {
4224      background-color: var(--wui-color-gray-glass-005);
4225    }
4226
4227    a[data-variant='success']:hover {
4228      background-color: var(--wui-color-success-glass-015);
4229    }
4230
4231    a[data-variant='error']:hover {
4232      background-color: var(--wui-color-error-glass-015);
4233    }
4234  }
4235
4236  a[data-variant='fill']:active {
4237    background-color: var(--wui-color-accent-080);
4238  }
4239
4240  a[data-variant='shade']:active,
4241  a[data-variant='shadeSmall']:active {
4242    background-color: var(--wui-color-gray-glass-020);
4243  }
4244
4245  a[data-variant='transparent']:active {
4246    background-color: var(--wui-color-gray-glass-010);
4247  }
4248
4249  a[data-variant='success']:active {
4250    background-color: var(--wui-color-success-glass-020);
4251  }
4252
4253  a[data-variant='error']:active {
4254    background-color: var(--wui-color-error-glass-020);
4255  }
4256`;var oc=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
4256a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Xs=class extends oe{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.imageIcon=void 0,this.imageIconSize="md",this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){const r=this.variant==="success"||this.variant==="transparent"||this.variant==="shadeSmall"?"small-600":"paragraph-600";return q`
4257      <a
4258        rel="noreferrer"
4259        target="_blank"
4260        href=${this.href}
4261        class=${this.disabled?"disabled":""}
4262        data-variant=${this.variant}
4263      >
4264        ${this.imageTemplate()}
4265        <wui-text variant=${r} color="inherit">
4266          ${this.title?this.title:Pt.getHostName(this.href)}
4267        </wui-text>
4268        <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
4269      </a>
4270    `}imageTemplate(){return this.imageSrc?q`<wui-image src=${this.imageSrc}></wui-image>`:this.imageIcon?q`<wui-icon
4271        name=${this.imageIcon}
4272        color="inherit"
4273        size=${this.imageIconSize}
4274        class="image-icon"
4275      ></wui-icon>`:null}};Xs.styles=[ve,We,Mye];oc([D()],Xs.prototype,"variant",void 0);oc([D()],Xs.prototype,"imageSrc",void 0);oc([D()],Xs.prototype,"imageIcon",void 0);oc([D()],Xs.prototype,"imageIconSize",void 0);oc([D({type:Boolean})],Xs.prototype,"disabled",void 0);oc([D()],Xs.prototype,"icon",void 0);oc([D()],Xs.prototype,"href",void 0);oc([D()],Xs.prototype,"text",void 0);Xs=oc([ye("wui-chip")],Xs);const Uye=ne`
4276  :host {
4277    display: flex;
4278    width: inherit;
4279    height: inherit;
4280  }
4281`;var Wi=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Un=class extends oe{render(){return this.style.cssText=`
4282      flex-direction: ${this.flexDirection};
4283      flex-wrap: ${this.flexWrap};
4284      flex-basis: ${this.flexBasis};
4285      flex-grow: ${this.flexGrow};
4286      flex-shrink: ${this.flexShrink};
4287      align-items: ${this.alignItems};
4288      justify-content: ${this.justifyContent};
4289      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
4290      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
4291      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
4292      padding-top: ${this.padding&&Pt.getSpacingStyles(this.padding,0)};
4293      padding-right: ${this.padding&&Pt.getSpacingStyles(this.padding,1)};
4294      padding-bottom: ${this.padding&&Pt.getSpacingStyles(this.padding,2)};
4295      padding-left: ${this.padding&&Pt.getSpacingStyles(this.padding,3)};
4296      margin-top: ${this.margin&&Pt.getSpacingStyles(this.margin,0)};
4297      margin-right: ${this.margin&&Pt.getSpacingStyles(this.margin,1)};
4298      margin-bottom: ${this.margin&&Pt.getSpacingStyles(this.margin,2)};
4299      margin-left: ${this.margin&&Pt.getSpacingStyles(this.margin,3)};
4300    `,q`<slot></slot>`}};Un.styles=[ve,Uye];Wi([D()],Un.prototype,"flexDirection",void 0);Wi([D()],Un.prototype,"flexWrap",void 0);Wi([D()],Un.prototype,"flexBasis",void 0);Wi([D()],Un.prototype,"flexGrow",void 0);Wi([D()],Un.prototype,"flexShrink",void 0);Wi([D()],Un.prototype,"alignItems",void 0);Wi([D()],Un.prototype,"justifyContent",void 0);Wi([D()],Un.prototype,"columnGap",void 0);Wi([D()],Un.prototype,"rowGap",void 0);Wi([D()],Un.prototype,"gap",void 0);Wi([D()],Un.prototype,"padding",void 0);Wi([D()],Un.prototype,"margin",void 0);Un=Wi([ye("wui-flex")],Un);const jye=ne`
4301  :host {
4302    display: flex;
4303  }
4304
4305  :host([data-size='sm']) > svg {
4306    width: 12px;
4307    height: 12px;
4308  }
4309
4310  :host([data-size='md']) > svg {
4311    width: 16px;
4312    height: 16px;
4313  }
4314
4315  :host([data-size='lg']) > svg {
4316    width: 24px;
4317    height: 24px;
4318  }
4319
4320  :host([data-size='xl']) > svg {
4321    width: 32px;
4322    height: 32px;
4323  }
4324
4325  svg {
4326    animation: rotate 2s linear infinite;
4327  }
4328
4329  circle {
4330    fill: none;
4331    stroke: var(--local-color);
4332    stroke-width: 4px;
4333    stroke-dasharray: 1, 124;
4334    stroke-dashoffset: 0;
4335    stroke-linecap: round;
4336    animation: dash 1.5s ease-in-out infinite;
4337  }
4338
4339  :host([data-size='md']) > svg > circle {
4340    stroke-width: 6px;
4341  }
4342
4343  :host([data-size='sm']) > svg > circle {
4344    stroke-width: 8px;
4345  }
4346
4347  @keyframes rotate {
4348    100% {
4349      transform: rotate(360deg);
4350    }
4351  }
4352
4353  @keyframes dash {
4354    0% {
4355      stroke-dasharray: 1, 124;
4356      stroke-dashoffset: 0;
4357    }
4358
4359    50% {
4360      stroke-dasharray: 90, 124;
4361      stroke-dashoffset: -35;
4362    }
4363
4364    100% {
4365      stroke-dashoffset: -125;
4366    }
4367  }
4368`;var $8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
4368a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let X1=class extends oe{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: ${this.color==="inherit"?"inherit":`var(--wui-color-${this.color})`}`,this.dataset.size=this.size,q`<svg viewBox="25 25 50 50">
4369      <circle r="20" cy="50" cx="50"></circle>
4370    </svg>`}};X1.styles=[ve,jye];$8([D()],X1.prototype,"color",void 0);$8([D()],X1.prototype,"size",void 0);X1=$8([ye("wui-loading-spinner")],X1);const zye=ne`
4371  :host {
4372    position: relative;
4373    width: 100%;
4374    display: inline-block;
4375    color: var(--wui-color-fg-275);
4376  }
4377
4378  input {
4379    width: 100%;
4380    border-radius: var(--wui-border-radius-xs);
4381    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
4382    background: var(--wui-color-gray-glass-002);
4383    font-size: var(--wui-font-size-paragraph);
4384    letter-spacing: var(--wui-letter-spacing-paragraph);
4385    color: var(--wui-color-fg-100);
4386    transition:
4387      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
4388      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
4389      box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
4390    will-change: background-color, border-color, box-shadow;
4391    caret-color: var(--wui-color-accent-100);
4392  }
4393
4394  input:disabled {
4395    cursor: not-allowed;
4396    border: 1px solid var(--wui-color-gray-glass-010);
4397  }
4398
4399  input:disabled::placeholder,
4400  input:disabled + wui-icon {
4401    color: var(--wui-color-fg-300);
4402  }
4403
4404  input::placeholder {
4405    color: var(--wui-color-fg-275);
4406  }
4407
4408  input:focus:enabled {
4409    background-color: var(--wui-color-gray-glass-005);
4410    -webkit-box-shadow:
4411      inset 0 0 0 1px var(--wui-color-accent-100),
4412      0px 0px 0px 4px var(--wui-box-shadow-blue);
4413    -moz-box-shadow:
4414      inset 0 0 0 1px var(--wui-color-accent-100),
4415      0px 0px 0px 4px var(--wui-box-shadow-blue);
4416    box-shadow:
4417      inset 0 0 0 1px var(--wui-color-accent-100),
4418      0px 0px 0px 4px var(--wui-box-shadow-blue);
4419  }
4420
4421  input:hover:enabled {
4422    background-color: var(--wui-color-gray-glass-005);
4423  }
4424
4425  wui-icon {
4426    position: absolute;
4427    top: 50%;
4428    transform: translateY(-50%);
4429    pointer-events: none;
4430  }
4431
4432  .wui-size-sm {
4433    padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
4434  }
4435
4436  wui-icon + .wui-size-sm {
4437    padding: 9px var(--wui-spacing-m) 10px 36px;
4438  }
4439
4440  wui-icon[data-input='sm'] {
4441    left: var(--wui-spacing-s);
4442  }
4443
4444  .wui-size-md {
4445    padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
4446  }
4447
4448  wui-icon + .wui-size-md,
4449  wui-loading-spinner + .wui-size-md {
4450    padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);
4451  }
4452
4453  wui-icon[data-input='md'] {
4454    left: var(--wui-spacing-l);
4455  }
4456
4457  .wui-size-lg {
4458    padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
4459    letter-spacing: var(--wui-letter-spacing-medium-title);
4460    font-size: var(--wui-font-size-medium-title);
4461    font-weight: var(--wui-font-weight-light);
4462    line-height: 130%;
4463    color: var(--wui-color-fg-100);
4464    height: 64px;
4465  }
4466
4467  .wui-padding-right-xs {
4468    padding-right: var(--wui-spacing-xs);
4469  }
4470
4471  .wui-padding-right-s {
4472    padding-right: var(--wui-spacing-s);
4473  }
4474
4475  .wui-padding-right-m {
4476    padding-right: var(--wui-spacing-m);
4477  }
4478
4479  .wui-padding-right-l {
4480    padding-right: var(--wui-spacing-l);
4481  }
4482
4483  .wui-padding-right-xl {
4484    padding-right: var(--wui-spacing-xl);
4485  }
4486
4487  .wui-padding-right-2xl {
4488    padding-right: var(--wui-spacing-2xl);
4489  }
4490
4491  .wui-padding-right-3xl {
4492    padding-right: var(--wui-spacing-3xl);
4493  }
4494
4495  .wui-padding-right-4xl {
4496    padding-right: var(--wui-spacing-4xl);
4497  }
4498
4499  .wui-padding-right-5xl {
4500    padding-right: var(--wui-spacing-5xl);
4501  }
4502
4503  wui-icon + .wui-size-lg,
4504  wui-loading-spinner + .wui-size-lg {
4505    padding-left: 50px;
4506  }
4507
4508  wui-icon[data-input='lg'] {
4509    left: var(--wui-spacing-l);
4510  }
4511
4512  .wui-size-mdl {
4513    padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);
4514  }
4515  wui-icon + .wui-size-mdl,
4516  wui-loading-spinner + .wui-size-mdl {
4517    padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;
4518  }
4519  wui-icon[data-input='mdl'] {
4520    left: var(--wui-spacing-m);
4521  }
4522
4523  input:placeholder-shown ~ ::slotted(wui-input-element),
4524  input:placeholder-shown ~ ::slotted(wui-icon) {
4525    opacity: 0;
4526    pointer-events: none;
4527  }
4528
4529  input::-webkit-outer-spin-button,
4530  input::-webkit-inner-spin-button {
4531    -webkit-appearance: none;
4532    margin: 0;
4533  }
4534
4535  input[type='number'] {
4536    -moz-appearance: textfield;
4537  }
4538
4539  ::slotted(wui-input-element),
4540  ::slotted(wui-icon) {
4541    position: absolute;
4542    top: 50%;
4543    transform: translateY(-50%);
4544  }
4545
4546  ::slotted(wui-input-element) {
4547    right: var(--wui-spacing-m);
4548  }
4549
4550  ::slotted(wui-icon) {
4551    right: 0px;
4552  }
4553`;var Yo=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
4553a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ys=class extends oe{constructor(){super(...arguments),this.inputElementRef=hl(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const e=`wui-padding-right-${this.inputRightPadding}`,n={[`wui-size-${this.size}`]:!0,[e]:!!this.inputRightPadding};return q`${this.templateIcon()}
4554      <input
4555        data-testid="wui-input-text"
4556        ${fl(this.inputElementRef)}
4557        class=${Sm(n)}
4558        type=${this.type}
4559        enterkeyhint=${Ft(this.enterKeyHint)}
4560        ?disabled=${this.disabled}
4561        placeholder=${this.placeholder}
4562        @input=${this.dispatchInputChangeEvent.bind(this)}
4563        .value=${this.value||""}
4564        tabindex=${Ft(this.tabIdx)}
4565      />
4566      <slot></slot>`}templateIcon(){return this.icon?q`<wui-icon
4567        data-input=${this.size}
4568        size=${this.size}
4569        color="inherit"
4570        name=${this.icon}
4571      ></wui-icon>`:null}dispatchInputChangeEvent(){var e;this.dispatchEvent(new CustomEvent("inputChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.value,bubbles:!0,composed:!0}))}};ys.styles=[ve,We,zye];Yo([D()],ys.prototype,"size",void 0);Yo([D()],ys.prototype,"icon",void 0);Yo([D({type:Boolean})],ys.prototype,"disabled",void 0);Yo([D()],ys.prototype,"placeholder",void 0);Yo([D()],ys.prototype,"type",void 0);Yo([D()],ys.prototype,"keyHint",void 0);Yo([D()],ys.prototype,"value",void 0);Yo([D()],ys.prototype,"inputRightPadding",void 0);Yo([D()],ys.prototype,"tabIdx",void 0);ys=Yo([ye("wui-input-text")],ys);const Fye=ne`
4572  :host {
4573    position: relative;
4574    width: 100%;
4575    display: inline-block;
4576    color: var(--wui-color-fg-275);
4577  }
4578
4579  .error {
4580    margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
4581  }
4582
4583  .base-name {
4584    position: absolute;
4585    right: 45px;
4586    top: 15px;
4587    text-align: right;
4588  }
4589`;var ng=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ku=class extends oe{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return q`
4590      <wui-input-text
4591        value=${Ft(this.value)}
4592        ?disabled=${this.disabled}
4593        .value=${this.value||""}
4594        data-testid="wui-ens-input"
4595        inputRightPadding="5xl"
4596      >
4597        ${this.baseNameTemplate()} ${this.errorTemplate()}${this.loadingTemplate()}
4598      </wui-input-text>
4599    `}baseNameTemplate(){return q`<wui-text variant="paragraph-400" color="fg-200" class="base-name">
4600      ${Be.WC_NAME_SUFFIX}
4601    </wui-text>`}loadingTemplate(){return this.loading?q`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}errorTemplate(){return this.errorMessage?q`<wui-text variant="tiny-500" color="error-100" class="error"
4602        >${this.errorMessage}</wui-text
4603      >`:null}};ku.styles=[ve,Fye];ng([D()],ku.prototype,"errorMessage",void 0);ng([D({type:Boolean})],ku.prototype,"disabled",void 0);ng([D()],ku.prototype,"value",void 0);ng([D({type:Boolean})],ku.prototype,"loading",void 0);ku=ng([ye("wui-ens-input")],ku);const qye=ne`
4604  button {
4605    border-radius: var(--local-border-radius);
4606    color: var(--wui-color-fg-100);
4607    padding: var(--local-padding);
4608  }
4609
4610  @media (max-width: 700px) {
4611    :host(:not([size='sm'])) button {
4612      padding: var(--wui-spacing-s);
4613    }
4614  }
4615
4616  button > wui-icon {
4617    pointer-events: none;
4618  }
4619
4620  button:disabled > wui-icon {
4621    color: var(--wui-color-bg-300) !important;
4622  }
4623
4624  button:disabled {
4625    background-color: transparent;
4626  }
4627`;var ig=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ru=class extends oe{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){this.dataset.size=this.size;let e="",r="";switch(this.size){case"lg":e="--wui-border-radius-xs",r="--wui-spacing-1xs";break;case"sm":e="--wui-border-radius-3xs",r="--wui-spacing-xxs";break;default:e="--wui-border-radius-xxs",r="--wui-spacing-2xs";break}return this.style.cssText=`
4628    --local-border-radius: var(${e});
4629    --local-padding: var(${r});
4630    `,q`
4631      <button ?disabled=${this.disabled}>
4632        <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
4633      </button>
4634    `}};Ru.styles=[ve,We,Zp,qye];ig([D()],Ru.prototype,"size",void 0);ig([D({type:Boolean})],Ru.prototype,"disabled",void 0);ig([D()],Ru.prototype,"icon",void 0);ig([D()],Ru.prototype,"iconColor",void 0);Ru=ig([ye("wui-icon-link")],Ru);const Hye=ne`
4635  :host {
4636    display: flex;
4637    justify-content: center;
4638    align-items: center;
4639    height: var(--wui-spacing-m);
4640    padding: 0 var(--wui-spacing-3xs) !important;
4641    border-radius: var(--wui-border-radius-5xs);
4642    transition:
4643      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
4644      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
4645    will-change: border-radius, background-color;
4646  }
4647
4648  :host > wui-text {
4649    transform: translateY(5%);
4650  }
4651
4652  :host([data-variant='main']) {
4653    background-color: var(--wui-color-accent-glass-015);
4654    color: var(--wui-color-accent-100);
4655  }
4656
4657  :host([data-variant='shade']) {
4658    background-color: var(--wui-color-gray-glass-010);
4659    color: var(--wui-color-fg-200);
4660  }
4661
4662  :host([data-variant='success']) {
4663    background-color: var(--wui-icon-box-bg-success-100);
4664    color: var(--wui-color-success-100);
4665  }
4666
4667  :host([data-variant='error']) {
4668    background-color: var(--wui-icon-box-bg-error-100);
4669    color: var(--wui-color-error-100);
4670  }
4671
4672  :host([data-size='lg']) {
4673    padding: 11px 5px !important;
4674  }
4675
4676  :host([data-size='lg']) > wui-text {
4677    transform: translateY(2%);
4678  }
4679
4680  :host([data-size='xs']) {
4681    height: var(--wui-spacing-2l);
4682    padding: 0 var(--wui-spacing-3xs) !important;
4683  }
4684
4685  :host([data-size='xs']) > wui-text {
4686    transform: translateY(2%);
4687  }
4688`;var A8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Q1=class extends oe{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e=this.size==="md"||this.size==="xs"?"mini-700":"micro-700";return q`
4689      <wui-text data-variant=${this.variant} variant=${e} color="inherit">
4690        <slot></slot>
4691      </wui-text>
4692    `}};Q1.styles=[ve,Hye];A8([D()],Q1.prototype,"variant",void 0);A8([D()],Q1.prototype,"size",void 0);Q1=A8([ye("wui-tag")],Q1);const Vye=ne`
4693  :host {
4694    width: var(--local-width);
4695    position: relative;
4696  }
4697
4698  button {
4699    border: none;
4700    border-radius: var(--local-border-radius);
4701    width: var(--local-width);
4702    white-space: nowrap;
4703  }
4704
4705  /* -- Sizes --------------------------------------------------- */
4706  button[data-size='xs'] {
4707    padding: var(--wui-spacing-3xs) var(--wui-spacing-s) var(--wui-spacing-3xs) var(--wui-spacing-s);
4708    height: 24px;
4709  }
4710
4711  button[data-size='xs'][data-icon-left='true'][data-icon-right='false'] {
4712    padding: var(--wui-spacing-3xs) var(--wui-spacing-s) var(--wui-spacing-3xs) var(--wui-spacing-s);
4713  }
4714
4715  button[data-size='xs'][data-icon-right='true'][data-icon-left='false'] {
4716    padding: var(--wui-spacing-3xs) var(--wui-spacing-s) var(--wui-spacing-3xs) var(--wui-spacing-s);
4717  }
4718
4719  button[data-size='sm'] {
4720    padding: 7.2px var(--wui-spacing-s) 7.2px var(--wui-spacing-s);
4721    height: 32px;
4722  }
4723
4724  button[data-size='sm'][data-icon-left='true'][data-icon-right='false'] {
4725    padding: 7.2px var(--wui-spacing-s) 7.2px var(--wui-spacing-s);
4726  }
4727
4728  button[data-size='sm'][data-icon-right='true'][data-icon-left='false'] {
4729    padding: 7.2px var(--wui-spacing-s) 7.2px var(--wui-spacing-s);
4730  }
4731
4732  button[data-size='md'] {
4733    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
4734    height: 36px;
4735  }
4736
4737  button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
4738    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
4739  }
4740
4741  button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
4742    padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
4743  }
4744
4745  button[data-size='lg'] {
4746    padding: var(--wui-spacing-m) var(--wui-spacing-2l);
4747    height: 48px;
4748  }
4749
4750  /* -- Variants --------------------------------------------------------- */
4751  button[data-variant='main'] {
4752    background-color: var(--wui-color-accent-100);
4753    color: var(--wui-color-inverse-100);
4754    border: none;
4755    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
4756  }
4757
4758  button[data-variant='inverse'] {
4759    background-color: var(--wui-color-inverse-100);
4760    color: var(--wui-color-inverse-000);
4761    border: none;
4762    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
4763  }
4764
4765  button[data-variant='accent'] {
4766    background-color: var(--wui-color-accent-glass-010);
4767    color: var(--wui-color-accent-100);
4768    border: none;
4769    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
4770  }
4771
4772  button[data-variant='accent-error'] {
4773    background: var(--wui-color-error-glass-015);
4774    color: var(--wui-color-error-100);
4775    border: none;
4776    box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);
4777  }
4778
4779  button[data-variant='accent-success'] {
4780    background: var(--wui-color-success-glass-015);
4781    color: var(--wui-color-success-100);
4782    border: none;
4783    box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);
4784  }
4785
4786  button[data-variant='neutral'] {
4787    background: transparent;
4788    color: var(--wui-color-fg-100);
4789    border: none;
4790    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
4791  }
4792
4793  /* -- Focus states --------------------------------------------------- */
4794  button[data-variant='main']:focus-visible:enabled {
4795    background-color: var(--wui-color-accent-090);
4796    box-shadow:
4797      inset 0 0 0 1px var(--wui-color-accent-100),
4798      0 0 0 4px var(--wui-color-accent-glass-020);
4799  }
4800  button[data-variant='inverse']:focus-visible:enabled {
4801    background-color: var(--wui-color-inverse-100);
4802    box-shadow:
4803      inset 0 0 0 1px var(--wui-color-gray-glass-010),
4804      0 0 0 4px var(--wui-color-accent-glass-020);
4805  }
4806  button[data-variant='accent']:focus-visible:enabled {
4807    background-color: var(--wui-color-accent-glass-010);
4808    box-shadow:
4809      inset 0 0 0 1px var(--wui-color-accent-100),
4810      0 0 0 4px var(--wui-color-accent-glass-020);
4811  }
4812  button[data-variant='accent-error']:focus-visible:enabled {
4813    background: var(--wui-color-error-glass-015);
4814    box-shadow:
4815      inset 0 0 0 1px var(--wui-color-error-100),
4816      0 0 0 4px var(--wui-color-error-glass-020);
4817  }
4818  button[data-variant='accent-success']:focus-visible:enabled {
4819    background: var(--wui-color-success-glass-015);
4820    box-shadow:
4821      inset 0 0 0 1px var(--wui-color-success-100),
4822      0 0 0 4px var(--wui-color-success-glass-020);
4823  }
4824  button[data-variant='neutral']:focus-visible:enabled {
4825    background: var(--wui-color-gray-glass-005);
4826    box-shadow:
4827      inset 0 0 0 1px var(--wui-color-gray-glass-010),
4828      0 0 0 4px var(--wui-color-gray-glass-002);
4829  }
4830
4831  /* -- Hover & Active states ----------------------------------------------------------- */
4832  @media (hover: hover) and (pointer: fine) {
4833    button[data-variant='main']:hover:enabled {
4834      background-color: var(--wui-color-accent-090);
4835    }
4836
4837    button[data-variant='main']:active:enabled {
4838      background-color: var(--wui-color-accent-080);
4839    }
4840
4841    button[data-variant='accent']:hover:enabled {
4842      background-color: var(--wui-color-accent-glass-015);
4843    }
4844
4845    button[data-variant='accent']:active:enabled {
4846      background-color: var(--wui-color-accent-glass-020);
4847    }
4848
4849    button[data-variant='accent-error']:hover:enabled {
4850      background: var(--wui-color-error-glass-020);
4851      color: var(--wui-color-error-100);
4852    }
4853
4854    button[data-variant='accent-error']:active:enabled {
4855      background: var(--wui-color-error-glass-030);
4856      color: var(--wui-color-error-100);
4857    }
4858
4859    button[data-variant='accent-success']:hover:enabled {
4860      background: var(--wui-color-success-glass-020);
4861      color: var(--wui-color-success-100);
4862    }
4863
4864    button[data-variant='accent-success']:active:enabled {
4865      background: var(--wui-color-success-glass-030);
4866      color: var(--wui-color-success-100);
4867    }
4868
4869    button[data-variant='neutral']:hover:enabled {
4870      background: var(--wui-color-gray-glass-002);
4871    }
4872
4873    button[data-variant='neutral']:active:enabled {
4874      background: var(--wui-color-gray-glass-005);
4875    }
4876
4877    button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
4878      padding-left: var(--wui-spacing-m);
4879    }
4880
4881    button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
4882      padding-right: var(--wui-spacing-m);
4883    }
4884  }
4885
4886  /* -- Disabled state --------------------------------------------------- */
4887  button:disabled {
4888    background-color: var(--wui-color-gray-glass-002);
4889    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
4890    color: var(--wui-color-gray-glass-020);
4891    cursor: not-allowed;
4892  }
4893
4894  button > wui-text {
4895    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
4896    will-change: opacity;
4897    opacity: var(--local-opacity-100);
4898  }
4899
4900  ::slotted(*) {
4901    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
4902    will-change: opacity;
4903    opacity: var(--local-opacity-100);
4904  }
4905
4906  wui-loading-spinner {
4907    position: absolute;
4908    left: 50%;
4909    top: 50%;
4910    transform: translate(-50%, -50%);
4911    opacity: var(--local-opacity-000);
4912  }
4913`;var Jo=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const lI={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},Wye={lg:"paragraph-600",md:"small-600",sm:"small-600",xs:"tiny-600"},Kye={lg:"md",md:"md",sm:"sm",xs:"sm"};let bs=class extends oe{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`
4914    --local-width: ${this.fullWidth?"100%":"auto"};
4915    --local-opacity-100: ${this.loading?0:1};
4916    --local-opacity-000: ${this.loading?1:0};
4917    --local-border-radius: var(--wui-border-radius-${this.borderRadius});
4918    `;const e=this.textVariant??Wye[this.size];return q`
4919      <button
4920        data-variant=${this.variant}
4921        data-icon-left=${this.hasIconLeft}
4922        data-icon-right=${this.hasIconRight}
4923        data-size=${this.size}
4924        ?disabled=${this.disabled}
4925      >
4926        ${this.loadingTemplate()}
4927        <slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot>
4928        <wui-text variant=${e} color="inherit">
4929          <slot></slot>
4930        </wui-text>
4931        <slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot>
4932      </button>
4933    `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const e=Kye[this.size],r=this.disabled?lI.disabled:lI[this.variant];return q`<wui-loading-spinner color=${r} size=${e}></wui-loading-spinner>`}return q``}};bs.styles=[ve,We,Vye];Jo([D()],bs.prototype,"size",void 0);Jo([D({type:Boolean})],bs.prototype,"disabled",void 0);Jo([D({type:Boolean})],bs.prototype,"fullWidth",void 0);Jo([D({type:Boolean})],bs.prototype,"loading",void 0);Jo([D()],bs.prototype,"variant",void 0);Jo([D({type:Boolean})],bs.prototype,"hasIconLeft",void 0);Jo([D({type:Boolean})],bs.prototype,"hasIconRight",void 0);Jo([D()],bs.prototype,"borderRadius",void 0);Jo([D()],bs.prototype,"textVariant",void 0);bs=Jo([ye("wui-button")],bs);const Zye=ne`
4934  :host {
4935    display: inline-flex;
4936    justify-content: center;
4937    align-items: center;
4938    position: relative;
4939    overflow: hidden;
4940    background-color: var(--wui-color-gray-glass-020);
4941    border-radius: var(--local-border-radius);
4942    border: var(--local-border);
4943    box-sizing: content-box;
4944    width: var(--local-size);
4945    height: var(--local-size);
4946    min-height: var(--local-size);
4947    min-width: var(--local-size);
4948  }
4949
4950  @supports (background: color-mix(in srgb, white 50%, black)) {
4951    :host {
4952      background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);
4953    }
4954  }
4955`;var ac=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Qs=class extends oe{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,r=this.size==="lg",n=this.size==="xl",i=r?"12%":"16%",s=r?"xxs":n?"s":"3xl",o=this.background==="gray",a=this.background==="opaque",c=this.backgroundColor==="accent-100"&&a||this.backgroundColor==="success-100"&&a||this.backgroundColor==="error-100"&&a||this.backgroundColor==="inverse-100"&&a;let l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(l=`var(--wui-color-gray-${this.backgroundColor})`),this.style.cssText=`
4956       --local-bg-value: ${l};
4957       --local-bg-mix: ${c||o?"100%":i};
4958       --local-border-radius: var(--wui-border-radius-${s});
4959       --local-size: var(--wui-icon-box-size-${this.size});
4960       --local-border: ${this.borderColor==="wui-color-bg-125"?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}
4961   `,q` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}};Qs.styles=[ve,We,Zye];ac([D()],Qs.prototype,"size",void 0);ac([D()],Qs.prototype,"backgroundColor",void 0);ac([D()],Qs.prototype,"iconColor",void 0);ac([D()],Qs.prototype,"iconSize",void 0);ac([D()],Qs.prototype,"background",void 0);ac([D({type:Boolean})],Qs.prototype,"border",void 0);ac([D()],Qs.prototype,"borderColor",void 0);ac([D()],Qs.prototype,"icon",void 0);Qs=ac([ye("wui-icon-box")],Qs);const Gye=ne`
4962  button {
4963    padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
4964    border-radius: var(--wui-border-radius-3xs);
4965    background-color: transparent;
4966    color: var(--wui-color-accent-100);
4967  }
4968
4969  button:disabled {
4970    background-color: transparent;
4971    color: var(--wui-color-gray-glass-015);
4972  }
4973
4974  button:hover {
4975    background-color: var(--wui-color-gray-glass-005);
4976  }
4977`;var Pm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
4977a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let n0=class extends oe{constructor(){super(...arguments),this.tabIdx=void 0,this.disabled=!1,this.color="inherit"}render(){return q`
4978      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
4979        <slot name="iconLeft"></slot>
4980        <wui-text variant="small-600" color=${this.color}>
4981          <slot></slot>
4982        </wui-text>
4983        <slot name="iconRight"></slot>
4984      </button>
4985    `}};n0.styles=[ve,We,Gye];Pm([D()],n0.prototype,"tabIdx",void 0);Pm([D({type:Boolean})],n0.prototype,"disabled",void 0);Pm([D()],n0.prototype,"color",void 0);n0=Pm([ye("wui-link")],n0);const Yye=ne`
4986  :host {
4987    position: relative;
4988    display: inline-block;
4989  }
4990
4991  input {
4992    width: 50px;
4993    height: 50px;
4994    background: var(--wui-color-gray-glass-010);
4995    border-radius: var(--wui-border-radius-xs);
4996    border: 1px solid var(--wui-color-gray-glass-005);
4997    font-family: var(--wui-font-family);
4998    font-size: var(--wui-font-size-large);
4999    font-weight: var(--wui-font-weight-regular);
5000    letter-spacing: var(--wui-letter-spacing-large);
5001    text-align: center;
5002    color: var(--wui-color-fg-100);
5003    caret-color: var(--wui-color-accent-100);
5004    transition:
5005      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
5006      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
5007      box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
5008    will-change: background-color, border-color, box-shadow;
5009    box-sizing: border-box;
5010    -webkit-appearance: none;
5011    -moz-appearance: textfield;
5012    padding: 0px;
5013  }
5014
5015  input::-webkit-outer-spin-button,
5016  input::-webkit-inner-spin-button {
5017    -webkit-appearance: none;
5018    margin: 0;
5019  }
5020
5021  input[type='number'] {
5022    -moz-appearance: textfield;
5023  }
5024
5025  input:disabled {
5026    cursor: not-allowed;
5027    border: 1px solid var(--wui-color-gray-glass-010);
5028    background: var(--wui-color-gray-glass-005);
5029  }
5030
5031  input:focus:enabled {
5032    background-color: var(--wui-color-gray-glass-015);
5033    border: 1px solid var(--wui-color-accent-100);
5034    -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
5035    -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
5036    box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
5037  }
5038
5039  @media (hover: hover) and (pointer: fine) {
5040    input:hover:enabled {
5041      background-color: var(--wui-color-gray-glass-015);
5042    }
5043  }
5044`;var P8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ep=class extends oe{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return q`<input
5045      type="number"
5046      maxlength="1"
5047      inputmode="numeric"
5048      autofocus
5049      ?disabled=${this.disabled}
5050      value=${this.value}
5051    /> `}};ep.styles=[ve,We,Yye];P8([D({type:Boolean})],ep.prototype,"disabled",void 0);P8([D({type:String})],ep.prototype,"value",void 0);ep=P8([ye("wui-input-numeric")],ep);const Jye=ne`
5052  :host {
5053    position: relative;
5054    display: block;
5055  }
5056`;var Tm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let i0=class extends oe{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(n=>n!==""),this.handleKeyDown=(e,r)=>{const n=e.target,i=this.getInputElement(n),s=["ArrowLeft","ArrowRight","Shift","Delete"];if(!i)return;s.includes(e.key)&&e.preventDefault();const o=i.selectionStart;switch(e.key){case"ArrowLeft":o&&i.setSelectionRange(o+1,o+1),this.focusInputField("prev",r);break;case"ArrowRight":this.focusInputField("next",r);break;case"Shift":this.focusInputField("next",r);break;case"Delete":i.value===""?this.focusInputField("prev",r):this.updateInput(i,r,"");break;case"Backspace":i.value===""?this.focusInputField("prev",r):this.updateInput(i,r,"");break}},this.focusInputField=(e,r)=>{if(e==="next"){const n=r+1;if(!this.shouldInputBeEnabled(n))return;const i=this.numerics[n<this.length?n:r],s=i?this.getInputElement(i):void 0;s&&(s.disabled=!1,s.focus())}if(e==="prev"){const n=r-1,i=this.numerics[n>-1?n:r],s=i?this.getInputElement(i):void 0;s&&s.focus()}}}firstUpdated(){var r,n;this.otp&&(this.values=this.otp.split(""));const e=(r=this.shadowRoot)==null?void 0:r.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),(n=this.numerics[0])==null||n.focus()}render(){return q`
5057      <wui-flex gap="xxs" data-testid="wui-otp-input">
5058        ${Array.from({length:this.length}).map((e,r)=>q`
5059            <wui-input-numeric
5060              @input=${n=>this.handleInput(n,r)}
5061              @click=${n=>this.selectInput(n)}
5062              @keydown=${n=>this.handleKeyDown(n,r)}
5063              .disabled=${!this.shouldInputBeEnabled(r)}
5064              .value=${this.values[r]||""}
5065            >
5066            </wui-input-numeric>
5067          `)}
5068      </wui-flex>
5069    `}updateInput(e,r,n){const i=this.numerics[r],s=e||(i?this.getInputElement(i):void 0);s&&(s.value=n,this.values=this.values.map((o,a)=>a===r?n:o))}selectInput(e){const r=e.target;if(r){const n=this.getInputElement(r);n==null||n.select()}}handleInput(e,r){const n=e.target,i=this.getInputElement(n);if(i){const s=i.value;e.inputType==="insertFromPaste"?this.handlePaste(i,s,r):Pt.isNumber(s)&&e.data?(this.updateInput(i,r,e.data),this.focusInputField("next",r)):this.updateInput(i,r,"")}this.dispatchInputChangeEvent()}handlePaste(e,r,n){const i=r[0];if(i&&Pt.isNumber(i)){this.updateInput(e,n,i);const o=r.substring(1);if(n+1<this.length&&o.length){const a=this.numerics[n+1],c=a?this.getInputElement(a):void 0;c&&this.handlePaste(c,o,n+1)}else this.focusInputField("next",n)}else this.updateInput(e,n,"")}getInputElement(e){var r;return(r=e.shadowRoot)!=null&&r.querySelector("input")?e.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){const e=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:e,bubbles:!0,composed:!0}))}};i0.styles=[ve,Jye];Tm([D({type:Number})],i0.prototype,"length",void 0);Tm([D({type:String})],i0.prototype,"otp",void 0);Tm([Qu()],i0.prototype,"values",void 0);i0=Tm([ye("wui-otp")],i0);const Xye=ne`
5070  :host {
5071    position: relative;
5072    display: inline-block;
5073  }
5074
5075  wui-text {
5076    margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
5077  }
5078`;var sg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Bu=class extends oe{constructor(){super(...arguments),this.disabled=!1}render(){return q`
5079      <wui-input-text
5080        type="email"
5081        placeholder="Email"
5082        icon="mail"
5083        size="mdl"
5084        .disabled=${this.disabled}
5085        .value=${this.value}
5086        data-testid="wui-email-input"
5087        tabIdx=${Ft(this.tabIdx)}
5088      ></wui-input-text>
5089      ${this.templateError()}
5090    `}templateError(){return this.errorMessage?q`<wui-text variant="tiny-500" color="error-100">${this.errorMessage}</wui-text>`:null}};Bu.styles=[ve,Xye];sg([D()],Bu.prototype,"errorMessage",void 0);sg([D({type:Boolean})],Bu.prototype,"disabled",void 0);sg([D()],Bu.prototype,"value",void 0);sg([D()],Bu.prototype,"tabIdx",void 0);Bu=sg([ye("wui-email-input")],Bu);const Qye=ne`
5091  label {
5092    display: flex;
5093    align-items: center;
5094    cursor: pointer;
5095    -webkit-user-select: none;
5096    -moz-user-select: none;
5097    -ms-user-select: none;
5098    user-select: none;
5099    column-gap: var(--wui-spacing-1xs);
5100  }
5101
5102  label > input[type='checkbox'] {
5103    height: 0;
5104    width: 0;
5105    opacity: 0;
5106    pointer-events: none;
5107    position: absolute;
5108  }
5109
5110  label > span {
5111    width: var(--wui-spacing-xl);
5112    height: var(--wui-spacing-xl);
5113    min-width: var(--wui-spacing-xl);
5114    min-height: var(--wui-spacing-xl);
5115    border-radius: var(--wui-border-radius-3xs);
5116    border-width: 1px;
5117    border-style: solid;
5118    border-color: var(--wui-color-gray-glass-010);
5119    display: flex;
5120    align-items: center;
5121    justify-content: center;
5122    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
5123    will-change: background-color;
5124  }
5125
5126  label > span:hover,
5127  label > input[type='checkbox']:focus-visible + span {
5128    background-color: var(--wui-color-gray-glass-010);
5129  }
5130
5131  label input[type='checkbox']:checked + span {
5132    background-color: var(--wui-color-blue-base-90);
5133  }
5134
5135  label > span > wui-icon {
5136    opacity: 0;
5137    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-lg);
5138    will-change: opacity;
5139  }
5140
5141  label > input[type='checkbox']:checked + span wui-icon {
5142    opacity: 1;
5143  }
5144`;var fB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
5144a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let pw=class extends oe{constructor(){super(...arguments),this.inputElementRef=hl(),this.checked=void 0}render(){return q`
5145      <label>
5146        <input
5147          ${fl(this.inputElementRef)}
5148          ?checked=${Ft(this.checked)}
5149          type="checkbox"
5150          @change=${this.dispatchChangeEvent}
5151        />
5152        <span>
5153          <wui-icon name="checkmarkBold" color="inverse-100" size="xxs"></wui-icon>
5154        </span>
5155        <slot></slot>
5156      </label>
5157    `}dispatchChangeEvent(){var e;this.dispatchEvent(new CustomEvent("checkboxChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.checked,bubbles:!0,composed:!0}))}};pw.styles=[ve,Qye];fB([D({type:Boolean})],pw.prototype,"checked",void 0);pw=fB([ye("wui-checkbox")],pw);const ebe=/[.*+?^${}()|[\]\\]/gu,tbe=/[0-9,.]/u,rbe="https://reown.com",nbe=ne`
5158  .reown-logo {
5159    height: var(--wui-spacing-xxl);
5160  }
5161
5162  a {
5163    text-decoration: none;
5164    cursor: pointer;
5165  }
5166
5167  a:hover {
5168    opacity: 0.9;
5169  }
5170`;var ibe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let $6=class extends oe{render(){return q`
5171      <a
5172        data-testid="ux-branding-reown"
5173        href=${rbe}
5174        rel="noreferrer"
5175        target="_blank"
5176        style="text-decoration: none;"
5177      >
5178        <wui-flex
5179          justifyContent="center"
5180          alignItems="center"
5181          gap="xs"
5182          .padding=${["0","0","l","0"]}
5183        >
5184          <wui-text variant="small-500" color="fg-100"> UX by </wui-text>
5185          <wui-icon name="reown" size="xxxl" class="reown-logo"></wui-icon>
5186        </wui-flex>
5187      </a>
5188    `}};$6.styles=[ve,We,nbe];$6=ibe([ye("wui-ux-by-reown")],$6);const sbe=ne`
5189  :host {
5190    display: flex;
5191    justify-content: center;
5192    align-items: center;
5193    width: 40px;
5194    height: 40px;
5195    border-radius: var(--wui-border-radius-3xl);
5196    border: 1px solid var(--wui-color-gray-glass-005);
5197    overflow: hidden;
5198  }
5199
5200  wui-icon {
5201    width: 100%;
5202    height: 100%;
5203  }
5204`;var pB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let gw=class extends oe{constructor(){super(...arguments),this.logo="google"}render(){return q`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `}};gw.styles=[ve,sbe];pB([D()],gw.prototype,"logo",void 0);gw=pB([ye("wui-logo")],gw);const obe=ne`
5205  button {
5206    column-gap: var(--wui-spacing-s);
5207    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
5208    width: 100%;
5209    justify-content: flex-start;
5210    background-color: var(--wui-color-gray-glass-002);
5211    border-radius: var(--wui-border-radius-xs);
5212    color: var(--wui-color-fg-100);
5213  }
5214
5215  wui-text {
5216    text-transform: capitalize;
5217  }
5218
5219  wui-text[data-align='left'] {
5220    display: flex;
5221    flex: 1;
5222  }
5223
5224  wui-text[data-align='center'] {
5225    display: flex;
5226    flex: 1;
5227    justify-content: center;
5228  }
5229
5230  .invisible {
5231    opacity: 0;
5232    pointer-events: none;
5233  }
5234
5235  button:disabled {
5236    background-color: var(--wui-color-gray-glass-015);
5237    color: var(--wui-color-gray-glass-015);
5238  }
5239`;var M0=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let nl=class extends oe{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.align="left",this.disabled=!1}render(){return q`
5240      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
5241        <wui-logo logo=${this.logo}></wui-logo>
5242        <wui-text
5243          data-align=${this.align}
5244          variant="paragraph-500"
5245          color="inherit"
5246          align=${this.align}
5247          >${this.name}</wui-text
5248        >
5249        ${this.templatePlacement()}
5250      </button>
5251    `}templatePlacement(){return this.align==="center"?q` <wui-logo class="invisible" logo=${this.logo}></wui-logo>`:null}};nl.styles=[ve,We,obe];M0([D()],nl.prototype,"logo",void 0);M0([D()],nl.prototype,"name",void 0);M0([D()],nl.prototype,"align",void 0);M0([D()],nl.prototype,"tabIdx",void 0);M0([D({type:Boolean})],nl.prototype,"disabled",void 0);
5251nl=M0([ye("wui-list-social")],nl);const abe=ne`
5252  :host {
5253    display: block;
5254    width: var(--wui-box-size-md);
5255    height: var(--wui-box-size-md);
5256  }
5257
5258  svg {
5259    width: var(--wui-box-size-md);
5260    height: var(--wui-box-size-md);
5261  }
5262
5263  rect {
5264    fill: none;
5265    stroke: var(--wui-color-accent-100);
5266    stroke-width: 4px;
5267    stroke-linecap: round;
5268    animation: dash 1s linear infinite;
5269  }
5270
5271  @keyframes dash {
5272    to {
5273      stroke-dashoffset: 0px;
5274    }
5275  }
5276`;var gB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ww=class extends oe{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,n=36-e,i=116+n,s=245+n,o=360+n*1.75;return q`
5277      <svg viewBox="0 0 110 110" width="110" height="110">
5278        <rect
5279          x="2"
5280          y="2"
5281          width="106"
5282          height="106"
5283          rx=${e}
5284          stroke-dasharray="${i} ${s}"
5285          stroke-dashoffset=${o}
5286        />
5287      </svg>
5288    `}};ww.styles=[ve,abe];gB([D({type:Number})],ww.prototype,"radius",void 0);ww=gB([ye("wui-loading-thumbnail")],ww);var th={},Oy,uI;function cbe(){return uI||(uI=1,Oy=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Oy}var Ny={},Tc={},dI;
vendor: 20,218 bytes, lines 5288-5294
5288function sd(){if(dI)return Tc;dI=1;let t;const e=[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];return Tc.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},Tc.getSymbolTotalCodewords=function(n){return e[n]},Tc.getBCHDigit=function(r){let n=0;for(;r!==0;)n++,r>>>=1;return n},Tc.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');t=n},Tc.isKanjiModeEnabled=function(){return typeof t<"u"},Tc.toSJIS=function(n){return t(n)},Tc}var ky={},hI;function T8(){return hI||(hI=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.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: "+r)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,i){if(t.isValid(n))return n;try{return e(n)}catch{return i}}}(ky)),ky}var Ry,fI;function lbe(){if(fI)return Ry;fI=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const r=Math.floor(e/8);return(this.buffer[r]>>>7-e%8&1)===1},put:function(e,r){for(let n=0;n<r;n++)this.putBit((e>>>r-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),e&&(this.buffer[r]|=128>>>this.length%8),this.length++}},Ry=t,Ry}var By,pI;function ube(){if(pI)return By;pI=1;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)}return t.prototype.set=function(e,r,n,i){const s=e*this.size+r;this.data[s]=n,i&&(this.reservedBit[s]=!0)},t.prototype.get=function(e,r){return this.data[e*this.size+r]},t.prototype.xor=function(e,r,n){this.data[e*this.size+r]^=n},t.prototype.isReserved=function(e,r){return this.reservedBit[e*this.size+r]},By=t,By}var Dy={},gI;function dbe(){return gI||(gI=1,function(t){const e=sd().getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,s=e(n),o=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},t.getPositions=function(n){const i=[],s=t.getRowColCoords(n),o=s.length;for(let a=0;a<o;a++)for(let c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||i.push([s[a],s[c]]);return i}}(Dy)),Dy}var Ly={},wI;function hbe(){if(wI)return Ly;wI=1;const t=sd().getSymbolSize,e=7;return Ly.getPositions=function(n){const i=t(n);return[[0,0],[i-e,0],[0,i-e]]},Ly}var My={},mI;function fbe(){return mI||(mI=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const s=i.size;let o=0,a=0,c=0,l=null,u=null;for(let d=0;d<s;d++){a=c=0,l=u=null;for(let h=0;h<s;h++){let f=i.get(d,h);f===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=f,a=1),f=i.get(h,d),f===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=f,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},t.getPenaltyN2=function(i){const s=i.size;let o=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const l=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},t.getPenaltyN3=function(i){const s=i.size;let o=0,a=0,c=0;for(let l=0;l<s;l++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|i.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|i.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},t.getPenaltyN4=function(i){let s=0;const o=i.data.length;for(let c=0;c<o;c++)s+=i.data[c];return Math.abs(Math.ceil(s*100/o/5)-10)*e.N4};function r(n,i,s){switch(n){case t.Patterns.PATTERN000:return(i+s)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(i+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return i*s%2+i*s%3===0;case t.Patterns.PATTERN110:return(i*s%2+i*s%3)%2===0;case t.Patterns.PATTERN111:return(i*s%3+(i+s)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(i,s){const o=s.size;for(let a=0;a<o;a++)for(let c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,r(i,c,a))},t.getBestMask=function(i,s){const o=Object.keys(t.Patterns).length;let a=0,c=1/0;for(let l=0;l<o;l++){s(l),t.applyMask(l,i);const u=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(l,i),u<c&&(c=u,a=l)}return a}}(My)),My}var r2={},yI;function wB(){if(yI)return r2;yI=1;const t=T8(),e=[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],r=[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];return r2.getBlocksCount=function(i,s){switch(s){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},r2.getTotalCodewordsCount=function(i,s){switch(s){case t.L:return r[(i-1)*4+0];case t.M:return r[(i-1)*4+1];case t.Q:return r[(i-1)*4+2];case t.H:return r[(i-1)*4+3];default:return}},r2}var Uy={},Cf={},bI;function pbe(){if(bI)return Cf;bI=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let i=0;i<255;i++)t[i]=n,e[n]=i,n<<=1,n&256&&(n^=285);for(let i=255;i<512;i++)t[i]=t[i-255]}(),Cf.log=function(n){if(n<1)throw new Error("log("+n+")");return e[n]},Cf.exp=function(n){return t[n]},Cf.mul=function(n,i){return n===0||i===0?0:t[e[n]+e[i]]},Cf}var vI;function gbe(){return vI||(vI=1,function(t){const e=pbe();t.mul=function(n,i){const s=new Uint8Array(n.length+i.length-1);for(let o=0;o<n.length;o++)for(let a=0;a<i.length;a++)s[o+a]^=e.mul(n[o],i[a]);return s},t.mod=function(n,i){let s=new Uint8Array(n);for(;s.length-i.length>=0;){const o=s[0];for(let c=0;c<i.length;c++)s[c]^=e.mul(i[c],o);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},t.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let s=0;s<n;s++)i=t.mul(i,new Uint8Array([1,e.exp(s)]));return i}}(Uy)),Uy}var jy,EI;function wbe(){if(EI)return jy;EI=1;const t=gbe();function e(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(n.length+this.degree);i.set(n);const s=t.mod(i,this.genPoly),o=this.degree-s.length;if(o>0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},jy=e,jy}var zy={},Fy={},qy={},CI;function mB(){return CI||(CI=1,qy.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),qy}var vo={},xI;function yB(){if(xI)return vo;xI=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";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 n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
5289]))+`;vo.KANJI=new RegExp(r,"g"),vo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),vo.BYTE=new RegExp(n,"g"),vo.NUMERIC=new RegExp(t,"g"),vo.ALPHANUMERIC=new RegExp(e,"g");const i=new RegExp("^"+r+"$"),s=new RegExp("^"+t+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return vo.testKanji=function(c){return i.test(c)},vo.testNumeric=function(c){return s.test(c)},vo.testAlphanumeric=function(c){return o.test(c)},vo}var _I;function od(){return _I||(_I=1,function(t){const e=mB(),r=yB();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(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return r.testNumeric(s)?t.NUMERIC:r.testAlphanumeric(s)?t.ALPHANUMERIC:r.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.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: "+i)}}t.from=function(s,o){if(t.isValid(s))return s;try{return n(s)}catch{return o}}}(Fy)),Fy}var SI;function mbe(){return SI||(SI=1,function(t){const e=sd(),r=wB(),n=T8(),i=od(),s=mB(),o=7973,a=e.getBCHDigit(o);function c(h,f,g){for(let p=1;p<=40;p++)if(f<=t.getCapacity(p,g,h))return p}function l(h,f){return i.getCharCountIndicator(h,f)+4}function u(h,f){let g=0;return h.forEach(function(p){const w=l(p.mode,f);g+=w+p.getBitsLength()}),g}function d(h,f){for(let g=1;g<=40;g++)if(u(h,g)<=t.getCapacity(g,f,i.MIXED))return g}t.from=function(f,g){return s.isValid(f)?parseInt(f,10):g},t.getCapacity=function(f,g,p){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=i.BYTE);const w=e.getSymbolTotalCodewords(f),m=r.getTotalCodewordsCount(f,g),b=(w-m)*8;if(p===i.MIXED)return b;const v=b-l(p,f);switch(p){case i.NUMERIC:return Math.floor(v/10*3);case i.ALPHANUMERIC:return Math.floor(v/11*2);case i.KANJI:return Math.floor(v/13);case i.BYTE:default:return Math.floor(v/8)}},t.getBestVersionForData=function(f,g){let p;const w=n.from(g,n.M);if(Array.isArray(f)){if(f.length>1)return d(f,w);if(f.length===0)return 1;p=f[0]}else p=f;return c(p.mode,p.getLength(),w)},t.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let g=f<<12;for(;e.getBCHDigit(g)-a>=0;)g^=o<<e.getBCHDigit(g)-a;return f<<12|g}}(zy)),zy}var Hy={},II;function ybe(){if(II)return Hy;II=1;const t=sd(),e=1335,r=21522,n=t.getBCHDigit(e);return Hy.getEncodedBits=function(s,o){const a=s.bit<<3|o;let c=a<<10;for(;t.getBCHDigit(c)-n>=0;)c^=e<<t.getBCHDigit(c)-n;return(a<<10|c)^r},Hy}var Vy={},Wy,$I;function bbe(){if($I)return Wy;$I=1;const t=od();function e(r){this.mode=t.NUMERIC,this.data=r.toString()}return e.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(n){let i,s,o;for(i=0;i+3<=this.data.length;i+=3)s=this.data.substr(i,3),o=parseInt(s,10),n.put(o,10);const a=this.data.length-i;a>0&&(s=this.data.substr(i),o=parseInt(s,10),n.put(o,a*3+1))},Wy=e,Wy}var Ky,AI;function vbe(){if(AI)return Ky;AI=1;const t=od(),e=["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 r(n){this.mode=t.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(i){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),i.put(o,11)}this.data.length%2&&i.put(e.indexOf(this.data[s]),6)},Ky=r,Ky}var Zy,PI;function Ebe(){if(PI)return Zy;PI=1;const t=oB(),e=od();function r(n){this.mode=e.BYTE,typeof n=="string"&&(n=t(n)),this.data=new Uint8Array(n)}return r.getBitsLength=function(i){return i*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){for(let i=0,s=this.data.length;i<s;i++)n.put(this.data[i],8)},Zy=r,Zy}var Gy,TI;function Cbe(){if(TI)return Gy;TI=1;const t=od(),e=sd();function r(n){this.mode=t.KANJI,this.data=n}return r.getBitsLength=function(i){return i*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let i;for(i=0;i<this.data.length;i++){let s=e.toSJIS(this.data[i]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
5290Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),n.put(s,13)}},Gy=r,Gy}var OI;function xbe(){return OI||(OI=1,function(t){const e=od(),r=bbe(),n=vbe(),i=Ebe(),s=Cbe(),o=yB(),a=sd(),c=jN();function l(m){return unescape(encodeURIComponent(m)).length}function u(m,b,v){const E=[];let I;for(;(I=m.exec(v))!==null;)E.push({data:I[0],index:I.index,mode:b,length:I[0].length});return E}function d(m){const b=u(o.NUMERIC,e.NUMERIC,m),v=u(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let E,I;return a.isKanjiModeEnabled()?(E=u(o.BYTE,e.BYTE,m),I=u(o.KANJI,e.KANJI,m)):(E=u(o.BYTE_KANJI,e.BYTE,m),I=[]),b.concat(v,E,I).sort(function(A,P){return A.index-P.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function h(m,b){switch(b){case e.NUMERIC:return r.getBitsLength(m);case e.ALPHANUMERIC:return n.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return i.getBitsLength(m)}}function f(m){return m.reduce(function(b,v){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===v.mode?(b[b.length-1].data+=v.data,b):(b.push(v),b)},[])}function g(m){const b=[];for(let v=0;v<m.length;v++){const E=m[v];switch(E.mode){case e.NUMERIC:b.push([E,{data:E.data,mode:e.ALPHANUMERIC,length:E.length},{data:E.data,mode:e.BYTE,length:E.length}]);break;case e.ALPHANUMERIC:b.push([E,{data:E.data,mode:e.BYTE,length:E.length}]);break;case e.KANJI:b.push([E,{data:E.data,mode:e.BYTE,length:l(E.data)}]);break;case e.BYTE:b.push([{data:E.data,mode:e.BYTE,length:l(E.data)}])}}return b}function p(m,b){const v={},E={start:{}};let I=["start"];for(let _=0;_<m.length;_++){const A=m[_],P=[];for(let y=0;y<A.length;y++){const O=A[y],S=""+_+y;P.push(S),v[S]={node:O,lastCount:0},E[S]={};for(let k=0;k<I.length;k++){const L=I[k];v[L]&&v[L].node.mode===O.mode?(E[L][S]=h(v[L].lastCount+O.length,O.mode)-h(v[L].lastCount,O.mode),v[L].lastCount+=O.length):(v[L]&&(v[L].lastCount=O.length),E[L][S]=h(O.length,O.mode)+4+e.getCharCountIndicator(O.mode,b))}}I=P}for(let _=0;_<I.length;_++)E[I[_]].end=0;return{map:E,table:v}}function w(m,b){let v;const E=e.getBestModeForData(m);if(v=e.from(b,E),v!==e.BYTE&&v.bit<E.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(v)+`.
5291 Suggested mode is: `+e.toString(E));switch(v===e.KANJI&&!a.isKanjiModeEnabled()&&(v=e.BYTE),v){case e.NUMERIC:return new r(m);case e.ALPHANUMERIC:return new n(m);case e.KANJI:return new s(m);case e.BYTE:return new i(m)}}t.fromArray=function(b){return b.reduce(function(v,E){return typeof E=="string"?v.push(w(E,null)):E.data&&v.push(w(E.data,E.mode)),v},[])},t.fromString=function(b,v){const E=d(b,a.isKanjiModeEnabled()),I=g(E),_=p(I,v),A=c.find_path(_.map,"start","end"),P=[];for(let y=1;y<A.length-1;y++)P.push(_.table[A[y]].node);return t.fromArray(f(P))},t.rawSplit=function(b){return t.fromArray(d(b,a.isKanjiModeEnabled()))}}(Vy)),Vy}var NI;function _be(){if(NI)return Ny;NI=1;const t=sd(),e=T8(),r=lbe(),n=ube(),i=dbe(),s=hbe(),o=fbe(),a=wB(),c=wbe(),l=mbe(),u=ybe(),d=od(),h=xbe();function f(_,A){const P=_.size,y=s.getPositions(A);for(let O=0;O<y.length;O++){const S=y[O][0],k=y[O][1];for(let L=-1;L<=7;L++)if(!(S+L<=-1||P<=S+L))for(let T=-1;T<=7;T++)k+T<=-1||P<=k+T||(L>=0&&L<=6&&(T===0||T===6)||T>=0&&T<=6&&(L===0||L===6)||L>=2&&L<=4&&T>=2&&T<=4?_.set(S+L,k+T,!0,!0):_.set(S+L,k+T,!1,!0))}}function g(_){const A=_.size;for(let P=8;P<A-8;P++){const y=P%2===0;_.set(P,6,y,!0),_.set(6,P,y,!0)}}function p(_,A){const P=i.getPositions(A);for(let y=0;y<P.length;y++){const O=P[y][0],S=P[y][1];for(let k=-2;k<=2;k++)for(let L=-2;L<=2;L++)k===-2||k===2||L===-2||L===2||k===0&&L===0?_.set(O+k,S+L,!0,!0):_.set(O+k,S+L,!1,!0)}}function w(_,A){const P=_.size,y=l.getEncodedBits(A);let O,S,k;for(let L=0;L<18;L++)O=Math.floor(L/3),S=L%3+P-8-3,k=(y>>L&1)===1,_.set(O,S,k,!0),_.set(S,O,k,!0)}function m(_,A,P){const y=_.size,O=u.getEncodedBits(A,P);let S,k;for(S=0;S<15;S++)k=(O>>S&1)===1,S<6?_.set(S,8,k,!0):S<8?_.set(S+1,8,k,!0):_.set(y-15+S,8,k,!0),S<8?_.set(8,y-S-1,k,!0):S<9?_.set(8,15-S-1+1,k,!0):_.set(8,15-S-1,k,!0);_.set(y-8,8,1,!0)}function b(_,A){const P=_.size;let y=-1,O=P-1,S=7,k=0;for(let L=P-1;L>0;L-=2)for(L===6&&L--;;){for(let T=0;T<2;T++)if(!_.isReserved(O,L-T)){let C=!1;k<A.length&&(C=(A[k]>>>S&1)===1),_.set(O,L-T,C),S--,S===-1&&(k++,S=7)}if(O+=y,O<0||P<=O){O-=y,y=-y;break}}}function v(_,A,P){const y=new r;P.forEach(function(T){y.put(T.mode.bit,4),y.put(T.getLength(),d.getCharCountIndicator(T.mode,_)),T.write(y)});const O=t.getSymbolTotalCodewords(_),S=a.getTotalCodewordsCount(_,A),k=(O-S)*8;for(y.getLengthInBits()+4<=k&&y.put(0,4);y.getLengthInBits()%8!==0;)y.putBit(0);const L=(k-y.getLengthInBits())/8;for(let T=0;T<L;T++)y.put(T%2?17:236,8);return E(y,_,A)}function E(_,A,P){const y=t.getSymbolTotalCodewords(A),O=a.getTotalCodewordsCount(A,P),S=y-O,k=a.getBlocksCount(A,P),L=y%k,T=k-L,C=Math.floor(y/k),x=Math.floor(S/k),B=x+1,R=C-x,M=new c(R);let U=0;const z=new Array(k),H=new Array(k);let Y=0;const V=new Uint8Array(_.buffer);for(let ae=0;ae<k;ae++){const be=ae<T?x:B;z[ae]=V.slice(U,U+be),H[ae]=M.encode(z[ae]),U+=be,Y=Math.max(Y,be)}const G=new Uint8Array(y);let re=0,de,ce;for(de=0;de<Y;de++)for(ce=0;ce<k;ce++)de<z[ce].length&&(G[re++]=z[ce][de]);for(de=0;de<R;de++)for(ce=0;ce<k;ce++)G[re++]=H[ce][de];return G}function I(_,A,P,y){let O;if(Array.isArray(_))O=h.fromArray(_);else if(typeof _=="string"){let C=A;if(!C){const x=h.rawSplit(_);C=l.getBestVersionForData(x,P)}O=h.fromString(_,C||40)}else throw new Error("Invalid data");const S=l.getBestVersionForData(O,P);if(!S)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=S;else if(A<S)throw new Error(`
5292The chosen QR Code version cannot contain this amount of data.
5293Minimum version required to store current data is: `+S+`.
5294`);const k=v(A,P,O),L=t.getSymbolSize(A),T=new n(L);return f(T,A),g(T),p(T,A),m(T,P,0),A>=7&&w(T,A),b(T,k),isNaN(y)&&(y=o.getBestMask(T,m.bind(null,T,P))),o.applyMask(y,T),m(T,P,y),{modules:T,version:A,errorCorrectionLevel:P,maskPattern:y,segments:O}}return Ny.create=function(A,P){if(typeof A>"u"||A==="")throw new Error("No input text");let y=e.M,O,S;return typeof P<"u"&&(y=e.from(P.errorCorrectionLevel,e.M),O=l.from(P.version),S=o.from(P.maskPattern),P.toSJISFunc&&t.setToSJISFunction(P.toSJISFunc)),I(A,O,y,S)},Ny}var Yy={},Jy={},kI;function bB(){return kI||(kI=1,function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");
5294if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,o=n.scale||4;return{width:s,scale:s?4:o,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},t.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},t.getImageWidth=function(n,i){const s=t.getScale(n,i);return Math.floor((n+i.margin*2)*s)},t.qrToImageData=function(n,i,s){const o=i.modules.size,a=i.modules.data,c=t.getScale(o,s),l=Math.floor((o+s.margin*2)*c),u=s.margin*c,d=[s.color.light,s.color.dark];for(let h=0;h<l;h++)for(let f=0;f<l;f++){let g=(h*l+f)*4,p=s.color.light;if(h>=u&&f>=u&&h<l-u&&f<l-u){const w=Math.floor((h-u)/c),m=Math.floor((f-u)/c);p=d[a[w*o+m]?1:0]}n[g++]=p.r,n[g++]=p.g,n[g++]=p.b,n[g]=p.a}}}(Jy)),Jy}var RI;function Sbe(){return RI||(RI=1,function(t){const e=bB();function r(i,s,o){i.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=o,s.width=o,s.style.height=o+"px",s.style.width=o+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(s,o,a){let c=a,l=o;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(l=n()),c=e.getOptions(c);const u=e.getImageWidth(s.modules.size,c),d=l.getContext("2d"),h=d.createImageData(u,u);return e.qrToImageData(h.data,s,c),r(d,l,u),d.putImageData(h,0,0),l},t.renderToDataURL=function(s,o,a){let c=a;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const l=t.render(s,o,c),u=c.type||"image/png",d=c.rendererOpts||{};return l.toDataURL(u,d.quality)}}(Yy)),Yy}var Xy={},BI;function Ibe(){if(BI)return Xy;BI=1;const t=bB();function e(i,s){const o=i.a/255,a=s+'="'+i.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function r(i,s,o){let a=i+s;return typeof o<"u"&&(a+=" "+o),a}function n(i,s,o){let a="",c=0,l=!1,u=0;for(let d=0;d<i.length;d++){const h=Math.floor(d%s),f=Math.floor(d/s);!h&&!l&&(l=!0),i[d]?(u++,d>0&&h>0&&i[d-1]||(a+=l?r("M",h+o,.5+f+o):r("m",c,0),c=0,l=!1),h+1<s&&i[d+1]||(a+=r("h",u),u=0)):c++}return a}return Xy.render=function(s,o,a){const c=t.getOptions(o),l=s.modules.size,u=s.modules.data,d=l+c.margin*2,h=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",f="<path "+e(c.color.dark,"stroke")+' d="'+n(u,l,c.margin)+'"/>',g='viewBox="0 0 '+d+" "+d+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+g+' shape-rendering="crispEdges">'+h+f+`</svg>
5295`;return typeof a=="function"&&a(null,w),w},Xy}var DI;function $be(){if(DI)return th;DI=1;const t=cbe(),e=_be(),r=Sbe(),n=Ibe();function i(s,o,a,c,l){const u=[].slice.call(arguments,1),d=u.length,h=typeof u[d-1]=="function";if(!h&&!t())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=c=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=c,c=void 0):(l=c,c=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=c=void 0):d===2&&!o.getContext&&(c=a,a=o,o=void 0),new Promise(function(f,g){try{const p=e.create(a,c);f(s(p,o,c))}catch(p){g(p)}})}try{const f=e.create(a,c);l(null,s(f,o,c))}catch(f){l(f)}}return th.create=e.create,th.toCanvas=i.bind(null,r.render),th.toDataURL=i.bind(null,r.renderToDataURL),th.toString=i.bind(null,function(s,o,a){return n.render(s,a)}),th}var Abe=$be();const Pbe=ec(Abe),Tbe=.1,LI=2.5,ma=7;function Qy(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+Tbe}function Obe(t,e){const r=Array.prototype.slice.call(Pbe.create(t,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((i,s,o)=>(o%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const Nbe={generate({uri:t,size:e,logoSize:r,dotColor:n="#141414"}){const i="transparent",o=[],a=Obe(t,"Q"),c=e/a.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:p,y:w})=>{const m=(a.length-ma)*c*p,b=(a.length-ma)*c*w,v=.45;for(let E=0;E<l.length;E+=1){const I=c*(ma-E*2);o.push(W`
5296            <rect
5297              fill=${E===2?n:i}
5298              width=${E===0?I-5:I}
5299              rx= ${E===0?(I-5)*v:I*v}
5300              ry= ${E===0?(I-5)*v:I*v}
5301              stroke=${n}
5302              stroke-width=${E===0?5:0}
5303              height=${E===0?I-5:I}
5304              x= ${E===0?b+c*E+5/2:b+c*E}
5305              y= ${E===0?m+c*E+5/2:m+c*E}
5306            />
5307          `)}});const u=Math.floor((r+25)/c),d=a.length/2-u/2,h=a.length/2+u/2-1,f=[];a.forEach((p,w)=>{p.forEach((m,b)=>{if(a[w][b]&&!(w<ma&&b<ma||w>a.length-(ma+1)&&b<ma||w<ma&&b>a.length-(ma+1))&&!(w>d&&w<h&&b>d&&b<h)){const v=w*c+c/2,E=b*c+c/2;f.push([v,E])}})});const g={};return f.forEach(([p,w])=>{var m;g[p]?(m=g[p])==null||m.push(w):g[p]=[w]}),Object.entries(g).map(([p,w])=>{const m=w.filter(b=>w.every(v=>!Qy(b,v,c)));return[Number(p),m]}
5307).forEach(([p,w])=>{w.forEach(m=>{o.push(W`<circle cx=${p} cy=${m} fill=${n} r=${c/LI} />`)})}),Object.entries(g).filter(([p,w])=>w.length>1).map(([p,w])=>{const m=w.filter(b=>w.some(v=>Qy(b,v,c)));return[Number(p),m]}).map(([p,w])=>{w.sort((b,v)=>b<v?-1:1);const m=[];for(const b of w){const v=m.find(E=>E.some(I=>Qy(b,I,c)));v?v.push(b):m.push([b])}return[p,m.map(b=>[b[0],b[b.length-1]])]}).forEach(([p,w])=>{w.forEach(([m,b])=>{o.push(W`
5308              <line
5309                x1=${p}
5310                x2=${p}
5311                y1=${m}
5312                y2=${b}
5313                stroke=${n}
5314                stroke-width=${c/(LI/2)}
5315                stroke-linecap="round"
5316              />
5317            `)})}),o}},kbe=ne`
5318  :host {
5319    position: relative;
5320    user-select: none;
5321    display: block;
5322    overflow: hidden;
5323    aspect-ratio: 1 / 1;
5324    width: var(--local-size);
5325  }
5326
5327  :host([data-theme='dark']) {
5328    border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
5329    background-color: var(--wui-color-inverse-100);
5330    padding: var(--wui-spacing-l);
5331  }
5332
5333  :host([data-theme='light']) {
5334    box-shadow: 0 0 0 1px var(--wui-color-bg-125);
5335    background-color: var(--wui-color-bg-125);
5336  }
5337
5338  :host([data-clear='true']) > wui-icon {
5339    display: none;
5340  }
5341
5342  svg:first-child,
5343  wui-image,
5344  wui-icon {
5345    position: absolute;
5346    top: 50%;
5347    left: 50%;
5348    transform: translateY(-50%) translateX(-50%);
5349  }
5350
5351  wui-image {
5352    width: 25%;
5353    height: 25%;
5354    border-radius: var(--wui-border-radius-xs);
5355  }
5356
5357  wui-icon {
5358    width: 100%;
5359    height: 100%;
5360    color: var(--local-icon-color) !important;
5361    transform: translateY(-50%) translateX(-50%) scale(0.25);
5362  }
5363`;var cc=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const Rbe="#3396ff";let eo=class extends oe{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`
5364     --local-size: ${this.size}px;
5365     --local-icon-color: ${this.color??Rbe}
5366    `,q`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return W`
5367      <svg height=${e} width=${e}>
5368        ${Nbe.generate({uri:this.uri,size:e,logoSize:this.arenaClear?0:e/4,dotColor:this.color})}
5369      </svg>
5370    `}templateVisual(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?q`<wui-icon
5371        class="farcaster"
5372        size="inherit"
5373        color="inherit"
5374        name="farcaster"
5375      ></wui-icon>`:q`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};eo.styles=[ve,kbe];cc([D()],eo.prototype,"uri",void 0);cc([D({type:Number})],eo.prototype,"size",void 0);cc([D()],eo.prototype,"theme",void 0);cc([D()],eo.prototype,"imageSrc",void 0);cc([D()],eo.prototype,"alt",void 0);cc([D()],eo.prototype,"color",void 0);cc([D({type:Boolean})],eo.prototype,"arenaClear",void 0);cc([D({type:Boolean})],eo.prototype,"farcaster",void 0);eo=cc([ye("wui-qr-code")],eo);const Bbe=ne`
5376  :host {
5377    display: block;
5378    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
5379    background: linear-gradient(
5380      120deg,
5381      var(--wui-color-bg-200) 5%,
5382      var(--wui-color-bg-200) 48%,
5383      var(--wui-color-bg-300) 55%,
5384      var(--wui-color-bg-300) 60%,
5385      var(--wui-color-bg-300) calc(60% + 10px),
5386      var(--wui-color-bg-200) calc(60% + 12px),
5387      var(--wui-color-bg-200) 100%
5388    );
5389    background-size: 250%;
5390    animation: shimmer 3s linear infinite reverse;
5391  }
5392
5393  :host([variant='light']) {
5394    background: linear-gradient(
5395      120deg,
5396      var(--wui-color-bg-150) 5%,
5397      var(--wui-color-bg-150) 48%,
5398      var(--wui-color-bg-200) 55%,
5399      var(--wui-color-bg-200) 60%,
5400      var(--wui-color-bg-200) calc(60% + 10px),
5401      var(--wui-color-bg-150) calc(60% + 12px),
5402      var(--wui-color-bg-150) 100%
5403    );
5404    background-size: 250%;
5405  }
5406
5407  @keyframes shimmer {
5408    from {
5409      background-position: -250% 0;
5410    }
5411    to {
5412      background-position: 250% 0;
5413    }
5414  }
5415`;var og=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
5415a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Du=class extends oe{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`
5416      width: ${this.width};
5417      height: ${this.height};
5418      border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};
5419    `,q`<slot></slot>`}};Du.styles=[Bbe];og([D()],Du.prototype,"width",void 0);og([D()],Du.prototype,"height",void 0);og([D()],Du.prototype,"borderRadius",void 0);og([D()],Du.prototype,"variant",void 0);Du=og([ye("wui-shimmer")],Du);const Dbe=ne`
5420  :host {
5421    display: block;
5422  }
5423
5424  :host > button {
5425    gap: var(--wui-spacing-xxs);
5426    padding: var(--wui-spacing-xs);
5427    padding-right: var(--wui-spacing-1xs);
5428    height: 40px;
5429    border-radius: var(--wui-border-radius-l);
5430    background: var(--wui-color-gray-glass-002);
5431    border-width: 0px;
5432    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
5433  }
5434
5435  :host > button wui-image {
5436    width: 24px;
5437    height: 24px;
5438    border-radius: var(--wui-border-radius-s);
5439    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
5440  }
5441`;var O8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let tp=class extends oe{constructor(){super(...arguments),this.text=""}render(){return q`
5442      <button>
5443        ${this.tokenTemplate()}
5444        <wui-text variant="paragraph-600" color="fg-100">${this.text}</wui-text>
5445      </button>
5446    `}tokenTemplate(){return this.imageSrc?q`<wui-image src=${this.imageSrc}></wui-image>`:q`
5447      <wui-icon-box
5448        size="sm"
5449        iconColor="fg-200"
5450        backgroundColor="fg-300"
5451        icon="networkPlaceholder"
5452      ></wui-icon-box>
5453    `}};tp.styles=[ve,We,Dbe];O8([D()],tp.prototype,"imageSrc",void 0);O8([D()],tp.prototype,"text",void 0);tp=O8([ye("wui-token-button")],tp);const Lbe=ne`
5454  :host {
5455    height: 60px;
5456    min-height: 60px;
5457  }
5458
5459  :host > wui-flex {
5460    cursor: pointer;
5461    height: 100%;
5462    display: flex;
5463    column-gap: var(--wui-spacing-s);
5464    padding: var(--wui-spacing-xs);
5465    padding-right: var(--wui-spacing-l);
5466    width: 100%;
5467    background-color: transparent;
5468    border-radius: var(--wui-border-radius-xs);
5469    color: var(--wui-color-fg-250);
5470    transition:
5471      background-color var(--wui-ease-out-power-1) var(--wui-duration-lg),
5472      opacity var(--wui-ease-out-power-1) var(--wui-duration-lg);
5473    will-change: background-color, opacity;
5474  }
5475
5476  @media (hover: hover) and (pointer: fine) {
5477    :host > wui-flex:hover {
5478      background-color: var(--wui-color-gray-glass-002);
5479    }
5480
5481    :host > wui-flex:active {
5482      background-color: var(--wui-color-gray-glass-005);
5483    }
5484  }
5485
5486  :host([disabled]) > wui-flex {
5487    opacity: 0.6;
5488  }
5489
5490  :host([disabled]) > wui-flex:hover {
5491    background-color: transparent;
5492  }
5493
5494  :host > wui-flex > wui-flex {
5495    flex: 1;
5496  }
5497
5498  :host > wui-flex > wui-image,
5499  :host > wui-flex > .token-item-image-placeholder {
5500    width: 40px;
5501    max-width: 40px;
5502    height: 40px;
5503    border-radius: var(--wui-border-radius-3xl);
5504    position: relative;
5505  }
5506
5507  :host > wui-flex > .token-item-image-placeholder {
5508    display: flex;
5509    align-items: center;
5510    justify-content: center;
5511  }
5512
5513  :host > wui-flex > wui-image::after,
5514  :host > wui-flex > .token-item-image-placeholder::after {
5515    position: absolute;
5516    content: '';
5517    inset: 0;
5518    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
5519    border-radius: var(--wui-border-radius-l);
5520  }
5521
5522  button > wui-icon-box[data-variant='square-blue'] {
5523    border-radius: var(--wui-border-radius-3xs);
5524    position: relative;
5525    border: none;
5526    width: 36px;
5527    height: 36px;
5528  }
5529`;var pl=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
5529a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Vo=class extends oe{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0,this.visible=!1,this.imageError=!1,this.observer=new IntersectionObserver(e=>{e.forEach(r=>{r.isIntersecting?this.visible=!0:this.visible=!1})},{threshold:.1})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var r;if(!this.visible)return null;const e=this.amount&&this.price?(r=zt.multiply(this.price,this.amount))==null?void 0:r.toFixed(3):null;return q`
5530      <wui-flex alignItems="center">
5531        ${this.visualTemplate()}
5532        <wui-flex flexDirection="column" gap="3xs">
5533          <wui-flex justifyContent="space-between">
5534            <wui-text variant="paragraph-500" color="fg-100" lineClamp="1">${this.name}</wui-text>
5535            ${e?q`
5536                  <wui-text variant="paragraph-500" color="fg-100">
5537                    $${Pt.formatNumberToLocalString(e,3)}
5538                  </wui-text>
5539                `:null}
5540          </wui-flex>
5541          <wui-flex justifyContent="space-between">
5542            <wui-text variant="small-400" color="fg-200" lineClamp="1">${this.symbol}</wui-text>
5543            ${this.amount?q`<wui-text variant="small-400" color="fg-200">
5544                  ${Pt.formatNumberToLocalString(this.amount,4)}
5545                </wui-text>`:null}
5546          </wui-flex>
5547        </wui-flex>
5548      </wui-flex>
5549    `}visualTemplate(){return this.imageError?q`<wui-flex class="token-item-image-placeholder">
5550        <wui-icon name="image" color="inherit"></wui-icon>
5551      </wui-flex>`:this.imageSrc?q`<wui-image
5552        width="40"
5553        height="40"
5554        src=${this.imageSrc}
5555        @onLoadError=${this.imageLoadError}
5556      ></wui-image>`:null}imageLoadError(){this.imageError=!0}};Vo.styles=[ve,We,Lbe];pl([D()],Vo.prototype,"imageSrc",void 0);pl([D()],Vo.prototype,"name",void 0);pl([D()],Vo.prototype,"symbol",void 0);pl([D()],Vo.prototype,"price",void 0);pl([D()],Vo.prototype,"amount",void 0);pl([Qu()],Vo.prototype,"visible",void 0);pl([Qu()],Vo.prototype,"imageError",void 0);Vo=pl([ye("wui-token-list-item")],Vo);const Mbe=ne`
5557  :host {
5558    position: relative;
5559    display: inline-block;
5560  }
5561
5562  input {
5563    background: transparent;
5564    width: 100%;
5565    height: auto;
5566    font-family: var(--wui-font-family);
5567    color: var(--wui-color-fg-100);
5568
5569    font-feature-settings: 'case' on;
5570    font-size: 32px;
5571    font-weight: var(--wui-font-weight-light);
5572    caret-color: var(--wui-color-accent-100);
5573    line-height: 130%;
5574    letter-spacing: -1.28px;
5575    box-sizing: border-box;
5576    -webkit-appearance: none;
5577    -moz-appearance: textfield;
5578    padding: 0px;
5579  }
5580
5581  input::-webkit-outer-spin-button,
5582  input::-webkit-inner-spin-button {
5583    -webkit-appearance: none;
5584    margin: 0;
5585  }
5586
5587  input::placeholder {
5588    color: var(--wui-color-fg-275);
5589  }
5590`;var Om=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let s0=class extends oe{constructor(){super(...arguments),this.inputElementRef=hl(),this.disabled=!1,this.value="",this.placeholder="0"}render(){var e;return(e=this.inputElementRef)!=null&&e.value&&this.value&&(this.inputElementRef.value.value=this.value),q`<input
5591      ${fl(this.inputElementRef)}
5592      type="text"
5593      inputmode="decimal"
5594      pattern="[0-9,.]*"
5595      placeholder=${this.placeholder}
5596      ?disabled=${this.disabled}
5597      autofocus
5598      value=${this.value??""}
5599      @input=${this.dispatchInputChangeEvent.bind(this)}
5600    /> `}dispatchInputChangeEvent(e){var n,i;const r=e.data;if(r&&((n=this.inputElementRef)!=null&&n.value))if(r===","){const s=this.inputElementRef.value.value.replace(",",".");this.inputElementRef.value.value=s,this.value=`${this.value}${s}`}else tbe.test(r)||(this.inputElementRef.value.value=this.value.replace(new RegExp(r.replace(ebe,"\\$&"),"gu"),""));this.dispatchEvent(new CustomEvent("inputChange",{detail:(i=this.inputElementRef.value)==null?void 0:i.value,bubbles:!0,composed:!0}))}};s0.styles=[ve,We,Mbe];Om([D({type:Boolean})],s0.prototype,"disabled",void 0);Om([D({type:String})],s0.prototype,"value",void 0);Om([D({type:String})],s0.prototype,"placeholder",void 0);s0=Om([ye("wui-input-amount")],s0);const Ube=ne`
5601  button {
5602    padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs);
5603    display: flex;
5604    justify-content: space-between;
5605    width: 100%;
5606    border-radius: var(--wui-border-radius-xs);
5607    background-color: var(--wui-color-gray-glass-002);
5608  }
5609
5610  button[data-clickable='false'] {
5611    pointer-events: none;
5612    background-color: transparent;
5613  }
5614
5615  wui-image,
5616  wui-icon {
5617    width: var(--wui-spacing-3xl);
5618    height: var(--wui-spacing-3xl);
5619  }
5620
5621  wui-image {
5622    border-radius: var(--wui-border-radius-3xl);
5623  }
5624`;var ad=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
5624a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Za=class extends oe{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return q`
5625      <button data-clickable=${String(this.clickable)}>
5626        <wui-flex gap="s" alignItems="center">
5627          ${this.visualTemplate()}
5628          <wui-flex flexDirection="column" justifyContent="spaceBetween">
5629            <wui-text variant="paragraph-500" color="fg-100">${this.tokenName}</wui-text>
5630            <wui-text variant="small-400" color="fg-200">
5631              ${Pt.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency}
5632            </wui-text>
5633          </wui-flex>
5634        </wui-flex>
5635        <wui-text variant="paragraph-500" color="fg-100">$${this.tokenValue.toFixed(2)}</wui-text>
5636      </button>
5637    `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?q`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:q`<wui-icon name="coinPlaceholder" color="fg-100"></wui-icon>`}};Za.styles=[ve,We,Ube];ad([D()],Za.prototype,"tokenName",void 0);ad([D()],Za.prototype,"tokenImageUrl",void 0);ad([D({type:Number})],Za.prototype,"tokenValue",void 0);ad([D()],Za.prototype,"tokenAmount",void 0);ad([D()],Za.prototype,"tokenCurrency",void 0);ad([D({type:Boolean})],Za.prototype,"clickable",void 0);Za=ad([ye("wui-list-token")],Za);const jbe=ne`
5638  :host {
5639    position: relative;
5640    display: flex;
5641    width: 100%;
5642    height: 1px;
5643    background-color: var(--wui-color-gray-glass-005);
5644    justify-content: center;
5645    align-items: center;
5646  }
5647
5648  :host > wui-text {
5649    position: absolute;
5650    padding: 0px 10px;
5651    background-color: var(--wui-color-modal-bg);
5652    transition: background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
5653    will-change: background-color;
5654  }
5655`;var vB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let mw=class extends oe{constructor(){super(...arguments),this.text=""}render(){return q`${this.template()}`}template(){return this.text?q`<wui-text variant="small-500" color="fg-200">${this.text}</wui-text>`:null}};mw.styles=[ve,jbe];vB([D()],mw.prototype,"text",void 0);mw=vB([ye("wui-separator")],mw);const zbe=ne`
5656  :host {
5657    display: block;
5658    width: var(--local-width);
5659    height: var(--local-height);
5660    border-radius: var(--wui-border-radius-3xl);
5661    box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005);
5662    overflow: hidden;
5663    position: relative;
5664  }
5665
5666  :host([data-variant='generated']) {
5667    --mixed-local-color-1: var(--local-color-1);
5668    --mixed-local-color-2: var(--local-color-2);
5669    --mixed-local-color-3: var(--local-color-3);
5670    --mixed-local-color-4: var(--local-color-4);
5671    --mixed-local-color-5: var(--local-color-5);
5672  }
5673
5674  @supports (background: color-mix(in srgb, white 50%, black)) {
5675    :host([data-variant='generated']) {
5676      --mixed-local-color-1: color-mix(
5677        in srgb,
5678        var(--w3m-color-mix) var(--w3m-color-mix-strength),
5679        var(--local-color-1)
5680      );
5681      --mixed-local-color-2: color-mix(
5682        in srgb,
5683        var(--w3m-color-mix) var(--w3m-color-mix-strength),
5684        var(--local-color-2)
5685      );
5686      --mixed-local-color-3: color-mix(
5687        in srgb,
5688        var(--w3m-color-mix) var(--w3m-color-mix-strength),
5689        var(--local-color-3)
5690      );
5691      --mixed-local-color-4: color-mix(
5692        in srgb,
5693        var(--w3m-color-mix) var(--w3m-color-mix-strength),
5694        var(--local-color-4)
5695      );
5696      --mixed-local-color-5: color-mix(
5697        in srgb,
5698        var(--w3m-color-mix) var(--w3m-color-mix-strength),
5699        var(--local-color-5)
5700      );
5701    }
5702  }
5703
5704  :host([data-variant='generated']) {
5705    box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005);
5706    background: radial-gradient(
5707      var(--local-radial-circle),
5708      #fff 0.52%,
5709      var(--mixed-local-color-5) 31.25%,
5710      var(--mixed-local-color-3) 51.56%,
5711      var(--mixed-local-color-2) 65.63%,
5712      var(--mixed-local-color-1) 82.29%,
5713      var(--mixed-local-color-4) 100%
5714    );
5715  }
5716
5717  :host([data-variant='default']) {
5718    box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005);
5719    background: radial-gradient(
5720      75.29% 75.29% at 64.96% 24.36%,
5721      #fff 0.52%,
5722      #f5ccfc 31.25%,
5723      #dba4f5 51.56%,
5724      #9a8ee8 65.63%,
5725      #6493da 82.29%,
5726      #6ebdea 100%
5727    );
5728  }
5729`;var ag=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
5729a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Lu=class extends oe{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0,this.size="xl"}render(){return this.style.cssText=`
5730    --local-width: var(--wui-icon-box-size-${this.size});
5731    --local-height: var(--wui-icon-box-size-${this.size});
5732    `,q`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",q`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";const e=Pt.generateAvatarColors(this.address);return this.style.cssText+=`
5733 ${e}`,null}return this.dataset.variant="default",null}};Lu.styles=[ve,zbe];ag([D()],Lu.prototype,"imageSrc",void 0);ag([D()],Lu.prototype,"alt",void 0);ag([D()],Lu.prototype,"address",void 0);ag([D()],Lu.prototype,"size",void 0);Lu=ag([ye("wui-avatar")],Lu);const Fbe=ne`
5734  :host {
5735    display: flex;
5736    gap: var(--wui-spacing-xs);
5737    border-radius: var(--wui-border-radius-3xl);
5738    border: 1px solid var(--wui-color-gray-glass-002);
5739    background: var(--wui-color-gray-glass-002);
5740    padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs)
5741      var(--wui-spacing-s);
5742    align-items: center;
5743  }
5744
5745  wui-avatar,
5746  wui-icon,
5747  wui-image {
5748    width: 32px;
5749    height: 32px;
5750    border: 1px solid var(--wui-color-gray-glass-002);
5751    border-radius: var(--wui-border-radius-3xl);
5752    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-002);
5753  }
5754`;var cg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Mu=class extends oe{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return q`<wui-text variant="large-500" color="fg-100">${this.text}</wui-text>
5755      ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?q`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?q`<wui-image src=${this.imageSrc}></wui-image>`:q`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Mu.styles=[ve,We,Fbe];cg([D()],Mu.prototype,"text",void 0);cg([D()],Mu.prototype,"address",void 0);cg([D()],Mu.prototype,"imageSrc",void 0);cg([D({type:Boolean})],Mu.prototype,"isAddress",void 0);Mu=cg([ye("wui-preview-item")],Mu);const qbe=ne`
5756  :host {
5757    display: flex;
5758    column-gap: var(--wui-spacing-s);
5759    padding: 17px 18px 17px var(--wui-spacing-m);
5760    width: 100%;
5761    background-color: var(--wui-color-gray-glass-002);
5762    border-radius: var(--wui-border-radius-xs);
5763    color: var(--wui-color-fg-250);
5764  }
5765
5766  wui-image {
5767    width: var(--wui-icon-size-lg);
5768    height: var(--wui-icon-size-lg);
5769    border-radius: var(--wui-border-radius-3xl);
5770  }
5771
5772  wui-icon {
5773    width: var(--wui-icon-size-lg);
5774    height: var(--wui-icon-size-lg);
5775  }
5776`;var Nm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let o0=class extends oe{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return q`
5777      <wui-flex justifyContent="space-between" alignItems="center">
5778        <wui-text variant="paragraph-500" color=${this.textValue?"fg-200":"fg-100"}>
5779          ${this.textTitle}
5780        </wui-text>
5781        ${this.templateContent()}
5782      </wui-flex>
5783    `}templateContent(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?q` <wui-text variant="paragraph-400" color="fg-100"> ${this.textValue} </wui-text>`:q`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};o0.styles=[ve,We,qbe];Nm([D()],o0.prototype,"imageSrc",void 0);Nm([D()],o0.prototype,"textTitle",void 0);Nm([D()],o0.prototype,"textValue",void 0);
5783o0=Nm([ye("wui-list-content")],o0);const Hbe=ne`
5784  button {
5785    border: none;
5786    border-radius: var(--wui-border-radius-3xl);
5787  }
5788
5789  button[data-variant='main'] {
5790    background-color: var(--wui-color-accent-100);
5791    color: var(--wui-color-inverse-100);
5792    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
5793  }
5794
5795  button[data-variant='accent'] {
5796    background-color: var(--wui-color-accent-glass-010);
5797    color: var(--wui-color-accent-100);
5798    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
5799  }
5800
5801  button[data-variant='gray'] {
5802    background-color: transparent;
5803    color: var(--wui-color-fg-200);
5804    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
5805  }
5806
5807  button[data-variant='shade'] {
5808    background-color: transparent;
5809    color: var(--wui-color-accent-100);
5810    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
5811  }
5812
5813  button[data-size='sm'] {
5814    height: 32px;
5815    padding: 0 var(--wui-spacing-s);
5816  }
5817
5818  button[data-size='md'] {
5819    height: 40px;
5820    padding: 0 var(--wui-spacing-l);
5821  }
5822
5823  button[data-size='sm'] > wui-image {
5824    width: 16px;
5825    height: 16px;
5826  }
5827
5828  button[data-size='md'] > wui-image {
5829    width: 24px;
5830    height: 24px;
5831  }
5832
5833  button[data-size='sm'] > wui-icon {
5834    width: 12px;
5835    height: 12px;
5836  }
5837
5838  button[data-size='md'] > wui-icon {
5839    width: 14px;
5840    height: 14px;
5841  }
5842
5843  wui-image {
5844    border-radius: var(--wui-border-radius-3xl);
5845    overflow: hidden;
5846  }
5847
5848  button.disabled > wui-icon,
5849  button.disabled > wui-image {
5850    filter: grayscale(1);
5851  }
5852
5853  button[data-variant='main'] > wui-image {
5854    box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
5855  }
5856
5857  button[data-variant='shade'] > wui-image,
5858  button[data-variant='gray'] > wui-image {
5859    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
5860  }
5861
5862  @media (hover: hover) and (pointer: fine) {
5863    button[data-variant='main']:focus-visible {
5864      background-color: var(--wui-color-accent-090);
5865    }
5866
5867    button[data-variant='main']:hover:enabled {
5868      background-color: var(--wui-color-accent-090);
5869    }
5870
5871    button[data-variant='main']:active:enabled {
5872      background-color: var(--wui-color-accent-080);
5873    }
5874
5875    button[data-variant='accent']:hover:enabled {
5876      background-color: var(--wui-color-accent-glass-015);
5877    }
5878
5879    button[data-variant='accent']:active:enabled {
5880      background-color: var(--wui-color-accent-glass-020);
5881    }
5882
5883    button[data-variant='shade']:focus-visible,
5884    button[data-variant='gray']:focus-visible,
5885    button[data-variant='shade']:hover,
5886    button[data-variant='gray']:hover {
5887      background-color: var(--wui-color-gray-glass-002);
5888    }
5889
5890    button[data-variant='gray']:active,
5891    button[data-variant='shade']:active {
5892      background-color: var(--wui-color-gray-glass-005);
5893    }
5894  }
5895
5896  button.disabled {
5897    color: var(--wui-color-gray-glass-020);
5898    background-color: var(--wui-color-gray-glass-002);
5899    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
5900    pointer-events: none;
5901  }
5902`;var cd=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ga=class extends oe{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const e=this.size==="sm"?"small-600":"paragraph-600";return q`
5903      <button
5904        class=${this.disabled?"disabled":""}
5905        data-variant=${this.variant}
5906        data-size=${this.size}
5907      >
5908        ${this.imageSrc?q`<wui-image src=${this.imageSrc}></wui-image>`:null}
5909        <wui-text variant=${e} color="inherit"> ${this.text} </wui-text>
5910        <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
5911      </button>
5912    `}};Ga.styles=[ve,We,Hbe];cd([D()],Ga.prototype,"variant",void 0);cd([D()],Ga.prototype,"imageSrc",void 0);cd([D({type:Boolean})],Ga.prototype,"disabled",void 0);cd([D()],Ga.prototype,"icon",void 0);cd([D()],Ga.prototype,"size",void 0);cd([D()],Ga.prototype,"text",void 0);Ga=cd([ye("wui-chip-button")],Ga);const Vbe=ne`
5913  button {
5914    display: flex;
5915    gap: var(--wui-spacing-xl);
5916    width: 100%;
5917    background-color: var(--wui-color-gray-glass-002);
5918    border-radius: var(--wui-border-radius-xxs);
5919    padding: var(--wui-spacing-m) var(--wui-spacing-s);
5920  }
5921
5922  wui-text {
5923    width: 100%;
5924  }
5925
5926  wui-flex {
5927    width: auto;
5928  }
5929
5930  .network-icon {
5931    width: var(--wui-spacing-2l);
5932    height: var(--wui-spacing-2l);
5933    border-radius: calc(var(--wui-spacing-2l) / 2);
5934    overflow: hidden;
5935    box-shadow:
5936      0 0 0 3px var(--wui-color-gray-glass-002),
5937      0 0 0 3px var(--wui-color-modal-bg);
5938  }
5939`;var N8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
5939a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let rp=class extends oe{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return q`
5940      <button>
5941        <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
5942        <wui-flex gap="3xs" alignItems="center">
5943          ${this.networksTemplate()}
5944          <wui-icon name="chevronRight" size="sm" color="fg-200"></wui-icon>
5945        </wui-flex>
5946      </button>
5947    `}networksTemplate(){const e=this.networkImages.slice(0,5);return q` <wui-flex class="networks">
5948      ${e==null?void 0:e.map(r=>q` <wui-flex class="network-icon"> <wui-image src=${r}></wui-image> </wui-flex>`)}
5949    </wui-flex>`}};rp.styles=[ve,We,Vbe];N8([D({type:Array})],rp.prototype,"networkImages",void 0);N8([D()],rp.prototype,"text",void 0);rp=N8([ye("wui-compatible-network")],rp);const Wbe=ne`
5950  button {
5951    column-gap: var(--wui-spacing-s);
5952    padding: 11px 18px 11px var(--wui-spacing-s);
5953    width: 100%;
5954    background-color: var(--wui-color-gray-glass-002);
5955    border-radius: var(--wui-border-radius-xs);
5956    color: var(--wui-color-fg-250);
5957    transition:
5958      color var(--wui-ease-out-power-1) var(--wui-duration-md),
5959      background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
5960    will-change: color, background-color;
5961  }
5962
5963  button[data-iconvariant='square'],
5964  button[data-iconvariant='square-blue'] {
5965    padding: 6px 18px 6px 9px;
5966  }
5967
5968  button > wui-flex {
5969    flex: 1;
5970  }
5971
5972  button > wui-image {
5973    width: 32px;
5974    height: 32px;
5975    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
5976    border-radius: var(--wui-border-radius-3xl);
5977  }
5978
5979  button > wui-icon {
5980    width: 36px;
5981    height: 36px;
5982    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
5983    will-change: opacity;
5984  }
5985
5986  button > wui-icon-box[data-variant='blue'] {
5987    box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);
5988  }
5989
5990  button > wui-icon-box[data-variant='overlay'] {
5991    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
5992  }
5993
5994  button > wui-icon-box[data-variant='square-blue'] {
5995    border-radius: var(--wui-border-radius-3xs);
5996    position: relative;
5997    border: none;
5998    width: 36px;
5999    height: 36px;
6000  }
6001
6002  button > wui-icon-box[data-variant='square-blue']::after {
6003    content: '';
6004    position: absolute;
6005    top: 0;
6006    bottom: 0;
6007    left: 0;
6008    right: 0;
6009    border-radius: inherit;
6010    border: 1px solid var(--wui-color-accent-glass-010);
6011    pointer-events: none;
6012  }
6013
6014  button > wui-icon:last-child {
6015    width: 14px;
6016    height: 14px;
6017  }
6018
6019  button:disabled {
6020    color: var(--wui-color-gray-glass-020);
6021  }
6022
6023  button[data-loading='true'] > wui-icon {
6024    opacity: 0;
6025  }
6026
6027  wui-loading-spinner {
6028    position: absolute;
6029    right: 18px;
6030    top: 50%;
6031    transform: translateY(-50%);
6032  }
6033`;var ro=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Mi=class extends oe{constructor(){super(...arguments),this.tabIdx=void 0,this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return q`
6034      <button
6035        ?disabled=${this.loading?!0:!!this.disabled}
6036        data-loading=${this.loading}
6037        data-iconvariant=${Ft(this.iconVariant)}
6038        tabindex=${Ft(this.tabIdx)}
6039      >
6040        ${this.loadingTemplate()} ${this.visualTemplate()}
6041        <wui-flex gap="3xs">
6042          <slot></slot>
6043        </wui-flex>
6044        ${this.chevronTemplate()}
6045      </button>
6046    `}visualTemplate(){if(this.variant==="image"&&this.imageSrc)return q`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if(this.iconVariant==="square"&&this.icon&&this.variant==="icon")return q`<wui-icon name=${this.icon}></wui-icon>`;if(this.variant==="icon"&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",r=this.iconVariant==="square-blue"?"mdl":"md",n=this.iconSize?this.iconSize:r;return q`
6047        <wui-icon-box
6048          data-variant=${this.iconVariant}
6049          icon=${this.icon}
6050          iconSize=${n}
6051          background="transparent"
6052          iconColor=${e}
6053          backgroundColor=${e}
6054          size=${r}
6055        ></wui-icon-box>
6056      `}return null}loadingTemplate(){return this.loading?q`<wui-loading-spinner
6057        data-testid="wui-list-item-loading-spinner"
6058        color="fg-300"
6059      ></wui-loading-spinner>`:q``}chevronTemplate(){return this.chevron?q`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};Mi.styles=[ve,We,Wbe];ro([D()],Mi.prototype,"icon",void 0);ro([D()],Mi.prototype,"iconSize",void 0);ro([D()],Mi.prototype,"tabIdx",void 0);ro([D()],Mi.prototype,"variant",void 0);ro([D()],Mi.prototype,"iconVariant",void 0);ro([D({type:Boolean})],Mi.prototype,"disabled",void 0);ro([D()],Mi.prototype,"imageSrc",void 0);ro([D()],Mi.prototype,"alt",void 0);ro([D({type:Boolean})],Mi.prototype,"chevron",void 0);ro([D({type:Boolean})],Mi.prototype,"loading",void 0);
6059Mi=ro([ye("wui-list-item")],Mi);const Kbe=W`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
6060  <rect width="64" height="64" fill="#F7931A"/>
6061  <g clip-path="url(#clip0_1045_17)">
6062    <path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/>
6063    <path d="M46.1092 27.4409C46.7462 23.1829 43.5042 20.8939 39.0712 19.3669L40.5092 13.5989L36.9982 12.7239L35.5982 18.3399C34.6752 18.1099 33.7272 17.8929 32.7852 17.6779L34.1952 12.0249L30.6862 11.1499L29.2472 16.9159C28.4832 16.7419 27.7332 16.5699 27.0052 16.3889L27.0092 16.3709L22.1672 15.1619L21.2332 18.9119C21.2332 18.9119 23.8382 19.5089 23.7832 19.5459C25.2052 19.9009 25.4622 20.8419 25.4192 21.5879L23.7812 28.1589C23.8792 28.1839 24.0062 28.2199 24.1462 28.2759C24.0292 28.2469 23.9042 28.2149 23.7752 28.1839L21.4792 37.3889C21.3052 37.8209 20.8642 38.4689 19.8702 38.2229C19.9052 38.2739 17.3182 37.5859 17.3182 37.5859L15.5752 41.6049L20.1442 42.7439C20.9942 42.9569 21.8272 43.1799 22.6472 43.3899L21.1942 49.2239L24.7012 50.0989L26.1402 44.3269C27.0982 44.5869 28.0282 44.8269 28.9382 45.0529L27.5042 50.7979L31.0152 51.6729L32.4682 45.8499C38.4552 46.9829 42.9572 46.5259 44.8522 41.1109C46.3792 36.7509 44.7762 34.2359 41.6262 32.5959C43.9202 32.0669 45.6482 30.5579 46.1092 27.4409ZM38.0872 38.6899C37.0022 43.0499 29.6612 40.6929 27.2812 40.1019L29.2092 32.3729C31.5892 32.9669 39.2212 34.1429 38.0872 38.6899ZM39.1732 27.3779C38.1832 31.3439 32.0732 29.3289 30.0912 28.8349L31.8392 21.8249C33.8212 22.3189 40.2042 23.2409 39.1732 27.3779Z" fill="white"/>
6064  </g>
6065  <defs>
6066    <clipPath id="clip0_1045_17">
6067      <rect width="64" height="64" fill="white"/>
6068    </clipPath>
6069  </defs>
6070</svg>
6071`,Zbe=W`<svg fill="none" viewBox="0 0 60 60">
6072  <rect width="60" height="60" fill="#1DC956" rx="30" />
6073  <circle cx="30" cy="30" r="3" fill="#fff" />
6074  <path
6075    fill="#2BEE6C"
6076    stroke="#fff"
6077    stroke-width="2"
6078    d="m45.32 17.9-.88-.42.88.42.02-.05c.1-.2.21-.44.26-.7l-.82-.15.82.16a2 2 0 0 0-.24-1.4c-.13-.23-.32-.42-.47-.57a8.42 8.42 0 0 1-.04-.04l-.04-.04a2.9 2.9 0 0 0-.56-.47l-.51.86.5-.86a2 2 0 0 0-1.4-.24c-.26.05-.5.16-.69.26l-.05.02-15.05 7.25-.1.05c-1.14.55-1.85.89-2.46 1.37a7 7 0 0 0-1.13 1.14c-.5.6-.83 1.32-1.38 2.45l-.05.11-7.25 15.05-.02.05c-.1.2-.21.43-.26.69a2 2 0 0 0 .24 1.4l.85-.5-.85.5c.13.23.32.42.47.57l.04.04.04.04c.15.15.34.34.56.47a2 2 0 0 0 1.41.24l-.2-.98.2.98c.25-.05.5-.17.69-.26l.05-.02-.42-.87.42.87 15.05-7.25.1-.05c1.14-.55 1.85-.89 2.46-1.38a7 7 0 0 0 1.13-1.13 12.87 12.87 0 0 0 1.43-2.56l7.25-15.05Z"
6079  />
6080  <path
6081    fill="#1DC956"
6082    d="M33.38 32.72 30.7 29.3 15.86 44.14l.2.2a1 1 0 0 0 1.14.2l15.1-7.27a3 3 0 0 0 1.08-4.55Z"
6083  />
6084  <path
6085    fill="#86F999"
6086    d="m26.62 27.28 2.67 3.43 14.85-14.85-.2-.2a1 1 0 0 0-1.14-.2l-15.1 7.27a3 3 0 0 0-1.08 4.55Z"
6087  />
6088  <circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)" />
6089  <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" />
6090</svg> `,Gbe=W`<svg viewBox="0 0 60 60" fill="none">
6091  <g clip-path="url(#clip0_7734_50402)">
6092    <path
6093      d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z"
6094      fill="#EB8B47"
6095    />
6096    <path
6097      d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z"
6098      stroke="#062B2B"
6099      stroke-opacity="0.1"
6100    />
6101    <path
6102      d="M19 52C24.5228 52 29 47.5228 29 42C29 36.4772 24.5228 32 
610219 32C13.4772 32 9 36.4772 9 42C9 47.5228 13.4772 52 19 52Z"
6103      fill="#FF974C"
6104      stroke="white"
6105      stroke-width="2"
6106    />
6107    <path
6108      fill-rule="evenodd"
6109      clip-rule="evenodd"
6110      d="M42.8437 8.3264C42.4507 7.70891 41.5493 7.70891 41.1564 8.32641L28.978 27.4638C28.5544 28.1295 29.0326 29.0007 29.8217 29.0007H54.1783C54.9674 29.0007 55.4456 28.1295 55.022 27.4638L42.8437 8.3264Z"
6111      fill="white"
6112    />
6113    <path
6114      fill-rule="evenodd"
6115      clip-rule="evenodd"
6116      d="M42.3348 11.6456C42.659 11.7608 42.9061 12.1492 43.4005 12.926L50.7332 24.4488C51.2952 25.332 51.5763 25.7737 51.5254 26.1382C51.4915 26.3808 51.3698 26.6026 51.1833 26.7614C50.9031 27 50.3796 27 49.3327 27H34.6673C33.6204 27 33.0969 27 32.8167 26.7614C32.6302 26.6026 32.5085 26.3808 32.4746 26.1382C32.4237 25.7737 32.7048 25.332 33.2669 24.4488L40.5995 12.926C41.0939 12.1492 41.341 11.7608 41.6652 11.6456C41.8818 11.5687 42.1182 11.5687 42.3348 11.6456ZM35.0001 26.999C38.8661 26.999 42.0001 23.865 42.0001 19.999C42.0001 23.865 45.1341 26.999 49.0001 26.999H35.0001Z"
6117      fill="#FF974C"
6118    />
6119    <path
6120      d="M10.1061 9.35712C9.9973 9.67775 9.99867 10.0388 9.99978 10.3323C9.99989 10.3611 10 10.3893 10 10.4167V25.5833C10 25.6107 9.99989 25.6389 9.99978 25.6677C9.99867 25.9612 9.9973 26.3222 10.1061 26.6429C10.306 27.2317 10.7683 27.694 11.3571 27.8939C11.6777 28.0027 12.0388 28.0013 12.3323 28.0002C12.3611 28.0001 12.3893 28 12.4167 28H19C24.5228 28 29 23.5228 29 18C29 12.4772 24.5228 8 19 8H12.4167C12.3893 8 12.3611 7.99989 12.3323 7.99978C12.0388 7.99867 11.6778 7.9973 11.3571 8.10614C10.7683 8.306 10.306 8.76834 10.1061 9.35712Z"
6121      fill="#FF974C"
6122      stroke="white"
6123      stroke-width="2"
6124    />
6125    <circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="white" stroke-width="2" />
6126    <circle cx="19" cy="42" r="4" fill="#EB8B47" stroke="white" stroke-width="2" />
6127  </g>
6128  <defs>
6129    <clipPath id="clip0_7734_50402">
6130      <rect width="60" height="60" fill="white" />
6131    </clipPath>
6132  </defs>
6133</svg> `,Ybe=W`<svg fill="none" viewBox="0 0 60 60">
6134  <g clip-path="url(#a)">
6135    <path
6136      fill="#1DC956"
6137      d="M0 25.01c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02.11 15.65.11 24.9.11h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.13 60 15.76 60 25v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-3.45 1.97-8.08 1.97-17.33 1.97H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 49.1 0 44.46 0 35.21v-10.2Z"
6138    />
6139    <path
6140      fill="#2BEE6C"
6141      d="M16.1 60c-3.82-.18-6.4-.64-8.53-1.86a15 15 0 0 1-5.6-5.6C.55 50.06.16 46.97.04 41.98L4.2 40.6a4 4 0 0 0 2.48-2.39l4.65-12.4a2 2 0 0 1 2.5-1.2l2.53.84a2 2 0 0 0 2.43-1l2.96-5.94a2 2 0 0 1 3.7.32l3.78 12.58a2 2 0 0 0 3.03 1.09l3.34-2.23a2 2 0 0 0 .65-.7l5.3-9.72a2 2 0 0 1 1.42-1.01l4.14-.69a2 2 0 0 1 1.6.44l3.9 3.24a2 2 0 0 0 2.7-.12l4.62-4.63c.08 2.2.08 4.8.08 7.93v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-2.13 1.22-4.7 1.68-8.54 1.86H16.11Z"
6142    />
6143    <path
6144      fill="#fff"
6145      d="m.07 43.03-.05-2.1 3.85-1.28a3 3 0 0 0 1.86-1.79l4.66-12.4a3 3 0 0 1 3.75-1.8l2.53.84a1 1 0 0 0 1.21-.5l2.97-5.94a3 3 0 0 1 5.56.48l3.77 12.58a1 1 0 0 0 1.51.55l3.34-2.23a1 1 0 0 0 .33-.35l5.3-9.71a3 3 0 0 1 2.14-1.53l4.13-.69a3 3 0 0 1 2.41.66l3.9 3.24a1 1 0 0 0 1.34-.06l5.28-5.28c.05.85.08 1.75.1 2.73L56 22.41a3 3 0 0 1-4.04.19l-3.9-3.25a1 1 0 0 0-.8-.21l-4.13.69a1 1 0 0 0-.72.5l-5.3 9.72a3 3 0 0 1-.97 1.05l-3.34 2.23a3 3 0 0 1-4.53-1.63l-3.78-12.58a1 1 0 0 0-1.85-.16l-2.97 5.94a3 3 0 0 1-3.63 1.5l-2.53-.84a1 1 0 0 0-1.25.6l-4.65 12.4a5 5 0 0 1-3.1 3L.07 43.02Z"
6146    />
6147    <path
6148      fill="#fff"
6149      fill-rule="evenodd"
6150      d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
6151      clip-rule="evenodd"
6152    />
6153    <path fill="#fff" d="M45 .28v59.66l-2 .1V.19c.7.02 1.37.05 2 .1Z" />
6154    <path fill="#2BEE6C" d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" />
6155    <path
6156      stroke="#fff"
6157      stroke-opacity=".1"
6158      d="M.5 25.01c0-4.63 0-8.08.24-10.8.25-2.7.73-4.64 1.66-6.28a14.5 14.5 0 0 1 5.42-5.41C9.46 1.58 11.39 1.1 14.1.85A133 133 0 0 1 24.9.61h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.67a14.5 14.5 0 0 1 5.42 5.4c.93 1.65 1.41 3.58 1.66 6.3.24 2.71.24 6.16.24 10.79v10.2c0 4.64 0 8.08-.24 10.8-.25 2.7-.73 4.65-1.66 6.28a14.5 14.5 0 0 1-5.42 5.42c-1.63.93-3.57 1.41-6.28 1.66-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.66a14.5 14.5 0 0 1-5.42-5.42C1.47 50.66 1 48.72.74 46.01A133 133 0 0 1 .5 35.2v-10.2Z"
6159    />
6160  </g>
6161  <defs>
6162    <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
6163  </defs>
6164</svg>`,Jbe=W`<svg fill="none" viewBox="0 0 60 60">
6165  <g clip-path="url(#a)">
6166    <rect width="60" height="60" fill="#C653C6" rx="30" />
6167    <path
6168      fill="#E87DE8"
6169      d="M57.98.01v19.5a4.09 4.09 0 0 0-2.63 2.29L50.7 34.2a2 2 0 0 1-2.5 1.2l-2.53-.84a2 2 0 0 0-2.42 1l-2.97 5.94a2 2 0 0 1-3.7-.32L32.8 28.6a2 2 0 0 0-3.02-1.09l-3.35 2.23a2 2 0 0 0-.64.7l-5.3 9.72a2 2 0 0 1-1.43 1.01l-4.13.69a2 2 0 0 1-1.61-.44l-3.9-3.24a2 2 0 0 0-2.69.12L2.1 42.93.02 43V.01h57.96Z"
6170    />
6171    <path
6172      fill="#fff"
6173      d="m61.95 16.94.05 2.1-3.85 1.28a3 3 0 0 0-1.86 1.79l-4.65 12.4a3 3 0 0 1-3.76 1.8l-2.53-.84a1 1 0 0 0-1.2.5l-2.98 5.94a3 3 0 0 1-5.55-.48l-3.78-12.58a1 1 0 0 0-1.5-.55l-3.35 2.23a1 1 0 0 0-.32.35l-5.3 9.72a3 3 0 0 1-2.14 1.52l-4.14.69a3 3 0 0 1-2.41-.66l-3.9-3.24a1 1 0 0 0-1.34.06l-5.28 5.28c-.05-.84-.08-1.75-.1-2.73l3.97-3.96a3 3 0 0 1 4.04-.19l3.89 3.25a1 1 0 0 0 .8.21l4.14-.68a1 1 0 0 0 .71-.51l5.3-9.71a3 3 0 0 1 .97-1.06l3.34-2.23a3 3 0 0 1 4.54 1.63l3.77 12.58a1 1 0 0 0 1.86.16l2.96-5.93a3 3 0 0 1 3.64-1.5l2.52.83a1 1 0 0 0 1.25-.6l4.66-12.4a5 5 0 0 1 3.1-2.99l4.43-1.48Z"
6174    />
6175    <path
6176      fill="#fff"
6177      fill-rule="evenodd"
6178      d="M35.5 27a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
6179      clip-rule="evenodd"
6180    />
6181    <path fill="#fff" d="M31 0v60h-2V0h2Z" />
6182    <path fill="#E87DE8" d="M33.5 27a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" />
6183  </g>
6184  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" />
6185  <defs>
6186    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
6187  </defs>
6188</svg> `,Xbe=W`<svg fill="none" viewBox="0 0 60 60">
6189  <g clip-path="url(#a)">
6190    <rect width="60" height="60" fill="#987DE8" rx="30" />
6191    <path
6192      fill="#fff"
6193      fill-rule="evenodd"
6194      d="m15.48 28.37 11.97-19.3a3 3 0 0 1 5.1 0l11.97 19.3a6 6 0 0 1 .9 3.14v.03a6 6 0 0 1-1.16 3.56L33.23 50.2a4 4 0 0 1-6.46 0L15.73 35.1a6 6 0 0 1-1.15-3.54v-.03a6 6 0 0 1 .9-3.16Z"
6195      clip-rule="evenodd"
6196    />
6197    <path
6198      fill="#643CDD"
6199      d="M30.84 10.11a1 1 0 0 0-.84-.46V24.5l12.6 5.53a2 2 0 0 0-.28-1.4L30.84 10.11Z"
6200    />
6201    <path
6202      fill="#BDADEB"
6203      d="M30 9.65a1 1 0 0 0-.85.46L17.66 28.64a2 2 0 0 0-.26 1.39L30 24.5V9.65Z"
6204    />
6205    <path
6206      fill="#643CDD"
6207      d="M30 50.54a1 1 0 0 0 .8-.4l11.24-15.38c.3-.44-.2-1-.66-.73l-9.89 5.68a3 3 0 0 1-1.5.4v10.43Z"
6208    />
6209    <path
6210      fill="#BDADEB"
6211      d="m17.97 34.76 11.22 15.37c.2.28.5.41.8.41V40.11a3 3 0 0 1-1.49-.4l-9.88-5.68c-.47-.27-.97.3-.65.73Z"
6212    />
6213    <path
6214      fill="#401AB3"
6215      d="M42.6 30.03 30 24.5v13.14a3 3 0 0 0 1.5-.4l10.14-5.83a2 2 0 0 0 .95-1.38Z"
6216    />
6217    <path
6218      fill="#7C5AE2"
6219      d="M30 37.64V24.46l-12.6 5.57a2 2 0 0 0 .97 1.39l10.13 5.82a3 3 0 0 0 1.5.4Z"
6220    />
6221  </g>
6222  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" />
6223  <defs>
6224    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
6225  </defs>
6226</svg> `,Qbe=W`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
6227  <rect width="64" height="64" rx="30" fill="#1DC956"/>
6228  <rect x="0.5" y="0.5" width="63" height="63" rx="29.5" stroke="#141414" stroke-opacity="0.1"/>
6229  <path d="M32.4053 19.8031C35.3901 19.8031 38.0431 20.8349 40.1619 22.8247L45.9656 17.0211C42.4465 13.7416 37.8773 11.7333 32.4053 11.7333C24.4829 11.7333 17.6475 16.2841 14.3127 22.9168L21.056 28.1493C22.6589 23.359 27.136 19.8031 32.4053 19.8031Z" fill="#1DC956" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6230  <path d="M32.4053 52.2667C37.8773 52.2667 42.465 50.4611 45.8182 47.3658L39.2407 42.2623C37.4351 43.4783 35.1321 44.2153 32.4053 44.2153C27.136 44.2153 22.6589 40.6594 21.056 35.8691L14.3127 41.1016C17.6475 47.7159 24.4829 52.2667 32.4053 52.2667Z" fill="#2BEE6C"/>
6231  <path d="M21.056 35.8507L19.5636 36.993L14.3127 41.0832M39.2407 42.2623L45.8182 47.3658C42.465 50.4611 37.8773 52.2667 32.4053 52.2667C24.4829 52.2667 17.6475 47.7159 14.3127 41.1016L21.056 35.8691C22.6589 40.6594 27.136 44.2153 32.4053 44.2153C35.1321 44.2153 37.4351 43.4783 39.2407 42.2623Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6232  <path d="M51.8613 32.4606C51.8613 31.0235 51.7323 29.6417 51.4928 28.3151H32.4053V36.1638H43.3124C42.8334 38.688 41.3963 40.8252 39.2407 42.2623L45.8181 47.3658C49.6503 43.8283 51.8613 38.6327 51.8613 32.4606Z" fill="#1FAD7E" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6233  <path d="M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3
6233653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" fill="#86F999"/>
6234  <path d="M21.056 35.8691L14.3127 41.1016M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6235</svg>
6236`,e4e=W`<svg fill="none" viewBox="0 0 60 60">
6237  <rect width="60" height="60" fill="#1DC956" rx="3" />
6238  <path
6239    fill="#1FAD7E"
6240    stroke="#fff"
6241    stroke-width="2"
6242    d="m30.49 29.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z"
6243  />
6244  <path
6245    fill="#2BEE6C"
6246    stroke="#fff"
6247    stroke-width="2"
6248    d="m30.49 19.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z"
6249  />
6250  <path
6251    fill="#86F999"
6252    stroke="#fff"
6253    stroke-width="2"
6254    d="m46.69 21.06-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-6.32-3.51-.18-.1c-2.33-1.3-3.72-2.06-5.22-2.33a9 9 0 0 0-3.08 0c-1.5.27-2.9 1.04-5.22 2.33l-.17.1-6.33 3.51-.05.03c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45Z"
6255  />
6256  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
6257</svg>`,t4e=W`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
6258  <g clip-path="url(#clip0_241_31636)">
6259    <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58318 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58318 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9269C60.4784 58.4159 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4159 2.1019 55.9269C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#794CFF"/>
6260    <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/>
6261    <path d="M40 39.4595C44.7824 36.693 48 31.5222 48 25.6C48 16.7634 40.8366 9.59998 32 9.59998C23.1634 9.59998 16 16.7634 16 25.6C16 31.5222 19.2176 36.693 24 39.4595V45.8144H40V39.4595Z" fill="#906EF7"/>
6262    <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#906EF7"/>
6263    <path d="M24 45.8144V39.4595C19.2176 36.693 16 31.5222 16 25.6C16 16.7634 23.1634 9.59998 32 9.59998C40.8366 9.59998 48 16.7634 48 25.6C48 31.5222 44.7824 36.693 40 39.4595V45.8144M24 45.8144H40M24 45.8144V49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6264    <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#643CDD" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6265    <path d="M29.6735 26.9101V29.1109H34.0753V26.9101C34.0753 25.6945 35.0607 24.7092 36.2762 24.7092C37.4917 24.7092 38.4771 25.6945 38.4771 26.9101C38.4771 28.1256 37.4917 29.1109 36.2762 29.1109H34.0753H29.6735H27.4726C26.2571 29.1109 25.2717 28.1256 25.2717 26.9101C25.2717 25.6945 26.2571 24.7092 27.4726 24.7092C28.6881 24.7092 29.6735 25.6945 29.6735 26.9101Z" fill="#906EF7"/>
6266    <path d="M29.6735 45.3183V26.9101C29.6735 25.6945 28.6881 24.7092 27.4726 24.7092V24.7092C26.2571 24.7092 25.2717 25.6945 25.2717 26.9101V26.9101C25.2717 28.1256 26.2571 29.1109 27.4726 29.1109H36.2762C37.4917 29.1109 38.4771 28.1256 38.4771 26.9101V26.9101C38.4771 25.6945 37.4917 24.7092 36.2762 24.7092V24.7092C35.0607 24.7092 34.0753 25.6945 34.0753 26.9101V45.3183" stroke="white" stroke-width="2" stroke-linejoin="round"/>
6267  </g>
6268  <defs>
6269    <clipPath id="clip0_241_31636">
6270      <rect width="64" height="64" fill="white"/>
6271    </clipPath>
6272  </defs>
6273</svg>
6274`,r4e=W`<svg fill="none" viewBox="0 0 60 60">
6275  <rect width="60" height="60" fill="#C653C6" rx="3" />
6276  <path
6277    fill="#fff"
6278    d="M20.03 15.22C20 15.6 20 16.07 20 17v2.8c0 1.14 0 1.7-.2 2.12-.15.31-.3.5-.58.71-.37.28-1.06.42-2.43.7-.59.12-1.11.29-1.6.51a9 9 0 0 0-4.35 4.36C10 30 10 32.34 10 37c0 4.66 0 7 .84 8.8a9 9 0 0 0 4.36 4.36C17 51 19.34 51 24 51h12c4.66 0 7 0 8.8-.84a9 9 0 0 0 4.36-4.36C50 44 50 41.66 50 37c0-4.66 0-7-.84-8.8a9 9 0 0 0-4.36-4.36c-.48-.22-1-.39-1.6-.5-1.36-.29-2.05-.43-2.42-.7-.27-.22-.43-.4-.58-.72-.2-.42-.2-.98-.2-2.11V17c0-.93 0-1.4-.03-1.78a9 9 0 0 0-8.19-8.19C31.4 7 30.93 7 30 7s-1.4 0-1.78.03a9 9 0 0 0-8.19 8.19Z"
6279  />
6280  <path
6281    fill="#E87DE8"
6282    d="M22 17c0-.93 0-1.4.04-1.78a7 7 0 0 1 6.18-6.18C28.6 9 29.07 9 30 9s1.4 0 1.78.04a7 7 0 0 1 6.18 6.18c.04.39.04.85.04 1.78v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.4-.08-1.78a4 4 0 0 0-3.14-3.14C31.39 12 30.93 12 30 12s-1.4 0-1.78.08a4 4 0 0 0-3.14 3.14c-.08.39-.08.85-.08 1.78v4.5a1.5 1.5 0 0 1-3 0V17Z"
6283  />
6284  <path
6285    fill="#E87DE8"
6286    fill-rule="evenodd"
6287    d="M12 36.62c0-4.32 0-6.48.92-8.09a7 7 0 0 1 2.61-2.61C17.14 25 19.3 25 23.62 25h6.86c.46 0 .7 0 .9.02 2.73.22 4.37 2.43 4.62 4.98.27-2.7 2.11-5 5.02-5A6.98 6.98 0 0 1 48 31.98v5.4c0 4.32 0 6.48-.92 8.09a7 7 0 0 1-2.61 2.61c-1.61.92-3.77.92-8.09.92h-5.86c-.46 0-.7 0-.9-.02-2.73-.22-4.37-2.43-4.62-4.98-.26 2.58-1.94 4.82-4.71 4.99l-.7.01c-.55 0-.82 0-1.05-.02a7 7 0 0 1-6.52-6.52c-.02-.23-.02-.5-.02-1.05v-4.79Zm21.24-.27a4 4 0 1 0-6.48 0 31.28 31.28 0 0 1 1.57 2.23c.17.4.17.81.17 1.24V42.5a1.5 1.5 0 0 0 3 0V39.82c0-.43 0-.85.17-1.24.09-.2.58-.87 1.57-2.23Z"
6288    clip-rule="evenodd"
6289  />
6290  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
6291</svg>`,n4e=W`<svg fill="none" viewBox="0 0 60 60">
6292  <g clip-path="url(#a)">
6293    <path
6294      fill="#EB8B47"
6295      d="M0 24.9c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02 0 15.65 0 24.9 0h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.02 60 15.65 60 24.9v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6C48.98 60 44.35 60 35.1 60H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 48.98 0 44.35 0 35.1V24.9Z"
6296    />
6297    <path
6298      stroke="#062B2B"
6299      stroke-opacity=".1"
6300      d="M.5 24.9c0-4.64 0-8.08.24-10.8.25-2.7.73-4.65 1.66-6.28A14.5 14.5 0 0 1 7.82 2.4C9.46 1.47 11.39 1 14.1.74A133 133 0 0 1 24.9.5h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.66a14.5 14.5 0 0 1 5.42 5.42c.93 1.63 1.41 3.57 1.66 6.28.24 2.72.24 6.16.24 10.8v10.2c0 4.63 0 8.08-.24 10.8-.25 2.7-.73 4.64-1.66 6.28a14.5 14.5 0 0 1-5.42 5.41c-1.63.94-3.57 1.42-6.28 1.67-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.67a14.5 14.5 0 0 1-5.42-5.4C1.47 50.53 1 48.6.74 45.88A133 133 0 0 1 .5 35.1V24.9Z"
6301    />
6302    <path
6303      fill="#FF974C"
6304      stroke="#fff"
6305      stroke-width="2"
6306      d="M39.2 29.2a13 13 0 1 0-18.4 0l1.3 1.28a12.82 12.82 0 0 1 2.1 2.39 6 6 0 0 1 .6 1.47c.2.76.2 1.56.2 3.17v11.24c0 1.08 0 1.61.13 2.12a4 4 0 0 0 .41.98c.26.45.64.83 1.4 1.6l.3.29c.65.65.98.98 1.36 1.09.26.07.54.07.8 0 .38-.11.7-.44 1.36-1.1l3.48-3.47c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.47-.48c-.
630665-.65-.98-.98-1.09-1.36a1.5 1.5 0 0 1 0-.8c.1-.38.44-.7 1.1-1.36l.47-.48c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.48-.5c-.65-.64-.98-.97-1.08-1.35a1.5 1.5 0 0 1 0-.79c.1-.38.42-.7 1.06-1.36l5.46-5.55Z"
6307    />
6308    <circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2" />
6309  </g>
6310  <defs>
6311    <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
6312  </defs>
6313</svg> `,i4e=W`<svg width="40" height="42" viewBox="0 0 40 42" fill="none">
6314<path opacity="0.7" d="M19.9526 41.9076L7.3877 34.655V26.1226L19.9526 33.3751V41.9076Z" fill="url(#paint0_linear_2113_32117)"/>
6315<path opacity="0.7" d="M19.9521 41.9076L32.5171 34.655V26.1226L19.9521 33.3751V41.9076Z" fill="url(#paint1_linear_2113_32117)"/>
6316<path opacity="0.7" d="M39.9095 7.34521V21.8562L32.5166 26.1225V11.6114L39.9095 7.34521Z" fill="url(#paint2_linear_2113_32117)"/>
6317<path d="M39.9099 7.34536L27.345 0.0927734L19.9521 4.359L32.5171 11.6116L39.9099 7.34536Z" fill="url(#paint3_linear_2113_32117)"/>
6318<path d="M0 7.34536L12.5649 0.0927734L19.9519 4.359L7.387 11.6116L0 7.34536Z" fill="#F969D3"/>
6319<path opacity="0.7" d="M0 7.34521V21.8562L7.387 26.1225V11.6114L0 7.34521Z" fill="url(#paint4_linear_2113_32117)"/>
6320<defs>
6321<linearGradient id="paint0_linear_2113_32117" x1="18.6099" y1="41.8335" x2="7.73529" y2="8.31842" gradientUnits="userSpaceOnUse">
6322<stop stop-color="#E98ADA"/>
6323<stop offset="1" stop-color="#7E4DBD"/>
6324</linearGradient>
6325<linearGradient id="paint1_linear_2113_32117" x1="26.2346" y1="26.1226" x2="26.2346" y2="41.9076" gradientUnits="userSpaceOnUse">
6326<stop stop-color="#719DED"/>
6327<stop offset="1" stop-color="#2545BE"/>
6328</linearGradient>
6329<linearGradient id="paint2_linear_2113_32117" x1="36.213" y1="7.34521" x2="36.213" y2="26.1225" gradientUnits="userSpaceOnUse">
6330<stop stop-color="#93EBFF"/>
6331<stop offset="1" stop-color="#197DDB"/>
6332</linearGradient>
6333<linearGradient id="paint3_linear_2113_32117" x1="29.931" y1="0.0927734" x2="38.2156" y2="14.8448" gradientUnits="userSpaceOnUse">
6334<stop stop-color="#F969D3"/>
6335<stop offset="1" stop-color="#4F51C0"/>
6336</linearGradient>
6337<linearGradient id="paint4_linear_2113_32117" x1="18.1251" y1="44.2539" x2="-7.06792" y2="15.2763" gradientUnits="userSpaceOnUse">
6338<stop stop-color="#E98ADA"/>
6339<stop offset="1" stop-color="#7E4DBD"/>
6340</linearGradient>
6341</defs>
6342</svg>`,s4e=W`<svg fill="none" viewBox="0 0 60 60">
6343  <g clip-path="url(#a)">
6344    <rect width="60" height="60" fill="#00ACE6" rx="30" />
6345    <circle cx="64" cy="39" r="50" fill="#1AC6FF" stroke="#fff" stroke-width="2" />
6346    <circle cx="78" cy="30" r="50" fill="#4DD2FF" stroke="#fff" stroke-width="2" />
6347    <circle cx="72" cy="15" r="35" fill="#80DFFF" stroke="#fff" stroke-width="2" />
6348    <circle cx="34" cy="-17" r="45" stroke="#fff" stroke-width="2" />
6349    <circle cx="34" cy="-5" r="50" stroke="#fff" stroke-width="2" />
6350    <circle cx="30" cy="45" r="4" fill="#4DD2FF" stroke="#fff" stroke-width="2" />
6351    <circle cx="39.5" cy="27.5" r="4" fill="#80DFFF" stroke="#fff" stroke-width="2" />
6352    <circle cx="16" cy="24" r="4" fill="#19C6FF" stroke="#fff" stroke-width="2" />
6353  </g>
6354  <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" />
6355  <defs>
6356    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
6357  </defs>
6358</svg>`,o4e=W`<svg fill="none" viewBox="0 0 60 60">
6359  <g clip-path="url(#a)">
6360    <rect width="60" height="60" fill="#C653C6" rx="3" />
6361    <path
6362      fill="#E87DE8"
6363      stroke="#fff"
6364      stroke-width="2"
6365      d="M52.1 47.34c0-4.24-1.44-9.55-5.9-12.4a2.86 2.86 0 0 0-1.6-3.89v-.82c0-1.19-.52-2.26-1.35-3a4.74 4.74 0 0 0-2.4-6.26v-5.5a11.31 11.31 0 1 0-22.63 0v2.15a3.34 3.34 0 0 0-1.18 5.05 4.74 4.74 0 0 0-.68 6.44A5.22 5.22 0 0 0 14 35.92c-3.06 4.13-6.1 8.3-6.1 15.64 0 2.67.37 4.86.74 6.39a20.3 20.3 0 0 0 .73 2.39l.02.04v.01l.92-.39-.92.4.26.6h38.26l.3-.49-.87-.51.86.5.02-.01.03-.07a16.32 16.32 0 0 0 .57-1.05c.36-.72.85-1.74 1.33-2.96a25.51 25.51 0 0 0 1.94-9.07Z"
6366    />
6367    <path
6368      fill="#fff"
6369      fill-rule="evenodd"
6370      d="M26.5 29.5c-3-.5-5.5-3-5.5-7v-7c0-.47 0-.7.03-.9a3 3 0 0 1 2.58-2.57c.2-.03.42-.03.89-.03 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.4 0 2.1 0 2.65.23a3 3 0 0 1 1.62 1.62c.23.55.23 1.25.23 2.65v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.5 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z"
6371      clip-rule="evenodd"
6372    />
6373  </g>
6374  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
6375  <defs>
6376    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="3" /></clipPath>
6377  </defs>
6378</svg> `,a4e=W`<svg fill="none" viewBox="0 0 60 60">
6379  <rect width="60" height="60" fill="#794CFF" rx="3" />
6380  <path
6381    fill="#987DE8"
6382    stroke="#fff"
6383    stroke-width="2"
6384    d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"
6385  />
6386  <path fill="#fff" d="M37.5 25h10v10h-10z" />
6387  <path fill="#4019B2" d="M42.5 25h5v10h-5z" />
6388  <path fill="#fff" d="M19.5 25h10v10h-10z" />
6389  <path fill="#4019B2" d="M24.5 25h5v10h-5z" />
6390  <path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z" />
6391  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
6392</svg>
6392`,c4e=W`<svg width="60" height="60" viewBox="0 0 60 60" fill="none">
6393<g clip-path="url(#clip0_13859_31161)">
6394  <path d="M0 24.8995C0 15.6481 0 11.0223 1.97053 7.56763C3.3015 5.2342 5.23468 3.30101 7.56812 1.97004C11.0228 -0.000488281 15.6485 -0.000488281 24.9 -0.000488281H35.1C44.3514 -0.000488281 48.9772 -0.000488281 52.4319 1.97004C54.7653 3.30101 56.6985 5.2342 58.0295 7.56763C60 11.0223 60 15.6481 60 24.8995V35.0995C60 44.351 60 48.9767 58.0295 52.4314C56.6985 54.7648 54.7653 56.698 52.4319 58.029C48.9772 59.9995 44.3514 59.9995 35.1 59.9995H24.9C15.6485 59.9995 11.0228 59.9995 7.56812 58.029C5.23468 56.698 3.3015 54.7648 1.97053 52.4314C0 48.9767 0 44.351 0 35.0995V24.8995Z" fill="#EB8B47"/>
6395  <path d="M0.5 24.8995C0.5 20.2647 0.50047 16.8216 0.744315 14.1045C0.987552 11.3941 1.46987 9.45455 2.40484 7.81536C3.69145 5.55971 5.56019 3.69096 7.81585 2.40435C9.45504 1.46938 11.3946 0.987064 14.105 0.743826C16.8221 0.499981 20.2652 0.499512 24.9 0.499512H35.1C39.7348 0.499512 43.1779 0.499981 45.895 0.743826C48.6054 0.987064 50.545 1.46938 52.1841 2.40435C54.4398 3.69096 56.3086 5.55971 57.5952 7.81536C58.5301 9.45455 59.0124 11.3941 59.2557 14.1045C59.4995 16.8216 59.5 20.2647 59.5 24.8995V35.0995C59.5 39.7343 59.4995 43.1774 59.2557 45.8945C59.0124 48.6049 58.5301 50.5445 57.5952 52.1837C56.3086 54.4393 54.4398 56.3081 52.1841 57.5947C50.545 58.5296 48.6054 59.012 45.895 59.2552C43.1779 59.499 39.7348 59.4995 35.1 59.4995H24.9C20.2652 59.4995 16.8221 59.499 14.105 59.2552C11.3946 59.012 9.45504 58.5296 7.81585 57.5947C5.56019 56.3081 3.69145 54.4393 2.40484 52.1837C1.46987 50.5445 0.987552 48.6049 0.744315 45.8945C0.50047 43.1774 0.5 39.7343 0.5 35.0995V24.8995Z" stroke="#141414" stroke-opacity="0.1"/>
6396  <path d="M13 26.0335C13 21.7838 13 19.659 14.0822 18.1694C14.4318 17.6883 14.8548 17.2653 15.3359 16.9157C16.8255 15.8335 18.9503 15.8335 23.2 15.8335H36.8C41.0497 15.8335 43.1745 15.8335 44.6641 16.9157C45.1452 17.2653 45.5682 17.6883 45.9178 18.1694C47 19.659 47 21.7838 47 26.0335V33.9668C47 38.2165 47 40.3414 45.9178 41.831C45.5682 42.312 45.1452 42.7351 44.6641 43.0846C43.1745 44.1668 41.0497 44.1668 36.8 44.1668H23.2C18.9503 44.1668 16.8255 44.1668 15.3359 43.0846C14.8548 42.7351 14.4318 42.312 14.0822 41.831C13 40.3414 13 38.2165 13 33.9668V26.0335Z" fill="#FF974C" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6397  <path d="M39.5 36.667H36.6666" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
6398  <path d="M45.2 23.0645H14.8C14.0501 23.0645 13.6751 23.0645 13.4122 23.2554C13.3273 23.3171 13.2527 23.3918 13.191 23.4767C13 23.7395 13 24.1145 13 24.8645V27.2645C13 28.0144 13 28.3894 13.191 28.6522C13.2527 28.7371 13.3273 28.8118 13.4122 28.8735C13.6751 29.0645 14.0501 29.0645 14.8 29.0645H45.2C45.9499 29.0645 46.3249 29.0645 46.5878 28.8735C46.6727 28.8118 46.7473 28.7371 46.809 28.6522C47 28.3894 47 28.0144 47 27.2645V24.8645C47 24.1145 47 23.7395 46.809 23.4767C46.7473 23.3918 46.6727 23.3171 46.5878 23.2554C46.3249 23.0645 45.9499 23.0645 45.2 23.0645Z" fill="white" fill-opacity="0.4" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6399</g>
6400<defs>
6401  <clipPath id="clip0_13859_31161">
6402    <rect width="60" height="60" fill="white"/>
6403  </clipPath>
6404</defs>
6405</svg>`,l4e=W`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
6406  <g clip-path="url(#clip0_241_31635)">
6407    <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58317 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58317 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9268C60.4784 58.4158 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4158 2.1019 55.9268C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#EB8B47"/>
6408    <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199
6408C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/>
6409    <path d="M28.1042 49.2329L13.1024 51.2077L15.0772 36.2059L37.1015 14.1815C39.2441 12.039 40.3154 10.9677 41.5718 10.624C42.4205 10.3918 43.3159 10.3918 44.1645 10.624C45.421 10.9677 46.4922 12.039 48.6348 14.1815L50.1286 15.6753C52.2711 17.8179 53.3424 18.8891 53.6861 20.1456C53.9183 20.9942 53.9183 21.8896 53.6861 22.7383C53.3424 23.9947 52.2711 25.066 50.1286 27.2086L28.1042 49.2329Z" fill="#FF974C" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6410    <path d="M38.5962 20.5376L22.4199 36.7139" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6411    <path d="M43.7727 25.714L27.5964 41.8903" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6412    <path d="M22.3703 36.7635C19.3258 39.808 16.0198 36.6395 16.2616 35.0324" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6413    <path d="M27.5466 41.9399C24.5034 44.9831 28.155 48.7098 29.2738 48.0475" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6414    <path d="M27.5468 41.9398C23.428 46.0586 18.2516 40.8822 22.3704 36.7634" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6415    <path d="M15.8191 50.5214C15.4711 49.5823 14.728 48.8392 13.7889 48.4912" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6416    <path d="M49.2862 29.5805L34.7275 15.0219" stroke="#E4E7E7" stroke-width="2" stroke-linejoin="round"/>
6417  </g>
6418  <defs>
6419    <clipPath id="clip0_241_31635">
6420      <rect width="64" height="64" fill="white"/>
6421    </clipPath>
6422  </defs>
6423</svg>
6424`,u4e=W`<svg
6425  viewBox="0 0 60 60"
6426  fill="none"
6427>
6428  <g clip-path="url(#1)">
6429    <rect width="60" height="60" rx="30" fill="#00ACE6" />
6430    <path
6431      d="M59 73C59 89.0163 46.0163 102 30 102C13.9837 102 1 89.0163 1 73C1 56.9837 12 44 30 44C48 44 59 56.9837 59 73Z"
6432      fill="#1AC6FF"
6433      stroke="white"
6434      stroke-width="2"
6435    />
6436    <path
6437      d="M18.6904 19.9015C19.6264 15.3286 23.3466 11.8445 27.9708 11.2096C29.3231 11.024 30.6751 11.0238 32.0289 11.2096C36.6532 11.8445 40.3733 15.3286 41.3094 19.9015C41.4868 20.7681 41.6309 21.6509 41.7492 22.5271C41.8811 23.5041 41.8811 24.4944 41.7492 25.4715C41.6309 26.3476 41.4868 27.2304 41.3094 28.097C40.3733 32.6699 36.6532 36.154 32.0289 36.7889C30.6772 36.9744 29.3216 36.9743 27.9708 36.7889C23.3466 36.154 19.6264 32.6699 18.6904 28.097C18.513 27.2304 18.3689 26.3476 18.2506 25.4715C18.1186 24.4944 18.1186 23.5041 18.2506 22.5271C18.3689 21.6509 18.513 20.7681 18.6904 19.9015Z"
6438      fill="#1AC6FF"
6439      stroke="white"
6440      stroke-width="2"
6441    />
6442    <circle cx="24.5" cy="23.5" r="1.5" fill="white" />
6443    <circle cx="35.5" cy="23.5" r="1.5" fill="white" />
6444    <path
6445      d="M31 20L28 28H32"
6446      stroke="white"
6447      stroke-width="2"
6448      stroke-linecap="round"
6449      stroke-linejoin="round"
6450    />
6451  </g>
6452  <rect x="0.5" y="0.5" width="59" height="59" rx="29.5" stroke="white" stroke-opacity="0.1" />
6453  <defs>
6454    <clipPath id="1">
6455      <rect width="60" height="60" rx="30" fill="white" />
6456    </clipPath>
6457  </defs>
6458</svg> `,d4e=W`<svg fill="none" viewBox="0 0 80 80">
6459  <g clip-path="url(#a)">
6460    <path fill="url(#b)" d="M40 80a40 40 0 1 0 0-80 40 40 0 0 0 0 80Z" />
6461    <path
6462      stroke="#fff"
6463      stroke-opacity=".1"
6464      d="M79.5 40a39.5 39.5 0 1 1-79 0 39.5 39.5 0 0 1 79 0Z"
6465    />
6466    <path
6467      fill="#fff"
6468      d="m62.62 51.54-7.54 7.91a1.75 1.75 0 0 1-1.29.55H18.02a.9.9 0 0 1-.8-.52.84.84 0 0 1 .16-.92l7.55-7.92a1.75 1.75 0 0 1 1.28-.55h35.77a.87.87 0 0 1 .8.52.84.84 0 0 1-.16.93Zm-7.54-15.95a1.75 1.75 0 0 0-1.29-.54H18.02a.89.89 0 0 0-.8.51.84.84 0 0 0 .16.93l7.55 7.92a1.75 1.75 0 0 0 1.28.54h35.77a.89.89 0 0 0 .8-.51.84.84 0 0 0-.16-.93l-7.54-7.92ZM18.02 29.9h35.77a1.79 1.79 0 0 0 1.29-.54l7.54-7.92a.85.85 0 0 0 .16-.93.87.87 0 0 0-.8-.51H26.21a1.79 1.79 0 0 0-1.28.54l-7.55 7.92a.85.85 0 0 0-.16.93.89.89 0 0 0 .8.52Z"
6469    />
6470  </g>
6471  <defs>
6472    <linearGradient id="b" x1="6.75" x2="80.68" y1="81.91" y2="7.37" gradientUnits="userSpaceOnUse">
6473      <stop offset=".08" stop-color="#9945FF" />
6474      <stop offset=".3" stop-color="#8752F3" />
6475      <stop offset=".5" stop-color="#5497D5" />
6476      <stop offset=".6" stop-color="#43B4CA" />
6477      <stop offset=".72" stop-color="#28E0B9" />
6478      <stop offset=".97" stop-color="#19FB9B" />
6479    </linearGradient>
6480    <clipPath id="a"><path fill="#fff" d="M0 0h80v80H0z" /></clipPath>
6481  </defs>
6482</svg> `,h4e=W`<svg viewBox="0 0 60 60" fill="none">
6483  <g clip-path="url(#1)">
6484    <path
6485      d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z"
6486      fill="#794CFF"
6487    />
6488    <path
6489      d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z"
6490      stroke="#062B2B"
6491      stroke-opacity="0.1"
6492    />
6493    <path
6494      d="M35.1403 31.5016C35.1193 30.9637 35.388 30.4558 35.8446 30.1707C36.1207 29.9982 36.4761 29.8473 36.7921 29.7685C37.3143 29.6382 37.8664 29.7977 38.2386 30.1864C38.8507 30.8257 39.3004 31.6836 39.8033 32.408C40.2796 33.0942 41.4695 33.2512 41.9687 32.5047C42.4839 31.7341 42.9405 30.8229 43.572 30.1399C43.9375 29.7447 44.4866 29.5756 45.0111 29.6967C45.3283 29.7701 45.6863 29.9147 45.9655 30.0823C46.4269 30.3595 46.7045 30.8626 46.6928 31.4008C46.6731 32.3083 46.3764 33.2571 46.2158 34.1473C46.061 35.0048 46.9045 35.8337 47.7592 35.664C48.6464 35.4878 49.5899 35.1747 50.497 35.1391C51.0348 35.1181 51.5427 35.3868 51.8279 35.8433C52.0004 36.1195 52.1513 36.4749 52.2301 36.7908C52.3604 37.3131 52.2009 37.8651 51.8121 38.2374C51.1729 38.8495 50.3151 39.2991 49.5908 39.8019C48.9046 40.2782 48.7473 41.4683 49.4939 41.9675C50.2644 42.4827 51.1757 42.9393 51.8587 43.5708C52.2539 43.9362 52.423 44.4854 52.3018 45.0099C52.2285 45.3271 52.0839 45.6851 51.9162 45.9642C51.6391 46.4257 51.1359 46.7032 50.5978 46.6916C49.6903 46.6719 48.7417 46.3753 47.8516 46.2146C46.9939 46.0598 46.1648 46.9035 46.3346 47.7583C46.5108 48.6454 46.8239 49.5888 46.8594 50.4958C46.8805 51.0336 46.6117 51.5415 46.1552 51.8267C45.879 51.9992 45.5236 52.15 45.2077 52.2289C44.6854 52.3592 44.1334 52.1997 43.7611 51.8109C43.1491 51.1718 42.6996 50.314 42.1968 49.5897C41.7203 48.9034 40.5301 48.7463 40.0309 49.493C39.5157 50.2634 39.0592 51.1746 38.4278 51.8574C38.0623 52.2527 37.5132 52.4218 36.9887 52.3006C36.6715 52.2273 36.3135 52.0826 36.0343 51.915C35.5729 51.6379 35.2953 51.1347 35.307 50.5966C35.3267 49.6891 35.6233 48.7405 35.7839 47.8505C35.9388 46.9928 35.0951 46.1636 34.2402 46.3334C33.3531 46.5096 32.4098 46.8227 31.5028 46.8582C30.9649 46.8793 30.457 46.6105 30.1719 46.154C29.9994 45.8778 29.8485 45.5224 29.7697 45.2065C29.6394 44.6842 29.7989 44.1322 30.1877 43.7599C30.8269 43.1479 31.6847 42.6982 32.4091 42.1954C33.0954 41.7189 33.2522 40.5289 32.5056 40.0297C31.7351 39.5145 30.824 39.058 30.1411 38.4265C29.7459 38.0611 29.5768 37.5119 29.698 36.9875C29.7713 36.6702 29.9159 36.3122 30.0836 36.0331C30.3607 35.5
6494717 30.8638 35.2941 31.402 35.3058C32.3095 35.3255 33.2583 35.6221 34.1485 35.7828C35.006 35.9376 35.8349 35.094 35.6652 34.2393C35.489 33.3521 35.1759 32.4087 35.1403 31.5016Z"
6495      fill="#906EF7"
6496      stroke="white"
6497      stroke-width="2"
6498    />
6499    <path
6500      d="M20.7706 8.22357C20.9036 7.51411 21.5231 7 22.2449 7H23.7551C24.4769 7 25.0964 7.51411 25.2294 8.22357C25.5051 9.69403 25.4829 11.6321 27.1202 12.2606C27.3092 12.3331 27.4958 12.4105 27.6798 12.4926C29.2818 13.2072 30.6374 11.8199 31.8721 10.9752C32.4678 10.5676 33.2694 10.6421 33.7798 11.1525L34.8477 12.2204C35.3581 12.7308 35.4326 13.5323 35.025 14.128C34.1802 15.3627 32.7931 16.7183 33.5077 18.3202C33.5898 18.5043 33.6672 18.6909 33.7398 18.88C34.3683 20.5171 36.3061 20.4949 37.7764 20.7706C38.4859 20.9036 39 21.5231 39 22.2449V23.7551C39 24.4769 38.4859 25.0964 37.7764 25.2294C36.3061 25.5051 34.3685 25.483 33.7401 27.1201C33.6675 27.3093 33.59 27.4961 33.5079 27.6803C32.7934 29.282 34.1803 30.6374 35.025 31.8719C35.4326 32.4677 35.3581 33.2692 34.8477 33.7796L33.7798 34.8475C33.2694 35.3579 32.4678 35.4324 31.8721 35.0248C30.6376 34.1801 29.2823 32.7934 27.6806 33.508C27.4962 33.5903 27.3093 33.6678 27.12 33.7405C25.483 34.3688 25.5051 36.3062 25.2294 37.7764C25.0964 38.4859 24.4769 39 23.7551 39H22.2449C21.5231 39 20.9036 38.4859 20.7706 37.7764C20.4949 36.3062 20.517 34.3688 18.88 33.7405C18.6908 33.6678 18.5039 33.5903 18.3196 33.5081C16.7179 32.7936 15.3625 34.1804 14.1279 35.0251C13.5322 35.4327 12.7307 35.3582 12.2203 34.8478L11.1524 33.7799C10.642 33.2695 10.5675 32.4679 10.9751 31.8722C11.8198 30.6376 13.2067 29.2822 12.4922 27.6804C12.41 27.4962 12.3325 27.3093 12.2599 27.1201C11.6315 25.483 9.69392 25.5051 8.22357 25.2294C7.51411 25.0964 7 24.4769 7 23.7551V22.2449C7 21.5231 7.51411 20.9036 8.22357 20.7706C9.69394 20.4949 11.6317 20.5171 12.2602 18.88C12.3328 18.6909 12.4103 18.5042 12.4924 18.3201C13.207 16.7181 11.8198 15.3625 10.975 14.1278C10.5674 13.5321 10.6419 12.7305 11.1523 12.2201L12.2202 11.1522C12.7306 10.6418 13.5322 10.5673 14.1279 10.9749C15.3626 11.8197 16.7184 13.2071 18.3204 12.4925C18.5044 12.4105 18.6909 12.3331 18.8799 12.2606C20.5171 11.6321 20.4949 9.69403 20.7706 8.22357Z"
6501      fill="#906EF7"
6502      stroke="white"
6503      stroke-width="2"
6504    />
6505    <circle cx="23" cy="23" r="6" fill="#794CFF" stroke="white" stroke-width="2" />
6506    <circle cx="41" cy="41" r="4" fill="#794CFF" stroke="white" stroke-width="2" />
6507  </g>
6508  <defs>
6509    <clipPath id="1">
6510      <rect width="60" height="60" fill="white" />
6511    </clipPath>
6512  </defs>
6513</svg> `,f4e=ne`
6514  :host {
6515    display: block;
6516    width: var(--local-size);
6517    height: var(--local-size);
6518  }
6519
6520  :host svg {
6521    width: 100%;
6522    height: 100%;
6523  }
6524`;var k8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const p4e={browser:Zbe,dao:Gbe,defi:Ybe,defiAlt:Jbe,eth:Xbe,layers:e4e,lock:r4e,login:n4e,network:s4e,nft:o4e,noun:a4e,profile:u4e,system:h4e,meld:i4e,onrampCard:c4e,google:Qbe,pencil:l4e,lightbulb:t4e,solana:d4e,bitcoin:Kbe};let np=class extends oe{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=`
6525       --local-size: var(--wui-visual-size-${this.size});
6526   `,q`${p4e[this.name]}`}};np.styles=[ve,f4e];k8([D()],np.prototype,"name",void 0);k8([D()],np.prototype,"size",void 0);np=k8([ye("wui-visual")],np);var A6;(function(t){t.approve="approved",t.bought="bought",t.borrow="borrowed",t.burn="burnt",t.cancel="canceled",t.claim="claimed",t.deploy="deployed",t.deposit="deposited",t.execute="executed",t.mint="minted",t.receive="received",t.repay="repaid",t.send="sent",t.sell="sold",t.stake="staked",t.trade="swapped",t.unstake="unstaked",t.withdraw="withdrawn"})(A6||(A6={}));const g4e=ne`
6527  :host > wui-flex {
6528    display: flex;
6529    justify-content: center;
6530    align-items: center;
6531    position: relative;
6532    width: 40px;
6533    height: 40px;
6534    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
6535    background-color: var(--wui-color-gray-glass-005);
6536  }
6537
6538  :host > wui-flex wui-image {
6539    display: block;
6540  }
6541
6542  :host > wui-flex,
6543  :host > wui-flex wui-image,
6544  .swap-images-container,
6545  .swap-images-container.nft,
6546  wui-image.nft {
6547    border-top-left-radius: var(--local-left-border-radius);
6548    border-top-right-radius: var(--local-right-border-radius);
6549    border-bottom-left-radius: var(--local-left-border-radius);
6550    border-bottom-right-radius: var(--local-right-border-radius);
6551  }
6552
6553  wui-icon {
6554    width: 20px;
6555    height: 20px;
6556  }
6557
6558  wui-icon-box {
6559    position: absolute;
6560    right: 0;
6561    bottom: 0;
6562    transform: translate(20%, 20%);
6563  }
6564
6565  .swap-images-container {
6566    position: relative;
6567    width: 40px;
6568    height: 40px;
6569    overflow: hidden;
6570  }
6571
6572  .swap-images-container wui-image:first-child {
6573    position: absolute;
6574    width: 40px;
6575    height: 40px;
6576    top: 0;
6577    left: 0%;
6578    clip-path: inset(0px calc(50% + 2px) 0px 0%);
6579  }
6580
6581  .swap-images-container wui-image:last-child {
6582    clip-path: inset(0px 0px 0px calc(50% + 2px));
6583  }
6584`;var ld=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ya=class extends oe{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){const[e,r]=this.images,n=(e==null?void 0:e.type)==="NFT",i=r!=null&&r.url?r.type==="NFT":n,s=n?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",o=i?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=`
6585    --local-left-border-radius: ${s};
6586    --local-right-border-radius: ${o};
6587    `,q`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){const[e,r]=this.images,n=e==null?void 0:e.type;return this.images.length===2&&(e!=null&&e.url||r!=null&&r.url)?q`<div class="swap-images-container">
6588        ${e!=null&&e.url?q`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:null}
6589        ${r!=null&&r.url?q`<wui-image src=${r.url} alt="Transaction image"></wui-image>`:null}
6590      </div>`:e!=null&&e.url?q`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:n==="NFT"?q`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>`:q`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`}templateIcon(){let e="accent-100",r;return r=this.getIcon(),this.status&&(e=this.getStatusColor()),r?q`
6591      <wui-icon-box
6592        size="xxs"
6593        iconColor=${e}
6594        backgroundColor=${e}
6595        background="opaque"
6596        icon=${r}
6597        ?border=${!0}
6598        borderColor="wui-color-bg-125"
6599      ></wui-icon-box>
6600    `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontalBold":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};Ya.styles=[g4e];ld([D()],Ya.prototype,"type",void 0);ld([D()],Ya.prototype,"status",void 0);ld([D()],Ya.prototype,"direction",void 0);ld([D({type:Boolean})],Ya.prototype,"onlyDirectionIcon",void 0);ld([D({type:Array})],Ya.prototype,"images",void 0);ld([D({type:Object})],Ya.prototype,"secondImage",void 0);Ya=ld([ye("wui-transaction-visual")],Ya);const w4e=ne`
6601  :host > wui-flex:first-child {
6602    align-items: center;
6603    column-gap: var(--wui-spacing-s);
6604    padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);
6605    width: 100%;
6606  }
6607
6608  :host > wui-flex:first-child wui-text:nth-child(1) {
6609    text-transform: capitalize;
6610  }
6611
6612  wui-transaction-visual {
6613    width: 40px;
6614    height: 40px;
6615  }
6616
6617  wui-flex {
6618    flex: 1;
6619  }
6620
6621  :host wui-flex wui-flex {
6622    overflow: hidden;
6623  }
6624
6625  :host .description-container wui-text span {
6626    word-break: break-all;
6627  }
6628
6629  :host .description-container wui-text {
6630    overflow: hidden;
6631  }
6632
6633  :host .description-separator-icon {
6634    margin: 0px 6px;
6635  }
6636
6637  :host wui-text > span {
6638    overflow: hidden;
6639    display: -webkit-box;
6640    -webkit-box-orient: vertical;
6641    -webkit-line-clamp: 1;
6642  }
6643`;var no=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
6643a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ui=class extends oe{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return q`
6644      <wui-flex>
6645        <wui-transaction-visual
6646          .status=${this.status}
6647          direction=${Ft(this.direction)}
6648          type=${this.type}
6649          onlyDirectionIcon=${Ft(this.onlyDirectionIcon)}
6650          .images=${this.images}
6651        ></wui-transaction-visual>
6652        <wui-flex flexDirection="column" gap="3xs">
6653          <wui-text variant="paragraph-600" color="fg-100">
6654            ${A6[this.type]||this.type}
6655          </wui-text>
6656          <wui-flex class="description-container">
6657            ${this.templateDescription()} ${this.templateSecondDescription()}
6658          </wui-flex>
6659        </wui-flex>
6660        <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>
6661      </wui-flex>
6662    `}templateDescription(){var r;const e=(r=this.descriptions)==null?void 0:r[0];return e?q`
6663          <wui-text variant="small-500" color="fg-200">
6664            <span>${e}</span>
6665          </wui-text>
6666        `:null}templateSecondDescription(){var r;const e=(r=this.descriptions)==null?void 0:r[1];return e?q`
6667          <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon>
6668          <wui-text variant="small-400" color="fg-200">
6669            <span>${e}</span>
6670          </wui-text>
6671        `:null}};Ui.styles=[ve,w4e];no([D()],Ui.prototype,"type",void 0);no([D({type:Array})],Ui.prototype,"descriptions",void 0);no([D()],Ui.prototype,"date",void 0);no([D({type:Boolean})],Ui.prototype,"onlyDirectionIcon",void 0);no([D()],Ui.prototype,"status",void 0);no([D()],Ui.prototype,"direction",void 0);no([D({type:Array})],Ui.prototype,"images",void 0);no([D({type:Array})],Ui.prototype,"price",void 0);no([D({type:Array})],Ui.prototype,"amount",void 0);no([D({type:Array})],Ui.prototype,"symbol",void 0);Ui=no([ye("wui-transaction-list-item")],Ui);const m4e=ne`
6672  :host > wui-flex:first-child {
6673    column-gap: var(--wui-spacing-s);
6674    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
6675    width: 100%;
6676  }
6677
6678  wui-flex {
6679    display: flex;
6680    flex: 1;
6681  }
6682`;var y4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let P6=class extends oe{render(){return q`
6683      <wui-flex alignItems="center">
6684        <wui-shimmer width="40px" height="40px"></wui-shimmer>
6685        <wui-flex flexDirection="column" gap="2xs">
6686          <wui-shimmer width="72px" height="16px" borderRadius="4xs"></wui-shimmer>
6687          <wui-shimmer width="148px" height="14px" borderRadius="4xs"></wui-shimmer>
6688        </wui-flex>
6689        <wui-shimmer width="24px" height="12px" borderRadius="5xs"></wui-shimmer>
6690      </wui-flex>
6691    `}};P6.styles=[ve,m4e];P6=y4e([ye("wui-transaction-list-item-loader")],P6);const b4e=ne`
6692  :host {
6693    position: relative;
6694  }
6695
6696  button {
6697    display: flex;
6698    justify-content: center;
6699    align-items: center;
6700    height: 48px;
6701    width: 100%;
6702    background-color: var(--wui-color-accent-glass-010);
6703    border-radius: var(--wui-border-radius-xs);
6704    border: 1px solid var(--wui-color-accent-glass-010);
6705    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
6706    will-change: background-color;
6707  }
6708
6709  wui-tooltip {
6710    padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s);
6711    position: absolute;
6712    top: -8px;
6713    left: 50%;
6714    transform: translate(-50%, -100%);
6715    opacity: 0;
6716    display: none;
6717  }
6718
6719  @media (hover: hover) and (pointer: fine) {
6720    button:hover:enabled {
6721      background-color: var(--wui-color-accent-glass-015);
6722    }
6723
6724    button:active:enabled {
6725      background-color: var(--wui-color-accent-glass-020);
6726    }
6727  }
6728`;var R8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
6728a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ip=class extends oe{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return q`<button>
6729      <wui-icon color="accent-100" name=${this.icon} size="lg"></wui-icon>
6730    </button>`}};ip.styles=[ve,We,b4e];R8([D()],ip.prototype,"text",void 0);R8([D()],ip.prototype,"icon",void 0);ip=R8([ye("wui-icon-button")],ip);const v4e=W`<svg width="86" height="96" fill="none">
6731  <path
6732    d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
6733  />
6734</svg>`,EB=W`<svg  viewBox="0 0 48 54" fill="none">
6735  <path
6736    d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
6737  />
6738</svg>`,E4e=W`
6739  <svg fill="none" viewBox="0 0 36 40">
6740    <path
6741      d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z"
6742    />
6743  </svg>
6744`,C4e=ne`
6745  :host {
6746    position: relative;
6747    border-radius: inherit;
6748    display: flex;
6749    justify-content: center;
6750    align-items: center;
6751    width: var(--local-width);
6752    height: var(--local-height);
6753  }
6754
6755  :host([data-round='true']) {
6756    background: var(--wui-color-gray-glass-002);
6757    border-radius: 100%;
6758    outline: 1px solid var(--wui-color-gray-glass-005);
6759  }
6760
6761  svg {
6762    position: absolute;
6763    top: 0;
6764    left: 0;
6765    width: 100%;
6766    height: 100%;
6767    z-index: 1;
6768    fill: var(--wui-color-gray-glass-002);
6769  }
6770
6771  svg > path {
6772    stroke: var(--local-stroke);
6773  }
6774
6775  wui-image {
6776    width: 100%;
6777    height: 100%;
6778    -webkit-clip-path: var(--local-path);
6779    clip-path: var(--local-path);
6780    background: var(--wui-color-gray-glass-002);
6781  }
6782
6783  wui-icon {
6784    transform: translateY(-5%);
6785    width: var(--local-icon-size);
6786    height: var(--local-icon-size);
6787  }
6788`;var ud=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ja=class extends oe{constructor(){super(...arguments),this.size="md",this.name="uknown",this.networkImagesBySize={sm:E4e,md:EB,lg:v4e},this.selected=!1,this.round=!1}render(){return this.round?(this.dataset.round="true",this.style.cssText=`
6789      --local-width: var(--wui-spacing-3xl);
6790      --local-height: var(--wui-spacing-3xl);
6791      --local-icon-size: var(--wui-spacing-l);
6792    `):this.style.cssText=`
6793
6794      --local-path: var(--wui-path-network-${this.size});
6795      --local-width:  var(--wui-width-network-${this.size});
6796      --local-height:  var(--wui-height-network-${this.size});
6797      --local-icon-size:  var(--wui-icon-size-network-${this.size});
6798    `,q`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){return this.round?null:this.networkImagesBySize[this.size]}templateVisual(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:q`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Ja.styles=[ve,C4e];ud([D()],Ja.prototype,"size",void 0);ud([D()],Ja.prototype,"name",void 0);ud([D({type:Object})],Ja.prototype,"networkImagesBySize",void 0);ud([D()],Ja.prototype,"imageSrc",void 0);ud([D({type:Boolean})],Ja.prototype,"selected",void 0);ud([D({type:Boolean})],Ja.prototype,"round",void 0);Ja=ud([ye("wui-network-image")],Ja);const x4e=ne`
6799  :host {
6800    position: relative;
6801    background-color: var(--wui-color-gray-glass-002);
6802    display: flex;
6803    justify-content: center;
6804    align-items: center;
6805    width: var(--local-size);
6806    height: var(--local-size);
6807    border-radius: inherit;
6808    border-radius: var(--local-border-radius);
6809  }
6810
6811  :host > wui-flex {
6812    overflow: hidden;
6813    border-radius: inherit;
6814    border-radius: var(--local-border-radius);
6815  }
6816
6817  :host::after {
6818    content: '';
6819    position: absolute;
6820    top: 0;
6821    bottom: 0;
6822    left: 0;
6823    right: 0;
6824    border-radius: inherit;
6825    border: 1px solid var(--wui-color-gray-glass-010);
6826    pointer-events: none;
6827  }
6828
6829  :host([name='Extension'])::after {
6830    border: 1px solid var(--wui-color-accent-glass-010);
6831  }
6832
6833  :host([data-wallet-icon='allWallets']) {
6834    background-color: var(--wui-all-wallets-bg-100);
6835  }
6836
6837  :host([data-wallet-icon='allWallets'])::after {
6838    border: 1px solid var(--wui-color-accent-glass-010);
6839  }
6840
6841  wui-icon[data-parent-size='inherit'] {
6842    width: 75%;
6843    height: 75%;
6844    align-items: center;
6845  }
6846
6847  wui-icon[data-parent-size='sm'] {
6848    width: 18px;
6849    height: 18px;
6850  }
6851
6852  wui-icon[data-parent-size='md'] {
6853    width: 24px;
6854    height: 24px;
6855  }
6856
6857  wui-icon[data-parent-size='lg'] {
6858    width: 42px;
6859    height: 42px;
6860  }
6861
6862  wui-icon[data-parent-size='full'] {
6863    width: 100%;
6864    height: 100%;
6865  }
6866
6867  :host > wui-icon-box {
6868    position: absolute;
6869    overflow: hidden;
6870    right: -1px;
6871    bottom: -2px;
6872    z-index: 1;
6873    border: 2px solid var(--wui-color-bg-150, #1e1f1f);
6874    padding: 1px;
6875  }
6876`;var dd=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Xa=class extends oe{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=`
6877       --local-border-radius: var(--wui-border-radius-${e});
6878       --local-size: var(--wui-wallet-image-size-${this.size});
6879   `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),q`
6880      <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
6881    `}templateVisual(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?q`<wui-icon
6882        data-parent-size="md"
6883        size="md"
6884        color="inherit"
6885        name=${this.walletIcon}
6886      ></wui-icon>`:q`<wui-icon
6887      data-parent-size=${this.size}
6888      size="inherit"
6889      color="inherit"
6890      name="walletPlaceholder"
6891    ></wui-icon>`}};Xa.styles=[We,ve,x4e];dd([D()],Xa.prototype,"size",void 0);dd([D()],Xa.prototype,"name",void 0);dd([D()],Xa.prototype,"imageSrc",void 0);dd([D()],Xa.prototype,"walletIcon",void 0);dd([D({type:Boolean})],Xa.prototype,"installed",void 0);dd([D()],Xa.prototype,"badgeSize",void 0);Xa=dd([ye("wui-wallet-image")],Xa);const _4e=ne`
6892  :host {
6893    display: block;
6894  }
6895
6896  button {
6897    border-radius: var(--wui-border-radius-3xl);
6898    background: var(--wui-color-gray-glass-002);
6899    display: flex;
6900    gap: var(--wui-spacing-xs);
6901    padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs)
6902      var(--wui-spacing-xs);
6903    border: 1px solid var(--wui-color-gray-glass-005);
6904  }
6905
6906  button:disabled {
6907    background: var(--wui-color-gray-glass-015);
6908  }
6909
6910  button:disabled > wui-text {
6911    color: var(--wui-color-gray-glass-015);
6912  }
6913
6914  button:disabled > wui-flex > wui-text {
6915    color: var(--wui-color-gray-glass-015);
6916  }
6917
6918  button:disabled > wui-image,
6919  button:disabled > wui-flex > wui-avatar {
6920    filter: grayscale(1);
6921  }
6922
6923  button:has(wui-image) {
6924    padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs)
6925      var(--wui-spacing-xs);
6926  }
6927
6928  wui-text {
6929    color: var(--wui-color-fg-100);
6930  }
6931
6932  wui-flex > wui-text {
6933    color: var(--wui-color-fg-200);
6934  }
6935
6936  wui-image,
6937  wui-icon-box {
6938    border-radius: var(--wui-border-radius-3xl);
6939    width: 24px;
6940    height: 24px;
6941    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
6942  }
6943
6944  wui-flex {
6945    border-radius: var(--wui-border-radius-3xl);
6946    border: 1px solid var(--wui-color-gray-glass-005);
6947    background: var(--wui-color-gray-glass-005);
6948    padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs);
6949  }
6950
6951  button.local-no-balance {
6952    border-radius: 0px;
6953    border: none;
6954    background: transparent;
6955  }
6956
6957  wui-avatar {
6958    width: 20px;
6959    height: 20px;
6960    box-shadow: 0 0 0 2px var(--wui-color-accent-glass-010);
6961  }
6962
6963  @media (max-width: 500px) {
6964    button {
6965      gap: 0px;
6966      padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important;
6967      height: 32px;
6968    }
6969    wui-image,
6970    wui-icon-box,
6971    button > wui-text {
6972      visibility: hidden;
6973      width: 0px;
6974      height: 0px;
6975    }
6976    button {
6977      border-radius: 0px;
6978      border: none;
6979      background: transparent;
6980      padding: 0px;
6981    }
6982  }
6983
6984  @media (hover: hover) and (pointer: fine) {
6985    button:hover:enabled > wui-flex > wui-text {
6986      color: var(--wui-color-fg-175);
6987    }
6988
6989    button:active:enabled > wui-flex > wui-text {
6990      color: var(--wui-color-fg-175);
6991    }
6992  }
6993`;var io=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ji=class extends oe{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.loading=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return q`
6994      <button
6995        ?disabled=${this.disabled}
6996        class=${Ft(this.balance?void 0:"local-no-balance")}
6997      >
6998        ${this.balanceTemplate()}
6999        <wui-flex gap="xxs" alignItems="center">
7000          <wui-avatar
7001            .imageSrc=${this.avatarSrc}
7002            alt=${this.address}
7003            address=${this.address}
7004          ></wui-avatar>
7005          <wui-text variant="paragraph-600" color="inherit">
7006            ${this.address?Pt.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"}):null}
7007          </wui-text>
7008        </wui-flex>
7009      </button>
7010    `}balanceTemplate(){if(this.isUnsupportedChain)return q` <wui-icon-box
7011          size="sm"
7012          iconColor="error-100"
7013          backgroundColor="error-100"
7014          icon="warningCircle"
7015          data-testid="wui-account-button-unsupported-chain"
7016        ></wui-icon-box>
7017        <wui-text variant="paragraph-600" color="inherit"> Switch Network</wui-text>`;if(this.balance){const e=this.networkSrc?q`<wui-image src=${this.networkSrc}></wui-image>`:q`
7018            <wui-icon-box
7019              size="sm"
7020              iconColor="fg-200"
7021              backgroundColor="fg-300"
7022              icon="networkPlaceholder"
7023            ></wui-icon-box>
7024          `,r=this.loading?q`<wui-loading-spinner size="md" color="fg-200"></wui-loading-spinner>`:q`<wui-text variant="paragraph-600" color="inherit"> ${this.balance}</wui-text>`;return q`${e} ${r}`}return null}};ji.styles=[ve,We,_4e];io([D()],ji.prototype,"networkSrc",void 0);io([D()],ji.prototype,"avatarSrc",void 0);io([D()],ji.prototype,"balance",void 0);io([D({type:Boolean})],ji.prototype,"isUnsupportedChain",void 0);io([D({type:Boolean})],ji.prototype,"disabled",void 0);io([D({type:Boolean})],ji.prototype,"loading",void 0);io([D()],ji.prototype,"address",void 0);io([D()],ji.prototype,"profileName",void 0);io([D()],ji.prototype,"charsStart",void 0);io([D()],ji.prototype,"charsEnd",void 0);ji=io([ye("wui-account-button")],ji);const S4e=ne`
7025  :host {
7026    position: relative;
7027    display: block;
7028  }
7029
7030  button {
7031    background: var(--wui-color-accent-100);
7032    border: 1px solid var(--wui-color-gray-glass-010);
7033    border-radius: var(--wui-border-radius-m);
7034    gap: var(--wui-spacing-xs);
7035  }
7036
7037  button.loading {
7038    background: var(--wui-color-gray-glass-010);
7039    border: 1px solid var(--wui-color-gray-glass-010);
7040    pointer-events: none;
7041  }
7042
7043  button:disabled {
7044    background-color: var(--wui-color-gray-glass-015);
7045    border: 1px solid var(--wui-color-gray-glass-010);
7046  }
7047
7048  button:disabled > wui-text {
7049    color: var(--wui-color-gray-glass-015);
7050  }
7051
7052  @media (hover: hover) and (pointer: fine) {
7053    button:hover:enabled {
7054      background-color: var(--wui-color-accent-090);
7055    }
7056
7057    button:active:enabled {
7058      background-color: var(--wui-color-accent-080);
7059    }
7060  }
7061
7062  button:focus-visible {
7063    border: 1px solid var(--wui-color-gray-glass-010);
7064    background-color: var(--wui-color-accent-090);
7065    -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
7066    -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
7067    box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
7068  }
7069
7070  button[data-size='sm'] {
7071    padding: 6.75px 10px 7.25px;
7072  }
7073
7074  ::slotted(*) {
7075    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
7076    will-change: opacity;
7077    opacity: var(--local-opacity-100);
7078  }
7079
7080  button > wui-text {
7081    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
7082    will-change: opacity;
7083    opacity: var(--local-opacity-100);
7084    color: var(--wui-color-inverse-100);
7085  }
7086
7087  button[data-size='md'] {
7088    padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l);
7089  }
7090
7091  button[data-size='md'] + wui-text {
7092    padding-left: var(--wui-spacing-3xs);
7093  }
7094
7095  @media (max-width: 500px) {
7096    button[data-size='md'] {
7097      height: 32px;
7098      padding: 5px 12px;
7099    }
7100
7101    button[data-size='md'] > wui-text > slot {
7102      font-size: 14px !important;
7103    }
7104  }
7105
7106  wui-loading-spinner {
7107    width: 14px;
7108    height: 14px;
7109  }
7110
7111  wui-loading-spinner::slotted(svg) {
7112    width: 10px !important;
7113    height: 10px !important;
7114  }
7115
7116  button[data-size='sm'] > wui-loading-spinner {
7117    width: 12px;
7118    height: 12px;
7119  }
7120`;var B8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let sp=class extends oe{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){const e=this.size==="md"?"paragraph-600":"small-600";return q`
7121      <button data-size=${this.size} ?disabled=${this.loading}>
7122        ${this.loadingTemplate()}
7123        <wui-text variant=${e} color=${this.loading?"accent-100":"inherit"}>
7124          <slot></slot>
7125        </wui-text>
7126      </button>
7127    `}loadingTemplate(){return this.loading?q`<wui-loading-spinner size=${this.size} color="accent-100"></wui-loading-spinner>`:null}};sp.styles=[ve,We,S4e];B8([D()],sp.prototype,"size",void 0);B8([D({type:Boolean})],sp.prototype,"loading",void 0);sp=B8([ye("wui-connect-button")],sp);const I4e=ne`
7128  :host {
7129    display: block;
7130  }
7131
7132  button {
7133    border-radius: var(--wui-border-radius-3xl);
7134    display: flex;
7135    gap: var(--wui-spacing-xs);
7136    padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs)
7137      var(--wui-spacing-xs);
7138    border: 1px solid var(--wui-color-gray-glass-010);
7139    background-color: var(--wui-color-gray-glass-005);
7140    color: var(--wui-color-fg-100);
7141  }
7142
7143  button:disabled {
7144    border: 1px solid var(--wui-color-gray-glass-005);
7145    background-color: var(--wui-color-gray-glass-015);
7146    color: var(--wui-color-gray-glass-015);
7147  }
7148
7149  @media (hover: hover) and (pointer: fine) {
7150    button:hover:enabled {
7151      background-color: var(--wui-color-gray-glass-010);
7152    }
7153
7154    button:active:enabled {
7155      background-color: var(--wui-color-gray-glass-015);
7156    }
7157  }
7158
7159  wui-image,
7160  wui-icon-box {
7161    border-radius: var(--wui-border-radius-3xl);
7162    width: 24px;
7163    height: 24px;
7164    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
7165  }
7166`;var km=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let a0=class extends oe{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return q`
7167      <button data-testid="wui-network-button" ?disabled=${this.disabled}>
7168        ${this.visualTemplate()}
7169        <wui-text variant="paragraph-600" color="inherit">
7170          <slot></slot>
7171        </wui-text>
7172      </button>
7173    `}visualTemplate(){return this.isUnsupportedChain?q`
7174        <wui-icon-box
7175          size="sm"
7176          iconColor="error-100"
7177          backgroundColor="error-100"
7178          icon="warningCircle"
7179        ></wui-icon-box>
7180      `:this.imageSrc?q`<wui-image src=${this.imageSrc}></wui-image>`:q`
7181      <wui-icon-box
7182        size="sm"
7183        iconColor="inverse-100"
7184        backgroundColor="fg-100"
7185        icon="networkPlaceholder"
7186      ></wui-icon-box>
7187    `}};a0.styles=[ve,We,I4e];km([D()],a0.prototype,"imageSrc",void 0);km([D({type:Boolean})],a0.prototype,"isUnsupportedChain",void 0);km([D({type:Boolean})],a0.prototype,"disabled",void 0);a0=km([ye("wui-network-button")],a0);const $4e=ne`
7188  :host {
7189    display: block;
7190  }
7191
7192  button {
7193    width: 100%;
7194    display: block;
7195    padding-top: var(--wui-spacing-l);
7196    padding-bottom: var(--wui-spacing-l);
7197    padding-left: var(--wui-spacing-s);
7198    padding-right: var(--wui-spacing-2l);
7199    border-radius: var(--wui-border-radius-s);
7200    background-color: var(--wui-color-accent-glass-010);
7201  }
7202
7203  button:hover {
7204    background-color: var(--wui-color-accent-glass-015) !important;
7205  }
7206
7207  button:active {
7208    background-color: var(--wui-color-accent-glass-020) !important;
7209  }
7210`;var Rm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
7210a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let c0=class extends oe{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return q`
7211      <button>
7212        <wui-flex gap="m" alignItems="center" justifyContent="space-between">
7213          <wui-icon-box
7214            size="lg"
7215            iconcolor="accent-100"
7216            backgroundcolor="accent-100"
7217            icon=${this.icon}
7218            background="transparent"
7219          ></wui-icon-box>
7220
7221          <wui-flex flexDirection="column" gap="3xs">
7222            <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text>
7223            <wui-text variant="small-400" color="fg-200">${this.description}</wui-text>
7224          </wui-flex>
7225
7226          <wui-icon size="md" color="fg-200" name="chevronRight"></wui-icon>
7227        </wui-flex>
7228      </button>
7229    `}};c0.styles=[ve,We,$4e];Rm([D()],c0.prototype,"label",void 0);Rm([D()],c0.prototype,"description",void 0);Rm([D()],c0.prototype,"icon",void 0);c0=Rm([ye("wui-notice-card")],c0);const A4e=ne`
7230  :host {
7231    display: inline-flex;
7232    background-color: var(--wui-color-gray-glass-002);
7233    border-radius: var(--wui-border-radius-3xl);
7234    padding: var(--wui-spacing-3xs);
7235    position: relative;
7236    height: 36px;
7237    min-height: 36px;
7238    overflow: hidden;
7239  }
7240
7241  :host::before {
7242    content: '';
7243    position: absolute;
7244    pointer-events: none;
7245    top: 4px;
7246    left: 4px;
7247    display: block;
7248    width: var(--local-tab-width);
7249    height: 28px;
7250    border-radius: var(--wui-border-radius-3xl);
7251    background-color: var(--wui-color-gray-glass-002);
7252    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
7253    transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
7254    transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
7255    will-change: background-color, opacity;
7256  }
7257
7258  :host([data-type='flex'])::before {
7259    left: 3px;
7260    transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
7261  }
7262
7263  :host([data-type='flex']) {
7264    display: flex;
7265    padding: 0px 0px 0px 12px;
7266    gap: 4px;
7267  }
7268
7269  :host([data-type='flex']) > button > wui-text {
7270    position: absolute;
7271    left: 18px;
7272    opacity: 0;
7273  }
7274
7275  button[data-active='true'] > wui-icon,
7276  button[data-active='true'] > wui-text {
7277    color: var(--wui-color-fg-100);
7278  }
7279
7280  button[data-active='false'] > wui-icon,
7281  button[data-active='false'] > wui-text {
7282    color: var(--wui-color-fg-200);
7283  }
7284
7285  button[data-active='true']:disabled,
7286  button[data-active='false']:disabled {
7287    background-color: transparent;
7288    opacity: 0.5;
7289    cursor: not-allowed;
7290  }
7291
7292  button[data-active='true']:disabled > wui-text {
7293    color: var(--wui-color-fg-200);
7294  }
7295
7296  button[data-active='false']:disabled > wui-text {
7297    color: var(--wui-color-fg-300);
7298  }
7299
7300  button > wui-icon,
7301  button > wui-text {
7302    pointer-events: none;
7303    transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
7304    will-change: color;
7305  }
7306
7307  button {
7308    width: var(--local-tab-width);
7309    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
7310    will-change: background-color;
7311  }
7312
7313  :host([data-type='flex']) > button {
7314    width: 34px;
7315    position: relative;
7316    display: flex;
7317    justify-content: flex-start;
7318  }
7319
7320  button:hover:enabled,
7321  button:active:enabled {
7322    background-color: transparent !important;
7323  }
7324
7325  button:hover:enabled > wui-icon,
7326  button:active:enabled > wui-icon {
7327    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
7328    color: var(--wui-color-fg-125);
7329  }
7330
7331  button:hover:enabled > wui-text,
7332  button:active:enabled > wui-text {
7333    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
7334    color: var(--wui-color-fg-125);
7335  }
7336
7337  button {
7338    border-radius: var(--wui-border-radius-3xl);
7339  }
7340`;var gl=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
7340a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Wo=class extends oe{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`
7341      --local-tab: ${this.activeTab};
7342      --local-tab-width: ${this.localTabWidth};
7343    `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,r)=>{var i;const n=r===this.activeTab;return q`
7344        <button
7345          ?disabled=${this.disabled}
7346          @click=${()=>this.onTabClick(r)}
7347          data-active=${n}
7348          data-testid="tab-${(i=e.label)==null?void 0:i.toLowerCase()}"
7349        >
7350          ${this.iconTemplate(e)}
7351          <wui-text variant="small-600" color="inherit"> ${e.label} </wui-text>
7352        </button>
7353      `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?q`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,r){const n=this.buttons[this.activeTab],i=this.buttons[e],s=n==null?void 0:n.querySelector("wui-text"),o=i==null?void 0:i.querySelector("wui-text"),a=i==null?void 0:i.getBoundingClientRect(),c=o==null?void 0:o.getBoundingClientRect();n&&s&&!r&&e!==this.activeTab&&(s.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&a&&c&&o&&(e!==this.activeTab||r)&&(this.localTabWidth=`${Math.round(a.width+c.width)+6}px`,i.animate([{width:`${a.width+c.width}px`}],{duration:r?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:r?0:125,delay:r?0:200,fill:"forwards",easing:"ease"}))}};Wo.styles=[ve,We,A4e];gl([D({type:Array})],Wo.prototype,"tabs",void 0);gl([D()],Wo.prototype,"onTabChange",void 0);gl([D({type:Array})],Wo.prototype,"buttons",void 0);gl([D({type:Boolean})],Wo.prototype,"disabled",void 0);gl([D()],Wo.prototype,"localTabWidth",void 0);gl([Qu()],Wo.prototype,"activeTab",void 0);gl([Qu()],Wo.prototype,"isDense",void 0);Wo=gl([ye("wui-tabs")],Wo);const P4e=ne`
7354  button {
7355    display: flex;
7356    align-items: center;
7357    padding: var(--wui-spacing-xxs);
7358    border-radius: var(--wui-border-radius-xxs);
7359    column-gap: var(--wui-spacing-xs);
7360  }
7361
7362  wui-image,
7363  .icon-box {
7364    width: var(--wui-spacing-xxl);
7365    height: var(--wui-spacing-xxl);
7366    border-radius: var(--wui-border-radius-3xs);
7367  }
7368
7369  wui-text {
7370    flex: 1;
7371  }
7372
7373  .icon-box {
7374    position: relative;
7375  }
7376
7377  .icon-box[data-active='true'] {
7378    background-color: var(--wui-color-gray-glass-005);
7379  }
7380
7381  .circle {
7382    position: absolute;
7383    left: 16px;
7384    top: 15px;
7385    width: var(--wui-spacing-1xs);
7386    height: var(--wui-spacing-1xs);
7387    background-color: var(--wui-color-success-100);
7388    border: 2px solid var(--wui-color-modal-bg);
7389    border-radius: 50%;
7390  }
7391`;var Xo=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let vs=class extends oe{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return q`
7392      <button>
7393        ${this.leftImageTemplate()} ${this.textTemplate()} ${this.rightImageTemplate()}
7394      </button>
7395    `}leftImageTemplate(){const e=this.icon?q`<wui-icon
7396          size=${this.iconSize}
7397          color="fg-200"
7398          name=${this.icon}
7399          class="icon"
7400        ></wui-icon>`:q`<wui-image src=${this.imageSrc} alt=${this.alt}></wui-image>`;return q`
7401      <wui-flex
7402        alignItems="center"
7403        justifyContent="center"
7404        class="icon-box"
7405        data-active=${!!this.icon}
7406      >
7407        ${e}
7408        <wui-flex class="circle"></wui-flex>
7409      </wui-flex>
7410    `}textTemplate(){return q`
7411      <wui-text variant="paragraph-500" color="fg-100">
7412        ${Pt.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})}
7413      </wui-text>
7414    `}rightImageTemplate(){return q`<wui-icon name="chevronBottom" size="xs" color="fg-200"></wui-icon>`}};vs.styles=[ve,We,P4e];Xo([D()],vs.prototype,"address",void 0);Xo([D()],vs.prototype,"profileName",void 0);Xo([D()],vs.prototype,"alt",void 0);Xo([D()],vs.prototype,"imageSrc",void 0);Xo([D()],vs.prototype,"icon",void 0);Xo([D()],vs.prototype,"iconSize",void 0);Xo([D({type:Boolean})],vs.prototype,"loading",void 0);Xo([D({type:Number})],vs.prototype,"charsStart",void 0);Xo([D({type:Number})],vs.prototype,"charsEnd",void 0);vs=Xo([ye("wui-wallet-switch")],vs);const T4e=ne`
7415  span {
7416    font-weight: 500;
7417    font-size: 40px;
7418    color: var(--wui-color-fg-100);
7419    line-height: 130%; /* 52px */
7420    letter-spacing: -1.6px;
7421    text-align: center;
7422  }
7423
7424  .pennies {
7425    color: var(--wui-color-fg-200);
7426  }
7427`;var D8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
7427a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let op=class extends oe{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return q`<span>$${this.dollars}<span class="pennies">.${this.pennies}</span></span>`}};op.styles=[ve,T4e];D8([D()],op.prototype,"dollars",void 0);D8([D()],op.prototype,"pennies",void 0);op=D8([ye("wui-balance")],op);const O4e=ne`
7428  :host {
7429    display: block;
7430    padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
7431    border-radius: var(--wui-border-radius-xxs);
7432
7433    color: var(--wui-color-bg-100);
7434    position: relative;
7435  }
7436
7437  :host([data-variant='shade']) {
7438    background-color: var(--wui-color-bg-150);
7439    border: 1px solid var(--wui-color-gray-glass-005);
7440  }
7441
7442  :host([data-variant='shade']) > wui-text {
7443    color: var(--wui-color-fg-150);
7444  }
7445
7446  :host([data-variant='fill']) {
7447    background-color: var(--wui-color-fg-100);
7448    border: none;
7449  }
7450
7451  wui-icon {
7452    position: absolute;
7453    width: 12px !important;
7454    height: 4px !important;
7455  }
7456
7457  wui-icon[data-placement='top'] {
7458    bottom: 0px;
7459    left: 50%;
7460    transform: translate(-50%, 95%);
7461  }
7462
7463  wui-icon[data-placement='bottom'] {
7464    top: 0;
7465    left: 50%;
7466    transform: translate(-50%, -95%) rotate(180deg);
7467  }
7468
7469  wui-icon[data-placement='right'] {
7470    top: 50%;
7471    left: 0;
7472    transform: translate(-65%, -50%) rotate(90deg);
7473  }
7474
7475  wui-icon[data-placement='left'] {
7476    top: 50%;
7477    right: 0%;
7478    transform: translate(65%, -50%) rotate(270deg);
7479  }
7480`;var Bm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let l0=class extends oe{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,q`<wui-icon
7481        data-placement=${this.placement}
7482        color="fg-100"
7483        size="inherit"
7484        name=${this.variant==="fill"?"cursor":"cursorTransparent"}
7485      ></wui-icon>
7486      <wui-text color="inherit" variant="small-500">${this.message}</wui-text>`}};l0.styles=[ve,We,O4e];Bm([D()],l0.prototype,"placement",void 0);Bm([D()],l0.prototype,"variant",void 0);Bm([D()],l0.prototype,"message",void 0);l0=Bm([ye("wui-tooltip")],l0);const N4e=ne`
7487  button {
7488    width: 100%;
7489    display: flex;
7490    gap: var(--wui-spacing-s);
7491    align-items: center;
7492    justify-content: flex-start;
7493    padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s);
7494    background-color: var(--wui-color-gray-glass-002);
7495    border-radius: var(--wui-border-radius-xs);
7496  }
7497
7498  wui-icon-box {
7499    width: var(--wui-spacing-2xl);
7500    height: var(--wui-spacing-2xl);
7501  }
7502
7503  wui-flex {
7504    width: auto;
7505  }
7506`;var wl=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ko=class extends oe{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return q`
7507      <button ?disabled=${this.disabled}>
7508        <wui-icon-box
7509          iconColor=${this.iconColor}
7510          backgroundColor=${this.iconBackgroundColor}
7511          size="inherit"
7512          icon=${this.icon}
7513          iconSize="md"
7514        ></wui-icon-box>
7515        <wui-flex flexDirection="column" justifyContent="spaceBetween">
7516          ${this.titleTemplate()}
7517          <wui-text variant="small-400" color="fg-200"> ${this.description}</wui-text></wui-flex
7518        >
7519      </button>
7520    `}titleTemplate(){return this.tag?q` <wui-flex alignItems="center" gap="xxs"
7521        ><wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text
7522        ><wui-tag tagType="main" size="md">${this.tag}</wui-tag>
7523      </wui-flex>`:q`<wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text>`}};Ko.styles=[ve,We,N4e];wl([D()],Ko.prototype,"icon",void 0);wl([D()],Ko.prototype,"text",void 0);wl([D()],Ko.prototype,"description",void 0);wl([D()],Ko.prototype,"tag",void 0);
7523wl([D()],Ko.prototype,"iconBackgroundColor",void 0);wl([D()],Ko.prototype,"iconColor",void 0);wl([D({type:Boolean})],Ko.prototype,"disabled",void 0);Ko=wl([ye("wui-list-description")],Ko);const k4e=ne`
7524  wui-image {
7525    width: var(--wui-spacing-2xl);
7526    height: var(--wui-spacing-2xl);
7527    border-radius: var(--wui-border-radius-3xs);
7528  }
7529
7530  wui-image,
7531  .icon-box {
7532    width: var(--wui-spacing-2xl);
7533    height: var(--wui-spacing-2xl);
7534    border-radius: var(--wui-border-radius-3xs);
7535  }
7536
7537  wui-icon:not(.custom-icon, .icon-badge) {
7538    cursor: pointer;
7539  }
7540
7541  .icon-box {
7542    position: relative;
7543    background-color: var(--wui-color-gray-glass-002);
7544  }
7545
7546  .icon-badge {
7547    position: absolute;
7548    top: 18px;
7549    left: 23px;
7550    z-index: 3;
7551    background-color: var(--wui-color-gray-glass-005);
7552    border: 2px solid var(--wui-color-modal-bg);
7553    border-radius: 50%;
7554    padding: var(--wui-spacing-4xs);
7555  }
7556`;var gi=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let xn=class extends oe{constructor(){super(...arguments),this.address="",this.profileName="",this.content=[],this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadge=void 0,this.iconBadgeSize="md",this.buttonVariant="neutral",this.enableMoreButton=!1,this.charsStart=4,this.charsEnd=6}render(){return q`
7557      <wui-flex flexDirection="column" rowGap="xs">
7558        ${this.topTemplate()} ${this.bottomTemplate()}
7559      </wui-flex>
7560    `}topTemplate(){return q`
7561      <wui-flex alignItems="flex-start" justifyContent="space-between">
7562        ${this.imageOrIconTemplate()}
7563        <wui-icon-link
7564          iconColor="fg-200"
7565          size="sm"
7566          icon="copy"
7567          @click=${this.dispatchCopyEvent}
7568        ></wui-icon-link>
7569        <wui-icon-link
7570          iconColor="fg-200"
7571          size="sm"
7572          icon="externalLink"
7573          @click=${this.dispatchExternalLinkEvent}
7574        ></wui-icon-link>
7575        ${this.enableMoreButton?q`<wui-icon-link
7576              iconColor="fg-200"
7577              size="sm"
7578              icon="threeDots"
7579              @click=${this.dispatchMoreButtonEvent}
7580              data-testid="wui-active-profile-wallet-item-more-button"
7581            ></wui-icon-link>`:null}
7582      </wui-flex>
7583    `}bottomTemplate(){return q` <wui-flex flexDirection="column">${this.contentTemplate()}</wui-flex> `}imageOrIconTemplate(){return this.icon?q`
7584        <wui-flex flexGrow="1" alignItems="center">
7585          <wui-flex alignItems="center" justifyContent="center" class="icon-box">
7586            <wui-icon
7587              size=${this.iconSize}
7588              color="fg-200"
7589              name=${this.icon}
7590              class="custom-icon"
7591            ></wui-icon>
7592
7593            ${this.iconBadge?q`<wui-icon
7594                  color="fg-175"
7595                  size=${this.iconBadgeSize}
7596                  name=${this.iconBadge}
7597                  class="icon-badge"
7598                ></wui-icon>`:null}
7599          </wui-flex>
7600        </wui-flex>
7601      `:q`
7602      <wui-flex flexGrow="1" alignItems="center">
7603        <wui-image objectFit="contain" src=${this.imageSrc} alt=${this.alt}></wui-image>
7604      </wui-flex>
7605    `}contentTemplate(){return this.content.length===0?null:q`
7606      <wui-flex flexDirection="column" rowGap="s">
7607        ${this.content.map(e=>this.labelAndTagTemplate(e))}
7608      </wui-flex>
7609    `}labelAndTagTemplate({address:e,profileName:r,label:n,description:i,enableButton:s,buttonType:o,buttonLabel:a,buttonVariant:c,tagVariant:l,tagLabel:u,alignItems:d="flex-end"}){return q`
7610      <wui-flex justifyContent="space-between" alignItems=${d} columnGap="3xs">
7611        <wui-flex flexDirection="column" rowGap="4xs">
7612          ${n?q`<wui-text variant="micro-600" color="fg-200">${n}</wui-text>`:null}
7613
7614          <wui-flex alignItems="center" columnGap="3xs">
7615            <wui-text variant="small-500" color="fg-100">
7616              ${Pt.getTruncateString({string:r||e,charsStart:r?16:this.charsStart,charsEnd:r?0:this.charsEnd,truncate:r?"end":"middle"})}
7617            </wui-text>
7618
7619            ${l&&u?q`<wui-tag variant=${l} size="xs">${u}</wui-tag>`:null}
7620          </wui-flex>
7621
7622          ${i?q`<wui-text variant="tiny-500" color="fg-200">${i}</wui-text>`:null}
7623        </wui-flex>
7624
7625        ${s?this.buttonTemplate({buttonType:o,buttonLabel:a,buttonVariant:c}):null}
7626      </wui-flex>
7627    `}buttonTemplate({buttonType:e,buttonLabel:r,buttonVariant:n}){return q`
7628      <wui-button
7629        size="xs"
7630        variant=${n}
7631        @click=${e==="disconnect"?this.dispatchDisconnectEvent.bind(this):this.dispatchSwitchEvent.bind(this)}
7632        data-testid=${e==="disconnect"?"wui-active-profile-wallet-item-disconnect-button":"wui-active-profile-wallet-item-switch-button"}
7633      >
7634        ${r}
7635      </wui-button>
7635
7636    `}dispatchDisconnectEvent(){this.dispatchEvent(new CustomEvent("disconnect",{bubbles:!0,composed:!0}))}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("switch",{bubbles:!0,composed:!0}))}dispatchExternalLinkEvent(){this.dispatchEvent(new CustomEvent("externalLink",{bubbles:!0,composed:!0}))}dispatchMoreButtonEvent(){this.dispatchEvent(new CustomEvent("more",{bubbles:!0,composed:!0}))}dispatchCopyEvent(){this.dispatchEvent(new CustomEvent("copy",{bubbles:!0,composed:!0}))}};xn.styles=[ve,We,k4e];gi([D()],xn.prototype,"address",void 0);gi([D()],xn.prototype,"profileName",void 0);gi([D({type:Array})],xn.prototype,"content",void 0);gi([D()],xn.prototype,"alt",void 0);gi([D()],xn.prototype,"imageSrc",void 0);gi([D()],xn.prototype,"icon",void 0);gi([D()],xn.prototype,"iconSize",void 0);gi([D()],xn.prototype,"iconBadge",void 0);gi([D()],xn.prototype,"iconBadgeSize",void 0);gi([D()],xn.prototype,"buttonVariant",void 0);gi([D({type:Boolean})],xn.prototype,"enableMoreButton",void 0);gi([D({type:Number})],xn.prototype,"charsStart",void 0);gi([D({type:Number})],xn.prototype,"charsEnd",void 0);xn=gi([ye("wui-active-profile-wallet-item")],xn);const R4e=ne`
7637  wui-image,
7638  .icon-box {
7639    width: var(--wui-spacing-2xl);
7640    height: var(--wui-spacing-2xl);
7641    border-radius: var(--wui-border-radius-3xs);
7642  }
7643
7644  .right-icon {
7645    cursor: pointer;
7646  }
7647
7648  .icon-box {
7649    position: relative;
7650    background-color: var(--wui-color-gray-glass-002);
7651  }
7652
7653  .icon-badge {
7654    position: absolute;
7655    top: 18px;
7656    left: 23px;
7657    z-index: 3;
7658    background-color: var(--wui-color-gray-glass-005);
7659    border: 2px solid var(--wui-color-modal-bg);
7660    border-radius: 50%;
7661    padding: var(--wui-spacing-4xs);
7662  }
7663`;var In=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Yr=class extends oe{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.buttonLabel="",this.buttonVariant="accent",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadgeSize="md",this.rightIcon="off",this.rightIconSize="md",this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return q`
7664      <wui-flex alignItems="center" columnGap="xs">
7665        ${this.imageOrIconTemplate()} ${this.labelAndDescriptionTemplate()}
7666        ${this.buttonActionTemplate()}
7667      </wui-flex>
7668    `}imageOrIconTemplate(){return this.icon?q`
7669        <wui-flex alignItems="center" justifyContent="center" class="icon-box">
7670          <wui-flex alignItems="center" justifyContent="center" class="icon-box">
7671            <wui-icon
7672              size=${this.iconSize}
7673              color="fg-200"
7674              name=${this.icon}
7675              class="custom-icon"
7676            ></wui-icon>
7677            ${this.iconBadge?q`<wui-icon
7678                  color="fg-175"
7679                  size=${this.iconBadgeSize}
7680                  name=${this.iconBadge}
7681                  class="icon-badge"
7682                ></wui-icon>`:null}
7683          </wui-flex>
7684        </wui-flex>
7685      `:q`<wui-image objectFit="contain" src=${this.imageSrc} alt=${this.alt}></wui-image>`}labelAndDescriptionTemplate(){return q`
7686      <wui-flex
7687        flexDirection="column"
7688        flexGrow="1"
7689        justifyContent="flex-start"
7690        alignItems="flex-start"
7691      >
7692        <wui-text variant="small-500" color="fg-100">
7693          ${Pt.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})}
7694        </wui-text>
7695      </wui-flex>
7696    `}buttonActionTemplate(){return q`
7697      <wui-flex columnGap="3xs" alignItems="center" justifyContent="center">
7698        <wui-button
7699          size="xs"
7700          variant=${this.buttonVariant}
7701          .loading=${this.loading}
7702          @click=${this.handleButtonClick}
7703          data-testid="wui-inactive-profile-wallet-item-button"
7704        >
7705          ${this.buttonLabel}
7706        </wui-button>
7706
7707
7708        <wui-icon-link
7709          iconColor="fg-200"
7710          size=${this.rightIconSize}
7711          icon=${this.rightIcon}
7712          class="right-icon"
7713          @click=${this.handleIconClick}
7714        ></wui-icon-link>
7715      </wui-flex>
7716    `}handleButtonClick(){this.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,composed:!0}))}handleIconClick(){this.dispatchEvent(new CustomEvent("iconClick",{bubbles:!0,composed:!0}))}};Yr.styles=[ve,We,R4e];In([D()],Yr.prototype,"address",void 0);In([D()],Yr.prototype,"profileName",void 0);In([D()],Yr.prototype,"alt",void 0);In([D()],Yr.prototype,"buttonLabel",void 0);In([D()],Yr.prototype,"buttonVariant",void 0);In([D()],Yr.prototype,"imageSrc",void 0);In([D()],Yr.prototype,"icon",void 0);In([D()],Yr.prototype,"iconSize",void 0);In([D()],Yr.prototype,"iconBadge",void 0);In([D()],Yr.prototype,"iconBadgeSize",void 0);In([D()],Yr.prototype,"rightIcon",void 0);In([D()],Yr.prototype,"rightIconSize",void 0);In([D({type:Boolean})],Yr.prototype,"loading",void 0);In([D({type:Number})],Yr.prototype,"charsStart",void 0);In([D({type:Number})],Yr.prototype,"charsEnd",void 0);Yr=In([ye("wui-inactive-profile-wallet-item")],Yr);const B4e=ne`
7717  :host {
7718    display: flex;
7719    align-items: center;
7720    justify-content: center;
7721  }
7722
7723  label {
7724    position: relative;
7725    display: inline-block;
7726    width: 32px;
7727    height: 22px;
7728  }
7729
7730  input {
7731    width: 0;
7732    height: 0;
7733    opacity: 0;
7734  }
7735
7736  span {
7737    position: absolute;
7738    cursor: pointer;
7739    top: 0;
7740    left: 0;
7741    right: 0;
7742    bottom: 0;
7743    background-color: var(--wui-color-blue-100);
7744    border-width: 1px;
7745    border-style: solid;
7746    border-color: var(--wui-color-gray-glass-002);
7747    border-radius: 999px;
7748    transition:
7749      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
7750      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md);
7751    will-change: background-color, border-color;
7752  }
7753
7754  span:before {
7755    position: absolute;
7756    content: '';
7757    height: 16px;
7758    width: 16px;
7759    left: 3px;
7760    top: 2px;
7761    background-color: var(--wui-color-inverse-100);
7762    transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg);
7763    will-change: transform;
7764    border-radius: 50%;
7765  }
7766
7767  input:checked + span {
7768    border-color: var(--wui-color-gray-glass-005);
7769    background-color: var(--wui-color-blue-100);
7770  }
7771
7772  input:not(:checked) + span {
7773    background-color: var(--wui-color-gray-glass-010);
7774  }
7775
7776  input:checked + span:before {
7777    transform: translateX(calc(100% - 7px));
7778  }
7779`;var CB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let yw=class extends oe{constructor(){super(...arguments),this.inputElementRef=hl(),this.checked=void 0}render(){return q`
7780      <label>
7781        <input
7782          ${fl(this.inputElementRef)}
7783          type="checkbox"
7784          ?checked=${Ft(this.checked)}
7785          @change=${this.dispatchChangeEvent.bind(this)}
7786        />
7787        <span></span>
7788      </label>
7789    `}dispatchChangeEvent(){var e;this.dispatchEvent(new CustomEvent("switchChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.checked,bubbles:!0,composed:!0}))}};yw.styles=[ve,We,Zp,B4e];CB([D({type:Boolean})],yw.prototype,"checked",void 0);yw=CB([ye("wui-switch")],yw);const D4e=ne`
7790  :host {
7791    height: 100%;
7792  }
7793
7794  button {
7795    display: flex;
7796    align-items: center;
7797    justify-content: center;
7798    column-gap: var(--wui-spacing-1xs);
7799    padding: var(--wui-spacing-xs) var(--wui-spacing-s);
7800    background-color: var(--wui-color-gray-glass-002);
7801    border-radius: var(--wui-border-radius-xs);
7802    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
7803    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
7804    will-change: background-color;
7805    cursor: pointer;
7806  }
7807
7808  wui-switch {
7809    pointer-events: none;
7810  }
7811`;var xB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
7811a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let bw=class extends oe{constructor(){super(...arguments),this.checked=void 0}render(){return q`
7812      <button>
7813        <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
7814        <wui-switch ?checked=${Ft(this.checked)}></wui-switch>
7815      </button>
7816    `}};bw.styles=[ve,We,D4e];xB([D({type:Boolean})],bw.prototype,"checked",void 0);bw=xB([ye("wui-certified-switch")],bw);const L4e=ne`
7817  button {
7818    background-color: var(--wui-color-fg-300);
7819    border-radius: var(--wui-border-radius-4xs);
7820    width: 16px;
7821    height: 16px;
7822  }
7823
7824  button:disabled {
7825    background-color: var(--wui-color-bg-300);
7826  }
7827
7828  wui-icon {
7829    color: var(--wui-color-bg-200) !important;
7830  }
7831
7832  button:focus-visible {
7833    background-color: var(--wui-color-fg-250);
7834    border: 1px solid var(--wui-color-accent-100);
7835  }
7836
7837  @media (hover: hover) and (pointer: fine) {
7838    button:hover:enabled {
7839      background-color: var(--wui-color-fg-250);
7840    }
7841
7842    button:active:enabled {
7843      background-color: var(--wui-color-fg-225);
7844    }
7845  }
7846`;var _B=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let vw=class extends oe{constructor(){super(...arguments),this.icon="copy"}render(){return q`
7847      <button>
7848        <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
7849      </button>
7850    `}};vw.styles=[ve,We,L4e];_B([D()],vw.prototype,"icon",void 0);vw=_B([ye("wui-input-element")],vw);const M4e=ne`
7851  :host {
7852    position: relative;
7853    display: inline-block;
7854    width: 100%;
7855  }
7856`;var U4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let T6=class extends oe{constructor(){super(...arguments),this.inputComponentRef=hl()}render(){return q`
7857      <wui-input-text
7858        ${fl(this.inputComponentRef)}
7859        placeholder="Search wallet"
7860        icon="search"
7861        type="search"
7862        enterKeyHint="search"
7863        size="sm"
7864      >
7865        <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
7866      </wui-input-text>
7867    `}clearValue(){const e=this.inputComponentRef.value,r=e==null?void 0:e.inputElementRef.value;r&&(r.value="",r.focus(),r.dispatchEvent(new Event("input")))}};T6.styles=[ve,M4e];T6=U4e([ye("wui-search-bar")],T6);const j4e=ne`
7868  :host {
7869    display: flex;
7870    flex-direction: column;
7871    align-items: center;
7872    width: 104px;
7873    row-gap: var(--wui-spacing-xs);
7874    padding: var(--wui-spacing-xs) 10px;
7875    background-color: var(--wui-color-gray-glass-002);
7876    border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
7877    position: relative;
7878  }
7879
7880  wui-shimmer[data-type='network'] {
7881    border: none;
7882    -webkit-clip-path: var(--wui-path-network);
7883    clip-path: var(--wui-path-network);
7884  }
7885
7886  svg {
7887    position: absolute;
7888    width: 48px;
7889    height: 54px;
7890    z-index: 1;
7891  }
7892
7893  svg > path {
7894    stroke: var(--wui-color-gray-glass-010);
7895    stroke-width: 1px;
7896  }
7897
7898  @media (max-width: 350px) {
7899    :host {
7900      width: 100%;
7901    }
7902  }
7903`;var SB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Ew=class extends oe{constructor(){super(...arguments),this.type="wallet"}render(){return q`
7904      ${this.shimmerTemplate()}
7905      <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
7906    `}shimmerTemplate(){return this.type==="network"?q` <wui-shimmer
7907          data-type=${this.type}
7908          width="48px"
7909          height="54px"
7910          borderRadius="xs"
7911        ></wui-shimmer>
7912        ${EB}`:q`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};Ew.styles=[ve,We,j4e];SB([D()],Ew.prototype,"type",void 0);Ew=SB([ye("wui-card-select-loader")],Ew);const z4e=ne`
7913  :host {
7914    display: grid;
7915    width: inherit;
7916    height: inherit;
7917  }
7918`;var Is=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
7918a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let di=class extends oe{render(){return this.style.cssText=`
7919      grid-template-rows: ${this.gridTemplateRows};
7920      grid-template-columns: ${this.gridTemplateColumns};
7921      justify-items: ${this.justifyItems};
7922      align-items: ${this.alignItems};
7923      justify-content: ${this.justifyContent};
7924      align-content: ${this.alignContent};
7925      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
7926      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
7927      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
7928      padding-top: ${this.padding&&Pt.getSpacingStyles(this.padding,0)};
7929      padding-right: ${this.padding&&Pt.getSpacingStyles(this.padding,1)};
7930      padding-bottom: ${this.padding&&Pt.getSpacingStyles(this.padding,2)};
7931      padding-left: ${this.padding&&Pt.getSpacingStyles(this.padding,3)};
7932      margin-top: ${this.margin&&Pt.getSpacingStyles(this.margin,0)};
7933      margin-right: ${this.margin&&Pt.getSpacingStyles(this.margin,1)};
7934      margin-bottom: ${this.margin&&Pt.getSpacingStyles(this.margin,2)};
7935      margin-left: ${this.margin&&Pt.getSpacingStyles(this.margin,3)};
7936    `,q`<slot></slot>`}};di.styles=[ve,z4e];Is([D()],di.prototype,"gridTemplateRows",void 0);Is([D()],di.prototype,"gridTemplateColumns",void 0);Is([D()],di.prototype,"justifyItems",void 0);Is([D()],di.prototype,"alignItems",void 0);Is([D()],di.prototype,"justifyContent",void 0);Is([D()],di.prototype,"alignContent",void 0);Is([D()],di.prototype,"columnGap",void 0);Is([D()],di.prototype,"rowGap",void 0);Is([D()],di.prototype,"gap",void 0);Is([D()],di.prototype,"padding",void 0);Is([D()],di.prototype,"margin",void 0);di=Is([ye("wui-grid")],di);const F4e=ne`
7937  button {
7938    column-gap: var(--wui-spacing-s);
7939    padding: 16.5px var(--wui-spacing-l) 16.5px var(--wui-spacing-xs);
7940    width: 100%;
7941    background-color: var(--wui-color-gray-glass-002);
7942    border-radius: var(--wui-border-radius-xs);
7943    color: var(--wui-color-fg-100);
7944    justify-content: center;
7945    align-items: center;
7946  }
7947
7948  button:disabled {
7949    background-color: var(--wui-color-gray-glass-015);
7950    color: var(--wui-color-gray-glass-015);
7951  }
7952`;var Dm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let u0=class extends oe{constructor(){super(...arguments),this.text="",this.disabled=!1,this.tabIdx=void 0}render(){return q`
7953      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
7954        <wui-text align="center" variant="paragraph-500" color="inherit">${this.text}</wui-text>
7955      </button>
7956    `}};u0.styles=[ve,We,F4e];Dm([D()],u0.prototype,"text",void 0);Dm([D({type:Boolean})],u0.prototype,"disabled",void 0);Dm([D()],u0.prototype,"tabIdx",void 0);u0=Dm([ye("wui-list-button")],u0);const q4e=ne`
7957  :host {
7958    display: block;
7959    width: 100%;
7960  }
7961
7962  button {
7963    width: 100%;
7964    height: 56px;
7965    background: var(--wui-color-gray-glass-002);
7966    border-radius: var(--wui-border-radius-xs);
7967  }
7968`;var Lm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let d0=class extends oe{constructor(){super(...arguments),this.logo="google",this.disabled=!1,this.tabIdx=void 0}render(){return q`
7969      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
7970        <wui-logo logo=${this.logo}></wui-logo>
7971      </button>
7972    `}};d0.styles=[ve,We,q4e];Lm([D()],d0.prototype,"logo",void 0);Lm([D({type:Boolean})],d0.prototype,"disabled",void 0);Lm([D()],d0.prototype,"tabIdx",void 0);d0=Lm([ye("wui-logo-select")],d0);const H4e=ne`
7973  :host {
7974    position: relative;
7975    border-radius: var(--wui-border-radius-xxs);
7976    width: 40px;
7977    height: 40px;
7978    overflow: hidden;
7979    background: var(--wui-color-gray-glass-002);
7980    display: flex;
7981    justify-content: center;
7982    align-items: center;
7983    flex-wrap: wrap;
7984    gap: var(--wui-spacing-4xs);
7985    padding: 3.75px !important;
7986  }
7987
7988  :host::after {
7989    content: '';
7990    position: absolute;
7991    top: 0;
7992    bottom: 0;
7993    left: 0;
7994    right: 0;
7995    border-radius: inherit;
7996    border: 1px solid var(--wui-color-gray-glass-010);
7997    pointer-events: none;
7998  }
7999
8000  :host > wui-wallet-image {
8001    width: 14px;
8002    height: 14px;
8003    border-radius: var(--wui-border-radius-5xs);
8004  }
8005
8006  :host > wui-flex {
8007    padding: 2px;
8008    position: fixed;
8009    overflow: hidden;
8010    left: 34px;
8011    bottom: 8px;
8012    background: var(--dark-background-150, #1e1f1f);
8013    border-radius: 50%;
8014    z-index: 2;
8015    display: flex;
8016  }
8017`;var IB=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};const eb=4;let Cw=class extends oe{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<eb;return q`${this.walletImages.slice(0,eb).map(({src:r,walletName:n})=>q`
8018            <wui-wallet-image
8019              size="inherit"
8020              imageSrc=${r}
8021              name=${Ft(n)}
8022            ></wui-wallet-image>
8023          `)}
8024      ${e?[...Array(eb-this.walletImages.length)].map(()=>q` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null}
8025      <wui-flex>
8026        <wui-icon-box
8027          size="xxs"
8028          iconSize="xxs"
8029          iconcolor="success-100"
8030          backgroundcolor="success-100"
8031          icon="checkmark"
8032          background="opaque"
8033        ></wui-icon-box>
8034      </wui-flex>`}};Cw.styles=[ve,H4e];IB([D({type:Array})],Cw.prototype,"walletImages",void 0);Cw=IB([ye("wui-all-wallets-image")],Cw);const V4e=ne`
8035  button {
8036    column-gap: var(--wui-spacing-s);
8037    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
8038    width: 100%;
8039    background-color: var(--wui-color-gray-glass-002);
8040    border-radius: var(--wui-border-radius-xs);
8041    color: var(--wui-color-fg-100);
8042  }
8043
8044  button > wui-text:nth-child(2) {
8045    display: flex;
8046    flex: 1;
8047  }
8048
8049  button:disabled {
8050    background-color: var(--wui-color-gray-glass-015);
8051    color: var(--wui-color-gray-glass-015);
8052  }
8053
8054  button:disabled > wui-tag {
8055    background-color: var(--wui-color-gray-glass-010);
8056    color: var(--wui-color-fg-300);
8057  }
8058
8059  wui-icon {
8060    color: var(--wui-color-fg-200) !important;
8061  }
8062`;var wi=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let _n=class extends oe{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return q`
8063      <button ?disabled=${this.disabled} tabindex=${Ft(this.tabIdx)}>
8064        ${this.templateAllWallets()} ${this.templateWalletImage()}
8065        <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
8066        ${this.templateStatus()}
8067      </button>
8068    `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?q` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?q` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?q`<wui-wallet-image
8069        size="sm"
8070        imageSrc=${this.imageSrc}
8071        name=${this.name}
8072        .installed=${this.installed}
8073      ></wui-wallet-image>`:!this.showAllWallets&&!this.imageSrc?q`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`:null}templateStatus(){return this.loading?q`<wui-loading-spinner
8074        size="lg"
8075        color=${this.loadingSpinnerColor}
8076      ></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?q`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?q`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};_n.styles=[ve,We,V4e];wi([D({type:Array})],_n.prototype,"walletImages",void 0);wi([D()],_n.prototype,"imageSrc",void 0);wi([D()],_n.prototype,"name",void 0);wi([D()],_n.prototype,"tagLabel",void 0);wi([D()],_n.prototype,"tagVariant",void 0);wi([D()],_n.prototype,"icon",void 0);wi([D()],_n.prototype,"walletIcon",void 0);wi([D()],_n.prototype,"tabIdx",void 0);wi([D({type:Boolean})],_n.prototype,"installed",void 0);wi([D({type:Boolean})],_n.prototype,"disabled",void 0);wi([D({type:Boolean})],_n.prototype,"showAllWallets",void 0);wi([D({type:Boolean})],_n.prototype,"loading",void 0);wi([D({type:String})],_n.prototype,"loadingSpinnerColor",void 0);
8076_n=wi([ye("wui-list-wallet")],_n);const W4e=ne`
8077  wui-flex {
8078    width: 100%;
8079    background-color: var(--wui-color-gray-glass-002);
8080    border-radius: var(--wui-border-radius-xs);
8081  }
8082`;var Mm=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let h0=class extends oe{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return q`
8083      <wui-flex
8084        justifyContent="space-between"
8085        alignItems="center"
8086        .padding=${["1xs","2l","1xs","2l"]}
8087      >
8088        <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
8089        <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight">
8090        </wui-chip-button>
8091      </wui-flex>
8092    `}};h0.styles=[ve,We,W4e];Mm([D({type:Boolean})],h0.prototype,"disabled",void 0);Mm([D()],h0.prototype,"label",void 0);Mm([D()],h0.prototype,"buttonLabel",void 0);h0=Mm([ye("wui-cta-button")],h0);const K4e=ne`
8093  :host {
8094    display: block;
8095    width: var(--wui-box-size-lg);
8096    height: var(--wui-box-size-lg);
8097  }
8098
8099  svg {
8100    width: var(--wui-box-size-lg);
8101    height: var(--wui-box-size-lg);
8102    fill: none;
8103    stroke: transparent;
8104    stroke-linecap: round;
8105  }
8106
8107  use {
8108    stroke: var(--wui-color-accent-100);
8109    stroke-width: 2px;
8110    stroke-dasharray: 54, 118;
8111    stroke-dashoffset: 172;
8112    animation: dash 1s linear infinite;
8113  }
8114
8115  @keyframes dash {
8116    to {
8117      stroke-dashoffset: 0px;
8118    }
8119  }
8120`;var Z4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let O6=class extends oe{render(){return q`
8121      <svg viewBox="0 0 54 59">
8122        <path
8123          id="wui-loader-path"
8124          d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"
8125        />
8126        <use xlink:href="#wui-loader-path"></use>
8127      </svg>
8128    `}};O6.styles=[ve,K4e];O6=Z4e([ye("wui-loading-hexagon")],O6);const G4e=ne`
8129  button {
8130    column-gap: var(--wui-spacing-s);
8131    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
8132    width: 100%;
8133    transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
8134    border-radius: var(--wui-border-radius-xs);
8135    color: var(--wui-color-fg-100);
8136  }
8137
8138  button > wui-text:nth-child(2) {
8139    display: flex;
8140    flex: 1;
8141  }
8142
8143  button[data-transparent='true'] {
8144    pointer-events: none;
8145    background-color: transparent;
8146  }
8147
8148  button:hover {
8149    background-color: var(--wui-color-gray-glass-002);
8150  }
8151
8152  button:active {
8153    background-color: var(--wui-color-gray-glass-005);
8154  }
8155
8156  wui-image {
8157    width: var(--wui-spacing-3xl);
8158    height: var(--wui-spacing-3xl);
8159    border-radius: 100%;
8160  }
8161
8162  button:disabled {
8163    background-color: var(--wui-color-gray-glass-002);
8164    opacity: 0.5;
8165    cursor: not-allowed;
8166  }
8167
8168  button:disabled > wui-tag {
8169    background-color: var(--wui-color-gray-glass-010);
8170    color: var(--wui-color-fg-300);
8171  }
8172`;var U0=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
8172a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let il=class extends oe{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.selected=!1,this.transparent=!1}render(){return q`
8173      <button data-transparent=${this.transparent} ?disabled=${this.disabled}>
8174        <wui-flex gap="s" alignItems="center">
8175          ${this.templateNetworkImage()}
8176          <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text></wui-flex
8177        >
8178        ${this.checkmarkTemplate()}
8179      </button>
8180    `}checkmarkTemplate(){return this.selected?q`<wui-icon size="sm" color="accent-100" name="checkmarkBold"></wui-icon>`:null}templateNetworkImage(){return this.imageSrc?q`<wui-image size="sm" src=${this.imageSrc} name=${this.name}></wui-image>`:this.imageSrc?null:q`<wui-network-image
8181        ?round=${!0}
8182        size="md"
8183        name=${this.name}
8184      ></wui-network-image>`}};il.styles=[ve,We,G4e];U0([D()],il.prototype,"imageSrc",void 0);U0([D()],il.prototype,"name",void 0);U0([D({type:Boolean})],il.prototype,"disabled",void 0);U0([D({type:Boolean})],il.prototype,"selected",void 0);U0([D({type:Boolean})],il.prototype,"transparent",void 0);il=U0([ye("wui-list-network")],il);const Y4e=ne`
8185  wui-flex {
8186    width: 100%;
8187    background-color: var(--wui-color-gray-glass-005);
8188    border-radius: var(--wui-border-radius-s);
8189    padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs)
8190      var(--wui-spacing-1xs);
8191  }
8192`;var L8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let ap=class extends oe{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return q`
8193      <wui-flex gap="1xs" alignItems="center">
8194        <wui-icon-box
8195          size="sm"
8196          iconcolor="fg-200"
8197          backgroundcolor="fg-200"
8198          icon=${this.icon}
8199          background="transparent"
8200        ></wui-icon-box>
8201        <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
8202      </wui-flex>
8203    `}};ap.styles=[ve,We,Y4e];L8([D()],ap.prototype,"icon",void 0);L8([D()],ap.prototype,"text",void 0);ap=L8([ye("wui-banner")],ap);const J4e=ne`
8204  :host {
8205    display: flex;
8206    justify-content: center;
8207    align-items: center;
8208    width: var(--wui-icon-box-size-xl);
8209    height: var(--wui-icon-box-size-xl);
8210    box-shadow: 0 0 0 8px var(--wui-thumbnail-border);
8211    border-radius: var(--local-border-radius);
8212    overflow: hidden;
8213  }
8214
8215  wui-icon {
8216    width: 32px;
8217    height: 32px;
8218  }
8219`;var Um=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let f0=class extends oe{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"}; background-color: var(--wui-color-modal-bg);`,q`${this.templateVisual()}`}templateVisual(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt=${this.alt??""}></wui-image>`:q`<wui-icon
8220      data-parent-size="md"
8221      size="inherit"
8222      color="inherit"
8223      name="walletPlaceholder"
8224    ></wui-icon>`}};f0.styles=[ve,J4e];Um([D()],f0.prototype,"imageSrc",void 0);Um([D()],f0.prototype,"alt",void 0);Um([D({type:Boolean})],f0.prototype,"borderRadiusFull",void 0);f0=Um([ye("wui-visual-thumbnail")],f0);const X4e=ne`
8225  :host {
8226    display: block;
8227    border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
8228    box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
8229    background-color: var(--wui-color-modal-bg);
8230    overflow: hidden;
8231  }
8232
8233  :host([data-embedded='true']) {
8234    box-shadow:
8235      0 0 0 1px var(--wui-color-gray-glass-005),
8236      0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
8237  }
8238`;var Q4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
8238a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let N6=class extends oe{render(){return q`<slot></slot>`}};N6.styles=[ve,X4e];N6=Q4e([ye("wui-card")],N6);const e6e=ne`
8239  :host {
8240    display: flex;
8241    align-items: center;
8242    justify-content: center;
8243    padding: var(--wui-spacing-s);
8244    border-radius: var(--wui-border-radius-s);
8245    border: 1px solid var(--wui-color-dark-glass-100);
8246    box-sizing: border-box;
8247    background-color: var(--wui-color-bg-325);
8248    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
8249  }
8250
8251  wui-flex {
8252    width: 100%;
8253  }
8254
8255  wui-text {
8256    word-break: break-word;
8257    flex: 1;
8258  }
8259
8260  .close {
8261    cursor: pointer;
8262  }
8263
8264  .icon-box {
8265    height: 40px;
8266    width: 40px;
8267    border-radius: var(--wui-border-radius-3xs);
8268    background-color: var(--local-icon-bg-value);
8269  }
8270`;var lg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Uu=class extends oe{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=`
8271      --local-icon-bg-value: var(--wui-color-${this.backgroundColor});
8272   `,q`
8273      <wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
8274        <wui-flex columnGap="xs" flexDirection="row" alignItems="center">
8275          <wui-flex
8276            flexDirection="row"
8277            alignItems="center"
8278            justifyContent="center"
8279            class="icon-box"
8280          >
8281            <wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon>
8282          </wui-flex>
8283          <wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text"
8284            >${this.message}</wui-text
8285          >
8286        </wui-flex>
8287        <wui-icon
8288          class="close"
8289          color="bg-350"
8290          size="sm"
8291          name="close"
8292          @click=${this.onClose}
8293        ></wui-icon>
8294      </wui-flex>
8295    `}onClose(){E8.close()}};Uu.styles=[ve,e6e];lg([D()],Uu.prototype,"message",void 0);lg([D()],Uu.prototype,"backgroundColor",void 0);lg([D()],Uu.prototype,"iconColor",void 0);lg([D()],Uu.prototype,"icon",void 0);Uu=lg([ye("wui-alertbar")],Uu);const t6e=ne`
8296  button {
8297    display: block;
8298    display: flex;
8299    align-items: center;
8300    padding: var(--wui-spacing-xxs);
8301    gap: var(--wui-spacing-xxs);
8302    transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
8303    border-radius: var(--wui-border-radius-xxs);
8304  }
8305
8306  wui-image {
8307    border-radius: 100%;
8308    width: var(--wui-spacing-xl);
8309    height: var(--wui-spacing-xl);
8310  }
8311
8312  wui-icon-box {
8313    width: var(--wui-spacing-xl);
8314    height: var(--wui-spacing-xl);
8315  }
8316
8317  button:hover {
8318    background-color: var(--wui-color-gray-glass-002);
8319  }
8320
8321  button:active {
8322    background-color: var(--wui-color-gray-glass-005);
8323  }
8324`;var $B=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let xw=class extends oe{constructor(){super(...arguments),this.imageSrc=""}render(){return q`<button>
8325      ${this.imageTemplate()}
8326      <wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
8327    </button>`}imageTemplate(){return this.imageSrc?q`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:q`<wui-icon-box
8328      size="xxs"
8329      iconColor="fg-200"
8330      backgroundColor="fg-100"
8331      background="opaque"
8332      icon="networkPlaceholder"
8333    ></wui-icon-box>`}};xw.styles=[ve,We,Zp,t6e];$B([D()],xw.prototype,"imageSrc",void 0);xw=$B([ye("wui-select")],xw);const r6e=ne`
8334  :host {
8335    display: flex;
8336    column-gap: var(--wui-spacing-s);
8337    align-items: center;
8338    padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
8339    border-radius: var(--wui-border-radius-s);
8340    border: 1px solid var(--wui-color-gray-glass-005);
8341    box-sizing: border-box;
8342    background-color: var(--wui-color-bg-175);
8343    box-shadow:
8344      0px 14px 64px -4px rgba(0, 0, 0, 0.15),
8345      0px 8px 22px -6px rgba(0, 0, 0, 0.15);
8346
8347    max-width: 300px;
8348  }
8349
8350  :host wui-loading-spinner {
8351    margin-left: var(--wui-spacing-3xs);
8352  }
8353`;var hd=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
8353a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};let Qa=class extends oe{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1,this.iconType="default"}render(){return q`
8354      ${this.templateIcon()}
8355      <wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
8356        >${this.message}</wui-text
8357      >
8358    `}templateIcon(){return this.loading?q`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:this.iconType==="default"?q`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:q`<wui-icon-box
8359      size="sm"
8360      iconSize="xs"
8361      iconColor=${this.iconColor}
8362      backgroundColor=${this.backgroundColor}
8363      icon=${this.icon}
8364      background="opaque"
8365    ></wui-icon-box>`}};Qa.styles=[ve,r6e];hd([D()],Qa.prototype,"backgroundColor",void 0);hd([D()],Qa.prototype,"iconColor",void 0);hd([D()],Qa.prototype,"icon",void 0);hd([D()],Qa.prototype,"message",void 0);hd([D()],Qa.prototype,"loading",void 0);hd([D()],Qa.prototype,"iconType",void 0);Qa=hd([ye("wui-snackbar")],Qa);const n6e=W`<svg
8366  width="14"
8367  height="14"
8368  viewBox="0 0 14 14"
8369  fill="none"
8370  xmlns="http://www.w3.org/2000/svg"
8371>
8372  <path
8373    fill="currentColor"
8374    fill-rule="evenodd"
8375    clip-rule="evenodd"
8376    d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
8377    fill="#667dff"
8378  /></svg
8379>`,i6e=Object.freeze(Object.defineProperty({__proto__:null,addSvg:n6e},Symbol.toStringTag,{value:"Module"})),s6e=W`<svg fill="none" viewBox="0 0 24 24">
8380  <path
8381    style="fill: var(--wui-color-accent-100);"
8382    d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
8383  />
8384</svg>`,o6e=Object.freeze(Object.defineProperty({__proto__:null,allWalletsSvg:s6e},Symbol.toStringTag,{value:"Module"})),a6e=W`<svg
8385  fill="none"
8386  viewBox="0 0 21 20"
8387>
8388  <path
8389    fill="currentColor"
8390    fill-rule="evenodd"
8391    d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
8392    clip-rule="evenodd"
8393  /></svg
8394>`,c6e=Object.freeze(Object.defineProperty({__proto__:null,arrowBottomCircleSvg:a6e},Symbol.toStringTag,{value:"Module"})),l6e=W`
8395<svg width="36" height="36">
8396  <path
8397    d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
8398    fill="url(#a)"
8399  />
8400  <path
8401    d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 
84011.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z"
8402    fill="#fff"
8403  />
8404  <defs>
8405    <linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse">
8406      <stop stop-color="#18BFFB" />
8407      <stop offset="1" stop-color="#2072F3" />
8408    </linearGradient>
8409  </defs>
8410</svg>`,u6e=Object.freeze(Object.defineProperty({__proto__:null,appStoreSvg:l6e},Symbol.toStringTag,{value:"Module"})),d6e=W`<svg fill="none" viewBox="0 0 40 40">
8411  <g clip-path="url(#a)">
8412    <g clip-path="url(#b)">
8413      <circle cx="20" cy="19.89" r="20" fill="#000" />
8414      <g clip-path="url(#c)">
8415        <path
8416          fill="#fff"
8417          d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z"
8418        />
8419      </g>
8420    </g>
8421  </g>
8422  <defs>
8423    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
8424    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
8425    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
8426  </defs>
8427</svg>`,h6e=Object.freeze(Object.defineProperty({__proto__:null,appleSvg:d6e},Symbol.toStringTag,{value:"Module"})),f6e=W`<svg fill="none" viewBox="0 0 14 15">
8428  <path
8429    fill="currentColor"
8430    fill-rule="evenodd"
8431    d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
8432    clip-rule="evenodd"
8433  />
8434</svg>`,p6e=Object.freeze(Object.defineProperty({__proto__:null,arrowBottomSvg:f6e},Symbol.toStringTag,{value:"Module"})),g6e=W`<svg fill="none" viewBox="0 0 14 15">
8435  <path
8436    fill="currentColor"
8437    fill-rule="evenodd"
8438    d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
8439    clip-rule="evenodd"
8440  />
8441</svg>`,w6e=Object.freeze(Object.defineProperty({__proto__:null,arrowLeftSvg:g6e},Symbol.toStringTag,{value:"Module"})),m6e=W`<svg fill="none" viewBox="0 0 14 15">
8442  <path
8443    fill="currentColor"
8444    fill-rule="evenodd"
8445    d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
8446    clip-rule="evenodd"
8447  />
8448</svg>`,y6e=Object.freeze(Object.defineProperty({__proto__:null,arrowRightSvg:m6e},Symbol.toStringTag,{value:"Module"})),b6e=W`<svg fill="none" viewBox="0 0 14 15">
8449  <path
8450    fill="currentColor"
8451    fill-rule="evenodd"
8452    d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
8453    clip-rule="evenodd"
8454  />
8455</svg>`,v6e=Object.freeze(Object.defineProperty({__proto__:null,arrowTopSvg:b6e},Symbol.toStringTag,{value:"Module"})),E6e=W`<svg
8456  xmlns="http://www.w3.org/2000/svg"
8457  width="12"
8458  height="13"
8459  viewBox="0 0 12 13"
8460  fill="none"
8461>
8462  <path
8463    fill-rule="evenodd"
8464    clip-rule="evenodd"
8465    d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z"
8466    fill="currentColor"
8467  /></svg
8468>`,C6e=Object.freeze(Object.defineProperty({__proto__:null,bankSvg:E6e},Symbol.toStringTag,{value:"Module"})),x6e=W`<svg fill="none" viewBox="0 0 20 20">
8469  <path
8470    fill="currentColor"
8471    fill-rule="evenodd"
8472    d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z"
8473    clip-rule="evenodd"
8474  />
8475  <path
8476    fill="currentColor"
8477    fill-rule="evenodd"
8478    d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
8479    clip-rule="evenodd"
8480  />
8481</svg>`,_6e=Object.freeze(Object.defineProperty({__proto__:null,browserSvg:x6e},Symbol.toStringTag,{value:"Module"})),S6e=W`<svg
8482  xmlns="http://www.w3.org/2000/svg"
8483  width="12"
8484  height="13"
8485  viewBox="0 0 12 13"
8486  fill="none"
8487>
8488  <path
8489    fill-rule="evenodd"
8490    clip-rule="evenodd"
8491    d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.8
84910916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z"
8492    fill="currentColor"
8493  /></svg
8494>`,I6e=Object.freeze(Object.defineProperty({__proto__:null,cardSvg:S6e},Symbol.toStringTag,{value:"Module"})),$6e=W`<svg
8495  width="28"
8496  height="28"
8497  viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
8498  <path
8499    fill-rule="evenodd"
8500    clip-rule="evenodd"
8501    d="M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z"
8502    fill="currentColor"/>
8503</svg>
8504`,A6e=Object.freeze(Object.defineProperty({__proto__:null,checkmarkSvg:$6e},Symbol.toStringTag,{value:"Module"})),P6e=W`<svg fill="none" viewBox="0 0 14 14">
8505  <path
8506    fill="currentColor"
8507    fill-rule="evenodd"
8508    d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z"
8509    clip-rule="evenodd"
8510  />
8511</svg>`,T6e=Object.freeze(Object.defineProperty({__proto__:null,checkmarkBoldSvg:P6e},Symbol.toStringTag,{value:"Module"})),O6e=W`<svg fill="none" viewBox="0 0 16 16">
8512  <path
8513    fill="currentColor"
8514    fill-rule="evenodd"
8515    d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z"
8516    clip-rule="evenodd"
8517  />
8518</svg>`,N6e=Object.freeze(Object.defineProperty({__proto__:null,chevronBottomSvg:O6e},Symbol.toStringTag,{value:"Module"})),k6e=W`<svg fill="none" viewBox="0 0 16 16">
8519  <path
8520    fill="currentColor"
8521    fill-rule="evenodd"
8522    d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z"
8523    clip-rule="evenodd"
8524  />
8525</svg>`,R6e=Object.freeze(Object.defineProperty({__proto__:null,chevronLeftSvg:k6e},Symbol.toStringTag,{value:"Module"})),B6e=W`<svg fill="none" viewBox="0 0 16 16">
8526  <path
8527    fill="currentColor"
8528    fill-rule="evenodd"
8529    d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z"
8530    clip-rule="evenodd"
8531  />
8532</svg>`,D6e=Object.freeze(Object.defineProperty({__proto__:null,chevronRightSvg:B6e},Symbol.toStringTag,{value:"Module"})),L6e=W`<svg fill="none" viewBox="0 0 16 16">
8533  <path
8534    fill="currentColor"
8535    fill-rule="evenodd"
8536    d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z"
8537    clip-rule="evenodd"
8538  />
8539</svg>`,M6e=Object.freeze(Object.defineProperty({__proto__:null,chevronTopSvg:L6e},Symbol.toStringTag,{value:"Module"})),U6e=W`<svg width="36" height="36" fill="none">
8540  <path
8541    fill="#fff"
8542    fill-opacity=".05"
8543    d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z"
8544  />
8545  <path
8546    stroke="#fff"
8547    stroke-opacity=".05"
8548    d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z"
8549  />
8550  <path
8551    fill="url(#a)"
8552    d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z"
8553  />
8554  <path
8555    fill="url(#b)"
8556    d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z"
8557  />
8558  <path
8559    fill="url(#c)"
8560    d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z"
8561  />
8562  <path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" />
8563  <path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" />
8564  <defs>
8565    <linearGradient
8566      id="a"
8567      x1="6.294"
8568      x2="41.1"
8569      y1="5.995"
8570      y2="5.995"
8571      gradientUnits="userSpaceOnUse"
8572    >
8573      <stop stop-color="#D93025" />
8574      <stop offset="1" stop-color="#EA4335" />
8575    </linearGradient>
8576    <linearGradient
8577      id="b"
8578      x1="20.953"
8579      x2="37.194"
8580      y1="32.143"
8581      y2="2.701"
8582      gradientUnits="userSpaceOnUse"
8583    >
8584      <stop stop-color="#FCC934" />
8585      <stop offset="1" stop-color="#FBBC04" />
8586    </linearGradient>
8587    <linearGradient
8588      id="c"
8589      x1="25.873"
8590      x2="9.632"
8591      y1="31.2"
8592      y2="1.759"
8593      gradientUnits="userSpaceOnUse"
8594    >
8595      <stop stop-color="#1E8E3E" />
8596      <stop offset="1" stop-color="#34A853" />
8597    </linearGradient>
8598  </defs>
8599</svg>`,j6e=Object.freeze(Object.defineProperty({__proto__:null,chromeStoreSvg:U6e},Symbol.toStringTag,{value:"Module"})),z6e=W`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
8600  <path 
8601    fill-rule="evenodd" 
8602    clip-rule="evenodd" 
8603    d="M7.00235 2C4.24 2 2.00067 4.23858 2.00067 7C2.00067 9.76142 4.24 12 7.00235 12C9.7647 12 12.004 9.76142 12.004 7C12.004 4.23858 9.7647 2 7.00235 2ZM0 7C0 3.13401 3.13506 0 7.00235 0C10.8696 0 14.0047 3.13401 14.0047 7C14.0047 10.866 10.8696 14 7.00235 14C3.13506 14 0 10.866 0 7ZM7.00235 3C7.55482 3 8.00269 3.44771 8.00269 4V6.58579L9.85327 8.43575C10.2439 8.82627 10.2439 9.45944 9.85327 9.84996C9.46262 10.2405 8.82924 10.2405 8.43858 9.84996L6.29501 7.70711C6.10741 7.51957 6.00201 7.26522 6.00201 7V4C6.00201 3.44771 6.44988 3 7.00235 3Z" 
8604    fill="currentColor"
8605  />
8606</svg>`,F6e=Object.freeze(Object.defineProperty({__proto__:null,clockSvg:z6e},Symbol.toStringTag,{value:"Module"})),q6e=W`<svg fill="none" viewBox="0 0 16 16">
8607  <path
8608    fill="currentColor"
8609    fill-rule="evenodd"
8610    d="M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z"
8611    clip-rule="evenodd"
8612  />
8613</svg>`,H6e=Object.freeze(Object.defineProperty({__proto__:null,closeSvg:q6e},Symbol.toStringTag,{value:"Module"})),V6e=W`<svg fill="none" viewBox="0 0 16 16">
8614  <path
8615    fill="currentColor"
8616    fill-rule="evenodd"
8617    d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z"
8618    clip-rule="evenodd"
8619  />
8620</svg>`,W6e=Object.freeze(Object.defineProperty({__proto__:null,compassSvg:V6e},Symbol.toStringTag,{value:"Module"})),K6e=W`<svg fill="none" viewBox="0 0 20 20">
8621  <path
8622    fill="currentColor"
8623    fill-rule="evenodd"
8624    d="M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z"
8625    clip-rule="evenodd"
8626  />
8627</svg>`,Z6e=Object.freeze(Object.defineProperty({__proto__:null,coinPlaceholderSvg:K6e},Symbol.toStringTag,{value:"Module"})),G6e=W`<svg
8628  xmlns="http://www.w3.org/2000/svg"
8629  width="16"
8630  height="16"
8631  viewBox="0 0 16 16"
8632  fill="none"
8633>
8634  <path
8635    fill="currentColor"
8636    fill-rule="evenodd"
8637    clip-rule="evenodd"
8638    d="M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.2856
86385ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z"
8639    fill="#788181"
8640  /></svg
8641>`,Y6e=Object.freeze(Object.defineProperty({__proto__:null,copySvg:G6e},Symbol.toStringTag,{value:"Module"})),J6e=W` <svg fill="none" viewBox="0 0 13 4">
8642  <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
8643</svg>`,X6e=Object.freeze(Object.defineProperty({__proto__:null,cursorSvg:J6e},Symbol.toStringTag,{value:"Module"})),Q6e=W`<svg fill="none" viewBox="0 0 14 6">
8644  <path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
8645  <path
8646    style="stroke: var(--wui-color-inverse-100);"
8647    stroke-opacity=".05"
8648    d="M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z"
8649  />
8650  <path
8651    style="fill: var(--wui-color-bg-150);"
8652    d="M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z"
8653  />
8654</svg> `,eve=Object.freeze(Object.defineProperty({__proto__:null,cursorTransparentSvg:Q6e},Symbol.toStringTag,{value:"Module"})),tve=W`<svg fill="none" viewBox="0 0 20 20">
8655  <path
8656    fill="currentColor"
8657    fill-rule="evenodd"
8658    d="M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z"
8659    clip-rule="evenodd"
8660  />
8661  <path fill="currentColor" d="M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z" />
8662</svg>`,rve=Object.freeze(Object.defineProperty({__proto__:null,desktopSvg:tve},Symbol.toStringTag,{value:"Module"})),nve=W`<svg fill="none" viewBox="0 0 16 16">
8663  <path
8664    fill="currentColor"
8665    fill-rule="evenodd"
8666    d="M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.5
86667c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z"
8667    clip-rule="evenodd"
8668  />
8669</svg>`,ive=Object.freeze(Object.defineProperty({__proto__:null,disconnectSvg:nve},Symbol.toStringTag,{value:"Module"})),sve=W`<svg fill="none" viewBox="0 0 40 40">
8670  <g clip-path="url(#a)">
8671    <g clip-path="url(#b)">
8672      <circle cx="20" cy="19.89" r="20" fill="#5865F2" />
8673      <path
8674        fill="#fff"
8675        fill-rule="evenodd"
8676        d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
8677        clip-rule="evenodd"
8678      />
8679    </g>
8680  </g>
8681  <defs>
8682    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
8683    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
8684  </defs>
8685</svg>`,ove=Object.freeze(Object.defineProperty({__proto__:null,discordSvg:sve},Symbol.toStringTag,{value:"Module"})),ave=W`<svg fill="none" viewBox="0 0 16 16">
8686  <path
8687    fill="currentColor"
8688    d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
8689  />
8690</svg>`,cve=Object.freeze(Object.defineProperty({__proto__:null,etherscanSvg:ave},Symbol.toStringTag,{value:"Module"})),lve=W`<svg fill="none" viewBox="0 0 14 15">
8691  <path
8692    fill="currentColor"
8693    fill-rule="evenodd"
8694    d="M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.57.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z"
8695    clip-rule="evenodd"
8696  />
8697</svg>`,uve=Object.freeze(Object.defineProperty({__proto__:null,extensionSvg:lve},Symbol.toStringTag,{value:"Module"})),dve=W`<svg fill="none" viewBox="0 0 14 15">
8698  <path
8699    fill="currentColor"
8700    fill-rule="evenodd"
8701    d="M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z"
8702    clip-rule="evenodd"
8703  />
8704</svg>`,hve=Object.freeze(Object.defineProperty({__proto__:null,externalLinkSvg:dve},Symbol.toStringTag,{value:"Module"})),fve=W`<svg fill="none" viewBox="0 0 40 40">
8705  <g clip-path="url(#a)">
8706    <g clip-path="url(#b)">
8707      <circle cx="20" cy="19.89" r="20" fill="#1877F2" />
8708      <g clip-path="url(#c)">
8709        <path
8710          fill="#fff"
8711          d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H2
87111.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z"
8712        />
8713      </g>
8714    </g>
8715    <path
8716      fill="#1877F2"
8717      d="M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z"
8718    />
8719    <path
8720      fill="#fff"
8721      d="m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z"
8722    />
8723  </g>
8724  <defs>
8725    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
8726    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
8727    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
8728  </defs>
8729</svg>`,pve=Object.freeze(Object.defineProperty({__proto__:null,facebookSvg:fve},Symbol.toStringTag,{value:"Module"})),gve=W`<svg style="border-radius: 9999px; overflow: hidden;"  fill="none" viewBox="0 0 1000 1000">
8730  <rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
8731  <path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
8732  <path
8733    fill="#fff"
8734    d="M320 248h354v504h-51.96V521.13h-.5c-5.76-63.8-59.31-113.81-124.54-113.81s-118.78 50-124.53 113.81h-.5V752H320V248Z"
8735  />
8736  <path
8737    fill="#fff"
8738    d="m225 320 21.16 71.46h17.9v289.09a16.29 16.29 0 0 0-16.28 16.24v19.49h-3.25a16.3 16.3 0 0 0-16.28 16.24V752h182.26v-19.48a16.22 16.22 0 0 0-16.28-16.24h-3.25v-19.5a16.22 16.22 0 0 0-16.28-16.23h-19.52V320H225Zm400.3 360.55a16.3 16.3 0 0 0-15.04 10.02 16.2 16.2 0 0 0-1.24 6.22v19.49h-3.25a16.29 16.29 0 0 0-16.27 16.24V752h182.24v-19.48a16.23 16.23 0 0 0-16.27-16.24h-3.25v-19.5a16.2 16.2 0 0 0-10.04-15 16.3 16.3 0 0 0-6.23-1.23v-289.1h17.9L775 320H644.82v360.55H625.3Z"
8739  />
8740</svg>`,wve=Object.freeze(Object.defineProperty({__proto__:null,farcasterSvg:gve},Symbol.toStringTag,{value:"Module"})),mve=W`<svg fill="none" viewBox="0 0 16 16">
8741  <path
8742    fill="currentColor"
8743    fill-rule="evenodd"
8744    d="M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z"
8745    clip-rule="evenodd"
8746  />
8747</svg>`,yve=Object.freeze(Object.defineProperty({__proto__:null,filtersSvg:mve},Symbol.toStringTag,{value:"Module"})),bve=W`<svg fill="none" viewBox="0 0 40 40">
8748  <g clip-path="url(#a)">
8749    <g clip-path="url(#b)">
8750      <circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
8751      <g clip-path="url(#c)">
8752        <path
8753          fill="#fff"
8754          d="M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z"
8755        />
8756      </g>
8757    </g>
8758  </g>
8759  <defs>
8760    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
8761    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
8762    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
8763  </defs>
8764</svg>`,vve=Object.freeze(Object.defineProperty({__proto__:null,githubSvg:bve},Symbol.toStringTag,{value:"Module"})),Eve=W`<svg fill="none" viewBox="0 0 40 40">
8765  <path
8766    fill="#4285F4"
8767    d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z"
8768  />
8769  <path
8770    fill="#34A853"
8771    d="M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z"
8772  />
8773  <path
8774    fill="#FBBC05"
8775    d="M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z"
8776  />
8777  <path
8778    fill="#EA4335"
8779    d="M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z"
8780  />
8781</svg>`,Cve=Object.freeze(Object.defineProperty({__proto__:null,googleSvg:Eve},Symbol.toStringTag,{value:"Module"})),xve=W`<svg fill="none" viewBox="0 0 16 16">
8782  <path
8783    fill="currentColor"
8784    d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
8785  />
8786  <path
8787    fill="currentColor"
8788    fill-rule="evenodd"
8789    d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"
8790    clip-rule="evenodd"
8791  />
8792</svg>`,_ve=Object.freeze(Object.defineProperty({__proto__:null,helpCircleSvg:xve},Symbol.toStringTag,{value:"Module"})),Sve=W`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
8793  <path d="M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z" fill="currentColor"/>
8794  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z" fill="currentColor"/>
8795</svg>`,Ive=Object.freeze(Object.defineProperty({__proto__:null,imageSvg:Sve},Symbol.toStringTag,{value:"Module"})),$ve=W`<svg
8796 xmlns="http://www.w3.org/2000/svg"
8797 width="28"
8798 height="28"
8799 viewBox="0 0 28 28"
8800 fill="none">
8801  <path
8802    fill="#949E9E"
8803    fill-rule="evenodd"
8804    d="M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z"
8805    clip-rule="evenodd"/>
8806</svg>`,Ave=Object.freeze(Object.defineProperty({__proto__:null,idSvg:$ve},Symbol.toStringTag,{value:"Module"})),Pve=W`<svg fill="none" viewBox="0 0 14 15">
8807  <path
8808    fill="currentColor"
8809    d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
8810  />
8811  <path
8812    fill="currentColor"
8813    fill-rule="evenodd"
8814    d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
8815    clip-rule="evenodd"
8816  />
8817</svg>`,Tve=Object.freeze(Object.defineProperty({__proto__:null,infoCircleSvg:Pve},Symbol.toStringTag,{value:"Module"}
8817)),Ove=W`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
8818<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
8819</svg>`,Nve=Object.freeze(Object.defineProperty({__proto__:null,lightbulbSvg:Ove},Symbol.toStringTag,{value:"Module"})),kve=W`<svg fill="none" viewBox="0 0 16 16">
8820  <path
8821    fill="currentColor"
8822    fill-rule="evenodd"
8823    d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z"
8824    clip-rule="evenodd"
8825  />
8826</svg>`,Rve=Object.freeze(Object.defineProperty({__proto__:null,mailSvg:kve},Symbol.toStringTag,{value:"Module"})),Bve=W`<svg fill="none" viewBox="0 0 20 20">
8827  <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
8828  <path
8829    fill="currentColor"
8830    fill-rule="evenodd"
8831    d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z"
8832    clip-rule="evenodd"
8833  />
8834</svg>`,Dve=Object.freeze(Object.defineProperty({__proto__:null,mobileSvg:Bve},Symbol.toStringTag,{value:"Module"})),Lve=W`<svg fill="none" viewBox="0 0 41 40">
8835  <path
8836    style="fill: var(--wui-color-fg-100);"
8837    fill-opacity=".05"
8838    d="M.6 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z"
8839  />
8840  <path
8841    fill="#949E9E"
8842    d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
8843  />
8844</svg>`,Mve=Object.freeze(Object.defineProperty({__proto__:null,moreSvg:Lve},Symbol.toStringTag,{value:"Module"})),Uve=W`<svg fill="none" viewBox="0 0 22 20">
8845  <path
8846    fill="currentColor"
8847    fill-rule="evenodd"
8848    d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z"
8849    clip-rule="evenodd"
8850  />
8851  <path
8852    fill="currentColor"
8853    fill-rule="evenodd"
8854    d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
8855    clip-rule="evenodd"
8856  />
8857</svg>`,jve=Object.freeze(Object.defineProperty({__proto__:null,networkPlaceholderSvg:Uve},Symbol.toStringTag,{value:"Module"})),zve=W`<svg fill="none" viewBox="0 0 20 20">
8858  <path
8859    fill="currentColor"
8860    fill-rule="evenodd"
8861    d="M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"
8862    clip-rule="evenodd"
8863  />
8864</svg>`,Fve=Object.freeze(Object.defineProperty({__proto__:null,nftPlaceholderSvg:zve},Symbol.toStringTag,{value:"Module"})),qve=W`<svg fill="none" viewBox="0 0 16 16">
8865  <path
8866    fill="currentColor"
8867    fill-rule="evenodd"
8868    d="M8 0a1 1 0 0 1 1 1v5.38a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1ZM5.26 2.6a1 1 0 0 1-.28 1.39 5.46 5.46 0 1 0 6.04 0 1 1 0 1 1 1.1-1.67 7.46 7.46 0 1 1-8.25 0 1 1 0 0 1 1.4.28Z"
8869    clip-rule="evenodd"
8870  />
8871</svg>`,Hve=Object.freeze(Object.defineProperty({__proto__:null,offSvg:qve},Symbol.toStringTag,{value:"Module"})),Vve=W` <svg
8872  width="36"
8873  height="36"
8874  fill="none"
8875>
8876  <path
8877    d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z"
8878    fill="#fff"
8879    fill-opacity=".05"
8880  />
8881  <path
8882    d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z"
8883    fill="#EA4335"
8884  />
8885  <path
8886    d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z"
8887    fill="#FBBC04"
8888  />
8889  <path
8890    d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z"
8891    fill="#4285F4"
8892  />
8893  <path
8894    d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z"
8895    fill="#34A853"
8896  />
8897  <path
8898    d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z"
8899    stroke="#fff"
8900    stroke-opacity=".05"
8901  />
8902</svg>`,Wve=Object.freeze(Object.defineProperty({__proto__:null,playStoreSvg:Vve},Symbol.toStringTag,{value:"Module"})),Kve=W`<svg
8903  width="13"
8904  height="12"
8905  viewBox="0 0 13 12"
8906  fill="none"
8907>
8908  <path
8909    fill="currentColor"
8910    fill-rule="evenodd"
8911    clip-rule="evenodd"
8912    d="M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z"
8913  /></svg
8914>`,Zve=Object.freeze(Object.defineProperty({__proto__:null,plusSvg:Kve},Symbol.toStringTag,{value:"Module"})),Gve=W`<svg fill="none" viewBox="0 0 20 20">
8915  <path
8916    fill="currentColor"
8917    d="M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z"
8918  />
8919</svg>`,Yve=Object.freeze(Object.defineProperty({__proto__:null,qrCodeIcon:Gve},Symbol.toStringTag,{value:"Module"})),Jve=W`<svg
8920  fill="none"
8921  viewBox="0 0 21 20"
8922>
8923  <path
8924    fill="currentColor"
8925    d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z"
8926  /></svg
8927>`,Xve=Object.freeze(Object.defineProperty({__proto__:null,recycleHorizontalSvg:Jve},Symbol.toStringTag,{value:"Module"})),Qve=W`<svg fill="none" viewBox="0 0 14 16">
8928  <path
8929    fill="currentColor"
8930    fill-rule="evenodd"
8931    d="M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z"
8932    clip-rule="evenodd"
8933  />
8934</svg>`,e8e=Object.freeze(Object.defineProperty({__proto__:null,refreshSvg:Qve},Symbol.toStringTag,{value:"Module"})),t8e=W`<svg fill="none" viewBox="0 0 20 20">
8935  <path
8936    fill="currentColor"
8937    fill-rule="evenodd"
8938    d="M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z"
8939    clip-rule="evenodd"
8940  />
8941</svg>`,r8e=Object.freeze(Object.defineProperty({__proto__:null,searchSvg:t8e},Symbol.toStringTag,{value:"Module"})),n8e=W`<svg fill="none" viewBox="0 0 21 20">
8942  <path
8943    fill="currentColor"
8944    fill-rule="evenodd"
8945    d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 
894519.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z"
8946    clip-rule="evenodd"
8947  />
8948  <svg
8949    xmlns="http://www.w3.org/2000/svg"
8950    width="21"
8951    height="20"
8952    viewBox="0 0 21 20"
8953    fill="none"
8954  ></svg></svg
8955>`,i8e=Object.freeze(Object.defineProperty({__proto__:null,sendSvg:n8e},Symbol.toStringTag,{value:"Module"})),s8e=W`<svg fill="none" viewBox="0 0 20 20">
8956  <path
8957    fill="currentColor"
8958    fill-rule="evenodd"
8959    d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z"
8960    clip-rule="evenodd"
8961  />
8962</svg>`,o8e=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalSvg:s8e},Symbol.toStringTag,{value:"Module"})),a8e=W`<svg
8963  width="14"
8964  height="14"
8965  viewBox="0 0 14 14"
8966  fill="none"
8967  xmlns="http://www.w3.org/2000/svg"
8968>
8969  <path
8970    fill-rule="evenodd"
8971    clip-rule="evenodd"
8972    d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z"
8973    fill="currentColor"
8974  />
8975</svg>
8976
8977`,c8e=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalMediumSvg:a8e},Symbol.toStringTag,{value:"Module"})),l8e=W`<svg width="10" height="10" viewBox="0 0 10 10">
8978  <path
8979    fill="currentColor"
8980    fill-rule="evenodd"
8981    d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z"
8982    clip-rule="evenodd"
8983  />
8984</svg>`,u8e=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalBoldSvg:l8e},Symbol.toStringTag,{value:"Module"})),d8e=W`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
8985  <path 
8986    fill="currentColor"
8987    fill-rule="evenodd" 
8988    clip-rule="evenodd" 
8989    d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z" 
8990  />
8991</svg>`,h8e=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalRoundedBoldSvg:d8e},Symbol.toStringTag,{value:"Module"})),f8e=W`<svg fill="none" viewBox="0 0 14 14">
8992  <path
8993    fill="currentColor"
8994    fill-rule="evenodd"
8995    d="M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z"
8996    clip-rule="evenodd"
8997  />
8998</svg>`,p8e=Object.freeze(Object.defineProperty({__proto__:null,swapVerticalSvg:f8e},Symbol.toStringTag,{value:"Module"})),g8e=W`<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
8999  <g clip-path="url(#a)">
9000    <path fill="url(#b)" d="M0 0h32v32H0z"/>
9001    <path fill-rule="evenodd" clip-rule="evenodd" d="M7.034 15.252c4.975-2.167 8.293-3.596 9.953-4.287 4.74-1.971 5.725-2.314 6.366-2.325.142-.002.457.033.662.198.172.14.22.33.243.463.022.132.05.435.028.671-.257 2.7-1.368 9.248-1.933 12.27-.24 1.28-.71 1.708-1.167 1.75-.99.091-1.743-.655-2.703-1.284-1.502-.985-2.351-1.598-3.81-2.558-1.684-1.11-.592-1.721.368-2.718.252-.261 4.619-4.233 4.703-4.594.01-.045.02-.213-.08-.301-.1-.09-.246-.059-.353-.035-.15.034-2.55 1.62-7.198 4.758-.682.468-1.298.696-1.851.684-.61-.013-1.782-.344-2.653-.628-1.069-.347-1.918-.53-1.845-1.12.039-.308.462-.623 1.27-.944Z" fill="#fff"/>
9002  </g>
9003  <path d="M.5 16C.5 7.44 7.44.5 16 .5 24.56.5 31.5 7.44 31.5 16c0 8.56-6.94 15.5-15.5 15.5C7.44 31.5.5 24.56.5 16Z" stroke="#141414" stroke-opacity=".05"/>
9004  <defs>
9005    <linearGradient id="b" x1="1600" y1="0" x2="1600" y2="3176.27" gradientUnits="userSpaceOnUse">
9006      <stop stop-color="#2AABEE"/>
9007      <stop offset="1" stop-color="#229ED9"/>
9008    </linearGradient>
9009    <clipPath id="a">
9010      <path d="M0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16Z" fill="#fff"/>
9011    </clipPath>
9012  </defs>
9013</svg>`,w8e=Object.freeze(Object.defineProperty({__proto__:null,telegramSvg:g8e},Symbol.toStringTag,{value:"Module"})),m8e=W`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
9014  <path d="M7 3.71875C6.0335 3.71875 5.25 2.93525 5.25 1.96875C5.25 1.00225 6.0335 0.21875 7 0.21875C7.9665 0.21875 8.75 1.00225 8.75 1.96875C8.75 2.93525 7.9665 3.71875 7 3.71875Z" fill="#949E9E"/>
9015  <path d="M7 8.96875C6.0335 8.96875 5.25 8.18525 5.25 7.21875C5.25 6.25225 6.0335 5.46875 7 5.46875C7.9665 5.46875 8.75 6.25225 8.75 7.21875C8.75 8.18525 7.9665 8.96875 7 8.96875Z" fill="#949E9E"/>
9016  <path d="M5.25 12.4688C5.25 13.4352 6.0335 14.2187 7 14.2187C7.9665 14.2187 8.75 13.4352 8.75 12.4688C8.75 11.5023 7.9665 10.7188 7 10.7188C6.0335 10.7188 5.25 11.5023 5.25 12.4688Z" fill="#949E9E"/>
9017</svg>`,y8e=Object.freeze(Object.defineProperty({__proto__:null,threeDotsSvg:m8e},Symbol.toStringTag,{value:"Module"})),b8e=W`<svg fill="none" viewBox="0 0 40 40">
9018  <g clip-path="url(#a)">
9019    <g clip-path="url(#b)">
9020      <circle cx="20" cy="19.89" r="20" fill="#5A3E85" />
9021      <g clip-path="url(#c)">
9022        <path
9023          fill="#fff"
9024          d="M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z"
9025        />
9026      </g>
9027    </g>
9028  </g>
9029  <defs>
9030    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
9031    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
9032    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
9033  </defs>
9034</svg>`,v8e=Object.freeze(Object.defineProperty({__proto__:null,twitchSvg:b8e},Symbol.toStringTag,{value:"Module"})),E8e=W`<svg fill="none" viewBox="0 0 41 40">
9035  <g clip-path="url(#a)">
9036    <path fill="#000" d="M.8 0h40v40H.8z" />
9037    <path
9038      fill="#fff"
9039      d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z"
9040    />
9041  </g>
9042  <defs>
9043    <clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath>
9044  </defs>
9045</svg>`,MI=Object.freeze(Object.defineProperty({__proto__:null,xSvg:E8e},Symbol.toStringTag,{value:"Module"})),C8e=W`<svg fill="none" viewBox="0 0 16 16">
9046  <path
9047    fill="currentColor"
9048    d="m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z"
9049  />
9050</svg>`,x8e=Object.freeze(Object.defineProperty({__proto__:null,twitterIconSvg:C8e},Symbol.toStringTag,{value:"Module"})),_8e=W`<svg fill="none" viewBox="0 0 28 28">
9051  <path
9052    fill="currentColor"
9053    fill-rule="evenodd"
9054    d="M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z"
9055    clip-rule="evenodd"
9056  />
9057</svg>`,S8e=Object.freeze(Object.defineProperty({__proto__:null,verifySvg:_8e},Symbol.toStringTag,{value:"Module"})),I8e=W`<svg fill="none" viewBox="0 0 14 14">
9058  <path
9059    fill="currentColor"
9060    fill-rule="evenodd"
9061    d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z"
9062    clip-rule="evenodd"
9063  />
9064</svg>`,$8e=Object.freeze(Object.defineProperty({__proto__:null,verifyFilledSvg:I8e},Symbol.toStringTag,{value:"Module"})),A8e=W`<svg fill="none" viewBox="0 0 20 20">
9065  <path
9066    fill="currentColor"
9067    fill-rule="evenodd"
9068    d="M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z"
9069    clip-rule="evenodd"
9070  />
9071</svg>`,P8e=Object.freeze(Object.defineProperty({__proto__:null,walletSvg:A8e},Symbol.toStringTag,{value:"Module"})),T8e=W`<svg fill="none" viewBox="0 0 96 67">
9072  <path
9073    fill="currentColor"
9074    d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z"
9075  />
9076  <path
9077    stroke="#000"
9078    stroke-opacity=".1"
9079    d="M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z"
9080  />
9081</svg>`,O8e=W`
9082<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9083<g clip-path="url(#clip0_22274_4692)">
9084<path d="M0 6.64C0 4.17295 0 2.93942 0.525474 2.01817C0.880399 1.39592 1.39592 0.880399 2.01817 0.525474C2.93942 0 4.17295 0 6.64 0H9.36C11.8271 0 13.0606 0 13.9818 0.525474C14.6041 0.880399 15.1196 1.39592 15.4745 2.01817C16 2.93942 16 4.17295 16 6.64V9.36C16 11.8271 16 13.0606 15.4745 13.9818C15.1196 14.6041 14.6041 15.1196 13.9818 15.4745C13.0606 16 11.8271 16 9.36 16H6.64C4.17295 16 2.93942 16 2.01817 15.4745C1.39592 15.1196 0.880399 14.6041 0.525474 13.9818C0 13.0606 0 11.8271 0 9.36V6.64Z" fill="#C7B994"/>
9085<path d="M4.49038 5.76609C6.42869 3.86833 9.5713 3.86833 11.5096 5.76609L11.7429 5.99449C11.8398 6.08938 11.8398 6.24323 11.7429 6.33811L10.9449 7.11942C10.8964 7.16686 10.8179 7.16686 10.7694 7.11942L10.4484 6.80512C9.09617 5.48119 6.90381 5.48119 5.5516 6.80512L5.20782 7.14171C5.15936 7.18915 5.08079 7.18915 5.03234 7.14171L4.23434 6.3604C4.13742 6.26552 4.13742 6.11167 4.23434 6.01678L4.49038 5.76609ZM13.1599 7.38192L13.8702 8.07729C13.9671 8.17217 13.9671 8.32602 13.8702 8.4209L10.6677 11.5564C10.5708 11.6513 10.4137 11.6513 10.3168 11.5564L8.04388 9.33105C8.01965 9.30733 7.98037 9.30733 7.95614 9.33105L5.6833 11.5564C5.58638 11.6513 5.42925 11.6513 5.33234 11.5564L2.12982 8.42087C2.0329 8.32598 2.0329 8.17213 2.12982 8.07724L2.84004 7.38188C2.93695 7.28699 3.09408 7.28699 3.191 7.38188L5.46392 9.60726C5.48815 9.63098 5.52743 9.63098 5.55166 9.60726L7.82447 7.38188C7.92138 7.28699 8.07851 7.28699 8.17543 7.38187L10.4484 9.60726C10.4726 9.63098 10.5119 9.63098 10.5361 9.60726L12.809 7.38192C12.9059 7.28703 13.063 7.28703 13.1599 7.38192Z" fill="#202020"/>
9086</g>
9087<defs>
9088<clipPath id="clip0_22274_4692">
9089<path d="M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z" fill="white"/>
9090</clipPath>
9091</defs>
9092</svg>
9093`,N8e=W`
9094<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9095<circle cx="11" cy="11" r="11" transform="matrix(-1 0 0 1 23 1)" fill="#202020"/>
9096<circle cx="11" cy="11" r="11.5" transform="matrix(-1 0 0 1 23 1)" stroke="#C7B994" stroke-opacity="0.7"/>
9097<path d="M15.4523 11.0686L16.7472 9.78167C13.8205 6.87297 10.1838 6.87297 7.25708 9.78167L8.55201 11.0686C10.7779 8.85645 13.2279 8.85645 15.4538 11.0686H15.4523Z" fill="#C7B994"/>
9098<path d="M15.0199 14.067L12 11.0656L8.98 14.067L5.96004 11.0656L4.66663 12.3511L8.98 16.6393L12 13.638L15.0199 16.6393L19.3333 12.3511L18.0399 11.0656L15.0199 14.067Z" fill="#C7B994"/>
9099</svg>
9100`,tb=Object.freeze(Object.defineProperty({__proto__:null,walletConnectBrownSvg:N8e,walletConnectLightBrownSvg:O8e,walletConnectSvg:T8e},Symbol.toStringTag,{value:"Module"})),k8e=W`
9101  <svg fill="none" viewBox="0 0 48 44">
9102    <path
9103      style="fill: var(--wui-color-bg-300);"
9104      d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.
910405 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z"
9105    />
9106    <path
9107      style="fill: var(--wui-color-fg-200);"
9108      fill-rule="evenodd"
9109      d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z"
9110      clip-rule="evenodd"
9111    />
9112  </svg>
9113`,R8e=Object.freeze(Object.defineProperty({__proto__:null,walletPlaceholderSvg:k8e},Symbol.toStringTag,{value:"Module"})),B8e=W`<svg fill="none" viewBox="0 0 20 20">
9114  <path
9115    fill="currentColor"
9116    d="M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"
9117  />
9118  <path
9119    fill="currentColor"
9120    fill-rule="evenodd"
9121    d="M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"
9122    clip-rule="evenodd"
9123  />
9124</svg>`,D8e=Object.freeze(Object.defineProperty({__proto__:null,warningCircleSvg:B8e},Symbol.toStringTag,{value:"Module"})),L8e=W`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
9125<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
9126</svg>`,M8e=Object.freeze(Object.defineProperty({__proto__:null,infoSvg:L8e},Symbol.toStringTag,{value:"Module"})),U8e=W`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9127<path d="M15.0162 11.6312L9.55059 2.13937C9.39228 1.86862 9.16584 1.64405 8.8938 1.48798C8.62176 1.33192 8.3136 1.2498 7.99997 1.2498C7.68634 1.2498 7.37817 1.33192 7.10613 1.48798C6.83409 1.64405 6.60765 1.86862 6.44934 2.13937L0.983716 11.6312C0.830104 11.894 0.749146 12.1928 0.749146 12.4972C0.749146 12.8015 0.830104 13.1004 0.983716 13.3631C1.14027 13.6352 1.3664 13.8608 1.63889 14.0166C1.91139 14.1725 2.22044 14.253 2.53434 14.25H13.4656C13.7793 14.2528 14.0881 14.1721 14.3603 14.0163C14.6326 13.8604 14.8585 13.635 15.015 13.3631C15.1688 13.1005 15.2499 12.8017 15.2502 12.4973C15.2504 12.193 15.1696 11.8941 15.0162 11.6312ZM13.7162 12.6125C13.6908 12.6558 13.6541 12.6914 13.6101 12.7157C13.5661 12.7399 13.5164 12.7517 13.4662 12.75H2.53434C2.48415 12.7517 2.43442 12.7399 2.39042 12.7157C2.34641 12.6914 2.30976 12.6558 2.28434 12.6125C2.26278 12.5774 2.25137 12.5371 2.25137 12.4959C2.25137 12.4548 2.26278 12.4144 2.28434 12.3794L7.74997 2.88749C7.77703 2.84583 7.81408 2.8116 7.85774 2.7879C7.9014 2.7642 7.95029 2.75178 7.99997 2.75178C8.04964 2.75178 8.09854 2.7642 8.1422 2.7879C8.18586 2.8116 8.2229 2.84583 8.24997 2.88749L13.715 12.3794C13.7367 12.4143 13.7483 12.4546 13.7486 12.4958C13.7488 12.5369 13.7376 12.5773 13.7162 12.6125ZM7.24997 8.49999V6.49999C7.24997 6.30108 7.32898 6.11031 7.46964 5.96966C7.61029 5.82901 7.80105 5.74999 7.99997 5.74999C8.19888 5.74999 8.38964 5.82901 8.5303 5.96966C8.67095 6.11031 8.74997 6.30108 8.74997 6.49999V8.49999C8.74997 8.6989 8.67095 8.88967 8.5303 9.03032C8.38964 9.17097 8.19888 9.24999 7.99997 9.24999C7.80105 9.24999 7.61029 9.17097 7.46964 9.03032C7.32898 8.88967 7.24997 8.6989 7.24997 8.49999ZM8.99997 11C8.99997 11.1978 8.94132 11.3911 8.83144 11.5556C8.72155 11.72 8.56538 11.8482 8.38265 11.9239C8.19992 11.9996 7.99886 12.0194 7.80488 11.9808C7.6109 11.9422 7.43271 11.847 7.29286 11.7071C7.15301 11.5672 7.05777 11.3891 7.01918 11.1951C6.9806 11.0011 7.0004 10.8 7.07609 10.6173C7.15177 10.4346 7.27995 10.2784 7.4444 10.1685C7.60885 10.0586 7.80219 9.99999 7.99997 9.99999C8.26518 9.99999 8.51954 10.1053 8.70707 10.2929C8.89461 10.4804 8.99997 10.7348 8.99997 11Z" fill="currentColor"/>
9128</svg>
9129`,j8e=Object.freeze(Object.defineProperty({__proto__:null,exclamationTriangleSvg:U8e},Symbol.toStringTag,{value:"Module"}
9129)),z8e=W`<svg width="60" height="16" viewBox="0 0 60 16" fill="none"">
9130  <path d="M9.3335 4.66667C9.3335 2.08934 11.4229 0 14.0002 0H20.6669C23.2442 0 25.3335 2.08934 25.3335 4.66667V11.3333C25.3335 13.9106 23.2442 16 20.6669 16H14.0002C11.4229 16 9.3335 13.9106 9.3335 11.3333V4.66667Z" fill="#363636"/>
9131  <path d="M15.6055 11.0003L17.9448 4.66699H18.6316L16.2923 11.0003H15.6055Z" fill="#F6F6F6"/>
9132  <path d="M0 4.33333C0 1.9401 1.9401 0 4.33333 0C6.72657 0 8.66669 1.9401 8.66669 4.33333V11.6667C8.66669 14.0599 6.72657 16 4.33333 16C1.9401 16 0 14.0599 0 11.6667V4.33333Z" fill="#363636"/>
9133  <path d="M3.9165 9.99934V9.16602H4.74983V9.99934H3.9165Z" fill="#F6F6F6"/>
9134  <path d="M26 8C26 3.58172 29.3517 0 33.4863 0H52.5137C56.6483 0 60 3.58172 60 8C60 12.4183 56.6483 16 52.5137 16H33.4863C29.3517 16 26 12.4183 26 8Z" fill="#363636"/>
9135  <path d="M49.3687 9.95834V6.26232H50.0213V6.81966C50.256 6.40899 50.7326 6.16699 51.2606 6.16699C52.0599 6.16699 52.6173 6.67299 52.6173 7.65566V9.95834H51.972V7.69234C51.972 7.04696 51.6053 6.70966 51.07 6.70966C50.4906 6.70966 50.0213 7.17168 50.0213 7.82433V9.95834H49.3687Z" fill="#F6F6F6"/>
9136  <path d="M45.2538 9.95773L44.5718 6.26172H45.1877L45.6717 9.31242L46.3098 7.30306H46.9184L47.5491 9.29041L48.0404 6.26172H48.6564L47.9744 9.95773H47.2411L46.6178 8.03641L45.9871 9.95773H45.2538Z" fill="#F6F6F6"/>
9137  <path d="M42.3709 10.0536C41.2489 10.0536 40.5889 9.21765 40.5889 8.1103C40.5889 7.01035 41.2489 6.16699 42.3709 6.16699C43.4929 6.16699 44.1529 7.01035 44.1529 8.1103C44.1529 9.21765 43.4929 10.0536 42.3709 10.0536ZM42.3709 9.51096C43.1775 9.51096 43.4856 8.82164 43.4856 8.10296C43.4856 7.39163 43.1775 6.70966 42.3709 6.70966C41.5642 6.70966 41.2562 7.39163 41.2562 8.10296C41.2562 8.82164 41.5642 9.51096 42.3709 9.51096Z" fill="#F6F6F6"/>
9138  <path d="M38.2805 10.0536C37.1952 10.0536 36.5132 9.22499 36.5132 8.1103C36.5132 7.00302 37.1952 6.16699 38.2805 6.16699C39.1972 6.16699 40.0038 6.68766 39.9159 8.27896H37.1805C37.2319 8.96103 37.5472 9.5183 38.2805 9.5183C38.7718 9.5183 39.0945 9.21765 39.2045 8.87299H39.8499C39.7472 9.48903 39.1679 10.0536 38.2805 10.0536ZM37.1952 7.78765H39.2852C39.2338 7.04696 38.8892 6.70232 38.2805 6.70232C37.6132 6.70232 37.2832 7.18635 37.1952 7.78765Z" fill="#F6F6F6"/>
9139  <path d="M33.3828 9.95773V6.26172H34.0501V6.88506C34.2848 6.47439 34.6882 6.26172 35.1061 6.26172H35.9935V6.88506H35.0548C34.4682 6.88506 34.0501 7.26638 34.0501 8.00706V9.95773H33.3828Z" fill="#F6F6F6"/>
9140</svg>`,F8e=Object.freeze(Object.defineProperty({__proto__:null,reownSvg:z8e},Symbol.toStringTag,{value:"Module"})),q8e=W`<svg
9141  width="14"
9142  height="14"
9143  viewBox="0 0 14 14"
9144  fill="none"
9145  xmlns="http://www.w3.org/2000/svg"
9146>
9147  <path
9148    fill="currentColor"
9149    fill-rule="evenodd"
9150    clip-rule="evenodd"
9151    d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
9152    fill="#667dff"
9153  /></svg
9154>`,H8e=Object.freeze(Object.defineProperty({__proto__:null,addSvg:q8e},Symbol.toStringTag,{value:"Module"})),V8e=W`<svg fill="none" viewBox="0 0 24 24">
9155  <path
9156    style="fill: var(--wui-color-accent-100);"
9157    d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
9158  />
9159</svg>`,W8e=Object.freeze(Object.defineProperty({__proto__:null,allWalletsSvg:V8e},Symbol.toStringTag,{value:"Module"})),K8e=W`<svg
9160  fill="none"
9161  viewBox="0 0 21 20"
9162>
9163  <path
9164    fill="currentColor"
9165    fill-rule="evenodd"
9166    d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
9167    clip-rule="evenodd"
9168  /></svg
9169>`,Z8e=Object.freeze(Object.defineProperty({__proto__:null,arrowBottomCircleSvg:K8e},Symbol.toStringTag,{value:"Module"})),G8e=W`
9170<svg width="36" height="36">
9171  <path
9172    d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
9173    fill="url(#a)"
9174  />
9175  <path
9176    d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 
91761.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z"
9177    fill="#fff"
9178  />
9179  <defs>
9180    <linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse">
9181      <stop stop-color="#18BFFB" />
9182      <stop offset="1" stop-color="#2072F3" />
9183    </linearGradient>
9184  </defs>
9185</svg>`,Y8e=Object.freeze(Object.defineProperty({__proto__:null,appStoreSvg:G8e},Symbol.toStringTag,{value:"Module"})),J8e=W`<svg fill="none" viewBox="0 0 40 40">
9186  <g clip-path="url(#a)">
9187    <g clip-path="url(#b)">
9188      <circle cx="20" cy="19.89" r="20" fill="#000" />
9189      <g clip-path="url(#c)">
9190        <path
9191          fill="#fff"
9192          d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z"
9193        />
9194      </g>
9195    </g>
9196  </g>
9197  <defs>
9198    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
9199    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
9200    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
9201  </defs>
9202</svg>`,X8e=Object.freeze(Object.defineProperty({__proto__:null,appleSvg:J8e},Symbol.toStringTag,{value:"Module"})),Q8e=W`<svg fill="none" viewBox="0 0 14 15">
9203  <path
9204    fill="currentColor"
9205    fill-rule="evenodd"
9206    d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
9207    clip-rule="evenodd"
9208  />
9209</svg>`,e9e=Object.freeze(Object.defineProperty({__proto__:null,arrowBottomSvg:Q8e},Symbol.toStringTag,{value:"Module"})),t9e=W`<svg fill="none" viewBox="0 0 14 15">
9210  <path
9211    fill="currentColor"
9212    fill-rule="evenodd"
9213    d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
9214    clip-rule="evenodd"
9215  />
9216</svg>`,r9e=Object.freeze(Object.defineProperty({__proto__:null,arrowLeftSvg:t9e},Symbol.toStringTag,{value:"Module"})),n9e=W`<svg fill="none" viewBox="0 0 14 15">
9217  <path
9218    fill="currentColor"
9219    fill-rule="evenodd"
9220    d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
9221    clip-rule="evenodd"
9222  />
9223</svg>`,i9e=Object.freeze(Object.defineProperty({__proto__:null,arrowRightSvg:n9e},Symbol.toStringTag,{value:"Module"})),s9e=W`<svg fill="none" viewBox="0 0 14 15">
9224  <path
9225    fill="currentColor"
9226    fill-rule="evenodd"
9227    d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
9228    clip-rule="evenodd"
9229  />
9230</svg>`,o9e=Object.freeze(Object.defineProperty({__proto__:null,arrowTopSvg:s9e},Symbol.toStringTag,{value:"Module"})),a9e=W`<svg
9231  xmlns="http://www.w3.org/2000/svg"
9232  width="12"
9233  height="13"
9234  viewBox="0 0 12 13"
9235  fill="none"
9236>
9237  <path
9238    fill-rule="evenodd"
9239    clip-rule="evenodd"
9240    d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z"
9241    fill="currentColor"
9242  /></svg
9243>`,c9e=Object.freeze(Object.defineProperty({__proto__:null,bankSvg:a9e},Symbol.toStringTag,{value:"Module"})),l9e=W`<svg fill="none" viewBox="0 0 20 20">
9244  <path
9245    fill="currentColor"
9246    fill-rule="evenodd"
9247    d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z"
9248    clip-rule="evenodd"
9249  />
9250  <path
9251    fill="currentColor"
9252    fill-rule="evenodd"
9253    d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
9254    clip-rule="evenodd"
9255  />
9256</svg>`,u9e=Object.freeze(Object.defineProperty({__proto__:null,browserSvg:l9e},Symbol.toStringTag,{value:"Module"})),d9e=W`<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
9257<path fill-rule="evenodd" clip-rule="evenodd" d="M3.90029 1.71429C4.09883 0.736183 4.96358 0 6.00028 0C7.03698 0 7.90173 0.736183 8.10027 1.71429H9.41533C9.42361 1.71417 9.4319 1.71417 9.44022 1.71429H10.286C10.7594 1.71429 11.1431 2.09804 11.1431 2.57143C11.1431 3.04482 10.7594 3.42857 10.28
92576 3.42857H10.1855L9.73675 7.01877C9.6785 7.48493 9.6279 7.88983 9.55601 8.22075C9.47948 8.57304 9.36472 8.91574 9.13613 9.22925C8.91553 9.53181 8.63151 9.78254 8.30392 9.96392C7.96448 10.1519 7.61019 10.2232 7.25112 10.2555C6.91385 10.2858 6.50581 10.2857 6.03603 10.2857H5.96453C5.49475 10.2857 5.08671 10.2858 4.74944 10.2555C4.39037 10.2232 4.03608 10.1519 3.69664 9.96392C3.36905 9.78254 3.08503 9.53181 2.86442 9.22925C2.63583 8.91574 2.52108 8.57304 2.44455 8.22075C2.37266 7.88984 2.32206 7.48496 2.26382 7.0188L1.81504 3.42857H1.71456C1.24118 3.42857 0.857422 3.04482 0.857422 2.57143C0.857422 2.09804 1.24118 1.71429 1.71456 1.71429H2.56034C2.56866 1.71417 2.57695 1.71417 2.58522 1.71429H3.90029ZM3.54266 3.42857L3.96043 6.77068C4.02441 7.2825 4.06617 7.61016 4.11976 7.85681C4.17051 8.09045 4.21726 8.17492 4.2496 8.21928C4.32314 8.32013 4.41781 8.4037 4.52701 8.46416C4.57504 8.49076 4.66465 8.52666 4.90278 8.54805C5.15417 8.57063 5.48448 8.57143 6.00028 8.57143C6.51608 8.57143 6.84638 8.57063 7.09778 8.54805C7.33591 8.52666 7.42552 8.49076 7.47355 8.46416C7.58275 8.4037 7.67742 8.32013 7.75096 8.21928C7.7833 8.17491 7.83005 8.09045 7.8808 7.85681C7.93439 7.61016 7.97615 7.2825 8.04013 6.77068L8.4579 3.42857H3.54266Z" fill="currentColor"/>
9258</svg>
9259`,h9e=Object.freeze(Object.defineProperty({__proto__:null,binSvg:d9e},Symbol.toStringTag,{value:"Module"})),f9e=W`
9260<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
9261<g clip-path="url(#clip0_24458_3947)">
9262<path d="M12.6542 7.45143C11.8528 10.6657 8.59691 12.6219 5.38191 11.8204C2.16827 11.019 0.211924 7.76324 1.01369 4.54918C1.81476 1.33451 5.07063 -0.621803 8.28463 0.17954C11.4994 0.980884 13.4556 4.23702 12.6541 7.45149L12.6542 7.45143H12.6542Z" fill="var(--wui-color-gray-glass-005)"/>
9263<path d="M9.48002 5.14517C9.59946 4.3467 8.9915 3.91749 8.16017 3.63117L8.42986 2.54957L7.7714 2.38551L7.50886 3.43863C7.33576 3.39546 7.15799 3.35479 6.9813 3.31446L7.24574 2.25439L6.58769 2.09033L6.31786 3.17158C6.17461 3.13896 6.03391 3.10673 5.89741 3.07277L5.89817 3.06937L4.99014 2.84264L4.81498 3.54585C4.81498 3.54585 5.3035 3.65783 5.29321 3.66472C5.55985 3.73126 5.60807 3.90775 5.60006 4.04765L5.29286 5.27984C5.31122 5.2845 5.33503 5.29125 5.36131 5.3018C5.33935 5.29635 5.31597 5.2904 5.29171 5.28459L4.86112 7.01072C4.82853 7.09172 4.74582 7.21328 4.5594 7.16712C4.566 7.17668 4.08082 7.0477 4.08082 7.0477L3.75391 7.80135L4.61079 8.01495C4.77019 8.05492 4.92641 8.09674 5.08024 8.13607L4.80777 9.23007L5.46547 9.39413L5.7353 8.31174C5.91498 8.36051 6.08935 8.4055 6.26005 8.44791L5.99112 9.52519L6.64961 9.68925L6.92206 8.5973C8.04487 8.80978 8.88914 8.72411 9.2445 7.70862C9.53085 6.89103 9.23025 6.41944 8.63954 6.11192C9.06978 6.0127 9.39385 5.72975 9.48026 5.14525L9.48005 5.14511L9.48002 5.14517ZM7.9756 7.25457C7.7721 8.07216 6.39541 7.6302 5.94906 7.51937L6.31064 6.07001C6.75696 6.18142 8.18827 6.40191 7.97562 7.25457H7.9756ZM8.17923 5.13332C7.9936 5.877 6.84776 5.49918 6.47606 5.40653L6.80389 4.09205C7.17559 4.18469 8.37261 4.35761 8.17929 5.13332H8.17923Z" fill="var(--wui-color-gray-glass-090)"/>
9264</g>
9265<defs>
9266<clipPath id="clip0_24458_3947">
9267<rect width="11.9997" height="12" fill="white" transform="translate(0.833984)"/>
9268</clipPath>
9269</defs>
9270</svg>
9271`,p9e=Object.freeze(Object.defineProperty({__proto__:null,bitcoinSvg:f9e},Symbol.toStringTag,{value:"Module"})),g9e=W`<svg
9272  xmlns="http://www.w3.org/2000/svg"
9273  width="12"
9274  height="13"
9275  viewBox="0 0 12 13"
9276  fill="none"
9277>
9278  <path
9279    fill-rule="evenodd"
9280    clip-rule="evenodd"
9281    d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.8
92810916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z"
9282    fill="currentColor"
9283  /></svg
9284>`,w9e=Object.freeze(Object.defineProperty({__proto__:null,cardSvg:g9e},Symbol.toStringTag,{value:"Module"})),m9e=W`<svg
9285  width="28"
9286  height="28"
9287  viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
9288  <path
9289    fill-rule="evenodd"
9290    clip-rule="evenodd"
9291    d="M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z"
9292    fill="currentColor"/>
9293</svg>
9294`,y9e=Object.freeze(Object.defineProperty({__proto__:null,checkmarkSvg:m9e},Symbol.toStringTag,{value:"Module"})),b9e=W`<svg fill="none" viewBox="0 0 14 14">
9295  <path
9296    fill="currentColor"
9297    fill-rule="evenodd"
9298    d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z"
9299    clip-rule="evenodd"
9300  />
9301</svg>`,v9e=Object.freeze(Object.defineProperty({__proto__:null,checkmarkBoldSvg:b9e},Symbol.toStringTag,{value:"Module"})),E9e=W`<svg fill="none" viewBox="0 0 16 16">
9302  <path
9303    fill="currentColor"
9304    fill-rule="evenodd"
9305    d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z"
9306    clip-rule="evenodd"
9307  />
9308</svg>`,C9e=Object.freeze(Object.defineProperty({__proto__:null,chevronBottomSvg:E9e},Symbol.toStringTag,{value:"Module"})),x9e=W`<svg fill="none" viewBox="0 0 16 16">
9309  <path
9310    fill="currentColor"
9311    fill-rule="evenodd"
9312    d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z"
9313    clip-rule="evenodd"
9314  />
9315</svg>`,_9e=Object.freeze(Object.defineProperty({__proto__:null,chevronLeftSvg:x9e},Symbol.toStringTag,{value:"Module"})),S9e=W`<svg fill="none" viewBox="0 0 16 16">
9316  <path
9317    fill="currentColor"
9318    fill-rule="evenodd"
9319    d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z"
9320    clip-rule="evenodd"
9321  />
9322</svg>`,I9e=Object.freeze(Object.defineProperty({__proto__:null,chevronRightSvg:S9e},Symbol.toStringTag,{value:"Module"})),$9e=W`<svg fill="none" viewBox="0 0 16 16">
9323  <path
9324    fill="currentColor"
9325    fill-rule="evenodd"
9326    d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z"
9327    clip-rule="evenodd"
9328  />
9329</svg>`,A9e=Object.freeze(Object.defineProperty({__proto__:null,chevronTopSvg:$9e},Symbol.toStringTag,{value:"Module"})),P9e=W`<svg width="36" height="36" fill="none">
9330  <path
9331    fill="#fff"
9332    fill-opacity=".05"
9333    d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z"
9334  />
9335  <path
9336    stroke="#fff"
9337    stroke-opacity=".05"
9338    d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z"
9339  />
9340  <path
9341    fill="url(#a)"
9342    d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z"
9343  />
9344  <path
9345    fill="url(#b)"
9346    d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z"
9347  />
9348  <path
9349    fill="url(#c)"
9350    d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z"
9351  />
9352  <path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" />
9353  <path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" />
9354  <defs>
9355    <linearGradient
9356      id="a"
9357      x1="6.294"
9358      x2="41.1"
9359      y1="5.995"
9360      y2="5.995"
9361      gradientUnits="userSpaceOnUse"
9362    >
9363      <stop stop-color="#D93025" />
9364      <stop offset="1" stop-color="#EA4335" />
9365    </linearGradient>
9366    <linearGradient
9367      id="b"
9368      x1="20.953"
9369      x2="37.194"
9370      y1="32.143"
9371      y2="2.701"
9372      gradientUnits="userSpaceOnUse"
9373    >
9374      <stop stop-color="#FCC934" />
9375      <stop offset="1" stop-color="#FBBC04" />
9376    </linearGradient>
9377    <linearGradient
9378      id="c"
9379      x1="25.873"
9380      x2="9.632"
9381      y1="31.2"
9382      y2="1.759"
9383      gradientUnits="userSpaceOnUse"
9384    >
9385      <stop stop-color="#1E8E3E" />
9386      <stop offset="1" stop-color="#34A853" />
9387    </linearGradient>
9388  </defs>
9389</svg>`,T9e=Object.freeze(Object.defineProperty({__proto__:null,chromeStoreSvg:P9e},Symbol.toStringTag,{value:"Module"})),O9e=W`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
9390  <path 
9391    fill-rule="evenodd" 
9392    clip-rule="evenodd" 
9393    d="M7.00235 2C4.24 2 2.00067 4.23858 2.00067 7C2.00067 9.76142 4.24 12 7.00235 12C9.7647 12 12.004 9.76142 12.004 7C12.004 4.23858 9.7647 2 7.00235 2ZM0 7C0 3.13401 3.13506 0 7.00235 0C10.8696 0 14.0047 3.13401 14.0047 7C14.0047 10.866 10.8696 14 7.00235 14C3.13506 14 0 10.866 0 7ZM7.00235 3C7.55482 3 8.00269 3.44771 8.00269 4V6.58579L9.85327 8.43575C10.2439 8.82627 10.2439 9.45944 9.85327 9.84996C9.46262 10.2405 8.82924 10.2405 8.43858 9.84996L6.29501 7.70711C6.10741 7.51957 6.00201 7.26522 6.00201 7V4C6.00201 3.44771 6.44988 3 7.00235 3Z" 
9394    fill="currentColor"
9395  />
9396</svg>`,N9e=Object.freeze(Object.defineProperty({__proto__:null,clockSvg:O9e},Symbol.toStringTag,{value:"Module"})),k9e=W`<svg fill="none" viewBox="0 0 16 16">
9397  <path
9398    fill="currentColor"
9399    fill-rule="evenodd"
9400    d="M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z"
9401    clip-rule="evenodd"
9402  />
9403</svg>`,R9e=Object.freeze(Object.defineProperty({__proto__:null,closeSvg:k9e},Symbol.toStringTag,{value:"Module"})),B9e=W`<svg fill="none" viewBox="0 0 16 16">
9404  <path
9405    fill="currentColor"
9406    fill-rule="evenodd"
9407    d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z"
9408    clip-rule="evenodd"
9409  />
9410</svg>`,D9e=Object.freeze(Object.defineProperty({__proto__:null,compassSvg:B9e},Symbol.toStringTag,{value:"Module"})),L9e=W`<svg fill="none" viewBox="0 0 20 20">
9411  <path
9412    fill="currentColor"
9413    fill-rule="evenodd"
9414    d="M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z"
9415    clip-rule="evenodd"
9416  />
9417</svg>`,M9e=Object.freeze(Object.defineProperty({__proto__:null,coinPlaceholderSvg:L9e},Symbol.toStringTag,{value:"Module"})),U9e=W`<svg
9418  xmlns="http://www.w3.org/2000/svg"
9419  width="16"
9420  height="16"
9421  viewBox="0 0 16 16"
9422  fill="none"
9423>
9424  <path
9425    fill="currentColor"
9426    fill-rule="evenodd"
9427    clip-rule="evenodd"
9428    d="M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.2856
94285ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z"
9429    fill="#788181"
9430  /></svg
9431>`,j9e=Object.freeze(Object.defineProperty({__proto__:null,copySvg:U9e},Symbol.toStringTag,{value:"Module"})),z9e=W` <svg fill="none" viewBox="0 0 13 4">
9432  <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
9433</svg>`,F9e=Object.freeze(Object.defineProperty({__proto__:null,cursorSvg:z9e},Symbol.toStringTag,{value:"Module"})),q9e=W`<svg fill="none" viewBox="0 0 14 6">
9434  <path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
9435  <path
9436    style="stroke: var(--wui-color-inverse-100);"
9437    stroke-opacity=".05"
9438    d="M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z"
9439  />
9440  <path
9441    style="fill: var(--wui-color-bg-150);"
9442    d="M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z"
9443  />
9444</svg> `,H9e=Object.freeze(Object.defineProperty({__proto__:null,cursorTransparentSvg:q9e},Symbol.toStringTag,{value:"Module"})),V9e=W`<svg width="4" height="4" viewBox="0 0 4 4" fill="none" xmlns="http://www.w3.org/2000/svg">
9445<circle cx="2" cy="2" r="2" fill="white" fill-opacity="0.2"/>
9446</svg>
9447`,W9e=Object.freeze(Object.defineProperty({__proto__:null,circleSvg:V9e},Symbol.toStringTag,{value:"Module"})),K9e=W`<svg fill="none" viewBox="0 0 20 20">
9448  <path
9449    fill="currentColor"
9450    fill-rule="evenodd"
9451    d="M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z"
9452    clip-rule="evenodd"
9453  />
9454  <path fill="currentColor" d="M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z" />
9455</svg>`,Z9e=Object.freeze(Object.defineProperty({__proto__:null,desktopSvg:K9e},Symbol.toStringTag,{value:"Module"})),G9e=W`<svg fill="none" viewBox="0 0 16 16">
9456  <path
9457    fill="currentColor"
9458    fill-rule="evenodd"
9459    d="M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.57c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z"
9460    clip-rule="evenodd"
9461  />
9462</svg>`,Y9e=Object.freeze(Object.defineProperty({__proto__:null,disconnectSvg:G9e},Symbol.toStringTag,{value:"Module"})),J9e=W`<svg fill="none" viewBox="0 0 40 40">
9463  <g clip-path="url(#a)">
9464    <g clip-path="url(#b)">
9465      <circle cx="20" cy="19.89" r="20" fill="#5865F2" />
9466      <path
9467        fill="#fff"
9468        fill-rule="evenodd"
9469        d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
9470        clip-rule="evenodd"
9471      />
9472    </g>
9473  </g>
9474  <defs>
9475    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
9476    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
9477  </defs>
9478</svg>`,X9e=Object.freeze(Object.defineProperty({__proto__:null,discordSvg:J9e},Symbol.toStringTag,{value:"Module"})),Q9e=W`<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
9479<path d="M6.66686 12C9.9805 12 12.6667 9.31371 12.6667 6C12.6667 2.68629 9.9805 0 6.66686 0C3.35323 0 0.666992 2.68629 0.666992 6C0.666992 9.31371 3.35323 12 6.66686 12Z" fill="var(--wui-color-gray-glass-005)"/>
9480<path d="M6.6658 1.50098V4.82739L9.47712 6.08381L6.6658 1.50098Z" fill="var(--wui-color-gray-glass-060)"/>
9481<path d="M6.6658 1.50098L3.85449 6.08381L6.6658 4.82739V1.50098Z" fill="var(--wui-color-gray-glass-090)"/>
9482<path d="M6.6658 8.23909V10.4993L9.47876 6.60705L6.6658 8.23909Z" fill="var(--wui-color-gray-glass-060)"/>
9483<path d="M6.6658 10.4993V8.23909L3.85449 6.60705L6.6658 10.4993Z" fill="var(--wui-color-gray-glass-090)"/>
9484<path d="M6.6658 7.71585L9.47712 6.08381L6.6658 4.82739V7.71585Z" fill="var(--wui-color-gray-glass-020)"/>
9485<path d="M3.85449 6.08381L6.6658 7.71585V4.82739L3.85449 6.08381Z" fill="var(--wui-color-gray-glass-060)"/>
9486</svg>
9487`,e7e=Object.freeze(Object.defineProperty({__proto__:null,ethereumSvg:Q9e},Symbol.toStringTag,{value:"Module"})),t7e=W`<svg fill="none" viewBox="0 0 16 16">
9488  <path
9489    fill="currentColor"
9490    d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
9491  />
9492</svg>`,r7e=Object.freeze(Object.defineProperty({__proto__:null,etherscanSvg:t7e},Symbol.toStringTag,{value:"Module"})),n7e=W`<svg fill="none" viewBox="0 0 14 15">
9493  <path
9494    fill="currentColor"
9495    fill-rule="evenodd"
9496    d="M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.5
94967.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z"
9497    clip-rule="evenodd"
9498  />
9499</svg>`,i7e=Object.freeze(Object.defineProperty({__proto__:null,extensionSvg:n7e},Symbol.toStringTag,{value:"Module"})),s7e=W`<svg fill="none" viewBox="0 0 14 15">
9500  <path
9501    fill="currentColor"
9502    fill-rule="evenodd"
9503    d="M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z"
9504    clip-rule="evenodd"
9505  />
9506</svg>`,o7e=Object.freeze(Object.defineProperty({__proto__:null,externalLinkSvg:s7e},Symbol.toStringTag,{value:"Module"})),a7e=W`<svg fill="none" viewBox="0 0 40 40">
9507  <g clip-path="url(#a)">
9508    <g clip-path="url(#b)">
9509      <circle cx="20" cy="19.89" r="20" fill="#1877F2" />
9510      <g clip-path="url(#c)">
9511        <path
9512          fill="#fff"
9513          d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H2
95131.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z"
9514        />
9515      </g>
9516    </g>
9517    <path
9518      fill="#1877F2"
9519      d="M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z"
9520    />
9521    <path
9522      fill="#fff"
9523      d="m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z"
9524    />
9525  </g>
9526  <defs>
9527    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
9528    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
9529    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
9530  </defs>
9531</svg>`,c7e=Object.freeze(Object.defineProperty({__proto__:null,facebookSvg:a7e},Symbol.toStringTag,{value:"Module"})),l7e=W`<svg style="border-radius: 9999px; overflow: hidden;"  fill="none" viewBox="0 0 1000 1000">
9532  <rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
9533  <path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
9534  <path
9535    fill="#fff"
9536    d="M320 248h354v504h-51.96V521.13h-.5c-5.76-63.8-59.31-113.81-124.54-113.81s-118.78 50-124.53 113.81h-.5V752H320V248Z"
9537  />
9538  <path
9539    fill="#fff"
9540    d="m225 320 21.16 71.46h17.9v289.09a16.29 16.29 0 0 0-16.28 16.24v19.49h-3.25a16.3 16.3 0 0 0-16.28 16.24V752h182.26v-19.48a16.22 16.22 0 0 0-16.28-16.24h-3.25v-19.5a16.22 16.22 0 0 0-16.28-16.23h-19.52V320H225Zm400.3 360.55a16.3 16.3 0 0 0-15.04 10.02 16.2 16.2 0 0 0-1.24 6.22v19.49h-3.25a16.29 16.29 0 0 0-16.27 16.24V752h182.24v-19.48a16.23 16.23 0 0 0-16.27-16.24h-3.25v-19.5a16.2 16.2 0 0 0-10.04-15 16.3 16.3 0 0 0-6.23-1.23v-289.1h17.9L775 320H644.82v360.55H625.3Z"
9541  />
9542</svg>`,u7e=Object.freeze(Object.defineProperty({__proto__:null,farcasterSvg:l7e},Symbol.toStringTag,{value:"Module"})),d7e=W`<svg fill="none" viewBox="0 0 16 16">
9543  <path
9544    fill="currentColor"
9545    fill-rule="evenodd"
9546    d="M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z"
9547    clip-rule="evenodd"
9548  />
9549</svg>`,h7e=Object.freeze(Object.defineProperty({__proto__:null,filtersSvg:d7e},Symbol.toStringTag,{value:"Module"})),f7e=W`<svg fill="none" viewBox="0 0 40 40">
9550  <g clip-path="url(#a)">
9551    <g clip-path="url(#b)">
9552      <circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
9553      <g clip-path="url(#c)">
9554        <path
9555          fill="#fff"
9556          d="M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z"
9557        />
9558      </g>
9559    </g>
9560  </g>
9561  <defs>
9562    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
9563    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
9564    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
9565  </defs>
9566</svg>`,p7e=Object.freeze(Object.defineProperty({__proto__:null,githubSvg:f7e},Symbol.toStringTag,{value:"Module"})),g7e=W`<svg fill="none" viewBox="0 0 40 40">
9567  <path
9568    fill="#4285F4"
9569    d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z"
9570  />
9571  <path
9572    fill="#34A853"
9573    d="M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z"
9574  />
9575  <path
9576    fill="#FBBC05"
9577    d="M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z"
9578  />
9579  <path
9580    fill="#EA4335"
9581    d="M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z"
9582  />
9583</svg>`,w7e=Object.freeze(Object.defineProperty({__proto__:null,googleSvg:g7e},Symbol.toStringTag,{value:"Module"})),m7e=W`<svg fill="none" viewBox="0 0 16 16">
9584  <path
9585    fill="currentColor"
9586    d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
9587  />
9588  <path
9589    fill="currentColor"
9590    fill-rule="evenodd"
9591    d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"
9592    clip-rule="evenodd"
9593  />
9594</svg>`,y7e=Object.freeze(Object.defineProperty({__proto__:null,helpCircleSvg:m7e},Symbol.toStringTag,{value:"Module"})),b7e=W`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
9595  <path d="M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z" fill="currentColor"/>
9596  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z" fill="currentColor"/>
9597</svg>`,v7e=Object.freeze(Object.defineProperty({__proto__:null,imageSvg:b7e},Symbol.toStringTag,{value:"Module"})),E7e=W`<svg
9598 xmlns="http://www.w3.org/2000/svg"
9599 width="28"
9600 height="28"
9601 viewBox="0 0 28 28"
9602 fill="none">
9603  <path
9604    fill="#949E9E"
9605    fill-rule="evenodd"
9606    d="M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z"
9607    clip-rule="evenodd"/>
9608</svg>`,C7e=Object.freeze(Object.defineProperty({__proto__:null,idSvg:E7e},Symbol.toStringTag,{value:"Module"})),x7e=W`<svg fill="none" viewBox="0 0 14 15">
9609  <path
9610    fill="currentColor"
9611    d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
9612  />
9613  <path
9614    fill="currentColor"
9615    fill-rule="evenodd"
9616    d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
9617    clip-rule="evenodd"
9618  />
9619</svg>`,_7e=Object.freeze(Object.defineProperty({__proto__:null,infoCircleSvg:x7e},Symbol.toStringTag,{value:"Module"}
9619)),S7e=W`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
9620<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
9621</svg>`,I7e=Object.freeze(Object.defineProperty({__proto__:null,lightbulbSvg:S7e},Symbol.toStringTag,{value:"Module"})),$7e=W`<svg fill="none" viewBox="0 0 16 16">
9622  <path
9623    fill="currentColor"
9624    fill-rule="evenodd"
9625    d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z"
9626    clip-rule="evenodd"
9627  />
9628</svg>`,A7e=Object.freeze(Object.defineProperty({__proto__:null,mailSvg:$7e},Symbol.toStringTag,{value:"Module"})),P7e=W`<svg fill="none" viewBox="0 0 20 20">
9629  <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
9630  <path
9631    fill="currentColor"
9632    fill-rule="evenodd"
9633    d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z"
9634    clip-rule="evenodd"
9635  />
9636</svg>`,T7e=Object.freeze(Object.defineProperty({__proto__:null,mobileSvg:P7e},Symbol.toStringTag,{value:"Module"})),O7e=W`<svg fill="none" viewBox="0 0 41 40">
9637  <path
9638    style="fill: var(--wui-color-fg-100);"
9639    fill-opacity=".05"
9640    d="M.6 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z"
9641  />
9642  <path
9643    fill="#949E9E"
9644    d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
9645  />
9646</svg>`,N7e=Object.freeze(Object.defineProperty({__proto__:null,moreSvg:O7e},Symbol.toStringTag,{value:"Module"})),k7e=W`<svg fill="none" viewBox="0 0 22 20">
9647  <path
9648    fill="currentColor"
9649    fill-rule="evenodd"
9650    d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z"
9651    clip-rule="evenodd"
9652  />
9653  <path
9654    fill="currentColor"
9655    fill-rule="evenodd"
9656    d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
9657    clip-rule="evenodd"
9658  />
9659</svg>`,R7e=Object.freeze(Object.defineProperty({__proto__:null,networkPlaceholderSvg:k7e},Symbol.toStringTag,{value:"Module"})),B7e=W`<svg fill="none" viewBox="0 0 20 20">
9660  <path
9661    fill="currentColor"
9662    fill-rule="evenodd"
9663    d="M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"
9664    clip-rule="evenodd"
9665  />
9666</svg>`,D7e=Object.freeze(Object.defineProperty({__proto__:null,nftPlaceholderSvg:B7e},Symbol.toStringTag,{value:"Module"})),L7e=W`<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9667<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99792 0C8.6291 0 9.14077 0.511675 9.14077 1.14286V6.41758C9.14077 7.04877 8.6291 7.56044 7.99792 7.56044C7.36673 7.56044 6.85506 7.04877 6.85506 6.41758V1.
966714286C6.85506 0.511675 7.36673 0 7.99792 0ZM5.44952 2.61998C5.79899 3.14558 5.6562 3.85497 5.1306 4.20444C3.73012 5.1356 2.8111 6.72446 2.8111 8.52747C2.8111 11.3921 5.13332 13.7143 7.99792 13.7143C10.8625 13.7143 13.1847 11.3921 13.1847 8.52747C13.1847 6.72446 12.2657 5.1356 10.8652 4.20444C10.3396 3.85497 10.1968 3.14558 10.5463 2.61998C10.8958 2.09437 11.6052 1.95158 12.1308 2.30105C14.1414 3.63786 15.4704 5.92721 15.4704 8.52747C15.4704 12.6544 12.1249 16 7.99792 16C3.87095 16 0.525391 12.6544 0.525391 8.52747C0.525391 5.92721 1.85448 3.63786 3.86506 2.30105C4.39066 1.95158 5.10005 2.09437 5.44952 2.61998Z" fill="currentColor"/>
9668</svg>
9669`,M7e=Object.freeze(Object.defineProperty({__proto__:null,offSvg:L7e},Symbol.toStringTag,{value:"Module"})),U7e=W` <svg
9670  width="36"
9671  height="36"
9672  fill="none"
9673>
9674  <path
9675    d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z"
9676    fill="#fff"
9677    fill-opacity=".05"
9678  />
9679  <path
9680    d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z"
9681    fill="#EA4335"
9682  />
9683  <path
9684    d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z"
9685    fill="#FBBC04"
9686  />
9687  <path
9688    d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z"
9689    fill="#4285F4"
9690  />
9691  <path
9692    d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z"
9693    fill="#34A853"
9694  />
9695  <path
9696    d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z"
9697    stroke="#fff"
9698    stroke-opacity=".05"
9699  />
9700</svg>`,j7e=Object.freeze(Object.defineProperty({__proto__:null,playStoreSvg:U7e},Symbol.toStringTag,{value:"Module"})),z7e=W`<svg
9701  width="13"
9702  height="12"
9703  viewBox="0 0 13 12"
9704  fill="none"
9705>
9706  <path
9707    fill="currentColor"
9708    fill-rule="evenodd"
9709    clip-rule="evenodd"
9710    d="M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z"
9711  /></svg
9712>`,F7e=Object.freeze(Object.defineProperty({__proto__:null,plusSvg:z7e},Symbol.toStringTag,{value:"Module"})),q7e=W`<svg fill="none" viewBox="0 0 20 20">
9713  <path
9714    fill="currentColor"
9715    d="M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z"
9716  />
9717</svg>`,H7e=Object.freeze(Object.defineProperty({__proto__:null,qrCodeIcon:q7e},Symbol.toStringTag,{value:"Module"})),V7e=W`<svg
9718  fill="none"
9719  viewBox="0 0 21 20"
9720>
9721  <path
9722    fill="currentColor"
9723    d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z"
9724  /></svg
9725>`,W7e=Object.freeze(Object.defineProperty({__proto__:null,recycleHorizontalSvg:V7e},Symbol.toStringTag,{value:"Module"})),K7e=W`<svg fill="none" viewBox="0 0 14 16">
9726  <path
9727    fill="currentColor"
9728    fill-rule="evenodd"
9729    d="M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z"
9730    clip-rule="evenodd"
9731  />
9732</svg>`,Z7e=Object.freeze(Object.defineProperty({__proto__:null,refreshSvg:K7e},Symbol.toStringTag,{value:"Module"})),G7e=W`<svg fill="none" viewBox="0 0 20 20">
9733  <path
9734    fill="currentColor"
9735    fill-rule="evenodd"
9736    d="M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z"
9737    clip-rule="evenodd"
9738  />
9739</svg>`,Y7e=Object.freeze(Object.defineProperty({__proto__:null,searchSvg:G7e},Symbol.toStringTag,{value:"Module"})),J7e=W`<svg fill="none" viewBox="0 0 21 20">
9740  <path
9741    fill="currentColor"
9742    fill-rule="evenodd"
9743    d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 
974319.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z"
9744    clip-rule="evenodd"
9745  />
9746  <svg
9747    xmlns="http://www.w3.org/2000/svg"
9748    width="21"
9749    height="20"
9750    viewBox="0 0 21 20"
9751    fill="none"
9752  ></svg></svg
9753>`,X7e=Object.freeze(Object.defineProperty({__proto__:null,sendSvg:J7e},Symbol.toStringTag,{value:"Module"})),Q7e=W`<svg fill="none" viewBox="0 0 20 20">
9754  <path
9755    fill="currentColor"
9756    fill-rule="evenodd"
9757    d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z"
9758    clip-rule="evenodd"
9759  />
9760</svg>`,eEe=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalSvg:Q7e},Symbol.toStringTag,{value:"Module"})),tEe=W`<svg
9761  width="14"
9762  height="14"
9763  viewBox="0 0 14 14"
9764  fill="none"
9765  xmlns="http://www.w3.org/2000/svg"
9766>
9767  <path
9768    fill-rule="evenodd"
9769    clip-rule="evenodd"
9770    d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z"
9771    fill="currentColor"
9772  />
9773</svg>
9774
9775`,rEe=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalMediumSvg:tEe},Symbol.toStringTag,{value:"Module"})),nEe=W`<svg width="10" height="10" viewBox="0 0 10 10">
9776  <path
9777    fill="currentColor"
9778    fill-rule="evenodd"
9779    d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z"
9780    clip-rule="evenodd"
9781  />
9782</svg>`,iEe=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalBoldSvg:nEe},Symbol.toStringTag,{value:"Module"})),sEe=W`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
9783  <path 
9784    fill="currentColor"
9785    fill-rule="evenodd" 
9786    clip-rule="evenodd" 
9787    d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z" 
9788  />
9789</svg>`,oEe=Object.freeze(Object.defineProperty({__proto__:null,swapHorizontalRoundedBoldSvg:sEe},Symbol.toStringTag,{value:"Module"})),aEe=W`<svg fill="none" viewBox="0 0 14 14">
9790  <path
9791    fill="currentColor"
9792    fill-rule="evenodd"
9793    d="M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z"
9794    clip-rule="evenodd"
9795  />
9796</svg>`,cEe=Object.freeze(Object.defineProperty({__proto__:null,swapVerticalSvg:aEe},Symbol.toStringTag,{value:"Module"})),lEe=W`
9797<svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
9798<g clip-path="url(#clip0_24458_3940)">
9799<path d="M6.49987 12C9.81351 12 12.4997 9.31371 12.4997 6C12.4997 2.68629 9.81351 0 6.49987 0C3.18623 0 0.5 2.68629 0.5 6C0.5 9.31371 3.18623 12 6.49987 12Z" fill="var(--wui-color-gray-glass-005)"/>
9800<path d="M9.89298 7.73057L8.76102 8.91828C8.73642 8.94408 8.70664 8.96465 8.67356 8.97871C8.64047 8.99277 8.60478 9.00002 8.56872 9H3.2027C3.1771 9 3.15205 8.99268 3.13064 8.97895C3.10923 8.96521 3.09239 8.94565 3.08218 8.92268C3.07197 8.8997 3.06885 8.87431 3.07319 8.84963C3.07753 8.82494 3.08915 8.80203 3.10662 8.78371L4.23943 7.596C4.26397 7.57027 4.29365 7.54974 4.32662 7.53569C4.3596 7.52163 4.39518 7.51435 4.43115 7.51428H9.79688C9.82248 7.51428 9.84752 7.52161 9.86895 7.53534C9.89033 7.54908 9.90717 7.56864 9.91742 7.59161C9.92761 7.61459 9.93073 7.63997 9.92638 7.66466C9.92204 7.68935 9.91043 7.71226 9.89298 7.73057ZM8.76102 5.33885C8.73642 5.31305 8.70664 5.29248 8.67356 5.27843C8.64047 5.26437 8.60478 5.25713 8.56872 5.25715H3.2027C3.1771 5.25715 3.15205 5.26446 3.13064 5.2782C3.10923 5.29194 3.09239 5.31149 3.08218 5.33446C3.07197 5.35744 3.06885 5.38283 3.07319 5.40752C3.07753 5.4322 3.08915 5.45511 3.10662 5.47343L4.23943 6.66115C4.26397 6.68688 4.29365 6.7074 4.32662 6.72146C4.3596 6.73551 4.39518 6.7428 4.43115 6.74285H9.79688C9.82248 6.74285 9.84752 6.73554 9.86895 6.7218C9.89033 6.70806 9.90717 6.68851 9.91742 6.66554C9.92761 6.64256 9.93073 6.61717 9.92638 6.59248C9.92204 6.5678 9.91043 6.54489 9.89298 6.52657L8.76102 5.33885ZM3.2027 4.48572H8.56872C8.60478 4.48573 8.64047 4.47849 8.67356 4.46443C8.70664 4.45037 8.73642 4.4298 8.76102 4.404L9.89298 3.21629C9.91043 3.19797 9.92204 3.17506 9.92638 3.15037C9.93073 3.12569 9.92761 3.1003 9.91742 3.07732C9.90717 3.05435 9.89
9800033 3.03479 9.86895 3.02106C9.84752 3.00732 9.82248 3 9.79688 3H4.43115C4.39518 3.00006 4.3596 3.00734 4.32662 3.0214C4.29365 3.03545 4.26397 3.05598 4.23943 3.08171L3.10691 4.26943C3.08946 4.28772 3.07785 4.31061 3.0735 4.33527C3.06914 4.35993 3.07224 4.3853 3.08241 4.40826C3.09258 4.43122 3.10938 4.45078 3.13075 4.46454C3.15212 4.4783 3.17712 4.48565 3.2027 4.48572Z" fill="var(--wui-color-gray-glass-090)"/>
9801</g>
9802<defs>
9803<clipPath id="clip0_24458_3940">
9804<rect width="11.9997" height="12" fill="white" transform="translate(0.5)"/>
9805</clipPath>
9806</defs>
9807</svg>
9808`,uEe=Object.freeze(Object.defineProperty({__proto__:null,solanaSvg:lEe},Symbol.toStringTag,{value:"Module"})),dEe=W`<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
9809  <g clip-path="url(#a)">
9810    <path fill="url(#b)" d="M0 0h32v32H0z"/>
9811    <path fill-rule="evenodd" clip-rule="evenodd" d="M7.034 15.252c4.975-2.167 8.293-3.596 9.953-4.287 4.74-1.971 5.725-2.314 6.366-2.325.142-.002.457.033.662.198.172.14.22.33.243.463.022.132.05.435.028.671-.257 2.7-1.368 9.248-1.933 12.27-.24 1.28-.71 1.708-1.167 1.75-.99.091-1.743-.655-2.703-1.284-1.502-.985-2.351-1.598-3.81-2.558-1.684-1.11-.592-1.721.368-2.718.252-.261 4.619-4.233 4.703-4.594.01-.045.02-.213-.08-.301-.1-.09-.246-.059-.353-.035-.15.034-2.55 1.62-7.198 4.758-.682.468-1.298.696-1.851.684-.61-.013-1.782-.344-2.653-.628-1.069-.347-1.918-.53-1.845-1.12.039-.308.462-.623 1.27-.944Z" fill="#fff"/>
9812  </g>
9813  <path d="M.5 16C.5 7.44 7.44.5 16 .5 24.56.5 31.5 7.44 31.5 16c0 8.56-6.94 15.5-15.5 15.5C7.44 31.5.5 24.56.5 16Z" stroke="#141414" stroke-opacity=".05"/>
9814  <defs>
9815    <linearGradient id="b" x1="1600" y1="0" x2="1600" y2="3176.27" gradientUnits="userSpaceOnUse">
9816      <stop stop-color="#2AABEE"/>
9817      <stop offset="1" stop-color="#229ED9"/>
9818    </linearGradient>
9819    <clipPath id="a">
9820      <path d="M0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16Z" fill="#fff"/>
9821    </clipPath>
9822  </defs>
9823</svg>`,hEe=Object.freeze(Object.defineProperty({__proto__:null,telegramSvg:dEe},Symbol.toStringTag,{value:"Module"})),fEe=W`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
9824  <path d="M7 3.71875C6.0335 3.71875 5.25 2.93525 5.25 1.96875C5.25 1.00225 6.0335 0.21875 7 0.21875C7.9665 0.21875 8.75 1.00225 8.75 1.96875C8.75 2.93525 7.9665 3.71875 7 3.71875Z" fill="#949E9E"/>
9825  <path d="M7 8.96875C6.0335 8.96875 5.25 8.18525 5.25 7.21875C5.25 6.25225 6.0335 5.46875 7 5.46875C7.9665 5.46875 8.75 6.25225 8.75 7.21875C8.75 8.18525 7.9665 8.96875 7 8.96875Z" fill="#949E9E"/>
9826  <path d="M5.25 12.4688C5.25 13.4352 6.0335 14.2187 7 14.2187C7.9665 14.2187 8.75 13.4352 8.75 12.4688C8.75 11.5023 7.9665 10.7188 7 10.7188C6.0335 10.7188 5.25 11.5023 5.25 12.4688Z" fill="#949E9E"/>
9827</svg>`,pEe=Object.freeze(Object.defineProperty({__proto__:null,threeDotsSvg:fEe},Symbol.toStringTag,{value:"Module"})),gEe=W`<svg fill="none" viewBox="0 0 40 40">
9828  <g clip-path="url(#a)">
9829    <g clip-path="url(#b)">
9830      <circle cx="20" cy="19.89" r="20" fill="#5A3E85" />
9831      <g clip-path="url(#c)">
9832        <path
9833          fill="#fff"
9834          d="M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z"
9835        />
9836      </g>
9837    </g>
9838  </g>
9839  <defs>
9840    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
9841    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
9842    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
9843  </defs>
9844</svg>`,wEe=Object.freeze(Object.defineProperty({__proto__:null,twitchSvg:gEe},Symbol.toStringTag,{value:"Module"})),mEe=W`<svg fill="none" viewBox="0 0 41 40">
9845  <g clip-path="url(#a)">
9846    <path fill="#000" d="M.8 0h40v40H.8z" />
9847    <path
9848      fill="#fff"
9849      d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z"
9850    />
9851  </g>
9852  <defs>
9853    <clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath>
9854  </defs>
9855</svg>`,UI=Object.freeze(Object.defineProperty({__proto__:null,xSvg:mEe},Symbol.toStringTag,{value:"Module"})),yEe=W`<svg fill="none" viewBox="0 0 16 16">
9856  <path
9857    fill="currentColor"
9858    d="m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z"
9859  />
9860</svg>`,bEe=Object.freeze(Object.defineProperty({__proto__:null,twitterIconSvg:yEe},Symbol.toStringTag,{value:"Module"})),vEe=W`<svg fill="none" viewBox="0 0 28 28">
9861  <path
9862    fill="currentColor"
9863    fill-rule="evenodd"
9864    d="M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z"
9865    clip-rule="evenodd"
9866  />
9867</svg>`,EEe=Object.freeze(Object.defineProperty({__proto__:null,verifySvg:vEe},Symbol.toStringTag,{value:"Module"})),CEe=W`<svg fill="none" viewBox="0 0 14 14">
9868  <path
9869    fill="currentColor"
9870    fill-rule="evenodd"
9871    d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z"
9872    clip-rule="evenodd"
9873  />
9874</svg>`,xEe=Object.freeze(Object.defineProperty({__proto__:null,verifyFilledSvg:CEe},Symbol.toStringTag,{value:"Module"})),_Ee=W`<svg fill="none" viewBox="0 0 20 20">
9875  <path
9876    fill="currentColor"
9877    fill-rule="evenodd"
9878    d="M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z"
9879    clip-rule="evenodd"
9880  />
9881</svg>`,SEe=Object.freeze(Object.defineProperty({__proto__:null,walletSvg:_Ee},Symbol.toStringTag,{value:"Module"})),IEe=W`<svg fill="none" viewBox="0 0 96 67">
9882  <path
9883    fill="currentColor"
9884    d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z"
9885  />
9886  <path
9887    stroke="#000"
9888    stroke-opacity=".1"
9889    d="M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z"
9890  />
9891</svg>`,$Ee=W`
9892<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9893<g clip-path="url(#clip0_22274_4692)">
9894<path d="M0 6.64C0 4.17295 0 2.93942 0.525474 2.01817C0.880399 1.39592 1.39592 0.880399 2.01817 0.525474C2.93942 0 4.17295 0 6.64 0H9.36C11.8271 0 13.0606 0 13.9818 0.525474C14.6041 0.880399 15.1196 1.39592 15.4745 2.01817C16 2.93942 16 4.17295 16 6.64V9.36C16 11.8271 16 13.0606 15.4745 13.9818C15.1196 14.6041 14.6041 15.1196 13.9818 15.4745C13.0606 16 11.8271 16 9.36 16H6.64C4.17295 16 2.93942 16 2.01817 15.4745C1.39592 15.1196 0.880399 14.6041 0.525474 13.9818C0 13.0606 0 11.8271 0 9.36V6.64Z" fill="#C7B994"/>
9895<path d="M4.49038 5.76609C6.42869 3.86833 9.5713 3.86833 11.5096 5.76609L11.7429 5.99449C11.8398 6.08938 11.8398 6.24323 11.7429 6.33811L10.9449 7.11942C10.8964 7.16686 10.8179 7.16686 10.7694 7.11942L10.4484 6.80512C9.09617 5.48119 6.90381 5.48119 5.5516 6.80512L5.20782 7.14171C5.15936 7.18915 5.08079 7.18915 5.03234 7.14171L4.23434 6.3604C4.13742 6.26552 4.13742 6.11167 4.23434 6.01678L4.49038 5.76609ZM13.1599 7.38192L13.8702 8.07729C13.9671 8.17217 13.9671 8.32602 13.8702 8.4209L10.6677 11.5564C10.5708 11.6513 10.4137 11.6513 10.3168 11.5564L8.04388 9.33105C8.01965 9.30733 7.98037 9.30733 7.95614 9.33105L5.6833 11.5564C5.58638 11.6513 5.42925 11.6513 5.33234 11.5564L2.12982 8.42087C2.0329 8.32598 2.0329 8.17213 2.12982 8.07724L2.84004 7.38188C2.93695 7.28699 3.09408 7.28699 3.191 7.38188L5.46392 9.60726C5.48815 9.63098 5.52743 9.63098 5.55166 9.60726L7.82447 7.38188C7.92138 7.28699 8.07851 7.28699 8.17543 7.38187L10.4484 9.60726C10.4726 9.63098 10.5119 9.63098 10.5361 9.60726L12.809 7.38192C12.9059 7.28703 13.063 7.28703 13.1599 7.38192Z" fill="#202020"/>
9896</g>
9897<defs>
9898<clipPath id="clip0_22274_4692">
9899<path d="M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z" fill="white"/>
9900</clipPath>
9901</defs>
9902</svg>
9903`,AEe=W`
9904<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9905<circle cx="11" cy="11" r="11" transform="matrix(-1 0 0 1 23 1)" fill="#202020"/>
9906<circle cx="11" cy="11" r="11.5" transform="matrix(-1 0 0 1 23 1)" stroke="#C7B994" stroke-opacity="0.7"/>
9907<path d="M15.4523 11.0686L16.7472 9.78167C13.8205 6.87297 10.1838 6.87297 7.25708 9.78167L8.55201 11.0686C10.7779 8.85645 13.2279 8.85645 15.4538 11.0686H15.4523Z" fill="#C7B994"/>
9908<path d="M15.0199 14.067L12 11.0656L8.98 14.067L5.96004 11.0656L4.66663 12.3511L8.98 16.6393L12 13.638L15.0199 16.6393L19.3333 12.3511L18.0399 11.0656L15.0199 14.067Z" fill="#C7B994"/>
9909</svg>
9910`,rb=Object.freeze(Object.defineProperty({__proto__:null,walletConnectBrownSvg:AEe,walletConnectLightBrownSvg:$Ee,walletConnectSvg:IEe},Symbol.toStringTag,{value:"Module"})),PEe=W`
9911  <svg fill="none" viewBox="0 0 48 44">
9912    <path
9913      style="fill: var(--wui-color-bg-300);"
9914      d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.
991405 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z"
9915    />
9916    <path
9917      style="fill: var(--wui-color-fg-200);"
9918      fill-rule="evenodd"
9919      d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z"
9920      clip-rule="evenodd"
9921    />
9922  </svg>
9923`,TEe=Object.freeze(Object.defineProperty({__proto__:null,walletPlaceholderSvg:PEe},Symbol.toStringTag,{value:"Module"})),OEe=W`<svg fill="none" viewBox="0 0 20 20">
9924  <path
9925    fill="currentColor"
9926    d="M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"
9927  />
9928  <path
9929    fill="currentColor"
9930    fill-rule="evenodd"
9931    d="M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"
9932    clip-rule="evenodd"
9933  />
9934</svg>`,NEe=Object.freeze(Object.defineProperty({__proto__:null,warningCircleSvg:OEe},Symbol.toStringTag,{value:"Module"})),kEe=W`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
9935<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
9936</svg>`,REe=Object.freeze(Object.defineProperty({__proto__:null,infoSvg:kEe},Symbol.toStringTag,{value:"Module"})),BEe=W`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9937<path d="M15.0162 11.6312L9.55059 2.13937C9.39228 1.86862 9.16584 1.64405 8.8938 1.48798C8.62176 1.33192 8.3136 1.2498 7.99997 1.2498C7.68634 1.2498 7.37817 1.33192 7.10613 1.48798C6.83409 1.64405 6.60765 1.86862 6.44934 2.13937L0.983716 11.6312C0.830104 11.894 0.749146 12.1928 0.749146 12.4972C0.749146 12.8015 0.830104 13.1004 0.983716 13.3631C1.14027 13.6352 1.3664 13.8608 1.63889 14.0166C1.91139 14.1725 2.22044 14.253 2.53434 14.25H13.4656C13.7793 14.2528 14.0881 14.1721 14.3603 14.0163C14.6326 13.8604 14.8585 13.635 15.015 13.3631C15.1688 13.1005 15.2499 12.8017 15.2502 12.4973C15.2504 12.193 15.1696 11.8941 15.0162 11.6312ZM13.7162 12.6125C13.6908 12.6558 13.6541 12.6914 13.6101 12.7157C13.5661 12.7399 13.5164 12.7517 13.4662 12.75H2.53434C2.48415 12.7517 2.43442 12.7399 2.39042 12.7157C2.34641 12.6914 2.30976 12.6558 2.28434 12.6125C2.26278 12.5774 2.25137 12.5371 2.25137 12.4959C2.25137 12.4548 2.26278 12.4144 2.28434 12.3794L7.74997 2.88749C7.77703 2.84583 7.81408 2.8116 7.85774 2.7879C7.9014 2.7642 7.95029 2.75178 7.99997 2.75178C8.04964 2.75178 8.09854 2.7642 8.1422 2.7879C8.18586 2.8116 8.2229 2.84583 8.24997 2.88749L13.715 12.3794C13.7367 12.4143 13.7483 12.4546 13.7486 12.4958C13.7488 12.5369 13.7376 12.5773 13.7162 12.6125ZM7.24997 8.49999V6.49999C7.24997 6.30108 7.32898 6.11031 7.46964 5.96966C7.61029 5.82901 7.80105 5.74999 7.99997 5.74999C8.19888 5.74999 8.38964 5.82901 8.5303 5.96966C8.67095 6.11031 8.74997 6.30108 8.74997 6.49999V8.49999C8.74997 8.6989 8.67095 8.88967 8.5303 9.03032C8.38964 9.17097 8.19888 9.24999 7.99997 9.24999C7.80105 9.24999 7.61029 9.17097 7.46964 9.03032C7.32898 8.88967 7.24997 8.6989 7.24997 8.49999ZM8.99997 11C8.99997 11.1978 8.94132 11.3911 8.83144 11.5556C8.72155 11.72 8.56538 11.8482 8.38265 11.9239C8.19992 11.9996 7.99886 12.0194 7.80488 11.9808C7.6109 11.9422 7.43271 11.847 7.29286 11.7071C7.15301 11.5672 7.05777 11.3891 7.01918 11.1951C6.9806 11.0011 7.0004 10.8 7.07609 10.6173C7.15177 10.4346 7.27995 10.2784 7.4444 10.1685C7.60885 10.0586 7.80219 9.99999 7.99997 9.99999C8.26518 9.99999 8.51954 10.1053 8.70707 10.2929C8.89461 10.4804 8.99997 10.7348 8.99997 11Z" fill="currentColor"/>
9938</svg>
9939`,DEe=Object.freeze(Object.defineProperty({__proto__:null,exclamationTriangleSvg:BEe},Symbol.toStringTag,{value:"Module"}
9939)),LEe=W`<svg width="60" height="16" viewBox="0 0 60 16" fill="none"">
9940  <path d="M9.3335 4.66667C9.3335 2.08934 11.4229 0 14.0002 0H20.6669C23.2442 0 25.3335 2.08934 25.3335 4.66667V11.3333C25.3335 13.9106 23.2442 16 20.6669 16H14.0002C11.4229 16 9.3335 13.9106 9.3335 11.3333V4.66667Z" fill="#363636"/>
9941  <path d="M15.6055 11.0003L17.9448 4.66699H18.6316L16.2923 11.0003H15.6055Z" fill="#F6F6F6"/>
9942  <path d="M0 4.33333C0 1.9401 1.9401 0 4.33333 0C6.72657 0 8.66669 1.9401 8.66669 4.33333V11.6667C8.66669 14.0599 6.72657 16 4.33333 16C1.9401 16 0 14.0599 0 11.6667V4.33333Z" fill="#363636"/>
9943  <path d="M3.9165 9.99934V9.16602H4.74983V9.99934H3.9165Z" fill="#F6F6F6"/>
9944  <path d="M26 8C26 3.58172 29.3517 0 33.4863 0H52.5137C56.6483 0 60 3.58172 60 8C60 12.4183 56.6483 16 52.5137 16H33.4863C29.3517 16 26 12.4183 26 8Z" fill="#363636"/>
9945  <path d="M49.3687 9.95834V6.26232H50.0213V6.81966C50.256 6.40899 50.7326 6.16699 51.2606 6.16699C52.0599 6.16699 52.6173 6.67299 52.6173 7.65566V9.95834H51.972V7.69234C51.972 7.04696 51.6053 6.70966 51.07 6.70966C50.4906 6.70966 50.0213 7.17168 50.0213 7.82433V9.95834H49.3687Z" fill="#F6F6F6"/>
9946  <path d="M45.2538 9.95773L44.5718 6.26172H45.1877L45.6717 9.31242L46.3098 7.30306H46.9184L47.5491 9.29041L48.0404 6.26172H48.6564L47.9744 9.95773H47.2411L46.6178 8.03641L45.9871 9.95773H45.2538Z" fill="#F6F6F6"/>
9947  <path d="M42.3709 10.0536C41.2489 10.0536 40.5889 9.21765 40.5889 8.1103C40.5889 7.01035 41.2489 6.16699 42.3709 6.16699C43.4929 6.16699 44.1529 7.01035 44.1529 8.1103C44.1529 9.21765 43.4929 10.0536 42.3709 10.0536ZM42.3709 9.51096C43.1775 9.51096 43.4856 8.82164 43.4856 8.10296C43.4856 7.39163 43.1775 6.70966 42.3709 6.70966C41.5642 6.70966 41.2562 7.39163 41.2562 8.10296C41.2562 8.82164 41.5642 9.51096 42.3709 9.51096Z" fill="#F6F6F6"/>
9948  <path d="M38.2805 10.0536C37.1952 10.0536 36.5132 9.22499 36.5132 8.1103C36.5132 7.00302 37.1952 6.16699 38.2805 6.16699C39.1972 6.16699 40.0038 6.68766 39.9159 8.27896H37.1805C37.2319 8.96103 37.5472 9.5183 38.2805 9.5183C38.7718 9.5183 39.0945 9.21765 39.2045 8.87299H39.8499C39.7472 9.48903 39.1679 10.0536 38.2805 10.0536ZM37.1952 7.78765H39.2852C39.2338 7.04696 38.8892 6.70232 38.2805 6.70232C37.6132 6.70232 37.2832 7.18635 37.1952 7.78765Z" fill="#F6F6F6"/>
9949  <path d="M33.3828 9.95773V6.26172H34.0501V6.88506C34.2848 6.47439 34.6882 6.26172 35.1061 6.26172H35.9935V6.88506H35.0548C34.4682 6.88506 34.0501 7.26638 34.0501 8.00706V9.95773H33.3828Z" fill="#F6F6F6"/>
9950</svg>`,MEe=Object.freeze(Object.defineProperty({__proto__:null,reownSvg:LEe},Symbol.toStringTag,{value:"Module"})),UEe=W`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" fill="none">
9951  <path fill-rule="evenodd" clip-rule="evenodd" d="M1.9659 1.96541C2.30063 1.63067 2.84334 1.63067 3.17808 1.96541L6.00056 4.78789L8.82304 1.96541C9.15777 1.63067 9.70049 1.63067 10.0352 1.96541C10.37 2.30014 10.37 2.84285 10.0352 3.17759L7.21274 6.00007L10.0352 8.82255C10.37 9.15729 10.37 9.7 10.0352 10.0347C9.70049 10.3695 9.15777 10.3695 8.82304 10.0347L6.00056 7.21225L3.17808 10.0347C2.84334 10.3695 2.30063 10.3695 1.9659 10.0347C1.63116 9.7 1.63116 9.15729 1.9659 8.82255L4.78837 6.00007L1.9659 3.17759C1.63116 2.84285 1.63116 2.30014 1.9659 1.96541Z" fill="currentColor"/>
9952</svg>`,jEe=Object.freeze(Object.defineProperty({__proto__:null,xMarkSvg:UEe},Symbol.toStringTag,{value:"Module"}));export{Y$ as $,Cs as A,Oe as B,KEe as C,pU as D,fp as E,zI as F,FEe as G,x0 as H,PCe as I,JF as J,rr as K,Ri as L,Oa as M,Ee as N,IU as O,nc as P,an as Q,uCe as R,uj as S,$e as T,S9 as U,ja as V,u$ as W,se as X,pp as Y,ci as Z,J as _,ec as a,SS as a$,QM as a0,yb as a1,XM as a2,Ni as a3,qu as a4,wr as a5,wj as a6,bP as a7,y0 as a8,ev as a9,tN as aA,Ae as aB,hCe as aC,Rt as aD,Mh as aE,Gr as aF,Jr as aG,z_e as aH,Lo as aI,M_e as aJ,j_e as aK,U_e as aL,St as aM,kf as aN,Ue as aO,Xe as aP,Ve as aQ,_e as aR,ry as aS,kl as aT,yt as aU,Mo as aV,cn as aW,E8 as aX,Ie as aY,O3e as aZ,ZR as a_,Ua as aa,nj as ab,gr as ac,za as ad,b0 as ae,FA as af,sCe as ag,TA as ah,Ph as ai,Aj as aj,nu as ak,hs as al,Na as am,du as an,lr as ao,bCe as ap,oCe as aq,tCe as ar,Ks as as,mp as at,tv as au,hj as av,Be as aw,Z as ax,ke as ay,cl as az,MB as b,G3e as b$,Kt as b0,Qg as b1,Ct as b2,At as b3,g3e as b4,oce as b5,n5e as b6,K_e as b7,eu as b8,Er as b9,dce as bA,P_e as bB,vn as bC,a3e as bD,B_e as bE,yh as bF,$a as bG,Ge as bH,ne as bI,oe as bJ,q as bK,Qu as bL,ye as bM,hl as bN,fl as bO,D as bP,L_e as bQ,q_e as bR,Ft as bS,Te as bT,zt as bU,Pt as bV,D_e as bW,V_e as bX,zs as bY,b3e as bZ,Sm as b_,Se as ba,Hc as bb,Ze as bc,ee as bd,En as be,je as bf,Xt as bg,Lh as bh,Ln as bi,Sn as bj,Me as bk,ot as bl,it as bm,Ye as bn,p5 as bo,C2 as bp,Jt as bq,Pi as br,VN as bs,Re as bt,Xce as bu,cx as bv,qr as bw,Ug as bx,Et as by,l_e as bz,So as c,F_e as c0,_2 as c1,AS as c2,vS as c3,H_e as c4,W_e as c5,mt as c6,js as c7,bn as c8,T_e as c9,d_e as ca,R_e as cb,ph as d,X6 as e,Ow as f,he as g,yg as h,K$ as i,Ws as j,Nr as k,UCe as l,Ba as m,jN as n,mCe as o,sr as p,fCe as q,kB as r,ki as s,Uo as t,FB as u,c_e as v,lCe as w,yCe as x,dCe as y,TF as z};

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.