@dcl-regenesislabs/mobile-hub 1.0.0-20758375146.commit-52c1b5b → 1.0.0-20758790161.commit-e4ff21c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{r as ga,c as ft,g as tn,b as Fn,a as N0}from"./index-DZdhdqWs.js";function O0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const l in n)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(n,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>n[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ri={},gr={},yr={},Ka;function F0(){if(Ka)return yr;Ka=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.walletLogo=void 0;const e=(t,r)=>{let n;switch(t){case"standard":return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return n=r,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${r}' height='${n}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return yr.walletLogo=e,yr}var mr={},Qa;function q0(){return Qa||(Qa=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.LINK_API_URL=void 0,mr.LINK_API_URL="https://www.walletlink.org"),mr}var ae={},Pn={exports:{}},D0=Pn.exports,Ya;function qn(){return Ya||(Ya=1,(function(e){(function(t,r){function n(q,y){if(!q)throw new Error(y||"Assertion failed")}function l(q,y){q.super_=y;var S=function(){};S.prototype=y.prototype,q.prototype=new S,q.prototype.constructor=q}function i(q,y,S){if(i.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((y==="le"||y==="be")&&(S=y,y=10),this._init(q||0,y||10,S||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ga.Buffer}catch{}i.isBN=function(y){return y instanceof i?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===i.wordSize&&Array.isArray(y.words)},i.max=function(y,S){return y.cmp(S)>0?y:S},i.min=function(y,S){return y.cmp(S)<0?y:S},i.prototype._init=function(y,S,C){if(typeof y=="number")return this._initNumber(y,S,C);if(typeof y=="object")return this._initArray(y,S,C);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),y=y.toString().replace(/\s+/g,"");var M=0;y[0]==="-"&&(M++,this.negative=1),M<y.length&&(S===16?this._parseHex(y,M,C):(this._parseBase(y,S,M),C==="le"&&this._initArray(this.toArray(),S,C)))},i.prototype._initNumber=function(y,S,C){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(n(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),S,C)},i.prototype._initArray=function(y,S,C){if(n(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var x,L,j=0;if(C==="be")for(M=y.length-1,x=0;M>=0;M-=3)L=y[M]|y[M-1]<<8|y[M-2]<<16,this.words[x]|=L<<j&67108863,this.words[x+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,x++);else if(C==="le")for(M=0,x=0;M<y.length;M+=3)L=y[M]|y[M+1]<<8|y[M+2]<<16,this.words[x]|=L<<j&67108863,this.words[x+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,x++);return this._strip()};function a(q,y){var S=q.charCodeAt(y);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+q)}function d(q,y,S){var C=a(q,S);return S-1>=y&&(C|=a(q,S-1)<<4),C}i.prototype._parseHex=function(y,S,C){this.length=Math.ceil((y.length-S)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var x=0,L=0,j;if(C==="be")for(M=y.length-1;M>=S;M-=2)j=d(y,S,M)<<x,this.words[L]|=j&67108863,x>=18?(x-=18,L+=1,this.words[L]|=j>>>26):x+=8;else{var T=y.length-S;for(M=T%2===0?S+1:S;M<y.length;M+=2)j=d(y,S,M)<<x,this.words[L]|=j&67108863,x>=18?(x-=18,L+=1,this.words[L]|=j>>>26):x+=8}this._strip()};function u(q,y,S,C){for(var M=0,x=0,L=Math.min(q.length,S),j=y;j<L;j++){var T=q.charCodeAt(j)-48;M*=C,T>=49?x=T-49+10:T>=17?x=T-17+10:x=T,n(T>=0&&x<C,"Invalid character"),M+=x}return M}i.prototype._parseBase=function(y,S,C){this.words=[0],this.length=1;for(var M=0,x=1;x<=67108863;x*=S)M++;M--,x=x/S|0;for(var L=y.length-C,j=L%M,T=Math.min(L,L-j)+C,E=0,N=C;N<T;N+=M)E=u(y,N,N+M,S),this.imuln(x),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(j!==0){var te=1;for(E=u(y,N,y.length,S),N=0;N<j;N++)te*=S;this.imuln(te),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},i.prototype.copy=function(y){y.words=new Array(this.length);for(var S=0;S<this.length;S++)y.words[S]=this.words[S];y.length=this.length,y.negative=this.negative,y.red=this.red};function p(q,y){q.words=y.words,q.length=y.length,q.negative=y.negative,q.red=y.red}if(i.prototype._move=function(y){p(y,this)},i.prototype.clone=function(){var y=new i(null);return this.copy(y),y},i.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch{i.prototype.inspect=s}else i.prototype.inspect=s;function s(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(y,S){y=y||10,S=S|0||1;var C;if(y===16||y==="hex"){C="";for(var M=0,x=0,L=0;L<this.length;L++){var j=this.words[L],T=((j<<M|x)&16777215).toString(16);x=j>>>24-M&16777215,M+=2,M>=26&&(M-=26,L--),x!==0||L!==this.length-1?C=f[6-T.length]+T+C:C=T+C}for(x!==0&&(C=x.toString(16)+C);C.length%S!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(y===(y|0)&&y>=2&&y<=36){var E=c[y],N=g[y];C="";var te=this.clone();for(te.negative=0;!te.isZero();){var Y=te.modrn(N).toString(y);te=te.idivn(N),te.isZero()?C=Y+C:C=f[E-Y.length]+Y+C}for(this.isZero()&&(C="0"+C);C.length%S!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(y,S){return this.toArrayLike(o,y,S)}),i.prototype.toArray=function(y,S){return this.toArrayLike(Array,y,S)};var _=function(y,S){return y.allocUnsafe?y.allocUnsafe(S):new y(S)};i.prototype.toArrayLike=function(y,S,C){this._strip();var M=this.byteLength(),x=C||Math.max(1,M);n(M<=x,"byte array longer than desired length"),n(x>0,"Requested array length <= 0");var L=_(y,x),j=S==="le"?"LE":"BE";return this["_toArrayLike"+j](L,M),L},i.prototype._toArrayLikeLE=function(y,S){for(var C=0,M=0,x=0,L=0;x<this.length;x++){var j=this.words[x]<<L|M;y[C++]=j&255,C<y.length&&(y[C++]=j>>8&255),C<y.length&&(y[C++]=j>>16&255),L===6?(C<y.length&&(y[C++]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C<y.length)for(y[C++]=M;C<y.length;)y[C++]=0},i.prototype._toArrayLikeBE=function(y,S){for(var C=y.length-1,M=0,x=0,L=0;x<this.length;x++){var j=this.words[x]<<L|M;y[C--]=j&255,C>=0&&(y[C--]=j>>8&255),C>=0&&(y[C--]=j>>16&255),L===6?(C>=0&&(y[C--]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C>=0)for(y[C--]=M;C>=0;)y[C--]=0},Math.clz32?i.prototype._countBits=function(y){return 32-Math.clz32(y)}:i.prototype._countBits=function(y){var S=y,C=0;return S>=4096&&(C+=13,S>>>=13),S>=64&&(C+=7,S>>>=7),S>=8&&(C+=4,S>>>=4),S>=2&&(C+=2,S>>>=2),C+S},i.prototype._zeroBits=function(y){if(y===0)return 26;var S=y,C=0;return(S&8191)===0&&(C+=13,S>>>=13),(S&127)===0&&(C+=7,S>>>=7),(S&15)===0&&(C+=4,S>>>=4),(S&3)===0&&(C+=2,S>>>=2),(S&1)===0&&C++,C},i.prototype.bitLength=function(){var y=this.words[this.length-1],S=this._countBits(y);return(this.length-1)*26+S};function m(q){for(var y=new Array(q.bitLength()),S=0;S<y.length;S++){var C=S/26|0,M=S%26;y[S]=q.words[C]>>>M&1}return y}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,S=0;S<this.length;S++){var C=this._zeroBits(this.words[S]);if(y+=C,C!==26)break}return y},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},i.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var S=0;S<y.length;S++)this.words[S]=this.words[S]|y.words[S];return this._strip()},i.prototype.ior=function(y){return n((this.negative|y.negative)===0),this.iuor(y)},i.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},i.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},i.prototype.iuand=function(y){var S;this.length>y.length?S=y:S=this;for(var C=0;C<S.length;C++)this.words[C]=this.words[C]&y.words[C];return this.length=S.length,this._strip()},i.prototype.iand=function(y){return n((this.negative|y.negative)===0),this.iuand(y)},i.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},i.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},i.prototype.iuxor=function(y){var S,C;this.length>y.length?(S=this,C=y):(S=y,C=this);for(var M=0;M<C.length;M++)this.words[M]=S.words[M]^C.words[M];if(this!==S)for(;M<S.length;M++)this.words[M]=S.words[M];return this.length=S.length,this._strip()},i.prototype.ixor=function(y){return n((this.negative|y.negative)===0),this.iuxor(y)},i.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},i.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},i.prototype.inotn=function(y){n(typeof y=="number"&&y>=0);var S=Math.ceil(y/26)|0,C=y%26;this._expand(S),C>0&&S--;for(var M=0;M<S;M++)this.words[M]=~this.words[M]&67108863;return C>0&&(this.words[M]=~this.words[M]&67108863>>26-C),this._strip()},i.prototype.notn=function(y){return this.clone().inotn(y)},i.prototype.setn=function(y,S){n(typeof y=="number"&&y>=0);var C=y/26|0,M=y%26;return this._expand(C+1),S?this.words[C]=this.words[C]|1<<M:this.words[C]=this.words[C]&~(1<<M),this._strip()},i.prototype.iadd=function(y){var S;if(this.negative!==0&&y.negative===0)return this.negative=0,S=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,S=this.isub(y),y.negative=1,S._normSign();var C,M;this.length>y.length?(C=this,M=y):(C=y,M=this);for(var x=0,L=0;L<M.length;L++)S=(C.words[L]|0)+(M.words[L]|0)+x,this.words[L]=S&67108863,x=S>>>26;for(;x!==0&&L<C.length;L++)S=(C.words[L]|0)+x,this.words[L]=S&67108863,x=S>>>26;if(this.length=C.length,x!==0)this.words[this.length]=x,this.length++;else if(C!==this)for(;L<C.length;L++)this.words[L]=C.words[L];return this},i.prototype.add=function(y){var S;return y.negative!==0&&this.negative===0?(y.negative=0,S=this.sub(y),y.negative^=1,S):y.negative===0&&this.negative!==0?(this.negative=0,S=y.sub(this),this.negative=1,S):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},i.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var S=this.iadd(y);return y.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var C=this.cmp(y);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,x;C>0?(M=this,x=y):(M=y,x=this);for(var L=0,j=0;j<x.length;j++)S=(M.words[j]|0)-(x.words[j]|0)+L,L=S>>26,this.words[j]=S&67108863;for(;L!==0&&j<M.length;j++)S=(M.words[j]|0)+L,L=S>>26,this.words[j]=S&67108863;if(L===0&&j<M.length&&M!==this)for(;j<M.length;j++)this.words[j]=M.words[j];return this.length=Math.max(this.length,j),M!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(y){return this.clone().isub(y)};function h(q,y,S){S.negative=y.negative^q.negative;var C=q.length+y.length|0;S.length=C,C=C-1|0;var M=q.words[0]|0,x=y.words[0]|0,L=M*x,j=L&67108863,T=L/67108864|0;S.words[0]=j;for(var E=1;E<C;E++){for(var N=T>>>26,te=T&67108863,Y=Math.min(E,y.length-1),U=Math.max(0,E-q.length+1);U<=Y;U++){var $=E-U|0;M=q.words[$]|0,x=y.words[U]|0,L=M*x+te,N+=L/67108864|0,te=L&67108863}S.words[E]=te|0,T=N|0}return T!==0?S.words[E]=T|0:S.length--,S._strip()}var b=function(y,S,C){var M=y.words,x=S.words,L=C.words,j=0,T,E,N,te=M[0]|0,Y=te&8191,U=te>>>13,$=M[1]|0,G=$&8191,X=$>>>13,ne=M[2]|0,P=ne&8191,B=ne>>>13,Z=M[3]|0,K=Z&8191,oe=Z>>>13,ie=M[4]|0,se=ie&8191,de=ie>>>13,He=M[5]|0,ge=He&8191,ue=He>>>13,me=M[6]|0,pe=me&8191,ye=me>>>13,$e=M[7]|0,ve=$e&8191,k=$e>>>13,v=M[8]|0,R=v&8191,O=v>>>13,H=M[9]|0,V=H&8191,z=H>>>13,he=x[0]|0,fe=he&8191,le=he>>>13,be=x[1]|0,ce=be&8191,Se=be>>>13,Xt=x[2]|0,Re=Xt&8191,Ce=Xt>>>13,er=x[3]|0,Me=er&8191,ke=er>>>13,tr=x[4]|0,Ie=tr&8191,xe=tr>>>13,rr=x[5]|0,Ae=rr&8191,Te=rr>>>13,nr=x[6]|0,Pe=nr&8191,Be=nr>>>13,ir=x[7]|0,Le=ir&8191,Ne=ir>>>13,sr=x[8]|0,Oe=sr&8191,Fe=sr>>>13,or=x[9]|0,qe=or&8191,De=or>>>13;C.negative=y.negative^S.negative,C.length=19,T=Math.imul(Y,fe),E=Math.imul(Y,le),E=E+Math.imul(U,fe)|0,N=Math.imul(U,le);var dt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(dt>>>26)|0,dt&=67108863,T=Math.imul(G,fe),E=Math.imul(G,le),E=E+Math.imul(X,fe)|0,N=Math.imul(X,le),T=T+Math.imul(Y,ce)|0,E=E+Math.imul(Y,Se)|0,E=E+Math.imul(U,ce)|0,N=N+Math.imul(U,Se)|0;var pt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(pt>>>26)|0,pt&=67108863,T=Math.imul(P,fe),E=Math.imul(P,le),E=E+Math.imul(B,fe)|0,N=Math.imul(B,le),T=T+Math.imul(G,ce)|0,E=E+Math.imul(G,Se)|0,E=E+Math.imul(X,ce)|0,N=N+Math.imul(X,Se)|0,T=T+Math.imul(Y,Re)|0,E=E+Math.imul(Y,Ce)|0,E=E+Math.imul(U,Re)|0,N=N+Math.imul(U,Ce)|0;var gt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(gt>>>26)|0,gt&=67108863,T=Math.imul(K,fe),E=Math.imul(K,le),E=E+Math.imul(oe,fe)|0,N=Math.imul(oe,le),T=T+Math.imul(P,ce)|0,E=E+Math.imul(P,Se)|0,E=E+Math.imul(B,ce)|0,N=N+Math.imul(B,Se)|0,T=T+Math.imul(G,Re)|0,E=E+Math.imul(G,Ce)|0,E=E+Math.imul(X,Re)|0,N=N+Math.imul(X,Ce)|0,T=T+Math.imul(Y,Me)|0,E=E+Math.imul(Y,ke)|0,E=E+Math.imul(U,Me)|0,N=N+Math.imul(U,ke)|0;var yt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(yt>>>26)|0,yt&=67108863,T=Math.imul(se,fe),E=Math.imul(se,le),E=E+Math.imul(de,fe)|0,N=Math.imul(de,le),T=T+Math.imul(K,ce)|0,E=E+Math.imul(K,Se)|0,E=E+Math.imul(oe,ce)|0,N=N+Math.imul(oe,Se)|0,T=T+Math.imul(P,Re)|0,E=E+Math.imul(P,Ce)|0,E=E+Math.imul(B,Re)|0,N=N+Math.imul(B,Ce)|0,T=T+Math.imul(G,Me)|0,E=E+Math.imul(G,ke)|0,E=E+Math.imul(X,Me)|0,N=N+Math.imul(X,ke)|0,T=T+Math.imul(Y,Ie)|0,E=E+Math.imul(Y,xe)|0,E=E+Math.imul(U,Ie)|0,N=N+Math.imul(U,xe)|0;var mt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(mt>>>26)|0,mt&=67108863,T=Math.imul(ge,fe),E=Math.imul(ge,le),E=E+Math.imul(ue,fe)|0,N=Math.imul(ue,le),T=T+Math.imul(se,ce)|0,E=E+Math.imul(se,Se)|0,E=E+Math.imul(de,ce)|0,N=N+Math.imul(de,Se)|0,T=T+Math.imul(K,Re)|0,E=E+Math.imul(K,Ce)|0,E=E+Math.imul(oe,Re)|0,N=N+Math.imul(oe,Ce)|0,T=T+Math.imul(P,Me)|0,E=E+Math.imul(P,ke)|0,E=E+Math.imul(B,Me)|0,N=N+Math.imul(B,ke)|0,T=T+Math.imul(G,Ie)|0,E=E+Math.imul(G,xe)|0,E=E+Math.imul(X,Ie)|0,N=N+Math.imul(X,xe)|0,T=T+Math.imul(Y,Ae)|0,E=E+Math.imul(Y,Te)|0,E=E+Math.imul(U,Ae)|0,N=N+Math.imul(U,Te)|0;var _t=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(_t>>>26)|0,_t&=67108863,T=Math.imul(pe,fe),E=Math.imul(pe,le),E=E+Math.imul(ye,fe)|0,N=Math.imul(ye,le),T=T+Math.imul(ge,ce)|0,E=E+Math.imul(ge,Se)|0,E=E+Math.imul(ue,ce)|0,N=N+Math.imul(ue,Se)|0,T=T+Math.imul(se,Re)|0,E=E+Math.imul(se,Ce)|0,E=E+Math.imul(de,Re)|0,N=N+Math.imul(de,Ce)|0,T=T+Math.imul(K,Me)|0,E=E+Math.imul(K,ke)|0,E=E+Math.imul(oe,Me)|0,N=N+Math.imul(oe,ke)|0,T=T+Math.imul(P,Ie)|0,E=E+Math.imul(P,xe)|0,E=E+Math.imul(B,Ie)|0,N=N+Math.imul(B,xe)|0,T=T+Math.imul(G,Ae)|0,E=E+Math.imul(G,Te)|0,E=E+Math.imul(X,Ae)|0,N=N+Math.imul(X,Te)|0,T=T+Math.imul(Y,Pe)|0,E=E+Math.imul(Y,Be)|0,E=E+Math.imul(U,Pe)|0,N=N+Math.imul(U,Be)|0;var vt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(vt>>>26)|0,vt&=67108863,T=Math.imul(ve,fe),E=Math.imul(ve,le),E=E+Math.imul(k,fe)|0,N=Math.imul(k,le),T=T+Math.imul(pe,ce)|0,E=E+Math.imul(pe,Se)|0,E=E+Math.imul(ye,ce)|0,N=N+Math.imul(ye,Se)|0,T=T+Math.imul(ge,Re)|0,E=E+Math.imul(ge,Ce)|0,E=E+Math.imul(ue,Re)|0,N=N+Math.imul(ue,Ce)|0,T=T+Math.imul(se,Me)|0,E=E+Math.imul(se,ke)|0,E=E+Math.imul(de,Me)|0,N=N+Math.imul(de,ke)|0,T=T+Math.imul(K,Ie)|0,E=E+Math.imul(K,xe)|0,E=E+Math.imul(oe,Ie)|0,N=N+Math.imul(oe,xe)|0,T=T+Math.imul(P,Ae)|0,E=E+Math.imul(P,Te)|0,E=E+Math.imul(B,Ae)|0,N=N+Math.imul(B,Te)|0,T=T+Math.imul(G,Pe)|0,E=E+Math.imul(G,Be)|0,E=E+Math.imul(X,Pe)|0,N=N+Math.imul(X,Be)|0,T=T+Math.imul(Y,Le)|0,E=E+Math.imul(Y,Ne)|0,E=E+Math.imul(U,Le)|0,N=N+Math.imul(U,Ne)|0;var bt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(bt>>>26)|0,bt&=67108863,T=Math.imul(R,fe),E=Math.imul(R,le),E=E+Math.imul(O,fe)|0,N=Math.imul(O,le),T=T+Math.imul(ve,ce)|0,E=E+Math.imul(ve,Se)|0,E=E+Math.imul(k,ce)|0,N=N+Math.imul(k,Se)|0,T=T+Math.imul(pe,Re)|0,E=E+Math.imul(pe,Ce)|0,E=E+Math.imul(ye,Re)|0,N=N+Math.imul(ye,Ce)|0,T=T+Math.imul(ge,Me)|0,E=E+Math.imul(ge,ke)|0,E=E+Math.imul(ue,Me)|0,N=N+Math.imul(ue,ke)|0,T=T+Math.imul(se,Ie)|0,E=E+Math.imul(se,xe)|0,E=E+Math.imul(de,Ie)|0,N=N+Math.imul(de,xe)|0,T=T+Math.imul(K,Ae)|0,E=E+Math.imul(K,Te)|0,E=E+Math.imul(oe,Ae)|0,N=N+Math.imul(oe,Te)|0,T=T+Math.imul(P,Pe)|0,E=E+Math.imul(P,Be)|0,E=E+Math.imul(B,Pe)|0,N=N+Math.imul(B,Be)|0,T=T+Math.imul(G,Le)|0,E=E+Math.imul(G,Ne)|0,E=E+Math.imul(X,Le)|0,N=N+Math.imul(X,Ne)|0,T=T+Math.imul(Y,Oe)|0,E=E+Math.imul(Y,Fe)|0,E=E+Math.imul(U,Oe)|0,N=N+Math.imul(U,Fe)|0;var wt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(wt>>>26)|0,wt&=67108863,T=Math.imul(V,fe),E=Math.imul(V,le),E=E+Math.imul(z,fe)|0,N=Math.imul(z,le),T=T+Math.imul(R,ce)|0,E=E+Math.imul(R,Se)|0,E=E+Math.imul(O,ce)|0,N=N+Math.imul(O,Se)|0,T=T+Math.imul(ve,Re)|0,E=E+Math.imul(ve,Ce)|0,E=E+Math.imul(k,Re)|0,N=N+Math.imul(k,Ce)|0,T=T+Math.imul(pe,Me)|0,E=E+Math.imul(pe,ke)|0,E=E+Math.imul(ye,Me)|0,N=N+Math.imul(ye,ke)|0,T=T+Math.imul(ge,Ie)|0,E=E+Math.imul(ge,xe)|0,E=E+Math.imul(ue,Ie)|0,N=N+Math.imul(ue,xe)|0,T=T+Math.imul(se,Ae)|0,E=E+Math.imul(se,Te)|0,E=E+Math.imul(de,Ae)|0,N=N+Math.imul(de,Te)|0,T=T+Math.imul(K,Pe)|0,E=E+Math.imul(K,Be)|0,E=E+Math.imul(oe,Pe)|0,N=N+Math.imul(oe,Be)|0,T=T+Math.imul(P,Le)|0,E=E+Math.imul(P,Ne)|0,E=E+Math.imul(B,Le)|0,N=N+Math.imul(B,Ne)|0,T=T+Math.imul(G,Oe)|0,E=E+Math.imul(G,Fe)|0,E=E+Math.imul(X,Oe)|0,N=N+Math.imul(X,Fe)|0,T=T+Math.imul(Y,qe)|0,E=E+Math.imul(Y,De)|0,E=E+Math.imul(U,qe)|0,N=N+Math.imul(U,De)|0;var Et=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Et>>>26)|0,Et&=67108863,T=Math.imul(V,ce),E=Math.imul(V,Se),E=E+Math.imul(z,ce)|0,N=Math.imul(z,Se),T=T+Math.imul(R,Re)|0,E=E+Math.imul(R,Ce)|0,E=E+Math.imul(O,Re)|0,N=N+Math.imul(O,Ce)|0,T=T+Math.imul(ve,Me)|0,E=E+Math.imul(ve,ke)|0,E=E+Math.imul(k,Me)|0,N=N+Math.imul(k,ke)|0,T=T+Math.imul(pe,Ie)|0,E=E+Math.imul(pe,xe)|0,E=E+Math.imul(ye,Ie)|0,N=N+Math.imul(ye,xe)|0,T=T+Math.imul(ge,Ae)|0,E=E+Math.imul(ge,Te)|0,E=E+Math.imul(ue,Ae)|0,N=N+Math.imul(ue,Te)|0,T=T+Math.imul(se,Pe)|0,E=E+Math.imul(se,Be)|0,E=E+Math.imul(de,Pe)|0,N=N+Math.imul(de,Be)|0,T=T+Math.imul(K,Le)|0,E=E+Math.imul(K,Ne)|0,E=E+Math.imul(oe,Le)|0,N=N+Math.imul(oe,Ne)|0,T=T+Math.imul(P,Oe)|0,E=E+Math.imul(P,Fe)|0,E=E+Math.imul(B,Oe)|0,N=N+Math.imul(B,Fe)|0,T=T+Math.imul(G,qe)|0,E=E+Math.imul(G,De)|0,E=E+Math.imul(X,qe)|0,N=N+Math.imul(X,De)|0;var St=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(St>>>26)|0,St&=67108863,T=Math.imul(V,Re),E=Math.imul(V,Ce),E=E+Math.imul(z,Re)|0,N=Math.imul(z,Ce),T=T+Math.imul(R,Me)|0,E=E+Math.imul(R,ke)|0,E=E+Math.imul(O,Me)|0,N=N+Math.imul(O,ke)|0,T=T+Math.imul(ve,Ie)|0,E=E+Math.imul(ve,xe)|0,E=E+Math.imul(k,Ie)|0,N=N+Math.imul(k,xe)|0,T=T+Math.imul(pe,Ae)|0,E=E+Math.imul(pe,Te)|0,E=E+Math.imul(ye,Ae)|0,N=N+Math.imul(ye,Te)|0,T=T+Math.imul(ge,Pe)|0,E=E+Math.imul(ge,Be)|0,E=E+Math.imul(ue,Pe)|0,N=N+Math.imul(ue,Be)|0,T=T+Math.imul(se,Le)|0,E=E+Math.imul(se,Ne)|0,E=E+Math.imul(de,Le)|0,N=N+Math.imul(de,Ne)|0,T=T+Math.imul(K,Oe)|0,E=E+Math.imul(K,Fe)|0,E=E+Math.imul(oe,Oe)|0,N=N+Math.imul(oe,Fe)|0,T=T+Math.imul(P,qe)|0,E=E+Math.imul(P,De)|0,E=E+Math.imul(B,qe)|0,N=N+Math.imul(B,De)|0;var Rt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,T=Math.imul(V,Me),E=Math.imul(V,ke),E=E+Math.imul(z,Me)|0,N=Math.imul(z,ke),T=T+Math.imul(R,Ie)|0,E=E+Math.imul(R,xe)|0,E=E+Math.imul(O,Ie)|0,N=N+Math.imul(O,xe)|0,T=T+Math.imul(ve,Ae)|0,E=E+Math.imul(ve,Te)|0,E=E+Math.imul(k,Ae)|0,N=N+Math.imul(k,Te)|0,T=T+Math.imul(pe,Pe)|0,E=E+Math.imul(pe,Be)|0,E=E+Math.imul(ye,Pe)|0,N=N+Math.imul(ye,Be)|0,T=T+Math.imul(ge,Le)|0,E=E+Math.imul(ge,Ne)|0,E=E+Math.imul(ue,Le)|0,N=N+Math.imul(ue,Ne)|0,T=T+Math.imul(se,Oe)|0,E=E+Math.imul(se,Fe)|0,E=E+Math.imul(de,Oe)|0,N=N+Math.imul(de,Fe)|0,T=T+Math.imul(K,qe)|0,E=E+Math.imul(K,De)|0,E=E+Math.imul(oe,qe)|0,N=N+Math.imul(oe,De)|0;var Ct=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,T=Math.imul(V,Ie),E=Math.imul(V,xe),E=E+Math.imul(z,Ie)|0,N=Math.imul(z,xe),T=T+Math.imul(R,Ae)|0,E=E+Math.imul(R,Te)|0,E=E+Math.imul(O,Ae)|0,N=N+Math.imul(O,Te)|0,T=T+Math.imul(ve,Pe)|0,E=E+Math.imul(ve,Be)|0,E=E+Math.imul(k,Pe)|0,N=N+Math.imul(k,Be)|0,T=T+Math.imul(pe,Le)|0,E=E+Math.imul(pe,Ne)|0,E=E+Math.imul(ye,Le)|0,N=N+Math.imul(ye,Ne)|0,T=T+Math.imul(ge,Oe)|0,E=E+Math.imul(ge,Fe)|0,E=E+Math.imul(ue,Oe)|0,N=N+Math.imul(ue,Fe)|0,T=T+Math.imul(se,qe)|0,E=E+Math.imul(se,De)|0,E=E+Math.imul(de,qe)|0,N=N+Math.imul(de,De)|0;var Mt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,T=Math.imul(V,Ae),E=Math.imul(V,Te),E=E+Math.imul(z,Ae)|0,N=Math.imul(z,Te),T=T+Math.imul(R,Pe)|0,E=E+Math.imul(R,Be)|0,E=E+Math.imul(O,Pe)|0,N=N+Math.imul(O,Be)|0,T=T+Math.imul(ve,Le)|0,E=E+Math.imul(ve,Ne)|0,E=E+Math.imul(k,Le)|0,N=N+Math.imul(k,Ne)|0,T=T+Math.imul(pe,Oe)|0,E=E+Math.imul(pe,Fe)|0,E=E+Math.imul(ye,Oe)|0,N=N+Math.imul(ye,Fe)|0,T=T+Math.imul(ge,qe)|0,E=E+Math.imul(ge,De)|0,E=E+Math.imul(ue,qe)|0,N=N+Math.imul(ue,De)|0;var kt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(kt>>>26)|0,kt&=67108863,T=Math.imul(V,Pe),E=Math.imul(V,Be),E=E+Math.imul(z,Pe)|0,N=Math.imul(z,Be),T=T+Math.imul(R,Le)|0,E=E+Math.imul(R,Ne)|0,E=E+Math.imul(O,Le)|0,N=N+Math.imul(O,Ne)|0,T=T+Math.imul(ve,Oe)|0,E=E+Math.imul(ve,Fe)|0,E=E+Math.imul(k,Oe)|0,N=N+Math.imul(k,Fe)|0,T=T+Math.imul(pe,qe)|0,E=E+Math.imul(pe,De)|0,E=E+Math.imul(ye,qe)|0,N=N+Math.imul(ye,De)|0;var Yn=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,T=Math.imul(V,Le),E=Math.imul(V,Ne),E=E+Math.imul(z,Le)|0,N=Math.imul(z,Ne),T=T+Math.imul(R,Oe)|0,E=E+Math.imul(R,Fe)|0,E=E+Math.imul(O,Oe)|0,N=N+Math.imul(O,Fe)|0,T=T+Math.imul(ve,qe)|0,E=E+Math.imul(ve,De)|0,E=E+Math.imul(k,qe)|0,N=N+Math.imul(k,De)|0;var Xn=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,T=Math.imul(V,Oe),E=Math.imul(V,Fe),E=E+Math.imul(z,Oe)|0,N=Math.imul(z,Fe),T=T+Math.imul(R,qe)|0,E=E+Math.imul(R,De)|0,E=E+Math.imul(O,qe)|0,N=N+Math.imul(O,De)|0;var ei=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(ei>>>26)|0,ei&=67108863,T=Math.imul(V,qe),E=Math.imul(V,De),E=E+Math.imul(z,qe)|0,N=Math.imul(z,De);var ti=(j+T|0)+((E&8191)<<13)|0;return j=(N+(E>>>13)|0)+(ti>>>26)|0,ti&=67108863,L[0]=dt,L[1]=pt,L[2]=gt,L[3]=yt,L[4]=mt,L[5]=_t,L[6]=vt,L[7]=bt,L[8]=wt,L[9]=Et,L[10]=St,L[11]=Rt,L[12]=Ct,L[13]=Mt,L[14]=kt,L[15]=Yn,L[16]=Xn,L[17]=ei,L[18]=ti,j!==0&&(L[19]=j,C.length++),C};Math.imul||(b=h);function w(q,y,S){S.negative=y.negative^q.negative,S.length=q.length+y.length;for(var C=0,M=0,x=0;x<S.length-1;x++){var L=M;M=0;for(var j=C&67108863,T=Math.min(x,y.length-1),E=Math.max(0,x-q.length+1);E<=T;E++){var N=x-E,te=q.words[N]|0,Y=y.words[E]|0,U=te*Y,$=U&67108863;L=L+(U/67108864|0)|0,$=$+j|0,j=$&67108863,L=L+($>>>26)|0,M+=L>>>26,L&=67108863}S.words[x]=j,C=L,L=M}return C!==0?S.words[x]=C:S.length--,S._strip()}function I(q,y,S){return w(q,y,S)}i.prototype.mulTo=function(y,S){var C,M=this.length+y.length;return this.length===10&&y.length===10?C=b(this,y,S):M<63?C=h(this,y,S):M<1024?C=w(this,y,S):C=I(this,y,S),C},i.prototype.mul=function(y){var S=new i(null);return S.words=new Array(this.length+y.length),this.mulTo(y,S)},i.prototype.mulf=function(y){var S=new i(null);return S.words=new Array(this.length+y.length),I(this,y,S)},i.prototype.imul=function(y){return this.clone().mulTo(y,this)},i.prototype.imuln=function(y){var S=y<0;S&&(y=-y),n(typeof y=="number"),n(y<67108864);for(var C=0,M=0;M<this.length;M++){var x=(this.words[M]|0)*y,L=(x&67108863)+(C&67108863);C>>=26,C+=x/67108864|0,C+=L>>>26,this.words[M]=L&67108863}return C!==0&&(this.words[M]=C,this.length++),this.length=y===0?1:this.length,S?this.ineg():this},i.prototype.muln=function(y){return this.clone().imuln(y)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(y){var S=m(y);if(S.length===0)return new i(1);for(var C=this,M=0;M<S.length&&S[M]===0;M++,C=C.sqr());if(++M<S.length)for(var x=C.sqr();M<S.length;M++,x=x.sqr())S[M]!==0&&(C=C.mul(x));return C},i.prototype.iushln=function(y){n(typeof y=="number"&&y>=0);var S=y%26,C=(y-S)/26,M=67108863>>>26-S<<26-S,x;if(S!==0){var L=0;for(x=0;x<this.length;x++){var j=this.words[x]&M,T=(this.words[x]|0)-j<<S;this.words[x]=T|L,L=j>>>26-S}L&&(this.words[x]=L,this.length++)}if(C!==0){for(x=this.length-1;x>=0;x--)this.words[x+C]=this.words[x];for(x=0;x<C;x++)this.words[x]=0;this.length+=C}return this._strip()},i.prototype.ishln=function(y){return n(this.negative===0),this.iushln(y)},i.prototype.iushrn=function(y,S,C){n(typeof y=="number"&&y>=0);var M;S?M=(S-S%26)/26:M=0;var x=y%26,L=Math.min((y-x)/26,this.length),j=67108863^67108863>>>x<<x,T=C;if(M-=L,M=Math.max(0,M),T){for(var E=0;E<L;E++)T.words[E]=this.words[E];T.length=L}if(L!==0)if(this.length>L)for(this.length-=L,E=0;E<this.length;E++)this.words[E]=this.words[E+L];else this.words[0]=0,this.length=1;var N=0;for(E=this.length-1;E>=0&&(N!==0||E>=M);E--){var te=this.words[E]|0;this.words[E]=N<<26-x|te>>>x,N=te&j}return T&&N!==0&&(T.words[T.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(y,S,C){return n(this.negative===0),this.iushrn(y,S,C)},i.prototype.shln=function(y){return this.clone().ishln(y)},i.prototype.ushln=function(y){return this.clone().iushln(y)},i.prototype.shrn=function(y){return this.clone().ishrn(y)},i.prototype.ushrn=function(y){return this.clone().iushrn(y)},i.prototype.testn=function(y){n(typeof y=="number"&&y>=0);var S=y%26,C=(y-S)/26,M=1<<S;if(this.length<=C)return!1;var x=this.words[C];return!!(x&M)},i.prototype.imaskn=function(y){n(typeof y=="number"&&y>=0);var S=y%26,C=(y-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(S!==0&&C++,this.length=Math.min(C,this.length),S!==0){var M=67108863^67108863>>>S<<S;this.words[this.length-1]&=M}return this._strip()},i.prototype.maskn=function(y){return this.clone().imaskn(y)},i.prototype.iaddn=function(y){return n(typeof y=="number"),n(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},i.prototype._iaddn=function(y){this.words[0]+=y;for(var S=0;S<this.length&&this.words[S]>=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(y){if(n(typeof y=="number"),n(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S<this.length&&this.words[S]<0;S++)this.words[S]+=67108864,this.words[S+1]-=1;return this._strip()},i.prototype.addn=function(y){return this.clone().iaddn(y)},i.prototype.subn=function(y){return this.clone().isubn(y)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(y,S,C){var M=y.length+C,x;this._expand(M);var L,j=0;for(x=0;x<y.length;x++){L=(this.words[x+C]|0)+j;var T=(y.words[x]|0)*S;L-=T&67108863,j=(L>>26)-(T/67108864|0),this.words[x+C]=L&67108863}for(;x<this.length-C;x++)L=(this.words[x+C]|0)+j,j=L>>26,this.words[x+C]=L&67108863;if(j===0)return this._strip();for(n(j===-1),j=0,x=0;x<this.length;x++)L=-(this.words[x]|0)+j,j=L>>26,this.words[x]=L&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(y,S){var C=this.length-y.length,M=this.clone(),x=y,L=x.words[x.length-1]|0,j=this._countBits(L);C=26-j,C!==0&&(x=x.ushln(C),M.iushln(C),L=x.words[x.length-1]|0);var T=M.length-x.length,E;if(S!=="mod"){E=new i(null),E.length=T+1,E.words=new Array(E.length);for(var N=0;N<E.length;N++)E.words[N]=0}var te=M.clone()._ishlnsubmul(x,1,T);te.negative===0&&(M=te,E&&(E.words[T]=1));for(var Y=T-1;Y>=0;Y--){var U=(M.words[x.length+Y]|0)*67108864+(M.words[x.length+Y-1]|0);for(U=Math.min(U/L|0,67108863),M._ishlnsubmul(x,U,Y);M.negative!==0;)U--,M.negative=0,M._ishlnsubmul(x,1,Y),M.isZero()||(M.negative^=1);E&&(E.words[Y]=U)}return E&&E._strip(),M._strip(),S!=="div"&&C!==0&&M.iushrn(C),{div:E||null,mod:M}},i.prototype.divmod=function(y,S,C){if(n(!y.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,x,L;return this.negative!==0&&y.negative===0?(L=this.neg().divmod(y,S),S!=="mod"&&(M=L.div.neg()),S!=="div"&&(x=L.mod.neg(),C&&x.negative!==0&&x.iadd(y)),{div:M,mod:x}):this.negative===0&&y.negative!==0?(L=this.divmod(y.neg(),S),S!=="mod"&&(M=L.div.neg()),{div:M,mod:L.mod}):(this.negative&y.negative)!==0?(L=this.neg().divmod(y.neg(),S),S!=="div"&&(x=L.mod.neg(),C&&x.negative!==0&&x.isub(y)),{div:L.div,mod:x}):y.length>this.length||this.cmp(y)<0?{div:new i(0),mod:this}:y.length===1?S==="div"?{div:this.divn(y.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new i(this.modrn(y.words[0]))}:this._wordDiv(y,S)},i.prototype.div=function(y){return this.divmod(y,"div",!1).div},i.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},i.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},i.prototype.divRound=function(y){var S=this.divmod(y);if(S.mod.isZero())return S.div;var C=S.div.negative!==0?S.mod.isub(y):S.mod,M=y.ushrn(1),x=y.andln(1),L=C.cmp(M);return L<0||x===1&&L===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(y){var S=y<0;S&&(y=-y),n(y<=67108863);for(var C=(1<<26)%y,M=0,x=this.length-1;x>=0;x--)M=(C*M+(this.words[x]|0))%y;return S?-M:M},i.prototype.modn=function(y){return this.modrn(y)},i.prototype.idivn=function(y){var S=y<0;S&&(y=-y),n(y<=67108863);for(var C=0,M=this.length-1;M>=0;M--){var x=(this.words[M]|0)+C*67108864;this.words[M]=x/y|0,C=x%y}return this._strip(),S?this.ineg():this},i.prototype.divn=function(y){return this.clone().idivn(y)},i.prototype.egcd=function(y){n(y.negative===0),n(!y.isZero());var S=this,C=y.clone();S.negative!==0?S=S.umod(y):S=S.clone();for(var M=new i(1),x=new i(0),L=new i(0),j=new i(1),T=0;S.isEven()&&C.isEven();)S.iushrn(1),C.iushrn(1),++T;for(var E=C.clone(),N=S.clone();!S.isZero();){for(var te=0,Y=1;(S.words[0]&Y)===0&&te<26;++te,Y<<=1);if(te>0)for(S.iushrn(te);te-- >0;)(M.isOdd()||x.isOdd())&&(M.iadd(E),x.isub(N)),M.iushrn(1),x.iushrn(1);for(var U=0,$=1;(C.words[0]&$)===0&&U<26;++U,$<<=1);if(U>0)for(C.iushrn(U);U-- >0;)(L.isOdd()||j.isOdd())&&(L.iadd(E),j.isub(N)),L.iushrn(1),j.iushrn(1);S.cmp(C)>=0?(S.isub(C),M.isub(L),x.isub(j)):(C.isub(S),L.isub(M),j.isub(x))}return{a:L,b:j,gcd:C.iushln(T)}},i.prototype._invmp=function(y){n(y.negative===0),n(!y.isZero());var S=this,C=y.clone();S.negative!==0?S=S.umod(y):S=S.clone();for(var M=new i(1),x=new i(0),L=C.clone();S.cmpn(1)>0&&C.cmpn(1)>0;){for(var j=0,T=1;(S.words[0]&T)===0&&j<26;++j,T<<=1);if(j>0)for(S.iushrn(j);j-- >0;)M.isOdd()&&M.iadd(L),M.iushrn(1);for(var E=0,N=1;(C.words[0]&N)===0&&E<26;++E,N<<=1);if(E>0)for(C.iushrn(E);E-- >0;)x.isOdd()&&x.iadd(L),x.iushrn(1);S.cmp(C)>=0?(S.isub(C),M.isub(x)):(C.isub(S),x.isub(M))}var te;return S.cmpn(1)===0?te=M:te=x,te.cmpn(0)<0&&te.iadd(y),te},i.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var S=this.clone(),C=y.clone();S.negative=0,C.negative=0;for(var M=0;S.isEven()&&C.isEven();M++)S.iushrn(1),C.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;C.isEven();)C.iushrn(1);var x=S.cmp(C);if(x<0){var L=S;S=C,C=L}else if(x===0||C.cmpn(1)===0)break;S.isub(C)}while(!0);return C.iushln(M)},i.prototype.invm=function(y){return this.egcd(y).a.umod(y)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(y){return this.words[0]&y},i.prototype.bincn=function(y){n(typeof y=="number");var S=y%26,C=(y-S)/26,M=1<<S;if(this.length<=C)return this._expand(C+1),this.words[C]|=M,this;for(var x=M,L=C;x!==0&&L<this.length;L++){var j=this.words[L]|0;j+=x,x=j>>>26,j&=67108863,this.words[L]=j}return x!==0&&(this.words[L]=x,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(y){var S=y<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var C;if(this.length>1)C=1;else{S&&(y=-y),n(y<=67108863,"Number is too big");var M=this.words[0]|0;C=M===y?0:M<y?-1:1}return this.negative!==0?-C|0:C},i.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return-1;if(this.negative===0&&y.negative!==0)return 1;var S=this.ucmp(y);return this.negative!==0?-S|0:S},i.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return-1;for(var S=0,C=this.length-1;C>=0;C--){var M=this.words[C]|0,x=y.words[C]|0;if(M!==x){M<x?S=-1:M>x&&(S=1);break}}return S},i.prototype.gtn=function(y){return this.cmpn(y)===1},i.prototype.gt=function(y){return this.cmp(y)===1},i.prototype.gten=function(y){return this.cmpn(y)>=0},i.prototype.gte=function(y){return this.cmp(y)>=0},i.prototype.ltn=function(y){return this.cmpn(y)===-1},i.prototype.lt=function(y){return this.cmp(y)===-1},i.prototype.lten=function(y){return this.cmpn(y)<=0},i.prototype.lte=function(y){return this.cmp(y)<=0},i.prototype.eqn=function(y){return this.cmpn(y)===0},i.prototype.eq=function(y){return this.cmp(y)===0},i.red=function(y){return new Q(y)},i.prototype.toRed=function(y){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(y){return this.red=y,this},i.prototype.forceRed=function(y){return n(!this.red,"Already a number in reduction context"),this._forceRed(y)},i.prototype.redAdd=function(y){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},i.prototype.redIAdd=function(y){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},i.prototype.redSub=function(y){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},i.prototype.redISub=function(y){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},i.prototype.redShl=function(y){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},i.prototype.redMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},i.prototype.redIMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(y){return n(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var A={k256:null,p224:null,p192:null,p25519:null};function D(q,y){this.name=q,this.p=new i(y,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var y=new i(null);return y.words=new Array(Math.ceil(this.n/13)),y},D.prototype.ireduce=function(y){var S=y,C;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),C=S.bitLength();while(C>this.n);var M=C<this.n?-1:S.ucmp(this.p);return M===0?(S.words[0]=0,S.length=1):M>0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},D.prototype.split=function(y,S){y.iushrn(this.n,0,S)},D.prototype.imulK=function(y){return y.imul(this.k)};function F(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}l(F,D),F.prototype.split=function(y,S){for(var C=4194303,M=Math.min(y.length,9),x=0;x<M;x++)S.words[x]=y.words[x];if(S.length=M,y.length<=9){y.words[0]=0,y.length=1;return}var L=y.words[9];for(S.words[S.length++]=L&C,x=10;x<y.length;x++){var j=y.words[x]|0;y.words[x-10]=(j&C)<<4|L>>>22,L=j}L>>>=22,y.words[x-10]=L,L===0&&y.length>10?y.length-=10:y.length-=9},F.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var S=0,C=0;C<y.length;C++){var M=y.words[C]|0;S+=M*977,y.words[C]=S&67108863,S=M*64+(S/67108864|0)}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function W(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}l(W,D);function J(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}l(J,D);function ee(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}l(ee,D),ee.prototype.imulK=function(y){for(var S=0,C=0;C<y.length;C++){var M=(y.words[C]|0)*19+S,x=M&67108863;M>>>=26,y.words[C]=x,S=M}return S!==0&&(y.words[y.length++]=S),y},i._prime=function(y){if(A[y])return A[y];var S;if(y==="k256")S=new F;else if(y==="p224")S=new W;else if(y==="p192")S=new J;else if(y==="p25519")S=new ee;else throw new Error("Unknown prime "+y);return A[y]=S,S};function Q(q){if(typeof q=="string"){var y=i._prime(q);this.m=y.p,this.prime=y}else n(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}Q.prototype._verify1=function(y){n(y.negative===0,"red works only with positives"),n(y.red,"red works only with red numbers")},Q.prototype._verify2=function(y,S){n((y.negative|S.negative)===0,"red works only with positives"),n(y.red&&y.red===S.red,"red works only with red numbers")},Q.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(p(y,y.umod(this.m)._forceRed(this)),y)},Q.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},Q.prototype.add=function(y,S){this._verify2(y,S);var C=y.add(S);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},Q.prototype.iadd=function(y,S){this._verify2(y,S);var C=y.iadd(S);return C.cmp(this.m)>=0&&C.isub(this.m),C},Q.prototype.sub=function(y,S){this._verify2(y,S);var C=y.sub(S);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},Q.prototype.isub=function(y,S){this._verify2(y,S);var C=y.isub(S);return C.cmpn(0)<0&&C.iadd(this.m),C},Q.prototype.shl=function(y,S){return this._verify1(y),this.imod(y.ushln(S))},Q.prototype.imul=function(y,S){return this._verify2(y,S),this.imod(y.imul(S))},Q.prototype.mul=function(y,S){return this._verify2(y,S),this.imod(y.mul(S))},Q.prototype.isqr=function(y){return this.imul(y,y.clone())},Q.prototype.sqr=function(y){return this.mul(y,y)},Q.prototype.sqrt=function(y){if(y.isZero())return y.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(y,C)}for(var M=this.m.subn(1),x=0;!M.isZero()&&M.andln(1)===0;)x++,M.iushrn(1);n(!M.isZero());var L=new i(1).toRed(this),j=L.redNeg(),T=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new i(2*E*E).toRed(this);this.pow(E,T).cmp(j)!==0;)E.redIAdd(j);for(var N=this.pow(E,M),te=this.pow(y,M.addn(1).iushrn(1)),Y=this.pow(y,M),U=x;Y.cmp(L)!==0;){for(var $=Y,G=0;$.cmp(L)!==0;G++)$=$.redSqr();n(G<U);var X=this.pow(N,new i(1).iushln(U-G-1));te=te.redMul(X),N=X.redSqr(),Y=Y.redMul(N),U=G}return te},Q.prototype.invm=function(y){var S=y._invmp(this.m);return S.negative!==0?(S.negative=0,this.imod(S).redNeg()):this.imod(S)},Q.prototype.pow=function(y,S){if(S.isZero())return new i(1).toRed(this);if(S.cmpn(1)===0)return y.clone();var C=4,M=new Array(1<<C);M[0]=new i(1).toRed(this),M[1]=y;for(var x=2;x<M.length;x++)M[x]=this.mul(M[x-1],y);var L=M[0],j=0,T=0,E=S.bitLength()%26;for(E===0&&(E=26),x=S.length-1;x>=0;x--){for(var N=S.words[x],te=E-1;te>=0;te--){var Y=N>>te&1;if(L!==M[0]&&(L=this.sqr(L)),Y===0&&j===0){T=0;continue}j<<=1,j|=Y,T++,!(T!==C&&(x!==0||te!==0))&&(L=this.mul(L,M[j]),T=0,j=0)}E=26}return L},Q.prototype.convertTo=function(y){var S=y.umod(this.m);return S===y?S.clone():S},Q.prototype.convertFrom=function(y){var S=y.clone();return S.red=null,S},i.mont=function(y){return new re(y)};function re(q){Q.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}l(re,Q),re.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},re.prototype.convertFrom=function(y){var S=this.imod(y.mul(this.rinv));return S.red=null,S},re.prototype.imul=function(y,S){if(y.isZero()||S.isZero())return y.words[0]=0,y.length=1,y;var C=y.imul(S),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=C.isub(M).iushrn(this.shift),L=x;return x.cmp(this.m)>=0?L=x.isub(this.m):x.cmpn(0)<0&&(L=x.iadd(this.m)),L._forceRed(this)},re.prototype.mul=function(y,S){if(y.isZero()||S.isZero())return new i(0)._forceRed(this);var C=y.mul(S),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=C.isub(M).iushrn(this.shift),L=x;return x.cmp(this.m)>=0?L=x.isub(this.m):x.cmpn(0)<0&&(L=x.iadd(this.m)),L._forceRed(this)},re.prototype.invm=function(y){var S=this.imod(y._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(e,D0)})(Pn)),Pn.exports}var ni={},It={},Xa;function Dn(){return Xa||(Xa=1,Object.defineProperty(It,"__esModule",{value:!0}),It.errorValues=It.standardErrorCodes=void 0,It.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},It.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),It}var _r={},ii={},eu;function ya(){return eu||(eu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Dn(),r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(f,c=r){if(f&&Number.isInteger(f)){const g=f.toString();if(p(t.errorValues,g))return t.errorValues[g].message;if(d(f))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return c}e.getMessageFromCode=n;function l(f){if(!Number.isInteger(f))return!1;const c=f.toString();return!!(t.errorValues[c]||d(f))}e.isValidCode=l;function i(f){var c;if(typeof f=="number")return f;if(o(f))return(c=f.code)!==null&&c!==void 0?c:f.errorCode}e.getErrorCode=i;function o(f){return typeof f=="object"&&f!==null&&(typeof f.code=="number"||typeof f.errorCode=="number")}function a(f,{shouldIncludeStack:c=!1}={}){const g={};if(f&&typeof f=="object"&&!Array.isArray(f)&&p(f,"code")&&l(f.code)){const _=f;g.code=_.code,_.message&&typeof _.message=="string"?(g.message=_.message,p(_,"data")&&(g.data=_.data)):(g.message=n(g.code),g.data={originalError:u(f)})}else g.code=t.standardErrorCodes.rpc.internal,g.message=s(f,"message")?f.message:r,g.data={originalError:u(f)};return c&&(g.stack=s(f,"stack")?f.stack:void 0),g}e.serialize=a;function d(f){return f>=-32099&&f<=-32e3}function u(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function p(f,c){return Object.prototype.hasOwnProperty.call(f,c)}function s(f,c){return typeof f=="object"&&f!==null&&c in f&&typeof f[c]=="string"}})(ii)),ii}var tu;function j0(){if(tu)return _r;tu=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.standardErrors=void 0;const e=Dn(),t=ya();_r.standardErrors={rpc:{parse:d=>r(e.standardErrorCodes.rpc.parse,d),invalidRequest:d=>r(e.standardErrorCodes.rpc.invalidRequest,d),invalidParams:d=>r(e.standardErrorCodes.rpc.invalidParams,d),methodNotFound:d=>r(e.standardErrorCodes.rpc.methodNotFound,d),internal:d=>r(e.standardErrorCodes.rpc.internal,d),server:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:u}=d;if(!Number.isInteger(u)||u>-32005||u<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return r(u,d)},invalidInput:d=>r(e.standardErrorCodes.rpc.invalidInput,d),resourceNotFound:d=>r(e.standardErrorCodes.rpc.resourceNotFound,d),resourceUnavailable:d=>r(e.standardErrorCodes.rpc.resourceUnavailable,d),transactionRejected:d=>r(e.standardErrorCodes.rpc.transactionRejected,d),methodNotSupported:d=>r(e.standardErrorCodes.rpc.methodNotSupported,d),limitExceeded:d=>r(e.standardErrorCodes.rpc.limitExceeded,d)},provider:{userRejectedRequest:d=>n(e.standardErrorCodes.provider.userRejectedRequest,d),unauthorized:d=>n(e.standardErrorCodes.provider.unauthorized,d),unsupportedMethod:d=>n(e.standardErrorCodes.provider.unsupportedMethod,d),disconnected:d=>n(e.standardErrorCodes.provider.disconnected,d),chainDisconnected:d=>n(e.standardErrorCodes.provider.chainDisconnected,d),unsupportedChain:d=>n(e.standardErrorCodes.provider.unsupportedChain,d),custom:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:u,message:p,data:s}=d;if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string');return new o(u,p,s)}}};function r(d,u){const[p,s]=l(u);return new i(d,p||(0,t.getMessageFromCode)(d),s)}function n(d,u){const[p,s]=l(u);return new o(d,p||(0,t.getMessageFromCode)(d),s)}function l(d){if(d){if(typeof d=="string")return[d];if(typeof d=="object"&&!Array.isArray(d)){const{message:u,data:p}=d;if(u&&typeof u!="string")throw new Error("Must specify string message.");return[u||void 0,p]}}return[]}class i extends Error{constructor(u,p,s){if(!Number.isInteger(u))throw new Error('"code" must be an integer.');if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string.');super(p),this.code=u,s!==void 0&&(this.data=s)}}class o extends i{constructor(u,p,s){if(!a(u))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(u,p,s)}}function a(d){return Number.isInteger(d)&&d>=1e3&&d<=4999}return _r}var vr={},br={},ru;function ma(){if(ru)return br;ru=1,Object.defineProperty(br,"__esModule",{value:!0}),br.isErrorResponse=void 0;function e(t){return t.errorMessage!==void 0}return br.isErrorResponse=e,br}var wr={},nu;function _a(){return nu||(nu=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.LIB_VERSION=void 0,wr.LIB_VERSION="3.9.3"),wr}var iu;function U0(){if(iu)return vr;iu=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.serializeError=void 0;const e=ma(),t=_a(),r=Dn(),n=ya();function l(a,d){const u=(0,n.serialize)(i(a),{shouldIncludeStack:!0}),p=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");p.searchParams.set("version",t.LIB_VERSION),p.searchParams.set("code",u.code.toString());const s=o(u.data,d);return s&&p.searchParams.set("method",s),p.searchParams.set("message",u.message),Object.assign(Object.assign({},u),{docUrl:p.href})}vr.serializeError=l;function i(a){return typeof a=="string"?{message:a,code:r.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(a)?Object.assign(Object.assign({},a),{message:a.errorMessage,code:a.errorCode,data:{method:a.method}}):a}function o(a,d){const u=a?.method;if(u)return u;if(d!==void 0){if(typeof d=="string")return d;if(Array.isArray(d)){if(d.length>0)return d[0].method}else return d.method}}return vr}var su;function jn(){return su||(su=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=Dn();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=j0();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=U0();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const l=ya();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return l.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return l.getMessageFromCode}})})(ni)),ni}var Ve={},ou;function Un(){if(ou)return Ve;ou=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ProviderType=Ve.RegExpString=Ve.IntNumber=Ve.BigIntString=Ve.AddressString=Ve.HexString=Ve.OpaqueType=void 0;function e(){return n=>n}Ve.OpaqueType=e,Ve.HexString=e(),Ve.AddressString=e(),Ve.BigIntString=e();function t(n){return Math.floor(n)}Ve.IntNumber=t,Ve.RegExpString=e();var r;return(function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""})(r||(Ve.ProviderType=r={})),Ve}var au;function ut(){if(au)return ae;au=1;var e=ae&&ae.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.isMobileWeb=ae.getLocation=ae.isInIFrame=ae.createQrUrl=ae.getFavicon=ae.range=ae.isBigNumber=ae.ensureParsedJSONObject=ae.ensureBN=ae.ensureRegExpString=ae.ensureIntNumber=ae.ensureBuffer=ae.ensureAddressString=ae.ensureEvenLengthHexString=ae.ensureHexString=ae.isHexString=ae.prepend0x=ae.strip0x=ae.has0xPrefix=ae.hexStringFromIntNumber=ae.intNumberFromHexString=ae.bigIntStringFromBN=ae.hexStringFromBuffer=ae.hexStringToUint8Array=ae.uint8ArrayToHex=ae.randomBytesHex=void 0;const t=e(qn()),r=jn(),n=Un(),l=/^[0-9]*$/,i=/^[a-f0-9]*$/;function o(C){return a(crypto.getRandomValues(new Uint8Array(C)))}ae.randomBytesHex=o;function a(C){return[...C].map(M=>M.toString(16).padStart(2,"0")).join("")}ae.uint8ArrayToHex=a;function d(C){return new Uint8Array(C.match(/.{1,2}/g).map(M=>parseInt(M,16)))}ae.hexStringToUint8Array=d;function u(C,M=!1){const x=C.toString("hex");return(0,n.HexString)(M?`0x${x}`:x)}ae.hexStringFromBuffer=u;function p(C){return(0,n.BigIntString)(C.toString(10))}ae.bigIntStringFromBN=p;function s(C){return(0,n.IntNumber)(new t.default(b(C,!1),16).toNumber())}ae.intNumberFromHexString=s;function f(C){return(0,n.HexString)(`0x${new t.default(C).toString(16)}`)}ae.hexStringFromIntNumber=f;function c(C){return C.startsWith("0x")||C.startsWith("0X")}ae.has0xPrefix=c;function g(C){return c(C)?C.slice(2):C}ae.strip0x=g;function _(C){return c(C)?`0x${C.slice(2)}`:`0x${C}`}ae.prepend0x=_;function m(C){if(typeof C!="string")return!1;const M=g(C).toLowerCase();return i.test(M)}ae.isHexString=m;function h(C,M=!1){if(typeof C=="string"){const x=g(C).toLowerCase();if(i.test(x))return(0,n.HexString)(M?`0x${x}`:x)}throw r.standardErrors.rpc.invalidParams(`"${String(C)}" is not a hexadecimal string`)}ae.ensureHexString=h;function b(C,M=!1){let x=h(C,!1);return x.length%2===1&&(x=(0,n.HexString)(`0${x}`)),M?(0,n.HexString)(`0x${x}`):x}ae.ensureEvenLengthHexString=b;function w(C){if(typeof C=="string"){const M=g(C).toLowerCase();if(m(M)&&M.length===40)return(0,n.AddressString)(_(M))}throw r.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(C)}`)}ae.ensureAddressString=w;function I(C){if(Buffer.isBuffer(C))return C;if(typeof C=="string"){if(m(C)){const M=b(C,!1);return Buffer.from(M,"hex")}return Buffer.from(C,"utf8")}throw r.standardErrors.rpc.invalidParams(`Not binary data: ${String(C)}`)}ae.ensureBuffer=I;function A(C){if(typeof C=="number"&&Number.isInteger(C))return(0,n.IntNumber)(C);if(typeof C=="string"){if(l.test(C))return(0,n.IntNumber)(Number(C));if(m(C))return(0,n.IntNumber)(new t.default(b(C,!1),16).toNumber())}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureIntNumber=A;function D(C){if(C instanceof RegExp)return(0,n.RegExpString)(C.toString());throw r.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(C)}`)}ae.ensureRegExpString=D;function F(C){if(C!==null&&(t.default.isBN(C)||J(C)))return new t.default(C.toString(10),10);if(typeof C=="number")return new t.default(A(C));if(typeof C=="string"){if(l.test(C))return new t.default(C,10);if(m(C))return new t.default(b(C,!1),16)}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureBN=F;function W(C){if(typeof C=="string")return JSON.parse(C);if(typeof C=="object")return C;throw r.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(C)}`)}ae.ensureParsedJSONObject=W;function J(C){if(C==null||typeof C.constructor!="function")return!1;const{constructor:M}=C;return typeof M.config=="function"&&typeof M.EUCLID=="number"}ae.isBigNumber=J;function ee(C,M){return Array.from({length:M-C},(x,L)=>C+L)}ae.range=ee;function Q(){const C=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:M,host:x}=document.location,L=C?C.getAttribute("href"):null;return!L||L.startsWith("javascript:")||L.startsWith("vbscript:")?null:L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:")?L:L.startsWith("//")?M+L:`${M}//${x}${L}`}ae.getFavicon=Q;function re(C,M,x,L,j,T){const E=L?"parent-id":"id",N=new URLSearchParams({[E]:C,secret:M,server:x,v:j,chainId:T.toString()}).toString();return`${x}/#/link?${N}`}ae.createQrUrl=re;function q(){try{return window.frameElement!==null}catch{return!1}}ae.isInIFrame=q;function y(){try{return q()&&window.top?window.top.location:window.location}catch{return window.location}}ae.getLocation=y;function S(){var C;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((C=window?.navigator)===null||C===void 0?void 0:C.userAgent)}return ae.isMobileWeb=S,ae}var Er={},uu;function H0(){if(uu)return Er;uu=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.ScopedLocalStorage=void 0;let e=class{constructor(r){this.scope=r}setItem(r,n){localStorage.setItem(this.scopedKey(r),n)}getItem(r){return localStorage.getItem(this.scopedKey(r))}removeItem(r){localStorage.removeItem(this.scopedKey(r))}clear(){const r=this.scopedKey(""),n=[];for(let l=0;l<localStorage.length;l++){const i=localStorage.key(l);typeof i=="string"&&i.startsWith(r)&&n.push(i)}n.forEach(l=>localStorage.removeItem(l))}scopedKey(r){return`${this.scope}:${r}`}};return Er.ScopedLocalStorage=e,Er}var xt={},si={exports:{}},cu;function W0(){return cu||(cu=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function l(d,u,p){this.fn=d,this.context=u,this.once=p||!1}function i(d,u,p,s,f){if(typeof p!="function")throw new TypeError("The listener must be a function");var c=new l(p,s||d,f),g=r?r+u:u;return d._events[g]?d._events[g].fn?d._events[g]=[d._events[g],c]:d._events[g].push(c):(d._events[g]=c,d._eventsCount++),d}function o(d,u){--d._eventsCount===0?d._events=new n:delete d._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],p,s;if(this._eventsCount===0)return u;for(s in p=this._events)t.call(p,s)&&u.push(r?s.slice(1):s);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},a.prototype.listeners=function(u){var p=r?r+u:u,s=this._events[p];if(!s)return[];if(s.fn)return[s.fn];for(var f=0,c=s.length,g=new Array(c);f<c;f++)g[f]=s[f].fn;return g},a.prototype.listenerCount=function(u){var p=r?r+u:u,s=this._events[p];return s?s.fn?1:s.length:0},a.prototype.emit=function(u,p,s,f,c,g){var _=r?r+u:u;if(!this._events[_])return!1;var m=this._events[_],h=arguments.length,b,w;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),h){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,s),!0;case 4:return m.fn.call(m.context,p,s,f),!0;case 5:return m.fn.call(m.context,p,s,f,c),!0;case 6:return m.fn.call(m.context,p,s,f,c,g),!0}for(w=1,b=new Array(h-1);w<h;w++)b[w-1]=arguments[w];m.fn.apply(m.context,b)}else{var I=m.length,A;for(w=0;w<I;w++)switch(m[w].once&&this.removeListener(u,m[w].fn,void 0,!0),h){case 1:m[w].fn.call(m[w].context);break;case 2:m[w].fn.call(m[w].context,p);break;case 3:m[w].fn.call(m[w].context,p,s);break;case 4:m[w].fn.call(m[w].context,p,s,f);break;default:if(!b)for(A=1,b=new Array(h-1);A<h;A++)b[A-1]=arguments[A];m[w].fn.apply(m[w].context,b)}}return!0},a.prototype.on=function(u,p,s){return i(this,u,p,s,!1)},a.prototype.once=function(u,p,s){return i(this,u,p,s,!0)},a.prototype.removeListener=function(u,p,s,f){var c=r?r+u:u;if(!this._events[c])return this;if(!p)return o(this,c),this;var g=this._events[c];if(g.fn)g.fn===p&&(!f||g.once)&&(!s||g.context===s)&&o(this,c);else{for(var _=0,m=[],h=g.length;_<h;_++)(g[_].fn!==p||f&&!g[_].once||s&&g[_].context!==s)&&m.push(g[_]);m.length?this._events[c]=m.length===1?m[0]:m:o(this,c)}return this},a.prototype.removeAllListeners=function(u){var p;return u?(p=r?r+u:u,this._events[p]&&o(this,p)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(si)),si.exports}var Sr={},Rr={},Cr={},lu;function va(){return lu||(lu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.EVENTS=void 0,Cr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),Cr}var Ke={},fu;function ba(){if(fu)return Ke;fu=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.RelayAbstract=Ke.APP_VERSION_KEY=Ke.LOCAL_STORAGE_ADDRESSES_KEY=Ke.WALLET_USER_NAME_KEY=void 0;const e=jn();Ke.WALLET_USER_NAME_KEY="walletUsername",Ke.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",Ke.APP_VERSION_KEY="AppVersion";let t=class{async makeEthereumJSONRPCRequest(n,l){if(!l)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(l,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json"}}).then(i=>i.json()).then(i=>{if(!i)throw e.standardErrors.rpc.parse({});const o=i,{error:a}=o;if(a)throw(0,e.serializeError)(a,n.method);return o})}};return Ke.RelayAbstract=t,Ke}var Mr={},oi={exports:{}},pn={exports:{}},hu;function tt(){return hu||(hu=1,typeof Object.create=="function"?pn.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pn.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}),pn.exports}var gn={exports:{}},ai={},kr={},du;function $0(){if(du)return kr;du=1,kr.byteLength=a,kr.toByteArray=u,kr.fromByteArray=f;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,i=n.length;l<i;++l)e[l]=n[l],t[n.charCodeAt(l)]=l;t[45]=62,t[95]=63;function o(c){var g=c.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=c.indexOf("=");_===-1&&(_=g);var m=_===g?0:4-_%4;return[_,m]}function a(c){var g=o(c),_=g[0],m=g[1];return(_+m)*3/4-m}function d(c,g,_){return(g+_)*3/4-_}function u(c){var g,_=o(c),m=_[0],h=_[1],b=new r(d(c,m,h)),w=0,I=h>0?m-4:m,A;for(A=0;A<I;A+=4)g=t[c.charCodeAt(A)]<<18|t[c.charCodeAt(A+1)]<<12|t[c.charCodeAt(A+2)]<<6|t[c.charCodeAt(A+3)],b[w++]=g>>16&255,b[w++]=g>>8&255,b[w++]=g&255;return h===2&&(g=t[c.charCodeAt(A)]<<2|t[c.charCodeAt(A+1)]>>4,b[w++]=g&255),h===1&&(g=t[c.charCodeAt(A)]<<10|t[c.charCodeAt(A+1)]<<4|t[c.charCodeAt(A+2)]>>2,b[w++]=g>>8&255,b[w++]=g&255),b}function p(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function s(c,g,_){for(var m,h=[],b=g;b<_;b+=3)m=(c[b]<<16&16711680)+(c[b+1]<<8&65280)+(c[b+2]&255),h.push(p(m));return h.join("")}function f(c){for(var g,_=c.length,m=_%3,h=[],b=16383,w=0,I=_-m;w<I;w+=b)h.push(s(c,w,w+b>I?I:w+b));return m===1?(g=c[_-1],h.push(e[g>>2]+e[g<<4&63]+"==")):m===2&&(g=(c[_-2]<<8)+c[_-1],h.push(e[g>>10]+e[g>>4&63]+e[g<<2&63]+"=")),h.join("")}return kr}var yn={};var pu;function V0(){return pu||(pu=1,yn.read=function(e,t,r,n,l){var i,o,a=l*8-n-1,d=(1<<a)-1,u=d>>1,p=-7,s=r?l-1:0,f=r?-1:1,c=e[t+s];for(s+=f,i=c&(1<<-p)-1,c>>=-p,p+=a;p>0;i=i*256+e[t+s],s+=f,p-=8);for(o=i&(1<<-p)-1,i>>=-p,p+=n;p>0;o=o*256+e[t+s],s+=f,p-=8);if(i===0)i=1-u;else{if(i===d)return o?NaN:(c?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(c?-1:1)*o*Math.pow(2,i-n)},yn.write=function(e,t,r,n,l,i){var o,a,d,u=i*8-l-1,p=(1<<u)-1,s=p>>1,f=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:i-1,g=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-o))<1&&(o--,d*=2),o+s>=1?t+=f/d:t+=f*Math.pow(2,1-s),t*d>=2&&(o++,d/=2),o+s>=p?(a=0,o=p):o+s>=1?(a=(t*d-1)*Math.pow(2,l),o=o+s):(a=t*Math.pow(2,s-1)*Math.pow(2,l),o=0));l>=8;e[r+c]=a&255,c+=g,a/=256,l-=8);for(o=o<<l|a,u+=l;u>0;e[r+c]=o&255,c+=g,o/=256,u-=8);e[r+c-g]|=_*128}),yn}var gu;function Hn(){return gu||(gu=1,(function(e){const t=$0(),r=V0(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;const l=2147483647;e.kMaxLength=l,a.TYPED_ARRAY_SUPPORT=i(),!a.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 i(){try{const k=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(k,v),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(k){if(k>l)throw new RangeError('The value "'+k+'" is invalid for option "size"');const v=new Uint8Array(k);return Object.setPrototypeOf(v,a.prototype),v}function a(k,v,R){if(typeof k=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(k)}return d(k,v,R)}a.poolSize=8192;function d(k,v,R){if(typeof k=="string")return f(k,v);if(ArrayBuffer.isView(k))return g(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(me(k,ArrayBuffer)||k&&me(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(k,SharedArrayBuffer)||k&&me(k.buffer,SharedArrayBuffer)))return _(k,v,R);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return a.from(O,v,R);const H=m(k);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),v,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,v,R){return d(k,v,R)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function p(k,v,R){return u(k),k<=0?o(k):v!==void 0?typeof R=="string"?o(k).fill(v,R):o(k).fill(v):o(k)}a.alloc=function(k,v,R){return p(k,v,R)};function s(k){return u(k),o(k<0?0:h(k)|0)}a.allocUnsafe=function(k){return s(k)},a.allocUnsafeSlow=function(k){return s(k)};function f(k,v){if((typeof v!="string"||v==="")&&(v="utf8"),!a.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const R=w(k,v)|0;let O=o(R);const H=O.write(k,v);return H!==R&&(O=O.slice(0,H)),O}function c(k){const v=k.length<0?0:h(k.length)|0,R=o(v);for(let O=0;O<v;O+=1)R[O]=k[O]&255;return R}function g(k){if(me(k,Uint8Array)){const v=new Uint8Array(k);return _(v.buffer,v.byteOffset,v.byteLength)}return c(k)}function _(k,v,R){if(v<0||k.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<v+(R||0))throw new RangeError('"length" is outside of buffer bounds');let O;return v===void 0&&R===void 0?O=new Uint8Array(k):R===void 0?O=new Uint8Array(k,v):O=new Uint8Array(k,v,R),Object.setPrototypeOf(O,a.prototype),O}function m(k){if(a.isBuffer(k)){const v=h(k.length)|0,R=o(v);return R.length===0||k.copy(R,0,0,v),R}if(k.length!==void 0)return typeof k.length!="number"||pe(k.length)?o(0):c(k);if(k.type==="Buffer"&&Array.isArray(k.data))return c(k.data)}function h(k){if(k>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==a.prototype},a.compare=function(v,R){if(me(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),me(R,Uint8Array)&&(R=a.from(R,R.offset,R.byteLength)),!a.isBuffer(v)||!a.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===R)return 0;let O=v.length,H=R.length;for(let V=0,z=Math.min(O,H);V<z;++V)if(v[V]!==R[V]){O=v[V],H=R[V];break}return O<H?-1:H<O?1:0},a.isEncoding=function(v){switch(String(v).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}},a.concat=function(v,R){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return a.alloc(0);let O;if(R===void 0)for(R=0,O=0;O<v.length;++O)R+=v[O].length;const H=a.allocUnsafe(R);let V=0;for(O=0;O<v.length;++O){let z=v[O];if(me(z,Uint8Array))V+z.length>H.length?(a.isBuffer(z)||(z=a.from(z)),z.copy(H,V)):Uint8Array.prototype.set.call(H,z,V);else if(a.isBuffer(z))z.copy(H,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return H};function w(k,v){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||me(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const R=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&R===0)return 0;let H=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return se(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return ge(k).length;default:if(H)return O?-1:se(k).length;v=(""+v).toLowerCase(),H=!0}}a.byteLength=w;function I(k,v,R){let O=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,v>>>=0,R<=v))return"";for(k||(k="utf8");;)switch(k){case"hex":return L(this,v,R);case"utf8":case"utf-8":return y(this,v,R);case"ascii":return M(this,v,R);case"latin1":case"binary":return x(this,v,R);case"base64":return q(this,v,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,v,R);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}a.prototype._isBuffer=!0;function A(k,v,R){const O=k[v];k[v]=k[R],k[R]=O}a.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<v;R+=2)A(this,R,R+1);return this},a.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<v;R+=4)A(this,R,R+3),A(this,R+1,R+2);return this},a.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<v;R+=8)A(this,R,R+7),A(this,R+1,R+6),A(this,R+2,R+5),A(this,R+3,R+4);return this},a.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?y(this,0,v):I.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(v){if(!a.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:a.compare(this,v)===0},a.prototype.inspect=function(){let v="";const R=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(v+=" ... "),"<Buffer "+v+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(v,R,O,H,V){if(me(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(R===void 0&&(R=0),O===void 0&&(O=v?v.length:0),H===void 0&&(H=0),V===void 0&&(V=this.length),R<0||O>v.length||H<0||V>this.length)throw new RangeError("out of range index");if(H>=V&&R>=O)return 0;if(H>=V)return-1;if(R>=O)return 1;if(R>>>=0,O>>>=0,H>>>=0,V>>>=0,this===v)return 0;let z=V-H,he=O-R;const fe=Math.min(z,he),le=this.slice(H,V),be=v.slice(R,O);for(let ce=0;ce<fe;++ce)if(le[ce]!==be[ce]){z=le[ce],he=be[ce];break}return z<he?-1:he<z?1:0};function D(k,v,R,O,H){if(k.length===0)return-1;if(typeof R=="string"?(O=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,pe(R)&&(R=H?0:k.length-1),R<0&&(R=k.length+R),R>=k.length){if(H)return-1;R=k.length-1}else if(R<0)if(H)R=0;else return-1;if(typeof v=="string"&&(v=a.from(v,O)),a.isBuffer(v))return v.length===0?-1:F(k,v,R,O,H);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(k,v,R):Uint8Array.prototype.lastIndexOf.call(k,v,R):F(k,[v],R,O,H);throw new TypeError("val must be string, number or Buffer")}function F(k,v,R,O,H){let V=1,z=k.length,he=v.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||v.length<2)return-1;V=2,z/=2,he/=2,R/=2}function fe(be,ce){return V===1?be[ce]:be.readUInt16BE(ce*V)}let le;if(H){let be=-1;for(le=R;le<z;le++)if(fe(k,le)===fe(v,be===-1?0:le-be)){if(be===-1&&(be=le),le-be+1===he)return be*V}else be!==-1&&(le-=le-be),be=-1}else for(R+he>z&&(R=z-he),le=R;le>=0;le--){let be=!0;for(let ce=0;ce<he;ce++)if(fe(k,le+ce)!==fe(v,ce)){be=!1;break}if(be)return le}return-1}a.prototype.includes=function(v,R,O){return this.indexOf(v,R,O)!==-1},a.prototype.indexOf=function(v,R,O){return D(this,v,R,O,!0)},a.prototype.lastIndexOf=function(v,R,O){return D(this,v,R,O,!1)};function W(k,v,R,O){R=Number(R)||0;const H=k.length-R;O?(O=Number(O),O>H&&(O=H)):O=H;const V=v.length;O>V/2&&(O=V/2);let z;for(z=0;z<O;++z){const he=parseInt(v.substr(z*2,2),16);if(pe(he))return z;k[R+z]=he}return z}function J(k,v,R,O){return ue(se(v,k.length-R),k,R,O)}function ee(k,v,R,O){return ue(de(v),k,R,O)}function Q(k,v,R,O){return ue(ge(v),k,R,O)}function re(k,v,R,O){return ue(He(v,k.length-R),k,R,O)}a.prototype.write=function(v,R,O,H){if(R===void 0)H="utf8",O=this.length,R=0;else if(O===void 0&&typeof R=="string")H=R,O=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(O)?(O=O>>>0,H===void 0&&(H="utf8")):(H=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-R;if((O===void 0||O>V)&&(O=V),v.length>0&&(O<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let z=!1;for(;;)switch(H){case"hex":return W(this,v,R,O);case"utf8":case"utf-8":return J(this,v,R,O);case"ascii":case"latin1":case"binary":return ee(this,v,R,O);case"base64":return Q(this,v,R,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,v,R,O);default:if(z)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(k,v,R){return v===0&&R===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(v,R))}function y(k,v,R){R=Math.min(k.length,R);const O=[];let H=v;for(;H<R;){const V=k[H];let z=null,he=V>239?4:V>223?3:V>191?2:1;if(H+he<=R){let fe,le,be,ce;switch(he){case 1:V<128&&(z=V);break;case 2:fe=k[H+1],(fe&192)===128&&(ce=(V&31)<<6|fe&63,ce>127&&(z=ce));break;case 3:fe=k[H+1],le=k[H+2],(fe&192)===128&&(le&192)===128&&(ce=(V&15)<<12|(fe&63)<<6|le&63,ce>2047&&(ce<55296||ce>57343)&&(z=ce));break;case 4:fe=k[H+1],le=k[H+2],be=k[H+3],(fe&192)===128&&(le&192)===128&&(be&192)===128&&(ce=(V&15)<<18|(fe&63)<<12|(le&63)<<6|be&63,ce>65535&&ce<1114112&&(z=ce))}}z===null?(z=65533,he=1):z>65535&&(z-=65536,O.push(z>>>10&1023|55296),z=56320|z&1023),O.push(z),H+=he}return C(O)}const S=4096;function C(k){const v=k.length;if(v<=S)return String.fromCharCode.apply(String,k);let R="",O=0;for(;O<v;)R+=String.fromCharCode.apply(String,k.slice(O,O+=S));return R}function M(k,v,R){let O="";R=Math.min(k.length,R);for(let H=v;H<R;++H)O+=String.fromCharCode(k[H]&127);return O}function x(k,v,R){let O="";R=Math.min(k.length,R);for(let H=v;H<R;++H)O+=String.fromCharCode(k[H]);return O}function L(k,v,R){const O=k.length;(!v||v<0)&&(v=0),(!R||R<0||R>O)&&(R=O);let H="";for(let V=v;V<R;++V)H+=ye[k[V]];return H}function j(k,v,R){const O=k.slice(v,R);let H="";for(let V=0;V<O.length-1;V+=2)H+=String.fromCharCode(O[V]+O[V+1]*256);return H}a.prototype.slice=function(v,R){const O=this.length;v=~~v,R=R===void 0?O:~~R,v<0?(v+=O,v<0&&(v=0)):v>O&&(v=O),R<0?(R+=O,R<0&&(R=0)):R>O&&(R=O),R<v&&(R=v);const H=this.subarray(v,R);return Object.setPrototypeOf(H,a.prototype),H};function T(k,v,R){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+v>R)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=this[v],V=1,z=0;for(;++z<R&&(V*=256);)H+=this[v+z]*V;return H},a.prototype.readUintBE=a.prototype.readUIntBE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=this[v+--R],V=1;for(;R>0&&(V*=256);)H+=this[v+--R]*V;return H},a.prototype.readUint8=a.prototype.readUInt8=function(v,R){return v=v>>>0,R||T(v,1,this.length),this[v]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(v,R){return v=v>>>0,R||T(v,2,this.length),this[v]|this[v+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(v,R){return v=v>>>0,R||T(v,2,this.length),this[v]<<8|this[v+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(v,R){return v=v>>>0,R||T(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(v,R){return v=v>>>0,R||T(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},a.prototype.readBigUInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=R+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,V=this[++v]+this[++v]*2**8+this[++v]*2**16+O*2**24;return BigInt(H)+(BigInt(V)<<BigInt(32))}),a.prototype.readBigUInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=R*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],V=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O;return(BigInt(H)<<BigInt(32))+BigInt(V)}),a.prototype.readIntLE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=this[v],V=1,z=0;for(;++z<R&&(V*=256);)H+=this[v+z]*V;return V*=128,H>=V&&(H-=Math.pow(2,8*R)),H},a.prototype.readIntBE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=R,V=1,z=this[v+--H];for(;H>0&&(V*=256);)z+=this[v+--H]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*R)),z},a.prototype.readInt8=function(v,R){return v=v>>>0,R||T(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},a.prototype.readInt16LE=function(v,R){v=v>>>0,R||T(v,2,this.length);const O=this[v]|this[v+1]<<8;return O&32768?O|4294901760:O},a.prototype.readInt16BE=function(v,R){v=v>>>0,R||T(v,2,this.length);const O=this[v+1]|this[v]<<8;return O&32768?O|4294901760:O},a.prototype.readInt32LE=function(v,R){return v=v>>>0,R||T(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},a.prototype.readInt32BE=function(v,R){return v=v>>>0,R||T(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},a.prototype.readBigInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(O<<24);return(BigInt(H)<<BigInt(32))+BigInt(R+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),a.prototype.readBigInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=(R<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(H)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O)}),a.prototype.readFloatLE=function(v,R){return v=v>>>0,R||T(v,4,this.length),r.read(this,v,!0,23,4)},a.prototype.readFloatBE=function(v,R){return v=v>>>0,R||T(v,4,this.length),r.read(this,v,!1,23,4)},a.prototype.readDoubleLE=function(v,R){return v=v>>>0,R||T(v,8,this.length),r.read(this,v,!0,52,8)},a.prototype.readDoubleBE=function(v,R){return v=v>>>0,R||T(v,8,this.length),r.read(this,v,!1,52,8)};function E(k,v,R,O,H,V){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>H||v<V)throw new RangeError('"value" argument is out of bounds');if(R+O>k.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(v,R,O,H){if(v=+v,R=R>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;E(this,v,R,O,he,0)}let V=1,z=0;for(this[R]=v&255;++z<O&&(V*=256);)this[R+z]=v/V&255;return R+O},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(v,R,O,H){if(v=+v,R=R>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;E(this,v,R,O,he,0)}let V=O-1,z=1;for(this[R+V]=v&255;--V>=0&&(z*=256);)this[R+V]=v/z&255;return R+O},a.prototype.writeUint8=a.prototype.writeUInt8=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,1,255,0),this[R]=v&255,R+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,65535,0),this[R]=v&255,this[R+1]=v>>>8,R+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,65535,0),this[R]=v>>>8,this[R+1]=v&255,R+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,4294967295,0),this[R+3]=v>>>24,this[R+2]=v>>>16,this[R+1]=v>>>8,this[R]=v&255,R+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,4294967295,0),this[R]=v>>>24,this[R+1]=v>>>16,this[R+2]=v>>>8,this[R+3]=v&255,R+4};function N(k,v,R,O,H){B(v,O,H,k,R,7);let V=Number(v&BigInt(4294967295));k[R++]=V,V=V>>8,k[R++]=V,V=V>>8,k[R++]=V,V=V>>8,k[R++]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[R++]=z,z=z>>8,k[R++]=z,z=z>>8,k[R++]=z,z=z>>8,k[R++]=z,R}function te(k,v,R,O,H){B(v,O,H,k,R,7);let V=Number(v&BigInt(4294967295));k[R+7]=V,V=V>>8,k[R+6]=V,V=V>>8,k[R+5]=V,V=V>>8,k[R+4]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[R+3]=z,z=z>>8,k[R+2]=z,z=z>>8,k[R+1]=z,z=z>>8,k[R]=z,R+8}a.prototype.writeBigUInt64LE=$e(function(v,R=0){return N(this,v,R,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=$e(function(v,R=0){return te(this,v,R,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(v,R,O,H){if(v=+v,R=R>>>0,!H){const fe=Math.pow(2,8*O-1);E(this,v,R,O,fe-1,-fe)}let V=0,z=1,he=0;for(this[R]=v&255;++V<O&&(z*=256);)v<0&&he===0&&this[R+V-1]!==0&&(he=1),this[R+V]=(v/z>>0)-he&255;return R+O},a.prototype.writeIntBE=function(v,R,O,H){if(v=+v,R=R>>>0,!H){const fe=Math.pow(2,8*O-1);E(this,v,R,O,fe-1,-fe)}let V=O-1,z=1,he=0;for(this[R+V]=v&255;--V>=0&&(z*=256);)v<0&&he===0&&this[R+V+1]!==0&&(he=1),this[R+V]=(v/z>>0)-he&255;return R+O},a.prototype.writeInt8=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,1,127,-128),v<0&&(v=255+v+1),this[R]=v&255,R+1},a.prototype.writeInt16LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,32767,-32768),this[R]=v&255,this[R+1]=v>>>8,R+2},a.prototype.writeInt16BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,32767,-32768),this[R]=v>>>8,this[R+1]=v&255,R+2},a.prototype.writeInt32LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,2147483647,-2147483648),this[R]=v&255,this[R+1]=v>>>8,this[R+2]=v>>>16,this[R+3]=v>>>24,R+4},a.prototype.writeInt32BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[R]=v>>>24,this[R+1]=v>>>16,this[R+2]=v>>>8,this[R+3]=v&255,R+4},a.prototype.writeBigInt64LE=$e(function(v,R=0){return N(this,v,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=$e(function(v,R=0){return te(this,v,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(k,v,R,O,H,V){if(R+O>k.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function U(k,v,R,O,H){return v=+v,R=R>>>0,H||Y(k,v,R,4),r.write(k,v,R,O,23,4),R+4}a.prototype.writeFloatLE=function(v,R,O){return U(this,v,R,!0,O)},a.prototype.writeFloatBE=function(v,R,O){return U(this,v,R,!1,O)};function $(k,v,R,O,H){return v=+v,R=R>>>0,H||Y(k,v,R,8),r.write(k,v,R,O,52,8),R+8}a.prototype.writeDoubleLE=function(v,R,O){return $(this,v,R,!0,O)},a.prototype.writeDoubleBE=function(v,R,O){return $(this,v,R,!1,O)},a.prototype.copy=function(v,R,O,H){if(!a.isBuffer(v))throw new TypeError("argument should be a Buffer");if(O||(O=0),!H&&H!==0&&(H=this.length),R>=v.length&&(R=v.length),R||(R=0),H>0&&H<O&&(H=O),H===O||v.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),v.length-R<H-O&&(H=v.length-R+O);const V=H-O;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(R,O,H):Uint8Array.prototype.set.call(v,this.subarray(O,H),R),V},a.prototype.fill=function(v,R,O,H){if(typeof v=="string"){if(typeof R=="string"?(H=R,R=0,O=this.length):typeof O=="string"&&(H=O,O=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!a.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(v.length===1){const z=v.charCodeAt(0);(H==="utf8"&&z<128||H==="latin1")&&(v=z)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(R<0||this.length<R||this.length<O)throw new RangeError("Out of range index");if(O<=R)return this;R=R>>>0,O=O===void 0?this.length:O>>>0,v||(v=0);let V;if(typeof v=="number")for(V=R;V<O;++V)this[V]=v;else{const z=a.isBuffer(v)?v:a.from(v,H),he=z.length;if(he===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(V=0;V<O-R;++V)this[V+R]=z[V%he]}return this};const G={};function X(k,v,R){G[k]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}X("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(k,v){return`The "${k}" argument must be of type number. Received type ${typeof v}`},TypeError),X("ERR_OUT_OF_RANGE",function(k,v,R){let O=`The value of "${k}" is out of range.`,H=R;return Number.isInteger(R)&&Math.abs(R)>2**32?H=ne(String(R)):typeof R=="bigint"&&(H=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(H=ne(H)),H+="n"),O+=` It must be ${v}. Received ${H}`,O},RangeError);function ne(k){let v="",R=k.length;const O=k[0]==="-"?1:0;for(;R>=O+4;R-=3)v=`_${k.slice(R-3,R)}${v}`;return`${k.slice(0,R)}${v}`}function P(k,v,R){Z(v,"offset"),(k[v]===void 0||k[v+R]===void 0)&&K(v,k.length-(R+1))}function B(k,v,R,O,H,V){if(k>R||k<v){const z=typeof v=="bigint"?"n":"";let he;throw v===0||v===BigInt(0)?he=`>= 0${z} and < 2${z} ** ${(V+1)*8}${z}`:he=`>= -(2${z} ** ${(V+1)*8-1}${z}) and < 2 ** ${(V+1)*8-1}${z}`,new G.ERR_OUT_OF_RANGE("value",he,k)}P(O,H,V)}function Z(k,v){if(typeof k!="number")throw new G.ERR_INVALID_ARG_TYPE(v,"number",k)}function K(k,v,R){throw Math.floor(k)!==k?(Z(k,R),new G.ERR_OUT_OF_RANGE("offset","an integer",k)):v<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,k)}const oe=/[^+/0-9A-Za-z-_]/g;function ie(k){if(k=k.split("=")[0],k=k.trim().replace(oe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function se(k,v){v=v||1/0;let R;const O=k.length;let H=null;const V=[];for(let z=0;z<O;++z){if(R=k.charCodeAt(z),R>55295&&R<57344){if(!H){if(R>56319){(v-=3)>-1&&V.push(239,191,189);continue}else if(z+1===O){(v-=3)>-1&&V.push(239,191,189);continue}H=R;continue}if(R<56320){(v-=3)>-1&&V.push(239,191,189),H=R;continue}R=(H-55296<<10|R-56320)+65536}else H&&(v-=3)>-1&&V.push(239,191,189);if(H=null,R<128){if((v-=1)<0)break;V.push(R)}else if(R<2048){if((v-=2)<0)break;V.push(R>>6|192,R&63|128)}else if(R<65536){if((v-=3)<0)break;V.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((v-=4)<0)break;V.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return V}function de(k){const v=[];for(let R=0;R<k.length;++R)v.push(k.charCodeAt(R)&255);return v}function He(k,v){let R,O,H;const V=[];for(let z=0;z<k.length&&!((v-=2)<0);++z)R=k.charCodeAt(z),O=R>>8,H=R%256,V.push(H),V.push(O);return V}function ge(k){return t.toByteArray(ie(k))}function ue(k,v,R,O){let H;for(H=0;H<O&&!(H+R>=v.length||H>=k.length);++H)v[H+R]=k[H];return H}function me(k,v){return k instanceof v||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===v.name}function pe(k){return k!==k}const ye=(function(){const k="0123456789abcdef",v=new Array(256);for(let R=0;R<16;++R){const O=R*16;for(let H=0;H<16;++H)v[O+H]=k[R]+k[H]}return v})();function $e(k){return typeof BigInt>"u"?ve:k}function ve(){throw new Error("BigInt not supported")}})(ai)),ai}var yu;function ct(){return yu||(yu=1,(function(e,t){var r=Hn(),n=r.Buffer;function l(o,a){for(var d in o)a[d]=o[d]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(l(r,t),t.Buffer=i);function i(o,a,d){return n(o,a,d)}i.prototype=Object.create(n.prototype),l(n,i),i.from=function(o,a,d){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,d)},i.alloc=function(o,a,d){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof d=="string"?u.fill(a,d):u.fill(a):u.fill(0),u},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(gn,gn.exports)),gn.exports}var ui,mu;function z0(){if(mu)return ui;mu=1;var e={}.toString;return ui=Array.isArray||function(t){return e.call(t)=="[object Array]"},ui}var ci,_u;function rn(){return _u||(_u=1,ci=TypeError),ci}var li,vu;function $h(){return vu||(vu=1,li=Object),li}var fi,bu;function G0(){return bu||(bu=1,fi=Error),fi}var hi,wu;function J0(){return wu||(wu=1,hi=EvalError),hi}var di,Eu;function Z0(){return Eu||(Eu=1,di=RangeError),di}var pi,Su;function K0(){return Su||(Su=1,pi=ReferenceError),pi}var gi,Ru;function Vh(){return Ru||(Ru=1,gi=SyntaxError),gi}var yi,Cu;function Q0(){return Cu||(Cu=1,yi=URIError),yi}var mi,Mu;function Y0(){return Mu||(Mu=1,mi=Math.abs),mi}var _i,ku;function X0(){return ku||(ku=1,_i=Math.floor),_i}var vi,Iu;function ep(){return Iu||(Iu=1,vi=Math.max),vi}var bi,xu;function tp(){return xu||(xu=1,bi=Math.min),bi}var wi,Au;function rp(){return Au||(Au=1,wi=Math.pow),wi}var Ei,Tu;function np(){return Tu||(Tu=1,Ei=Math.round),Ei}var Si,Pu;function ip(){return Pu||(Pu=1,Si=Number.isNaN||function(t){return t!==t}),Si}var Ri,Bu;function sp(){if(Bu)return Ri;Bu=1;var e=ip();return Ri=function(r){return e(r)||r===0?r:r<0?-1:1},Ri}var Ci,Lu;function op(){return Lu||(Lu=1,Ci=Object.getOwnPropertyDescriptor),Ci}var Mi,Nu;function nn(){if(Nu)return Mi;Nu=1;var e=op();if(e)try{e([],"length")}catch{e=null}return Mi=e,Mi}var ki,Ou;function Wn(){if(Ou)return ki;Ou=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ki=e,ki}var Ii,Fu;function zh(){return Fu||(Fu=1,Ii=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var l=42;t[r]=l;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==l||a.enumerable!==!0)return!1}return!0}),Ii}var xi,qu;function ap(){if(qu)return xi;qu=1;var e=typeof Symbol<"u"&&Symbol,t=zh();return xi=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},xi}var Ai,Du;function Gh(){return Du||(Du=1,Ai=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ai}var Ti,ju;function Jh(){if(ju)return Ti;ju=1;var e=$h();return Ti=e.getPrototypeOf||null,Ti}var Pi,Uu;function up(){if(Uu)return Pi;Uu=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",l=function(d,u){for(var p=[],s=0;s<d.length;s+=1)p[s]=d[s];for(var f=0;f<u.length;f+=1)p[f+d.length]=u[f];return p},i=function(d,u){for(var p=[],s=u,f=0;s<d.length;s+=1,f+=1)p[f]=d[s];return p},o=function(a,d){for(var u="",p=0;p<a.length;p+=1)u+=a[p],p+1<a.length&&(u+=d);return u};return Pi=function(d){var u=this;if(typeof u!="function"||t.apply(u)!==n)throw new TypeError(e+u);for(var p=i(arguments,1),s,f=function(){if(this instanceof s){var h=u.apply(this,l(p,arguments));return Object(h)===h?h:this}return u.apply(d,l(p,arguments))},c=r(0,u.length-p.length),g=[],_=0;_<c;_++)g[_]="$"+_;if(s=Function("binder","return function ("+o(g,",")+"){ return binder.apply(this,arguments); }")(f),u.prototype){var m=function(){};m.prototype=u.prototype,s.prototype=new m,m.prototype=null}return s},Pi}var Bi,Hu;function sn(){if(Hu)return Bi;Hu=1;var e=up();return Bi=Function.prototype.bind||e,Bi}var Li,Wu;function wa(){return Wu||(Wu=1,Li=Function.prototype.call),Li}var Ni,$u;function Ea(){return $u||($u=1,Ni=Function.prototype.apply),Ni}var Oi,Vu;function cp(){return Vu||(Vu=1,Oi=typeof Reflect<"u"&&Reflect&&Reflect.apply),Oi}var Fi,zu;function Zh(){if(zu)return Fi;zu=1;var e=sn(),t=Ea(),r=wa(),n=cp();return Fi=n||e.call(r,t),Fi}var qi,Gu;function Sa(){if(Gu)return qi;Gu=1;var e=sn(),t=rn(),r=wa(),n=Zh();return qi=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return n(e,r,i)},qi}var Di,Ju;function lp(){if(Ju)return Di;Ju=1;var e=Sa(),t=nn(),r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!r&&t&&t(Object.prototype,"__proto__"),l=Object,i=l.getPrototypeOf;return Di=n&&typeof n.get=="function"?e([n.get]):typeof i=="function"?function(a){return i(a==null?a:l(a))}:!1,Di}var ji,Zu;function Kh(){if(Zu)return ji;Zu=1;var e=Gh(),t=Jh(),r=lp();return ji=e?function(l){return e(l)}:t?function(l){if(!l||typeof l!="object"&&typeof l!="function")throw new TypeError("getProto: not an object");return t(l)}:r?function(l){return r(l)}:null,ji}var Ui,Ku;function fp(){if(Ku)return Ui;Ku=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=sn();return Ui=r.call(e,t),Ui}var Hi,Qu;function Qh(){if(Qu)return Hi;Qu=1;var e,t=$h(),r=G0(),n=J0(),l=Z0(),i=K0(),o=Vh(),a=rn(),d=Q0(),u=Y0(),p=X0(),s=ep(),f=tp(),c=rp(),g=np(),_=sp(),m=Function,h=function(X){try{return m('"use strict"; return ('+X+").constructor;")()}catch{}},b=nn(),w=Wn(),I=function(){throw new a},A=b?(function(){try{return arguments.callee,I}catch{try{return b(arguments,"callee").get}catch{return I}}})():I,D=ap()(),F=Kh(),W=Jh(),J=Gh(),ee=Ea(),Q=wa(),re={},q=typeof Uint8Array>"u"||!F?e:F(Uint8Array),y={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":D&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":re,"%AsyncGenerator%":re,"%AsyncGeneratorFunction%":re,"%AsyncIteratorPrototype%":re,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":re,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!D||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":l,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!D||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&F?F(""[Symbol.iterator]()):e,"%Symbol%":D?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":A,"%TypedArray%":q,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":ee,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":W,"%Math.abs%":u,"%Math.floor%":p,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":c,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":J};if(F)try{null.error}catch(X){var S=F(F(X));y["%Error.prototype%"]=S}var C=function X(ne){var P;if(ne==="%AsyncFunction%")P=h("async function () {}");else if(ne==="%GeneratorFunction%")P=h("function* () {}");else if(ne==="%AsyncGeneratorFunction%")P=h("async function* () {}");else if(ne==="%AsyncGenerator%"){var B=X("%AsyncGeneratorFunction%");B&&(P=B.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Z=X("%AsyncGenerator%");Z&&F&&(P=F(Z.prototype))}return y[ne]=P,P},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=sn(),L=fp(),j=x.call(Q,Array.prototype.concat),T=x.call(ee,Array.prototype.splice),E=x.call(Q,String.prototype.replace),N=x.call(Q,String.prototype.slice),te=x.call(Q,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,$=function(ne){var P=N(ne,0,1),B=N(ne,-1);if(P==="%"&&B!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&P!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var Z=[];return E(ne,Y,function(K,oe,ie,se){Z[Z.length]=ie?E(se,U,"$1"):oe||K}),Z},G=function(ne,P){var B=ne,Z;if(L(M,B)&&(Z=M[B],B="%"+Z[0]+"%"),L(y,B)){var K=y[B];if(K===re&&(K=C(B)),typeof K>"u"&&!P)throw new a("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Z,name:B,value:K}}throw new o("intrinsic "+ne+" does not exist!")};return Hi=function(ne,P){if(typeof ne!="string"||ne.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof P!="boolean")throw new a('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,ne)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=$(ne),Z=B.length>0?B[0]:"",K=G("%"+Z+"%",P),oe=K.name,ie=K.value,se=!1,de=K.alias;de&&(Z=de[0],T(B,j([0,1],de)));for(var He=1,ge=!0;He<B.length;He+=1){var ue=B[He],me=N(ue,0,1),pe=N(ue,-1);if((me==='"'||me==="'"||me==="`"||pe==='"'||pe==="'"||pe==="`")&&me!==pe)throw new o("property names with quotes must have matching quotes");if((ue==="constructor"||!ge)&&(se=!0),Z+="."+ue,oe="%"+Z+"%",L(y,oe))ie=y[oe];else if(ie!=null){if(!(ue in ie)){if(!P)throw new a("base intrinsic for "+ne+" exists, but the property is not available.");return}if(b&&He+1>=B.length){var ye=b(ie,ue);ge=!!ye,ge&&"get"in ye&&!("originalValue"in ye.get)?ie=ye.get:ie=ie[ue]}else ge=L(ie,ue),ie=ie[ue];ge&&!se&&(y[oe]=ie)}}return ie},Hi}var Wi,Yu;function Yh(){if(Yu)return Wi;Yu=1;var e=Qh(),t=Sa(),r=t([e("%String.prototype.indexOf%")]);return Wi=function(l,i){var o=e(l,!!i);return typeof o=="function"&&r(l,".prototype.")>-1?t([o]):o},Wi}var $i,Xu;function hp(){if(Xu)return $i;Xu=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(b){b!==n&&(t=null)}else t=null;var l=/^\s*class\b/,i=function(w){try{var I=e.call(w);return l.test(I)}catch{return!1}},o=function(w){try{return i(w)?!1:(e.call(w),!0)}catch{return!1}},a=Object.prototype.toString,d="[object Object]",u="[object Function]",p="[object GeneratorFunction]",s="[object HTMLAllCollection]",f="[object HTML document.all class]",c="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var h=document.all;a.call(h)===a.call(document.all)&&(m=function(w){if((_||!w)&&(typeof w>"u"||typeof w=="object"))try{var I=a.call(w);return(I===s||I===f||I===c||I===d)&&w("")==null}catch{}return!1})}return $i=t?function(w){if(m(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{t(w,null,r)}catch(I){if(I!==n)return!1}return!i(w)&&o(w)}:function(w){if(m(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(g)return o(w);if(i(w))return!1;var I=a.call(w);return I!==u&&I!==p&&!/^\[object HTML/.test(I)?!1:o(w)},$i}var Vi,ec;function dp(){if(ec)return Vi;ec=1;var e=hp(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(d,u,p){for(var s=0,f=d.length;s<f;s++)r.call(d,s)&&(p==null?u(d[s],s,d):u.call(p,d[s],s,d))},l=function(d,u,p){for(var s=0,f=d.length;s<f;s++)p==null?u(d.charAt(s),s,d):u.call(p,d.charAt(s),s,d)},i=function(d,u,p){for(var s in d)r.call(d,s)&&(p==null?u(d[s],s,d):u.call(p,d[s],s,d))};function o(a){return t.call(a)==="[object Array]"}return Vi=function(d,u,p){if(!e(u))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=p),o(d)?n(d,u,s):typeof d=="string"?l(d,u,s):i(d,u,s)},Vi}var zi,tc;function pp(){return tc||(tc=1,zi=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),zi}var Gi,rc;function gp(){if(rc)return Gi;rc=1;var e=pp(),t=typeof globalThis>"u"?ft:globalThis;return Gi=function(){for(var n=[],l=0;l<e.length;l++)typeof t[e[l]]=="function"&&(n[n.length]=e[l]);return n},Gi}var Ji={exports:{}},Zi,nc;function yp(){if(nc)return Zi;nc=1;var e=Wn(),t=Vh(),r=rn(),n=nn();return Zi=function(i,o,a){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,f=!!n&&n(i,o);if(e)e(i,o,{configurable:p===null&&f?f.configurable:!p,enumerable:d===null&&f?f.enumerable:!d,value:a,writable:u===null&&f?f.writable:!u});else if(s||!d&&!u&&!p)i[o]=a;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Zi}var Ki,ic;function mp(){if(ic)return Ki;ic=1;var e=Wn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Ki=t,Ki}var Qi,sc;function _p(){if(sc)return Qi;sc=1;var e=Qh(),t=yp(),r=mp()(),n=nn(),l=rn(),i=e("%Math.floor%");return Qi=function(a,d){if(typeof a!="function")throw new l("`fn` is not a function");if(typeof d!="number"||d<0||d>4294967295||i(d)!==d)throw new l("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],p=!0,s=!0;if("length"in a&&n){var f=n(a,"length");f&&!f.configurable&&(p=!1),f&&!f.writable&&(s=!1)}return(p||s||!u)&&(r?t(a,"length",d,!0,!0):t(a,"length",d)),a},Qi}var Yi,oc;function vp(){if(oc)return Yi;oc=1;var e=sn(),t=Ea(),r=Zh();return Yi=function(){return r(e,t,arguments)},Yi}var ac;function bp(){return ac||(ac=1,(function(e){var t=_p(),r=Wn(),n=Sa(),l=vp();e.exports=function(o){var a=n(arguments),d=o.length-(arguments.length-1);return t(a,1+(d>0?d:0),!0)},r?r(e.exports,"apply",{value:l}):e.exports.apply=l})(Ji)),Ji.exports}var Xi,uc;function wp(){if(uc)return Xi;uc=1;var e=zh();return Xi=function(){return e()&&!!Symbol.toStringTag},Xi}var es,cc;function Ep(){if(cc)return es;cc=1;var e=dp(),t=gp(),r=bp(),n=Yh(),l=nn(),i=Kh(),o=n("Object.prototype.toString"),a=wp()(),d=typeof globalThis>"u"?ft:globalThis,u=t(),p=n("String.prototype.slice"),s=n("Array.prototype.indexOf",!0)||function(m,h){for(var b=0;b<m.length;b+=1)if(m[b]===h)return b;return-1},f={__proto__:null};a&&l&&i?e(u,function(_){var m=new d[_];if(Symbol.toStringTag in m&&i){var h=i(m),b=l(h,Symbol.toStringTag);if(!b&&h){var w=i(h);b=l(w,Symbol.toStringTag)}f["$"+_]=r(b.get)}}):e(u,function(_){var m=new d[_],h=m.slice||m.set;h&&(f["$"+_]=r(h))});var c=function(m){var h=!1;return e(f,function(b,w){if(!h)try{"$"+b(m)===w&&(h=p(w,1))}catch{}}),h},g=function(m){var h=!1;return e(f,function(b,w){if(!h)try{b(m),h=p(w,1)}catch{}}),h};return es=function(m){if(!m||typeof m!="object")return!1;if(!a){var h=p(o(m),8,-1);return s(u,h)>-1?h:h!=="Object"?!1:g(m)}return l?c(m):null},es}var ts,lc;function Sp(){if(lc)return ts;lc=1;var e=Ep();return ts=function(r){return!!e(r)},ts}var rs,fc;function Rp(){if(fc)return rs;fc=1;var e=rn(),t=Yh(),r=t("TypedArray.prototype.buffer",!0),n=Sp();return rs=r||function(i){if(!n(i))throw new e("Not a Typed Array");return i.buffer},rs}var ns,hc;function Cp(){if(hc)return ns;hc=1;var e=ct().Buffer,t=z0(),r=Rp(),n=ArrayBuffer.isView||function(d){try{return r(d),!0}catch{return!1}},l=typeof Uint8Array<"u",i=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o=i&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return ns=function(d,u){if(e.isBuffer(d))return d.constructor&&!("isBuffer"in d)?e.from(d):d;if(typeof d=="string")return e.from(d,u);if(i&&n(d)){if(d.byteLength===0)return e.alloc(0);if(o){var p=e.from(d.buffer,d.byteOffset,d.byteLength);if(p.byteLength===d.byteLength)return p}var s=d instanceof Uint8Array?d:new Uint8Array(d.buffer,d.byteOffset,d.byteLength),f=e.from(s);if(f.length===d.byteLength)return f}if(l&&d instanceof Uint8Array)return e.from(d);var c=t(d);if(c)for(var g=0;g<d.length;g+=1){var _=d[g];if(typeof _!="number"||_<0||_>255||~~_!==_)throw new RangeError("Array items must be numbers in the range 0-255.")}if(c||e.isBuffer(d)&&d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d))return e.from(d);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},ns}var is,dc;function fr(){if(dc)return is;dc=1;var e=ct().Buffer,t=Cp();function r(n,l){this._block=e.alloc(n),this._finalSize=l,this._blockSize=n,this._len=0}return r.prototype.update=function(n,l){n=t(n,l||"utf8");for(var i=this._block,o=this._blockSize,a=n.length,d=this._len,u=0;u<a;){for(var p=d%o,s=Math.min(a-u,o-p),f=0;f<s;f++)i[p+f]=n[u+f];d+=s,u+=s,d%o===0&&this._update(i)}return this._len+=a,this},r.prototype.digest=function(n){var l=this._len%this._blockSize;this._block[l]=128,this._block.fill(0,l+1),l>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=this._len*8;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var o=(i&4294967295)>>>0,a=(i-o)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(o,this._blockSize-4)}this._update(this._block);var d=this._hash();return n?d.toString(n):d},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},is=r,is}var ss,pc;function Mp(){if(pc)return ss;pc=1;var e=tt(),t=fr(),r=ct().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function i(){this.init(),this._w=l,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(u){return u<<5|u>>>27}function a(u){return u<<30|u>>>2}function d(u,p,s,f){return u===0?p&s|~p&f:u===2?p&s|p&f|s&f:p^s^f}return i.prototype._update=function(u){for(var p=this._w,s=this._a|0,f=this._b|0,c=this._c|0,g=this._d|0,_=this._e|0,m=0;m<16;++m)p[m]=u.readInt32BE(m*4);for(;m<80;++m)p[m]=p[m-3]^p[m-8]^p[m-14]^p[m-16];for(var h=0;h<80;++h){var b=~~(h/20),w=o(s)+d(b,f,c,g)+_+p[h]+n[b]|0;_=g,g=c,c=a(f),f=s,s=w}this._a=s+this._a|0,this._b=f+this._b|0,this._c=c+this._c|0,this._d=g+this._d|0,this._e=_+this._e|0},i.prototype._hash=function(){var u=r.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},ss=i,ss}var os,gc;function kp(){if(gc)return os;gc=1;var e=tt(),t=fr(),r=ct().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function i(){this.init(),this._w=l,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(p){return p<<1|p>>>31}function a(p){return p<<5|p>>>27}function d(p){return p<<30|p>>>2}function u(p,s,f,c){return p===0?s&f|~s&c:p===2?s&f|s&c|f&c:s^f^c}return i.prototype._update=function(p){for(var s=this._w,f=this._a|0,c=this._b|0,g=this._c|0,_=this._d|0,m=this._e|0,h=0;h<16;++h)s[h]=p.readInt32BE(h*4);for(;h<80;++h)s[h]=o(s[h-3]^s[h-8]^s[h-14]^s[h-16]);for(var b=0;b<80;++b){var w=~~(b/20),I=a(f)+u(w,c,g,_)+m+s[b]+n[w]|0;m=_,_=g,g=d(c),c=f,f=I}this._a=f+this._a|0,this._b=c+this._b|0,this._c=g+this._c|0,this._d=_+this._d|0,this._e=m+this._e|0},i.prototype._hash=function(){var p=r.allocUnsafe(20);return p.writeInt32BE(this._a|0,0),p.writeInt32BE(this._b|0,4),p.writeInt32BE(this._c|0,8),p.writeInt32BE(this._d|0,12),p.writeInt32BE(this._e|0,16),p},os=i,os}var as,yc;function Xh(){if(yc)return as;yc=1;var e=tt(),t=fr(),r=ct().Buffer,n=[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],l=new Array(64);function i(){this.init(),this._w=l,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function o(f,c,g){return g^f&(c^g)}function a(f,c,g){return f&c|g&(f|c)}function d(f){return(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10)}function u(f){return(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7)}function p(f){return(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3}function s(f){return(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10}return i.prototype._update=function(f){for(var c=this._w,g=this._a|0,_=this._b|0,m=this._c|0,h=this._d|0,b=this._e|0,w=this._f|0,I=this._g|0,A=this._h|0,D=0;D<16;++D)c[D]=f.readInt32BE(D*4);for(;D<64;++D)c[D]=s(c[D-2])+c[D-7]+p(c[D-15])+c[D-16]|0;for(var F=0;F<64;++F){var W=A+u(b)+o(b,w,I)+n[F]+c[F]|0,J=d(g)+a(g,_,m)|0;A=I,I=w,w=b,b=h+W|0,h=m,m=_,_=g,g=W+J|0}this._a=g+this._a|0,this._b=_+this._b|0,this._c=m+this._c|0,this._d=h+this._d|0,this._e=b+this._e|0,this._f=w+this._f|0,this._g=I+this._g|0,this._h=A+this._h|0},i.prototype._hash=function(){var f=r.allocUnsafe(32);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f.writeInt32BE(this._h,28),f},as=i,as}var us,mc;function Ip(){if(mc)return us;mc=1;var e=tt(),t=Xh(),r=fr(),n=ct().Buffer,l=new Array(64);function i(){this.init(),this._w=l,r.call(this,64,56)}return e(i,t),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var o=n.allocUnsafe(28);return o.writeInt32BE(this._a,0),o.writeInt32BE(this._b,4),o.writeInt32BE(this._c,8),o.writeInt32BE(this._d,12),o.writeInt32BE(this._e,16),o.writeInt32BE(this._f,20),o.writeInt32BE(this._g,24),o},us=i,us}var cs,_c;function ed(){if(_c)return cs;_c=1;var e=tt(),t=fr(),r=ct().Buffer,n=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function i(){this.init(),this._w=l,t.call(this,128,112)}e(i,t),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function o(_,m,h){return h^_&(m^h)}function a(_,m,h){return _&m|h&(_|m)}function d(_,m){return(_>>>28|m<<4)^(m>>>2|_<<30)^(m>>>7|_<<25)}function u(_,m){return(_>>>14|m<<18)^(_>>>18|m<<14)^(m>>>9|_<<23)}function p(_,m){return(_>>>1|m<<31)^(_>>>8|m<<24)^_>>>7}function s(_,m){return(_>>>1|m<<31)^(_>>>8|m<<24)^(_>>>7|m<<25)}function f(_,m){return(_>>>19|m<<13)^(m>>>29|_<<3)^_>>>6}function c(_,m){return(_>>>19|m<<13)^(m>>>29|_<<3)^(_>>>6|m<<26)}function g(_,m){return _>>>0<m>>>0?1:0}return i.prototype._update=function(_){for(var m=this._w,h=this._ah|0,b=this._bh|0,w=this._ch|0,I=this._dh|0,A=this._eh|0,D=this._fh|0,F=this._gh|0,W=this._hh|0,J=this._al|0,ee=this._bl|0,Q=this._cl|0,re=this._dl|0,q=this._el|0,y=this._fl|0,S=this._gl|0,C=this._hl|0,M=0;M<32;M+=2)m[M]=_.readInt32BE(M*4),m[M+1]=_.readInt32BE(M*4+4);for(;M<160;M+=2){var x=m[M-30],L=m[M-30+1],j=p(x,L),T=s(L,x);x=m[M-4],L=m[M-4+1];var E=f(x,L),N=c(L,x),te=m[M-14],Y=m[M-14+1],U=m[M-32],$=m[M-32+1],G=T+Y|0,X=j+te+g(G,T)|0;G=G+N|0,X=X+E+g(G,N)|0,G=G+$|0,X=X+U+g(G,$)|0,m[M]=X,m[M+1]=G}for(var ne=0;ne<160;ne+=2){X=m[ne],G=m[ne+1];var P=a(h,b,w),B=a(J,ee,Q),Z=d(h,J),K=d(J,h),oe=u(A,q),ie=u(q,A),se=n[ne],de=n[ne+1],He=o(A,D,F),ge=o(q,y,S),ue=C+ie|0,me=W+oe+g(ue,C)|0;ue=ue+ge|0,me=me+He+g(ue,ge)|0,ue=ue+de|0,me=me+se+g(ue,de)|0,ue=ue+G|0,me=me+X+g(ue,G)|0;var pe=K+B|0,ye=Z+P+g(pe,K)|0;W=F,C=S,F=D,S=y,D=A,y=q,q=re+ue|0,A=I+me+g(q,re)|0,I=w,re=Q,w=b,Q=ee,b=h,ee=J,J=ue+pe|0,h=me+ye+g(J,ue)|0}this._al=this._al+J|0,this._bl=this._bl+ee|0,this._cl=this._cl+Q|0,this._dl=this._dl+re|0,this._el=this._el+q|0,this._fl=this._fl+y|0,this._gl=this._gl+S|0,this._hl=this._hl+C|0,this._ah=this._ah+h+g(this._al,J)|0,this._bh=this._bh+b+g(this._bl,ee)|0,this._ch=this._ch+w+g(this._cl,Q)|0,this._dh=this._dh+I+g(this._dl,re)|0,this._eh=this._eh+A+g(this._el,q)|0,this._fh=this._fh+D+g(this._fl,y)|0,this._gh=this._gh+F+g(this._gl,S)|0,this._hh=this._hh+W+g(this._hl,C)|0},i.prototype._hash=function(){var _=r.allocUnsafe(64);function m(h,b,w){_.writeInt32BE(h,w),_.writeInt32BE(b,w+4)}return m(this._ah,this._al,0),m(this._bh,this._bl,8),m(this._ch,this._cl,16),m(this._dh,this._dl,24),m(this._eh,this._el,32),m(this._fh,this._fl,40),m(this._gh,this._gl,48),m(this._hh,this._hl,56),_},cs=i,cs}var ls,vc;function xp(){if(vc)return ls;vc=1;var e=tt(),t=ed(),r=fr(),n=ct().Buffer,l=new Array(160);function i(){this.init(),this._w=l,r.call(this,128,112)}return e(i,t),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var o=n.allocUnsafe(48);function a(d,u,p){o.writeInt32BE(d,p),o.writeInt32BE(u,p+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),o},ls=i,ls}var bc;function Ap(){return bc||(bc=1,(function(e){e.exports=function(r){var n=r.toLowerCase(),l=e.exports[n];if(!l)throw new Error(n+" is not supported (we accept pull requests)");return new l},e.exports.sha=Mp(),e.exports.sha1=kp(),e.exports.sha224=Ip(),e.exports.sha256=Xh(),e.exports.sha384=xp(),e.exports.sha512=ed()})(oi)),oi.exports}var wc;function Ra(){if(wc)return Mr;wc=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.Session=void 0;const e=Ap(),t=ut(),r="session:id",n="session:secret",l="session:linked";let i=class td{constructor(a,d,u,p){this._storage=a,this._id=d||(0,t.randomBytesHex)(16),this._secret=u||(0,t.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!p}static load(a){const d=a.getItem(r),u=a.getItem(l),p=a.getItem(n);return d&&p?new td(a,d,p,u==="1"):null}static hash(a){return new e.sha256().update(a).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(a){this._linked=a,this.persistLinked()}save(){return this._storage.setItem(r,this._id),this._storage.setItem(n,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(l,this._linked?"1":"0")}};return Mr.Session=i,Mr}var Ir={},xr={},Ec;function Tp(){if(Ec)return xr;Ec=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.Cipher=void 0;const e=ut();let t=class{constructor(n){this.secret=n}async encrypt(n){const l=this.secret;if(l.length!==64)throw Error("secret must be 256 bits");const i=crypto.getRandomValues(new Uint8Array(12)),o=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(l),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=new TextEncoder,d=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},o,a.encode(n)),u=16,p=d.slice(d.byteLength-u),s=d.slice(0,d.byteLength-u),f=new Uint8Array(p),c=new Uint8Array(s),g=new Uint8Array([...i,...f,...c]);return(0,e.uint8ArrayToHex)(g)}async decrypt(n){const l=this.secret;if(l.length!==64)throw Error("secret must be 256 bits");return new Promise((i,o)=>{(async function(){const a=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(l),{name:"aes-gcm"},!1,["encrypt","decrypt"]),d=(0,e.hexStringToUint8Array)(n),u=d.slice(0,12),p=d.slice(12,28),s=d.slice(28),f=new Uint8Array([...s,...p]),c={name:"AES-GCM",iv:new Uint8Array(u)};try{const g=await window.crypto.subtle.decrypt(c,a,f),_=new TextDecoder;i(_.decode(g))}catch(g){o(g)}})()})}};return xr.Cipher=t,xr}var Ar={},Sc;function Pp(){if(Sc)return Ar;Sc=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.WalletLinkHTTP=void 0;let e=class{constructor(r,n,l){this.linkAPIUrl=r,this.sessionId=n;const i=`${n}:${l}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(r){return Promise.all(r.map(n=>fetch(`${this.linkAPIUrl}/events/${n.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(n=>console.error("Unabled to mark event as failed:",n))}async fetchUnseenEvents(){var r;const n=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(n.ok){const{events:l,error:i}=await n.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const o=(r=l?.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&r!==void 0?r:[];return this.markUnseenEventsAsSeen(o),o}throw new Error(`Check unseen events failed: ${n.status}`)}};return Ar.WalletLinkHTTP=e,Ar}var At={},Rc;function Bp(){if(Rc)return At;Rc=1,Object.defineProperty(At,"__esModule",{value:!0}),At.WalletLinkWebSocket=At.ConnectionState=void 0;var e;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(e||(At.ConnectionState=e={}));let t=class{setConnectionStateListener(n){this.connectionStateListener=n}setIncomingDataListener(n){this.incomingDataListener=n}constructor(n,l=WebSocket){this.WebSocketClass=l,this.webSocket=null,this.pendingData=[],this.url=n.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((n,l)=>{var i;let o;try{this.webSocket=o=new this.WebSocketClass(this.url)}catch(a){l(a);return}(i=this.connectionStateListener)===null||i===void 0||i.call(this,e.CONNECTING),o.onclose=a=>{var d;this.clearWebSocket(),l(new Error(`websocket error ${a.code}: ${a.reason}`)),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.DISCONNECTED)},o.onopen=a=>{var d;n(),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(p=>this.sendData(p)),this.pendingData=[])},o.onmessage=a=>{var d,u;if(a.data==="h")(d=this.incomingDataListener)===null||d===void 0||d.call(this,{type:"Heartbeat"});else try{const p=JSON.parse(a.data);(u=this.incomingDataListener)===null||u===void 0||u.call(this,p)}catch{}}})}disconnect(){var n;const{webSocket:l}=this;if(l){this.clearWebSocket(),(n=this.connectionStateListener)===null||n===void 0||n.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{l.close()}catch{}}}sendData(n){const{webSocket:l}=this;if(!l){this.pendingData.push(n),this.connect();return}l.send(n)}clearWebSocket(){const{webSocket:n}=this;n&&(this.webSocket=null,n.onclose=null,n.onerror=null,n.onmessage=null,n.onopen=null)}};return At.WalletLinkWebSocket=t,At}var Cc;function Lp(){if(Cc)return Ir;Cc=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.WalletLinkConnection=void 0;const e=Un(),t=Tp(),r=va(),n=ba(),l=Ra(),i=Pp(),o=Bp(),a=1e4,d=6e4;let u=class{constructor({session:s,linkAPIUrl:f,listener:c,diagnostic:g,WebSocketClass:_=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=h=>{if(!h)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",w=>h.JsonRpcUrl&&this.handleChainUpdated(w,h.JsonRpcUrl)]]).forEach((w,I)=>{const A=h[I];A!==void 0&&w(A)})},this.handleDestroyed=h=>{var b,w;h==="1"&&((b=this.listener)===null||b===void 0||b.resetAndReload(),(w=this.diagnostic)===null||w===void 0||w.log(r.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:l.Session.hash(this.session.id)}))},this.handleAccountUpdated=async h=>{var b,w;try{const I=await this.cipher.decrypt(h);(b=this.listener)===null||b===void 0||b.accountUpdated(I)}catch{(w=this.diagnostic)===null||w===void 0||w.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(h,b)=>{var w,I;try{const A=await this.cipher.decrypt(b);(w=this.listener)===null||w===void 0||w.metadataUpdated(h,A)}catch{(I=this.diagnostic)===null||I===void 0||I.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:h})}},this.handleWalletUsernameUpdated=async h=>{this.handleMetadataUpdated(n.WALLET_USER_NAME_KEY,h)},this.handleAppVersionUpdated=async h=>{this.handleMetadataUpdated(n.APP_VERSION_KEY,h)},this.handleChainUpdated=async(h,b)=>{var w,I;try{const A=await this.cipher.decrypt(h),D=await this.cipher.decrypt(b);(w=this.listener)===null||w===void 0||w.chainUpdated(A,D)}catch{(I=this.diagnostic)===null||I===void 0||I.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=s,this.cipher=new t.Cipher(s.secret),this.diagnostic=g,this.listener=c;const m=new o.WalletLinkWebSocket(`${f}/rpc`,_);m.setConnectionStateListener(async h=>{var b;(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.CONNECTED_STATE_CHANGE,{state:h,sessionIdHash:l.Session.hash(s.id)});let w=!1;switch(h){case o.ConnectionState.DISCONNECTED:if(!this.destroyed){const I=async()=>{await new Promise(A=>setTimeout(A,5e3)),this.destroyed||m.connect().catch(()=>{I()})};I()}break;case o.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),w=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},a),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case o.ConnectionState.CONNECTING:break}this.connected!==w&&(this.connected=w)}),m.setIncomingDataListener(h=>{var b,w,I;switch(h.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const A=h.type==="IsLinkedOK"?h.linked:void 0;(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.LINKED,{sessionIdHash:l.Session.hash(s.id),linked:A,type:h.type,onlineGuests:h.onlineGuests}),this.linked=A||h.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(w=this.diagnostic)===null||w===void 0||w.log(r.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:l.Session.hash(s.id),metadata_keys:h&&h.metadata?Object.keys(h.metadata):void 0}),this.handleSessionMetadataUpdated(h.metadata);break}case"Event":{this.handleIncomingEvent(h);break}}h.id!==void 0&&((I=this.requestResolutions.get(h.id))===null||I===void 0||I(h))}),this.ws=m,this.http=new i.WalletLinkHTTP(f,s.id,s.key)}connect(){var s;if(this.destroyed)throw new Error("instance is destroyed");(s=this.diagnostic)===null||s===void 0||s.log(r.EVENTS.STARTED_CONNECTING,{sessionIdHash:l.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var s;this.destroyed=!0,this.ws.disconnect(),(s=this.diagnostic)===null||s===void 0||s.log(r.EVENTS.DISCONNECTED,{sessionIdHash:l.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(s){var f,c;this._connected=s,s&&((f=this.onceConnected)===null||f===void 0||f.call(this)),(c=this.listener)===null||c===void 0||c.connectedUpdated(s)}setOnceConnected(s){return new Promise(f=>{this.connected?s().then(f):this.onceConnected=()=>{s().then(f),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(s){var f,c;this._linked=s,s&&((f=this.onceLinked)===null||f===void 0||f.call(this)),(c=this.listener)===null||c===void 0||c.linkedUpdated(s)}setOnceLinked(s){return new Promise(f=>{this.linked?s().then(f):this.onceLinked=()=>{s().then(f),this.onceLinked=void 0}})}async handleIncomingEvent(s){var f,c;if(!(s.type!=="Event"||s.event!=="Web3Response"))try{const g=await this.cipher.decrypt(s.data),_=JSON.parse(g);if(_.type!=="WEB3_RESPONSE")return;(f=this.listener)===null||f===void 0||f.handleWeb3ResponseMessage(_)}catch{(c=this.diagnostic)===null||c===void 0||c.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(s=>setTimeout(s,250));try{await this.fetchUnseenEventsAPI()}catch(s){console.error("Unable to check for unseen events",s)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(f=>this.handleIncomingEvent(f))}async setSessionMetadata(s,f){const c={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[s]:f}};return this.setOnceConnected(async()=>{const g=await this.makeRequest(c);if(g.type==="Fail")throw new Error(g.error||"failed to set session metadata")})}async publishEvent(s,f,c=!1){const g=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},f),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),_={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:s,data:g,callWebhook:c};return this.setOnceLinked(async()=>{const m=await this.makeRequest(_);if(m.type==="Fail")throw new Error(m.error||"failed to publish event");return m.eventId})}sendData(s){this.ws.sendData(JSON.stringify(s))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>a*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(s,f=d){const c=s.id;this.sendData(s);let g;return Promise.race([new Promise((_,m)=>{g=window.setTimeout(()=>{m(new Error(`request ${c} timed out`))},f)}),new Promise(_=>{this.requestResolutions.set(c,m=>{clearTimeout(g),_(m),this.requestResolutions.delete(c)})})])}async authenticate(){const s={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},f=await this.makeRequest(s);if(f.type==="Fail")throw new Error(f.error||"failed to authentcate")}sendIsLinked(){const s={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}sendGetSessionConfig(){const s={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}};return Ir.WalletLinkConnection=u,Ir}var Tr={},Tt={},mn={},Mc;function Np(){return Mc||(Mc=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),mn}var kc;function rd(){if(kc)return Tt;kc=1;var e=Tt&&Tt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.injectCssReset=void 0;const t=e(Np());function r(){const n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(t.default)),document.documentElement.appendChild(n)}return Tt.injectCssReset=r,Tt}var Pr={},on,Ee,nd,id,Zt,Ic,sd,od,ad,Ca,sa,oa,ud,en={},cd=[],Op=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,an=Array.isArray;function it(e,t){for(var r in t)e[r]=t[r];return e}function Ma(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function aa(e,t,r){var n,l,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?l=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?on.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return Yr(e,o,n,l,null)}function Yr(e,t,r,n,l){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:l??++nd,__i:-1,__u:0};return l==null&&Ee.vnode!=null&&Ee.vnode(i),i}function Fp(){return{current:null}}function un(e){return e.children}function Xr(e,t){this.props=e,this.context=t}function ar(e,t){if(t==null)return e.__?ar(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ar(e):null}function ld(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return ld(e)}}function ua(e){(!e.__d&&(e.__d=!0)&&Zt.push(e)&&!Ln.__r++||Ic!=Ee.debounceRendering)&&((Ic=Ee.debounceRendering)||sd)(Ln)}function Ln(){for(var e,t,r,n,l,i,o,a=1;Zt.length;)Zt.length>a&&Zt.sort(od),e=Zt.shift(),a=Zt.length,e.__d&&(r=void 0,n=void 0,l=(n=(t=e).__v).__e,i=[],o=[],t.__P&&((r=it({},n)).__v=n.__v+1,Ee.vnode&&Ee.vnode(r),ka(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[l]:null,i,l??ar(n),!!(32&n.__u),o),r.__v=n.__v,r.__.__k[r.__i]=r,pd(i,r,o),n.__e=n.__=null,r.__e!=l&&ld(r)));Ln.__r=0}function fd(e,t,r,n,l,i,o,a,d,u,p){var s,f,c,g,_,m,h,b=n&&n.__k||cd,w=t.length;for(d=qp(r,t,b,d,w),s=0;s<w;s++)(c=r.__k[s])!=null&&(f=c.__i==-1?en:b[c.__i]||en,c.__i=s,m=ka(e,c,f,l,i,o,a,d,u,p),g=c.__e,c.ref&&f.ref!=c.ref&&(f.ref&&Ia(f.ref,null,c),p.push(c.ref,c.__c||g,c)),_==null&&g!=null&&(_=g),(h=!!(4&c.__u))||f.__k===c.__k?d=hd(c,d,e,h):typeof c.type=="function"&&m!==void 0?d=m:g&&(d=g.nextSibling),c.__u&=-7);return r.__e=_,d}function qp(e,t,r,n,l){var i,o,a,d,u,p=r.length,s=p,f=0;for(e.__k=new Array(l),i=0;i<l;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=e.__k[i]=Yr(null,o,null,null,null):an(o)?o=e.__k[i]=Yr(un,{children:o},null,null,null):o.constructor==null&&o.__b>0?o=e.__k[i]=Yr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[i]=o,d=i+f,o.__=e,o.__b=e.__b+1,a=null,(u=o.__i=Dp(o,r,d,s))!=-1&&(s--,(a=r[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(l>p?f--:l<p&&f++),typeof o.type!="function"&&(o.__u|=4)):u!=d&&(u==d-1?f--:u==d+1?f++:(u>d?f--:f++,o.__u|=4))):e.__k[i]=null;if(s)for(i=0;i<p;i++)(a=r[i])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=ar(a)),yd(a,a));return n}function hd(e,t,r,n){var l,i;if(typeof e.type=="function"){for(l=e.__k,i=0;l&&i<l.length;i++)l[i]&&(l[i].__=e,t=hd(l[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=ar(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function dd(e,t){return t=t||[],e==null||typeof e=="boolean"||(an(e)?e.some(function(r){dd(r,t)}):t.push(e)),t}function Dp(e,t,r,n){var l,i,o,a=e.key,d=e.type,u=t[r],p=u!=null&&(2&u.__u)==0;if(u===null&&a==null||p&&a==u.key&&d==u.type)return r;if(n>(p?1:0)){for(l=r-1,i=r+1;l>=0||i<t.length;)if((u=t[o=l>=0?l--:i++])!=null&&(2&u.__u)==0&&a==u.key&&d==u.type)return o}return-1}function xc(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Op.test(t)?r:r+"px"}function _n(e,t,r,n,l){var i,o;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||xc(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||xc(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ad,"$1")),o=t.toLowerCase(),t=o in e||t=="onFocusOut"||t=="onFocusIn"?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=Ca,e.addEventListener(t,i?oa:sa,i)):e.removeEventListener(t,i?oa:sa,i);else{if(l=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Ac(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=Ca++;else if(t.t<r.u)return;return r(Ee.event?Ee.event(t):t)}}}function ka(e,t,r,n,l,i,o,a,d,u){var p,s,f,c,g,_,m,h,b,w,I,A,D,F,W,J,ee,Q=t.type;if(t.constructor!=null)return null;128&r.__u&&(d=!!(32&r.__u),i=[a=t.__e=r.__e]),(p=Ee.__b)&&p(t);e:if(typeof Q=="function")try{if(h=t.props,b="prototype"in Q&&Q.prototype.render,w=(p=Q.contextType)&&n[p.__c],I=p?w?w.props.value:p.__:n,r.__c?m=(s=t.__c=r.__c).__=s.__E:(b?t.__c=s=new Q(h,I):(t.__c=s=new Xr(h,I),s.constructor=Q,s.render=Up),w&&w.sub(s),s.state||(s.state={}),s.__n=n,f=s.__d=!0,s.__h=[],s._sb=[]),b&&s.__s==null&&(s.__s=s.state),b&&Q.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=it({},s.__s)),it(s.__s,Q.getDerivedStateFromProps(h,s.__s))),c=s.props,g=s.state,s.__v=t,f)b&&Q.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),b&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(b&&Q.getDerivedStateFromProps==null&&h!==c&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(h,I),t.__v==r.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(h,s.__s,I)===!1){for(t.__v!=r.__v&&(s.props=h,s.state=s.__s,s.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(re){re&&(re.__=t)}),A=0;A<s._sb.length;A++)s.__h.push(s._sb[A]);s._sb=[],s.__h.length&&o.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(h,s.__s,I),b&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(c,g,_)})}if(s.context=I,s.props=h,s.__P=e,s.__e=!1,D=Ee.__r,F=0,b){for(s.state=s.__s,s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),W=0;W<s._sb.length;W++)s.__h.push(s._sb[W]);s._sb=[]}else do s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++F<25);s.state=s.__s,s.getChildContext!=null&&(n=it(it({},n),s.getChildContext())),b&&!f&&s.getSnapshotBeforeUpdate!=null&&(_=s.getSnapshotBeforeUpdate(c,g)),J=p,p!=null&&p.type===un&&p.key==null&&(J=gd(p.props.children)),a=fd(e,an(J)?J:[J],t,r,n,l,i,o,a,d,u),s.base=t.__e,t.__u&=-161,s.__h.length&&o.push(s),m&&(s.__E=s.__=null)}catch(re){if(t.__v=null,d||i!=null)if(re.then){for(t.__u|=d?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else{for(ee=i.length;ee--;)Ma(i[ee]);ca(t)}else t.__e=r.__e,t.__k=r.__k,re.then||ca(t);Ee.__e(re,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=jp(r.__e,t,r,n,l,i,o,d,u);return(p=Ee.diffed)&&p(t),128&t.__u?void 0:a}function ca(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(ca)}function pd(e,t,r){for(var n=0;n<r.length;n++)Ia(r[n],r[++n],r[++n]);Ee.__c&&Ee.__c(t,e),e.some(function(l){try{e=l.__h,l.__h=[],e.some(function(i){i.call(l)})}catch(i){Ee.__e(i,l.__v)}})}function gd(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:an(e)?e.map(gd):it({},e)}function jp(e,t,r,n,l,i,o,a,d){var u,p,s,f,c,g,_,m=r.props||en,h=t.props,b=t.type;if(b=="svg"?l="http://www.w3.org/2000/svg":b=="math"?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((c=i[u])&&"setAttribute"in c==!!b&&(b?c.localName==b:c.nodeType==3)){e=c,i[u]=null;break}}if(e==null){if(b==null)return document.createTextNode(h);e=document.createElementNS(l,b,h.is&&h),a&&(Ee.__m&&Ee.__m(t,i),a=!1),i=null}if(b==null)m===h||a&&e.data==h||(e.data=h);else{if(i=i&&on.call(e.childNodes),!a&&i!=null)for(m={},u=0;u<e.attributes.length;u++)m[(c=e.attributes[u]).name]=c.value;for(u in m)if(c=m[u],u!="children"){if(u=="dangerouslySetInnerHTML")s=c;else if(!(u in h)){if(u=="value"&&"defaultValue"in h||u=="checked"&&"defaultChecked"in h)continue;_n(e,u,null,c,l)}}for(u in h)c=h[u],u=="children"?f=c:u=="dangerouslySetInnerHTML"?p=c:u=="value"?g=c:u=="checked"?_=c:a&&typeof c!="function"||m[u]===c||_n(e,u,c,m[u],l);if(p)a||s&&(p.__html==s.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(s&&(e.innerHTML=""),fd(t.type=="template"?e.content:e,an(f)?f:[f],t,r,n,b=="foreignObject"?"http://www.w3.org/1999/xhtml":l,i,o,i?i[0]:r.__k&&ar(r,0),a,d),i!=null)for(u=i.length;u--;)Ma(i[u]);a||(u="value",b=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[u]||b=="progress"&&!g||b=="option"&&g!=m[u])&&_n(e,u,g,m[u],l),u="checked",_!=null&&_!=e[u]&&_n(e,u,_,m[u],l))}return e}function Ia(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(l){Ee.__e(l,r)}}function yd(e,t,r){var n,l;if(Ee.unmount&&Ee.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Ia(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){Ee.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(l=0;l<n.length;l++)n[l]&&yd(n[l],t,r||typeof e.type!="function");r||Ma(e.__e),e.__c=e.__=e.__e=void 0}function Up(e,t,r){return this.constructor(e,r)}function md(e,t,r){var n,l,i,o;t==document&&(t=document.documentElement),Ee.__&&Ee.__(e,t),l=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],ka(t,e=(!n&&r||t).__k=aa(un,null,[e]),l||en,en,t.namespaceURI,!n&&r?[r]:l?null:t.firstChild?on.call(t.childNodes):null,i,!n&&r?r:l?l.__e:t.firstChild,n,o),pd(i,e,o)}function _d(e,t){md(e,t,_d)}function Hp(e,t,r){var n,l,i,o,a=it({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?l=t[i]:a[i]=t[i]===void 0&&o!=null?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?on.call(arguments,2):r),Yr(e.type,a,n||e.key,l||e.ref,null)}function Wp(e){function t(r){var n,l;return this.getChildContext||(n=new Set,(l={})[t.__c]=this,this.getChildContext=function(){return l},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(o){o.__e=!0,ua(o)})},this.sub=function(i){n.add(i);var o=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),o&&o.call(i)}}),r.children}return t.__c="__cC"+ud++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}on=cd.slice,Ee={__e:function(e,t,r,n){for(var l,i,o;t=t.__;)if((l=t.__c)&&!l.__)try{if((i=l.constructor)&&i.getDerivedStateFromError!=null&&(l.setState(i.getDerivedStateFromError(e)),o=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(e,n||{}),o=l.__d),o)return l.__E=l}catch(a){e=a}throw e}},nd=0,id=function(e){return e!=null&&e.constructor==null},Xr.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=it({},this.state),typeof e=="function"&&(e=e(it({},r),this.props)),e&&it(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),ua(this))},Xr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ua(this))},Xr.prototype.render=un,Zt=[],sd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,od=function(e,t){return e.__v.__b-t.__v.__b},Ln.__r=0,ad=/(PointerCapture)$|Capture$/i,Ca=0,sa=Ac(!1),oa=Ac(!0),ud=0;const $p=Object.freeze(Object.defineProperty({__proto__:null,Component:Xr,Fragment:un,cloneElement:Hp,createContext:Wp,createElement:aa,createRef:Fp,h:aa,hydrate:_d,get isValidElement(){return id},get options(){return Ee},render:md,toChildArray:dd},Symbol.toStringTag,{value:"Module"})),Ge=tn($p);var Pt={};function vd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=vd(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Tc(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=vd(e))&&(n&&(n+=" "),n+=t);return n}const Vp=Object.freeze(Object.defineProperty({__proto__:null,clsx:Tc,default:Tc},Symbol.toStringTag,{value:"Module"})),cn=tn(Vp);var at,we,fs,Pc,ur=0,bd=[],je=Ee,Bc=je.__b,Lc=je.__r,Nc=je.diffed,Oc=je.__c,Fc=je.unmount,qc=je.__;function Kt(e,t){je.__h&&je.__h(we,e,ur||t),ur=0;var r=we.__H||(we.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function wd(e){return ur=1,Ed(Rd,e)}function Ed(e,t,r){var n=Kt(at++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Rd(void 0,t),function(a){var d=n.__N?n.__N[0]:n.__[0],u=n.t(d,a);d!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=we,!we.__f)){var l=function(a,d,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,a,d,u);var s=n.__c.props!==a;return p.forEach(function(f){if(f.__N){var c=f.__[0];f.__=f.__N,f.__N=void 0,c!==f.__[0]&&(s=!0)}}),i&&i.call(this,a,d,u)||s};we.__f=!0;var i=we.shouldComponentUpdate,o=we.componentWillUpdate;we.componentWillUpdate=function(a,d,u){if(this.__e){var p=i;i=void 0,l(a,d,u),i=p}o&&o.call(this,a,d,u)},we.shouldComponentUpdate=l}return n.__N||n.__}function zp(e,t){var r=Kt(at++,3);!je.__s&&Aa(r.__H,t)&&(r.__=e,r.u=t,we.__H.__h.push(r))}function Sd(e,t){var r=Kt(at++,4);!je.__s&&Aa(r.__H,t)&&(r.__=e,r.u=t,we.__h.push(r))}function Gp(e){return ur=5,xa(function(){return{current:e}},[])}function Jp(e,t,r){ur=6,Sd(function(){if(typeof e=="function"){var n=e(t());return function(){e(null),n&&typeof n=="function"&&n()}}if(e)return e.current=t(),function(){return e.current=null}},r==null?r:r.concat(e))}function xa(e,t){var r=Kt(at++,7);return Aa(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Zp(e,t){return ur=8,xa(function(){return e},t)}function Kp(e){var t=we.context[e.__c],r=Kt(at++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(we)),t.props.value):e.__}function Qp(e,t){je.useDebugValue&&je.useDebugValue(t?t(e):e)}function Yp(e){var t=Kt(at++,10),r=wd();return t.__=e,we.componentDidCatch||(we.componentDidCatch=function(n,l){t.__&&t.__(n,l),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Xp(){var e=Kt(at++,11);if(!e.__){for(var t=we.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function eg(){for(var e;e=bd.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Bn),e.__H.__h.forEach(la),e.__H.__h=[]}catch(t){e.__H.__h=[],je.__e(t,e.__v)}}je.__b=function(e){we=null,Bc&&Bc(e)},je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qc&&qc(e,t)},je.__r=function(e){Lc&&Lc(e),at=0;var t=(we=e.__c).__H;t&&(fs===we?(t.__h=[],we.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Bn),t.__h.forEach(la),t.__h=[],at=0)),fs=we},je.diffed=function(e){Nc&&Nc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bd.push(t)!==1&&Pc===je.requestAnimationFrame||((Pc=je.requestAnimationFrame)||tg)(eg)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),fs=we=null},je.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Bn),r.__h=r.__h.filter(function(n){return!n.__||la(n)})}catch(n){t.some(function(l){l.__h&&(l.__h=[])}),t=[],je.__e(n,r.__v)}}),Oc&&Oc(e,t)},je.unmount=function(e){Fc&&Fc(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Bn(n)}catch(l){t=l}}),r.__H=void 0,t&&je.__e(t,r.__v))};var Dc=typeof requestAnimationFrame=="function";function tg(e){var t,r=function(){clearTimeout(n),Dc&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);Dc&&(t=requestAnimationFrame(r))}function Bn(e){var t=we,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),we=t}function la(e){var t=we;e.__c=e.__(),we=t}function Aa(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Rd(e,t){return typeof t=="function"?t(e):t}const rg=Object.freeze(Object.defineProperty({__proto__:null,useCallback:Zp,useContext:Kp,useDebugValue:Qp,useEffect:zp,useErrorBoundary:Yp,useId:Xp,useImperativeHandle:Jp,useLayoutEffect:Sd,useMemo:xa,useReducer:Ed,useRef:Gp,useState:wd},Symbol.toStringTag,{value:"Module"})),$n=tn(rg);var st={},Br={},jc;function ng(){if(jc)return Br;jc=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.CloseIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return Br.CloseIcon=t,Br}var Lr={},Uc;function ig(){if(Uc)return Lr;Uc=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.CoinbaseWalletRound=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return Lr.CoinbaseWalletRound=t,Lr}var Nr={},Hc;function sg(){if(Hc)return Nr;Hc=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.QRCodeIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return Nr.QRCodeIcon=t,Nr}var Bt={},hs,Wc;function og(){if(Wc)return hs;Wc=1;function e(c){this.mode=r.MODE_8BIT_BYTE,this.data=c,this.parsedData=[];for(var g=0,_=this.data.length;g<_;g++){var m=[],h=this.data.charCodeAt(g);h>65536?(m[0]=240|(h&1835008)>>>18,m[1]=128|(h&258048)>>>12,m[2]=128|(h&4032)>>>6,m[3]=128|h&63):h>2048?(m[0]=224|(h&61440)>>>12,m[1]=128|(h&4032)>>>6,m[2]=128|h&63):h>128?(m[0]=192|(h&1984)>>>6,m[1]=128|h&63):m[0]=h,this.parsedData.push(m)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(c){return this.parsedData.length},write:function(c){for(var g=0,_=this.parsedData.length;g<_;g++)c.put(this.parsedData[g],8)}};function t(c,g){this.typeNumber=c,this.errorCorrectLevel=g,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={addData:function(c){var g=new e(c);this.dataList.push(g),this.dataCache=null},isDark:function(c,g){if(c<0||this.moduleCount<=c||g<0||this.moduleCount<=g)throw new Error(c+","+g);return this.modules[c][g]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(c,g){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var _=0;_<this.moduleCount;_++){this.modules[_]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[_][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(c,g),this.typeNumber>=7&&this.setupTypeNumber(c),this.dataCache==null&&(this.dataCache=t.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,g)},setupPositionProbePattern:function(c,g){for(var _=-1;_<=7;_++)if(!(c+_<=-1||this.moduleCount<=c+_))for(var m=-1;m<=7;m++)g+m<=-1||this.moduleCount<=g+m||(0<=_&&_<=6&&(m==0||m==6)||0<=m&&m<=6&&(_==0||_==6)||2<=_&&_<=4&&2<=m&&m<=4?this.modules[c+_][g+m]=!0:this.modules[c+_][g+m]=!1)},getBestMaskPattern:function(){for(var c=0,g=0,_=0;_<8;_++){this.makeImpl(!0,_);var m=i.getLostPoint(this);(_==0||c>m)&&(c=m,g=_)}return g},createMovieClip:function(c,g,_){var m=c.createEmptyMovieClip(g,_),h=1;this.make();for(var b=0;b<this.modules.length;b++)for(var w=b*h,I=0;I<this.modules[b].length;I++){var A=I*h,D=this.modules[b][I];D&&(m.beginFill(0,100),m.moveTo(A,w),m.lineTo(A+h,w),m.lineTo(A+h,w+h),m.lineTo(A,w+h),m.endFill())}return m},setupTimingPattern:function(){for(var c=8;c<this.moduleCount-8;c++)this.modules[c][6]==null&&(this.modules[c][6]=c%2==0);for(var g=8;g<this.moduleCount-8;g++)this.modules[6][g]==null&&(this.modules[6][g]=g%2==0)},setupPositionAdjustPattern:function(){for(var c=i.getPatternPosition(this.typeNumber),g=0;g<c.length;g++)for(var _=0;_<c.length;_++){var m=c[g],h=c[_];if(this.modules[m][h]==null)for(var b=-2;b<=2;b++)for(var w=-2;w<=2;w++)b==-2||b==2||w==-2||w==2||b==0&&w==0?this.modules[m+b][h+w]=!0:this.modules[m+b][h+w]=!1}},setupTypeNumber:function(c){for(var g=i.getBCHTypeNumber(this.typeNumber),_=0;_<18;_++){var m=!c&&(g>>_&1)==1;this.modules[Math.floor(_/3)][_%3+this.moduleCount-8-3]=m}for(var _=0;_<18;_++){var m=!c&&(g>>_&1)==1;this.modules[_%3+this.moduleCount-8-3][Math.floor(_/3)]=m}},setupTypeInfo:function(c,g){for(var _=this.errorCorrectLevel<<3|g,m=i.getBCHTypeInfo(_),h=0;h<15;h++){var b=!c&&(m>>h&1)==1;h<6?this.modules[h][8]=b:h<8?this.modules[h+1][8]=b:this.modules[this.moduleCount-15+h][8]=b}for(var h=0;h<15;h++){var b=!c&&(m>>h&1)==1;h<8?this.modules[8][this.moduleCount-h-1]=b:h<9?this.modules[8][15-h-1+1]=b:this.modules[8][15-h-1]=b}this.modules[this.moduleCount-8][8]=!c},mapData:function(c,g){for(var _=-1,m=this.moduleCount-1,h=7,b=0,w=this.moduleCount-1;w>0;w-=2)for(w==6&&w--;;){for(var I=0;I<2;I++)if(this.modules[m][w-I]==null){var A=!1;b<c.length&&(A=(c[b]>>>h&1)==1);var D=i.getMask(g,m,w-I);D&&(A=!A),this.modules[m][w-I]=A,h--,h==-1&&(b++,h=7)}if(m+=_,m<0||this.moduleCount<=m){m-=_,_=-_;break}}}},t.PAD0=236,t.PAD1=17,t.createData=function(c,g,_){for(var m=u.getRSBlocks(c,g),h=new p,b=0;b<_.length;b++){var w=_[b];h.put(w.mode,4),h.put(w.getLength(),i.getLengthInBits(w.mode,c)),w.write(h)}for(var I=0,b=0;b<m.length;b++)I+=m[b].dataCount;if(h.getLengthInBits()>I*8)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+I*8+")");for(h.getLengthInBits()+4<=I*8&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;!(h.getLengthInBits()>=I*8||(h.put(t.PAD0,8),h.getLengthInBits()>=I*8));)h.put(t.PAD1,8);return t.createBytes(h,m)},t.createBytes=function(c,g){for(var _=0,m=0,h=0,b=new Array(g.length),w=new Array(g.length),I=0;I<g.length;I++){var A=g[I].dataCount,D=g[I].totalCount-A;m=Math.max(m,A),h=Math.max(h,D),b[I]=new Array(A);for(var F=0;F<b[I].length;F++)b[I][F]=255&c.buffer[F+_];_+=A;var W=i.getErrorCorrectPolynomial(D),J=new d(b[I],W.getLength()-1),ee=J.mod(W);w[I]=new Array(W.getLength()-1);for(var F=0;F<w[I].length;F++){var Q=F+ee.getLength()-w[I].length;w[I][F]=Q>=0?ee.get(Q):0}}for(var re=0,F=0;F<g.length;F++)re+=g[F].totalCount;for(var q=new Array(re),y=0,F=0;F<m;F++)for(var I=0;I<g.length;I++)F<b[I].length&&(q[y++]=b[I][F]);for(var F=0;F<h;F++)for(var I=0;I<g.length;I++)F<w[I].length&&(q[y++]=w[I][F]);return q};for(var r={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(c){for(var g=c<<10;i.getBCHDigit(g)-i.getBCHDigit(i.G15)>=0;)g^=i.G15<<i.getBCHDigit(g)-i.getBCHDigit(i.G15);return(c<<10|g)^i.G15_MASK},getBCHTypeNumber:function(c){for(var g=c<<12;i.getBCHDigit(g)-i.getBCHDigit(i.G18)>=0;)g^=i.G18<<i.getBCHDigit(g)-i.getBCHDigit(i.G18);return c<<12|g},getBCHDigit:function(c){for(var g=0;c!=0;)g++,c>>>=1;return g},getPatternPosition:function(c){return i.PATTERN_POSITION_TABLE[c-1]},getMask:function(c,g,_){switch(c){case l.PATTERN000:return(g+_)%2==0;case l.PATTERN001:return g%2==0;case l.PATTERN010:return _%3==0;case l.PATTERN011:return(g+_)%3==0;case l.PATTERN100:return(Math.floor(g/2)+Math.floor(_/3))%2==0;case l.PATTERN101:return g*_%2+g*_%3==0;case l.PATTERN110:return(g*_%2+g*_%3)%2==0;case l.PATTERN111:return(g*_%3+(g+_)%2)%2==0;default:throw new Error("bad maskPattern:"+c)}},getErrorCorrectPolynomial:function(c){for(var g=new d([1],0),_=0;_<c;_++)g=g.multiply(new d([1,o.gexp(_)],0));return g},getLengthInBits:function(c,g){if(1<=g&&g<10)switch(c){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:return 8;case r.MODE_KANJI:return 8;default:throw new Error("mode:"+c)}else if(g<27)switch(c){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+c)}else if(g<41)switch(c){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+c)}else throw new Error("type:"+g)},getLostPoint:function(c){for(var g=c.getModuleCount(),_=0,m=0;m<g;m++)for(var h=0;h<g;h++){for(var b=0,w=c.isDark(m,h),I=-1;I<=1;I++)if(!(m+I<0||g<=m+I))for(var A=-1;A<=1;A++)h+A<0||g<=h+A||I==0&&A==0||w==c.isDark(m+I,h+A)&&b++;b>5&&(_+=3+b-5)}for(var m=0;m<g-1;m++)for(var h=0;h<g-1;h++){var D=0;c.isDark(m,h)&&D++,c.isDark(m+1,h)&&D++,c.isDark(m,h+1)&&D++,c.isDark(m+1,h+1)&&D++,(D==0||D==4)&&(_+=3)}for(var m=0;m<g;m++)for(var h=0;h<g-6;h++)c.isDark(m,h)&&!c.isDark(m,h+1)&&c.isDark(m,h+2)&&c.isDark(m,h+3)&&c.isDark(m,h+4)&&!c.isDark(m,h+5)&&c.isDark(m,h+6)&&(_+=40);for(var h=0;h<g;h++)for(var m=0;m<g-6;m++)c.isDark(m,h)&&!c.isDark(m+1,h)&&c.isDark(m+2,h)&&c.isDark(m+3,h)&&c.isDark(m+4,h)&&!c.isDark(m+5,h)&&c.isDark(m+6,h)&&(_+=40);for(var F=0,h=0;h<g;h++)for(var m=0;m<g;m++)c.isDark(m,h)&&F++;var W=Math.abs(100*F/g/g-50)/5;return _+=W*10,_}},o={glog:function(c){if(c<1)throw new Error("glog("+c+")");return o.LOG_TABLE[c]},gexp:function(c){for(;c<0;)c+=255;for(;c>=256;)c-=255;return o.EXP_TABLE[c]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},a=0;a<8;a++)o.EXP_TABLE[a]=1<<a;for(var a=8;a<256;a++)o.EXP_TABLE[a]=o.EXP_TABLE[a-4]^o.EXP_TABLE[a-5]^o.EXP_TABLE[a-6]^o.EXP_TABLE[a-8];for(var a=0;a<255;a++)o.LOG_TABLE[o.EXP_TABLE[a]]=a;function d(c,g){if(c.length==null)throw new Error(c.length+"/"+g);for(var _=0;_<c.length&&c[_]==0;)_++;this.num=new Array(c.length-_+g);for(var m=0;m<c.length-_;m++)this.num[m]=c[m+_]}d.prototype={get:function(c){return this.num[c]},getLength:function(){return this.num.length},multiply:function(c){for(var g=new Array(this.getLength()+c.getLength()-1),_=0;_<this.getLength();_++)for(var m=0;m<c.getLength();m++)g[_+m]^=o.gexp(o.glog(this.get(_))+o.glog(c.get(m)));return new d(g,0)},mod:function(c){if(this.getLength()-c.getLength()<0)return this;for(var g=o.glog(this.get(0))-o.glog(c.get(0)),_=new Array(this.getLength()),m=0;m<this.getLength();m++)_[m]=this.get(m);for(var m=0;m<c.getLength();m++)_[m]^=o.gexp(o.glog(c.get(m))+g);return new d(_,0).mod(c)}};function u(c,g){this.totalCount=c,this.dataCount=g}u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(c,g){var _=u.getRsBlockTable(c,g);if(_==null)throw new Error("bad rs block @ typeNumber:"+c+"/errorCorrectLevel:"+g);for(var m=_.length/3,h=[],b=0;b<m;b++)for(var w=_[b*3+0],I=_[b*3+1],A=_[b*3+2],D=0;D<w;D++)h.push(new u(I,A));return h},u.getRsBlockTable=function(c,g){switch(g){case n.L:return u.RS_BLOCK_TABLE[(c-1)*4+0];case n.M:return u.RS_BLOCK_TABLE[(c-1)*4+1];case n.Q:return u.RS_BLOCK_TABLE[(c-1)*4+2];case n.H:return u.RS_BLOCK_TABLE[(c-1)*4+3];default:return}};function p(){this.buffer=[],this.length=0}p.prototype={get:function(c){var g=Math.floor(c/8);return(this.buffer[g]>>>7-c%8&1)==1},put:function(c,g){for(var _=0;_<g;_++)this.putBit((c>>>g-_-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(c){var g=Math.floor(this.length/8);this.buffer.length<=g&&this.buffer.push(0),c&&(this.buffer[g]|=128>>>this.length%8),this.length++}};var s=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function f(c){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof c=="string"&&(c={content:c}),c)for(var g in c)this.options[g]=c[g];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function _(A){switch(A){case"L":return n.L;case"M":return n.M;case"Q":return n.Q;case"H":return n.H;default:throw new Error("Unknwon error correction level: "+A)}}function m(A,D){for(var F=h(A),W=1,J=0,ee=0,Q=s.length;ee<=Q;ee++){var re=s[ee];if(!re)throw new Error("Content too long: expected "+J+" but got "+F);switch(D){case"L":J=re[0];break;case"M":J=re[1];break;case"Q":J=re[2];break;case"H":J=re[3];break;default:throw new Error("Unknwon error correction level: "+D)}if(F<=J)break;W++}if(W>s.length)throw new Error("Content too long");return W}function h(A){var D=encodeURI(A).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return D.length+(D.length!=A?3:0)}var b=this.options.content,w=m(b,this.options.ecl),I=_(this.options.ecl);this.qrcode=new t(w,I),this.qrcode.addData(b),this.qrcode.make()}return f.prototype.svg=function(c){var g=this.options||{},_=this.qrcode.modules;typeof c>"u"&&(c={container:g.container||"svg"});for(var m=typeof g.pretty<"u"?!!g.pretty:!0,h=m?" ":"",b=m?`\r
1
+ import{r as ga,c as ft,g as tn,b as Fn,a as N0}from"./index-M2-JjL84.js";function O0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const l in n)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(n,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>n[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ri={},gr={},yr={},Ka;function F0(){if(Ka)return yr;Ka=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.walletLogo=void 0;const e=(t,r)=>{let n;switch(t){case"standard":return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return n=r,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${r}' height='${n}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return yr.walletLogo=e,yr}var mr={},Qa;function q0(){return Qa||(Qa=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.LINK_API_URL=void 0,mr.LINK_API_URL="https://www.walletlink.org"),mr}var ae={},Pn={exports:{}},D0=Pn.exports,Ya;function qn(){return Ya||(Ya=1,(function(e){(function(t,r){function n(q,y){if(!q)throw new Error(y||"Assertion failed")}function l(q,y){q.super_=y;var S=function(){};S.prototype=y.prototype,q.prototype=new S,q.prototype.constructor=q}function i(q,y,S){if(i.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((y==="le"||y==="be")&&(S=y,y=10),this._init(q||0,y||10,S||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ga.Buffer}catch{}i.isBN=function(y){return y instanceof i?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===i.wordSize&&Array.isArray(y.words)},i.max=function(y,S){return y.cmp(S)>0?y:S},i.min=function(y,S){return y.cmp(S)<0?y:S},i.prototype._init=function(y,S,C){if(typeof y=="number")return this._initNumber(y,S,C);if(typeof y=="object")return this._initArray(y,S,C);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),y=y.toString().replace(/\s+/g,"");var M=0;y[0]==="-"&&(M++,this.negative=1),M<y.length&&(S===16?this._parseHex(y,M,C):(this._parseBase(y,S,M),C==="le"&&this._initArray(this.toArray(),S,C)))},i.prototype._initNumber=function(y,S,C){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(n(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),S,C)},i.prototype._initArray=function(y,S,C){if(n(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var x,L,j=0;if(C==="be")for(M=y.length-1,x=0;M>=0;M-=3)L=y[M]|y[M-1]<<8|y[M-2]<<16,this.words[x]|=L<<j&67108863,this.words[x+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,x++);else if(C==="le")for(M=0,x=0;M<y.length;M+=3)L=y[M]|y[M+1]<<8|y[M+2]<<16,this.words[x]|=L<<j&67108863,this.words[x+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,x++);return this._strip()};function a(q,y){var S=q.charCodeAt(y);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+q)}function d(q,y,S){var C=a(q,S);return S-1>=y&&(C|=a(q,S-1)<<4),C}i.prototype._parseHex=function(y,S,C){this.length=Math.ceil((y.length-S)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var x=0,L=0,j;if(C==="be")for(M=y.length-1;M>=S;M-=2)j=d(y,S,M)<<x,this.words[L]|=j&67108863,x>=18?(x-=18,L+=1,this.words[L]|=j>>>26):x+=8;else{var T=y.length-S;for(M=T%2===0?S+1:S;M<y.length;M+=2)j=d(y,S,M)<<x,this.words[L]|=j&67108863,x>=18?(x-=18,L+=1,this.words[L]|=j>>>26):x+=8}this._strip()};function u(q,y,S,C){for(var M=0,x=0,L=Math.min(q.length,S),j=y;j<L;j++){var T=q.charCodeAt(j)-48;M*=C,T>=49?x=T-49+10:T>=17?x=T-17+10:x=T,n(T>=0&&x<C,"Invalid character"),M+=x}return M}i.prototype._parseBase=function(y,S,C){this.words=[0],this.length=1;for(var M=0,x=1;x<=67108863;x*=S)M++;M--,x=x/S|0;for(var L=y.length-C,j=L%M,T=Math.min(L,L-j)+C,E=0,N=C;N<T;N+=M)E=u(y,N,N+M,S),this.imuln(x),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(j!==0){var te=1;for(E=u(y,N,y.length,S),N=0;N<j;N++)te*=S;this.imuln(te),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},i.prototype.copy=function(y){y.words=new Array(this.length);for(var S=0;S<this.length;S++)y.words[S]=this.words[S];y.length=this.length,y.negative=this.negative,y.red=this.red};function p(q,y){q.words=y.words,q.length=y.length,q.negative=y.negative,q.red=y.red}if(i.prototype._move=function(y){p(y,this)},i.prototype.clone=function(){var y=new i(null);return this.copy(y),y},i.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch{i.prototype.inspect=s}else i.prototype.inspect=s;function s(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(y,S){y=y||10,S=S|0||1;var C;if(y===16||y==="hex"){C="";for(var M=0,x=0,L=0;L<this.length;L++){var j=this.words[L],T=((j<<M|x)&16777215).toString(16);x=j>>>24-M&16777215,M+=2,M>=26&&(M-=26,L--),x!==0||L!==this.length-1?C=f[6-T.length]+T+C:C=T+C}for(x!==0&&(C=x.toString(16)+C);C.length%S!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(y===(y|0)&&y>=2&&y<=36){var E=c[y],N=g[y];C="";var te=this.clone();for(te.negative=0;!te.isZero();){var Y=te.modrn(N).toString(y);te=te.idivn(N),te.isZero()?C=Y+C:C=f[E-Y.length]+Y+C}for(this.isZero()&&(C="0"+C);C.length%S!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(y,S){return this.toArrayLike(o,y,S)}),i.prototype.toArray=function(y,S){return this.toArrayLike(Array,y,S)};var _=function(y,S){return y.allocUnsafe?y.allocUnsafe(S):new y(S)};i.prototype.toArrayLike=function(y,S,C){this._strip();var M=this.byteLength(),x=C||Math.max(1,M);n(M<=x,"byte array longer than desired length"),n(x>0,"Requested array length <= 0");var L=_(y,x),j=S==="le"?"LE":"BE";return this["_toArrayLike"+j](L,M),L},i.prototype._toArrayLikeLE=function(y,S){for(var C=0,M=0,x=0,L=0;x<this.length;x++){var j=this.words[x]<<L|M;y[C++]=j&255,C<y.length&&(y[C++]=j>>8&255),C<y.length&&(y[C++]=j>>16&255),L===6?(C<y.length&&(y[C++]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C<y.length)for(y[C++]=M;C<y.length;)y[C++]=0},i.prototype._toArrayLikeBE=function(y,S){for(var C=y.length-1,M=0,x=0,L=0;x<this.length;x++){var j=this.words[x]<<L|M;y[C--]=j&255,C>=0&&(y[C--]=j>>8&255),C>=0&&(y[C--]=j>>16&255),L===6?(C>=0&&(y[C--]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C>=0)for(y[C--]=M;C>=0;)y[C--]=0},Math.clz32?i.prototype._countBits=function(y){return 32-Math.clz32(y)}:i.prototype._countBits=function(y){var S=y,C=0;return S>=4096&&(C+=13,S>>>=13),S>=64&&(C+=7,S>>>=7),S>=8&&(C+=4,S>>>=4),S>=2&&(C+=2,S>>>=2),C+S},i.prototype._zeroBits=function(y){if(y===0)return 26;var S=y,C=0;return(S&8191)===0&&(C+=13,S>>>=13),(S&127)===0&&(C+=7,S>>>=7),(S&15)===0&&(C+=4,S>>>=4),(S&3)===0&&(C+=2,S>>>=2),(S&1)===0&&C++,C},i.prototype.bitLength=function(){var y=this.words[this.length-1],S=this._countBits(y);return(this.length-1)*26+S};function m(q){for(var y=new Array(q.bitLength()),S=0;S<y.length;S++){var C=S/26|0,M=S%26;y[S]=q.words[C]>>>M&1}return y}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,S=0;S<this.length;S++){var C=this._zeroBits(this.words[S]);if(y+=C,C!==26)break}return y},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},i.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var S=0;S<y.length;S++)this.words[S]=this.words[S]|y.words[S];return this._strip()},i.prototype.ior=function(y){return n((this.negative|y.negative)===0),this.iuor(y)},i.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},i.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},i.prototype.iuand=function(y){var S;this.length>y.length?S=y:S=this;for(var C=0;C<S.length;C++)this.words[C]=this.words[C]&y.words[C];return this.length=S.length,this._strip()},i.prototype.iand=function(y){return n((this.negative|y.negative)===0),this.iuand(y)},i.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},i.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},i.prototype.iuxor=function(y){var S,C;this.length>y.length?(S=this,C=y):(S=y,C=this);for(var M=0;M<C.length;M++)this.words[M]=S.words[M]^C.words[M];if(this!==S)for(;M<S.length;M++)this.words[M]=S.words[M];return this.length=S.length,this._strip()},i.prototype.ixor=function(y){return n((this.negative|y.negative)===0),this.iuxor(y)},i.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},i.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},i.prototype.inotn=function(y){n(typeof y=="number"&&y>=0);var S=Math.ceil(y/26)|0,C=y%26;this._expand(S),C>0&&S--;for(var M=0;M<S;M++)this.words[M]=~this.words[M]&67108863;return C>0&&(this.words[M]=~this.words[M]&67108863>>26-C),this._strip()},i.prototype.notn=function(y){return this.clone().inotn(y)},i.prototype.setn=function(y,S){n(typeof y=="number"&&y>=0);var C=y/26|0,M=y%26;return this._expand(C+1),S?this.words[C]=this.words[C]|1<<M:this.words[C]=this.words[C]&~(1<<M),this._strip()},i.prototype.iadd=function(y){var S;if(this.negative!==0&&y.negative===0)return this.negative=0,S=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,S=this.isub(y),y.negative=1,S._normSign();var C,M;this.length>y.length?(C=this,M=y):(C=y,M=this);for(var x=0,L=0;L<M.length;L++)S=(C.words[L]|0)+(M.words[L]|0)+x,this.words[L]=S&67108863,x=S>>>26;for(;x!==0&&L<C.length;L++)S=(C.words[L]|0)+x,this.words[L]=S&67108863,x=S>>>26;if(this.length=C.length,x!==0)this.words[this.length]=x,this.length++;else if(C!==this)for(;L<C.length;L++)this.words[L]=C.words[L];return this},i.prototype.add=function(y){var S;return y.negative!==0&&this.negative===0?(y.negative=0,S=this.sub(y),y.negative^=1,S):y.negative===0&&this.negative!==0?(this.negative=0,S=y.sub(this),this.negative=1,S):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},i.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var S=this.iadd(y);return y.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var C=this.cmp(y);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,x;C>0?(M=this,x=y):(M=y,x=this);for(var L=0,j=0;j<x.length;j++)S=(M.words[j]|0)-(x.words[j]|0)+L,L=S>>26,this.words[j]=S&67108863;for(;L!==0&&j<M.length;j++)S=(M.words[j]|0)+L,L=S>>26,this.words[j]=S&67108863;if(L===0&&j<M.length&&M!==this)for(;j<M.length;j++)this.words[j]=M.words[j];return this.length=Math.max(this.length,j),M!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(y){return this.clone().isub(y)};function h(q,y,S){S.negative=y.negative^q.negative;var C=q.length+y.length|0;S.length=C,C=C-1|0;var M=q.words[0]|0,x=y.words[0]|0,L=M*x,j=L&67108863,T=L/67108864|0;S.words[0]=j;for(var E=1;E<C;E++){for(var N=T>>>26,te=T&67108863,Y=Math.min(E,y.length-1),U=Math.max(0,E-q.length+1);U<=Y;U++){var $=E-U|0;M=q.words[$]|0,x=y.words[U]|0,L=M*x+te,N+=L/67108864|0,te=L&67108863}S.words[E]=te|0,T=N|0}return T!==0?S.words[E]=T|0:S.length--,S._strip()}var b=function(y,S,C){var M=y.words,x=S.words,L=C.words,j=0,T,E,N,te=M[0]|0,Y=te&8191,U=te>>>13,$=M[1]|0,G=$&8191,X=$>>>13,ne=M[2]|0,P=ne&8191,B=ne>>>13,Z=M[3]|0,K=Z&8191,oe=Z>>>13,ie=M[4]|0,se=ie&8191,de=ie>>>13,He=M[5]|0,ge=He&8191,ue=He>>>13,me=M[6]|0,pe=me&8191,ye=me>>>13,$e=M[7]|0,ve=$e&8191,k=$e>>>13,v=M[8]|0,R=v&8191,O=v>>>13,H=M[9]|0,V=H&8191,z=H>>>13,he=x[0]|0,fe=he&8191,le=he>>>13,be=x[1]|0,ce=be&8191,Se=be>>>13,Xt=x[2]|0,Re=Xt&8191,Ce=Xt>>>13,er=x[3]|0,Me=er&8191,ke=er>>>13,tr=x[4]|0,Ie=tr&8191,xe=tr>>>13,rr=x[5]|0,Ae=rr&8191,Te=rr>>>13,nr=x[6]|0,Pe=nr&8191,Be=nr>>>13,ir=x[7]|0,Le=ir&8191,Ne=ir>>>13,sr=x[8]|0,Oe=sr&8191,Fe=sr>>>13,or=x[9]|0,qe=or&8191,De=or>>>13;C.negative=y.negative^S.negative,C.length=19,T=Math.imul(Y,fe),E=Math.imul(Y,le),E=E+Math.imul(U,fe)|0,N=Math.imul(U,le);var dt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(dt>>>26)|0,dt&=67108863,T=Math.imul(G,fe),E=Math.imul(G,le),E=E+Math.imul(X,fe)|0,N=Math.imul(X,le),T=T+Math.imul(Y,ce)|0,E=E+Math.imul(Y,Se)|0,E=E+Math.imul(U,ce)|0,N=N+Math.imul(U,Se)|0;var pt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(pt>>>26)|0,pt&=67108863,T=Math.imul(P,fe),E=Math.imul(P,le),E=E+Math.imul(B,fe)|0,N=Math.imul(B,le),T=T+Math.imul(G,ce)|0,E=E+Math.imul(G,Se)|0,E=E+Math.imul(X,ce)|0,N=N+Math.imul(X,Se)|0,T=T+Math.imul(Y,Re)|0,E=E+Math.imul(Y,Ce)|0,E=E+Math.imul(U,Re)|0,N=N+Math.imul(U,Ce)|0;var gt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(gt>>>26)|0,gt&=67108863,T=Math.imul(K,fe),E=Math.imul(K,le),E=E+Math.imul(oe,fe)|0,N=Math.imul(oe,le),T=T+Math.imul(P,ce)|0,E=E+Math.imul(P,Se)|0,E=E+Math.imul(B,ce)|0,N=N+Math.imul(B,Se)|0,T=T+Math.imul(G,Re)|0,E=E+Math.imul(G,Ce)|0,E=E+Math.imul(X,Re)|0,N=N+Math.imul(X,Ce)|0,T=T+Math.imul(Y,Me)|0,E=E+Math.imul(Y,ke)|0,E=E+Math.imul(U,Me)|0,N=N+Math.imul(U,ke)|0;var yt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(yt>>>26)|0,yt&=67108863,T=Math.imul(se,fe),E=Math.imul(se,le),E=E+Math.imul(de,fe)|0,N=Math.imul(de,le),T=T+Math.imul(K,ce)|0,E=E+Math.imul(K,Se)|0,E=E+Math.imul(oe,ce)|0,N=N+Math.imul(oe,Se)|0,T=T+Math.imul(P,Re)|0,E=E+Math.imul(P,Ce)|0,E=E+Math.imul(B,Re)|0,N=N+Math.imul(B,Ce)|0,T=T+Math.imul(G,Me)|0,E=E+Math.imul(G,ke)|0,E=E+Math.imul(X,Me)|0,N=N+Math.imul(X,ke)|0,T=T+Math.imul(Y,Ie)|0,E=E+Math.imul(Y,xe)|0,E=E+Math.imul(U,Ie)|0,N=N+Math.imul(U,xe)|0;var mt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(mt>>>26)|0,mt&=67108863,T=Math.imul(ge,fe),E=Math.imul(ge,le),E=E+Math.imul(ue,fe)|0,N=Math.imul(ue,le),T=T+Math.imul(se,ce)|0,E=E+Math.imul(se,Se)|0,E=E+Math.imul(de,ce)|0,N=N+Math.imul(de,Se)|0,T=T+Math.imul(K,Re)|0,E=E+Math.imul(K,Ce)|0,E=E+Math.imul(oe,Re)|0,N=N+Math.imul(oe,Ce)|0,T=T+Math.imul(P,Me)|0,E=E+Math.imul(P,ke)|0,E=E+Math.imul(B,Me)|0,N=N+Math.imul(B,ke)|0,T=T+Math.imul(G,Ie)|0,E=E+Math.imul(G,xe)|0,E=E+Math.imul(X,Ie)|0,N=N+Math.imul(X,xe)|0,T=T+Math.imul(Y,Ae)|0,E=E+Math.imul(Y,Te)|0,E=E+Math.imul(U,Ae)|0,N=N+Math.imul(U,Te)|0;var _t=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(_t>>>26)|0,_t&=67108863,T=Math.imul(pe,fe),E=Math.imul(pe,le),E=E+Math.imul(ye,fe)|0,N=Math.imul(ye,le),T=T+Math.imul(ge,ce)|0,E=E+Math.imul(ge,Se)|0,E=E+Math.imul(ue,ce)|0,N=N+Math.imul(ue,Se)|0,T=T+Math.imul(se,Re)|0,E=E+Math.imul(se,Ce)|0,E=E+Math.imul(de,Re)|0,N=N+Math.imul(de,Ce)|0,T=T+Math.imul(K,Me)|0,E=E+Math.imul(K,ke)|0,E=E+Math.imul(oe,Me)|0,N=N+Math.imul(oe,ke)|0,T=T+Math.imul(P,Ie)|0,E=E+Math.imul(P,xe)|0,E=E+Math.imul(B,Ie)|0,N=N+Math.imul(B,xe)|0,T=T+Math.imul(G,Ae)|0,E=E+Math.imul(G,Te)|0,E=E+Math.imul(X,Ae)|0,N=N+Math.imul(X,Te)|0,T=T+Math.imul(Y,Pe)|0,E=E+Math.imul(Y,Be)|0,E=E+Math.imul(U,Pe)|0,N=N+Math.imul(U,Be)|0;var vt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(vt>>>26)|0,vt&=67108863,T=Math.imul(ve,fe),E=Math.imul(ve,le),E=E+Math.imul(k,fe)|0,N=Math.imul(k,le),T=T+Math.imul(pe,ce)|0,E=E+Math.imul(pe,Se)|0,E=E+Math.imul(ye,ce)|0,N=N+Math.imul(ye,Se)|0,T=T+Math.imul(ge,Re)|0,E=E+Math.imul(ge,Ce)|0,E=E+Math.imul(ue,Re)|0,N=N+Math.imul(ue,Ce)|0,T=T+Math.imul(se,Me)|0,E=E+Math.imul(se,ke)|0,E=E+Math.imul(de,Me)|0,N=N+Math.imul(de,ke)|0,T=T+Math.imul(K,Ie)|0,E=E+Math.imul(K,xe)|0,E=E+Math.imul(oe,Ie)|0,N=N+Math.imul(oe,xe)|0,T=T+Math.imul(P,Ae)|0,E=E+Math.imul(P,Te)|0,E=E+Math.imul(B,Ae)|0,N=N+Math.imul(B,Te)|0,T=T+Math.imul(G,Pe)|0,E=E+Math.imul(G,Be)|0,E=E+Math.imul(X,Pe)|0,N=N+Math.imul(X,Be)|0,T=T+Math.imul(Y,Le)|0,E=E+Math.imul(Y,Ne)|0,E=E+Math.imul(U,Le)|0,N=N+Math.imul(U,Ne)|0;var bt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(bt>>>26)|0,bt&=67108863,T=Math.imul(R,fe),E=Math.imul(R,le),E=E+Math.imul(O,fe)|0,N=Math.imul(O,le),T=T+Math.imul(ve,ce)|0,E=E+Math.imul(ve,Se)|0,E=E+Math.imul(k,ce)|0,N=N+Math.imul(k,Se)|0,T=T+Math.imul(pe,Re)|0,E=E+Math.imul(pe,Ce)|0,E=E+Math.imul(ye,Re)|0,N=N+Math.imul(ye,Ce)|0,T=T+Math.imul(ge,Me)|0,E=E+Math.imul(ge,ke)|0,E=E+Math.imul(ue,Me)|0,N=N+Math.imul(ue,ke)|0,T=T+Math.imul(se,Ie)|0,E=E+Math.imul(se,xe)|0,E=E+Math.imul(de,Ie)|0,N=N+Math.imul(de,xe)|0,T=T+Math.imul(K,Ae)|0,E=E+Math.imul(K,Te)|0,E=E+Math.imul(oe,Ae)|0,N=N+Math.imul(oe,Te)|0,T=T+Math.imul(P,Pe)|0,E=E+Math.imul(P,Be)|0,E=E+Math.imul(B,Pe)|0,N=N+Math.imul(B,Be)|0,T=T+Math.imul(G,Le)|0,E=E+Math.imul(G,Ne)|0,E=E+Math.imul(X,Le)|0,N=N+Math.imul(X,Ne)|0,T=T+Math.imul(Y,Oe)|0,E=E+Math.imul(Y,Fe)|0,E=E+Math.imul(U,Oe)|0,N=N+Math.imul(U,Fe)|0;var wt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(wt>>>26)|0,wt&=67108863,T=Math.imul(V,fe),E=Math.imul(V,le),E=E+Math.imul(z,fe)|0,N=Math.imul(z,le),T=T+Math.imul(R,ce)|0,E=E+Math.imul(R,Se)|0,E=E+Math.imul(O,ce)|0,N=N+Math.imul(O,Se)|0,T=T+Math.imul(ve,Re)|0,E=E+Math.imul(ve,Ce)|0,E=E+Math.imul(k,Re)|0,N=N+Math.imul(k,Ce)|0,T=T+Math.imul(pe,Me)|0,E=E+Math.imul(pe,ke)|0,E=E+Math.imul(ye,Me)|0,N=N+Math.imul(ye,ke)|0,T=T+Math.imul(ge,Ie)|0,E=E+Math.imul(ge,xe)|0,E=E+Math.imul(ue,Ie)|0,N=N+Math.imul(ue,xe)|0,T=T+Math.imul(se,Ae)|0,E=E+Math.imul(se,Te)|0,E=E+Math.imul(de,Ae)|0,N=N+Math.imul(de,Te)|0,T=T+Math.imul(K,Pe)|0,E=E+Math.imul(K,Be)|0,E=E+Math.imul(oe,Pe)|0,N=N+Math.imul(oe,Be)|0,T=T+Math.imul(P,Le)|0,E=E+Math.imul(P,Ne)|0,E=E+Math.imul(B,Le)|0,N=N+Math.imul(B,Ne)|0,T=T+Math.imul(G,Oe)|0,E=E+Math.imul(G,Fe)|0,E=E+Math.imul(X,Oe)|0,N=N+Math.imul(X,Fe)|0,T=T+Math.imul(Y,qe)|0,E=E+Math.imul(Y,De)|0,E=E+Math.imul(U,qe)|0,N=N+Math.imul(U,De)|0;var Et=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Et>>>26)|0,Et&=67108863,T=Math.imul(V,ce),E=Math.imul(V,Se),E=E+Math.imul(z,ce)|0,N=Math.imul(z,Se),T=T+Math.imul(R,Re)|0,E=E+Math.imul(R,Ce)|0,E=E+Math.imul(O,Re)|0,N=N+Math.imul(O,Ce)|0,T=T+Math.imul(ve,Me)|0,E=E+Math.imul(ve,ke)|0,E=E+Math.imul(k,Me)|0,N=N+Math.imul(k,ke)|0,T=T+Math.imul(pe,Ie)|0,E=E+Math.imul(pe,xe)|0,E=E+Math.imul(ye,Ie)|0,N=N+Math.imul(ye,xe)|0,T=T+Math.imul(ge,Ae)|0,E=E+Math.imul(ge,Te)|0,E=E+Math.imul(ue,Ae)|0,N=N+Math.imul(ue,Te)|0,T=T+Math.imul(se,Pe)|0,E=E+Math.imul(se,Be)|0,E=E+Math.imul(de,Pe)|0,N=N+Math.imul(de,Be)|0,T=T+Math.imul(K,Le)|0,E=E+Math.imul(K,Ne)|0,E=E+Math.imul(oe,Le)|0,N=N+Math.imul(oe,Ne)|0,T=T+Math.imul(P,Oe)|0,E=E+Math.imul(P,Fe)|0,E=E+Math.imul(B,Oe)|0,N=N+Math.imul(B,Fe)|0,T=T+Math.imul(G,qe)|0,E=E+Math.imul(G,De)|0,E=E+Math.imul(X,qe)|0,N=N+Math.imul(X,De)|0;var St=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(St>>>26)|0,St&=67108863,T=Math.imul(V,Re),E=Math.imul(V,Ce),E=E+Math.imul(z,Re)|0,N=Math.imul(z,Ce),T=T+Math.imul(R,Me)|0,E=E+Math.imul(R,ke)|0,E=E+Math.imul(O,Me)|0,N=N+Math.imul(O,ke)|0,T=T+Math.imul(ve,Ie)|0,E=E+Math.imul(ve,xe)|0,E=E+Math.imul(k,Ie)|0,N=N+Math.imul(k,xe)|0,T=T+Math.imul(pe,Ae)|0,E=E+Math.imul(pe,Te)|0,E=E+Math.imul(ye,Ae)|0,N=N+Math.imul(ye,Te)|0,T=T+Math.imul(ge,Pe)|0,E=E+Math.imul(ge,Be)|0,E=E+Math.imul(ue,Pe)|0,N=N+Math.imul(ue,Be)|0,T=T+Math.imul(se,Le)|0,E=E+Math.imul(se,Ne)|0,E=E+Math.imul(de,Le)|0,N=N+Math.imul(de,Ne)|0,T=T+Math.imul(K,Oe)|0,E=E+Math.imul(K,Fe)|0,E=E+Math.imul(oe,Oe)|0,N=N+Math.imul(oe,Fe)|0,T=T+Math.imul(P,qe)|0,E=E+Math.imul(P,De)|0,E=E+Math.imul(B,qe)|0,N=N+Math.imul(B,De)|0;var Rt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,T=Math.imul(V,Me),E=Math.imul(V,ke),E=E+Math.imul(z,Me)|0,N=Math.imul(z,ke),T=T+Math.imul(R,Ie)|0,E=E+Math.imul(R,xe)|0,E=E+Math.imul(O,Ie)|0,N=N+Math.imul(O,xe)|0,T=T+Math.imul(ve,Ae)|0,E=E+Math.imul(ve,Te)|0,E=E+Math.imul(k,Ae)|0,N=N+Math.imul(k,Te)|0,T=T+Math.imul(pe,Pe)|0,E=E+Math.imul(pe,Be)|0,E=E+Math.imul(ye,Pe)|0,N=N+Math.imul(ye,Be)|0,T=T+Math.imul(ge,Le)|0,E=E+Math.imul(ge,Ne)|0,E=E+Math.imul(ue,Le)|0,N=N+Math.imul(ue,Ne)|0,T=T+Math.imul(se,Oe)|0,E=E+Math.imul(se,Fe)|0,E=E+Math.imul(de,Oe)|0,N=N+Math.imul(de,Fe)|0,T=T+Math.imul(K,qe)|0,E=E+Math.imul(K,De)|0,E=E+Math.imul(oe,qe)|0,N=N+Math.imul(oe,De)|0;var Ct=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,T=Math.imul(V,Ie),E=Math.imul(V,xe),E=E+Math.imul(z,Ie)|0,N=Math.imul(z,xe),T=T+Math.imul(R,Ae)|0,E=E+Math.imul(R,Te)|0,E=E+Math.imul(O,Ae)|0,N=N+Math.imul(O,Te)|0,T=T+Math.imul(ve,Pe)|0,E=E+Math.imul(ve,Be)|0,E=E+Math.imul(k,Pe)|0,N=N+Math.imul(k,Be)|0,T=T+Math.imul(pe,Le)|0,E=E+Math.imul(pe,Ne)|0,E=E+Math.imul(ye,Le)|0,N=N+Math.imul(ye,Ne)|0,T=T+Math.imul(ge,Oe)|0,E=E+Math.imul(ge,Fe)|0,E=E+Math.imul(ue,Oe)|0,N=N+Math.imul(ue,Fe)|0,T=T+Math.imul(se,qe)|0,E=E+Math.imul(se,De)|0,E=E+Math.imul(de,qe)|0,N=N+Math.imul(de,De)|0;var Mt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,T=Math.imul(V,Ae),E=Math.imul(V,Te),E=E+Math.imul(z,Ae)|0,N=Math.imul(z,Te),T=T+Math.imul(R,Pe)|0,E=E+Math.imul(R,Be)|0,E=E+Math.imul(O,Pe)|0,N=N+Math.imul(O,Be)|0,T=T+Math.imul(ve,Le)|0,E=E+Math.imul(ve,Ne)|0,E=E+Math.imul(k,Le)|0,N=N+Math.imul(k,Ne)|0,T=T+Math.imul(pe,Oe)|0,E=E+Math.imul(pe,Fe)|0,E=E+Math.imul(ye,Oe)|0,N=N+Math.imul(ye,Fe)|0,T=T+Math.imul(ge,qe)|0,E=E+Math.imul(ge,De)|0,E=E+Math.imul(ue,qe)|0,N=N+Math.imul(ue,De)|0;var kt=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(kt>>>26)|0,kt&=67108863,T=Math.imul(V,Pe),E=Math.imul(V,Be),E=E+Math.imul(z,Pe)|0,N=Math.imul(z,Be),T=T+Math.imul(R,Le)|0,E=E+Math.imul(R,Ne)|0,E=E+Math.imul(O,Le)|0,N=N+Math.imul(O,Ne)|0,T=T+Math.imul(ve,Oe)|0,E=E+Math.imul(ve,Fe)|0,E=E+Math.imul(k,Oe)|0,N=N+Math.imul(k,Fe)|0,T=T+Math.imul(pe,qe)|0,E=E+Math.imul(pe,De)|0,E=E+Math.imul(ye,qe)|0,N=N+Math.imul(ye,De)|0;var Yn=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,T=Math.imul(V,Le),E=Math.imul(V,Ne),E=E+Math.imul(z,Le)|0,N=Math.imul(z,Ne),T=T+Math.imul(R,Oe)|0,E=E+Math.imul(R,Fe)|0,E=E+Math.imul(O,Oe)|0,N=N+Math.imul(O,Fe)|0,T=T+Math.imul(ve,qe)|0,E=E+Math.imul(ve,De)|0,E=E+Math.imul(k,qe)|0,N=N+Math.imul(k,De)|0;var Xn=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,T=Math.imul(V,Oe),E=Math.imul(V,Fe),E=E+Math.imul(z,Oe)|0,N=Math.imul(z,Fe),T=T+Math.imul(R,qe)|0,E=E+Math.imul(R,De)|0,E=E+Math.imul(O,qe)|0,N=N+Math.imul(O,De)|0;var ei=(j+T|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(ei>>>26)|0,ei&=67108863,T=Math.imul(V,qe),E=Math.imul(V,De),E=E+Math.imul(z,qe)|0,N=Math.imul(z,De);var ti=(j+T|0)+((E&8191)<<13)|0;return j=(N+(E>>>13)|0)+(ti>>>26)|0,ti&=67108863,L[0]=dt,L[1]=pt,L[2]=gt,L[3]=yt,L[4]=mt,L[5]=_t,L[6]=vt,L[7]=bt,L[8]=wt,L[9]=Et,L[10]=St,L[11]=Rt,L[12]=Ct,L[13]=Mt,L[14]=kt,L[15]=Yn,L[16]=Xn,L[17]=ei,L[18]=ti,j!==0&&(L[19]=j,C.length++),C};Math.imul||(b=h);function w(q,y,S){S.negative=y.negative^q.negative,S.length=q.length+y.length;for(var C=0,M=0,x=0;x<S.length-1;x++){var L=M;M=0;for(var j=C&67108863,T=Math.min(x,y.length-1),E=Math.max(0,x-q.length+1);E<=T;E++){var N=x-E,te=q.words[N]|0,Y=y.words[E]|0,U=te*Y,$=U&67108863;L=L+(U/67108864|0)|0,$=$+j|0,j=$&67108863,L=L+($>>>26)|0,M+=L>>>26,L&=67108863}S.words[x]=j,C=L,L=M}return C!==0?S.words[x]=C:S.length--,S._strip()}function I(q,y,S){return w(q,y,S)}i.prototype.mulTo=function(y,S){var C,M=this.length+y.length;return this.length===10&&y.length===10?C=b(this,y,S):M<63?C=h(this,y,S):M<1024?C=w(this,y,S):C=I(this,y,S),C},i.prototype.mul=function(y){var S=new i(null);return S.words=new Array(this.length+y.length),this.mulTo(y,S)},i.prototype.mulf=function(y){var S=new i(null);return S.words=new Array(this.length+y.length),I(this,y,S)},i.prototype.imul=function(y){return this.clone().mulTo(y,this)},i.prototype.imuln=function(y){var S=y<0;S&&(y=-y),n(typeof y=="number"),n(y<67108864);for(var C=0,M=0;M<this.length;M++){var x=(this.words[M]|0)*y,L=(x&67108863)+(C&67108863);C>>=26,C+=x/67108864|0,C+=L>>>26,this.words[M]=L&67108863}return C!==0&&(this.words[M]=C,this.length++),this.length=y===0?1:this.length,S?this.ineg():this},i.prototype.muln=function(y){return this.clone().imuln(y)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(y){var S=m(y);if(S.length===0)return new i(1);for(var C=this,M=0;M<S.length&&S[M]===0;M++,C=C.sqr());if(++M<S.length)for(var x=C.sqr();M<S.length;M++,x=x.sqr())S[M]!==0&&(C=C.mul(x));return C},i.prototype.iushln=function(y){n(typeof y=="number"&&y>=0);var S=y%26,C=(y-S)/26,M=67108863>>>26-S<<26-S,x;if(S!==0){var L=0;for(x=0;x<this.length;x++){var j=this.words[x]&M,T=(this.words[x]|0)-j<<S;this.words[x]=T|L,L=j>>>26-S}L&&(this.words[x]=L,this.length++)}if(C!==0){for(x=this.length-1;x>=0;x--)this.words[x+C]=this.words[x];for(x=0;x<C;x++)this.words[x]=0;this.length+=C}return this._strip()},i.prototype.ishln=function(y){return n(this.negative===0),this.iushln(y)},i.prototype.iushrn=function(y,S,C){n(typeof y=="number"&&y>=0);var M;S?M=(S-S%26)/26:M=0;var x=y%26,L=Math.min((y-x)/26,this.length),j=67108863^67108863>>>x<<x,T=C;if(M-=L,M=Math.max(0,M),T){for(var E=0;E<L;E++)T.words[E]=this.words[E];T.length=L}if(L!==0)if(this.length>L)for(this.length-=L,E=0;E<this.length;E++)this.words[E]=this.words[E+L];else this.words[0]=0,this.length=1;var N=0;for(E=this.length-1;E>=0&&(N!==0||E>=M);E--){var te=this.words[E]|0;this.words[E]=N<<26-x|te>>>x,N=te&j}return T&&N!==0&&(T.words[T.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(y,S,C){return n(this.negative===0),this.iushrn(y,S,C)},i.prototype.shln=function(y){return this.clone().ishln(y)},i.prototype.ushln=function(y){return this.clone().iushln(y)},i.prototype.shrn=function(y){return this.clone().ishrn(y)},i.prototype.ushrn=function(y){return this.clone().iushrn(y)},i.prototype.testn=function(y){n(typeof y=="number"&&y>=0);var S=y%26,C=(y-S)/26,M=1<<S;if(this.length<=C)return!1;var x=this.words[C];return!!(x&M)},i.prototype.imaskn=function(y){n(typeof y=="number"&&y>=0);var S=y%26,C=(y-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(S!==0&&C++,this.length=Math.min(C,this.length),S!==0){var M=67108863^67108863>>>S<<S;this.words[this.length-1]&=M}return this._strip()},i.prototype.maskn=function(y){return this.clone().imaskn(y)},i.prototype.iaddn=function(y){return n(typeof y=="number"),n(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},i.prototype._iaddn=function(y){this.words[0]+=y;for(var S=0;S<this.length&&this.words[S]>=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(y){if(n(typeof y=="number"),n(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S<this.length&&this.words[S]<0;S++)this.words[S]+=67108864,this.words[S+1]-=1;return this._strip()},i.prototype.addn=function(y){return this.clone().iaddn(y)},i.prototype.subn=function(y){return this.clone().isubn(y)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(y,S,C){var M=y.length+C,x;this._expand(M);var L,j=0;for(x=0;x<y.length;x++){L=(this.words[x+C]|0)+j;var T=(y.words[x]|0)*S;L-=T&67108863,j=(L>>26)-(T/67108864|0),this.words[x+C]=L&67108863}for(;x<this.length-C;x++)L=(this.words[x+C]|0)+j,j=L>>26,this.words[x+C]=L&67108863;if(j===0)return this._strip();for(n(j===-1),j=0,x=0;x<this.length;x++)L=-(this.words[x]|0)+j,j=L>>26,this.words[x]=L&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(y,S){var C=this.length-y.length,M=this.clone(),x=y,L=x.words[x.length-1]|0,j=this._countBits(L);C=26-j,C!==0&&(x=x.ushln(C),M.iushln(C),L=x.words[x.length-1]|0);var T=M.length-x.length,E;if(S!=="mod"){E=new i(null),E.length=T+1,E.words=new Array(E.length);for(var N=0;N<E.length;N++)E.words[N]=0}var te=M.clone()._ishlnsubmul(x,1,T);te.negative===0&&(M=te,E&&(E.words[T]=1));for(var Y=T-1;Y>=0;Y--){var U=(M.words[x.length+Y]|0)*67108864+(M.words[x.length+Y-1]|0);for(U=Math.min(U/L|0,67108863),M._ishlnsubmul(x,U,Y);M.negative!==0;)U--,M.negative=0,M._ishlnsubmul(x,1,Y),M.isZero()||(M.negative^=1);E&&(E.words[Y]=U)}return E&&E._strip(),M._strip(),S!=="div"&&C!==0&&M.iushrn(C),{div:E||null,mod:M}},i.prototype.divmod=function(y,S,C){if(n(!y.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,x,L;return this.negative!==0&&y.negative===0?(L=this.neg().divmod(y,S),S!=="mod"&&(M=L.div.neg()),S!=="div"&&(x=L.mod.neg(),C&&x.negative!==0&&x.iadd(y)),{div:M,mod:x}):this.negative===0&&y.negative!==0?(L=this.divmod(y.neg(),S),S!=="mod"&&(M=L.div.neg()),{div:M,mod:L.mod}):(this.negative&y.negative)!==0?(L=this.neg().divmod(y.neg(),S),S!=="div"&&(x=L.mod.neg(),C&&x.negative!==0&&x.isub(y)),{div:L.div,mod:x}):y.length>this.length||this.cmp(y)<0?{div:new i(0),mod:this}:y.length===1?S==="div"?{div:this.divn(y.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new i(this.modrn(y.words[0]))}:this._wordDiv(y,S)},i.prototype.div=function(y){return this.divmod(y,"div",!1).div},i.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},i.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},i.prototype.divRound=function(y){var S=this.divmod(y);if(S.mod.isZero())return S.div;var C=S.div.negative!==0?S.mod.isub(y):S.mod,M=y.ushrn(1),x=y.andln(1),L=C.cmp(M);return L<0||x===1&&L===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(y){var S=y<0;S&&(y=-y),n(y<=67108863);for(var C=(1<<26)%y,M=0,x=this.length-1;x>=0;x--)M=(C*M+(this.words[x]|0))%y;return S?-M:M},i.prototype.modn=function(y){return this.modrn(y)},i.prototype.idivn=function(y){var S=y<0;S&&(y=-y),n(y<=67108863);for(var C=0,M=this.length-1;M>=0;M--){var x=(this.words[M]|0)+C*67108864;this.words[M]=x/y|0,C=x%y}return this._strip(),S?this.ineg():this},i.prototype.divn=function(y){return this.clone().idivn(y)},i.prototype.egcd=function(y){n(y.negative===0),n(!y.isZero());var S=this,C=y.clone();S.negative!==0?S=S.umod(y):S=S.clone();for(var M=new i(1),x=new i(0),L=new i(0),j=new i(1),T=0;S.isEven()&&C.isEven();)S.iushrn(1),C.iushrn(1),++T;for(var E=C.clone(),N=S.clone();!S.isZero();){for(var te=0,Y=1;(S.words[0]&Y)===0&&te<26;++te,Y<<=1);if(te>0)for(S.iushrn(te);te-- >0;)(M.isOdd()||x.isOdd())&&(M.iadd(E),x.isub(N)),M.iushrn(1),x.iushrn(1);for(var U=0,$=1;(C.words[0]&$)===0&&U<26;++U,$<<=1);if(U>0)for(C.iushrn(U);U-- >0;)(L.isOdd()||j.isOdd())&&(L.iadd(E),j.isub(N)),L.iushrn(1),j.iushrn(1);S.cmp(C)>=0?(S.isub(C),M.isub(L),x.isub(j)):(C.isub(S),L.isub(M),j.isub(x))}return{a:L,b:j,gcd:C.iushln(T)}},i.prototype._invmp=function(y){n(y.negative===0),n(!y.isZero());var S=this,C=y.clone();S.negative!==0?S=S.umod(y):S=S.clone();for(var M=new i(1),x=new i(0),L=C.clone();S.cmpn(1)>0&&C.cmpn(1)>0;){for(var j=0,T=1;(S.words[0]&T)===0&&j<26;++j,T<<=1);if(j>0)for(S.iushrn(j);j-- >0;)M.isOdd()&&M.iadd(L),M.iushrn(1);for(var E=0,N=1;(C.words[0]&N)===0&&E<26;++E,N<<=1);if(E>0)for(C.iushrn(E);E-- >0;)x.isOdd()&&x.iadd(L),x.iushrn(1);S.cmp(C)>=0?(S.isub(C),M.isub(x)):(C.isub(S),x.isub(M))}var te;return S.cmpn(1)===0?te=M:te=x,te.cmpn(0)<0&&te.iadd(y),te},i.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var S=this.clone(),C=y.clone();S.negative=0,C.negative=0;for(var M=0;S.isEven()&&C.isEven();M++)S.iushrn(1),C.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;C.isEven();)C.iushrn(1);var x=S.cmp(C);if(x<0){var L=S;S=C,C=L}else if(x===0||C.cmpn(1)===0)break;S.isub(C)}while(!0);return C.iushln(M)},i.prototype.invm=function(y){return this.egcd(y).a.umod(y)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(y){return this.words[0]&y},i.prototype.bincn=function(y){n(typeof y=="number");var S=y%26,C=(y-S)/26,M=1<<S;if(this.length<=C)return this._expand(C+1),this.words[C]|=M,this;for(var x=M,L=C;x!==0&&L<this.length;L++){var j=this.words[L]|0;j+=x,x=j>>>26,j&=67108863,this.words[L]=j}return x!==0&&(this.words[L]=x,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(y){var S=y<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var C;if(this.length>1)C=1;else{S&&(y=-y),n(y<=67108863,"Number is too big");var M=this.words[0]|0;C=M===y?0:M<y?-1:1}return this.negative!==0?-C|0:C},i.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return-1;if(this.negative===0&&y.negative!==0)return 1;var S=this.ucmp(y);return this.negative!==0?-S|0:S},i.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return-1;for(var S=0,C=this.length-1;C>=0;C--){var M=this.words[C]|0,x=y.words[C]|0;if(M!==x){M<x?S=-1:M>x&&(S=1);break}}return S},i.prototype.gtn=function(y){return this.cmpn(y)===1},i.prototype.gt=function(y){return this.cmp(y)===1},i.prototype.gten=function(y){return this.cmpn(y)>=0},i.prototype.gte=function(y){return this.cmp(y)>=0},i.prototype.ltn=function(y){return this.cmpn(y)===-1},i.prototype.lt=function(y){return this.cmp(y)===-1},i.prototype.lten=function(y){return this.cmpn(y)<=0},i.prototype.lte=function(y){return this.cmp(y)<=0},i.prototype.eqn=function(y){return this.cmpn(y)===0},i.prototype.eq=function(y){return this.cmp(y)===0},i.red=function(y){return new Q(y)},i.prototype.toRed=function(y){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(y){return this.red=y,this},i.prototype.forceRed=function(y){return n(!this.red,"Already a number in reduction context"),this._forceRed(y)},i.prototype.redAdd=function(y){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},i.prototype.redIAdd=function(y){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},i.prototype.redSub=function(y){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},i.prototype.redISub=function(y){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},i.prototype.redShl=function(y){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},i.prototype.redMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},i.prototype.redIMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(y){return n(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var A={k256:null,p224:null,p192:null,p25519:null};function D(q,y){this.name=q,this.p=new i(y,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var y=new i(null);return y.words=new Array(Math.ceil(this.n/13)),y},D.prototype.ireduce=function(y){var S=y,C;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),C=S.bitLength();while(C>this.n);var M=C<this.n?-1:S.ucmp(this.p);return M===0?(S.words[0]=0,S.length=1):M>0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},D.prototype.split=function(y,S){y.iushrn(this.n,0,S)},D.prototype.imulK=function(y){return y.imul(this.k)};function F(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}l(F,D),F.prototype.split=function(y,S){for(var C=4194303,M=Math.min(y.length,9),x=0;x<M;x++)S.words[x]=y.words[x];if(S.length=M,y.length<=9){y.words[0]=0,y.length=1;return}var L=y.words[9];for(S.words[S.length++]=L&C,x=10;x<y.length;x++){var j=y.words[x]|0;y.words[x-10]=(j&C)<<4|L>>>22,L=j}L>>>=22,y.words[x-10]=L,L===0&&y.length>10?y.length-=10:y.length-=9},F.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var S=0,C=0;C<y.length;C++){var M=y.words[C]|0;S+=M*977,y.words[C]=S&67108863,S=M*64+(S/67108864|0)}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function W(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}l(W,D);function J(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}l(J,D);function ee(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}l(ee,D),ee.prototype.imulK=function(y){for(var S=0,C=0;C<y.length;C++){var M=(y.words[C]|0)*19+S,x=M&67108863;M>>>=26,y.words[C]=x,S=M}return S!==0&&(y.words[y.length++]=S),y},i._prime=function(y){if(A[y])return A[y];var S;if(y==="k256")S=new F;else if(y==="p224")S=new W;else if(y==="p192")S=new J;else if(y==="p25519")S=new ee;else throw new Error("Unknown prime "+y);return A[y]=S,S};function Q(q){if(typeof q=="string"){var y=i._prime(q);this.m=y.p,this.prime=y}else n(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}Q.prototype._verify1=function(y){n(y.negative===0,"red works only with positives"),n(y.red,"red works only with red numbers")},Q.prototype._verify2=function(y,S){n((y.negative|S.negative)===0,"red works only with positives"),n(y.red&&y.red===S.red,"red works only with red numbers")},Q.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(p(y,y.umod(this.m)._forceRed(this)),y)},Q.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},Q.prototype.add=function(y,S){this._verify2(y,S);var C=y.add(S);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},Q.prototype.iadd=function(y,S){this._verify2(y,S);var C=y.iadd(S);return C.cmp(this.m)>=0&&C.isub(this.m),C},Q.prototype.sub=function(y,S){this._verify2(y,S);var C=y.sub(S);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},Q.prototype.isub=function(y,S){this._verify2(y,S);var C=y.isub(S);return C.cmpn(0)<0&&C.iadd(this.m),C},Q.prototype.shl=function(y,S){return this._verify1(y),this.imod(y.ushln(S))},Q.prototype.imul=function(y,S){return this._verify2(y,S),this.imod(y.imul(S))},Q.prototype.mul=function(y,S){return this._verify2(y,S),this.imod(y.mul(S))},Q.prototype.isqr=function(y){return this.imul(y,y.clone())},Q.prototype.sqr=function(y){return this.mul(y,y)},Q.prototype.sqrt=function(y){if(y.isZero())return y.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(y,C)}for(var M=this.m.subn(1),x=0;!M.isZero()&&M.andln(1)===0;)x++,M.iushrn(1);n(!M.isZero());var L=new i(1).toRed(this),j=L.redNeg(),T=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new i(2*E*E).toRed(this);this.pow(E,T).cmp(j)!==0;)E.redIAdd(j);for(var N=this.pow(E,M),te=this.pow(y,M.addn(1).iushrn(1)),Y=this.pow(y,M),U=x;Y.cmp(L)!==0;){for(var $=Y,G=0;$.cmp(L)!==0;G++)$=$.redSqr();n(G<U);var X=this.pow(N,new i(1).iushln(U-G-1));te=te.redMul(X),N=X.redSqr(),Y=Y.redMul(N),U=G}return te},Q.prototype.invm=function(y){var S=y._invmp(this.m);return S.negative!==0?(S.negative=0,this.imod(S).redNeg()):this.imod(S)},Q.prototype.pow=function(y,S){if(S.isZero())return new i(1).toRed(this);if(S.cmpn(1)===0)return y.clone();var C=4,M=new Array(1<<C);M[0]=new i(1).toRed(this),M[1]=y;for(var x=2;x<M.length;x++)M[x]=this.mul(M[x-1],y);var L=M[0],j=0,T=0,E=S.bitLength()%26;for(E===0&&(E=26),x=S.length-1;x>=0;x--){for(var N=S.words[x],te=E-1;te>=0;te--){var Y=N>>te&1;if(L!==M[0]&&(L=this.sqr(L)),Y===0&&j===0){T=0;continue}j<<=1,j|=Y,T++,!(T!==C&&(x!==0||te!==0))&&(L=this.mul(L,M[j]),T=0,j=0)}E=26}return L},Q.prototype.convertTo=function(y){var S=y.umod(this.m);return S===y?S.clone():S},Q.prototype.convertFrom=function(y){var S=y.clone();return S.red=null,S},i.mont=function(y){return new re(y)};function re(q){Q.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}l(re,Q),re.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},re.prototype.convertFrom=function(y){var S=this.imod(y.mul(this.rinv));return S.red=null,S},re.prototype.imul=function(y,S){if(y.isZero()||S.isZero())return y.words[0]=0,y.length=1,y;var C=y.imul(S),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=C.isub(M).iushrn(this.shift),L=x;return x.cmp(this.m)>=0?L=x.isub(this.m):x.cmpn(0)<0&&(L=x.iadd(this.m)),L._forceRed(this)},re.prototype.mul=function(y,S){if(y.isZero()||S.isZero())return new i(0)._forceRed(this);var C=y.mul(S),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=C.isub(M).iushrn(this.shift),L=x;return x.cmp(this.m)>=0?L=x.isub(this.m):x.cmpn(0)<0&&(L=x.iadd(this.m)),L._forceRed(this)},re.prototype.invm=function(y){var S=this.imod(y._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(e,D0)})(Pn)),Pn.exports}var ni={},It={},Xa;function Dn(){return Xa||(Xa=1,Object.defineProperty(It,"__esModule",{value:!0}),It.errorValues=It.standardErrorCodes=void 0,It.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},It.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),It}var _r={},ii={},eu;function ya(){return eu||(eu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Dn(),r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(f,c=r){if(f&&Number.isInteger(f)){const g=f.toString();if(p(t.errorValues,g))return t.errorValues[g].message;if(d(f))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return c}e.getMessageFromCode=n;function l(f){if(!Number.isInteger(f))return!1;const c=f.toString();return!!(t.errorValues[c]||d(f))}e.isValidCode=l;function i(f){var c;if(typeof f=="number")return f;if(o(f))return(c=f.code)!==null&&c!==void 0?c:f.errorCode}e.getErrorCode=i;function o(f){return typeof f=="object"&&f!==null&&(typeof f.code=="number"||typeof f.errorCode=="number")}function a(f,{shouldIncludeStack:c=!1}={}){const g={};if(f&&typeof f=="object"&&!Array.isArray(f)&&p(f,"code")&&l(f.code)){const _=f;g.code=_.code,_.message&&typeof _.message=="string"?(g.message=_.message,p(_,"data")&&(g.data=_.data)):(g.message=n(g.code),g.data={originalError:u(f)})}else g.code=t.standardErrorCodes.rpc.internal,g.message=s(f,"message")?f.message:r,g.data={originalError:u(f)};return c&&(g.stack=s(f,"stack")?f.stack:void 0),g}e.serialize=a;function d(f){return f>=-32099&&f<=-32e3}function u(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function p(f,c){return Object.prototype.hasOwnProperty.call(f,c)}function s(f,c){return typeof f=="object"&&f!==null&&c in f&&typeof f[c]=="string"}})(ii)),ii}var tu;function j0(){if(tu)return _r;tu=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.standardErrors=void 0;const e=Dn(),t=ya();_r.standardErrors={rpc:{parse:d=>r(e.standardErrorCodes.rpc.parse,d),invalidRequest:d=>r(e.standardErrorCodes.rpc.invalidRequest,d),invalidParams:d=>r(e.standardErrorCodes.rpc.invalidParams,d),methodNotFound:d=>r(e.standardErrorCodes.rpc.methodNotFound,d),internal:d=>r(e.standardErrorCodes.rpc.internal,d),server:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:u}=d;if(!Number.isInteger(u)||u>-32005||u<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return r(u,d)},invalidInput:d=>r(e.standardErrorCodes.rpc.invalidInput,d),resourceNotFound:d=>r(e.standardErrorCodes.rpc.resourceNotFound,d),resourceUnavailable:d=>r(e.standardErrorCodes.rpc.resourceUnavailable,d),transactionRejected:d=>r(e.standardErrorCodes.rpc.transactionRejected,d),methodNotSupported:d=>r(e.standardErrorCodes.rpc.methodNotSupported,d),limitExceeded:d=>r(e.standardErrorCodes.rpc.limitExceeded,d)},provider:{userRejectedRequest:d=>n(e.standardErrorCodes.provider.userRejectedRequest,d),unauthorized:d=>n(e.standardErrorCodes.provider.unauthorized,d),unsupportedMethod:d=>n(e.standardErrorCodes.provider.unsupportedMethod,d),disconnected:d=>n(e.standardErrorCodes.provider.disconnected,d),chainDisconnected:d=>n(e.standardErrorCodes.provider.chainDisconnected,d),unsupportedChain:d=>n(e.standardErrorCodes.provider.unsupportedChain,d),custom:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:u,message:p,data:s}=d;if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string');return new o(u,p,s)}}};function r(d,u){const[p,s]=l(u);return new i(d,p||(0,t.getMessageFromCode)(d),s)}function n(d,u){const[p,s]=l(u);return new o(d,p||(0,t.getMessageFromCode)(d),s)}function l(d){if(d){if(typeof d=="string")return[d];if(typeof d=="object"&&!Array.isArray(d)){const{message:u,data:p}=d;if(u&&typeof u!="string")throw new Error("Must specify string message.");return[u||void 0,p]}}return[]}class i extends Error{constructor(u,p,s){if(!Number.isInteger(u))throw new Error('"code" must be an integer.');if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string.');super(p),this.code=u,s!==void 0&&(this.data=s)}}class o extends i{constructor(u,p,s){if(!a(u))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(u,p,s)}}function a(d){return Number.isInteger(d)&&d>=1e3&&d<=4999}return _r}var vr={},br={},ru;function ma(){if(ru)return br;ru=1,Object.defineProperty(br,"__esModule",{value:!0}),br.isErrorResponse=void 0;function e(t){return t.errorMessage!==void 0}return br.isErrorResponse=e,br}var wr={},nu;function _a(){return nu||(nu=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.LIB_VERSION=void 0,wr.LIB_VERSION="3.9.3"),wr}var iu;function U0(){if(iu)return vr;iu=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.serializeError=void 0;const e=ma(),t=_a(),r=Dn(),n=ya();function l(a,d){const u=(0,n.serialize)(i(a),{shouldIncludeStack:!0}),p=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");p.searchParams.set("version",t.LIB_VERSION),p.searchParams.set("code",u.code.toString());const s=o(u.data,d);return s&&p.searchParams.set("method",s),p.searchParams.set("message",u.message),Object.assign(Object.assign({},u),{docUrl:p.href})}vr.serializeError=l;function i(a){return typeof a=="string"?{message:a,code:r.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(a)?Object.assign(Object.assign({},a),{message:a.errorMessage,code:a.errorCode,data:{method:a.method}}):a}function o(a,d){const u=a?.method;if(u)return u;if(d!==void 0){if(typeof d=="string")return d;if(Array.isArray(d)){if(d.length>0)return d[0].method}else return d.method}}return vr}var su;function jn(){return su||(su=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=Dn();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=j0();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=U0();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const l=ya();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return l.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return l.getMessageFromCode}})})(ni)),ni}var Ve={},ou;function Un(){if(ou)return Ve;ou=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ProviderType=Ve.RegExpString=Ve.IntNumber=Ve.BigIntString=Ve.AddressString=Ve.HexString=Ve.OpaqueType=void 0;function e(){return n=>n}Ve.OpaqueType=e,Ve.HexString=e(),Ve.AddressString=e(),Ve.BigIntString=e();function t(n){return Math.floor(n)}Ve.IntNumber=t,Ve.RegExpString=e();var r;return(function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""})(r||(Ve.ProviderType=r={})),Ve}var au;function ut(){if(au)return ae;au=1;var e=ae&&ae.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.isMobileWeb=ae.getLocation=ae.isInIFrame=ae.createQrUrl=ae.getFavicon=ae.range=ae.isBigNumber=ae.ensureParsedJSONObject=ae.ensureBN=ae.ensureRegExpString=ae.ensureIntNumber=ae.ensureBuffer=ae.ensureAddressString=ae.ensureEvenLengthHexString=ae.ensureHexString=ae.isHexString=ae.prepend0x=ae.strip0x=ae.has0xPrefix=ae.hexStringFromIntNumber=ae.intNumberFromHexString=ae.bigIntStringFromBN=ae.hexStringFromBuffer=ae.hexStringToUint8Array=ae.uint8ArrayToHex=ae.randomBytesHex=void 0;const t=e(qn()),r=jn(),n=Un(),l=/^[0-9]*$/,i=/^[a-f0-9]*$/;function o(C){return a(crypto.getRandomValues(new Uint8Array(C)))}ae.randomBytesHex=o;function a(C){return[...C].map(M=>M.toString(16).padStart(2,"0")).join("")}ae.uint8ArrayToHex=a;function d(C){return new Uint8Array(C.match(/.{1,2}/g).map(M=>parseInt(M,16)))}ae.hexStringToUint8Array=d;function u(C,M=!1){const x=C.toString("hex");return(0,n.HexString)(M?`0x${x}`:x)}ae.hexStringFromBuffer=u;function p(C){return(0,n.BigIntString)(C.toString(10))}ae.bigIntStringFromBN=p;function s(C){return(0,n.IntNumber)(new t.default(b(C,!1),16).toNumber())}ae.intNumberFromHexString=s;function f(C){return(0,n.HexString)(`0x${new t.default(C).toString(16)}`)}ae.hexStringFromIntNumber=f;function c(C){return C.startsWith("0x")||C.startsWith("0X")}ae.has0xPrefix=c;function g(C){return c(C)?C.slice(2):C}ae.strip0x=g;function _(C){return c(C)?`0x${C.slice(2)}`:`0x${C}`}ae.prepend0x=_;function m(C){if(typeof C!="string")return!1;const M=g(C).toLowerCase();return i.test(M)}ae.isHexString=m;function h(C,M=!1){if(typeof C=="string"){const x=g(C).toLowerCase();if(i.test(x))return(0,n.HexString)(M?`0x${x}`:x)}throw r.standardErrors.rpc.invalidParams(`"${String(C)}" is not a hexadecimal string`)}ae.ensureHexString=h;function b(C,M=!1){let x=h(C,!1);return x.length%2===1&&(x=(0,n.HexString)(`0${x}`)),M?(0,n.HexString)(`0x${x}`):x}ae.ensureEvenLengthHexString=b;function w(C){if(typeof C=="string"){const M=g(C).toLowerCase();if(m(M)&&M.length===40)return(0,n.AddressString)(_(M))}throw r.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(C)}`)}ae.ensureAddressString=w;function I(C){if(Buffer.isBuffer(C))return C;if(typeof C=="string"){if(m(C)){const M=b(C,!1);return Buffer.from(M,"hex")}return Buffer.from(C,"utf8")}throw r.standardErrors.rpc.invalidParams(`Not binary data: ${String(C)}`)}ae.ensureBuffer=I;function A(C){if(typeof C=="number"&&Number.isInteger(C))return(0,n.IntNumber)(C);if(typeof C=="string"){if(l.test(C))return(0,n.IntNumber)(Number(C));if(m(C))return(0,n.IntNumber)(new t.default(b(C,!1),16).toNumber())}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureIntNumber=A;function D(C){if(C instanceof RegExp)return(0,n.RegExpString)(C.toString());throw r.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(C)}`)}ae.ensureRegExpString=D;function F(C){if(C!==null&&(t.default.isBN(C)||J(C)))return new t.default(C.toString(10),10);if(typeof C=="number")return new t.default(A(C));if(typeof C=="string"){if(l.test(C))return new t.default(C,10);if(m(C))return new t.default(b(C,!1),16)}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureBN=F;function W(C){if(typeof C=="string")return JSON.parse(C);if(typeof C=="object")return C;throw r.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(C)}`)}ae.ensureParsedJSONObject=W;function J(C){if(C==null||typeof C.constructor!="function")return!1;const{constructor:M}=C;return typeof M.config=="function"&&typeof M.EUCLID=="number"}ae.isBigNumber=J;function ee(C,M){return Array.from({length:M-C},(x,L)=>C+L)}ae.range=ee;function Q(){const C=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:M,host:x}=document.location,L=C?C.getAttribute("href"):null;return!L||L.startsWith("javascript:")||L.startsWith("vbscript:")?null:L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:")?L:L.startsWith("//")?M+L:`${M}//${x}${L}`}ae.getFavicon=Q;function re(C,M,x,L,j,T){const E=L?"parent-id":"id",N=new URLSearchParams({[E]:C,secret:M,server:x,v:j,chainId:T.toString()}).toString();return`${x}/#/link?${N}`}ae.createQrUrl=re;function q(){try{return window.frameElement!==null}catch{return!1}}ae.isInIFrame=q;function y(){try{return q()&&window.top?window.top.location:window.location}catch{return window.location}}ae.getLocation=y;function S(){var C;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((C=window?.navigator)===null||C===void 0?void 0:C.userAgent)}return ae.isMobileWeb=S,ae}var Er={},uu;function H0(){if(uu)return Er;uu=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.ScopedLocalStorage=void 0;let e=class{constructor(r){this.scope=r}setItem(r,n){localStorage.setItem(this.scopedKey(r),n)}getItem(r){return localStorage.getItem(this.scopedKey(r))}removeItem(r){localStorage.removeItem(this.scopedKey(r))}clear(){const r=this.scopedKey(""),n=[];for(let l=0;l<localStorage.length;l++){const i=localStorage.key(l);typeof i=="string"&&i.startsWith(r)&&n.push(i)}n.forEach(l=>localStorage.removeItem(l))}scopedKey(r){return`${this.scope}:${r}`}};return Er.ScopedLocalStorage=e,Er}var xt={},si={exports:{}},cu;function W0(){return cu||(cu=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function l(d,u,p){this.fn=d,this.context=u,this.once=p||!1}function i(d,u,p,s,f){if(typeof p!="function")throw new TypeError("The listener must be a function");var c=new l(p,s||d,f),g=r?r+u:u;return d._events[g]?d._events[g].fn?d._events[g]=[d._events[g],c]:d._events[g].push(c):(d._events[g]=c,d._eventsCount++),d}function o(d,u){--d._eventsCount===0?d._events=new n:delete d._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],p,s;if(this._eventsCount===0)return u;for(s in p=this._events)t.call(p,s)&&u.push(r?s.slice(1):s);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},a.prototype.listeners=function(u){var p=r?r+u:u,s=this._events[p];if(!s)return[];if(s.fn)return[s.fn];for(var f=0,c=s.length,g=new Array(c);f<c;f++)g[f]=s[f].fn;return g},a.prototype.listenerCount=function(u){var p=r?r+u:u,s=this._events[p];return s?s.fn?1:s.length:0},a.prototype.emit=function(u,p,s,f,c,g){var _=r?r+u:u;if(!this._events[_])return!1;var m=this._events[_],h=arguments.length,b,w;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),h){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,s),!0;case 4:return m.fn.call(m.context,p,s,f),!0;case 5:return m.fn.call(m.context,p,s,f,c),!0;case 6:return m.fn.call(m.context,p,s,f,c,g),!0}for(w=1,b=new Array(h-1);w<h;w++)b[w-1]=arguments[w];m.fn.apply(m.context,b)}else{var I=m.length,A;for(w=0;w<I;w++)switch(m[w].once&&this.removeListener(u,m[w].fn,void 0,!0),h){case 1:m[w].fn.call(m[w].context);break;case 2:m[w].fn.call(m[w].context,p);break;case 3:m[w].fn.call(m[w].context,p,s);break;case 4:m[w].fn.call(m[w].context,p,s,f);break;default:if(!b)for(A=1,b=new Array(h-1);A<h;A++)b[A-1]=arguments[A];m[w].fn.apply(m[w].context,b)}}return!0},a.prototype.on=function(u,p,s){return i(this,u,p,s,!1)},a.prototype.once=function(u,p,s){return i(this,u,p,s,!0)},a.prototype.removeListener=function(u,p,s,f){var c=r?r+u:u;if(!this._events[c])return this;if(!p)return o(this,c),this;var g=this._events[c];if(g.fn)g.fn===p&&(!f||g.once)&&(!s||g.context===s)&&o(this,c);else{for(var _=0,m=[],h=g.length;_<h;_++)(g[_].fn!==p||f&&!g[_].once||s&&g[_].context!==s)&&m.push(g[_]);m.length?this._events[c]=m.length===1?m[0]:m:o(this,c)}return this},a.prototype.removeAllListeners=function(u){var p;return u?(p=r?r+u:u,this._events[p]&&o(this,p)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(si)),si.exports}var Sr={},Rr={},Cr={},lu;function va(){return lu||(lu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.EVENTS=void 0,Cr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),Cr}var Ke={},fu;function ba(){if(fu)return Ke;fu=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.RelayAbstract=Ke.APP_VERSION_KEY=Ke.LOCAL_STORAGE_ADDRESSES_KEY=Ke.WALLET_USER_NAME_KEY=void 0;const e=jn();Ke.WALLET_USER_NAME_KEY="walletUsername",Ke.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",Ke.APP_VERSION_KEY="AppVersion";let t=class{async makeEthereumJSONRPCRequest(n,l){if(!l)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(l,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json"}}).then(i=>i.json()).then(i=>{if(!i)throw e.standardErrors.rpc.parse({});const o=i,{error:a}=o;if(a)throw(0,e.serializeError)(a,n.method);return o})}};return Ke.RelayAbstract=t,Ke}var Mr={},oi={exports:{}},pn={exports:{}},hu;function tt(){return hu||(hu=1,typeof Object.create=="function"?pn.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pn.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}),pn.exports}var gn={exports:{}},ai={},kr={},du;function $0(){if(du)return kr;du=1,kr.byteLength=a,kr.toByteArray=u,kr.fromByteArray=f;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,i=n.length;l<i;++l)e[l]=n[l],t[n.charCodeAt(l)]=l;t[45]=62,t[95]=63;function o(c){var g=c.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=c.indexOf("=");_===-1&&(_=g);var m=_===g?0:4-_%4;return[_,m]}function a(c){var g=o(c),_=g[0],m=g[1];return(_+m)*3/4-m}function d(c,g,_){return(g+_)*3/4-_}function u(c){var g,_=o(c),m=_[0],h=_[1],b=new r(d(c,m,h)),w=0,I=h>0?m-4:m,A;for(A=0;A<I;A+=4)g=t[c.charCodeAt(A)]<<18|t[c.charCodeAt(A+1)]<<12|t[c.charCodeAt(A+2)]<<6|t[c.charCodeAt(A+3)],b[w++]=g>>16&255,b[w++]=g>>8&255,b[w++]=g&255;return h===2&&(g=t[c.charCodeAt(A)]<<2|t[c.charCodeAt(A+1)]>>4,b[w++]=g&255),h===1&&(g=t[c.charCodeAt(A)]<<10|t[c.charCodeAt(A+1)]<<4|t[c.charCodeAt(A+2)]>>2,b[w++]=g>>8&255,b[w++]=g&255),b}function p(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function s(c,g,_){for(var m,h=[],b=g;b<_;b+=3)m=(c[b]<<16&16711680)+(c[b+1]<<8&65280)+(c[b+2]&255),h.push(p(m));return h.join("")}function f(c){for(var g,_=c.length,m=_%3,h=[],b=16383,w=0,I=_-m;w<I;w+=b)h.push(s(c,w,w+b>I?I:w+b));return m===1?(g=c[_-1],h.push(e[g>>2]+e[g<<4&63]+"==")):m===2&&(g=(c[_-2]<<8)+c[_-1],h.push(e[g>>10]+e[g>>4&63]+e[g<<2&63]+"=")),h.join("")}return kr}var yn={};var pu;function V0(){return pu||(pu=1,yn.read=function(e,t,r,n,l){var i,o,a=l*8-n-1,d=(1<<a)-1,u=d>>1,p=-7,s=r?l-1:0,f=r?-1:1,c=e[t+s];for(s+=f,i=c&(1<<-p)-1,c>>=-p,p+=a;p>0;i=i*256+e[t+s],s+=f,p-=8);for(o=i&(1<<-p)-1,i>>=-p,p+=n;p>0;o=o*256+e[t+s],s+=f,p-=8);if(i===0)i=1-u;else{if(i===d)return o?NaN:(c?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(c?-1:1)*o*Math.pow(2,i-n)},yn.write=function(e,t,r,n,l,i){var o,a,d,u=i*8-l-1,p=(1<<u)-1,s=p>>1,f=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:i-1,g=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-o))<1&&(o--,d*=2),o+s>=1?t+=f/d:t+=f*Math.pow(2,1-s),t*d>=2&&(o++,d/=2),o+s>=p?(a=0,o=p):o+s>=1?(a=(t*d-1)*Math.pow(2,l),o=o+s):(a=t*Math.pow(2,s-1)*Math.pow(2,l),o=0));l>=8;e[r+c]=a&255,c+=g,a/=256,l-=8);for(o=o<<l|a,u+=l;u>0;e[r+c]=o&255,c+=g,o/=256,u-=8);e[r+c-g]|=_*128}),yn}var gu;function Hn(){return gu||(gu=1,(function(e){const t=$0(),r=V0(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;const l=2147483647;e.kMaxLength=l,a.TYPED_ARRAY_SUPPORT=i(),!a.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 i(){try{const k=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(k,v),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(k){if(k>l)throw new RangeError('The value "'+k+'" is invalid for option "size"');const v=new Uint8Array(k);return Object.setPrototypeOf(v,a.prototype),v}function a(k,v,R){if(typeof k=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(k)}return d(k,v,R)}a.poolSize=8192;function d(k,v,R){if(typeof k=="string")return f(k,v);if(ArrayBuffer.isView(k))return g(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(me(k,ArrayBuffer)||k&&me(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(k,SharedArrayBuffer)||k&&me(k.buffer,SharedArrayBuffer)))return _(k,v,R);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return a.from(O,v,R);const H=m(k);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),v,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,v,R){return d(k,v,R)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function p(k,v,R){return u(k),k<=0?o(k):v!==void 0?typeof R=="string"?o(k).fill(v,R):o(k).fill(v):o(k)}a.alloc=function(k,v,R){return p(k,v,R)};function s(k){return u(k),o(k<0?0:h(k)|0)}a.allocUnsafe=function(k){return s(k)},a.allocUnsafeSlow=function(k){return s(k)};function f(k,v){if((typeof v!="string"||v==="")&&(v="utf8"),!a.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const R=w(k,v)|0;let O=o(R);const H=O.write(k,v);return H!==R&&(O=O.slice(0,H)),O}function c(k){const v=k.length<0?0:h(k.length)|0,R=o(v);for(let O=0;O<v;O+=1)R[O]=k[O]&255;return R}function g(k){if(me(k,Uint8Array)){const v=new Uint8Array(k);return _(v.buffer,v.byteOffset,v.byteLength)}return c(k)}function _(k,v,R){if(v<0||k.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<v+(R||0))throw new RangeError('"length" is outside of buffer bounds');let O;return v===void 0&&R===void 0?O=new Uint8Array(k):R===void 0?O=new Uint8Array(k,v):O=new Uint8Array(k,v,R),Object.setPrototypeOf(O,a.prototype),O}function m(k){if(a.isBuffer(k)){const v=h(k.length)|0,R=o(v);return R.length===0||k.copy(R,0,0,v),R}if(k.length!==void 0)return typeof k.length!="number"||pe(k.length)?o(0):c(k);if(k.type==="Buffer"&&Array.isArray(k.data))return c(k.data)}function h(k){if(k>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==a.prototype},a.compare=function(v,R){if(me(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),me(R,Uint8Array)&&(R=a.from(R,R.offset,R.byteLength)),!a.isBuffer(v)||!a.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===R)return 0;let O=v.length,H=R.length;for(let V=0,z=Math.min(O,H);V<z;++V)if(v[V]!==R[V]){O=v[V],H=R[V];break}return O<H?-1:H<O?1:0},a.isEncoding=function(v){switch(String(v).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}},a.concat=function(v,R){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return a.alloc(0);let O;if(R===void 0)for(R=0,O=0;O<v.length;++O)R+=v[O].length;const H=a.allocUnsafe(R);let V=0;for(O=0;O<v.length;++O){let z=v[O];if(me(z,Uint8Array))V+z.length>H.length?(a.isBuffer(z)||(z=a.from(z)),z.copy(H,V)):Uint8Array.prototype.set.call(H,z,V);else if(a.isBuffer(z))z.copy(H,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return H};function w(k,v){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||me(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const R=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&R===0)return 0;let H=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return se(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return ge(k).length;default:if(H)return O?-1:se(k).length;v=(""+v).toLowerCase(),H=!0}}a.byteLength=w;function I(k,v,R){let O=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,v>>>=0,R<=v))return"";for(k||(k="utf8");;)switch(k){case"hex":return L(this,v,R);case"utf8":case"utf-8":return y(this,v,R);case"ascii":return M(this,v,R);case"latin1":case"binary":return x(this,v,R);case"base64":return q(this,v,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,v,R);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}a.prototype._isBuffer=!0;function A(k,v,R){const O=k[v];k[v]=k[R],k[R]=O}a.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<v;R+=2)A(this,R,R+1);return this},a.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<v;R+=4)A(this,R,R+3),A(this,R+1,R+2);return this},a.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<v;R+=8)A(this,R,R+7),A(this,R+1,R+6),A(this,R+2,R+5),A(this,R+3,R+4);return this},a.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?y(this,0,v):I.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(v){if(!a.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:a.compare(this,v)===0},a.prototype.inspect=function(){let v="";const R=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(v+=" ... "),"<Buffer "+v+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(v,R,O,H,V){if(me(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(R===void 0&&(R=0),O===void 0&&(O=v?v.length:0),H===void 0&&(H=0),V===void 0&&(V=this.length),R<0||O>v.length||H<0||V>this.length)throw new RangeError("out of range index");if(H>=V&&R>=O)return 0;if(H>=V)return-1;if(R>=O)return 1;if(R>>>=0,O>>>=0,H>>>=0,V>>>=0,this===v)return 0;let z=V-H,he=O-R;const fe=Math.min(z,he),le=this.slice(H,V),be=v.slice(R,O);for(let ce=0;ce<fe;++ce)if(le[ce]!==be[ce]){z=le[ce],he=be[ce];break}return z<he?-1:he<z?1:0};function D(k,v,R,O,H){if(k.length===0)return-1;if(typeof R=="string"?(O=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,pe(R)&&(R=H?0:k.length-1),R<0&&(R=k.length+R),R>=k.length){if(H)return-1;R=k.length-1}else if(R<0)if(H)R=0;else return-1;if(typeof v=="string"&&(v=a.from(v,O)),a.isBuffer(v))return v.length===0?-1:F(k,v,R,O,H);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(k,v,R):Uint8Array.prototype.lastIndexOf.call(k,v,R):F(k,[v],R,O,H);throw new TypeError("val must be string, number or Buffer")}function F(k,v,R,O,H){let V=1,z=k.length,he=v.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||v.length<2)return-1;V=2,z/=2,he/=2,R/=2}function fe(be,ce){return V===1?be[ce]:be.readUInt16BE(ce*V)}let le;if(H){let be=-1;for(le=R;le<z;le++)if(fe(k,le)===fe(v,be===-1?0:le-be)){if(be===-1&&(be=le),le-be+1===he)return be*V}else be!==-1&&(le-=le-be),be=-1}else for(R+he>z&&(R=z-he),le=R;le>=0;le--){let be=!0;for(let ce=0;ce<he;ce++)if(fe(k,le+ce)!==fe(v,ce)){be=!1;break}if(be)return le}return-1}a.prototype.includes=function(v,R,O){return this.indexOf(v,R,O)!==-1},a.prototype.indexOf=function(v,R,O){return D(this,v,R,O,!0)},a.prototype.lastIndexOf=function(v,R,O){return D(this,v,R,O,!1)};function W(k,v,R,O){R=Number(R)||0;const H=k.length-R;O?(O=Number(O),O>H&&(O=H)):O=H;const V=v.length;O>V/2&&(O=V/2);let z;for(z=0;z<O;++z){const he=parseInt(v.substr(z*2,2),16);if(pe(he))return z;k[R+z]=he}return z}function J(k,v,R,O){return ue(se(v,k.length-R),k,R,O)}function ee(k,v,R,O){return ue(de(v),k,R,O)}function Q(k,v,R,O){return ue(ge(v),k,R,O)}function re(k,v,R,O){return ue(He(v,k.length-R),k,R,O)}a.prototype.write=function(v,R,O,H){if(R===void 0)H="utf8",O=this.length,R=0;else if(O===void 0&&typeof R=="string")H=R,O=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(O)?(O=O>>>0,H===void 0&&(H="utf8")):(H=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-R;if((O===void 0||O>V)&&(O=V),v.length>0&&(O<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let z=!1;for(;;)switch(H){case"hex":return W(this,v,R,O);case"utf8":case"utf-8":return J(this,v,R,O);case"ascii":case"latin1":case"binary":return ee(this,v,R,O);case"base64":return Q(this,v,R,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,v,R,O);default:if(z)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(k,v,R){return v===0&&R===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(v,R))}function y(k,v,R){R=Math.min(k.length,R);const O=[];let H=v;for(;H<R;){const V=k[H];let z=null,he=V>239?4:V>223?3:V>191?2:1;if(H+he<=R){let fe,le,be,ce;switch(he){case 1:V<128&&(z=V);break;case 2:fe=k[H+1],(fe&192)===128&&(ce=(V&31)<<6|fe&63,ce>127&&(z=ce));break;case 3:fe=k[H+1],le=k[H+2],(fe&192)===128&&(le&192)===128&&(ce=(V&15)<<12|(fe&63)<<6|le&63,ce>2047&&(ce<55296||ce>57343)&&(z=ce));break;case 4:fe=k[H+1],le=k[H+2],be=k[H+3],(fe&192)===128&&(le&192)===128&&(be&192)===128&&(ce=(V&15)<<18|(fe&63)<<12|(le&63)<<6|be&63,ce>65535&&ce<1114112&&(z=ce))}}z===null?(z=65533,he=1):z>65535&&(z-=65536,O.push(z>>>10&1023|55296),z=56320|z&1023),O.push(z),H+=he}return C(O)}const S=4096;function C(k){const v=k.length;if(v<=S)return String.fromCharCode.apply(String,k);let R="",O=0;for(;O<v;)R+=String.fromCharCode.apply(String,k.slice(O,O+=S));return R}function M(k,v,R){let O="";R=Math.min(k.length,R);for(let H=v;H<R;++H)O+=String.fromCharCode(k[H]&127);return O}function x(k,v,R){let O="";R=Math.min(k.length,R);for(let H=v;H<R;++H)O+=String.fromCharCode(k[H]);return O}function L(k,v,R){const O=k.length;(!v||v<0)&&(v=0),(!R||R<0||R>O)&&(R=O);let H="";for(let V=v;V<R;++V)H+=ye[k[V]];return H}function j(k,v,R){const O=k.slice(v,R);let H="";for(let V=0;V<O.length-1;V+=2)H+=String.fromCharCode(O[V]+O[V+1]*256);return H}a.prototype.slice=function(v,R){const O=this.length;v=~~v,R=R===void 0?O:~~R,v<0?(v+=O,v<0&&(v=0)):v>O&&(v=O),R<0?(R+=O,R<0&&(R=0)):R>O&&(R=O),R<v&&(R=v);const H=this.subarray(v,R);return Object.setPrototypeOf(H,a.prototype),H};function T(k,v,R){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+v>R)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=this[v],V=1,z=0;for(;++z<R&&(V*=256);)H+=this[v+z]*V;return H},a.prototype.readUintBE=a.prototype.readUIntBE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=this[v+--R],V=1;for(;R>0&&(V*=256);)H+=this[v+--R]*V;return H},a.prototype.readUint8=a.prototype.readUInt8=function(v,R){return v=v>>>0,R||T(v,1,this.length),this[v]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(v,R){return v=v>>>0,R||T(v,2,this.length),this[v]|this[v+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(v,R){return v=v>>>0,R||T(v,2,this.length),this[v]<<8|this[v+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(v,R){return v=v>>>0,R||T(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(v,R){return v=v>>>0,R||T(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},a.prototype.readBigUInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=R+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,V=this[++v]+this[++v]*2**8+this[++v]*2**16+O*2**24;return BigInt(H)+(BigInt(V)<<BigInt(32))}),a.prototype.readBigUInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=R*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],V=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O;return(BigInt(H)<<BigInt(32))+BigInt(V)}),a.prototype.readIntLE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=this[v],V=1,z=0;for(;++z<R&&(V*=256);)H+=this[v+z]*V;return V*=128,H>=V&&(H-=Math.pow(2,8*R)),H},a.prototype.readIntBE=function(v,R,O){v=v>>>0,R=R>>>0,O||T(v,R,this.length);let H=R,V=1,z=this[v+--H];for(;H>0&&(V*=256);)z+=this[v+--H]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*R)),z},a.prototype.readInt8=function(v,R){return v=v>>>0,R||T(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},a.prototype.readInt16LE=function(v,R){v=v>>>0,R||T(v,2,this.length);const O=this[v]|this[v+1]<<8;return O&32768?O|4294901760:O},a.prototype.readInt16BE=function(v,R){v=v>>>0,R||T(v,2,this.length);const O=this[v+1]|this[v]<<8;return O&32768?O|4294901760:O},a.prototype.readInt32LE=function(v,R){return v=v>>>0,R||T(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},a.prototype.readInt32BE=function(v,R){return v=v>>>0,R||T(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},a.prototype.readBigInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(O<<24);return(BigInt(H)<<BigInt(32))+BigInt(R+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),a.prototype.readBigInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const R=this[v],O=this[v+7];(R===void 0||O===void 0)&&K(v,this.length-8);const H=(R<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(H)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O)}),a.prototype.readFloatLE=function(v,R){return v=v>>>0,R||T(v,4,this.length),r.read(this,v,!0,23,4)},a.prototype.readFloatBE=function(v,R){return v=v>>>0,R||T(v,4,this.length),r.read(this,v,!1,23,4)},a.prototype.readDoubleLE=function(v,R){return v=v>>>0,R||T(v,8,this.length),r.read(this,v,!0,52,8)},a.prototype.readDoubleBE=function(v,R){return v=v>>>0,R||T(v,8,this.length),r.read(this,v,!1,52,8)};function E(k,v,R,O,H,V){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>H||v<V)throw new RangeError('"value" argument is out of bounds');if(R+O>k.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(v,R,O,H){if(v=+v,R=R>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;E(this,v,R,O,he,0)}let V=1,z=0;for(this[R]=v&255;++z<O&&(V*=256);)this[R+z]=v/V&255;return R+O},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(v,R,O,H){if(v=+v,R=R>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;E(this,v,R,O,he,0)}let V=O-1,z=1;for(this[R+V]=v&255;--V>=0&&(z*=256);)this[R+V]=v/z&255;return R+O},a.prototype.writeUint8=a.prototype.writeUInt8=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,1,255,0),this[R]=v&255,R+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,65535,0),this[R]=v&255,this[R+1]=v>>>8,R+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,65535,0),this[R]=v>>>8,this[R+1]=v&255,R+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,4294967295,0),this[R+3]=v>>>24,this[R+2]=v>>>16,this[R+1]=v>>>8,this[R]=v&255,R+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,4294967295,0),this[R]=v>>>24,this[R+1]=v>>>16,this[R+2]=v>>>8,this[R+3]=v&255,R+4};function N(k,v,R,O,H){B(v,O,H,k,R,7);let V=Number(v&BigInt(4294967295));k[R++]=V,V=V>>8,k[R++]=V,V=V>>8,k[R++]=V,V=V>>8,k[R++]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[R++]=z,z=z>>8,k[R++]=z,z=z>>8,k[R++]=z,z=z>>8,k[R++]=z,R}function te(k,v,R,O,H){B(v,O,H,k,R,7);let V=Number(v&BigInt(4294967295));k[R+7]=V,V=V>>8,k[R+6]=V,V=V>>8,k[R+5]=V,V=V>>8,k[R+4]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[R+3]=z,z=z>>8,k[R+2]=z,z=z>>8,k[R+1]=z,z=z>>8,k[R]=z,R+8}a.prototype.writeBigUInt64LE=$e(function(v,R=0){return N(this,v,R,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=$e(function(v,R=0){return te(this,v,R,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(v,R,O,H){if(v=+v,R=R>>>0,!H){const fe=Math.pow(2,8*O-1);E(this,v,R,O,fe-1,-fe)}let V=0,z=1,he=0;for(this[R]=v&255;++V<O&&(z*=256);)v<0&&he===0&&this[R+V-1]!==0&&(he=1),this[R+V]=(v/z>>0)-he&255;return R+O},a.prototype.writeIntBE=function(v,R,O,H){if(v=+v,R=R>>>0,!H){const fe=Math.pow(2,8*O-1);E(this,v,R,O,fe-1,-fe)}let V=O-1,z=1,he=0;for(this[R+V]=v&255;--V>=0&&(z*=256);)v<0&&he===0&&this[R+V+1]!==0&&(he=1),this[R+V]=(v/z>>0)-he&255;return R+O},a.prototype.writeInt8=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,1,127,-128),v<0&&(v=255+v+1),this[R]=v&255,R+1},a.prototype.writeInt16LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,32767,-32768),this[R]=v&255,this[R+1]=v>>>8,R+2},a.prototype.writeInt16BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,2,32767,-32768),this[R]=v>>>8,this[R+1]=v&255,R+2},a.prototype.writeInt32LE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,2147483647,-2147483648),this[R]=v&255,this[R+1]=v>>>8,this[R+2]=v>>>16,this[R+3]=v>>>24,R+4},a.prototype.writeInt32BE=function(v,R,O){return v=+v,R=R>>>0,O||E(this,v,R,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[R]=v>>>24,this[R+1]=v>>>16,this[R+2]=v>>>8,this[R+3]=v&255,R+4},a.prototype.writeBigInt64LE=$e(function(v,R=0){return N(this,v,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=$e(function(v,R=0){return te(this,v,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(k,v,R,O,H,V){if(R+O>k.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function U(k,v,R,O,H){return v=+v,R=R>>>0,H||Y(k,v,R,4),r.write(k,v,R,O,23,4),R+4}a.prototype.writeFloatLE=function(v,R,O){return U(this,v,R,!0,O)},a.prototype.writeFloatBE=function(v,R,O){return U(this,v,R,!1,O)};function $(k,v,R,O,H){return v=+v,R=R>>>0,H||Y(k,v,R,8),r.write(k,v,R,O,52,8),R+8}a.prototype.writeDoubleLE=function(v,R,O){return $(this,v,R,!0,O)},a.prototype.writeDoubleBE=function(v,R,O){return $(this,v,R,!1,O)},a.prototype.copy=function(v,R,O,H){if(!a.isBuffer(v))throw new TypeError("argument should be a Buffer");if(O||(O=0),!H&&H!==0&&(H=this.length),R>=v.length&&(R=v.length),R||(R=0),H>0&&H<O&&(H=O),H===O||v.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),v.length-R<H-O&&(H=v.length-R+O);const V=H-O;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(R,O,H):Uint8Array.prototype.set.call(v,this.subarray(O,H),R),V},a.prototype.fill=function(v,R,O,H){if(typeof v=="string"){if(typeof R=="string"?(H=R,R=0,O=this.length):typeof O=="string"&&(H=O,O=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!a.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(v.length===1){const z=v.charCodeAt(0);(H==="utf8"&&z<128||H==="latin1")&&(v=z)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(R<0||this.length<R||this.length<O)throw new RangeError("Out of range index");if(O<=R)return this;R=R>>>0,O=O===void 0?this.length:O>>>0,v||(v=0);let V;if(typeof v=="number")for(V=R;V<O;++V)this[V]=v;else{const z=a.isBuffer(v)?v:a.from(v,H),he=z.length;if(he===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(V=0;V<O-R;++V)this[V+R]=z[V%he]}return this};const G={};function X(k,v,R){G[k]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}X("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(k,v){return`The "${k}" argument must be of type number. Received type ${typeof v}`},TypeError),X("ERR_OUT_OF_RANGE",function(k,v,R){let O=`The value of "${k}" is out of range.`,H=R;return Number.isInteger(R)&&Math.abs(R)>2**32?H=ne(String(R)):typeof R=="bigint"&&(H=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(H=ne(H)),H+="n"),O+=` It must be ${v}. Received ${H}`,O},RangeError);function ne(k){let v="",R=k.length;const O=k[0]==="-"?1:0;for(;R>=O+4;R-=3)v=`_${k.slice(R-3,R)}${v}`;return`${k.slice(0,R)}${v}`}function P(k,v,R){Z(v,"offset"),(k[v]===void 0||k[v+R]===void 0)&&K(v,k.length-(R+1))}function B(k,v,R,O,H,V){if(k>R||k<v){const z=typeof v=="bigint"?"n":"";let he;throw v===0||v===BigInt(0)?he=`>= 0${z} and < 2${z} ** ${(V+1)*8}${z}`:he=`>= -(2${z} ** ${(V+1)*8-1}${z}) and < 2 ** ${(V+1)*8-1}${z}`,new G.ERR_OUT_OF_RANGE("value",he,k)}P(O,H,V)}function Z(k,v){if(typeof k!="number")throw new G.ERR_INVALID_ARG_TYPE(v,"number",k)}function K(k,v,R){throw Math.floor(k)!==k?(Z(k,R),new G.ERR_OUT_OF_RANGE("offset","an integer",k)):v<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,k)}const oe=/[^+/0-9A-Za-z-_]/g;function ie(k){if(k=k.split("=")[0],k=k.trim().replace(oe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function se(k,v){v=v||1/0;let R;const O=k.length;let H=null;const V=[];for(let z=0;z<O;++z){if(R=k.charCodeAt(z),R>55295&&R<57344){if(!H){if(R>56319){(v-=3)>-1&&V.push(239,191,189);continue}else if(z+1===O){(v-=3)>-1&&V.push(239,191,189);continue}H=R;continue}if(R<56320){(v-=3)>-1&&V.push(239,191,189),H=R;continue}R=(H-55296<<10|R-56320)+65536}else H&&(v-=3)>-1&&V.push(239,191,189);if(H=null,R<128){if((v-=1)<0)break;V.push(R)}else if(R<2048){if((v-=2)<0)break;V.push(R>>6|192,R&63|128)}else if(R<65536){if((v-=3)<0)break;V.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((v-=4)<0)break;V.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return V}function de(k){const v=[];for(let R=0;R<k.length;++R)v.push(k.charCodeAt(R)&255);return v}function He(k,v){let R,O,H;const V=[];for(let z=0;z<k.length&&!((v-=2)<0);++z)R=k.charCodeAt(z),O=R>>8,H=R%256,V.push(H),V.push(O);return V}function ge(k){return t.toByteArray(ie(k))}function ue(k,v,R,O){let H;for(H=0;H<O&&!(H+R>=v.length||H>=k.length);++H)v[H+R]=k[H];return H}function me(k,v){return k instanceof v||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===v.name}function pe(k){return k!==k}const ye=(function(){const k="0123456789abcdef",v=new Array(256);for(let R=0;R<16;++R){const O=R*16;for(let H=0;H<16;++H)v[O+H]=k[R]+k[H]}return v})();function $e(k){return typeof BigInt>"u"?ve:k}function ve(){throw new Error("BigInt not supported")}})(ai)),ai}var yu;function ct(){return yu||(yu=1,(function(e,t){var r=Hn(),n=r.Buffer;function l(o,a){for(var d in o)a[d]=o[d]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(l(r,t),t.Buffer=i);function i(o,a,d){return n(o,a,d)}i.prototype=Object.create(n.prototype),l(n,i),i.from=function(o,a,d){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,d)},i.alloc=function(o,a,d){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof d=="string"?u.fill(a,d):u.fill(a):u.fill(0),u},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(gn,gn.exports)),gn.exports}var ui,mu;function z0(){if(mu)return ui;mu=1;var e={}.toString;return ui=Array.isArray||function(t){return e.call(t)=="[object Array]"},ui}var ci,_u;function rn(){return _u||(_u=1,ci=TypeError),ci}var li,vu;function $h(){return vu||(vu=1,li=Object),li}var fi,bu;function G0(){return bu||(bu=1,fi=Error),fi}var hi,wu;function J0(){return wu||(wu=1,hi=EvalError),hi}var di,Eu;function Z0(){return Eu||(Eu=1,di=RangeError),di}var pi,Su;function K0(){return Su||(Su=1,pi=ReferenceError),pi}var gi,Ru;function Vh(){return Ru||(Ru=1,gi=SyntaxError),gi}var yi,Cu;function Q0(){return Cu||(Cu=1,yi=URIError),yi}var mi,Mu;function Y0(){return Mu||(Mu=1,mi=Math.abs),mi}var _i,ku;function X0(){return ku||(ku=1,_i=Math.floor),_i}var vi,Iu;function ep(){return Iu||(Iu=1,vi=Math.max),vi}var bi,xu;function tp(){return xu||(xu=1,bi=Math.min),bi}var wi,Au;function rp(){return Au||(Au=1,wi=Math.pow),wi}var Ei,Tu;function np(){return Tu||(Tu=1,Ei=Math.round),Ei}var Si,Pu;function ip(){return Pu||(Pu=1,Si=Number.isNaN||function(t){return t!==t}),Si}var Ri,Bu;function sp(){if(Bu)return Ri;Bu=1;var e=ip();return Ri=function(r){return e(r)||r===0?r:r<0?-1:1},Ri}var Ci,Lu;function op(){return Lu||(Lu=1,Ci=Object.getOwnPropertyDescriptor),Ci}var Mi,Nu;function nn(){if(Nu)return Mi;Nu=1;var e=op();if(e)try{e([],"length")}catch{e=null}return Mi=e,Mi}var ki,Ou;function Wn(){if(Ou)return ki;Ou=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ki=e,ki}var Ii,Fu;function zh(){return Fu||(Fu=1,Ii=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var l=42;t[r]=l;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==l||a.enumerable!==!0)return!1}return!0}),Ii}var xi,qu;function ap(){if(qu)return xi;qu=1;var e=typeof Symbol<"u"&&Symbol,t=zh();return xi=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},xi}var Ai,Du;function Gh(){return Du||(Du=1,Ai=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ai}var Ti,ju;function Jh(){if(ju)return Ti;ju=1;var e=$h();return Ti=e.getPrototypeOf||null,Ti}var Pi,Uu;function up(){if(Uu)return Pi;Uu=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",l=function(d,u){for(var p=[],s=0;s<d.length;s+=1)p[s]=d[s];for(var f=0;f<u.length;f+=1)p[f+d.length]=u[f];return p},i=function(d,u){for(var p=[],s=u,f=0;s<d.length;s+=1,f+=1)p[f]=d[s];return p},o=function(a,d){for(var u="",p=0;p<a.length;p+=1)u+=a[p],p+1<a.length&&(u+=d);return u};return Pi=function(d){var u=this;if(typeof u!="function"||t.apply(u)!==n)throw new TypeError(e+u);for(var p=i(arguments,1),s,f=function(){if(this instanceof s){var h=u.apply(this,l(p,arguments));return Object(h)===h?h:this}return u.apply(d,l(p,arguments))},c=r(0,u.length-p.length),g=[],_=0;_<c;_++)g[_]="$"+_;if(s=Function("binder","return function ("+o(g,",")+"){ return binder.apply(this,arguments); }")(f),u.prototype){var m=function(){};m.prototype=u.prototype,s.prototype=new m,m.prototype=null}return s},Pi}var Bi,Hu;function sn(){if(Hu)return Bi;Hu=1;var e=up();return Bi=Function.prototype.bind||e,Bi}var Li,Wu;function wa(){return Wu||(Wu=1,Li=Function.prototype.call),Li}var Ni,$u;function Ea(){return $u||($u=1,Ni=Function.prototype.apply),Ni}var Oi,Vu;function cp(){return Vu||(Vu=1,Oi=typeof Reflect<"u"&&Reflect&&Reflect.apply),Oi}var Fi,zu;function Zh(){if(zu)return Fi;zu=1;var e=sn(),t=Ea(),r=wa(),n=cp();return Fi=n||e.call(r,t),Fi}var qi,Gu;function Sa(){if(Gu)return qi;Gu=1;var e=sn(),t=rn(),r=wa(),n=Zh();return qi=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return n(e,r,i)},qi}var Di,Ju;function lp(){if(Ju)return Di;Ju=1;var e=Sa(),t=nn(),r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!r&&t&&t(Object.prototype,"__proto__"),l=Object,i=l.getPrototypeOf;return Di=n&&typeof n.get=="function"?e([n.get]):typeof i=="function"?function(a){return i(a==null?a:l(a))}:!1,Di}var ji,Zu;function Kh(){if(Zu)return ji;Zu=1;var e=Gh(),t=Jh(),r=lp();return ji=e?function(l){return e(l)}:t?function(l){if(!l||typeof l!="object"&&typeof l!="function")throw new TypeError("getProto: not an object");return t(l)}:r?function(l){return r(l)}:null,ji}var Ui,Ku;function fp(){if(Ku)return Ui;Ku=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=sn();return Ui=r.call(e,t),Ui}var Hi,Qu;function Qh(){if(Qu)return Hi;Qu=1;var e,t=$h(),r=G0(),n=J0(),l=Z0(),i=K0(),o=Vh(),a=rn(),d=Q0(),u=Y0(),p=X0(),s=ep(),f=tp(),c=rp(),g=np(),_=sp(),m=Function,h=function(X){try{return m('"use strict"; return ('+X+").constructor;")()}catch{}},b=nn(),w=Wn(),I=function(){throw new a},A=b?(function(){try{return arguments.callee,I}catch{try{return b(arguments,"callee").get}catch{return I}}})():I,D=ap()(),F=Kh(),W=Jh(),J=Gh(),ee=Ea(),Q=wa(),re={},q=typeof Uint8Array>"u"||!F?e:F(Uint8Array),y={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":D&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":re,"%AsyncGenerator%":re,"%AsyncGeneratorFunction%":re,"%AsyncIteratorPrototype%":re,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":re,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!D||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":l,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!D||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&F?F(""[Symbol.iterator]()):e,"%Symbol%":D?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":A,"%TypedArray%":q,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":ee,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":W,"%Math.abs%":u,"%Math.floor%":p,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":c,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":J};if(F)try{null.error}catch(X){var S=F(F(X));y["%Error.prototype%"]=S}var C=function X(ne){var P;if(ne==="%AsyncFunction%")P=h("async function () {}");else if(ne==="%GeneratorFunction%")P=h("function* () {}");else if(ne==="%AsyncGeneratorFunction%")P=h("async function* () {}");else if(ne==="%AsyncGenerator%"){var B=X("%AsyncGeneratorFunction%");B&&(P=B.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Z=X("%AsyncGenerator%");Z&&F&&(P=F(Z.prototype))}return y[ne]=P,P},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=sn(),L=fp(),j=x.call(Q,Array.prototype.concat),T=x.call(ee,Array.prototype.splice),E=x.call(Q,String.prototype.replace),N=x.call(Q,String.prototype.slice),te=x.call(Q,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,$=function(ne){var P=N(ne,0,1),B=N(ne,-1);if(P==="%"&&B!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&P!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var Z=[];return E(ne,Y,function(K,oe,ie,se){Z[Z.length]=ie?E(se,U,"$1"):oe||K}),Z},G=function(ne,P){var B=ne,Z;if(L(M,B)&&(Z=M[B],B="%"+Z[0]+"%"),L(y,B)){var K=y[B];if(K===re&&(K=C(B)),typeof K>"u"&&!P)throw new a("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Z,name:B,value:K}}throw new o("intrinsic "+ne+" does not exist!")};return Hi=function(ne,P){if(typeof ne!="string"||ne.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof P!="boolean")throw new a('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,ne)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=$(ne),Z=B.length>0?B[0]:"",K=G("%"+Z+"%",P),oe=K.name,ie=K.value,se=!1,de=K.alias;de&&(Z=de[0],T(B,j([0,1],de)));for(var He=1,ge=!0;He<B.length;He+=1){var ue=B[He],me=N(ue,0,1),pe=N(ue,-1);if((me==='"'||me==="'"||me==="`"||pe==='"'||pe==="'"||pe==="`")&&me!==pe)throw new o("property names with quotes must have matching quotes");if((ue==="constructor"||!ge)&&(se=!0),Z+="."+ue,oe="%"+Z+"%",L(y,oe))ie=y[oe];else if(ie!=null){if(!(ue in ie)){if(!P)throw new a("base intrinsic for "+ne+" exists, but the property is not available.");return}if(b&&He+1>=B.length){var ye=b(ie,ue);ge=!!ye,ge&&"get"in ye&&!("originalValue"in ye.get)?ie=ye.get:ie=ie[ue]}else ge=L(ie,ue),ie=ie[ue];ge&&!se&&(y[oe]=ie)}}return ie},Hi}var Wi,Yu;function Yh(){if(Yu)return Wi;Yu=1;var e=Qh(),t=Sa(),r=t([e("%String.prototype.indexOf%")]);return Wi=function(l,i){var o=e(l,!!i);return typeof o=="function"&&r(l,".prototype.")>-1?t([o]):o},Wi}var $i,Xu;function hp(){if(Xu)return $i;Xu=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(b){b!==n&&(t=null)}else t=null;var l=/^\s*class\b/,i=function(w){try{var I=e.call(w);return l.test(I)}catch{return!1}},o=function(w){try{return i(w)?!1:(e.call(w),!0)}catch{return!1}},a=Object.prototype.toString,d="[object Object]",u="[object Function]",p="[object GeneratorFunction]",s="[object HTMLAllCollection]",f="[object HTML document.all class]",c="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var h=document.all;a.call(h)===a.call(document.all)&&(m=function(w){if((_||!w)&&(typeof w>"u"||typeof w=="object"))try{var I=a.call(w);return(I===s||I===f||I===c||I===d)&&w("")==null}catch{}return!1})}return $i=t?function(w){if(m(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{t(w,null,r)}catch(I){if(I!==n)return!1}return!i(w)&&o(w)}:function(w){if(m(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(g)return o(w);if(i(w))return!1;var I=a.call(w);return I!==u&&I!==p&&!/^\[object HTML/.test(I)?!1:o(w)},$i}var Vi,ec;function dp(){if(ec)return Vi;ec=1;var e=hp(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(d,u,p){for(var s=0,f=d.length;s<f;s++)r.call(d,s)&&(p==null?u(d[s],s,d):u.call(p,d[s],s,d))},l=function(d,u,p){for(var s=0,f=d.length;s<f;s++)p==null?u(d.charAt(s),s,d):u.call(p,d.charAt(s),s,d)},i=function(d,u,p){for(var s in d)r.call(d,s)&&(p==null?u(d[s],s,d):u.call(p,d[s],s,d))};function o(a){return t.call(a)==="[object Array]"}return Vi=function(d,u,p){if(!e(u))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=p),o(d)?n(d,u,s):typeof d=="string"?l(d,u,s):i(d,u,s)},Vi}var zi,tc;function pp(){return tc||(tc=1,zi=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),zi}var Gi,rc;function gp(){if(rc)return Gi;rc=1;var e=pp(),t=typeof globalThis>"u"?ft:globalThis;return Gi=function(){for(var n=[],l=0;l<e.length;l++)typeof t[e[l]]=="function"&&(n[n.length]=e[l]);return n},Gi}var Ji={exports:{}},Zi,nc;function yp(){if(nc)return Zi;nc=1;var e=Wn(),t=Vh(),r=rn(),n=nn();return Zi=function(i,o,a){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,f=!!n&&n(i,o);if(e)e(i,o,{configurable:p===null&&f?f.configurable:!p,enumerable:d===null&&f?f.enumerable:!d,value:a,writable:u===null&&f?f.writable:!u});else if(s||!d&&!u&&!p)i[o]=a;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Zi}var Ki,ic;function mp(){if(ic)return Ki;ic=1;var e=Wn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Ki=t,Ki}var Qi,sc;function _p(){if(sc)return Qi;sc=1;var e=Qh(),t=yp(),r=mp()(),n=nn(),l=rn(),i=e("%Math.floor%");return Qi=function(a,d){if(typeof a!="function")throw new l("`fn` is not a function");if(typeof d!="number"||d<0||d>4294967295||i(d)!==d)throw new l("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],p=!0,s=!0;if("length"in a&&n){var f=n(a,"length");f&&!f.configurable&&(p=!1),f&&!f.writable&&(s=!1)}return(p||s||!u)&&(r?t(a,"length",d,!0,!0):t(a,"length",d)),a},Qi}var Yi,oc;function vp(){if(oc)return Yi;oc=1;var e=sn(),t=Ea(),r=Zh();return Yi=function(){return r(e,t,arguments)},Yi}var ac;function bp(){return ac||(ac=1,(function(e){var t=_p(),r=Wn(),n=Sa(),l=vp();e.exports=function(o){var a=n(arguments),d=o.length-(arguments.length-1);return t(a,1+(d>0?d:0),!0)},r?r(e.exports,"apply",{value:l}):e.exports.apply=l})(Ji)),Ji.exports}var Xi,uc;function wp(){if(uc)return Xi;uc=1;var e=zh();return Xi=function(){return e()&&!!Symbol.toStringTag},Xi}var es,cc;function Ep(){if(cc)return es;cc=1;var e=dp(),t=gp(),r=bp(),n=Yh(),l=nn(),i=Kh(),o=n("Object.prototype.toString"),a=wp()(),d=typeof globalThis>"u"?ft:globalThis,u=t(),p=n("String.prototype.slice"),s=n("Array.prototype.indexOf",!0)||function(m,h){for(var b=0;b<m.length;b+=1)if(m[b]===h)return b;return-1},f={__proto__:null};a&&l&&i?e(u,function(_){var m=new d[_];if(Symbol.toStringTag in m&&i){var h=i(m),b=l(h,Symbol.toStringTag);if(!b&&h){var w=i(h);b=l(w,Symbol.toStringTag)}f["$"+_]=r(b.get)}}):e(u,function(_){var m=new d[_],h=m.slice||m.set;h&&(f["$"+_]=r(h))});var c=function(m){var h=!1;return e(f,function(b,w){if(!h)try{"$"+b(m)===w&&(h=p(w,1))}catch{}}),h},g=function(m){var h=!1;return e(f,function(b,w){if(!h)try{b(m),h=p(w,1)}catch{}}),h};return es=function(m){if(!m||typeof m!="object")return!1;if(!a){var h=p(o(m),8,-1);return s(u,h)>-1?h:h!=="Object"?!1:g(m)}return l?c(m):null},es}var ts,lc;function Sp(){if(lc)return ts;lc=1;var e=Ep();return ts=function(r){return!!e(r)},ts}var rs,fc;function Rp(){if(fc)return rs;fc=1;var e=rn(),t=Yh(),r=t("TypedArray.prototype.buffer",!0),n=Sp();return rs=r||function(i){if(!n(i))throw new e("Not a Typed Array");return i.buffer},rs}var ns,hc;function Cp(){if(hc)return ns;hc=1;var e=ct().Buffer,t=z0(),r=Rp(),n=ArrayBuffer.isView||function(d){try{return r(d),!0}catch{return!1}},l=typeof Uint8Array<"u",i=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o=i&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return ns=function(d,u){if(e.isBuffer(d))return d.constructor&&!("isBuffer"in d)?e.from(d):d;if(typeof d=="string")return e.from(d,u);if(i&&n(d)){if(d.byteLength===0)return e.alloc(0);if(o){var p=e.from(d.buffer,d.byteOffset,d.byteLength);if(p.byteLength===d.byteLength)return p}var s=d instanceof Uint8Array?d:new Uint8Array(d.buffer,d.byteOffset,d.byteLength),f=e.from(s);if(f.length===d.byteLength)return f}if(l&&d instanceof Uint8Array)return e.from(d);var c=t(d);if(c)for(var g=0;g<d.length;g+=1){var _=d[g];if(typeof _!="number"||_<0||_>255||~~_!==_)throw new RangeError("Array items must be numbers in the range 0-255.")}if(c||e.isBuffer(d)&&d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d))return e.from(d);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},ns}var is,dc;function fr(){if(dc)return is;dc=1;var e=ct().Buffer,t=Cp();function r(n,l){this._block=e.alloc(n),this._finalSize=l,this._blockSize=n,this._len=0}return r.prototype.update=function(n,l){n=t(n,l||"utf8");for(var i=this._block,o=this._blockSize,a=n.length,d=this._len,u=0;u<a;){for(var p=d%o,s=Math.min(a-u,o-p),f=0;f<s;f++)i[p+f]=n[u+f];d+=s,u+=s,d%o===0&&this._update(i)}return this._len+=a,this},r.prototype.digest=function(n){var l=this._len%this._blockSize;this._block[l]=128,this._block.fill(0,l+1),l>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=this._len*8;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var o=(i&4294967295)>>>0,a=(i-o)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(o,this._blockSize-4)}this._update(this._block);var d=this._hash();return n?d.toString(n):d},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},is=r,is}var ss,pc;function Mp(){if(pc)return ss;pc=1;var e=tt(),t=fr(),r=ct().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function i(){this.init(),this._w=l,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(u){return u<<5|u>>>27}function a(u){return u<<30|u>>>2}function d(u,p,s,f){return u===0?p&s|~p&f:u===2?p&s|p&f|s&f:p^s^f}return i.prototype._update=function(u){for(var p=this._w,s=this._a|0,f=this._b|0,c=this._c|0,g=this._d|0,_=this._e|0,m=0;m<16;++m)p[m]=u.readInt32BE(m*4);for(;m<80;++m)p[m]=p[m-3]^p[m-8]^p[m-14]^p[m-16];for(var h=0;h<80;++h){var b=~~(h/20),w=o(s)+d(b,f,c,g)+_+p[h]+n[b]|0;_=g,g=c,c=a(f),f=s,s=w}this._a=s+this._a|0,this._b=f+this._b|0,this._c=c+this._c|0,this._d=g+this._d|0,this._e=_+this._e|0},i.prototype._hash=function(){var u=r.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},ss=i,ss}var os,gc;function kp(){if(gc)return os;gc=1;var e=tt(),t=fr(),r=ct().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function i(){this.init(),this._w=l,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(p){return p<<1|p>>>31}function a(p){return p<<5|p>>>27}function d(p){return p<<30|p>>>2}function u(p,s,f,c){return p===0?s&f|~s&c:p===2?s&f|s&c|f&c:s^f^c}return i.prototype._update=function(p){for(var s=this._w,f=this._a|0,c=this._b|0,g=this._c|0,_=this._d|0,m=this._e|0,h=0;h<16;++h)s[h]=p.readInt32BE(h*4);for(;h<80;++h)s[h]=o(s[h-3]^s[h-8]^s[h-14]^s[h-16]);for(var b=0;b<80;++b){var w=~~(b/20),I=a(f)+u(w,c,g,_)+m+s[b]+n[w]|0;m=_,_=g,g=d(c),c=f,f=I}this._a=f+this._a|0,this._b=c+this._b|0,this._c=g+this._c|0,this._d=_+this._d|0,this._e=m+this._e|0},i.prototype._hash=function(){var p=r.allocUnsafe(20);return p.writeInt32BE(this._a|0,0),p.writeInt32BE(this._b|0,4),p.writeInt32BE(this._c|0,8),p.writeInt32BE(this._d|0,12),p.writeInt32BE(this._e|0,16),p},os=i,os}var as,yc;function Xh(){if(yc)return as;yc=1;var e=tt(),t=fr(),r=ct().Buffer,n=[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],l=new Array(64);function i(){this.init(),this._w=l,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function o(f,c,g){return g^f&(c^g)}function a(f,c,g){return f&c|g&(f|c)}function d(f){return(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10)}function u(f){return(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7)}function p(f){return(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3}function s(f){return(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10}return i.prototype._update=function(f){for(var c=this._w,g=this._a|0,_=this._b|0,m=this._c|0,h=this._d|0,b=this._e|0,w=this._f|0,I=this._g|0,A=this._h|0,D=0;D<16;++D)c[D]=f.readInt32BE(D*4);for(;D<64;++D)c[D]=s(c[D-2])+c[D-7]+p(c[D-15])+c[D-16]|0;for(var F=0;F<64;++F){var W=A+u(b)+o(b,w,I)+n[F]+c[F]|0,J=d(g)+a(g,_,m)|0;A=I,I=w,w=b,b=h+W|0,h=m,m=_,_=g,g=W+J|0}this._a=g+this._a|0,this._b=_+this._b|0,this._c=m+this._c|0,this._d=h+this._d|0,this._e=b+this._e|0,this._f=w+this._f|0,this._g=I+this._g|0,this._h=A+this._h|0},i.prototype._hash=function(){var f=r.allocUnsafe(32);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f.writeInt32BE(this._h,28),f},as=i,as}var us,mc;function Ip(){if(mc)return us;mc=1;var e=tt(),t=Xh(),r=fr(),n=ct().Buffer,l=new Array(64);function i(){this.init(),this._w=l,r.call(this,64,56)}return e(i,t),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var o=n.allocUnsafe(28);return o.writeInt32BE(this._a,0),o.writeInt32BE(this._b,4),o.writeInt32BE(this._c,8),o.writeInt32BE(this._d,12),o.writeInt32BE(this._e,16),o.writeInt32BE(this._f,20),o.writeInt32BE(this._g,24),o},us=i,us}var cs,_c;function ed(){if(_c)return cs;_c=1;var e=tt(),t=fr(),r=ct().Buffer,n=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function i(){this.init(),this._w=l,t.call(this,128,112)}e(i,t),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function o(_,m,h){return h^_&(m^h)}function a(_,m,h){return _&m|h&(_|m)}function d(_,m){return(_>>>28|m<<4)^(m>>>2|_<<30)^(m>>>7|_<<25)}function u(_,m){return(_>>>14|m<<18)^(_>>>18|m<<14)^(m>>>9|_<<23)}function p(_,m){return(_>>>1|m<<31)^(_>>>8|m<<24)^_>>>7}function s(_,m){return(_>>>1|m<<31)^(_>>>8|m<<24)^(_>>>7|m<<25)}function f(_,m){return(_>>>19|m<<13)^(m>>>29|_<<3)^_>>>6}function c(_,m){return(_>>>19|m<<13)^(m>>>29|_<<3)^(_>>>6|m<<26)}function g(_,m){return _>>>0<m>>>0?1:0}return i.prototype._update=function(_){for(var m=this._w,h=this._ah|0,b=this._bh|0,w=this._ch|0,I=this._dh|0,A=this._eh|0,D=this._fh|0,F=this._gh|0,W=this._hh|0,J=this._al|0,ee=this._bl|0,Q=this._cl|0,re=this._dl|0,q=this._el|0,y=this._fl|0,S=this._gl|0,C=this._hl|0,M=0;M<32;M+=2)m[M]=_.readInt32BE(M*4),m[M+1]=_.readInt32BE(M*4+4);for(;M<160;M+=2){var x=m[M-30],L=m[M-30+1],j=p(x,L),T=s(L,x);x=m[M-4],L=m[M-4+1];var E=f(x,L),N=c(L,x),te=m[M-14],Y=m[M-14+1],U=m[M-32],$=m[M-32+1],G=T+Y|0,X=j+te+g(G,T)|0;G=G+N|0,X=X+E+g(G,N)|0,G=G+$|0,X=X+U+g(G,$)|0,m[M]=X,m[M+1]=G}for(var ne=0;ne<160;ne+=2){X=m[ne],G=m[ne+1];var P=a(h,b,w),B=a(J,ee,Q),Z=d(h,J),K=d(J,h),oe=u(A,q),ie=u(q,A),se=n[ne],de=n[ne+1],He=o(A,D,F),ge=o(q,y,S),ue=C+ie|0,me=W+oe+g(ue,C)|0;ue=ue+ge|0,me=me+He+g(ue,ge)|0,ue=ue+de|0,me=me+se+g(ue,de)|0,ue=ue+G|0,me=me+X+g(ue,G)|0;var pe=K+B|0,ye=Z+P+g(pe,K)|0;W=F,C=S,F=D,S=y,D=A,y=q,q=re+ue|0,A=I+me+g(q,re)|0,I=w,re=Q,w=b,Q=ee,b=h,ee=J,J=ue+pe|0,h=me+ye+g(J,ue)|0}this._al=this._al+J|0,this._bl=this._bl+ee|0,this._cl=this._cl+Q|0,this._dl=this._dl+re|0,this._el=this._el+q|0,this._fl=this._fl+y|0,this._gl=this._gl+S|0,this._hl=this._hl+C|0,this._ah=this._ah+h+g(this._al,J)|0,this._bh=this._bh+b+g(this._bl,ee)|0,this._ch=this._ch+w+g(this._cl,Q)|0,this._dh=this._dh+I+g(this._dl,re)|0,this._eh=this._eh+A+g(this._el,q)|0,this._fh=this._fh+D+g(this._fl,y)|0,this._gh=this._gh+F+g(this._gl,S)|0,this._hh=this._hh+W+g(this._hl,C)|0},i.prototype._hash=function(){var _=r.allocUnsafe(64);function m(h,b,w){_.writeInt32BE(h,w),_.writeInt32BE(b,w+4)}return m(this._ah,this._al,0),m(this._bh,this._bl,8),m(this._ch,this._cl,16),m(this._dh,this._dl,24),m(this._eh,this._el,32),m(this._fh,this._fl,40),m(this._gh,this._gl,48),m(this._hh,this._hl,56),_},cs=i,cs}var ls,vc;function xp(){if(vc)return ls;vc=1;var e=tt(),t=ed(),r=fr(),n=ct().Buffer,l=new Array(160);function i(){this.init(),this._w=l,r.call(this,128,112)}return e(i,t),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var o=n.allocUnsafe(48);function a(d,u,p){o.writeInt32BE(d,p),o.writeInt32BE(u,p+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),o},ls=i,ls}var bc;function Ap(){return bc||(bc=1,(function(e){e.exports=function(r){var n=r.toLowerCase(),l=e.exports[n];if(!l)throw new Error(n+" is not supported (we accept pull requests)");return new l},e.exports.sha=Mp(),e.exports.sha1=kp(),e.exports.sha224=Ip(),e.exports.sha256=Xh(),e.exports.sha384=xp(),e.exports.sha512=ed()})(oi)),oi.exports}var wc;function Ra(){if(wc)return Mr;wc=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.Session=void 0;const e=Ap(),t=ut(),r="session:id",n="session:secret",l="session:linked";let i=class td{constructor(a,d,u,p){this._storage=a,this._id=d||(0,t.randomBytesHex)(16),this._secret=u||(0,t.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!p}static load(a){const d=a.getItem(r),u=a.getItem(l),p=a.getItem(n);return d&&p?new td(a,d,p,u==="1"):null}static hash(a){return new e.sha256().update(a).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(a){this._linked=a,this.persistLinked()}save(){return this._storage.setItem(r,this._id),this._storage.setItem(n,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(l,this._linked?"1":"0")}};return Mr.Session=i,Mr}var Ir={},xr={},Ec;function Tp(){if(Ec)return xr;Ec=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.Cipher=void 0;const e=ut();let t=class{constructor(n){this.secret=n}async encrypt(n){const l=this.secret;if(l.length!==64)throw Error("secret must be 256 bits");const i=crypto.getRandomValues(new Uint8Array(12)),o=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(l),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=new TextEncoder,d=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},o,a.encode(n)),u=16,p=d.slice(d.byteLength-u),s=d.slice(0,d.byteLength-u),f=new Uint8Array(p),c=new Uint8Array(s),g=new Uint8Array([...i,...f,...c]);return(0,e.uint8ArrayToHex)(g)}async decrypt(n){const l=this.secret;if(l.length!==64)throw Error("secret must be 256 bits");return new Promise((i,o)=>{(async function(){const a=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(l),{name:"aes-gcm"},!1,["encrypt","decrypt"]),d=(0,e.hexStringToUint8Array)(n),u=d.slice(0,12),p=d.slice(12,28),s=d.slice(28),f=new Uint8Array([...s,...p]),c={name:"AES-GCM",iv:new Uint8Array(u)};try{const g=await window.crypto.subtle.decrypt(c,a,f),_=new TextDecoder;i(_.decode(g))}catch(g){o(g)}})()})}};return xr.Cipher=t,xr}var Ar={},Sc;function Pp(){if(Sc)return Ar;Sc=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.WalletLinkHTTP=void 0;let e=class{constructor(r,n,l){this.linkAPIUrl=r,this.sessionId=n;const i=`${n}:${l}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(r){return Promise.all(r.map(n=>fetch(`${this.linkAPIUrl}/events/${n.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(n=>console.error("Unabled to mark event as failed:",n))}async fetchUnseenEvents(){var r;const n=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(n.ok){const{events:l,error:i}=await n.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const o=(r=l?.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&r!==void 0?r:[];return this.markUnseenEventsAsSeen(o),o}throw new Error(`Check unseen events failed: ${n.status}`)}};return Ar.WalletLinkHTTP=e,Ar}var At={},Rc;function Bp(){if(Rc)return At;Rc=1,Object.defineProperty(At,"__esModule",{value:!0}),At.WalletLinkWebSocket=At.ConnectionState=void 0;var e;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(e||(At.ConnectionState=e={}));let t=class{setConnectionStateListener(n){this.connectionStateListener=n}setIncomingDataListener(n){this.incomingDataListener=n}constructor(n,l=WebSocket){this.WebSocketClass=l,this.webSocket=null,this.pendingData=[],this.url=n.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((n,l)=>{var i;let o;try{this.webSocket=o=new this.WebSocketClass(this.url)}catch(a){l(a);return}(i=this.connectionStateListener)===null||i===void 0||i.call(this,e.CONNECTING),o.onclose=a=>{var d;this.clearWebSocket(),l(new Error(`websocket error ${a.code}: ${a.reason}`)),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.DISCONNECTED)},o.onopen=a=>{var d;n(),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(p=>this.sendData(p)),this.pendingData=[])},o.onmessage=a=>{var d,u;if(a.data==="h")(d=this.incomingDataListener)===null||d===void 0||d.call(this,{type:"Heartbeat"});else try{const p=JSON.parse(a.data);(u=this.incomingDataListener)===null||u===void 0||u.call(this,p)}catch{}}})}disconnect(){var n;const{webSocket:l}=this;if(l){this.clearWebSocket(),(n=this.connectionStateListener)===null||n===void 0||n.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{l.close()}catch{}}}sendData(n){const{webSocket:l}=this;if(!l){this.pendingData.push(n),this.connect();return}l.send(n)}clearWebSocket(){const{webSocket:n}=this;n&&(this.webSocket=null,n.onclose=null,n.onerror=null,n.onmessage=null,n.onopen=null)}};return At.WalletLinkWebSocket=t,At}var Cc;function Lp(){if(Cc)return Ir;Cc=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.WalletLinkConnection=void 0;const e=Un(),t=Tp(),r=va(),n=ba(),l=Ra(),i=Pp(),o=Bp(),a=1e4,d=6e4;let u=class{constructor({session:s,linkAPIUrl:f,listener:c,diagnostic:g,WebSocketClass:_=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=h=>{if(!h)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",w=>h.JsonRpcUrl&&this.handleChainUpdated(w,h.JsonRpcUrl)]]).forEach((w,I)=>{const A=h[I];A!==void 0&&w(A)})},this.handleDestroyed=h=>{var b,w;h==="1"&&((b=this.listener)===null||b===void 0||b.resetAndReload(),(w=this.diagnostic)===null||w===void 0||w.log(r.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:l.Session.hash(this.session.id)}))},this.handleAccountUpdated=async h=>{var b,w;try{const I=await this.cipher.decrypt(h);(b=this.listener)===null||b===void 0||b.accountUpdated(I)}catch{(w=this.diagnostic)===null||w===void 0||w.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(h,b)=>{var w,I;try{const A=await this.cipher.decrypt(b);(w=this.listener)===null||w===void 0||w.metadataUpdated(h,A)}catch{(I=this.diagnostic)===null||I===void 0||I.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:h})}},this.handleWalletUsernameUpdated=async h=>{this.handleMetadataUpdated(n.WALLET_USER_NAME_KEY,h)},this.handleAppVersionUpdated=async h=>{this.handleMetadataUpdated(n.APP_VERSION_KEY,h)},this.handleChainUpdated=async(h,b)=>{var w,I;try{const A=await this.cipher.decrypt(h),D=await this.cipher.decrypt(b);(w=this.listener)===null||w===void 0||w.chainUpdated(A,D)}catch{(I=this.diagnostic)===null||I===void 0||I.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=s,this.cipher=new t.Cipher(s.secret),this.diagnostic=g,this.listener=c;const m=new o.WalletLinkWebSocket(`${f}/rpc`,_);m.setConnectionStateListener(async h=>{var b;(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.CONNECTED_STATE_CHANGE,{state:h,sessionIdHash:l.Session.hash(s.id)});let w=!1;switch(h){case o.ConnectionState.DISCONNECTED:if(!this.destroyed){const I=async()=>{await new Promise(A=>setTimeout(A,5e3)),this.destroyed||m.connect().catch(()=>{I()})};I()}break;case o.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),w=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},a),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case o.ConnectionState.CONNECTING:break}this.connected!==w&&(this.connected=w)}),m.setIncomingDataListener(h=>{var b,w,I;switch(h.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const A=h.type==="IsLinkedOK"?h.linked:void 0;(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.LINKED,{sessionIdHash:l.Session.hash(s.id),linked:A,type:h.type,onlineGuests:h.onlineGuests}),this.linked=A||h.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(w=this.diagnostic)===null||w===void 0||w.log(r.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:l.Session.hash(s.id),metadata_keys:h&&h.metadata?Object.keys(h.metadata):void 0}),this.handleSessionMetadataUpdated(h.metadata);break}case"Event":{this.handleIncomingEvent(h);break}}h.id!==void 0&&((I=this.requestResolutions.get(h.id))===null||I===void 0||I(h))}),this.ws=m,this.http=new i.WalletLinkHTTP(f,s.id,s.key)}connect(){var s;if(this.destroyed)throw new Error("instance is destroyed");(s=this.diagnostic)===null||s===void 0||s.log(r.EVENTS.STARTED_CONNECTING,{sessionIdHash:l.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var s;this.destroyed=!0,this.ws.disconnect(),(s=this.diagnostic)===null||s===void 0||s.log(r.EVENTS.DISCONNECTED,{sessionIdHash:l.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(s){var f,c;this._connected=s,s&&((f=this.onceConnected)===null||f===void 0||f.call(this)),(c=this.listener)===null||c===void 0||c.connectedUpdated(s)}setOnceConnected(s){return new Promise(f=>{this.connected?s().then(f):this.onceConnected=()=>{s().then(f),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(s){var f,c;this._linked=s,s&&((f=this.onceLinked)===null||f===void 0||f.call(this)),(c=this.listener)===null||c===void 0||c.linkedUpdated(s)}setOnceLinked(s){return new Promise(f=>{this.linked?s().then(f):this.onceLinked=()=>{s().then(f),this.onceLinked=void 0}})}async handleIncomingEvent(s){var f,c;if(!(s.type!=="Event"||s.event!=="Web3Response"))try{const g=await this.cipher.decrypt(s.data),_=JSON.parse(g);if(_.type!=="WEB3_RESPONSE")return;(f=this.listener)===null||f===void 0||f.handleWeb3ResponseMessage(_)}catch{(c=this.diagnostic)===null||c===void 0||c.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(s=>setTimeout(s,250));try{await this.fetchUnseenEventsAPI()}catch(s){console.error("Unable to check for unseen events",s)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(f=>this.handleIncomingEvent(f))}async setSessionMetadata(s,f){const c={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[s]:f}};return this.setOnceConnected(async()=>{const g=await this.makeRequest(c);if(g.type==="Fail")throw new Error(g.error||"failed to set session metadata")})}async publishEvent(s,f,c=!1){const g=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},f),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),_={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:s,data:g,callWebhook:c};return this.setOnceLinked(async()=>{const m=await this.makeRequest(_);if(m.type==="Fail")throw new Error(m.error||"failed to publish event");return m.eventId})}sendData(s){this.ws.sendData(JSON.stringify(s))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>a*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(s,f=d){const c=s.id;this.sendData(s);let g;return Promise.race([new Promise((_,m)=>{g=window.setTimeout(()=>{m(new Error(`request ${c} timed out`))},f)}),new Promise(_=>{this.requestResolutions.set(c,m=>{clearTimeout(g),_(m),this.requestResolutions.delete(c)})})])}async authenticate(){const s={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},f=await this.makeRequest(s);if(f.type==="Fail")throw new Error(f.error||"failed to authentcate")}sendIsLinked(){const s={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}sendGetSessionConfig(){const s={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}};return Ir.WalletLinkConnection=u,Ir}var Tr={},Tt={},mn={},Mc;function Np(){return Mc||(Mc=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),mn}var kc;function rd(){if(kc)return Tt;kc=1;var e=Tt&&Tt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.injectCssReset=void 0;const t=e(Np());function r(){const n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(t.default)),document.documentElement.appendChild(n)}return Tt.injectCssReset=r,Tt}var Pr={},on,Ee,nd,id,Zt,Ic,sd,od,ad,Ca,sa,oa,ud,en={},cd=[],Op=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,an=Array.isArray;function it(e,t){for(var r in t)e[r]=t[r];return e}function Ma(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function aa(e,t,r){var n,l,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?l=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?on.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return Yr(e,o,n,l,null)}function Yr(e,t,r,n,l){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:l??++nd,__i:-1,__u:0};return l==null&&Ee.vnode!=null&&Ee.vnode(i),i}function Fp(){return{current:null}}function un(e){return e.children}function Xr(e,t){this.props=e,this.context=t}function ar(e,t){if(t==null)return e.__?ar(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ar(e):null}function ld(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return ld(e)}}function ua(e){(!e.__d&&(e.__d=!0)&&Zt.push(e)&&!Ln.__r++||Ic!=Ee.debounceRendering)&&((Ic=Ee.debounceRendering)||sd)(Ln)}function Ln(){for(var e,t,r,n,l,i,o,a=1;Zt.length;)Zt.length>a&&Zt.sort(od),e=Zt.shift(),a=Zt.length,e.__d&&(r=void 0,n=void 0,l=(n=(t=e).__v).__e,i=[],o=[],t.__P&&((r=it({},n)).__v=n.__v+1,Ee.vnode&&Ee.vnode(r),ka(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[l]:null,i,l??ar(n),!!(32&n.__u),o),r.__v=n.__v,r.__.__k[r.__i]=r,pd(i,r,o),n.__e=n.__=null,r.__e!=l&&ld(r)));Ln.__r=0}function fd(e,t,r,n,l,i,o,a,d,u,p){var s,f,c,g,_,m,h,b=n&&n.__k||cd,w=t.length;for(d=qp(r,t,b,d,w),s=0;s<w;s++)(c=r.__k[s])!=null&&(f=c.__i==-1?en:b[c.__i]||en,c.__i=s,m=ka(e,c,f,l,i,o,a,d,u,p),g=c.__e,c.ref&&f.ref!=c.ref&&(f.ref&&Ia(f.ref,null,c),p.push(c.ref,c.__c||g,c)),_==null&&g!=null&&(_=g),(h=!!(4&c.__u))||f.__k===c.__k?d=hd(c,d,e,h):typeof c.type=="function"&&m!==void 0?d=m:g&&(d=g.nextSibling),c.__u&=-7);return r.__e=_,d}function qp(e,t,r,n,l){var i,o,a,d,u,p=r.length,s=p,f=0;for(e.__k=new Array(l),i=0;i<l;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=e.__k[i]=Yr(null,o,null,null,null):an(o)?o=e.__k[i]=Yr(un,{children:o},null,null,null):o.constructor==null&&o.__b>0?o=e.__k[i]=Yr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[i]=o,d=i+f,o.__=e,o.__b=e.__b+1,a=null,(u=o.__i=Dp(o,r,d,s))!=-1&&(s--,(a=r[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(l>p?f--:l<p&&f++),typeof o.type!="function"&&(o.__u|=4)):u!=d&&(u==d-1?f--:u==d+1?f++:(u>d?f--:f++,o.__u|=4))):e.__k[i]=null;if(s)for(i=0;i<p;i++)(a=r[i])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=ar(a)),yd(a,a));return n}function hd(e,t,r,n){var l,i;if(typeof e.type=="function"){for(l=e.__k,i=0;l&&i<l.length;i++)l[i]&&(l[i].__=e,t=hd(l[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=ar(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function dd(e,t){return t=t||[],e==null||typeof e=="boolean"||(an(e)?e.some(function(r){dd(r,t)}):t.push(e)),t}function Dp(e,t,r,n){var l,i,o,a=e.key,d=e.type,u=t[r],p=u!=null&&(2&u.__u)==0;if(u===null&&a==null||p&&a==u.key&&d==u.type)return r;if(n>(p?1:0)){for(l=r-1,i=r+1;l>=0||i<t.length;)if((u=t[o=l>=0?l--:i++])!=null&&(2&u.__u)==0&&a==u.key&&d==u.type)return o}return-1}function xc(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Op.test(t)?r:r+"px"}function _n(e,t,r,n,l){var i,o;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||xc(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||xc(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ad,"$1")),o=t.toLowerCase(),t=o in e||t=="onFocusOut"||t=="onFocusIn"?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=Ca,e.addEventListener(t,i?oa:sa,i)):e.removeEventListener(t,i?oa:sa,i);else{if(l=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Ac(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=Ca++;else if(t.t<r.u)return;return r(Ee.event?Ee.event(t):t)}}}function ka(e,t,r,n,l,i,o,a,d,u){var p,s,f,c,g,_,m,h,b,w,I,A,D,F,W,J,ee,Q=t.type;if(t.constructor!=null)return null;128&r.__u&&(d=!!(32&r.__u),i=[a=t.__e=r.__e]),(p=Ee.__b)&&p(t);e:if(typeof Q=="function")try{if(h=t.props,b="prototype"in Q&&Q.prototype.render,w=(p=Q.contextType)&&n[p.__c],I=p?w?w.props.value:p.__:n,r.__c?m=(s=t.__c=r.__c).__=s.__E:(b?t.__c=s=new Q(h,I):(t.__c=s=new Xr(h,I),s.constructor=Q,s.render=Up),w&&w.sub(s),s.state||(s.state={}),s.__n=n,f=s.__d=!0,s.__h=[],s._sb=[]),b&&s.__s==null&&(s.__s=s.state),b&&Q.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=it({},s.__s)),it(s.__s,Q.getDerivedStateFromProps(h,s.__s))),c=s.props,g=s.state,s.__v=t,f)b&&Q.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),b&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(b&&Q.getDerivedStateFromProps==null&&h!==c&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(h,I),t.__v==r.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(h,s.__s,I)===!1){for(t.__v!=r.__v&&(s.props=h,s.state=s.__s,s.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(re){re&&(re.__=t)}),A=0;A<s._sb.length;A++)s.__h.push(s._sb[A]);s._sb=[],s.__h.length&&o.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(h,s.__s,I),b&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(c,g,_)})}if(s.context=I,s.props=h,s.__P=e,s.__e=!1,D=Ee.__r,F=0,b){for(s.state=s.__s,s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),W=0;W<s._sb.length;W++)s.__h.push(s._sb[W]);s._sb=[]}else do s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++F<25);s.state=s.__s,s.getChildContext!=null&&(n=it(it({},n),s.getChildContext())),b&&!f&&s.getSnapshotBeforeUpdate!=null&&(_=s.getSnapshotBeforeUpdate(c,g)),J=p,p!=null&&p.type===un&&p.key==null&&(J=gd(p.props.children)),a=fd(e,an(J)?J:[J],t,r,n,l,i,o,a,d,u),s.base=t.__e,t.__u&=-161,s.__h.length&&o.push(s),m&&(s.__E=s.__=null)}catch(re){if(t.__v=null,d||i!=null)if(re.then){for(t.__u|=d?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else{for(ee=i.length;ee--;)Ma(i[ee]);ca(t)}else t.__e=r.__e,t.__k=r.__k,re.then||ca(t);Ee.__e(re,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=jp(r.__e,t,r,n,l,i,o,d,u);return(p=Ee.diffed)&&p(t),128&t.__u?void 0:a}function ca(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(ca)}function pd(e,t,r){for(var n=0;n<r.length;n++)Ia(r[n],r[++n],r[++n]);Ee.__c&&Ee.__c(t,e),e.some(function(l){try{e=l.__h,l.__h=[],e.some(function(i){i.call(l)})}catch(i){Ee.__e(i,l.__v)}})}function gd(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:an(e)?e.map(gd):it({},e)}function jp(e,t,r,n,l,i,o,a,d){var u,p,s,f,c,g,_,m=r.props||en,h=t.props,b=t.type;if(b=="svg"?l="http://www.w3.org/2000/svg":b=="math"?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((c=i[u])&&"setAttribute"in c==!!b&&(b?c.localName==b:c.nodeType==3)){e=c,i[u]=null;break}}if(e==null){if(b==null)return document.createTextNode(h);e=document.createElementNS(l,b,h.is&&h),a&&(Ee.__m&&Ee.__m(t,i),a=!1),i=null}if(b==null)m===h||a&&e.data==h||(e.data=h);else{if(i=i&&on.call(e.childNodes),!a&&i!=null)for(m={},u=0;u<e.attributes.length;u++)m[(c=e.attributes[u]).name]=c.value;for(u in m)if(c=m[u],u!="children"){if(u=="dangerouslySetInnerHTML")s=c;else if(!(u in h)){if(u=="value"&&"defaultValue"in h||u=="checked"&&"defaultChecked"in h)continue;_n(e,u,null,c,l)}}for(u in h)c=h[u],u=="children"?f=c:u=="dangerouslySetInnerHTML"?p=c:u=="value"?g=c:u=="checked"?_=c:a&&typeof c!="function"||m[u]===c||_n(e,u,c,m[u],l);if(p)a||s&&(p.__html==s.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(s&&(e.innerHTML=""),fd(t.type=="template"?e.content:e,an(f)?f:[f],t,r,n,b=="foreignObject"?"http://www.w3.org/1999/xhtml":l,i,o,i?i[0]:r.__k&&ar(r,0),a,d),i!=null)for(u=i.length;u--;)Ma(i[u]);a||(u="value",b=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[u]||b=="progress"&&!g||b=="option"&&g!=m[u])&&_n(e,u,g,m[u],l),u="checked",_!=null&&_!=e[u]&&_n(e,u,_,m[u],l))}return e}function Ia(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(l){Ee.__e(l,r)}}function yd(e,t,r){var n,l;if(Ee.unmount&&Ee.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Ia(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){Ee.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(l=0;l<n.length;l++)n[l]&&yd(n[l],t,r||typeof e.type!="function");r||Ma(e.__e),e.__c=e.__=e.__e=void 0}function Up(e,t,r){return this.constructor(e,r)}function md(e,t,r){var n,l,i,o;t==document&&(t=document.documentElement),Ee.__&&Ee.__(e,t),l=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],ka(t,e=(!n&&r||t).__k=aa(un,null,[e]),l||en,en,t.namespaceURI,!n&&r?[r]:l?null:t.firstChild?on.call(t.childNodes):null,i,!n&&r?r:l?l.__e:t.firstChild,n,o),pd(i,e,o)}function _d(e,t){md(e,t,_d)}function Hp(e,t,r){var n,l,i,o,a=it({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?l=t[i]:a[i]=t[i]===void 0&&o!=null?o[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?on.call(arguments,2):r),Yr(e.type,a,n||e.key,l||e.ref,null)}function Wp(e){function t(r){var n,l;return this.getChildContext||(n=new Set,(l={})[t.__c]=this,this.getChildContext=function(){return l},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(o){o.__e=!0,ua(o)})},this.sub=function(i){n.add(i);var o=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),o&&o.call(i)}}),r.children}return t.__c="__cC"+ud++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}on=cd.slice,Ee={__e:function(e,t,r,n){for(var l,i,o;t=t.__;)if((l=t.__c)&&!l.__)try{if((i=l.constructor)&&i.getDerivedStateFromError!=null&&(l.setState(i.getDerivedStateFromError(e)),o=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(e,n||{}),o=l.__d),o)return l.__E=l}catch(a){e=a}throw e}},nd=0,id=function(e){return e!=null&&e.constructor==null},Xr.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=it({},this.state),typeof e=="function"&&(e=e(it({},r),this.props)),e&&it(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),ua(this))},Xr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ua(this))},Xr.prototype.render=un,Zt=[],sd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,od=function(e,t){return e.__v.__b-t.__v.__b},Ln.__r=0,ad=/(PointerCapture)$|Capture$/i,Ca=0,sa=Ac(!1),oa=Ac(!0),ud=0;const $p=Object.freeze(Object.defineProperty({__proto__:null,Component:Xr,Fragment:un,cloneElement:Hp,createContext:Wp,createElement:aa,createRef:Fp,h:aa,hydrate:_d,get isValidElement(){return id},get options(){return Ee},render:md,toChildArray:dd},Symbol.toStringTag,{value:"Module"})),Ge=tn($p);var Pt={};function vd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=vd(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Tc(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=vd(e))&&(n&&(n+=" "),n+=t);return n}const Vp=Object.freeze(Object.defineProperty({__proto__:null,clsx:Tc,default:Tc},Symbol.toStringTag,{value:"Module"})),cn=tn(Vp);var at,we,fs,Pc,ur=0,bd=[],je=Ee,Bc=je.__b,Lc=je.__r,Nc=je.diffed,Oc=je.__c,Fc=je.unmount,qc=je.__;function Kt(e,t){je.__h&&je.__h(we,e,ur||t),ur=0;var r=we.__H||(we.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function wd(e){return ur=1,Ed(Rd,e)}function Ed(e,t,r){var n=Kt(at++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Rd(void 0,t),function(a){var d=n.__N?n.__N[0]:n.__[0],u=n.t(d,a);d!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=we,!we.__f)){var l=function(a,d,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,a,d,u);var s=n.__c.props!==a;return p.forEach(function(f){if(f.__N){var c=f.__[0];f.__=f.__N,f.__N=void 0,c!==f.__[0]&&(s=!0)}}),i&&i.call(this,a,d,u)||s};we.__f=!0;var i=we.shouldComponentUpdate,o=we.componentWillUpdate;we.componentWillUpdate=function(a,d,u){if(this.__e){var p=i;i=void 0,l(a,d,u),i=p}o&&o.call(this,a,d,u)},we.shouldComponentUpdate=l}return n.__N||n.__}function zp(e,t){var r=Kt(at++,3);!je.__s&&Aa(r.__H,t)&&(r.__=e,r.u=t,we.__H.__h.push(r))}function Sd(e,t){var r=Kt(at++,4);!je.__s&&Aa(r.__H,t)&&(r.__=e,r.u=t,we.__h.push(r))}function Gp(e){return ur=5,xa(function(){return{current:e}},[])}function Jp(e,t,r){ur=6,Sd(function(){if(typeof e=="function"){var n=e(t());return function(){e(null),n&&typeof n=="function"&&n()}}if(e)return e.current=t(),function(){return e.current=null}},r==null?r:r.concat(e))}function xa(e,t){var r=Kt(at++,7);return Aa(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Zp(e,t){return ur=8,xa(function(){return e},t)}function Kp(e){var t=we.context[e.__c],r=Kt(at++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(we)),t.props.value):e.__}function Qp(e,t){je.useDebugValue&&je.useDebugValue(t?t(e):e)}function Yp(e){var t=Kt(at++,10),r=wd();return t.__=e,we.componentDidCatch||(we.componentDidCatch=function(n,l){t.__&&t.__(n,l),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Xp(){var e=Kt(at++,11);if(!e.__){for(var t=we.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function eg(){for(var e;e=bd.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Bn),e.__H.__h.forEach(la),e.__H.__h=[]}catch(t){e.__H.__h=[],je.__e(t,e.__v)}}je.__b=function(e){we=null,Bc&&Bc(e)},je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qc&&qc(e,t)},je.__r=function(e){Lc&&Lc(e),at=0;var t=(we=e.__c).__H;t&&(fs===we?(t.__h=[],we.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Bn),t.__h.forEach(la),t.__h=[],at=0)),fs=we},je.diffed=function(e){Nc&&Nc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bd.push(t)!==1&&Pc===je.requestAnimationFrame||((Pc=je.requestAnimationFrame)||tg)(eg)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),fs=we=null},je.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Bn),r.__h=r.__h.filter(function(n){return!n.__||la(n)})}catch(n){t.some(function(l){l.__h&&(l.__h=[])}),t=[],je.__e(n,r.__v)}}),Oc&&Oc(e,t)},je.unmount=function(e){Fc&&Fc(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Bn(n)}catch(l){t=l}}),r.__H=void 0,t&&je.__e(t,r.__v))};var Dc=typeof requestAnimationFrame=="function";function tg(e){var t,r=function(){clearTimeout(n),Dc&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);Dc&&(t=requestAnimationFrame(r))}function Bn(e){var t=we,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),we=t}function la(e){var t=we;e.__c=e.__(),we=t}function Aa(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Rd(e,t){return typeof t=="function"?t(e):t}const rg=Object.freeze(Object.defineProperty({__proto__:null,useCallback:Zp,useContext:Kp,useDebugValue:Qp,useEffect:zp,useErrorBoundary:Yp,useId:Xp,useImperativeHandle:Jp,useLayoutEffect:Sd,useMemo:xa,useReducer:Ed,useRef:Gp,useState:wd},Symbol.toStringTag,{value:"Module"})),$n=tn(rg);var st={},Br={},jc;function ng(){if(jc)return Br;jc=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.CloseIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return Br.CloseIcon=t,Br}var Lr={},Uc;function ig(){if(Uc)return Lr;Uc=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.CoinbaseWalletRound=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return Lr.CoinbaseWalletRound=t,Lr}var Nr={},Hc;function sg(){if(Hc)return Nr;Hc=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.QRCodeIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return Nr.QRCodeIcon=t,Nr}var Bt={},hs,Wc;function og(){if(Wc)return hs;Wc=1;function e(c){this.mode=r.MODE_8BIT_BYTE,this.data=c,this.parsedData=[];for(var g=0,_=this.data.length;g<_;g++){var m=[],h=this.data.charCodeAt(g);h>65536?(m[0]=240|(h&1835008)>>>18,m[1]=128|(h&258048)>>>12,m[2]=128|(h&4032)>>>6,m[3]=128|h&63):h>2048?(m[0]=224|(h&61440)>>>12,m[1]=128|(h&4032)>>>6,m[2]=128|h&63):h>128?(m[0]=192|(h&1984)>>>6,m[1]=128|h&63):m[0]=h,this.parsedData.push(m)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(c){return this.parsedData.length},write:function(c){for(var g=0,_=this.parsedData.length;g<_;g++)c.put(this.parsedData[g],8)}};function t(c,g){this.typeNumber=c,this.errorCorrectLevel=g,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={addData:function(c){var g=new e(c);this.dataList.push(g),this.dataCache=null},isDark:function(c,g){if(c<0||this.moduleCount<=c||g<0||this.moduleCount<=g)throw new Error(c+","+g);return this.modules[c][g]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(c,g){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var _=0;_<this.moduleCount;_++){this.modules[_]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[_][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(c,g),this.typeNumber>=7&&this.setupTypeNumber(c),this.dataCache==null&&(this.dataCache=t.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,g)},setupPositionProbePattern:function(c,g){for(var _=-1;_<=7;_++)if(!(c+_<=-1||this.moduleCount<=c+_))for(var m=-1;m<=7;m++)g+m<=-1||this.moduleCount<=g+m||(0<=_&&_<=6&&(m==0||m==6)||0<=m&&m<=6&&(_==0||_==6)||2<=_&&_<=4&&2<=m&&m<=4?this.modules[c+_][g+m]=!0:this.modules[c+_][g+m]=!1)},getBestMaskPattern:function(){for(var c=0,g=0,_=0;_<8;_++){this.makeImpl(!0,_);var m=i.getLostPoint(this);(_==0||c>m)&&(c=m,g=_)}return g},createMovieClip:function(c,g,_){var m=c.createEmptyMovieClip(g,_),h=1;this.make();for(var b=0;b<this.modules.length;b++)for(var w=b*h,I=0;I<this.modules[b].length;I++){var A=I*h,D=this.modules[b][I];D&&(m.beginFill(0,100),m.moveTo(A,w),m.lineTo(A+h,w),m.lineTo(A+h,w+h),m.lineTo(A,w+h),m.endFill())}return m},setupTimingPattern:function(){for(var c=8;c<this.moduleCount-8;c++)this.modules[c][6]==null&&(this.modules[c][6]=c%2==0);for(var g=8;g<this.moduleCount-8;g++)this.modules[6][g]==null&&(this.modules[6][g]=g%2==0)},setupPositionAdjustPattern:function(){for(var c=i.getPatternPosition(this.typeNumber),g=0;g<c.length;g++)for(var _=0;_<c.length;_++){var m=c[g],h=c[_];if(this.modules[m][h]==null)for(var b=-2;b<=2;b++)for(var w=-2;w<=2;w++)b==-2||b==2||w==-2||w==2||b==0&&w==0?this.modules[m+b][h+w]=!0:this.modules[m+b][h+w]=!1}},setupTypeNumber:function(c){for(var g=i.getBCHTypeNumber(this.typeNumber),_=0;_<18;_++){var m=!c&&(g>>_&1)==1;this.modules[Math.floor(_/3)][_%3+this.moduleCount-8-3]=m}for(var _=0;_<18;_++){var m=!c&&(g>>_&1)==1;this.modules[_%3+this.moduleCount-8-3][Math.floor(_/3)]=m}},setupTypeInfo:function(c,g){for(var _=this.errorCorrectLevel<<3|g,m=i.getBCHTypeInfo(_),h=0;h<15;h++){var b=!c&&(m>>h&1)==1;h<6?this.modules[h][8]=b:h<8?this.modules[h+1][8]=b:this.modules[this.moduleCount-15+h][8]=b}for(var h=0;h<15;h++){var b=!c&&(m>>h&1)==1;h<8?this.modules[8][this.moduleCount-h-1]=b:h<9?this.modules[8][15-h-1+1]=b:this.modules[8][15-h-1]=b}this.modules[this.moduleCount-8][8]=!c},mapData:function(c,g){for(var _=-1,m=this.moduleCount-1,h=7,b=0,w=this.moduleCount-1;w>0;w-=2)for(w==6&&w--;;){for(var I=0;I<2;I++)if(this.modules[m][w-I]==null){var A=!1;b<c.length&&(A=(c[b]>>>h&1)==1);var D=i.getMask(g,m,w-I);D&&(A=!A),this.modules[m][w-I]=A,h--,h==-1&&(b++,h=7)}if(m+=_,m<0||this.moduleCount<=m){m-=_,_=-_;break}}}},t.PAD0=236,t.PAD1=17,t.createData=function(c,g,_){for(var m=u.getRSBlocks(c,g),h=new p,b=0;b<_.length;b++){var w=_[b];h.put(w.mode,4),h.put(w.getLength(),i.getLengthInBits(w.mode,c)),w.write(h)}for(var I=0,b=0;b<m.length;b++)I+=m[b].dataCount;if(h.getLengthInBits()>I*8)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+I*8+")");for(h.getLengthInBits()+4<=I*8&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;!(h.getLengthInBits()>=I*8||(h.put(t.PAD0,8),h.getLengthInBits()>=I*8));)h.put(t.PAD1,8);return t.createBytes(h,m)},t.createBytes=function(c,g){for(var _=0,m=0,h=0,b=new Array(g.length),w=new Array(g.length),I=0;I<g.length;I++){var A=g[I].dataCount,D=g[I].totalCount-A;m=Math.max(m,A),h=Math.max(h,D),b[I]=new Array(A);for(var F=0;F<b[I].length;F++)b[I][F]=255&c.buffer[F+_];_+=A;var W=i.getErrorCorrectPolynomial(D),J=new d(b[I],W.getLength()-1),ee=J.mod(W);w[I]=new Array(W.getLength()-1);for(var F=0;F<w[I].length;F++){var Q=F+ee.getLength()-w[I].length;w[I][F]=Q>=0?ee.get(Q):0}}for(var re=0,F=0;F<g.length;F++)re+=g[F].totalCount;for(var q=new Array(re),y=0,F=0;F<m;F++)for(var I=0;I<g.length;I++)F<b[I].length&&(q[y++]=b[I][F]);for(var F=0;F<h;F++)for(var I=0;I<g.length;I++)F<w[I].length&&(q[y++]=w[I][F]);return q};for(var r={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(c){for(var g=c<<10;i.getBCHDigit(g)-i.getBCHDigit(i.G15)>=0;)g^=i.G15<<i.getBCHDigit(g)-i.getBCHDigit(i.G15);return(c<<10|g)^i.G15_MASK},getBCHTypeNumber:function(c){for(var g=c<<12;i.getBCHDigit(g)-i.getBCHDigit(i.G18)>=0;)g^=i.G18<<i.getBCHDigit(g)-i.getBCHDigit(i.G18);return c<<12|g},getBCHDigit:function(c){for(var g=0;c!=0;)g++,c>>>=1;return g},getPatternPosition:function(c){return i.PATTERN_POSITION_TABLE[c-1]},getMask:function(c,g,_){switch(c){case l.PATTERN000:return(g+_)%2==0;case l.PATTERN001:return g%2==0;case l.PATTERN010:return _%3==0;case l.PATTERN011:return(g+_)%3==0;case l.PATTERN100:return(Math.floor(g/2)+Math.floor(_/3))%2==0;case l.PATTERN101:return g*_%2+g*_%3==0;case l.PATTERN110:return(g*_%2+g*_%3)%2==0;case l.PATTERN111:return(g*_%3+(g+_)%2)%2==0;default:throw new Error("bad maskPattern:"+c)}},getErrorCorrectPolynomial:function(c){for(var g=new d([1],0),_=0;_<c;_++)g=g.multiply(new d([1,o.gexp(_)],0));return g},getLengthInBits:function(c,g){if(1<=g&&g<10)switch(c){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:return 8;case r.MODE_KANJI:return 8;default:throw new Error("mode:"+c)}else if(g<27)switch(c){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+c)}else if(g<41)switch(c){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+c)}else throw new Error("type:"+g)},getLostPoint:function(c){for(var g=c.getModuleCount(),_=0,m=0;m<g;m++)for(var h=0;h<g;h++){for(var b=0,w=c.isDark(m,h),I=-1;I<=1;I++)if(!(m+I<0||g<=m+I))for(var A=-1;A<=1;A++)h+A<0||g<=h+A||I==0&&A==0||w==c.isDark(m+I,h+A)&&b++;b>5&&(_+=3+b-5)}for(var m=0;m<g-1;m++)for(var h=0;h<g-1;h++){var D=0;c.isDark(m,h)&&D++,c.isDark(m+1,h)&&D++,c.isDark(m,h+1)&&D++,c.isDark(m+1,h+1)&&D++,(D==0||D==4)&&(_+=3)}for(var m=0;m<g;m++)for(var h=0;h<g-6;h++)c.isDark(m,h)&&!c.isDark(m,h+1)&&c.isDark(m,h+2)&&c.isDark(m,h+3)&&c.isDark(m,h+4)&&!c.isDark(m,h+5)&&c.isDark(m,h+6)&&(_+=40);for(var h=0;h<g;h++)for(var m=0;m<g-6;m++)c.isDark(m,h)&&!c.isDark(m+1,h)&&c.isDark(m+2,h)&&c.isDark(m+3,h)&&c.isDark(m+4,h)&&!c.isDark(m+5,h)&&c.isDark(m+6,h)&&(_+=40);for(var F=0,h=0;h<g;h++)for(var m=0;m<g;m++)c.isDark(m,h)&&F++;var W=Math.abs(100*F/g/g-50)/5;return _+=W*10,_}},o={glog:function(c){if(c<1)throw new Error("glog("+c+")");return o.LOG_TABLE[c]},gexp:function(c){for(;c<0;)c+=255;for(;c>=256;)c-=255;return o.EXP_TABLE[c]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},a=0;a<8;a++)o.EXP_TABLE[a]=1<<a;for(var a=8;a<256;a++)o.EXP_TABLE[a]=o.EXP_TABLE[a-4]^o.EXP_TABLE[a-5]^o.EXP_TABLE[a-6]^o.EXP_TABLE[a-8];for(var a=0;a<255;a++)o.LOG_TABLE[o.EXP_TABLE[a]]=a;function d(c,g){if(c.length==null)throw new Error(c.length+"/"+g);for(var _=0;_<c.length&&c[_]==0;)_++;this.num=new Array(c.length-_+g);for(var m=0;m<c.length-_;m++)this.num[m]=c[m+_]}d.prototype={get:function(c){return this.num[c]},getLength:function(){return this.num.length},multiply:function(c){for(var g=new Array(this.getLength()+c.getLength()-1),_=0;_<this.getLength();_++)for(var m=0;m<c.getLength();m++)g[_+m]^=o.gexp(o.glog(this.get(_))+o.glog(c.get(m)));return new d(g,0)},mod:function(c){if(this.getLength()-c.getLength()<0)return this;for(var g=o.glog(this.get(0))-o.glog(c.get(0)),_=new Array(this.getLength()),m=0;m<this.getLength();m++)_[m]=this.get(m);for(var m=0;m<c.getLength();m++)_[m]^=o.gexp(o.glog(c.get(m))+g);return new d(_,0).mod(c)}};function u(c,g){this.totalCount=c,this.dataCount=g}u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(c,g){var _=u.getRsBlockTable(c,g);if(_==null)throw new Error("bad rs block @ typeNumber:"+c+"/errorCorrectLevel:"+g);for(var m=_.length/3,h=[],b=0;b<m;b++)for(var w=_[b*3+0],I=_[b*3+1],A=_[b*3+2],D=0;D<w;D++)h.push(new u(I,A));return h},u.getRsBlockTable=function(c,g){switch(g){case n.L:return u.RS_BLOCK_TABLE[(c-1)*4+0];case n.M:return u.RS_BLOCK_TABLE[(c-1)*4+1];case n.Q:return u.RS_BLOCK_TABLE[(c-1)*4+2];case n.H:return u.RS_BLOCK_TABLE[(c-1)*4+3];default:return}};function p(){this.buffer=[],this.length=0}p.prototype={get:function(c){var g=Math.floor(c/8);return(this.buffer[g]>>>7-c%8&1)==1},put:function(c,g){for(var _=0;_<g;_++)this.putBit((c>>>g-_-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(c){var g=Math.floor(this.length/8);this.buffer.length<=g&&this.buffer.push(0),c&&(this.buffer[g]|=128>>>this.length%8),this.length++}};var s=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function f(c){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof c=="string"&&(c={content:c}),c)for(var g in c)this.options[g]=c[g];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function _(A){switch(A){case"L":return n.L;case"M":return n.M;case"Q":return n.Q;case"H":return n.H;default:throw new Error("Unknwon error correction level: "+A)}}function m(A,D){for(var F=h(A),W=1,J=0,ee=0,Q=s.length;ee<=Q;ee++){var re=s[ee];if(!re)throw new Error("Content too long: expected "+J+" but got "+F);switch(D){case"L":J=re[0];break;case"M":J=re[1];break;case"Q":J=re[2];break;case"H":J=re[3];break;default:throw new Error("Unknwon error correction level: "+D)}if(F<=J)break;W++}if(W>s.length)throw new Error("Content too long");return W}function h(A){var D=encodeURI(A).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return D.length+(D.length!=A?3:0)}var b=this.options.content,w=m(b,this.options.ecl),I=_(this.options.ecl);this.qrcode=new t(w,I),this.qrcode.addData(b),this.qrcode.make()}return f.prototype.svg=function(c){var g=this.options||{},_=this.qrcode.modules;typeof c>"u"&&(c={container:g.container||"svg"});for(var m=typeof g.pretty<"u"?!!g.pretty:!0,h=m?" ":"",b=m?`\r
2
2
  `:"",w=g.width,I=g.height,A=_.length,D=w/(A+2*g.padding),F=I/(A+2*g.padding),W=typeof g.join<"u"?!!g.join:!1,J=typeof g.swap<"u"?!!g.swap:!1,ee=typeof g.xmlDeclaration<"u"?!!g.xmlDeclaration:!0,Q=typeof g.predefined<"u"?!!g.predefined:!1,re=Q?h+'<defs><path id="qrmodule" d="M0 0 h'+F+" v"+D+' H0 z" style="fill:'+g.color+';shape-rendering:crispEdges;" /></defs>'+b:"",q=h+'<rect x="0" y="0" width="'+w+'" height="'+I+'" style="fill:'+g.background+';shape-rendering:crispEdges;"/>'+b,y="",S="",C=0;C<A;C++)for(var M=0;M<A;M++){var x=_[M][C];if(x){var L=M*D+g.padding*D,j=C*F+g.padding*F;if(J){var T=L;L=j,j=T}if(W){var E=D+L,N=F+j;L=Number.isInteger(L)?Number(L):L.toFixed(2),j=Number.isInteger(j)?Number(j):j.toFixed(2),E=Number.isInteger(E)?Number(E):E.toFixed(2),N=Number.isInteger(N)?Number(N):N.toFixed(2),S+="M"+L+","+j+" V"+N+" H"+E+" V"+j+" H"+L+" Z "}else Q?y+=h+'<use x="'+L.toString()+'" y="'+j.toString()+'" href="#qrmodule" />'+b:y+=h+'<rect x="'+L.toString()+'" y="'+j.toString()+'" width="'+D+'" height="'+F+'" style="fill:'+g.color+';shape-rendering:crispEdges;"/>'+b}}W&&(y=h+'<path x="0" y="0" style="fill:'+g.color+';shape-rendering:crispEdges;" d="'+S+'" />');let te="";if(this.options.image!==void 0&&this.options.image.svg){const U=w*this.options.image.width/100,$=I*this.options.image.height/100,G=w/2-U/2,X=I/2-$/2;te+=`<svg x="${G}" y="${X}" width="${U}" height="${$}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,te+=this.options.image.svg+b,te+="</svg>"}var Y="";switch(c.container){case"svg":ee&&(Y+='<?xml version="1.0" standalone="yes"?>'+b),Y+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+w+'" height="'+I+'">'+b,Y+=re+q+y,Y+=te,Y+="</svg>";break;case"svg-viewbox":ee&&(Y+='<?xml version="1.0" standalone="yes"?>'+b),Y+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+w+" "+I+'">'+b,Y+=re+q+y,Y+=te,Y+="</svg>";break;case"g":Y+='<g width="'+w+'" height="'+I+'">'+b,Y+=re+q+y,Y+=te,Y+="</g>";break;default:Y+=(re+q+y+te).replace(/^\s+/,"");break}return Y},hs=f,hs}var $c;function ag(){if($c)return Bt;$c=1;var e=Bt&&Bt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.QRCode=void 0;const t=Ge,r=$n,n=e(og()),l=i=>{const[o,a]=(0,r.useState)("");return(0,r.useEffect)(()=>{var d,u;const p=new n.default({content:i.content,background:i.bgColor||"#ffffff",color:i.fgColor||"#000000",container:"svg",ecl:"M",width:(d=i.width)!==null&&d!==void 0?d:256,height:(u=i.height)!==null&&u!==void 0?u:256,padding:0,image:i.image}),s=Buffer.from(p.svg(),"utf8").toString("base64");a(`data:image/svg+xml;base64,${s}`)},[i.bgColor,i.content,i.fgColor,i.height,i.image,i.width]),o?(0,t.h)("img",{src:o,alt:"QR Code"}):null};return Bt.QRCode=l,Bt}var Lt={},vn={},Vc;function ug(){return Vc||(Vc=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"),vn}var zc;function cg(){if(zc)return Lt;zc=1;var e=Lt&&Lt.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.Spinner=void 0;const t=Ge,r=e(ug()),n=l=>{var i;const o=(i=l.size)!==null&&i!==void 0?i:64,a=l.color||"#000";return(0,t.h)("div",{class:"-cbwsdk-spinner"},(0,t.h)("style",null,r.default),(0,t.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:o,height:o}},(0,t.h)("circle",{style:{cx:50,cy:50,r:45,stroke:a}})))};return Lt.Spinner=n,Lt}var bn={},Gc;function lg(){return Gc||(Gc=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"),bn}var Jc;function fg(){if(Jc)return st;Jc=1;var e=st&&st.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(st,"__esModule",{value:!0}),st.CoinbaseWalletSteps=st.ConnectContent=void 0;const t=e(cn),r=Ge,n=ut(),l=_a(),i=ng(),o=ig(),a=sg(),d=ag(),u=cg(),p=e(lg()),s={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:_},f=m=>m==="light"?"#FFFFFF":"#0A0B0D";function c(m){const{theme:h}=m,b=(0,n.createQrUrl)(m.sessionId,m.sessionSecret,m.linkAPIUrl,m.isParentConnection,m.version,m.chainId),w=s.steps;return(0,r.h)("div",{"data-testid":"connect-content",className:(0,t.default)("-cbwsdk-connect-content",h)},(0,r.h)("style",null,p.default),(0,r.h)("div",{className:"-cbwsdk-connect-content-header"},(0,r.h)("h2",{className:(0,t.default)("-cbwsdk-connect-content-heading",h)},"Scan to connect with our mobile app"),m.onCancel&&(0,r.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:m.onCancel},(0,r.h)(i.CloseIcon,{fill:h==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,r.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,r.h)(g,{title:s.title,description:s.description,theme:h})),(0,r.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,r.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,r.h)(d.QRCode,{content:b,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,r.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:l.LIB_VERSION}),(0,r.h)("input",{type:"hidden",value:b})),(0,r.h)(w,{theme:h}),!m.isConnected&&(0,r.h)("div",{"data-testid":"connecting-spinner",className:(0,t.default)("-cbwsdk-connect-content-qr-connecting",h)},(0,r.h)(u.Spinner,{size:36,color:h==="dark"?"#FFF":"#000"}),(0,r.h)("p",null,"Connecting...")))))}st.ConnectContent=c;function g({title:m,description:h,theme:b}){return(0,r.h)("div",{className:(0,t.default)("-cbwsdk-connect-item",b)},(0,r.h)("div",null,(0,r.h)(o.CoinbaseWalletRound,null)),(0,r.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,r.h)("h3",{className:"-cbwsdk-connect-item-title"},m),(0,r.h)("p",{className:"-cbwsdk-connect-item-description"},h)))}function _({theme:m}){return(0,r.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,r.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",m)},(0,r.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,r.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",m)},(0,r.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,r.h)("span",null,"Tap ",(0,r.h)("strong",null,"Scan")," "),(0,r.h)("span",{className:(0,t.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",m)},(0,r.h)(a.QRCodeIcon,{fill:f(m)})))))}return st.CoinbaseWalletSteps=_,st}var Nt={},Or={},Zc;function hg(){if(Zc)return Or;Zc=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.ArrowLeftIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}return Or.ArrowLeftIcon=t,Or}var Fr={},Kc;function dg(){if(Kc)return Fr;Kc=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.LaptopIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,e.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}return Fr.LaptopIcon=t,Fr}var qr={},Qc;function pg(){if(Qc)return qr;Qc=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.SafeIcon=void 0;const e=Ge;function t(r){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}return qr.SafeIcon=t,qr}var wn={},Yc;function gg(){return Yc||(Yc=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"),wn}var Xc;function yg(){if(Xc)return Nt;Xc=1;var e=Nt&&Nt.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.TryExtensionContent=void 0;const t=e(cn),r=Ge,n=$n,l=hg(),i=dg(),o=pg(),a=e(gg());function d({theme:u}){const[p,s]=(0,n.useState)(!1),f=(0,n.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),c=(0,n.useCallback)(()=>{p?window.location.reload():(f(),s(!0))},[f,p]);return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension",u)},(0,r.h)("style",null,a.default),(0,r.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,r.h)("h3",{class:(0,t.default)("-cbwsdk-try-extension-heading",u)},"Or try the Coinbase Wallet browser extension"),(0,r.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,r.h)("button",{class:(0,t.default)("-cbwsdk-try-extension-cta",u),onClick:c},p?"Refresh":"Install"),(0,r.h)("div",null,!p&&(0,r.h)(l.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:u==="light"?"#0052FF":"#588AF5"})))),(0,r.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,r.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,r.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,r.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,r.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",u)},(0,r.h)(i.LaptopIcon,{fill:u==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",u)},"Connect with dapps with just one click on your desktop browser")),(0,r.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,r.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,r.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",u)},(0,r.h)(o.SafeIcon,{fill:u==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",u)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}return Nt.TryExtensionContent=d,Nt}var En={},el;function mg(){return el||(el=1,Object.defineProperty(En,"__esModule",{value:!0}),En.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"),En}var tl;function _g(){if(tl)return Pt;tl=1;var e=Pt&&Pt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.ConnectDialog=void 0;const t=e(cn),r=Ge,n=$n,l=fg(),i=yg(),o=e(mg()),a=d=>{const{isOpen:u,darkMode:p}=d,[s,f]=(0,n.useState)(!u),[c,g]=(0,n.useState)(!u);(0,n.useEffect)(()=>{const m=[window.setTimeout(()=>{g(!u)},10)];return u?f(!1):m.push(window.setTimeout(()=>{f(!0)},360)),()=>{m.forEach(window.clearTimeout)}},[u]);const _=p?"dark":"light";return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-container",s&&"-cbwsdk-connect-dialog-container-hidden")},(0,r.h)("style",null,o.default),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-backdrop",_,c&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,r.h)("div",{class:"-cbwsdk-connect-dialog"},(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-box",c&&"-cbwsdk-connect-dialog-box-hidden")},d.connectDisabled?null:(0,r.h)(l.ConnectContent,{theme:_,version:d.version,sessionId:d.sessionId,sessionSecret:d.sessionSecret,linkAPIUrl:d.linkAPIUrl,isConnected:d.isConnected,isParentConnection:d.isParentConnection,chainId:d.chainId,onCancel:d.onCancel}),(0,r.h)(i.TryExtensionContent,{theme:_}))))};return Pt.ConnectDialog=a,Pt}var rl;function vg(){if(rl)return Pr;rl=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.LinkFlow=void 0;const e=Ge,t=_g();let r=class{constructor(l){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=l.darkMode,this.version=l.version,this.sessionId=l.sessionId,this.sessionSecret=l.sessionSecret,this.linkAPIUrl=l.linkAPIUrl,this.isParentConnection=l.isParentConnection}attach(l){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",l.appendChild(this.root),this.render()}setConnected(l){this.connected!==l&&(this.connected=l,this.render())}setChainId(l){this.chainId!==l&&(this.chainId=l,this.render())}detach(){var l;this.root&&((0,e.render)(null,this.root),(l=this.root.parentElement)===null||l===void 0||l.removeChild(this.root))}setConnectDisabled(l){this.connectDisabled=l}open(l){this.isOpen=!0,this.onCancel=l.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,e.render)((0,e.h)(t.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};return Pr.LinkFlow=r,Pr}var Dr={},Sn={},nl;function bg(){return nl||(nl=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),Sn}var il;function Cd(){return il||(il=1,(function(e){var t=Dr&&Dr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const r=t(cn),n=Ge,l=$n,i=t(bg()),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class d{constructor(f){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=f.darkMode}attach(f){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",f.appendChild(this.root),this.render()}presentItem(f){const c=this.nextItemKey++;return this.items.set(c,f),this.render(),()=>{this.items.delete(c),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([f,c])=>(0,n.h)(e.SnackbarInstance,Object.assign({},c,{key:f}))))),this.root)}}e.Snackbar=d;const u=s=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,i.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},s.children));e.SnackbarContainer=u;const p=({autoExpand:s,message:f,menuItems:c})=>{const[g,_]=(0,l.useState)(!0),[m,h]=(0,l.useState)(s??!1);(0,l.useEffect)(()=>{const w=[window.setTimeout(()=>{_(!1)},1),window.setTimeout(()=>{h(!0)},1e4)];return()=>{w.forEach(window.clearTimeout)}});const b=()=>{h(!m)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",g&&"-cbwsdk-snackbar-instance-hidden",m&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:b},(0,n.h)("img",{src:o,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},f),(0,n.h)("div",{class:"-gear-container"},!m&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:a,class:"-gear-icon",title:"Expand"}))),c&&c.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},c.map((w,I)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",w.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:w.onClick,key:I},(0,n.h)("svg",{width:w.svgWidth,height:w.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":w.defaultFillRule,"clip-rule":w.defaultClipRule,d:w.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",w.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},w.info)))))};e.SnackbarInstance=p})(Dr)),Dr}var sl;function Md(){if(sl)return Tr;sl=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.WalletLinkRelayUI=void 0;const e=rd(),t=vg(),r=Cd();let n=class{constructor(i){this.standalone=null,this.attached=!1,this.snackbar=new r.Snackbar({darkMode:i.darkMode}),this.linkFlow=new t.LinkFlow({darkMode:i.darkMode,version:i.version,sessionId:i.session.id,sessionSecret:i.session.secret,linkAPIUrl:i.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const i=document.documentElement,o=document.createElement("div");o.className="-cbwsdk-css-reset",i.appendChild(o),this.linkFlow.attach(o),this.snackbar.attach(o),this.attached=!0,(0,e.injectCssReset)()}setConnected(i){this.linkFlow.setConnected(i)}setChainId(i){this.linkFlow.setChainId(i)}setConnectDisabled(i){this.linkFlow.setConnectDisabled(i)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(i){this.linkFlow.open({onCancel:i.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(i){let o;return i.isUnlinkedErrorState?o={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]}:o={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:i.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]},this.snackbar.presentItem(o)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(i){this.standalone=i}isStandalone(){var i;return(i=this.standalone)!==null&&i!==void 0?i:!1}};return Tr.WalletLinkRelayUI=n,Tr}var ol;function kd(){if(ol)return Rr;ol=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.WalletLinkRelay=void 0;const e=jn(),t=Un(),r=ut(),n=va(),l=ba(),i=Ra(),o=Lp(),a=ma(),d=Md();let u=class Jt extends l.RelayAbstract{constructor(s){var f;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=m=>{var h;this.isLinked=m;const b=this.storage.getItem(l.LOCAL_STORAGE_ADDRESSES_KEY);if(m&&(this.session.linked=m),this.isUnlinkedErrorState=!1,b){const w=b.split(" "),I=this.storage.getItem("IsStandaloneSigning")==="true";if(w[0]!==""&&!m&&this.session.linked&&!I){this.isUnlinkedErrorState=!0;const A=this.getSessionIdHash();(h=this.diagnostic)===null||h===void 0||h.log(n.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:A})}}},this.metadataUpdated=(m,h)=>{this.storage.setItem(m,h)},this.chainUpdated=(m,h)=>{this.chainCallbackParams.chainId===m&&this.chainCallbackParams.jsonRpcUrl===h||(this.chainCallbackParams={chainId:m,jsonRpcUrl:h},this.chainCallback&&this.chainCallback(m,h))},this.accountUpdated=m=>{this.accountsCallback&&this.accountsCallback([m]),Jt.accountRequestCallbackIds.size>0&&(Array.from(Jt.accountRequestCallbackIds.values()).forEach(h=>{const b={type:"WEB3_RESPONSE",id:h,response:{method:"requestEthereumAccounts",result:[m]}};this.invokeCallback(Object.assign(Object.assign({},b),{id:h}))}),Jt.accountRequestCallbackIds.clear())},this.connectedUpdated=m=>{this.ui.setConnected(m)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=s.linkAPIUrl,this.storage=s.storage,this.options=s;const{session:c,ui:g,connection:_}=this.subscribe();this._session=c,this.connection=_,this.relayEventManager=s.relayEventManager,this.diagnostic=s.diagnosticLogger,this._reloadOnDisconnect=(f=s.reloadOnDisconnect)!==null&&f!==void 0?f:!0,this.ui=g}subscribe(){const s=i.Session.load(this.storage)||new i.Session(this.storage).save(),{linkAPIUrl:f,diagnostic:c}=this,g=new o.WalletLinkConnection({session:s,linkAPIUrl:f,diagnostic:c,listener:this}),{version:_,darkMode:m}=this.options,h=this.options.uiConstructor({linkAPIUrl:f,version:_,darkMode:m,session:s});return g.connect(),{session:s,ui:h,connection:g}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(s=>setTimeout(()=>s(null),1e3))]).then(()=>{var s,f;const c=this.ui.isStandalone();(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const g=i.Session.load(this.storage);if(g?.id===this._session.id?this.storage.clear():g&&((f=this.diagnostic)===null||f===void 0||f.log(n.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i.Session.hash(g.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:_,ui:m,connection:h}=this.subscribe();this._session=_,this.connection=h,this.ui=m,c&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(s=>{var f;(f=this.diagnostic)===null||f===void 0||f.log(n.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${s}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(s,f){this.appName=s,this.appLogoUrl=f}getStorageItem(s){return this.storage.getItem(s)}get session(){return this._session}setStorageItem(s,f){this.storage.setItem(s,f)}signEthereumMessage(s,f,c,g){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,r.hexStringFromBuffer)(s,!0),address:f,addPrefix:c,typedDataJson:g||null}})}ethereumAddressFromSignedMessage(s,f,c){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,r.hexStringFromBuffer)(s,!0),signature:(0,r.hexStringFromBuffer)(f,!0),addPrefix:c}})}signEthereumTransaction(s){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:s.fromAddress,toAddress:s.toAddress,weiValue:(0,r.bigIntStringFromBN)(s.weiValue),data:(0,r.hexStringFromBuffer)(s.data,!0),nonce:s.nonce,gasPriceInWei:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,maxFeePerGas:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,maxPriorityFeePerGas:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,gasLimit:s.gasLimit?(0,r.bigIntStringFromBN)(s.gasLimit):null,chainId:s.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(s){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:s.fromAddress,toAddress:s.toAddress,weiValue:(0,r.bigIntStringFromBN)(s.weiValue),data:(0,r.hexStringFromBuffer)(s.data,!0),nonce:s.nonce,gasPriceInWei:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,maxFeePerGas:s.maxFeePerGas?(0,r.bigIntStringFromBN)(s.maxFeePerGas):null,maxPriorityFeePerGas:s.maxPriorityFeePerGas?(0,r.bigIntStringFromBN)(s.maxPriorityFeePerGas):null,gasLimit:s.gasLimit?(0,r.bigIntStringFromBN)(s.gasLimit):null,chainId:s.chainId,shouldSubmit:!0}})}submitEthereumTransaction(s,f){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,r.hexStringFromBuffer)(s,!0),chainId:f}})}scanQRCode(s){return this.sendRequest({method:"scanQRCode",params:{regExp:s}})}getQRCodeUrl(){return(0,r.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(s,f){return this.sendRequest({method:"generic",params:{action:f,data:s}})}sendGenericMessage(s){return this.sendRequest(s)}sendRequest(s){let f=null;const c=(0,r.randomBytesHex)(8),g=m=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,s.method,m),f?.()};return{promise:new Promise((m,h)=>{this.ui.isStandalone()||(f=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:g,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(c,b=>{if(f?.(),(0,a.isErrorResponse)(b))return h(new Error(b.errorMessage));m(b)}),this.ui.isStandalone()?this.sendRequestStandalone(c,s):this.publishWeb3RequestEvent(c,s)}),cancel:g}}setConnectDisabled(s){this.ui.setConnectDisabled(s)}setAccountsCallback(s){this.accountsCallback=s}setChainCallback(s){this.chainCallback=s}setDappDefaultChainCallback(s){this.dappDefaultChain=s,this.ui instanceof d.WalletLinkRelayUI&&this.ui.setChainId(s)}publishWeb3RequestEvent(s,f){var c;const g={type:"WEB3_REQUEST",id:s,request:f},_=i.Session.load(this.storage);(c=this.diagnostic)===null||c===void 0||c.log(n.EVENTS.WEB3_REQUEST,{eventId:g.id,method:`relay::${f.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:_?i.Session.hash(_.id):"",isSessionMismatched:(_?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",g,!0).then(m=>{var h;(h=this.diagnostic)===null||h===void 0||h.log(n.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:g.id,method:`relay::${f.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:_?i.Session.hash(_.id):"",isSessionMismatched:(_?.id!==this._session.id).toString()})}).catch(m=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:g.id,response:{method:f.method,errorMessage:m.message}})})}publishWeb3RequestCanceledEvent(s){const f={type:"WEB3_REQUEST_CANCELED",id:s};this.publishEvent("Web3RequestCanceled",f,!1).then()}publishEvent(s,f,c){return this.connection.publishEvent(s,f,c)}handleWeb3ResponseMessage(s){var f;const{response:c}=s;if((f=this.diagnostic)===null||f===void 0||f.log(n.EVENTS.WEB3_RESPONSE,{eventId:s.id,method:`relay::${c.method}`,sessionIdHash:this.getSessionIdHash()}),c.method==="requestEthereumAccounts"){Jt.accountRequestCallbackIds.forEach(g=>this.invokeCallback(Object.assign(Object.assign({},s),{id:g}))),Jt.accountRequestCallbackIds.clear();return}this.invokeCallback(s)}handleErrorResponse(s,f,c,g){var _;const m=(_=c?.message)!==null&&_!==void 0?_:(0,e.getMessageFromCode)(g);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:f,errorMessage:m,errorCode:g}})}invokeCallback(s){const f=this.relayEventManager.callbacks.get(s.id);f&&(f(s.response),this.relayEventManager.callbacks.delete(s.id))}requestEthereumAccounts(){const s={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},f=(0,r.randomBytesHex)(8),c=_=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,s.method,_)};return{promise:new Promise((_,m)=>{if(this.relayEventManager.callbacks.set(f,h=>{if(this.ui.hideRequestEthereumAccounts(),(0,a.isErrorResponse)(h))return m(new Error(h.errorMessage));_(h)}),this.ui.inlineAccountsResponse()){const h=b=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"requestEthereumAccounts",result:b}})};this.ui.requestEthereumAccounts({onCancel:c,onAccounts:h})}else{const h=e.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>c(h)})}Jt.accountRequestCallbackIds.add(f),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(f,s)}),cancel:c}}selectProvider(s){const f={method:"selectProvider"},c=(0,r.randomBytesHex)(8),g=m=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,f.method,m)},_=new Promise((m,h)=>{this.relayEventManager.callbacks.set(c,I=>{if((0,a.isErrorResponse)(I))return h(new Error(I.errorMessage));m(I)});const b=I=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:c,response:{method:"selectProvider",result:t.ProviderType.Unselected}})},w=I=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:c,response:{method:"selectProvider",result:I}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:w,onCancel:b,providerOptions:s})});return{cancel:g,promise:_}}watchAsset(s,f,c,g,_,m){const h={method:"watchAsset",params:{type:s,options:{address:f,symbol:c,decimals:g,image:_},chainId:m}};let b=null;const w=(0,r.randomBytesHex)(8),I=D=>{this.publishWeb3RequestCanceledEvent(w),this.handleErrorResponse(w,h.method,D),b?.()};this.ui.inlineWatchAsset()||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:I,onResetConnection:this.resetAndReload}));const A=new Promise((D,F)=>{this.relayEventManager.callbacks.set(w,ee=>{if(b?.(),(0,a.isErrorResponse)(ee))return F(new Error(ee.errorMessage));D(ee)});const W=ee=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:w,response:{method:"watchAsset",result:!1}})},J=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:w,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:J,onCancel:W,type:s,address:f,symbol:c,decimals:g,image:_,chainId:m}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(w,h)});return{cancel:I,promise:A}}addEthereumChain(s,f,c,g,_,m){const h={method:"addEthereumChain",params:{chainId:s,rpcUrls:f,blockExplorerUrls:g,chainName:_,iconUrls:c,nativeCurrency:m}};let b=null;const w=(0,r.randomBytesHex)(8),I=D=>{this.publishWeb3RequestCanceledEvent(w),this.handleErrorResponse(w,h.method,D),b?.()};return this.ui.inlineAddEthereumChain(s)||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:I,onResetConnection:this.resetAndReload})),{promise:new Promise((D,F)=>{this.relayEventManager.callbacks.set(w,ee=>{if(b?.(),(0,a.isErrorResponse)(ee))return F(new Error(ee.errorMessage));D(ee)});const W=ee=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:w,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},J=ee=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:w,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:ee}}})};this.ui.inlineAddEthereumChain(s)&&this.ui.addEthereumChain({onCancel:W,onApprove:J,chainId:h.params.chainId,rpcUrls:h.params.rpcUrls,blockExplorerUrls:h.params.blockExplorerUrls,chainName:h.params.chainName,iconUrls:h.params.iconUrls,nativeCurrency:h.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(s)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(w,h)}),cancel:I}}switchEthereumChain(s,f){const c={method:"switchEthereumChain",params:Object.assign({chainId:s},{address:f})},g=(0,r.randomBytesHex)(8),_=h=>{this.publishWeb3RequestCanceledEvent(g),this.handleErrorResponse(g,c.method,h)};return{promise:new Promise((h,b)=>{this.relayEventManager.callbacks.set(g,A=>{if((0,a.isErrorResponse)(A)&&A.errorCode)return b(e.standardErrors.provider.custom({code:A.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,a.isErrorResponse)(A))return b(new Error(A.errorMessage));h(A)});const w=A=>{var D;if(A){const F=(D=(0,e.getErrorCode)(A))!==null&&D!==void 0?D:e.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(g,"switchEthereumChain",A instanceof Error?A:e.standardErrors.provider.unsupportedChain(s),F)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:g,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},I=A=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:g,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:A}}})};this.ui.switchEthereumChain({onCancel:w,onApprove:I,chainId:c.params.chainId,address:c.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(g,c)}),cancel:_}}inlineAddEthereumChain(s){return this.ui.inlineAddEthereumChain(s)}getSessionIdHash(){return i.Session.hash(this._session.id)}sendRequestStandalone(s,f){const c=_=>{this.handleErrorResponse(s,f.method,_)},g=_=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:_})};switch(f.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:f,onSuccess:g,onCancel:c});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:f,onSuccess:g,onCancel:c});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:f,onSuccess:g,onCancel:c});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:f,onSuccess:g});break;default:c();break}}};return Rr.WalletLinkRelay=u,u.accountRequestCallbackIds=new Set,Rr}var jr={},Ot={},Ft={},al;function wg(){return al||(al=1,(function(e){var t=Ft&&Ft.__createBinding||(Object.create?(function(n,l,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(l,i);(!a||("get"in a?!l.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return l[i]}}),Object.defineProperty(n,o,a)}):(function(n,l,i,o){o===void 0&&(o=i),n[o]=l[i]})),r=Ft&&Ft.__exportStar||function(n,l){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(l,i)&&t(l,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Cd(),e)})(Ft)),Ft}var Rn={},ul;function Eg(){return ul||(ul=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),Rn}var cl;function Sg(){if(cl)return Ot;cl=1;var e=Ot&&Ot.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.RedirectDialog=void 0;const t=e(cn),r=Ge,n=rd(),l=wg(),i=e(Eg());let o=class{constructor(){this.root=null}attach(){const u=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",u.appendChild(this.root),(0,n.injectCssReset)()}present(u){this.render(u)}clear(){this.render(null)}render(u){this.root&&((0,r.render)(null,this.root),u&&(0,r.render)((0,r.h)(a,Object.assign({},u,{onDismiss:()=>{this.clear()}})),this.root))}};Ot.RedirectDialog=o;const a=({title:d,buttonText:u,darkMode:p,onButtonClick:s,onDismiss:f})=>{const c=p?"dark":"light";return(0,r.h)(l.SnackbarContainer,{darkMode:p},(0,r.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,r.h)("style",null,i.default),(0,r.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:f}),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-redirect-dialog-box",c)},(0,r.h)("p",null,d),(0,r.h)("button",{onClick:s},u))))};return Ot}var ll;function Id(){if(ll)return jr;ll=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.MobileRelayUI=void 0;const e=Sg();let t=class{constructor(n){this.attached=!1,this.darkMode=!1,this.redirectDialog=new e.RedirectDialog,this.darkMode=n.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(n){}redirectToCoinbaseWallet(n){const l=new URL("https://go.cb-w.com/walletlink");l.searchParams.append("redirect_url",window.location.href),n&&l.searchParams.append("wl_url",n);const i=document.createElement("a");i.target="cbw-opener",i.href=l.href,i.rel="noreferrer noopener",i.click()}openCoinbaseWalletDeeplink(n){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(n)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(n)},99)}showConnecting(n){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};return jr.MobileRelayUI=t,jr}var fl;function xd(){if(fl)return Sr;fl=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.MobileRelay=void 0;const e=ut(),t=kd(),r=Id();let n=class extends t.WalletLinkRelay{constructor(i){var o;super(i),this._enableMobileWalletLink=(o=i.enableMobileWalletLink)!==null&&o!==void 0?o:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const i=(0,e.getLocation)();i.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(i.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(i,o){if(super.publishWeb3RequestEvent(i,o),!(this._enableMobileWalletLink&&this.ui instanceof r.MobileRelayUI))return;let a=!1;switch(o.method){case"requestEthereumAccounts":case"connectAndSignIn":a=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:a=!0,this.ui.openCoinbaseWalletDeeplink();break}a&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(i){super.handleWeb3ResponseMessage(i)}connectAndSignIn(i){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:i.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:i.statement,resources:i.resources}})}};return Sr.MobileRelay=n,Sr}var Cn={exports:{}},ds,hl;function Ad(){return hl||(hl=1,ds=Fn().EventEmitter),ds}var ps,dl;function Rg(){if(dl)return ps;dl=1;function e(g,_){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(g);_&&(h=h.filter(function(b){return Object.getOwnPropertyDescriptor(g,b).enumerable})),m.push.apply(m,h)}return m}function t(g){for(var _=1;_<arguments.length;_++){var m=arguments[_]!=null?arguments[_]:{};_%2?e(Object(m),!0).forEach(function(h){r(g,h,m[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):e(Object(m)).forEach(function(h){Object.defineProperty(g,h,Object.getOwnPropertyDescriptor(m,h))})}return g}function r(g,_,m){return _=o(_),_ in g?Object.defineProperty(g,_,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[_]=m,g}function n(g,_){if(!(g instanceof _))throw new TypeError("Cannot call a class as a function")}function l(g,_){for(var m=0;m<_.length;m++){var h=_[m];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(g,o(h.key),h)}}function i(g,_,m){return _&&l(g.prototype,_),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var _=a(g,"string");return typeof _=="symbol"?_:String(_)}function a(g,_){if(typeof g!="object"||g===null)return g;var m=g[Symbol.toPrimitive];if(m!==void 0){var h=m.call(g,_);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var d=Hn(),u=d.Buffer,p=ga,s=p.inspect,f=s&&s.custom||"inspect";function c(g,_,m){u.prototype.copy.call(g,_,m)}return ps=(function(){function g(){n(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(m){var h={data:m,next:null};this.length>0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(m){var h={data:m,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var h=this.head,b=""+h.data;h=h.next;)b+=m+h.data;return b}},{key:"concat",value:function(m){if(this.length===0)return u.alloc(0);for(var h=u.allocUnsafe(m>>>0),b=this.head,w=0;b;)c(b.data,h,w),w+=b.data.length,b=b.next;return h}},{key:"consume",value:function(m,h){var b;return m<this.head.data.length?(b=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):m===this.head.data.length?b=this.shift():b=h?this._getString(m):this._getBuffer(m),b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var h=this.head,b=1,w=h.data;for(m-=w.length;h=h.next;){var I=h.data,A=m>I.length?I.length:m;if(A===I.length?w+=I:w+=I.slice(0,m),m-=A,m===0){A===I.length?(++b,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=I.slice(A));break}++b}return this.length-=b,w}},{key:"_getBuffer",value:function(m){var h=u.allocUnsafe(m),b=this.head,w=1;for(b.data.copy(h),m-=b.data.length;b=b.next;){var I=b.data,A=m>I.length?I.length:m;if(I.copy(h,h.length-m,0,A),m-=A,m===0){A===I.length?(++w,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=I.slice(A));break}++w}return this.length-=w,h}},{key:f,value:function(m,h){return s(this,t(t({},h),{},{depth:0,customInspect:!1}))}}]),g})(),ps}var gs,pl;function Td(){if(pl)return gs;pl=1;function e(o,a){var d=this,u=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return u||p?(a?a(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,o)):process.nextTick(l,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(s){!a&&s?d._writableState?d._writableState.errorEmitted?process.nextTick(r,d):(d._writableState.errorEmitted=!0,process.nextTick(t,d,s)):process.nextTick(t,d,s):a?(process.nextTick(r,d),a(s)):process.nextTick(r,d)}),this)}function t(o,a){l(o,a),r(o)}function r(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(o,a){o.emit("error",a)}function i(o,a){var d=o._readableState,u=o._writableState;d&&d.autoDestroy||u&&u.autoDestroy?o.destroy(a):o.emit("error",a)}return gs={destroy:e,undestroy:n,errorOrDestroy:i},gs}var ys={},gl;function hr(){if(gl)return ys;gl=1;function e(a,d){a.prototype=Object.create(d.prototype),a.prototype.constructor=a,a.__proto__=d}var t={};function r(a,d,u){u||(u=Error);function p(f,c,g){return typeof d=="string"?d:d(f,c,g)}var s=(function(f){e(c,f);function c(g,_,m){return f.call(this,p(g,_,m))||this}return c})(u);s.prototype.name=u.name,s.prototype.code=a,t[a]=s}function n(a,d){if(Array.isArray(a)){var u=a.length;return a=a.map(function(p){return String(p)}),u>2?"one of ".concat(d," ").concat(a.slice(0,u-1).join(", "),", or ")+a[u-1]:u===2?"one of ".concat(d," ").concat(a[0]," or ").concat(a[1]):"of ".concat(d," ").concat(a[0])}else return"of ".concat(d," ").concat(String(a))}function l(a,d,u){return a.substr(0,d.length)===d}function i(a,d,u){return(u===void 0||u>a.length)&&(u=a.length),a.substring(u-d.length,u)===d}function o(a,d,u){return typeof u!="number"&&(u=0),u+d.length>a.length?!1:a.indexOf(d,u)!==-1}return r("ERR_INVALID_OPT_VALUE",function(a,d){return'The value "'+d+'" is invalid for option "'+a+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(a,d,u){var p;typeof d=="string"&&l(d,"not ")?(p="must not be",d=d.replace(/^not /,"")):p="must be";var s;if(i(a," argument"))s="The ".concat(a," ").concat(p," ").concat(n(d,"type"));else{var f=o(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(f," ").concat(p," ").concat(n(d,"type"))}return s+=". Received type ".concat(typeof u),s},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ys.codes=t,ys}var ms,yl;function Pd(){if(yl)return ms;yl=1;var e=hr().codes.ERR_INVALID_OPT_VALUE;function t(n,l,i){return n.highWaterMark!=null?n.highWaterMark:l?n[i]:null}function r(n,l,i,o){var a=t(l,o,i);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var d=o?i:"highWaterMark";throw new e(d,a)}return Math.floor(a)}return n.objectMode?16:16*1024}return ms={getHighWaterMark:r},ms}var _s,ml;function Cg(){if(ml)return _s;ml=1,_s=e;function e(r,n){if(t("noDeprecation"))return r;var l=!1;function i(){if(!l){if(t("throwDeprecation"))throw new Error(n);t("traceDeprecation")?console.trace(n):console.warn(n),l=!0}return r.apply(this,arguments)}return i}function t(r){try{if(!ft.localStorage)return!1}catch{return!1}var n=ft.localStorage[r];return n==null?!1:String(n).toLowerCase()==="true"}return _s}var vs,_l;function Bd(){if(_l)return vs;_l=1,vs=W;function e(U){var $=this;this.next=null,this.entry=null,this.finish=function(){Y($,U)}}var t;W.WritableState=D;var r={deprecate:Cg()},n=Ad(),l=Hn().Buffer,i=(typeof ft<"u"?ft:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(U){return l.from(U)}function a(U){return l.isBuffer(U)||U instanceof i}var d=Td(),u=Pd(),p=u.getHighWaterMark,s=hr().codes,f=s.ERR_INVALID_ARG_TYPE,c=s.ERR_METHOD_NOT_IMPLEMENTED,g=s.ERR_MULTIPLE_CALLBACK,_=s.ERR_STREAM_CANNOT_PIPE,m=s.ERR_STREAM_DESTROYED,h=s.ERR_STREAM_NULL_VALUES,b=s.ERR_STREAM_WRITE_AFTER_END,w=s.ERR_UNKNOWN_ENCODING,I=d.errorOrDestroy;tt()(W,n);function A(){}function D(U,$,G){t=t||cr(),U=U||{},typeof G!="boolean"&&(G=$ instanceof t),this.objectMode=!!U.objectMode,G&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=p(this,U,"writableHighWaterMark",G),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var X=U.decodeStrings===!1;this.decodeStrings=!X,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){C($,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}D.prototype.getBuffer=function(){for(var $=this.bufferedRequest,G=[];$;)G.push($),$=$.next;return G},(function(){try{Object.defineProperty(D.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var F;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(W,Symbol.hasInstance,{value:function($){return F.call(this,$)?!0:this!==W?!1:$&&$._writableState instanceof D}})):F=function($){return $ instanceof this};function W(U){t=t||cr();var $=this instanceof t;if(!$&&!F.call(W,this))return new W(U);this._writableState=new D(U,this,$),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}W.prototype.pipe=function(){I(this,new _)};function J(U,$){var G=new b;I(U,G),process.nextTick($,G)}function ee(U,$,G,X){var ne;return G===null?ne=new h:typeof G!="string"&&!$.objectMode&&(ne=new f("chunk",["string","Buffer"],G)),ne?(I(U,ne),process.nextTick(X,ne),!1):!0}W.prototype.write=function(U,$,G){var X=this._writableState,ne=!1,P=!X.objectMode&&a(U);return P&&!l.isBuffer(U)&&(U=o(U)),typeof $=="function"&&(G=$,$=null),P?$="buffer":$||($=X.defaultEncoding),typeof G!="function"&&(G=A),X.ending?J(this,G):(P||ee(this,X,U,G))&&(X.pendingcb++,ne=re(this,X,P,U,$,G)),ne},W.prototype.cork=function(){this._writableState.corked++},W.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&L(this,U))},W.prototype.setDefaultEncoding=function($){if(typeof $=="string"&&($=$.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf(($+"").toLowerCase())>-1))throw new w($);return this._writableState.defaultEncoding=$,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(U,$,G){return!U.objectMode&&U.decodeStrings!==!1&&typeof $=="string"&&($=l.from($,G)),$}Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function re(U,$,G,X,ne,P){if(!G){var B=Q($,X,ne);X!==B&&(G=!0,ne="buffer",X=B)}var Z=$.objectMode?1:X.length;$.length+=Z;var K=$.length<$.highWaterMark;if(K||($.needDrain=!0),$.writing||$.corked){var oe=$.lastBufferedRequest;$.lastBufferedRequest={chunk:X,encoding:ne,isBuf:G,callback:P,next:null},oe?oe.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else q(U,$,!1,Z,X,ne,P);return K}function q(U,$,G,X,ne,P,B){$.writelen=X,$.writecb=B,$.writing=!0,$.sync=!0,$.destroyed?$.onwrite(new m("write")):G?U._writev(ne,$.onwrite):U._write(ne,P,$.onwrite),$.sync=!1}function y(U,$,G,X,ne){--$.pendingcb,G?(process.nextTick(ne,X),process.nextTick(N,U,$),U._writableState.errorEmitted=!0,I(U,X)):(ne(X),U._writableState.errorEmitted=!0,I(U,X),N(U,$))}function S(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function C(U,$){var G=U._writableState,X=G.sync,ne=G.writecb;if(typeof ne!="function")throw new g;if(S(G),$)y(U,G,X,$,ne);else{var P=j(G)||U.destroyed;!P&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&L(U,G),X?process.nextTick(M,U,G,P,ne):M(U,G,P,ne)}}function M(U,$,G,X){G||x(U,$),$.pendingcb--,X(),N(U,$)}function x(U,$){$.length===0&&$.needDrain&&($.needDrain=!1,U.emit("drain"))}function L(U,$){$.bufferProcessing=!0;var G=$.bufferedRequest;if(U._writev&&G&&G.next){var X=$.bufferedRequestCount,ne=new Array(X),P=$.corkedRequestsFree;P.entry=G;for(var B=0,Z=!0;G;)ne[B]=G,G.isBuf||(Z=!1),G=G.next,B+=1;ne.allBuffers=Z,q(U,$,!0,$.length,ne,"",P.finish),$.pendingcb++,$.lastBufferedRequest=null,P.next?($.corkedRequestsFree=P.next,P.next=null):$.corkedRequestsFree=new e($),$.bufferedRequestCount=0}else{for(;G;){var K=G.chunk,oe=G.encoding,ie=G.callback,se=$.objectMode?1:K.length;if(q(U,$,!1,se,K,oe,ie),G=G.next,$.bufferedRequestCount--,$.writing)break}G===null&&($.lastBufferedRequest=null)}$.bufferedRequest=G,$.bufferProcessing=!1}W.prototype._write=function(U,$,G){G(new c("_write()"))},W.prototype._writev=null,W.prototype.end=function(U,$,G){var X=this._writableState;return typeof U=="function"?(G=U,U=null,$=null):typeof $=="function"&&(G=$,$=null),U!=null&&this.write(U,$),X.corked&&(X.corked=1,this.uncork()),X.ending||te(this,X,G),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function j(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function T(U,$){U._final(function(G){$.pendingcb--,G&&I(U,G),$.prefinished=!0,U.emit("prefinish"),N(U,$)})}function E(U,$){!$.prefinished&&!$.finalCalled&&(typeof U._final=="function"&&!$.destroyed?($.pendingcb++,$.finalCalled=!0,process.nextTick(T,U,$)):($.prefinished=!0,U.emit("prefinish")))}function N(U,$){var G=j($);if(G&&(E(U,$),$.pendingcb===0&&($.finished=!0,U.emit("finish"),$.autoDestroy))){var X=U._readableState;(!X||X.autoDestroy&&X.endEmitted)&&U.destroy()}return G}function te(U,$,G){$.ending=!0,N(U,$),G&&($.finished?process.nextTick(G):U.once("finish",G)),$.ended=!0,U.writable=!1}function Y(U,$,G){var X=U.entry;for(U.entry=null;X;){var ne=X.callback;$.pendingcb--,ne(G),X=X.next}$.corkedRequestsFree.next=U}return Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function($){this._writableState&&(this._writableState.destroyed=$)}}),W.prototype.destroy=d.destroy,W.prototype._undestroy=d.undestroy,W.prototype._destroy=function(U,$){$(U)},vs}var bs,vl;function cr(){if(vl)return bs;vl=1;var e=Object.keys||function(u){var p=[];for(var s in u)p.push(s);return p};bs=o;var t=Ld(),r=Bd();tt()(o,t);for(var n=e(r.prototype),l=0;l<n.length;l++){var i=n[l];o.prototype[i]||(o.prototype[i]=r.prototype[i])}function o(u){if(!(this instanceof o))return new o(u);t.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(d,this)}function d(u){u.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(p){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=p,this._writableState.destroyed=p)}}),bs}var ws={},bl;function wl(){if(bl)return ws;bl=1;var e=ct().Buffer,t=e.isEncoding||function(h){switch(h=""+h,h&&h.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(h){if(!h)return"utf8";for(var b;;)switch(h){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return h;default:if(b)return;h=(""+h).toLowerCase(),b=!0}}function n(h){var b=r(h);if(typeof b!="string"&&(e.isEncoding===t||!t(h)))throw new Error("Unknown encoding: "+h);return b||h}ws.StringDecoder=l;function l(h){this.encoding=n(h);var b;switch(this.encoding){case"utf16le":this.text=s,this.end=f,b=4;break;case"utf8":this.fillLast=d,b=4;break;case"base64":this.text=c,this.end=g,b=3;break;default:this.write=_,this.end=m;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(b)}l.prototype.write=function(h){if(h.length===0)return"";var b,w;if(this.lastNeed){if(b=this.fillLast(h),b===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<h.length?b?b+this.text(h,w):this.text(h,w):b||""},l.prototype.end=p,l.prototype.text=u,l.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length};function i(h){return h<=127?0:h>>5===6?2:h>>4===14?3:h>>3===30?4:h>>6===2?-1:-2}function o(h,b,w){var I=b.length-1;if(I<w)return 0;var A=i(b[I]);return A>=0?(A>0&&(h.lastNeed=A-1),A):--I<w||A===-2?0:(A=i(b[I]),A>=0?(A>0&&(h.lastNeed=A-2),A):--I<w||A===-2?0:(A=i(b[I]),A>=0?(A>0&&(A===2?A=0:h.lastNeed=A-3),A):0))}function a(h,b,w){if((b[0]&192)!==128)return h.lastNeed=0,"�";if(h.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return h.lastNeed=1,"�";if(h.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return h.lastNeed=2,"�"}}function d(h){var b=this.lastTotal-this.lastNeed,w=a(this,h);if(w!==void 0)return w;if(this.lastNeed<=h.length)return h.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,b,0,h.length),this.lastNeed-=h.length}function u(h,b){var w=o(this,h,b);if(!this.lastNeed)return h.toString("utf8",b);this.lastTotal=w;var I=h.length-(w-this.lastNeed);return h.copy(this.lastChar,0,I),h.toString("utf8",b,I)}function p(h){var b=h&&h.length?this.write(h):"";return this.lastNeed?b+"�":b}function s(h,b){if((h.length-b)%2===0){var w=h.toString("utf16le",b);if(w){var I=w.charCodeAt(w.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",b,h.length-1)}function f(h){var b=h&&h.length?this.write(h):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,w)}return b}function c(h,b){var w=(h.length-b)%3;return w===0?h.toString("base64",b):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",b,h.length-w))}function g(h){var b=h&&h.length?this.write(h):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function _(h){return h.toString(this.encoding)}function m(h){return h&&h.length?this.write(h):""}return ws}var Es,El;function Ta(){if(El)return Es;El=1;var e=hr().codes.ERR_STREAM_PREMATURE_CLOSE;function t(i){var o=!1;return function(){if(!o){o=!0;for(var a=arguments.length,d=new Array(a),u=0;u<a;u++)d[u]=arguments[u];i.apply(this,d)}}}function r(){}function n(i){return i.setHeader&&typeof i.abort=="function"}function l(i,o,a){if(typeof o=="function")return l(i,null,o);o||(o={}),a=t(a||r);var d=o.readable||o.readable!==!1&&i.readable,u=o.writable||o.writable!==!1&&i.writable,p=function(){i.writable||f()},s=i._writableState&&i._writableState.finished,f=function(){u=!1,s=!0,d||a.call(i)},c=i._readableState&&i._readableState.endEmitted,g=function(){d=!1,c=!0,u||a.call(i)},_=function(w){a.call(i,w)},m=function(){var w;if(d&&!c)return(!i._readableState||!i._readableState.ended)&&(w=new e),a.call(i,w);if(u&&!s)return(!i._writableState||!i._writableState.ended)&&(w=new e),a.call(i,w)},h=function(){i.req.on("finish",f)};return n(i)?(i.on("complete",f),i.on("abort",m),i.req?h():i.on("request",h)):u&&!i._writableState&&(i.on("end",p),i.on("close",p)),i.on("end",g),i.on("finish",f),o.error!==!1&&i.on("error",_),i.on("close",m),function(){i.removeListener("complete",f),i.removeListener("abort",m),i.removeListener("request",h),i.req&&i.req.removeListener("finish",f),i.removeListener("end",p),i.removeListener("close",p),i.removeListener("finish",f),i.removeListener("end",g),i.removeListener("error",_),i.removeListener("close",m)}}return Es=l,Es}var Ss,Sl;function Mg(){if(Sl)return Ss;Sl=1;var e;function t(w,I,A){return I=r(I),I in w?Object.defineProperty(w,I,{value:A,enumerable:!0,configurable:!0,writable:!0}):w[I]=A,w}function r(w){var I=n(w,"string");return typeof I=="symbol"?I:String(I)}function n(w,I){if(typeof w!="object"||w===null)return w;var A=w[Symbol.toPrimitive];if(A!==void 0){var D=A.call(w,I);if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(w)}var l=Ta(),i=Symbol("lastResolve"),o=Symbol("lastReject"),a=Symbol("error"),d=Symbol("ended"),u=Symbol("lastPromise"),p=Symbol("handlePromise"),s=Symbol("stream");function f(w,I){return{value:w,done:I}}function c(w){var I=w[i];if(I!==null){var A=w[s].read();A!==null&&(w[u]=null,w[i]=null,w[o]=null,I(f(A,!1)))}}function g(w){process.nextTick(c,w)}function _(w,I){return function(A,D){w.then(function(){if(I[d]){A(f(void 0,!0));return}I[p](A,D)},D)}}var m=Object.getPrototypeOf(function(){}),h=Object.setPrototypeOf((e={get stream(){return this[s]},next:function(){var I=this,A=this[a];if(A!==null)return Promise.reject(A);if(this[d])return Promise.resolve(f(void 0,!0));if(this[s].destroyed)return new Promise(function(J,ee){process.nextTick(function(){I[a]?ee(I[a]):J(f(void 0,!0))})});var D=this[u],F;if(D)F=new Promise(_(D,this));else{var W=this[s].read();if(W!==null)return Promise.resolve(f(W,!1));F=new Promise(this[p])}return this[u]=F,F}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var I=this;return new Promise(function(A,D){I[s].destroy(null,function(F){if(F){D(F);return}A(f(void 0,!0))})})}),e),m),b=function(I){var A,D=Object.create(h,(A={},t(A,s,{value:I,writable:!0}),t(A,i,{value:null,writable:!0}),t(A,o,{value:null,writable:!0}),t(A,a,{value:null,writable:!0}),t(A,d,{value:I._readableState.endEmitted,writable:!0}),t(A,p,{value:function(W,J){var ee=D[s].read();ee?(D[u]=null,D[i]=null,D[o]=null,W(f(ee,!1))):(D[i]=W,D[o]=J)},writable:!0}),A));return D[u]=null,l(I,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var W=D[o];W!==null&&(D[u]=null,D[i]=null,D[o]=null,W(F)),D[a]=F;return}var J=D[i];J!==null&&(D[u]=null,D[i]=null,D[o]=null,J(f(void 0,!0))),D[d]=!0}),I.on("readable",g.bind(null,D)),D};return Ss=b,Ss}var Rs,Rl;function kg(){return Rl||(Rl=1,Rs=function(){throw new Error("Readable.from is not available in the browser")}),Rs}var Cs,Cl;function Ld(){if(Cl)return Cs;Cl=1,Cs=J;var e;J.ReadableState=W,Fn().EventEmitter;var t=function(B,Z){return B.listeners(Z).length},r=Ad(),n=Hn().Buffer,l=(typeof ft<"u"?ft:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(P){return n.from(P)}function o(P){return n.isBuffer(P)||P instanceof l}var a=ga,d;a&&a.debuglog?d=a.debuglog("stream"):d=function(){};var u=Rg(),p=Td(),s=Pd(),f=s.getHighWaterMark,c=hr().codes,g=c.ERR_INVALID_ARG_TYPE,_=c.ERR_STREAM_PUSH_AFTER_EOF,m=c.ERR_METHOD_NOT_IMPLEMENTED,h=c.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,w,I;tt()(J,r);var A=p.errorOrDestroy,D=["error","close","destroy","pause","resume"];function F(P,B,Z){if(typeof P.prependListener=="function")return P.prependListener(B,Z);!P._events||!P._events[B]?P.on(B,Z):Array.isArray(P._events[B])?P._events[B].unshift(Z):P._events[B]=[Z,P._events[B]]}function W(P,B,Z){e=e||cr(),P=P||{},typeof Z!="boolean"&&(Z=B instanceof e),this.objectMode=!!P.objectMode,Z&&(this.objectMode=this.objectMode||!!P.readableObjectMode),this.highWaterMark=f(this,P,"readableHighWaterMark",Z),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=P.emitClose!==!1,this.autoDestroy=!!P.autoDestroy,this.destroyed=!1,this.defaultEncoding=P.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,P.encoding&&(b||(b=wl().StringDecoder),this.decoder=new b(P.encoding),this.encoding=P.encoding)}function J(P){if(e=e||cr(),!(this instanceof J))return new J(P);var B=this instanceof e;this._readableState=new W(P,this,B),this.readable=!0,P&&(typeof P.read=="function"&&(this._read=P.read),typeof P.destroy=="function"&&(this._destroy=P.destroy)),r.call(this)}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(B){this._readableState&&(this._readableState.destroyed=B)}}),J.prototype.destroy=p.destroy,J.prototype._undestroy=p.undestroy,J.prototype._destroy=function(P,B){B(P)},J.prototype.push=function(P,B){var Z=this._readableState,K;return Z.objectMode?K=!0:typeof P=="string"&&(B=B||Z.defaultEncoding,B!==Z.encoding&&(P=n.from(P,B),B=""),K=!0),ee(this,P,B,!1,K)},J.prototype.unshift=function(P){return ee(this,P,null,!0,!1)};function ee(P,B,Z,K,oe){d("readableAddChunk",B);var ie=P._readableState;if(B===null)ie.reading=!1,C(P,ie);else{var se;if(oe||(se=re(ie,B)),se)A(P,se);else if(ie.objectMode||B&&B.length>0)if(typeof B!="string"&&!ie.objectMode&&Object.getPrototypeOf(B)!==n.prototype&&(B=i(B)),K)ie.endEmitted?A(P,new h):Q(P,ie,B,!0);else if(ie.ended)A(P,new _);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!Z?(B=ie.decoder.write(B),ie.objectMode||B.length!==0?Q(P,ie,B,!1):L(P,ie)):Q(P,ie,B,!1)}else K||(ie.reading=!1,L(P,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function Q(P,B,Z,K){B.flowing&&B.length===0&&!B.sync?(B.awaitDrain=0,P.emit("data",Z)):(B.length+=B.objectMode?1:Z.length,K?B.buffer.unshift(Z):B.buffer.push(Z),B.needReadable&&M(P)),L(P,B)}function re(P,B){var Z;return!o(B)&&typeof B!="string"&&B!==void 0&&!P.objectMode&&(Z=new g("chunk",["string","Buffer","Uint8Array"],B)),Z}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(P){b||(b=wl().StringDecoder);var B=new b(P);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,K="";Z!==null;)K+=B.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};var q=1073741824;function y(P){return P>=q?P=q:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P}function S(P,B){return P<=0||B.length===0&&B.ended?0:B.objectMode?1:P!==P?B.flowing&&B.length?B.buffer.head.data.length:B.length:(P>B.highWaterMark&&(B.highWaterMark=y(P)),P<=B.length?P:B.ended?B.length:(B.needReadable=!0,0))}J.prototype.read=function(P){d("read",P),P=parseInt(P,10);var B=this._readableState,Z=P;if(P!==0&&(B.emittedReadable=!1),P===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return d("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?G(this):M(this),null;if(P=S(P,B),P===0&&B.ended)return B.length===0&&G(this),null;var K=B.needReadable;d("need readable",K),(B.length===0||B.length-P<B.highWaterMark)&&(K=!0,d("length less than watermark",K)),B.ended||B.reading?(K=!1,d("reading or ended",K)):K&&(d("do read"),B.reading=!0,B.sync=!0,B.length===0&&(B.needReadable=!0),this._read(B.highWaterMark),B.sync=!1,B.reading||(P=S(Z,B)));var oe;return P>0?oe=$(P,B):oe=null,oe===null?(B.needReadable=B.length<=B.highWaterMark,P=0):(B.length-=P,B.awaitDrain=0),B.length===0&&(B.ended||(B.needReadable=!0),Z!==P&&B.ended&&G(this)),oe!==null&&this.emit("data",oe),oe};function C(P,B){if(d("onEofChunk"),!B.ended){if(B.decoder){var Z=B.decoder.end();Z&&Z.length&&(B.buffer.push(Z),B.length+=B.objectMode?1:Z.length)}B.ended=!0,B.sync?M(P):(B.needReadable=!1,B.emittedReadable||(B.emittedReadable=!0,x(P)))}}function M(P){var B=P._readableState;d("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(d("emitReadable",B.flowing),B.emittedReadable=!0,process.nextTick(x,P))}function x(P){var B=P._readableState;d("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&(B.length||B.ended)&&(P.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,U(P)}function L(P,B){B.readingMore||(B.readingMore=!0,process.nextTick(j,P,B))}function j(P,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){var Z=B.length;if(d("maybeReadMore read 0"),P.read(0),Z===B.length)break}B.readingMore=!1}J.prototype._read=function(P){A(this,new m("_read()"))},J.prototype.pipe=function(P,B){var Z=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=P;break;case 1:K.pipes=[K.pipes,P];break;default:K.pipes.push(P);break}K.pipesCount+=1,d("pipe count=%d opts=%j",K.pipesCount,B);var oe=(!B||B.end!==!1)&&P!==process.stdout&&P!==process.stderr,ie=oe?de:ve;K.endEmitted?process.nextTick(ie):Z.once("end",ie),P.on("unpipe",se);function se(k,v){d("onunpipe"),k===Z&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,ue())}function de(){d("onend"),P.end()}var He=T(Z);P.on("drain",He);var ge=!1;function ue(){d("cleanup"),P.removeListener("close",ye),P.removeListener("finish",$e),P.removeListener("drain",He),P.removeListener("error",pe),P.removeListener("unpipe",se),Z.removeListener("end",de),Z.removeListener("end",ve),Z.removeListener("data",me),ge=!0,K.awaitDrain&&(!P._writableState||P._writableState.needDrain)&&He()}Z.on("data",me);function me(k){d("ondata");var v=P.write(k);d("dest.write",v),v===!1&&((K.pipesCount===1&&K.pipes===P||K.pipesCount>1&&ne(K.pipes,P)!==-1)&&!ge&&(d("false write response, pause",K.awaitDrain),K.awaitDrain++),Z.pause())}function pe(k){d("onerror",k),ve(),P.removeListener("error",pe),t(P,"error")===0&&A(P,k)}F(P,"error",pe);function ye(){P.removeListener("finish",$e),ve()}P.once("close",ye);function $e(){d("onfinish"),P.removeListener("close",ye),ve()}P.once("finish",$e);function ve(){d("unpipe"),Z.unpipe(P)}return P.emit("pipe",Z),K.flowing||(d("pipe resume"),Z.resume()),P};function T(P){return function(){var Z=P._readableState;d("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(P,"data")&&(Z.flowing=!0,U(P))}}J.prototype.unpipe=function(P){var B=this._readableState,Z={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return P&&P!==B.pipes?this:(P||(P=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,P&&P.emit("unpipe",this,Z),this);if(!P){var K=B.pipes,oe=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var ie=0;ie<oe;ie++)K[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ne(B.pipes,P);return se===-1?this:(B.pipes.splice(se,1),B.pipesCount-=1,B.pipesCount===1&&(B.pipes=B.pipes[0]),P.emit("unpipe",this,Z),this)},J.prototype.on=function(P,B){var Z=r.prototype.on.call(this,P,B),K=this._readableState;return P==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):P==="readable"&&!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,d("on readable",K.length,K.reading),K.length?M(this):K.reading||process.nextTick(N,this)),Z},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(P,B){var Z=r.prototype.removeListener.call(this,P,B);return P==="readable"&&process.nextTick(E,this),Z},J.prototype.removeAllListeners=function(P){var B=r.prototype.removeAllListeners.apply(this,arguments);return(P==="readable"||P===void 0)&&process.nextTick(E,this),B};function E(P){var B=P._readableState;B.readableListening=P.listenerCount("readable")>0,B.resumeScheduled&&!B.paused?B.flowing=!0:P.listenerCount("data")>0&&P.resume()}function N(P){d("readable nexttick read 0"),P.read(0)}J.prototype.resume=function(){var P=this._readableState;return P.flowing||(d("resume"),P.flowing=!P.readableListening,te(this,P)),P.paused=!1,this};function te(P,B){B.resumeScheduled||(B.resumeScheduled=!0,process.nextTick(Y,P,B))}function Y(P,B){d("resume",B.reading),B.reading||P.read(0),B.resumeScheduled=!1,P.emit("resume"),U(P),B.flowing&&!B.reading&&P.read(0)}J.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(P){var B=P._readableState;for(d("flow",B.flowing);B.flowing&&P.read()!==null;);}J.prototype.wrap=function(P){var B=this,Z=this._readableState,K=!1;P.on("end",function(){if(d("wrapped end"),Z.decoder&&!Z.ended){var se=Z.decoder.end();se&&se.length&&B.push(se)}B.push(null)}),P.on("data",function(se){if(d("wrapped data"),Z.decoder&&(se=Z.decoder.write(se)),!(Z.objectMode&&se==null)&&!(!Z.objectMode&&(!se||!se.length))){var de=B.push(se);de||(K=!0,P.pause())}});for(var oe in P)this[oe]===void 0&&typeof P[oe]=="function"&&(this[oe]=(function(de){return function(){return P[de].apply(P,arguments)}})(oe));for(var ie=0;ie<D.length;ie++)P.on(D[ie],this.emit.bind(this,D[ie]));return this._read=function(se){d("wrapped _read",se),K&&(K=!1,P.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=Mg()),w(this)}),Object.defineProperty(J.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(J.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(J.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){this._readableState&&(this._readableState.flowing=B)}}),J._fromList=$,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $(P,B){if(B.length===0)return null;var Z;return B.objectMode?Z=B.buffer.shift():!P||P>=B.length?(B.decoder?Z=B.buffer.join(""):B.buffer.length===1?Z=B.buffer.first():Z=B.buffer.concat(B.length),B.buffer.clear()):Z=B.buffer.consume(P,B.decoder),Z}function G(P){var B=P._readableState;d("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,process.nextTick(X,B,P))}function X(P,B){if(d("endReadableNT",P.endEmitted,P.length),!P.endEmitted&&P.length===0&&(P.endEmitted=!0,B.readable=!1,B.emit("end"),P.autoDestroy)){var Z=B._writableState;(!Z||Z.autoDestroy&&Z.finished)&&B.destroy()}}typeof Symbol=="function"&&(J.from=function(P,B){return I===void 0&&(I=kg()),I(J,P,B)});function ne(P,B){for(var Z=0,K=P.length;Z<K;Z++)if(P[Z]===B)return Z;return-1}return Cs}var Ms,Ml;function Nd(){if(Ml)return Ms;Ml=1,Ms=a;var e=hr().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=e.ERR_TRANSFORM_WITH_LENGTH_0,i=cr();tt()(a,i);function o(p,s){var f=this._transformState;f.transforming=!1;var c=f.writecb;if(c===null)return this.emit("error",new r);f.writechunk=null,f.writecb=null,s!=null&&this.push(s),c(p);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function a(p){if(!(this instanceof a))return new a(p);i.call(this,p),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",d)}function d(){var p=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(s,f){u(p,s,f)}):u(this,null,null)}a.prototype.push=function(p,s){return this._transformState.needTransform=!1,i.prototype.push.call(this,p,s)},a.prototype._transform=function(p,s,f){f(new t("_transform()"))},a.prototype._write=function(p,s,f){var c=this._transformState;if(c.writecb=f,c.writechunk=p,c.writeencoding=s,!c.transforming){var g=this._readableState;(c.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},a.prototype._read=function(p){var s=this._transformState;s.writechunk!==null&&!s.transforming?(s.transforming=!0,this._transform(s.writechunk,s.writeencoding,s.afterTransform)):s.needTransform=!0},a.prototype._destroy=function(p,s){i.prototype._destroy.call(this,p,function(f){s(f)})};function u(p,s,f){if(s)return p.emit("error",s);if(f!=null&&p.push(f),p._writableState.length)throw new l;if(p._transformState.transforming)throw new n;return p.push(null)}return Ms}var ks,kl;function Ig(){if(kl)return ks;kl=1,ks=t;var e=Nd();tt()(t,e);function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return t.prototype._transform=function(r,n,l){l(null,r)},ks}var Is,Il;function xg(){if(Il)return Is;Il=1;var e;function t(f){var c=!1;return function(){c||(c=!0,f.apply(void 0,arguments))}}var r=hr().codes,n=r.ERR_MISSING_ARGS,l=r.ERR_STREAM_DESTROYED;function i(f){if(f)throw f}function o(f){return f.setHeader&&typeof f.abort=="function"}function a(f,c,g,_){_=t(_);var m=!1;f.on("close",function(){m=!0}),e===void 0&&(e=Ta()),e(f,{readable:c,writable:g},function(b){if(b)return _(b);m=!0,_()});var h=!1;return function(b){if(!m&&!h){if(h=!0,o(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();_(b||new l("pipe"))}}}function d(f){f()}function u(f,c){return f.pipe(c)}function p(f){return!f.length||typeof f[f.length-1]!="function"?i:f.pop()}function s(){for(var f=arguments.length,c=new Array(f),g=0;g<f;g++)c[g]=arguments[g];var _=p(c);if(Array.isArray(c[0])&&(c=c[0]),c.length<2)throw new n("streams");var m,h=c.map(function(b,w){var I=w<c.length-1,A=w>0;return a(b,I,A,function(D){m||(m=D),D&&h.forEach(d),!I&&(h.forEach(d),_(m))})});return c.reduce(u)}return Is=s,Is}var xl;function Od(){return xl||(xl=1,(function(e,t){t=e.exports=Ld(),t.Stream=t,t.Readable=t,t.Writable=Bd(),t.Duplex=cr(),t.Transform=Nd(),t.PassThrough=Ig(),t.finished=Ta(),t.pipeline=xg()})(Cn,Cn.exports)),Cn.exports}var xs,Al;function Ag(){if(Al)return xs;Al=1;const{Transform:e}=Od();return xs=t=>class Fd extends e{constructor(n,l,i,o,a){super(a),this._rate=n,this._capacity=l,this._delimitedSuffix=i,this._hashBitLength=o,this._options=a,this._state=new t,this._state.initialize(n,l),this._finalized=!1}_transform(n,l,i){let o=null;try{this.update(n,l)}catch(a){o=a}i(o)}_flush(n){let l=null;try{this.push(this.digest())}catch(i){l=i}n(l)}update(n,l){if(!Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(n)||(n=Buffer.from(n,l)),this._state.absorb(n),this}digest(n){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let l=this._state.squeeze(this._hashBitLength/8);return n!==void 0&&(l=l.toString(n)),this._resetState(),l}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Fd(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}},xs}var As,Tl;function Tg(){if(Tl)return As;Tl=1;const{Transform:e}=Od();return As=t=>class qd extends e{constructor(n,l,i,o){super(o),this._rate=n,this._capacity=l,this._delimitedSuffix=i,this._options=o,this._state=new t,this._state.initialize(n,l),this._finalized=!1}_transform(n,l,i){let o=null;try{this.update(n,l)}catch(a){o=a}i(o)}_flush(){}_read(n){this.push(this.squeeze(n))}update(n,l){if(!Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(n)||(n=Buffer.from(n,l)),this._state.absorb(n),this}squeeze(n,l){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(n);return l!==void 0&&(i=i.toString(l)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new qd(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}},As}var Ts,Pl;function Pg(){if(Pl)return Ts;Pl=1;const e=Ag(),t=Tg();return Ts=function(r){const n=e(r),l=t(r);return function(i,o){switch(typeof i=="string"?i.toLowerCase():i){case"keccak224":return new n(1152,448,null,224,o);case"keccak256":return new n(1088,512,null,256,o);case"keccak384":return new n(832,768,null,384,o);case"keccak512":return new n(576,1024,null,512,o);case"sha3-224":return new n(1152,448,6,224,o);case"sha3-256":return new n(1088,512,6,256,o);case"sha3-384":return new n(832,768,6,384,o);case"sha3-512":return new n(576,1024,6,512,o);case"shake128":return new l(1344,256,31,o);case"shake256":return new l(1088,512,31,o);default:throw new Error("Invald algorithm: "+i)}}},Ts}var Ps={},Bl;function Bg(){if(Bl)return Ps;Bl=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Ps.p1600=function(t){for(let r=0;r<24;++r){const n=t[0]^t[10]^t[20]^t[30]^t[40],l=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],o=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],d=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],p=t[7]^t[17]^t[27]^t[37]^t[47],s=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49];let c=s^(i<<1|o>>>31),g=f^(o<<1|i>>>31);const _=t[0]^c,m=t[1]^g,h=t[10]^c,b=t[11]^g,w=t[20]^c,I=t[21]^g,A=t[30]^c,D=t[31]^g,F=t[40]^c,W=t[41]^g;c=n^(a<<1|d>>>31),g=l^(d<<1|a>>>31);const J=t[2]^c,ee=t[3]^g,Q=t[12]^c,re=t[13]^g,q=t[22]^c,y=t[23]^g,S=t[32]^c,C=t[33]^g,M=t[42]^c,x=t[43]^g;c=i^(u<<1|p>>>31),g=o^(p<<1|u>>>31);const L=t[4]^c,j=t[5]^g,T=t[14]^c,E=t[15]^g,N=t[24]^c,te=t[25]^g,Y=t[34]^c,U=t[35]^g,$=t[44]^c,G=t[45]^g;c=a^(s<<1|f>>>31),g=d^(f<<1|s>>>31);const X=t[6]^c,ne=t[7]^g,P=t[16]^c,B=t[17]^g,Z=t[26]^c,K=t[27]^g,oe=t[36]^c,ie=t[37]^g,se=t[46]^c,de=t[47]^g;c=u^(n<<1|l>>>31),g=p^(l<<1|n>>>31);const He=t[8]^c,ge=t[9]^g,ue=t[18]^c,me=t[19]^g,pe=t[28]^c,ye=t[29]^g,$e=t[38]^c,ve=t[39]^g,k=t[48]^c,v=t[49]^g,R=_,O=m,H=b<<4|h>>>28,V=h<<4|b>>>28,z=w<<3|I>>>29,he=I<<3|w>>>29,fe=D<<9|A>>>23,le=A<<9|D>>>23,be=F<<18|W>>>14,ce=W<<18|F>>>14,Se=J<<1|ee>>>31,Xt=ee<<1|J>>>31,Re=re<<12|Q>>>20,Ce=Q<<12|re>>>20,er=q<<10|y>>>22,Me=y<<10|q>>>22,ke=C<<13|S>>>19,tr=S<<13|C>>>19,Ie=M<<2|x>>>30,xe=x<<2|M>>>30,rr=j<<30|L>>>2,Ae=L<<30|j>>>2,Te=T<<6|E>>>26,nr=E<<6|T>>>26,Pe=te<<11|N>>>21,Be=N<<11|te>>>21,ir=Y<<15|U>>>17,Le=U<<15|Y>>>17,Ne=G<<29|$>>>3,sr=$<<29|G>>>3,Oe=X<<28|ne>>>4,Fe=ne<<28|X>>>4,or=B<<23|P>>>9,qe=P<<23|B>>>9,De=Z<<25|K>>>7,dt=K<<25|Z>>>7,pt=oe<<21|ie>>>11,gt=ie<<21|oe>>>11,yt=de<<24|se>>>8,mt=se<<24|de>>>8,_t=He<<27|ge>>>5,vt=ge<<27|He>>>5,bt=ue<<20|me>>>12,wt=me<<20|ue>>>12,Et=ye<<7|pe>>>25,St=pe<<7|ye>>>25,Rt=$e<<8|ve>>>24,Ct=ve<<8|$e>>>24,Mt=k<<14|v>>>18,kt=v<<14|k>>>18;t[0]=R^~Re&Pe,t[1]=O^~Ce&Be,t[10]=Oe^~bt&z,t[11]=Fe^~wt&he,t[20]=Se^~Te&De,t[21]=Xt^~nr&dt,t[30]=_t^~H&er,t[31]=vt^~V&Me,t[40]=rr^~or&Et,t[41]=Ae^~qe&St,t[2]=Re^~Pe&pt,t[3]=Ce^~Be&gt,t[12]=bt^~z&ke,t[13]=wt^~he&tr,t[22]=Te^~De&Rt,t[23]=nr^~dt&Ct,t[32]=H^~er&ir,t[33]=V^~Me&Le,t[42]=or^~Et&fe,t[43]=qe^~St&le,t[4]=Pe^~pt&Mt,t[5]=Be^~gt&kt,t[14]=z^~ke&Ne,t[15]=he^~tr&sr,t[24]=De^~Rt&be,t[25]=dt^~Ct&ce,t[34]=er^~ir&yt,t[35]=Me^~Le&mt,t[44]=Et^~fe&Ie,t[45]=St^~le&xe,t[6]=pt^~Mt&R,t[7]=gt^~kt&O,t[16]=ke^~Ne&Oe,t[17]=tr^~sr&Fe,t[26]=Rt^~be&Se,t[27]=Ct^~ce&Xt,t[36]=ir^~yt&_t,t[37]=Le^~mt&vt,t[46]=fe^~Ie&rr,t[47]=le^~xe&Ae,t[8]=Mt^~R&Re,t[9]=kt^~O&Ce,t[18]=Ne^~Oe&bt,t[19]=sr^~Fe&wt,t[28]=be^~Se&Te,t[29]=ce^~Xt&nr,t[38]=yt^~_t&H,t[39]=mt^~vt&V,t[48]=Ie^~rr&or,t[49]=xe^~Ae&qe,t[0]^=e[r*2],t[1]^=e[r*2+1]}},Ps}var Bs,Ll;function Lg(){if(Ll)return Bs;Ll=1;const e=Bg();function t(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(r,n){for(let l=0;l<50;++l)this.state[l]=0;this.blockSize=r/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(r){for(let n=0;n<r.length;++n)this.state[~~(this.count/4)]^=r[n]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(r){this.state[~~(this.count/4)]^=r<<8*(this.count%4),(r&128)!==0&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(r){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(r);for(let l=0;l<r;++l)n[l]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(r){for(let n=0;n<50;++n)r.state[n]=this.state[n];r.blockSize=this.blockSize,r.count=this.count,r.squeezing=this.squeezing},Bs=t,Bs}var Ls,Nl;function Ng(){return Nl||(Nl=1,Ls=Pg()(Lg())),Ls}var Ns,Ol;function Dd(){if(Ol)return Ns;Ol=1;const e=Ng(),t=qn();function r(s){return Buffer.allocUnsafe(s).fill(0)}function n(s,f,c){const g=r(f);return s=i(s),c?s.length<f?(s.copy(g),g):s.slice(0,f):s.length<f?(s.copy(g,f-s.length),g):s.slice(-f)}function l(s,f){return n(s,f,!0)}function i(s){if(!Buffer.isBuffer(s))if(Array.isArray(s))s=Buffer.from(s);else if(typeof s=="string")u(s)?s=Buffer.from(d(p(s)),"hex"):s=Buffer.from(s);else if(typeof s=="number")s=intToBuffer(s);else if(s==null)s=Buffer.allocUnsafe(0);else if(t.isBN(s))s=s.toArrayLike(Buffer);else if(s.toArray)s=Buffer.from(s.toArray());else throw new Error("invalid type");return s}function o(s){return s=i(s),"0x"+s.toString("hex")}function a(s,f){return s=i(s),f||(f=256),e("keccak"+f).update(s).digest()}function d(s){return s.length%2?"0"+s:s}function u(s){return typeof s=="string"&&s.match(/^0x[0-9A-Fa-f]*$/)}function p(s){return typeof s=="string"&&s.startsWith("0x")?s.slice(2):s}return Ns={zeros:r,setLength:n,setLengthRight:l,isHexString:u,stripHexPrefix:p,toBuffer:i,bufferToHex:o,keccak:a},Ns}var Os,Fl;function Og(){if(Fl)return Os;Fl=1;const e=Dd(),t=qn();function r(c){return c.startsWith("int[")?"int256"+c.slice(3):c==="int"?"int256":c.startsWith("uint[")?"uint256"+c.slice(4):c==="uint"?"uint256":c.startsWith("fixed[")?"fixed128x128"+c.slice(5):c==="fixed"?"fixed128x128":c.startsWith("ufixed[")?"ufixed128x128"+c.slice(6):c==="ufixed"?"ufixed128x128":c}function n(c){return parseInt(/^\D+(\d+)$/.exec(c)[1],10)}function l(c){var g=/^\D+(\d+)x(\d+)$/.exec(c);return[parseInt(g[1],10),parseInt(g[2],10)]}function i(c){var g=c.match(/(.*)\[(.*?)\]$/);return g?g[2]===""?"dynamic":parseInt(g[2],10):null}function o(c){var g=typeof c;if(g==="string")return e.isHexString(c)?new t(e.stripHexPrefix(c),16):new t(c,10);if(g==="number")return new t(c);if(c.toArray)return c;throw new Error("Argument is not a number")}function a(c,g){var _,m,h,b;if(c==="address")return a("uint160",o(g));if(c==="bool")return a("uint8",g?1:0);if(c==="string")return a("bytes",new Buffer(g,"utf8"));if(u(c)){if(typeof g.length>"u")throw new Error("Not an array?");if(_=i(c),_!=="dynamic"&&_!==0&&g.length>_)throw new Error("Elements exceed array size: "+_);h=[],c=c.slice(0,c.lastIndexOf("[")),typeof g=="string"&&(g=JSON.parse(g));for(b in g)h.push(a(c,g[b]));if(_==="dynamic"){var w=a("uint256",g.length);h.unshift(w)}return Buffer.concat(h)}else{if(c==="bytes")return g=new Buffer(g),h=Buffer.concat([a("uint256",g.length),g]),g.length%32!==0&&(h=Buffer.concat([h,e.zeros(32-g.length%32)])),h;if(c.startsWith("bytes")){if(_=n(c),_<1||_>32)throw new Error("Invalid bytes<N> width: "+_);return e.setLengthRight(g,32)}else if(c.startsWith("uint")){if(_=n(c),_%8||_<8||_>256)throw new Error("Invalid uint<N> width: "+_);if(m=o(g),m.bitLength()>_)throw new Error("Supplied uint exceeds width: "+_+" vs "+m.bitLength());if(m<0)throw new Error("Supplied uint is negative");return m.toArrayLike(Buffer,"be",32)}else if(c.startsWith("int")){if(_=n(c),_%8||_<8||_>256)throw new Error("Invalid int<N> width: "+_);if(m=o(g),m.bitLength()>_)throw new Error("Supplied int exceeds width: "+_+" vs "+m.bitLength());return m.toTwos(256).toArrayLike(Buffer,"be",32)}else if(c.startsWith("ufixed")){if(_=l(c),m=o(g),m<0)throw new Error("Supplied ufixed is negative");return a("uint256",m.mul(new t(2).pow(new t(_[1]))))}else if(c.startsWith("fixed"))return _=l(c),a("int256",o(g).mul(new t(2).pow(new t(_[1]))))}throw new Error("Unsupported or invalid type: "+c)}function d(c){return c==="string"||c==="bytes"||i(c)==="dynamic"}function u(c){return c.lastIndexOf("]")===c.length-1}function p(c,g){var _=[],m=[],h=32*c.length;for(var b in c){var w=r(c[b]),I=g[b],A=a(w,I);d(w)?(_.push(a("uint256",h)),m.push(A),h+=A.length):_.push(A)}return Buffer.concat(_.concat(m))}function s(c,g){if(c.length!==g.length)throw new Error("Number of types are not matching the values");for(var _,m,h=[],b=0;b<c.length;b++){var w=r(c[b]),I=g[b];if(w==="bytes")h.push(I);else if(w==="string")h.push(new Buffer(I,"utf8"));else if(w==="bool")h.push(new Buffer(I?"01":"00","hex"));else if(w==="address")h.push(e.setLength(I,20));else if(w.startsWith("bytes")){if(_=n(w),_<1||_>32)throw new Error("Invalid bytes<N> width: "+_);h.push(e.setLengthRight(I,_))}else if(w.startsWith("uint")){if(_=n(w),_%8||_<8||_>256)throw new Error("Invalid uint<N> width: "+_);if(m=o(I),m.bitLength()>_)throw new Error("Supplied uint exceeds width: "+_+" vs "+m.bitLength());h.push(m.toArrayLike(Buffer,"be",_/8))}else if(w.startsWith("int")){if(_=n(w),_%8||_<8||_>256)throw new Error("Invalid int<N> width: "+_);if(m=o(I),m.bitLength()>_)throw new Error("Supplied int exceeds width: "+_+" vs "+m.bitLength());h.push(m.toTwos(_).toArrayLike(Buffer,"be",_/8))}else throw new Error("Unsupported or invalid type: "+w)}return Buffer.concat(h)}function f(c,g){return e.keccak(s(c,g))}return Os={rawEncode:p,solidityPack:s,soliditySHA3:f},Os}var Fs,ql;function Fg(){if(ql)return Fs;ql=1;const e=Dd(),t=Og(),r={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},n={encodeData(i,o,a,d=!0){const u=["bytes32"],p=[this.hashType(i,a)];if(d){const s=(f,c,g)=>{if(a[c]!==void 0)return["bytes32",g==null?"0x0000000000000000000000000000000000000000000000000000000000000000":e.keccak(this.encodeData(c,g,a,d))];if(g===void 0)throw new Error(`missing value for field ${f} of type ${c}`);if(c==="bytes")return["bytes32",e.keccak(g)];if(c==="string")return typeof g=="string"&&(g=Buffer.from(g,"utf8")),["bytes32",e.keccak(g)];if(c.lastIndexOf("]")===c.length-1){const _=c.slice(0,c.lastIndexOf("[")),m=g.map(h=>s(f,_,h));return["bytes32",e.keccak(t.rawEncode(m.map(([h])=>h),m.map(([,h])=>h)))]}return[c,g]};for(const f of a[i]){const[c,g]=s(f.name,f.type,o[f.name]);u.push(c),p.push(g)}}else for(const s of a[i]){let f=o[s.name];if(f!==void 0)if(s.type==="bytes")u.push("bytes32"),f=e.keccak(f),p.push(f);else if(s.type==="string")u.push("bytes32"),typeof f=="string"&&(f=Buffer.from(f,"utf8")),f=e.keccak(f),p.push(f);else if(a[s.type]!==void 0)u.push("bytes32"),f=e.keccak(this.encodeData(s.type,f,a,d)),p.push(f);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");u.push(s.type),p.push(f)}}return t.rawEncode(u,p)},encodeType(i,o){let a="",d=this.findTypeDependencies(i,o).filter(u=>u!==i);d=[i].concat(d.sort());for(const u of d){if(!o[u])throw new Error("No type definition specified: "+u);a+=u+"("+o[u].map(({name:s,type:f})=>f+" "+s).join(",")+")"}return a},findTypeDependencies(i,o,a=[]){if(i=i.match(/^\w*/)[0],a.includes(i)||o[i]===void 0)return a;a.push(i);for(const d of o[i])for(const u of this.findTypeDependencies(d.type,o,a))!a.includes(u)&&a.push(u);return a},hashStruct(i,o,a,d=!0){return e.keccak(this.encodeData(i,o,a,d))},hashType(i,o){return e.keccak(this.encodeType(i,o))},sanitizeData(i){const o={};for(const a in r.properties)i[a]&&(o[a]=i[a]);return o.types&&(o.types=Object.assign({EIP712Domain:[]},o.types)),o},hash(i,o=!0){const a=this.sanitizeData(i),d=[Buffer.from("1901","hex")];return d.push(this.hashStruct("EIP712Domain",a.domain,a.types,o)),a.primaryType!=="EIP712Domain"&&d.push(this.hashStruct(a.primaryType,a.message,a.types,o)),e.keccak(Buffer.concat(d))}};Fs={TYPED_MESSAGE_SCHEMA:r,TypedDataUtils:n,hashForSignTypedDataLegacy:function(i){return l(i.data)},hashForSignTypedData_v3:function(i){return n.hash(i.data,!1)},hashForSignTypedData_v4:function(i){return n.hash(i.data)}};function l(i){const o=new Error("Expect argument to be non-empty array");if(typeof i!="object"||!i.length)throw o;const a=i.map(function(p){return p.type==="bytes"?e.toBuffer(p.value):p.value}),d=i.map(function(p){return p.type}),u=i.map(function(p){if(!p.name)throw o;return p.type+" "+p.name});return t.soliditySHA3(["bytes32","bytes32"],[t.soliditySHA3(new Array(i.length).fill("string"),u),t.soliditySHA3(d,a)])}return Fs}var qt={},Dl;function qg(){if(Dl)return qt;Dl=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.filterFromParam=qt.FilterPolyfill=void 0;const e=Un(),t=ut(),r=300*1e3,n={jsonrpc:"2.0",id:0};let l=class{constructor(f){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,e.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=f}async newFilter(f){const c=i(f),g=this.makeFilterId(),_=await this.setInitialCursorPosition(g,c.fromBlock);return console.info(`Installing new log filter(${g}):`,c,"initial cursor position:",_),this.logFilters.set(g,c),this.setFilterTimeout(g),(0,t.hexStringFromIntNumber)(g)}async newBlockFilter(){const f=this.makeFilterId(),c=await this.setInitialCursorPosition(f,"latest");return console.info(`Installing new block filter (${f}) with initial cursor position:`,c),this.blockFilters.add(f),this.setFilterTimeout(f),(0,t.hexStringFromIntNumber)(f)}async newPendingTransactionFilter(){const f=this.makeFilterId(),c=await this.setInitialCursorPosition(f,"latest");return console.info(`Installing new block filter (${f}) with initial cursor position:`,c),this.pendingTransactionFilters.add(f),this.setFilterTimeout(f),(0,t.hexStringFromIntNumber)(f)}uninstallFilter(f){const c=(0,t.intNumberFromHexString)(f);return console.info(`Uninstalling filter (${c})`),this.deleteFilter(c),!0}getFilterChanges(f){const c=(0,t.intNumberFromHexString)(f);return this.timeouts.has(c)&&this.setFilterTimeout(c),this.logFilters.has(c)?this.getLogFilterChanges(c):this.blockFilters.has(c)?this.getBlockFilterChanges(c):this.pendingTransactionFilters.has(c)?this.getPendingTransactionFilterChanges(c):Promise.resolve(u())}async getFilterLogs(f){const c=(0,t.intNumberFromHexString)(f),g=this.logFilters.get(c);return g?this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getLogs",params:[o(g)]})):u()}makeFilterId(){return(0,e.IntNumber)(++this.nextFilterId)}sendAsyncPromise(f){return new Promise((c,g)=>{this.provider.sendAsync(f,(_,m)=>{if(_)return g(_);if(Array.isArray(m)||m==null)return g(new Error(`unexpected response received: ${JSON.stringify(m)}`));c(m)})})}deleteFilter(f){console.info(`Deleting filter (${f})`),this.logFilters.delete(f),this.blockFilters.delete(f),this.pendingTransactionFilters.delete(f),this.cursors.delete(f),this.timeouts.delete(f)}async getLogFilterChanges(f){const c=this.logFilters.get(f),g=this.cursors.get(f);if(!g||!c)return u();const _=await this.getCurrentBlockHeight(),m=c.toBlock==="latest"?_:c.toBlock;if(g>_||g>Number(c.toBlock))return p();console.info(`Fetching logs from ${g} to ${m} for filter ${f}`);const h=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getLogs",params:[o(Object.assign(Object.assign({},c),{fromBlock:g,toBlock:m}))]}));if(Array.isArray(h.result)){const b=h.result.map(I=>(0,t.intNumberFromHexString)(I.blockNumber||"0x0")),w=Math.max(...b);if(w&&w>g){const I=(0,e.IntNumber)(w+1);console.info(`Moving cursor position for filter (${f}) from ${g} to ${I}`),this.cursors.set(f,I)}}return h}async getBlockFilterChanges(f){const c=this.cursors.get(f);if(!c)return u();const g=await this.getCurrentBlockHeight();if(c>g)return p();console.info(`Fetching blocks from ${c} to ${g} for filter (${f})`);const _=(await Promise.all((0,t.range)(c,g+1).map(h=>this.getBlockHashByNumber((0,e.IntNumber)(h))))).filter(h=>!!h),m=(0,e.IntNumber)(c+_.length);return console.info(`Moving cursor position for filter (${f}) from ${c} to ${m}`),this.cursors.set(f,m),Object.assign(Object.assign({},n),{result:_})}async getPendingTransactionFilterChanges(f){return Promise.resolve(p())}async setInitialCursorPosition(f,c){const g=await this.getCurrentBlockHeight(),_=typeof c=="number"&&c>g?c:g;return this.cursors.set(f,_),_}setFilterTimeout(f){const c=this.timeouts.get(f);c&&window.clearTimeout(c);const g=window.setTimeout(()=>{console.info(`Filter (${f}) timed out`),this.deleteFilter(f)},r);this.timeouts.set(f,g)}async getCurrentBlockHeight(){const f=new Date;if(f.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=f;const c=await this._getCurrentBlockHeight();this.currentBlockHeight=c,this.resolvers.forEach(g=>g(c)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(c=>this.resolvers.push(c))}async _getCurrentBlockHeight(){const{result:f}=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_blockNumber",params:[]}));return(0,t.intNumberFromHexString)((0,t.ensureHexString)(f))}async getBlockHashByNumber(f){const c=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getBlockByNumber",params:[(0,t.hexStringFromIntNumber)(f),!1]}));return c.result&&typeof c.result.hash=="string"?(0,t.ensureHexString)(c.result.hash):null}};qt.FilterPolyfill=l;function i(s){return{fromBlock:a(s.fromBlock),toBlock:a(s.toBlock),addresses:s.address===void 0?null:Array.isArray(s.address)?s.address:[s.address],topics:s.topics||[]}}qt.filterFromParam=i;function o(s){const f={fromBlock:d(s.fromBlock),toBlock:d(s.toBlock),topics:s.topics};return s.addresses!==null&&(f.address=s.addresses),f}function a(s){if(s===void 0||s==="latest"||s==="pending")return"latest";if(s==="earliest")return(0,e.IntNumber)(0);if((0,t.isHexString)(s))return(0,t.intNumberFromHexString)(s);throw new Error(`Invalid block option: ${String(s)}`)}function d(s){return s==="latest"?s:(0,t.hexStringFromIntNumber)(s)}function u(){return Object.assign(Object.assign({},n),{error:{code:-32e3,message:"filter not found"}})}function p(){return Object.assign(Object.assign({},n),{result:[]})}return qt}var Ur={},Dt={},jt={},qs,jl;function Pa(){if(jl)return qs;jl=1,qs=e;function e(t){t=t||{};var r=t.max||Number.MAX_SAFE_INTEGER,n=typeof t.start<"u"?t.start:Math.floor(Math.random()*r);return function(){return n=n%r,n++}}return qs}var Ds,Ul;function Dg(){if(Ul)return Ds;Ul=1;const e=(t,r)=>function(){const n=r.promiseModule,l=new Array(arguments.length);for(let i=0;i<arguments.length;i++)l[i]=arguments[i];return new n((i,o)=>{r.errorFirst?l.push(function(a,d){if(r.multiArgs){const u=new Array(arguments.length-1);for(let p=1;p<arguments.length;p++)u[p-1]=arguments[p];a?(u.unshift(a),o(u)):i(u)}else a?o(a):i(d)}):l.push(function(a){if(r.multiArgs){const d=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)d[u]=arguments[u];i(d)}else i(a)}),t.apply(this,l)})};return Ds=(t,r)=>{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=i=>{const o=a=>typeof a=="string"?i===a:a.test(i);return r.include?r.include.some(o):!r.exclude.some(o)};let l;typeof t=="function"?l=function(){return r.excludeMain?t.apply(this,arguments):e(t,r).apply(this,arguments)}:l=Object.create(Object.getPrototypeOf(t));for(const i in t){const o=t[i];l[i]=typeof o=="function"&&n(i)?e(o,r):o}return l},Ds}var Ut={},Mn={},Hl;function Ba(){if(Hl)return Mn;Hl=1,Object.defineProperty(Mn,"__esModule",{value:!0});const e=Fn();function t(l,i,o){try{Reflect.apply(l,i,o)}catch(a){setTimeout(()=>{throw a})}}function r(l){const i=l.length,o=new Array(i);for(let a=0;a<i;a+=1)o[a]=l[a];return o}class n extends e.EventEmitter{emit(i,...o){let a=i==="error";const d=this._events;if(d!==void 0)a=a&&d.error===void 0;else if(!a)return!1;if(a){let p;if(o.length>0&&([p]=o),p instanceof Error)throw p;const s=new Error(`Unhandled error.${p?` (${p.message})`:""}`);throw s.context=p,s}const u=d[i];if(u===void 0)return!1;if(typeof u=="function")t(u,this,o);else{const p=u.length,s=r(u);for(let f=0;f<p;f+=1)t(s[f],this,o)}return!0}}return Mn.default=n,Mn}var Wl;function jd(){if(Wl)return Ut;Wl=1;var e=Ut&&Ut.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.BaseBlockTracker=void 0;const t=e(Ba()),r=1e3,n=(a,d)=>a+d,l=["sync","latest"];let i=class extends t.default{constructor(d){super(),this._blockResetDuration=d.blockResetDuration||20*r,this._usePastBlocks=d.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(u=>this.once("latest",u))}removeAllListeners(d){return d?super.removeAllListeners(d):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(d){l.includes(d)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return l.map(d=>this.listenerCount(d)).reduce(n)}_shouldUseNewBlock(d){const u=this._currentBlock;if(!u)return!0;const p=o(d),s=o(u);return this._usePastBlocks&&p<s||p>s}_newPotentialLatest(d){this._shouldUseNewBlock(d)&&this._setCurrentBlock(d)}_setCurrentBlock(d){const u=this._currentBlock;this._currentBlock=d,this.emit("latest",d),this.emit("sync",{oldBlock:u,newBlock:d})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};Ut.BaseBlockTracker=i;function o(a){return Number.parseInt(a,16)}return Ut}var js={},Ht={},Qe={};class Ud extends TypeError{constructor(t,r){let n;const{message:l,explanation:i,...o}=t,{path:a}=t,d=a.length===0?l:`At path: ${a.join(".")} -- ${l}`;super(i??d),i!=null&&(this.cause=d),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function jg(e){return Ze(e)&&typeof e[Symbol.iterator]=="function"}function Ze(e){return typeof e=="object"&&e!=null}function $l(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function We(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Ug(e){const{done:t,value:r}=e.next();return t?void 0:r}function Hg(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:l,branch:i}=t,{type:o}=r,{refinement:a,message:d=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${We(n)}\``}=e;return{value:n,type:o,refinement:a,key:l[l.length-1],path:l,branch:i,...e,message:d}}function*fa(e,t,r,n){jg(e)||(e=[e]);for(const l of e){const i=Hg(l,t,r,n);i&&(yield i)}}function*La(e,t,r={}){const{path:n=[],branch:l=[e],coerce:i=!1,mask:o=!1}=r,a={path:n,branch:l};if(i&&(e=t.coercer(e,a),o&&t.type!=="type"&&Ze(t.schema)&&Ze(e)&&!Array.isArray(e)))for(const u in e)t.schema[u]===void 0&&delete e[u];let d="valid";for(const u of t.validator(e,a))u.explanation=r.message,d="not_valid",yield[u,void 0];for(let[u,p,s]of t.entries(e,a)){const f=La(p,s,{path:u===void 0?n:[...n,u],branch:u===void 0?l:[...l,p],coerce:i,mask:o,message:r.message});for(const c of f)c[0]?(d=c[0].refinement!=null?"not_refined":"not_valid",yield[c[0],void 0]):i&&(p=c[1],u===void 0?e=p:e instanceof Map?e.set(u,p):e instanceof Set?e.add(p):Ze(e)&&(p!==void 0||u in e)&&(e[u]=p))}if(d!=="not_valid")for(const u of t.refiner(e,a))u.explanation=r.message,d="not_refined",yield[u,void 0];d==="valid"&&(yield[void 0,e])}class Ue{constructor(t){const{type:r,schema:n,validator:l,refiner:i,coercer:o=d=>d,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,l?this.validator=(d,u)=>{const p=l(d,u);return fa(p,u,this,d)}:this.validator=()=>[],i?this.refiner=(d,u)=>{const p=i(d,u);return fa(p,u,this,d)}:this.refiner=()=>[]}assert(t,r){return Hd(t,this,r)}create(t,r){return Wd(t,this,r)}is(t){return Na(t,this)}mask(t,r){return $d(t,this,r)}validate(t,r={}){return dr(t,this,r)}}function Hd(e,t,r){const n=dr(e,t,{message:r});if(n[0])throw n[0]}function Wd(e,t,r){const n=dr(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function $d(e,t,r){const n=dr(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Na(e,t){return!dr(e,t)[0]}function dr(e,t,r={}){const n=La(e,t,r),l=Ug(n);return l[0]?[new Ud(l[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,l[1]]}function Wg(...e){const t=e[0].type==="type",r=e.map(l=>l.schema),n=Object.assign({},...r);return t?fn(n):ln(n)}function Je(e,t){return new Ue({type:e,schema:null,validator:t})}function $g(e,t){return new Ue({...e,refiner:(r,n)=>r===void 0||e.refiner(r,n),validator(r,n){return r===void 0?!0:(t(r,n),e.validator(r,n))}})}function Vg(e){return new Ue({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function zg(e){let t;return new Ue({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator(r,n){return t??(t=e()),t.validator(r,n)},coercer(r,n){return t??(t=e()),t.coercer(r,n)},refiner(r,n){return t??(t=e()),t.refiner(r,n)}})}function Gg(e,t){const{schema:r}=e,n={...r};for(const l of t)delete n[l];return e.type==="type"?fn(n):ln(n)}function Jg(e){const t=e instanceof Ue,r=t?{...e.schema}:{...e};for(const n in r)r[n]=Vd(r[n]);return t&&e.type==="type"?fn(r):ln(r)}function Zg(e,t){const{schema:r}=e,n={};for(const l of t)n[l]=r[l];return e.type==="type"?fn(n):ln(n)}function Kg(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Je(e,t)}function Qg(){return Je("any",()=>!0)}function Yg(e){return new Ue({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${We(t)}`}})}function Xg(){return Je("bigint",e=>typeof e=="bigint")}function e1(){return Je("boolean",e=>typeof e=="boolean")}function t1(){return Je("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${We(e)}`)}function r1(e){const t={},r=e.map(n=>We(n)).join();for(const n of e)t[n]=n;return new Ue({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${We(n)}`}})}function n1(){return Je("func",e=>typeof e=="function"||`Expected a function, but received: ${We(e)}`)}function i1(e){return Je("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${We(t)}`)}function s1(){return Je("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${We(e)}`)}function o1(e){return new Ue({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function a1(e){const t=We(e),r=typeof e;return new Ue({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${We(n)}`}})}function u1(e,t){return new Ue({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,l]of r.entries())yield[n,n,e],yield[n,l,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${We(r)}`}})}function Oa(){return Je("never",()=>!1)}function c1(e){return new Ue({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function l1(){return Je("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${We(e)}`)}function ln(e){const t=e?Object.keys(e):[],r=Oa();return new Ue({type:"object",schema:e||null,*entries(n){if(e&&Ze(n)){const l=new Set(Object.keys(n));for(const i of t)l.delete(i),yield[i,n[i],e[i]];for(const i of l)yield[i,n[i],r]}},validator(n){return Ze(n)||`Expected an object, but received: ${We(n)}`},coercer(n){return Ze(n)?{...n}:n}})}function Vd(e){return new Ue({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function f1(e,t){return new Ue({type:"record",schema:null,*entries(r){if(Ze(r))for(const n in r){const l=r[n];yield[n,n,e],yield[n,l,t]}},validator(r){return Ze(r)||`Expected an object, but received: ${We(r)}`}})}function h1(){return Je("regexp",e=>e instanceof RegExp)}function d1(e){return new Ue({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${We(t)}`}})}function zd(){return Je("string",e=>typeof e=="string"||`Expected a string, but received: ${We(e)}`)}function p1(e){const t=Oa();return new Ue({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let l=0;l<n;l++)yield[l,r[l],e[l]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${We(r)}`}})}function fn(e){const t=Object.keys(e);return new Ue({type:"type",schema:e,*entries(r){if(Ze(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return Ze(r)||`Expected an object, but received: ${We(r)}`},coercer(r){return Ze(r)?{...r}:r}})}function g1(e){const t=e.map(r=>r.type).join(" | ");return new Ue({type:"union",schema:null,coercer(r){for(const n of e){const[l,i]=n.validate(r,{coerce:!0});if(!l)return i}return r},validator(r,n){const l=[];for(const i of e){const[...o]=La(r,i,n),[a]=o;if(a[0])for(const[d]of o)d&&l.push(d);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${We(r)}`,...l]}})}function Gd(){return Je("unknown",()=>!0)}function Fa(e,t,r){return new Ue({...e,coercer:(n,l)=>Na(n,t)?e.coercer(r(n,l),l):e.coercer(n,l)})}function y1(e,t,r={}){return Fa(e,Gd(),n=>{const l=typeof t=="function"?t():t;if(n===void 0)return l;if(!r.strict&&$l(n)&&$l(l)){const i={...n};let o=!1;for(const a in l)i[a]===void 0&&(i[a]=l[a],o=!0);if(o)return i}return n})}function m1(e){return Fa(e,zd(),t=>t.trim())}function _1(e){return Qt(e,"empty",t=>{const r=Jd(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function Jd(e){return e instanceof Map||e instanceof Set?e.size:e.length}function v1(e,t,r={}){const{exclusive:n}=r;return Qt(e,"max",l=>n?l<t:l<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${l}\``)}function b1(e,t,r={}){const{exclusive:n}=r;return Qt(e,"min",l=>n?l>t:l>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${l}\``)}function w1(e){return Qt(e,"nonempty",t=>Jd(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function E1(e,t){return Qt(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function S1(e,t,r=t){const n=`Expected a ${e.type}`,l=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Qt(e,"size",i=>{if(typeof i=="number"||i instanceof Date)return t<=i&&i<=r||`${n} ${l} but received \`${i}\``;if(i instanceof Map||i instanceof Set){const{size:o}=i;return t<=o&&o<=r||`${n} with a size ${l} but received one with a size of \`${o}\``}else{const{length:o}=i;return t<=o&&o<=r||`${n} with a length ${l} but received one with a length of \`${o}\``}})}function Qt(e,t,r){return new Ue({...e,*refiner(n,l){yield*e.refiner(n,l);const i=r(n,l),o=fa(i,l,e,n);for(const a of o)yield{...a,refinement:t}}})}const R1=Object.freeze(Object.defineProperty({__proto__:null,Struct:Ue,StructError:Ud,any:Qg,array:Yg,assert:Hd,assign:Wg,bigint:Xg,boolean:e1,coerce:Fa,create:Wd,date:t1,defaulted:y1,define:Je,deprecated:$g,dynamic:Vg,empty:_1,enums:r1,func:n1,instance:i1,integer:s1,intersection:o1,is:Na,lazy:zg,literal:a1,map:u1,mask:$d,max:v1,min:b1,never:Oa,nonempty:w1,nullable:c1,number:l1,object:ln,omit:Gg,optional:Vd,partial:Jg,pattern:E1,pick:Zg,record:f1,refine:Qt,regexp:h1,set:d1,size:S1,string:zd,struct:Kg,trimmed:m1,tuple:p1,type:fn,union:g1,unknown:Gd,validate:dr},Symbol.toStringTag,{value:"Module"})),Yt=tn(R1);var Vl;function ht(){if(Vl)return Qe;Vl=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.assertExhaustive=Qe.assertStruct=Qe.assert=Qe.AssertionError=void 0;const e=Yt;function t(u){return typeof u=="object"&&u!==null&&"message"in u}function r(u){var p,s;return typeof((s=(p=u?.prototype)===null||p===void 0?void 0:p.constructor)===null||s===void 0?void 0:s.name)=="string"}function n(u){const p=t(u)?u.message:String(u);return p.endsWith(".")?p.slice(0,-1):p}function l(u,p){return r(u)?new u({message:p}):u({message:p})}class i extends Error{constructor(p){super(p.message),this.code="ERR_ASSERTION"}}Qe.AssertionError=i;function o(u,p="Assertion failed.",s=i){if(!u)throw p instanceof Error?p:l(s,p)}Qe.assert=o;function a(u,p,s="Assertion failed",f=i){try{(0,e.assert)(u,p)}catch(c){throw l(f,`${s}: ${n(c)}.`)}}Qe.assertStruct=a;function d(u){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Qe.assertExhaustive=d,Qe}var Hr={},zl;function Zd(){if(zl)return Hr;zl=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.base64=void 0;const e=Yt,t=ht(),r=(n,l={})=>{var i,o;const a=(i=l.paddingRequired)!==null&&i!==void 0?i:!1,d=(o=l.characterSet)!==null&&o!==void 0?o:"base64";let u;d==="base64"?u=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(d==="base64url"),u=String.raw`[-_A-Za-z0-9]`);let p;return a?p=new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):p=new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,e.pattern)(n,p)};return Hr.base64=r,Hr}var _e={},Us={},Gl;function Vn(){return Gl||(Gl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Yt,r=ht();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function n(u){return(0,t.is)(u,e.HexStruct)}e.isHexString=n;function l(u){return(0,t.is)(u,e.StrictHexStruct)}e.isStrictHexString=l;function i(u){(0,r.assert)(n(u),"Value must be a hexadecimal string.")}e.assertIsHexString=i;function o(u){(0,r.assert)(l(u),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function a(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}e.add0x=a;function d(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}e.remove0x=d})(Us)),Us}var Jl;function Kd(){if(Jl)return _e;Jl=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.createDataView=_e.concatBytes=_e.valueToBytes=_e.stringToBytes=_e.numberToBytes=_e.signedBigIntToBytes=_e.bigIntToBytes=_e.hexToBytes=_e.bytesToString=_e.bytesToNumber=_e.bytesToSignedBigInt=_e.bytesToBigInt=_e.bytesToHex=_e.assertIsBytes=_e.isBytes=void 0;const e=ht(),t=Vn(),r=48,n=58,l=87;function i(){const F=[];return()=>{if(F.length===0)for(let W=0;W<256;W++)F.push(W.toString(16).padStart(2,"0"));return F}}const o=i();function a(F){return F instanceof Uint8Array}_e.isBytes=a;function d(F){(0,e.assert)(a(F),"Value must be a Uint8Array.")}_e.assertIsBytes=d;function u(F){if(d(F),F.length===0)return"0x";const W=o(),J=new Array(F.length);for(let ee=0;ee<F.length;ee++)J[ee]=W[F[ee]];return(0,t.add0x)(J.join(""))}_e.bytesToHex=u;function p(F){d(F);const W=u(F);return BigInt(W)}_e.bytesToBigInt=p;function s(F){d(F);let W=BigInt(0);for(const J of F)W=(W<<BigInt(8))+BigInt(J);return BigInt.asIntN(F.length*8,W)}_e.bytesToSignedBigInt=s;function f(F){d(F);const W=p(F);return(0,e.assert)(W<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(W)}_e.bytesToNumber=f;function c(F){return d(F),new TextDecoder().decode(F)}_e.bytesToString=c;function g(F){var W;if(((W=F?.toLowerCase)===null||W===void 0?void 0:W.call(F))==="0x")return new Uint8Array;(0,t.assertIsHexString)(F);const J=(0,t.remove0x)(F).toLowerCase(),ee=J.length%2===0?J:`0${J}`,Q=new Uint8Array(ee.length/2);for(let re=0;re<Q.length;re++){const q=ee.charCodeAt(re*2),y=ee.charCodeAt(re*2+1),S=q-(q<n?r:l),C=y-(y<n?r:l);Q[re]=S*16+C}return Q}_e.hexToBytes=g;function _(F){(0,e.assert)(typeof F=="bigint","Value must be a bigint."),(0,e.assert)(F>=BigInt(0),"Value must be a non-negative bigint.");const W=F.toString(16);return g(W)}_e.bigIntToBytes=_;function m(F,W){(0,e.assert)(W>0);const J=F>>BigInt(31);return!((~F&J)+(F&~J)>>BigInt(W*8+-1))}function h(F,W){(0,e.assert)(typeof F=="bigint","Value must be a bigint."),(0,e.assert)(typeof W=="number","Byte length must be a number."),(0,e.assert)(W>0,"Byte length must be greater than 0."),(0,e.assert)(m(F,W),"Byte length is too small to represent the given value.");let J=F;const ee=new Uint8Array(W);for(let Q=0;Q<ee.length;Q++)ee[Q]=Number(BigInt.asUintN(8,J)),J>>=BigInt(8);return ee.reverse()}_e.signedBigIntToBytes=h;function b(F){(0,e.assert)(typeof F=="number","Value must be a number."),(0,e.assert)(F>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(F),"Value is not a safe integer. Use `bigIntToBytes` instead.");const W=F.toString(16);return g(W)}_e.numberToBytes=b;function w(F){return(0,e.assert)(typeof F=="string","Value must be a string."),new TextEncoder().encode(F)}_e.stringToBytes=w;function I(F){if(typeof F=="bigint")return _(F);if(typeof F=="number")return b(F);if(typeof F=="string")return F.startsWith("0x")?g(F):w(F);if(a(F))return F;throw new TypeError(`Unsupported value type: "${typeof F}".`)}_e.valueToBytes=I;function A(F){const W=new Array(F.length);let J=0;for(let Q=0;Q<F.length;Q++){const re=I(F[Q]);W[Q]=re,J+=re.length}const ee=new Uint8Array(J);for(let Q=0,re=0;Q<W.length;Q++)ee.set(W[Q],re),re+=W[Q].length;return ee}_e.concatBytes=A;function D(F){if(typeof Buffer<"u"&&F instanceof Buffer){const W=F.buffer.slice(F.byteOffset,F.byteOffset+F.byteLength);return new DataView(W)}return new DataView(F.buffer,F.byteOffset,F.byteLength)}return _e.createDataView=D,_e}var Wr={},Zl;function C1(){if(Zl)return Wr;Zl=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.ChecksumStruct=void 0;const e=Yt,t=Zd();return Wr.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),Wr}var Ye={},Kl;function M1(){if(Kl)return Ye;Kl=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.createHex=Ye.createBytes=Ye.createBigInt=Ye.createNumber=void 0;const e=Yt,t=ht(),r=Kd(),n=Vn(),l=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),n.StrictHexStruct]),i=(0,e.coerce)((0,e.number)(),l,Number),o=(0,e.coerce)((0,e.bigint)(),l,BigInt);(0,e.union)([n.StrictHexStruct,(0,e.instance)(Uint8Array)]);const a=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([n.StrictHexStruct]),r.hexToBytes),d=(0,e.coerce)(n.StrictHexStruct,(0,e.instance)(Uint8Array),r.bytesToHex);function u(c){try{const g=(0,e.create)(c,i);return(0,t.assert)(Number.isFinite(g),`Expected a number-like value, got "${c}".`),g}catch(g){throw g instanceof e.StructError?new Error(`Expected a number-like value, got "${c}".`):g}}Ye.createNumber=u;function p(c){try{return(0,e.create)(c,o)}catch(g){throw g instanceof e.StructError?new Error(`Expected a number-like value, got "${String(g.value)}".`):g}}Ye.createBigInt=p;function s(c){if(typeof c=="string"&&c.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(c,a)}catch(g){throw g instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(g.value)}".`):g}}Ye.createBytes=s;function f(c){if(c instanceof Uint8Array&&c.length===0||typeof c=="string"&&c.toLowerCase()==="0x")return"0x";try{return(0,e.create)(c,d)}catch(g){throw g instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(g.value)}".`):g}}return Ye.createHex=f,Ye}var Xe={},Ql;function k1(){if(Ql)return Xe;Ql=1;var e=Xe&&Xe.__classPrivateFieldSet||function(o,a,d,u,p){if(u==="m")throw new TypeError("Private method is not writable");if(u==="a"&&!p)throw new TypeError("Private accessor was defined without a setter");if(typeof a=="function"?o!==a||!p:!a.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return u==="a"?p.call(o,d):p?p.value=d:a.set(o,d),d},t=Xe&&Xe.__classPrivateFieldGet||function(o,a,d,u){if(d==="a"&&!u)throw new TypeError("Private accessor was defined without a getter");if(typeof a=="function"?o!==a||!u:!a.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return d==="m"?u:d==="a"?u.call(o):u?u.value:a.get(o)},r,n;Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.FrozenSet=Xe.FrozenMap=void 0;class l{constructor(a){r.set(this,void 0),e(this,r,new Map(a),"f"),Object.freeze(this)}get size(){return t(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return t(this,r,"f")[Symbol.iterator]()}entries(){return t(this,r,"f").entries()}forEach(a,d){return t(this,r,"f").forEach((u,p,s)=>a.call(d,u,p,this))}get(a){return t(this,r,"f").get(a)}has(a){return t(this,r,"f").has(a)}keys(){return t(this,r,"f").keys()}values(){return t(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([a,d])=>`${String(a)} => ${String(d)}`).join(", ")} `:""}}`}}Xe.FrozenMap=l;class i{constructor(a){n.set(this,void 0),e(this,n,new Set(a),"f"),Object.freeze(this)}get size(){return t(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return t(this,n,"f")[Symbol.iterator]()}entries(){return t(this,n,"f").entries()}forEach(a,d){return t(this,n,"f").forEach((u,p,s)=>a.call(d,u,p,this))}has(a){return t(this,n,"f").has(a)}keys(){return t(this,n,"f").keys()}values(){return t(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(a=>String(a)).join(", ")} `:""}}`}}return Xe.FrozenSet=i,Object.freeze(l),Object.freeze(l.prototype),Object.freeze(i),Object.freeze(i.prototype),Xe}var Hs={},Yl;function I1(){return Yl||(Yl=1,Object.defineProperty(Hs,"__esModule",{value:!0})),Hs}var Ws={},Xl;function x1(){return Xl||(Xl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Yt,r=ht(),n=()=>(0,t.define)("finite number",A=>(0,t.is)(A,(0,t.number)())&&Number.isFinite(A));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),n(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(A,D)=>{function F(W,J){const Q=[...J.validator(W,D)];return Q.length>0?Q:!0}try{const W=F(A,e.UnsafeJsonStruct);return W!==!0?W:F(JSON.parse(JSON.stringify(A)),e.UnsafeJsonStruct)}catch(W){return W instanceof RangeError?"Circular reference detected":!1}});function l(A){return(0,t.is)(A,e.JsonStruct)}e.isValidJson=l;function i(A){(0,r.assertStruct)(A,e.JsonStruct,"Invalid JSON value");const D=JSON.stringify(A);return new TextEncoder().encode(D).byteLength}e.getJsonSize=i,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function o(A){return(0,t.is)(A,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=o;function a(A,D){(0,r.assertStruct)(A,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",D)}e.assertIsJsonRpcNotification=a;function d(A){return(0,t.is)(A,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=d;function u(A,D){(0,r.assertStruct)(A,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",D)}e.assertIsJsonRpcRequest=u,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function p(A){return(0,t.is)(A,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=p;function s(A,D){(0,r.assertStruct)(A,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",D)}e.assertIsPendingJsonRpcResponse=s;function f(A){return(0,t.is)(A,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=f;function c(A,D){(0,r.assertStruct)(A,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",D)}e.assertIsJsonRpcResponse=c;function g(A){return(0,t.is)(A,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=g;function _(A,D){(0,r.assertStruct)(A,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",D)}e.assertIsJsonRpcSuccess=_;function m(A){return(0,t.is)(A,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=m;function h(A,D){(0,r.assertStruct)(A,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",D)}e.assertIsJsonRpcFailure=h;function b(A){return(0,t.is)(A,e.JsonRpcErrorStruct)}e.isJsonRpcError=b;function w(A,D){(0,r.assertStruct)(A,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",D)}e.assertIsJsonRpcError=w;function I(A){const{permitEmptyString:D,permitFractions:F,permitNull:W}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},A);return ee=>!!(typeof ee=="number"&&(F||Number.isInteger(ee))||typeof ee=="string"&&(D||ee.length>0)||W&&ee===null)}e.getJsonRpcIdValidator=I})(Ws)),Ws}var $s={},ef;function A1(){return ef||(ef=1,Object.defineProperty($s,"__esModule",{value:!0})),$s}var ot={},kn={exports:{}},Vs,tf;function T1(){if(tf)return Vs;tf=1;var e=1e3,t=e*60,r=t*60,n=r*24,l=n*7,i=n*365.25;Vs=function(p,s){s=s||{};var f=typeof p;if(f==="string"&&p.length>0)return o(p);if(f==="number"&&isFinite(p))return s.long?d(p):a(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function o(p){if(p=String(p),!(p.length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(s){var f=parseFloat(s[1]),c=(s[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return f*i;case"weeks":case"week":case"w":return f*l;case"days":case"day":case"d":return f*n;case"hours":case"hour":case"hrs":case"hr":case"h":return f*r;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function a(p){var s=Math.abs(p);return s>=n?Math.round(p/n)+"d":s>=r?Math.round(p/r)+"h":s>=t?Math.round(p/t)+"m":s>=e?Math.round(p/e)+"s":p+"ms"}function d(p){var s=Math.abs(p);return s>=n?u(p,s,n,"day"):s>=r?u(p,s,r,"hour"):s>=t?u(p,s,t,"minute"):s>=e?u(p,s,e,"second"):p+" ms"}function u(p,s,f,c){var g=s>=f*1.5;return Math.round(p/f)+" "+c+(g?"s":"")}return Vs}var zs,rf;function P1(){if(rf)return zs;rf=1;function e(t){n.debug=n,n.default=n,n.coerce=u,n.disable=a,n.enable=i,n.enabled=d,n.humanize=T1(),n.destroy=p,Object.keys(t).forEach(s=>{n[s]=t[s]}),n.names=[],n.skips=[],n.formatters={};function r(s){let f=0;for(let c=0;c<s.length;c++)f=(f<<5)-f+s.charCodeAt(c),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=r;function n(s){let f,c=null,g,_;function m(...h){if(!m.enabled)return;const b=m,w=Number(new Date),I=w-(f||w);b.diff=I,b.prev=f,b.curr=w,f=w,h[0]=n.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let A=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(F,W)=>{if(F==="%%")return"%";A++;const J=n.formatters[W];if(typeof J=="function"){const ee=h[A];F=J.call(b,ee),h.splice(A,1),A--}return F}),n.formatArgs.call(b,h),(b.log||n.log).apply(b,h)}return m.namespace=s,m.useColors=n.useColors(),m.color=n.selectColor(s),m.extend=l,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>c!==null?c:(g!==n.namespaces&&(g=n.namespaces,_=n.enabled(s)),_),set:h=>{c=h}}),typeof n.init=="function"&&n.init(m),m}function l(s,f){const c=n(this.namespace+(typeof f>"u"?":":f)+s);return c.log=this.log,c}function i(s){n.save(s),n.namespaces=s,n.names=[],n.skips=[];const f=(typeof s=="string"?s:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const c of f)c[0]==="-"?n.skips.push(c.slice(1)):n.names.push(c)}function o(s,f){let c=0,g=0,_=-1,m=0;for(;c<s.length;)if(g<f.length&&(f[g]===s[c]||f[g]==="*"))f[g]==="*"?(_=g,m=c,g++):(c++,g++);else if(_!==-1)g=_+1,m++,c=m;else return!1;for(;g<f.length&&f[g]==="*";)g++;return g===f.length}function a(){const s=[...n.names,...n.skips.map(f=>"-"+f)].join(",");return n.enable(""),s}function d(s){for(const f of n.skips)if(o(s,f))return!1;for(const f of n.names)if(o(s,f))return!0;return!1}function u(s){return s instanceof Error?s.stack||s.message:s}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}return zs=e,zs}var nf;function B1(){return nf||(nf=1,(function(e,t){var r={};t.formatArgs=l,t.save=i,t.load=o,t.useColors=n,t.storage=a(),t.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let u;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(u=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(u[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;u.splice(1,0,p,"color: inherit");let s=0,f=0;u[0].replace(/%[a-zA-Z%]/g,c=>{c!=="%%"&&(s++,c==="%c"&&(f=s))}),u.splice(f,0,p)}t.log=console.debug||console.log||(()=>{});function i(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function o(){let u;try{u=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=r.DEBUG),u}function a(){try{return localStorage}catch{}}e.exports=P1()(t);const{formatters:d}=e.exports;d.j=function(u){try{return JSON.stringify(u)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(kn,kn.exports)),kn.exports}var sf;function L1(){if(sf)return ot;sf=1;var e=ot&&ot.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ot,"__esModule",{value:!0}),ot.createModuleLogger=ot.createProjectLogger=void 0;const r=(0,e(B1()).default)("metamask");function n(i){return r.extend(i)}ot.createProjectLogger=n;function l(i,o){return i.extend(o)}return ot.createModuleLogger=l,ot}var Gs={},of;function N1(){return of||(of=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(u){return Array.isArray(u)&&u.length>0}e.isNonEmptyArray=t;function r(u){return u==null}e.isNullOrUndefined=r;function n(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}e.isObject=n;const l=(u,p)=>Object.hasOwnProperty.call(u,p);e.hasProperty=l,(function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function i(u){if(typeof u!="object"||u===null)return!1;try{let p=u;for(;Object.getPrototypeOf(p)!==null;)p=Object.getPrototypeOf(p);return Object.getPrototypeOf(u)===p}catch{return!1}}e.isPlainObject=i;function o(u){return u.charCodeAt(0)<=127}e.isASCII=o;function a(u){var p;return u.split("").reduce((f,c)=>o(c)?f+1:f+2,0)+((p=u.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&p!==void 0?p:[]).length}e.calculateStringSize=a;function d(u){return u.toString().length}e.calculateNumberSize=d})(Gs)),Gs}var et={},af;function O1(){if(af)return et;af=1,Object.defineProperty(et,"__esModule",{value:!0}),et.hexToBigInt=et.hexToNumber=et.bigIntToHex=et.numberToHex=void 0;const e=ht(),t=Vn(),r=o=>((0,e.assert)(typeof o=="number","Value must be a number."),(0,e.assert)(o>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(o),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(o.toString(16)));et.numberToHex=r;const n=o=>((0,e.assert)(typeof o=="bigint","Value must be a bigint."),(0,e.assert)(o>=0,"Value must be a non-negative bigint."),(0,t.add0x)(o.toString(16)));et.bigIntToHex=n;const l=o=>{(0,t.assertIsHexString)(o);const a=parseInt(o,16);return(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a};et.hexToNumber=l;const i=o=>((0,t.assertIsHexString)(o),BigInt((0,t.add0x)(o)));return et.hexToBigInt=i,et}var Js={},uf;function F1(){return uf||(uf=1,Object.defineProperty(Js,"__esModule",{value:!0})),Js}var Zs={},cf;function q1(){return cf||(cf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(i){i[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=i=>Number.isInteger(i)&&i>=0,r=(i,o)=>{if(!t(i))throw new Error(`"${o}" must be a non-negative integer. Received: "${i}".`)};function n(i,o){return r(i,"count"),i*o}e.inMilliseconds=n;function l(i){return r(i,"timestamp"),Date.now()-i}e.timeSince=l})(Zs)),Zs}var Ks={},lf;function D1(){return lf||(lf=1,Object.defineProperty(Ks,"__esModule",{value:!0})),Ks}var Qs={},In={exports:{}},Ys,ff;function zn(){if(ff)return Ys;ff=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,l=t-6;return Ys={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ys}var Xs,hf;function Gn(){if(hf)return Xs;hf=1;var e={};return Xs=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{},Xs}var df;function hn(){return df||(df=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:l}=zn(),i=Gn();t=e.exports={};const o=t.re=[],a=t.safeRe=[],d=t.src=[],u=t.safeSrc=[],p=t.t={};let s=0;const f="[a-zA-Z0-9-]",c=[["\\s",1],["\\d",l],[f,n]],g=m=>{for(const[h,b]of c)m=m.split(`${h}*`).join(`${h}{0,${b}}`).split(`${h}+`).join(`${h}{1,${b}}`);return m},_=(m,h,b)=>{const w=g(h),I=s++;i(m,I,h),p[m]=I,d[I]=h,u[I]=w,o[I]=new RegExp(h,b?"g":void 0),a[I]=new RegExp(w,b?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*"),_("NUMERICIDENTIFIERLOOSE","\\d+"),_("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),_("MAINVERSION",`(${d[p.NUMERICIDENTIFIER]})\\.(${d[p.NUMERICIDENTIFIER]})\\.(${d[p.NUMERICIDENTIFIER]})`),_("MAINVERSIONLOOSE",`(${d[p.NUMERICIDENTIFIERLOOSE]})\\.(${d[p.NUMERICIDENTIFIERLOOSE]})\\.(${d[p.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASEIDENTIFIER",`(?:${d[p.NONNUMERICIDENTIFIER]}|${d[p.NUMERICIDENTIFIER]})`),_("PRERELEASEIDENTIFIERLOOSE",`(?:${d[p.NONNUMERICIDENTIFIER]}|${d[p.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASE",`(?:-(${d[p.PRERELEASEIDENTIFIER]}(?:\\.${d[p.PRERELEASEIDENTIFIER]})*))`),_("PRERELEASELOOSE",`(?:-?(${d[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[p.PRERELEASEIDENTIFIERLOOSE]})*))`),_("BUILDIDENTIFIER",`${f}+`),_("BUILD",`(?:\\+(${d[p.BUILDIDENTIFIER]}(?:\\.${d[p.BUILDIDENTIFIER]})*))`),_("FULLPLAIN",`v?${d[p.MAINVERSION]}${d[p.PRERELEASE]}?${d[p.BUILD]}?`),_("FULL",`^${d[p.FULLPLAIN]}$`),_("LOOSEPLAIN",`[v=\\s]*${d[p.MAINVERSIONLOOSE]}${d[p.PRERELEASELOOSE]}?${d[p.BUILD]}?`),_("LOOSE",`^${d[p.LOOSEPLAIN]}$`),_("GTLT","((?:<|>)?=?)"),_("XRANGEIDENTIFIERLOOSE",`${d[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_("XRANGEIDENTIFIER",`${d[p.NUMERICIDENTIFIER]}|x|X|\\*`),_("XRANGEPLAIN",`[v=\\s]*(${d[p.XRANGEIDENTIFIER]})(?:\\.(${d[p.XRANGEIDENTIFIER]})(?:\\.(${d[p.XRANGEIDENTIFIER]})(?:${d[p.PRERELEASE]})?${d[p.BUILD]}?)?)?`),_("XRANGEPLAINLOOSE",`[v=\\s]*(${d[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[p.XRANGEIDENTIFIERLOOSE]})(?:${d[p.PRERELEASELOOSE]})?${d[p.BUILD]}?)?)?`),_("XRANGE",`^${d[p.GTLT]}\\s*${d[p.XRANGEPLAIN]}$`),_("XRANGELOOSE",`^${d[p.GTLT]}\\s*${d[p.XRANGEPLAINLOOSE]}$`),_("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),_("COERCE",`${d[p.COERCEPLAIN]}(?:$|[^\\d])`),_("COERCEFULL",d[p.COERCEPLAIN]+`(?:${d[p.PRERELEASE]})?(?:${d[p.BUILD]})?(?:$|[^\\d])`),_("COERCERTL",d[p.COERCE],!0),_("COERCERTLFULL",d[p.COERCEFULL],!0),_("LONETILDE","(?:~>?)"),_("TILDETRIM",`(\\s*)${d[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",_("TILDE",`^${d[p.LONETILDE]}${d[p.XRANGEPLAIN]}$`),_("TILDELOOSE",`^${d[p.LONETILDE]}${d[p.XRANGEPLAINLOOSE]}$`),_("LONECARET","(?:\\^)"),_("CARETTRIM",`(\\s*)${d[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",_("CARET",`^${d[p.LONECARET]}${d[p.XRANGEPLAIN]}$`),_("CARETLOOSE",`^${d[p.LONECARET]}${d[p.XRANGEPLAINLOOSE]}$`),_("COMPARATORLOOSE",`^${d[p.GTLT]}\\s*(${d[p.LOOSEPLAIN]})$|^$`),_("COMPARATOR",`^${d[p.GTLT]}\\s*(${d[p.FULLPLAIN]})$|^$`),_("COMPARATORTRIM",`(\\s*)${d[p.GTLT]}\\s*(${d[p.LOOSEPLAIN]}|${d[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",_("HYPHENRANGE",`^\\s*(${d[p.XRANGEPLAIN]})\\s+-\\s+(${d[p.XRANGEPLAIN]})\\s*$`),_("HYPHENRANGELOOSE",`^\\s*(${d[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[p.XRANGEPLAINLOOSE]})\\s*$`),_("STAR","(<|>)?=?\\s*\\*"),_("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),_("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(In,In.exports)),In.exports}var eo,pf;function qa(){if(pf)return eo;pf=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return eo=n=>n?typeof n!="object"?e:n:t,eo}var to,gf;function Qd(){if(gf)return to;gf=1;const e=/^[0-9]+$/,t=(n,l)=>{if(typeof n=="number"&&typeof l=="number")return n===l?0:n<l?-1:1;const i=e.test(n),o=e.test(l);return i&&o&&(n=+n,l=+l),n===l?0:i&&!o?-1:o&&!i?1:n<l?-1:1};return to={compareIdentifiers:t,rcompareIdentifiers:(n,l)=>t(l,n)},to}var ro,yf;function ze(){if(yf)return ro;yf=1;const e=Gn(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=zn(),{safeRe:n,t:l}=hn(),i=qa(),{compareIdentifiers:o}=Qd();class a{constructor(u,p){if(p=i(p),u instanceof a){if(u.loose===!!p.loose&&u.includePrerelease===!!p.includePrerelease)return u;u=u.version}else if(typeof u!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",u,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;const s=u.trim().match(p.loose?n[l.LOOSE]:n[l.FULL]);if(!s)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const c=+f;if(c>=0&&c<r)return c}return f}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(u){if(e("SemVer.compare",this.version,this.options,u),!(u instanceof a)){if(typeof u=="string"&&u===this.version)return 0;u=new a(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof a||(u=new a(u,this.options)),this.major<u.major?-1:this.major>u.major?1:this.minor<u.minor?-1:this.minor>u.minor?1:this.patch<u.patch?-1:this.patch>u.patch?1:0}comparePre(u){if(u instanceof a||(u=new a(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let p=0;do{const s=this.prerelease[p],f=u.prerelease[p];if(e("prerelease compare",p,s,f),s===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(s===void 0)return-1;if(s===f)continue;return o(s,f)}while(++p)}compareBuild(u){u instanceof a||(u=new a(u,this.options));let p=0;do{const s=this.build[p],f=u.build[p];if(e("build compare",p,s,f),s===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(s===void 0)return-1;if(s===f)continue;return o(s,f)}while(++p)}inc(u,p,s){if(u.startsWith("pre")){if(!p&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(p){const f=`-${p}`.match(this.options.loose?n[l.PRERELEASELOOSE]:n[l.PRERELEASE]);if(!f||f[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,s),this.inc("pre",p,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,s),this.inc("pre",p,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let c=this.prerelease.length;for(;--c>=0;)typeof this.prerelease[c]=="number"&&(this.prerelease[c]++,c=-2);if(c===-1){if(p===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(p){let c=[p,f];s===!1&&(c=[p]),o(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=c):this.prerelease=c}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ro=a,ro}var no,mf;function pr(){if(mf)return no;mf=1;const e=ze();return no=(r,n,l=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(i){if(!l)return null;throw i}},no}var io,_f;function j1(){if(_f)return io;_f=1;const e=pr();return io=(r,n)=>{const l=e(r,n);return l?l.version:null},io}var so,vf;function U1(){if(vf)return so;vf=1;const e=pr();return so=(r,n)=>{const l=e(r.trim().replace(/^[=v]+/,""),n);return l?l.version:null},so}var oo,bf;function H1(){if(bf)return oo;bf=1;const e=ze();return oo=(r,n,l,i,o)=>{typeof l=="string"&&(o=i,i=l,l=void 0);try{return new e(r instanceof e?r.version:r,l).inc(n,i,o).version}catch{return null}},oo}var ao,wf;function W1(){if(wf)return ao;wf=1;const e=pr();return ao=(r,n)=>{const l=e(r,null,!0),i=e(n,null,!0),o=l.compare(i);if(o===0)return null;const a=o>0,d=a?l:i,u=a?i:l,p=!!d.prerelease.length;if(!!u.prerelease.length&&!p){if(!u.patch&&!u.minor)return"major";if(u.compareMain(d)===0)return u.minor&&!u.patch?"minor":"patch"}const f=p?"pre":"";return l.major!==i.major?f+"major":l.minor!==i.minor?f+"minor":l.patch!==i.patch?f+"patch":"prerelease"},ao}var uo,Ef;function $1(){if(Ef)return uo;Ef=1;const e=ze();return uo=(r,n)=>new e(r,n).major,uo}var co,Sf;function V1(){if(Sf)return co;Sf=1;const e=ze();return co=(r,n)=>new e(r,n).minor,co}var lo,Rf;function z1(){if(Rf)return lo;Rf=1;const e=ze();return lo=(r,n)=>new e(r,n).patch,lo}var fo,Cf;function G1(){if(Cf)return fo;Cf=1;const e=pr();return fo=(r,n)=>{const l=e(r,n);return l&&l.prerelease.length?l.prerelease:null},fo}var ho,Mf;function rt(){if(Mf)return ho;Mf=1;const e=ze();return ho=(r,n,l)=>new e(r,l).compare(new e(n,l)),ho}var po,kf;function J1(){if(kf)return po;kf=1;const e=rt();return po=(r,n,l)=>e(n,r,l),po}var go,If;function Z1(){if(If)return go;If=1;const e=rt();return go=(r,n)=>e(r,n,!0),go}var yo,xf;function Da(){if(xf)return yo;xf=1;const e=ze();return yo=(r,n,l)=>{const i=new e(r,l),o=new e(n,l);return i.compare(o)||i.compareBuild(o)},yo}var mo,Af;function K1(){if(Af)return mo;Af=1;const e=Da();return mo=(r,n)=>r.sort((l,i)=>e(l,i,n)),mo}var _o,Tf;function Q1(){if(Tf)return _o;Tf=1;const e=Da();return _o=(r,n)=>r.sort((l,i)=>e(i,l,n)),_o}var vo,Pf;function Jn(){if(Pf)return vo;Pf=1;const e=rt();return vo=(r,n,l)=>e(r,n,l)>0,vo}var bo,Bf;function ja(){if(Bf)return bo;Bf=1;const e=rt();return bo=(r,n,l)=>e(r,n,l)<0,bo}var wo,Lf;function Yd(){if(Lf)return wo;Lf=1;const e=rt();return wo=(r,n,l)=>e(r,n,l)===0,wo}var Eo,Nf;function Xd(){if(Nf)return Eo;Nf=1;const e=rt();return Eo=(r,n,l)=>e(r,n,l)!==0,Eo}var So,Of;function Ua(){if(Of)return So;Of=1;const e=rt();return So=(r,n,l)=>e(r,n,l)>=0,So}var Ro,Ff;function Ha(){if(Ff)return Ro;Ff=1;const e=rt();return Ro=(r,n,l)=>e(r,n,l)<=0,Ro}var Co,qf;function e0(){if(qf)return Co;qf=1;const e=Yd(),t=Xd(),r=Jn(),n=Ua(),l=ja(),i=Ha();return Co=(a,d,u,p)=>{switch(d){case"===":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a===u;case"!==":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a!==u;case"":case"=":case"==":return e(a,u,p);case"!=":return t(a,u,p);case">":return r(a,u,p);case">=":return n(a,u,p);case"<":return l(a,u,p);case"<=":return i(a,u,p);default:throw new TypeError(`Invalid operator: ${d}`)}},Co}var Mo,Df;function Y1(){if(Df)return Mo;Df=1;const e=ze(),t=pr(),{safeRe:r,t:n}=hn();return Mo=(i,o)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;o=o||{};let a=null;if(!o.rtl)a=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const c=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let g;for(;(g=c.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||g.index+g[0].length!==a.index+a[0].length)&&(a=g),c.lastIndex=g.index+g[1].length+g[2].length;c.lastIndex=-1}if(a===null)return null;const d=a[2],u=a[3]||"0",p=a[4]||"0",s=o.includePrerelease&&a[5]?`-${a[5]}`:"",f=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${d}.${u}.${p}${s}${f}`,o)},Mo}var ko,jf;function X1(){if(jf)return ko;jf=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(r,n)}return this}}return ko=e,ko}var Io,Uf;function nt(){if(Uf)return Io;Uf=1;const e=/\s+/g;class t{constructor(S,C){if(C=l(C),S instanceof t)return S.loose===!!C.loose&&S.includePrerelease===!!C.includePrerelease?S:new t(S.raw,C);if(S instanceof i)return this.raw=S.value,this.set=[[S]],this.formatted=void 0,this;if(this.options=C,this.loose=!!C.loose,this.includePrerelease=!!C.includePrerelease,this.raw=S.trim().replace(e," "),this.set=this.raw.split("||").map(M=>this.parseRange(M.trim())).filter(M=>M.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const M=this.set[0];if(this.set=this.set.filter(x=>!_(x[0])),this.set.length===0)this.set=[M];else if(this.set.length>1){for(const x of this.set)if(x.length===1&&m(x[0])){this.set=[x];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let S=0;S<this.set.length;S++){S>0&&(this.formatted+="||");const C=this.set[S];for(let M=0;M<C.length;M++)M>0&&(this.formatted+=" "),this.formatted+=C[M].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(S){const M=((this.options.includePrerelease&&c)|(this.options.loose&&g))+":"+S,x=n.get(M);if(x)return x;const L=this.options.loose,j=L?d[u.HYPHENRANGELOOSE]:d[u.HYPHENRANGE];S=S.replace(j,re(this.options.includePrerelease)),o("hyphen replace",S),S=S.replace(d[u.COMPARATORTRIM],p),o("comparator trim",S),S=S.replace(d[u.TILDETRIM],s),o("tilde trim",S),S=S.replace(d[u.CARETTRIM],f),o("caret trim",S);let T=S.split(" ").map(Y=>b(Y,this.options)).join(" ").split(/\s+/).map(Y=>Q(Y,this.options));L&&(T=T.filter(Y=>(o("loose invalid filter",Y,this.options),!!Y.match(d[u.COMPARATORLOOSE])))),o("range list",T);const E=new Map,N=T.map(Y=>new i(Y,this.options));for(const Y of N){if(_(Y))return[Y];E.set(Y.value,Y)}E.size>1&&E.has("")&&E.delete("");const te=[...E.values()];return n.set(M,te),te}intersects(S,C){if(!(S instanceof t))throw new TypeError("a Range is required");return this.set.some(M=>h(M,C)&&S.set.some(x=>h(x,C)&&M.every(L=>x.every(j=>L.intersects(j,C)))))}test(S){if(!S)return!1;if(typeof S=="string")try{S=new a(S,this.options)}catch{return!1}for(let C=0;C<this.set.length;C++)if(q(this.set[C],S,this.options))return!0;return!1}}Io=t;const r=X1(),n=new r,l=qa(),i=Zn(),o=Gn(),a=ze(),{safeRe:d,t:u,comparatorTrimReplace:p,tildeTrimReplace:s,caretTrimReplace:f}=hn(),{FLAG_INCLUDE_PRERELEASE:c,FLAG_LOOSE:g}=zn(),_=y=>y.value==="<0.0.0-0",m=y=>y.value==="",h=(y,S)=>{let C=!0;const M=y.slice();let x=M.pop();for(;C&&M.length;)C=M.every(L=>x.intersects(L,S)),x=M.pop();return C},b=(y,S)=>(y=y.replace(d[u.BUILD],""),o("comp",y,S),y=D(y,S),o("caret",y),y=I(y,S),o("tildes",y),y=W(y,S),o("xrange",y),y=ee(y,S),o("stars",y),y),w=y=>!y||y.toLowerCase()==="x"||y==="*",I=(y,S)=>y.trim().split(/\s+/).map(C=>A(C,S)).join(" "),A=(y,S)=>{const C=S.loose?d[u.TILDELOOSE]:d[u.TILDE];return y.replace(C,(M,x,L,j,T)=>{o("tilde",y,M,x,L,j,T);let E;return w(x)?E="":w(L)?E=`>=${x}.0.0 <${+x+1}.0.0-0`:w(j)?E=`>=${x}.${L}.0 <${x}.${+L+1}.0-0`:T?(o("replaceTilde pr",T),E=`>=${x}.${L}.${j}-${T} <${x}.${+L+1}.0-0`):E=`>=${x}.${L}.${j} <${x}.${+L+1}.0-0`,o("tilde return",E),E})},D=(y,S)=>y.trim().split(/\s+/).map(C=>F(C,S)).join(" "),F=(y,S)=>{o("caret",y,S);const C=S.loose?d[u.CARETLOOSE]:d[u.CARET],M=S.includePrerelease?"-0":"";return y.replace(C,(x,L,j,T,E)=>{o("caret",y,x,L,j,T,E);let N;return w(L)?N="":w(j)?N=`>=${L}.0.0${M} <${+L+1}.0.0-0`:w(T)?L==="0"?N=`>=${L}.${j}.0${M} <${L}.${+j+1}.0-0`:N=`>=${L}.${j}.0${M} <${+L+1}.0.0-0`:E?(o("replaceCaret pr",E),L==="0"?j==="0"?N=`>=${L}.${j}.${T}-${E} <${L}.${j}.${+T+1}-0`:N=`>=${L}.${j}.${T}-${E} <${L}.${+j+1}.0-0`:N=`>=${L}.${j}.${T}-${E} <${+L+1}.0.0-0`):(o("no pr"),L==="0"?j==="0"?N=`>=${L}.${j}.${T}${M} <${L}.${j}.${+T+1}-0`:N=`>=${L}.${j}.${T}${M} <${L}.${+j+1}.0-0`:N=`>=${L}.${j}.${T} <${+L+1}.0.0-0`),o("caret return",N),N})},W=(y,S)=>(o("replaceXRanges",y,S),y.split(/\s+/).map(C=>J(C,S)).join(" ")),J=(y,S)=>{y=y.trim();const C=S.loose?d[u.XRANGELOOSE]:d[u.XRANGE];return y.replace(C,(M,x,L,j,T,E)=>{o("xRange",y,M,x,L,j,T,E);const N=w(L),te=N||w(j),Y=te||w(T),U=Y;return x==="="&&U&&(x=""),E=S.includePrerelease?"-0":"",N?x===">"||x==="<"?M="<0.0.0-0":M="*":x&&U?(te&&(j=0),T=0,x===">"?(x=">=",te?(L=+L+1,j=0,T=0):(j=+j+1,T=0)):x==="<="&&(x="<",te?L=+L+1:j=+j+1),x==="<"&&(E="-0"),M=`${x+L}.${j}.${T}${E}`):te?M=`>=${L}.0.0${E} <${+L+1}.0.0-0`:Y&&(M=`>=${L}.${j}.0${E} <${L}.${+j+1}.0-0`),o("xRange return",M),M})},ee=(y,S)=>(o("replaceStars",y,S),y.trim().replace(d[u.STAR],"")),Q=(y,S)=>(o("replaceGTE0",y,S),y.trim().replace(d[S.includePrerelease?u.GTE0PRE:u.GTE0],"")),re=y=>(S,C,M,x,L,j,T,E,N,te,Y,U)=>(w(M)?C="":w(x)?C=`>=${M}.0.0${y?"-0":""}`:w(L)?C=`>=${M}.${x}.0${y?"-0":""}`:j?C=`>=${C}`:C=`>=${C}${y?"-0":""}`,w(N)?E="":w(te)?E=`<${+N+1}.0.0-0`:w(Y)?E=`<${N}.${+te+1}.0-0`:U?E=`<=${N}.${te}.${Y}-${U}`:y?E=`<${N}.${te}.${+Y+1}-0`:E=`<=${E}`,`${C} ${E}`.trim()),q=(y,S,C)=>{for(let M=0;M<y.length;M++)if(!y[M].test(S))return!1;if(S.prerelease.length&&!C.includePrerelease){for(let M=0;M<y.length;M++)if(o(y[M].semver),y[M].semver!==i.ANY&&y[M].semver.prerelease.length>0){const x=y[M].semver;if(x.major===S.major&&x.minor===S.minor&&x.patch===S.patch)return!0}return!1}return!0};return Io}var xo,Hf;function Zn(){if(Hf)return xo;Hf=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(p,s){if(s=r(s),p instanceof t){if(p.loose===!!s.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),o("comparator",p,s),this.options=s,this.loose=!!s.loose,this.parse(p),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(p){const s=this.options.loose?n[l.COMPARATORLOOSE]:n[l.COMPARATOR],f=p.match(s);if(!f)throw new TypeError(`Invalid comparator: ${p}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(p){if(o("Comparator.test",p,this.options.loose),this.semver===e||p===e)return!0;if(typeof p=="string")try{p=new a(p,this.options)}catch{return!1}return i(p,this.operator,this.semver,this.options)}intersects(p,s){if(!(p instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new d(p.value,s).test(this.value):p.operator===""?p.value===""?!0:new d(this.value,s).test(p.semver):(s=r(s),s.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!s.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||i(this.semver,"<",p.semver,s)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||i(this.semver,">",p.semver,s)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}}xo=t;const r=qa(),{safeRe:n,t:l}=hn(),i=e0(),o=Gn(),a=ze(),d=nt();return xo}var Ao,Wf;function Kn(){if(Wf)return Ao;Wf=1;const e=nt();return Ao=(r,n,l)=>{try{n=new e(n,l)}catch{return!1}return n.test(r)},Ao}var To,$f;function ey(){if($f)return To;$f=1;const e=nt();return To=(r,n)=>new e(r,n).set.map(l=>l.map(i=>i.value).join(" ").trim().split(" ")),To}var Po,Vf;function ty(){if(Vf)return Po;Vf=1;const e=ze(),t=nt();return Po=(n,l,i)=>{let o=null,a=null,d=null;try{d=new t(l,i)}catch{return null}return n.forEach(u=>{d.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new e(o,i))}),o},Po}var Bo,zf;function ry(){if(zf)return Bo;zf=1;const e=ze(),t=nt();return Bo=(n,l,i)=>{let o=null,a=null,d=null;try{d=new t(l,i)}catch{return null}return n.forEach(u=>{d.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new e(o,i))}),o},Bo}var Lo,Gf;function ny(){if(Gf)return Lo;Gf=1;const e=ze(),t=nt(),r=Jn();return Lo=(l,i)=>{l=new t(l,i);let o=new e("0.0.0");if(l.test(o)||(o=new e("0.0.0-0"),l.test(o)))return o;o=null;for(let a=0;a<l.set.length;++a){const d=l.set[a];let u=null;d.forEach(p=>{const s=new e(p.semver.version);switch(p.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!u||r(s,u))&&(u=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),u&&(!o||r(o,u))&&(o=u)}return o&&l.test(o)?o:null},Lo}var No,Jf;function iy(){if(Jf)return No;Jf=1;const e=nt();return No=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},No}var Oo,Zf;function Wa(){if(Zf)return Oo;Zf=1;const e=ze(),t=Zn(),{ANY:r}=t,n=nt(),l=Kn(),i=Jn(),o=ja(),a=Ha(),d=Ua();return Oo=(p,s,f,c)=>{p=new e(p,c),s=new n(s,c);let g,_,m,h,b;switch(f){case">":g=i,_=a,m=o,h=">",b=">=";break;case"<":g=o,_=d,m=i,h="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l(p,s,c))return!1;for(let w=0;w<s.set.length;++w){const I=s.set[w];let A=null,D=null;if(I.forEach(F=>{F.semver===r&&(F=new t(">=0.0.0")),A=A||F,D=D||F,g(F.semver,A.semver,c)?A=F:m(F.semver,D.semver,c)&&(D=F)}),A.operator===h||A.operator===b||(!D.operator||D.operator===h)&&_(p,D.semver))return!1;if(D.operator===b&&m(p,D.semver))return!1}return!0},Oo}var Fo,Kf;function sy(){if(Kf)return Fo;Kf=1;const e=Wa();return Fo=(r,n,l)=>e(r,n,">",l),Fo}var qo,Qf;function oy(){if(Qf)return qo;Qf=1;const e=Wa();return qo=(r,n,l)=>e(r,n,"<",l),qo}var Do,Yf;function ay(){if(Yf)return Do;Yf=1;const e=nt();return Do=(r,n,l)=>(r=new e(r,l),n=new e(n,l),r.intersects(n,l)),Do}var jo,Xf;function uy(){if(Xf)return jo;Xf=1;const e=Kn(),t=rt();return jo=(r,n,l)=>{const i=[];let o=null,a=null;const d=r.sort((f,c)=>t(f,c,l));for(const f of d)e(f,n,l)?(a=f,o||(o=f)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const u=[];for(const[f,c]of i)f===c?u.push(f):!c&&f===d[0]?u.push("*"):c?f===d[0]?u.push(`<=${c}`):u.push(`${f} - ${c}`):u.push(`>=${f}`);const p=u.join(" || "),s=typeof n.raw=="string"?n.raw:String(n);return p.length<s.length?p:n},jo}var Uo,eh;function cy(){if(eh)return Uo;eh=1;const e=nt(),t=Zn(),{ANY:r}=t,n=Kn(),l=rt(),i=(s,f,c={})=>{if(s===f)return!0;s=new e(s,c),f=new e(f,c);let g=!1;e:for(const _ of s.set){for(const m of f.set){const h=d(_,m,c);if(g=g||h!==null,h)continue e}if(g)return!1}return!0},o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],d=(s,f,c)=>{if(s===f)return!0;if(s.length===1&&s[0].semver===r){if(f.length===1&&f[0].semver===r)return!0;c.includePrerelease?s=o:s=a}if(f.length===1&&f[0].semver===r){if(c.includePrerelease)return!0;f=a}const g=new Set;let _,m;for(const W of s)W.operator===">"||W.operator===">="?_=u(_,W,c):W.operator==="<"||W.operator==="<="?m=p(m,W,c):g.add(W.semver);if(g.size>1)return null;let h;if(_&&m){if(h=l(_.semver,m.semver,c),h>0)return null;if(h===0&&(_.operator!==">="||m.operator!=="<="))return null}for(const W of g){if(_&&!n(W,String(_),c)||m&&!n(W,String(m),c))return null;for(const J of f)if(!n(W,String(J),c))return!1;return!0}let b,w,I,A,D=m&&!c.includePrerelease&&m.semver.prerelease.length?m.semver:!1,F=_&&!c.includePrerelease&&_.semver.prerelease.length?_.semver:!1;D&&D.prerelease.length===1&&m.operator==="<"&&D.prerelease[0]===0&&(D=!1);for(const W of f){if(A=A||W.operator===">"||W.operator===">=",I=I||W.operator==="<"||W.operator==="<=",_){if(F&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===F.major&&W.semver.minor===F.minor&&W.semver.patch===F.patch&&(F=!1),W.operator===">"||W.operator===">="){if(b=u(_,W,c),b===W&&b!==_)return!1}else if(_.operator===">="&&!n(_.semver,String(W),c))return!1}if(m){if(D&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===D.major&&W.semver.minor===D.minor&&W.semver.patch===D.patch&&(D=!1),W.operator==="<"||W.operator==="<="){if(w=p(m,W,c),w===W&&w!==m)return!1}else if(m.operator==="<="&&!n(m.semver,String(W),c))return!1}if(!W.operator&&(m||_)&&h!==0)return!1}return!(_&&I&&!m&&h!==0||m&&A&&!_&&h!==0||F||D)},u=(s,f,c)=>{if(!s)return f;const g=l(s.semver,f.semver,c);return g>0?s:g<0||f.operator===">"&&s.operator===">="?f:s},p=(s,f,c)=>{if(!s)return f;const g=l(s.semver,f.semver,c);return g<0?s:g>0||f.operator==="<"&&s.operator==="<="?f:s};return Uo=i,Uo}var Ho,th;function ly(){if(th)return Ho;th=1;const e=hn(),t=zn(),r=ze(),n=Qd(),l=pr(),i=j1(),o=U1(),a=H1(),d=W1(),u=$1(),p=V1(),s=z1(),f=G1(),c=rt(),g=J1(),_=Z1(),m=Da(),h=K1(),b=Q1(),w=Jn(),I=ja(),A=Yd(),D=Xd(),F=Ua(),W=Ha(),J=e0(),ee=Y1(),Q=Zn(),re=nt(),q=Kn(),y=ey(),S=ty(),C=ry(),M=ny(),x=iy(),L=Wa(),j=sy(),T=oy(),E=ay(),N=uy(),te=cy();return Ho={parse:l,valid:i,clean:o,inc:a,diff:d,major:u,minor:p,patch:s,prerelease:f,compare:c,rcompare:g,compareLoose:_,compareBuild:m,sort:h,rsort:b,gt:w,lt:I,eq:A,neq:D,gte:F,lte:W,cmp:J,coerce:ee,Comparator:Q,Range:re,satisfies:q,toComparators:y,maxSatisfying:S,minSatisfying:C,minVersion:M,validRange:x,outside:L,gtr:j,ltr:T,intersects:E,simplifyRange:N,subset:te,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Ho}var rh;function fy(){return rh||(rh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=ly(),r=Yt,n=ht();e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",s=>(0,t.valid)(s)===null?`Expected SemVer version, got "${s}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",s=>(0,t.validRange)(s)===null?`Expected SemVer range, got "${s}"`:!0);function l(s){return(0,r.is)(s,e.VersionStruct)}e.isValidSemVerVersion=l;function i(s){return(0,r.is)(s,e.VersionRangeStruct)}e.isValidSemVerRange=i;function o(s){(0,n.assertStruct)(s,e.VersionStruct)}e.assertIsSemVerVersion=o;function a(s){(0,n.assertStruct)(s,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function d(s,f){return(0,t.gt)(s,f)}e.gtVersion=d;function u(s,f){return(0,t.gtr)(s,f)}e.gtRange=u;function p(s,f){return(0,t.satisfies)(s,f,{includePrerelease:!0})}e.satisfiesVersionRange=p})(Qs)),Qs}var nh;function hy(){return nh||(nh=1,(function(e){var t=Ht&&Ht.__createBinding||(Object.create?(function(n,l,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(l,i);(!a||("get"in a?!l.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return l[i]}}),Object.defineProperty(n,o,a)}):(function(n,l,i,o){o===void 0&&(o=i),n[o]=l[i]})),r=Ht&&Ht.__exportStar||function(n,l){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(l,i)&&t(l,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(ht(),e),r(Zd(),e),r(Kd(),e),r(C1(),e),r(M1(),e),r(k1(),e),r(I1(),e),r(Vn(),e),r(x1(),e),r(A1(),e),r(L1(),e),r(N1(),e),r(O1(),e),r(F1(),e),r(q1(),e),r(D1(),e),r(fy(),e)})(Ht)),Ht}var ih;function dy(){return ih||(ih=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const t=hy();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})(js)),js}var sh;function py(){if(sh)return jt;sh=1;var e=jt&&jt.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.PollingBlockTracker=void 0;const t=e(Pa()),r=e(Dg()),n=jd(),l=dy(),i=(0,l.createModuleLogger)(l.projectLogger,"polling-block-tracker"),o=(0,t.default)(),a=1e3;let d=class extends n.BaseBlockTracker{constructor(s={}){var f;if(!s.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},s),{blockResetDuration:(f=s.blockResetDuration)!==null&&f!==void 0?f:s.pollingInterval})),this._provider=s.provider,this._pollingInterval=s.pollingInterval||20*a,this._retryTimeout=s.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=s.keepEventLoopActive===void 0?!0:s.keepEventLoopActive,this._setSkipCacheFlag=s.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var s;this._isRunning;)try{await this._updateLatestBlock();const f=u(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await f}catch(f){const c=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
3
3
  ${(s=f.stack)!==null&&s!==void 0?s:f}`);try{this.emit("error",c)}catch{console.error(c)}const g=u(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await g}}async _updateLatestBlock(){const s=await this._fetchLatestBlock();this._newPotentialLatest(s)}async _fetchLatestBlock(){const s={jsonrpc:"2.0",id:o(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(s.skipCache=!0),i("Making request",s);const f=await(0,r.default)(c=>this._provider.sendAsync(s,c))();if(i("Got response",f),f.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
4
4
  ${f.error.message}`);return f.result}};jt.PollingBlockTracker=d;function u(p,s){return new Promise(f=>{const c=setTimeout(f,p);c.unref&&s&&c.unref()})}return jt}var Wt={},oh;function gy(){if(oh)return Wt;oh=1;var e=Wt&&Wt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.SubscribeBlockTracker=void 0;const t=e(Pa()),r=jd(),n=(0,t.default)();let l=class extends r.BaseBlockTracker{constructor(o={}){if(!o.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(o),this._provider=o.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const o=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(o)}catch(o){this.emit("error",o)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(o){this.emit("error",o)}}_call(o,...a){return new Promise((d,u)=>{this._provider.sendAsync({id:n(),method:o,params:a,jsonrpc:"2.0"},(p,s)=>{p?u(p):d(s.result)})})}_handleSubData(o,a){var d;a.method==="eth_subscription"&&((d=a.params)===null||d===void 0?void 0:d.subscription)===this._subscriptionId&&this._newPotentialLatest(a.params.result.number)}};return Wt.SubscribeBlockTracker=l,Wt}var ah;function yy(){return ah||(ah=1,(function(e){var t=Dt&&Dt.__createBinding||(Object.create?(function(n,l,i,o){o===void 0&&(o=i),Object.defineProperty(n,o,{enumerable:!0,get:function(){return l[i]}})}):(function(n,l,i,o){o===void 0&&(o=i),n[o]=l[i]})),r=Dt&&Dt.__exportStar||function(n,l){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(l,i)&&t(l,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(py(),e),r(gy(),e)})(Dt)),Dt}var $t={},$r={},Vr={},uh;function t0(){if(uh)return Vr;uh=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.getUniqueId=void 0;const e=4294967295;let t=Math.floor(Math.random()*e);function r(){return t=(t+1)%e,t}return Vr.getUniqueId=r,Vr}var ch;function my(){if(ch)return $r;ch=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.createIdRemapMiddleware=void 0;const e=t0();function t(){return(r,n,l,i)=>{const o=r.id,a=e.getUniqueId();r.id=a,n.id=a,l(d=>{r.id=o,n.id=o,d()})}}return $r.createIdRemapMiddleware=t,$r}var zr={},lh;function _y(){if(lh)return zr;lh=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.createAsyncMiddleware=void 0;function e(t){return async(r,n,l,i)=>{let o;const a=new Promise(s=>{o=s});let d=null,u=!1;const p=async()=>{u=!0,l(s=>{d=s,o()}),await a};try{await t(r,n,p),u?(await a,d(null)):i(null)}catch(s){d?d(s):i(s)}}}return zr.createAsyncMiddleware=e,zr}var Gr={},fh;function vy(){if(fh)return Gr;fh=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.createScaffoldMiddleware=void 0;function e(t){return(r,n,l,i)=>{const o=t[r.method];return o===void 0?l():typeof o=="function"?o(r,n,l,i):(n.result=o,i())}}return Gr.createScaffoldMiddleware=e,Gr}var Vt={},xn={},hh;function by(){if(hh)return xn;hh=1,Object.defineProperty(xn,"__esModule",{value:!0});const e=Fn();function t(l,i,o){try{Reflect.apply(l,i,o)}catch(a){setTimeout(()=>{throw a})}}function r(l){const i=l.length,o=new Array(i);for(let a=0;a<i;a+=1)o[a]=l[a];return o}class n extends e.EventEmitter{emit(i,...o){let a=i==="error";const d=this._events;if(d!==void 0)a=a&&d.error===void 0;else if(!a)return!1;if(a){let p;if(o.length>0&&([p]=o),p instanceof Error)throw p;const s=new Error(`Unhandled error.${p?` (${p.message})`:""}`);throw s.context=p,s}const u=d[i];if(u===void 0)return!1;if(typeof u=="function")t(u,this,o);else{const p=u.length,s=r(u);for(let f=0;f<p;f+=1)t(s[f],this,o)}return!0}}return xn.default=n,xn}var Wo={},zt={},$o,dh;function wy(){if(dh)return $o;dh=1,$o=i,i.default=i,i.stable=u,i.stableStringify=u;var e="[...]",t="[Circular]",r=[],n=[];function l(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(f,c,g,_){typeof _>"u"&&(_=l()),a(f,"",0,[],void 0,0,_);var m;try{n.length===0?m=JSON.stringify(f,c,g):m=JSON.stringify(f,s(c),g)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;r.length!==0;){var h=r.pop();h.length===4?Object.defineProperty(h[0],h[1],h[3]):h[0][h[1]]=h[2]}}return m}function o(f,c,g,_){var m=Object.getOwnPropertyDescriptor(_,g);m.get!==void 0?m.configurable?(Object.defineProperty(_,g,{value:f}),r.push([_,g,c,m])):n.push([c,g,f]):(_[g]=f,r.push([_,g,c]))}function a(f,c,g,_,m,h,b){h+=1;var w;if(typeof f=="object"&&f!==null){for(w=0;w<_.length;w++)if(_[w]===f){o(t,f,c,m);return}if(typeof b.depthLimit<"u"&&h>b.depthLimit){o(e,f,c,m);return}if(typeof b.edgesLimit<"u"&&g+1>b.edgesLimit){o(e,f,c,m);return}if(_.push(f),Array.isArray(f))for(w=0;w<f.length;w++)a(f[w],w,w,_,f,h,b);else{var I=Object.keys(f);for(w=0;w<I.length;w++){var A=I[w];a(f[A],A,w,_,f,h,b)}}_.pop()}}function d(f,c){return f<c?-1:f>c?1:0}function u(f,c,g,_){typeof _>"u"&&(_=l());var m=p(f,"",0,[],void 0,0,_)||f,h;try{n.length===0?h=JSON.stringify(m,c,g):h=JSON.stringify(m,s(c),g)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;r.length!==0;){var b=r.pop();b.length===4?Object.defineProperty(b[0],b[1],b[3]):b[0][b[1]]=b[2]}}return h}function p(f,c,g,_,m,h,b){h+=1;var w;if(typeof f=="object"&&f!==null){for(w=0;w<_.length;w++)if(_[w]===f){o(t,f,c,m);return}try{if(typeof f.toJSON=="function")return}catch{return}if(typeof b.depthLimit<"u"&&h>b.depthLimit){o(e,f,c,m);return}if(typeof b.edgesLimit<"u"&&g+1>b.edgesLimit){o(e,f,c,m);return}if(_.push(f),Array.isArray(f))for(w=0;w<f.length;w++)p(f[w],w,w,_,f,h,b);else{var I={},A=Object.keys(f).sort(d);for(w=0;w<A.length;w++){var D=A[w];p(f[D],D,w,_,f,h,b),I[D]=f[D]}if(typeof m<"u")r.push([m,c,f]),m[c]=I;else return I}_.pop()}}function s(f){return f=typeof f<"u"?f:function(c,g){return g},function(c,g){if(n.length>0)for(var _=0;_<n.length;_++){var m=n[_];if(m[1]===c&&m[0]===g){g=m[2],n.splice(_,1);break}}return f.call(this,c,g)}}return $o}var ph;function $a(){if(ph)return zt;ph=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.EthereumProviderError=zt.EthereumRpcError=void 0;const e=wy();class t extends Error{constructor(o,a,d){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!a||typeof a!="string")throw new Error('"message" must be a nonempty string.');super(a),this.code=o,d!==void 0&&(this.data=d)}serialize(){const o={code:this.code,message:this.message};return this.data!==void 0&&(o.data=this.data),this.stack&&(o.stack=this.stack),o}toString(){return e.default(this.serialize(),l,2)}}zt.EthereumRpcError=t;class r extends t{constructor(o,a,d){if(!n(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,a,d)}}zt.EthereumProviderError=r;function n(i){return Number.isInteger(i)&&i>=1e3&&i<=4999}function l(i,o){if(o!=="[Circular]")return o}return zt}var Vo={},Gt={},gh;function Va(){return gh||(gh=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.errorValues=Gt.errorCodes=void 0,Gt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Gt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}),Gt}var yh;function r0(){return yh||(yh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Va(),r=$a(),n=t.errorCodes.rpc.internal,l="Unspecified error message. This is a bug, please report it.",i={code:n,message:o(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(f,c=l){if(Number.isInteger(f)){const g=f.toString();if(s(t.errorValues,g))return t.errorValues[g].message;if(u(f))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return c}e.getMessageFromCode=o;function a(f){if(!Number.isInteger(f))return!1;const c=f.toString();return!!(t.errorValues[c]||u(f))}e.isValidCode=a;function d(f,{fallbackError:c=i,shouldIncludeStack:g=!1}={}){var _,m;if(!c||!Number.isInteger(c.code)||typeof c.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(f instanceof r.EthereumRpcError)return f.serialize();const h={};if(f&&typeof f=="object"&&!Array.isArray(f)&&s(f,"code")&&a(f.code)){const w=f;h.code=w.code,w.message&&typeof w.message=="string"?(h.message=w.message,s(w,"data")&&(h.data=w.data)):(h.message=o(h.code),h.data={originalError:p(f)})}else{h.code=c.code;const w=(_=f)===null||_===void 0?void 0:_.message;h.message=w&&typeof w=="string"?w:c.message,h.data={originalError:p(f)}}const b=(m=f)===null||m===void 0?void 0:m.stack;return g&&f&&b&&typeof b=="string"&&(h.stack=b),h}e.serializeError=d;function u(f){return f>=-32099&&f<=-32e3}function p(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function s(f,c){return Object.prototype.hasOwnProperty.call(f,c)}})(Vo)),Vo}var Jr={},mh;function Ey(){if(mh)return Jr;mh=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.ethErrors=void 0;const e=$a(),t=r0(),r=Va();Jr.ethErrors={rpc:{parse:o=>n(r.errorCodes.rpc.parse,o),invalidRequest:o=>n(r.errorCodes.rpc.invalidRequest,o),invalidParams:o=>n(r.errorCodes.rpc.invalidParams,o),methodNotFound:o=>n(r.errorCodes.rpc.methodNotFound,o),internal:o=>n(r.errorCodes.rpc.internal,o),server:o=>{if(!o||typeof o!="object"||Array.isArray(o))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:a}=o;if(!Number.isInteger(a)||a>-32005||a<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(a,o)},invalidInput:o=>n(r.errorCodes.rpc.invalidInput,o),resourceNotFound:o=>n(r.errorCodes.rpc.resourceNotFound,o),resourceUnavailable:o=>n(r.errorCodes.rpc.resourceUnavailable,o),transactionRejected:o=>n(r.errorCodes.rpc.transactionRejected,o),methodNotSupported:o=>n(r.errorCodes.rpc.methodNotSupported,o),limitExceeded:o=>n(r.errorCodes.rpc.limitExceeded,o)},provider:{userRejectedRequest:o=>l(r.errorCodes.provider.userRejectedRequest,o),unauthorized:o=>l(r.errorCodes.provider.unauthorized,o),unsupportedMethod:o=>l(r.errorCodes.provider.unsupportedMethod,o),disconnected:o=>l(r.errorCodes.provider.disconnected,o),chainDisconnected:o=>l(r.errorCodes.provider.chainDisconnected,o),custom:o=>{if(!o||typeof o!="object"||Array.isArray(o))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:a,message:d,data:u}=o;if(!d||typeof d!="string")throw new Error('"message" must be a nonempty string');return new e.EthereumProviderError(a,d,u)}}};function n(o,a){const[d,u]=i(a);return new e.EthereumRpcError(o,d||t.getMessageFromCode(o),u)}function l(o,a){const[d,u]=i(a);return new e.EthereumProviderError(o,d||t.getMessageFromCode(o),u)}function i(o){if(o){if(typeof o=="string")return[o];if(typeof o=="object"&&!Array.isArray(o)){const{message:a,data:d}=o;if(a&&typeof a!="string")throw new Error("Must specify string message.");return[a||void 0,d]}}return[]}return Jr}var _h;function Sy(){return _h||(_h=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=$a();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=r0();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=Ey();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const l=Va();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return l.errorCodes}})})(Wo)),Wo}var vh;function n0(){if(vh)return Vt;vh=1;var e=Vt&&Vt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.JsonRpcEngine=void 0;const t=e(by()),r=Sy();let n=class lt extends t.default{constructor(){super(),this._middleware=[]}push(o){this._middleware.push(o)}handle(o,a){if(a&&typeof a!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(o)?a?this._handleBatch(o,a):this._handleBatch(o):a?this._handle(o,a):this._promiseHandle(o)}asMiddleware(){return async(o,a,d,u)=>{try{const[p,s,f]=await lt._runAllMiddleware(o,a,this._middleware);return s?(await lt._runReturnHandlers(f),u(p)):d(async c=>{try{await lt._runReturnHandlers(f)}catch(g){return c(g)}return c()})}catch(p){return u(p)}}}async _handleBatch(o,a){try{const d=await Promise.all(o.map(this._promiseHandle.bind(this)));return a?a(null,d):d}catch(d){if(a)return a(d);throw d}}_promiseHandle(o){return new Promise(a=>{this._handle(o,(d,u)=>{a(u)})})}async _handle(o,a){if(!o||Array.isArray(o)||typeof o!="object"){const s=new r.EthereumRpcError(r.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof o}`,{request:o});return a(s,{id:void 0,jsonrpc:"2.0",error:s})}if(typeof o.method!="string"){const s=new r.EthereumRpcError(r.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof o.method}`,{request:o});return a(s,{id:o.id,jsonrpc:"2.0",error:s})}const d=Object.assign({},o),u={id:d.id,jsonrpc:d.jsonrpc};let p=null;try{await this._processRequest(d,u)}catch(s){p=s}return p&&(delete u.result,u.error||(u.error=r.serializeError(p))),a(p,u)}async _processRequest(o,a){const[d,u,p]=await lt._runAllMiddleware(o,a,this._middleware);if(lt._checkForCompletion(o,a,u),await lt._runReturnHandlers(p),d)throw d}static async _runAllMiddleware(o,a,d){const u=[];let p=null,s=!1;for(const f of d)if([p,s]=await lt._runMiddleware(o,a,f,u),s)break;return[p,s,u.reverse()]}static _runMiddleware(o,a,d,u){return new Promise(p=>{const s=c=>{const g=c||a.error;g&&(a.error=r.serializeError(g)),p([g,!0])},f=c=>{a.error?s(a.error):(c&&(typeof c!="function"&&s(new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof c}" for request: