@ape.swap/bonds-sdk 1.0.30 → 1.0.31
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.
- package/dist/cjs/index.js +141277 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +141257 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +8 -3
- package/dist/asset-manifest.json +0 -15
- package/dist/favicon.ico +0 -0
- package/dist/index.html +0 -1
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/manifest.json +0 -25
- package/dist/robots.txt +0 -3
- package/dist/static/css/main.f855e6bc.css +0 -2
- package/dist/static/css/main.f855e6bc.css.map +0 -1
- package/dist/static/js/453.31959e28.chunk.js +0 -2
- package/dist/static/js/453.31959e28.chunk.js.map +0 -1
- package/dist/static/js/main.8166fa54.js +0 -3
- package/dist/static/js/main.8166fa54.js.LICENSE.txt +0 -101
- package/dist/static/js/main.8166fa54.js.map +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see main.8166fa54.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={7043:(t,e,r)=>{"use strict";r.d(e,{Rj:()=>u,Kq:()=>l});var n=r(2776),i=(r(9106),r(3678)),o=r(4589);var s=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const a=new o.Vy("abstract-provider/5.7.0");class u extends i.VY{static isForkEvent(t){return!(!t||!t._isForkEvent)}}class l{constructor(){a.checkAbstract(new.target,l),(0,i.yY)(this,"_isProvider",!0)}getFeeData(){return s(this,void 0,void 0,(function*(){const{block:t,gasPrice:e}=yield(0,i.k_)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((t=>null))});let r=null,o=null,s=null;return t&&t.baseFeePerGas&&(r=t.baseFeePerGas,s=n.gH.from("1500000000"),o=t.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:s,gasPrice:e}}))}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!(!t||!t._isProvider)}}},8298:(t,e,r)=>{"use strict";r.d(e,{l:()=>l,J:()=>c});var n=r(3678),i=r(4589);var o=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const s=new i.Vy("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],u=[i.Vy.errors.INSUFFICIENT_FUNDS,i.Vy.errors.NONCE_EXPIRED,i.Vy.errors.REPLACEMENT_UNDERPRICED];class l{constructor(){s.checkAbstract(new.target,l),(0,n.yY)(this,"_isSigner",!0)}getBalance(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)}))}getTransactionCount(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)}))}estimateGas(t){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const e=yield(0,n.k_)(this.checkTransaction(t));return yield this.provider.estimateGas(e)}))}call(t,e){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.k_)(this.checkTransaction(t));return yield this.provider.call(r,e)}))}sendTransaction(t){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const e=yield this.populateTransaction(t),r=yield this.signTransaction(e);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)}))}checkTransaction(t){for(const r in t)-1===a.indexOf(r)&&s.throwArgumentError("invalid transaction key: "+r,"transaction",t);const e=(0,n.Ic)(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then((e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",t),e[0]))),e}populateTransaction(t){return o(this,void 0,void 0,(function*(){const e=yield(0,n.k_)(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then((t=>o(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.resolveName(t);return null==e&&s.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})))),e.to.catch((t=>{})));const r=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null==e.gasPrice||2!==e.type&&!r?0!==e.type&&1!==e.type||!r||s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==e.type&&null!=e.type||null==e.maxFeePerGas||null==e.maxPriorityFeePerGas)if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{const t=yield this.getFeeData();if(null==e.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(e.type=2,null!=e.gasPrice){const t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(r&&s.throwError("network does not support EIP-1559",i.Vy.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):s.throwError("failed to get consistent fee data",i.Vy.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else e.type=2;return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch((t=>{if(u.indexOf(t.code)>=0)throw t;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Vy.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})}))),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then((e=>(0!==e[1]&&e[0]!==e[1]&&s.throwArgumentError("chainId address mismatch","transaction",t),e[0]))),yield(0,n.k_)(e)}))}_checkProvider(t){this.provider||s.throwError("missing provider",i.Vy.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!(!t||!t._isSigner)}}class c extends l{constructor(t,e){super(),(0,n.yY)(this,"address",t),(0,n.yY)(this,"provider",e||null)}getAddress(){return Promise.resolve(this.address)}_fail(t,e){return Promise.resolve().then((()=>{s.throwError(t,i.Vy.errors.UNSUPPORTED_OPERATION,{operation:e})}))}signMessage(t){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(t,e,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(t){return new c(this.address,t)}}},8987:(t,e,r)=>{"use strict";r.r(e),r.d(e,{getAddress:()=>d,getContractAddress:()=>g,getCreate2Address:()=>v,getIcapAddress:()=>m,isAddress:()=>p});var n=r(9106),i=r(2776),o=r(9547),s=r(6465);const a=new(r(4589).Vy)("address/5.7.0");function u(t){(0,n.Lo)(t,20)||a.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=e[n].charCodeAt(0);const i=(0,n.k9)((0,o.S)(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(15&i[n>>1])>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}const l={};for(let y=0;y<10;y++)l[String(y)]=String(y);for(let y=0;y<26;y++)l[String.fromCharCode(65+y)]=String(10+y);const c=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));var h;function f(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>l[t])).join("");for(;e.length>=c;){let t=e.substring(0,c);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function d(t){let e=null;if("string"!==typeof t&&a.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=u(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&a.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==f(t)&&a.throwArgumentError("bad icap checksum","address",t),e=(0,i.Os)(t.substring(4));e.length<40;)e="0"+e;e=u("0x"+e)}else a.throwArgumentError("invalid address","address",t);return e}function p(t){try{return d(t),!0}catch(e){}return!1}function m(t){let e=(0,i.ii)(d(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+f("XE00"+e)+e}function g(t){let e=null;try{e=d(t.from)}catch(u){a.throwArgumentError("missing from address","transaction",t)}const r=(0,n.gr)((0,n.k9)(i.gH.from(t.nonce).toHexString()));return d((0,n.Ab)((0,o.S)((0,s.l)([e,r])),12))}function v(t,e,r){return 32!==(0,n.cm)(e)&&a.throwArgumentError("salt must be 32 bytes","salt",e),32!==(0,n.cm)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),d((0,n.Ab)((0,o.S)((0,n.xW)(["0xff",d(t),e,r])),12))}},7662:(t,e,r)=>{"use strict";r.d(e,{D:()=>i,l:()=>o});var n=r(9106);function i(t){t=atob(t);const e=[];for(let r=0;r<t.length;r++)e.push(t.charCodeAt(r));return(0,n.k9)(e)}function o(t){t=(0,n.k9)(t);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}},6700:(t,e,r)=>{"use strict";r.d(e,{r:()=>n});const n="bignumber/5.7.0"},2776:(t,e,r)=>{"use strict";r.d(e,{Os:()=>w,YR:()=>f,gH:()=>p,ii:()=>b});var n=r(6373),i=r.n(n),o=r(9106),s=r(4589),a=r(6700),u=i().BN;const l=new s.Vy(a.r),c={},h=9007199254740991;function f(t){return null!=t&&(p.isBigNumber(t)||"number"===typeof t&&t%1===0||"string"===typeof t&&!!t.match(/^-?[0-9]+$/)||(0,o.Lo)(t)||"bigint"===typeof t||(0,o.aY)(t))}let d=!1;class p{constructor(t,e){t!==c&&l.throwError("cannot call constructor directly; use BigNumber.from",s.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return g(v(this).fromTwos(t))}toTwos(t){return g(v(this).toTwos(t))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(t){return g(v(this).add(v(t)))}sub(t){return g(v(this).sub(v(t)))}div(t){return p.from(t).isZero()&&y("division-by-zero","div"),g(v(this).div(v(t)))}mul(t){return g(v(this).mul(v(t)))}mod(t){const e=v(t);return e.isNeg()&&y("division-by-zero","mod"),g(v(this).umod(e))}pow(t){const e=v(t);return e.isNeg()&&y("negative-power","pow"),g(v(this).pow(e))}and(t){const e=v(t);return(this.isNegative()||e.isNeg())&&y("unbound-bitwise-result","and"),g(v(this).and(e))}or(t){const e=v(t);return(this.isNegative()||e.isNeg())&&y("unbound-bitwise-result","or"),g(v(this).or(e))}xor(t){const e=v(t);return(this.isNegative()||e.isNeg())&&y("unbound-bitwise-result","xor"),g(v(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&y("negative-width","mask"),g(v(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&y("negative-width","shl"),g(v(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&y("negative-width","shr"),g(v(this).shrn(t))}eq(t){return v(this).eq(v(t))}lt(t){return v(this).lt(v(t))}lte(t){return v(this).lte(v(t))}gt(t){return v(this).gt(v(t))}gte(t){return v(this).gte(v(t))}isNegative(){return"-"===this._hex[0]}isZero(){return v(this).isZero()}toNumber(){try{return v(this).toNumber()}catch(t){y("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return l.throwError("this platform does not support BigInt",s.Vy.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?d||(d=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Vy.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",s.Vy.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof p)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new p(c,m(t)):t.match(/^-?[0-9]+$/)?new p(c,m(new u(t))):l.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&y("underflow","BigNumber.from",t),(t>=h||t<=-h)&&y("overflow","BigNumber.from",t),p.from(String(t));const e=t;if("bigint"===typeof e)return p.from(e.toString());if((0,o.aY)(e))return p.from((0,o.c$)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return p.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&((0,o.Lo)(t)||"-"===t[0]&&(0,o.Lo)(t.substring(1))))return p.from(t)}return l.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function m(t){if("string"!==typeof t)return m(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&l.throwArgumentError("invalid hex","value",t),"0x00"===(t=m(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function g(t){return p.from(m(t))}function v(t){const e=p.from(t).toHexString();return"-"===e[0]?new u("-"+e.substring(3),16):new u(e.substring(2),16)}function y(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),l.throwError(t,s.Vy.errors.NUMERIC_FAULT,n)}function w(t){return new u(t,36).toString(16)}function b(t){return new u(t,16).toString(36)}},9106:(t,e,r)=>{"use strict";r.d(e,{k9:()=>l,xW:()=>c,qn:()=>v,cm:()=>m,Ab:()=>g,Fh:()=>y,bj:()=>w,c$:()=>p,aY:()=>u,f:()=>s,Lo:()=>f,Pc:()=>b,gr:()=>h});const n=new(r(4589).Vy)("bytes/5.7.0");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function s(t){return f(t)&&!(t.length%2)||u(t)}function a(t){return"number"===typeof t&&t==t&&t%1===0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!a(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(!a(r)||r<0||r>=256)return!1}return!0}function l(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),f(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;t<r.length;t+=2)i.push(parseInt(r.substring(t,t+2),16));return o(new Uint8Array(i))}return u(t)?o(new Uint8Array(t)):n.throwArgumentError("invalid arrayify value","value",t)}function c(t){const e=t.map((t=>l(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function h(t){let e=l(t);if(0===e.length)return e;let r=0;for(;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function f(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const d="0123456789abcdef";function p(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=d[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t))return t.toHexString();if(f(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(u(t)){let e="0x";for(let r=0;r<t.length;r++){let n=t[r];e+=d[(240&n)>>4]+d[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function m(t){if("string"!==typeof t)t=p(t);else if(!f(t)||t.length%2)return null;return(t.length-2)/2}function g(t,e,r){return"string"!==typeof t?t=p(t):(!f(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function v(t){let e="0x";return t.forEach((t=>{e+=p(t).substring(2)})),e}function y(t){const e=function(t){"string"!==typeof t&&(t=p(t));f(t)||n.throwArgumentError("invalid hex string","value",t);t=t.substring(2);let e=0;for(;e<t.length&&"0"===t[e];)e++;return"0x"+t.substring(e)}(p(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function w(t,e){for("string"!==typeof t?t=p(t):f(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function b(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(t)){let r=l(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64))):65===r.length?(e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=p(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=function(t,e){(t=l(t)).length>e&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}(l(e._vs),32);e._vs=p(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const s=p(r);null==e.s?e.s=s:e.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&f(e.r)?e.r=w(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&f(e.s)?e.s=w(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=l(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=p(r);e._vs&&(f(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=w(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}},4301:(t,e,r)=>{"use strict";r.d(e,{Is:()=>a,XK:()=>o,eR:()=>i,pD:()=>s});var n=r(2776);const i=n.gH.from(-1),o=n.gH.from(0),s=n.gH.from(1),a=n.gH.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},6171:(t,e,r)=>{"use strict";r.d(e,{r:()=>n});const n="hash/5.7.0"},413:(t,e,r)=>{"use strict";r.d(e,{id:()=>o});var n=r(9547),i=r(2614);function o(t){return(0,n.S)((0,i.YW)(t))}},9547:(t,e,r)=>{"use strict";r.d(e,{S:()=>s});var n=r(2161),i=r.n(n),o=r(9106);function s(t){return"0x"+i().keccak_256((0,o.k9)(t))}},4589:(t,e,r)=>{"use strict";r.d(e,{Vy:()=>f});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=o.default,a=null;const u=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var l,c;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(l||(l={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(c||(c={}));const h="0123456789abcdef";class f{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),s>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this._log(f.levels.DEBUG,e)}info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this._log(f.levels.INFO,e)}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this._log(f.levels.WARNING,e)}makeError(t,e,r){if(i)return this.makeError("censored error",e,{});e||(e=f.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t<e.length;t++)r+=h[e[t]>>4],r+=h[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(a){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let s="";switch(e){case c.NUMERIC_FAULT:{s="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,f.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,f.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return a||(a=new f("logger/5.7.0")),a}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?s=e:f.globalLogger().warn("invalid log level - "+t)}static from(t){return new f(t)}}f.errors=c,f.levels=l},3020:(t,e,r)=>{"use strict";r.d(e,{N:()=>c});const n=new(r(4589).Vy)("networks/5.7.1");function i(t){const e=function(e,r){null==r&&(r={});const n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(i){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(i){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(i){}if(e.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new e.PocketProvider(t,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(i){}}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(i){}if(e.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new e.AnkrProvider(t,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(i){}if(0===n.length)return null;if(e.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===t&&(i=2),new e.FallbackProvider(n,i)}return n[0]};return e.renetwork=function(t){return i(t)},e}function o(t,e){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return o(t,e)},r}const s={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},a={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},u={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},l={unspecified:{chainId:0,name:"unspecified"},homestead:s,mainnet:s,morden:{chainId:2,name:"morden"},ropsten:a,testnet:a,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u,classicTestnet:u,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function c(t){if(null==t)return null;if("number"===typeof t){for(const e in l){const r=l[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"===typeof t){const e=l[t];return null==e?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}const e=l[t.name];if(!e)return"number"!==typeof t.chainId&&n.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&n.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;var i;return null==r&&e._defaultProvider&&(r=(i=e._defaultProvider)&&"function"===typeof i.renetwork?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}},3678:(t,e,r)=>{"use strict";r.d(e,{VY:()=>m,qN:()=>l,A4:()=>p,yY:()=>s,$J:()=>a,k_:()=>u,Ic:()=>c});var n=r(4589);var i=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const o=new n.Vy("properties/5.7.0");function s(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function a(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!==typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function u(t){return i(this,void 0,void 0,(function*(){const e=Object.keys(t).map((e=>{const r=t[e];return Promise.resolve(r).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function l(t,e){t&&"object"===typeof t||o.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((r=>{e[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)}))}function c(t){const e={};for(const r in t)e[r]=t[r];return e}const h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f(t){if(void 0===t||null===t||h[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;n<r.length;n++){let i=null;try{i=t[r[n]]}catch(e){continue}if(!f(i))return!1}return!0}return o.throwArgumentError("Cannot deepCopy ".concat(typeof t),"object",t)}function d(t){if(f(t))return t;if(Array.isArray(t))return Object.freeze(t.map((t=>p(t))));if("object"===typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&s(e,r,p(n))}return e}return o.throwArgumentError("Cannot deepCopy ".concat(typeof t),"object",t)}function p(t){return d(t)}class m{constructor(t){for(const e in t)this[e]=p(t[e])}}},2171:(t,e,r)=>{"use strict";r.d(e,{r:()=>n});const n="providers/5.7.2"},3031:(t,e,r)=>{"use strict";r.d(e,{DJ:()=>yt,xR:()=>mt});var n=r(7043),i=r(7662),o=r(9106),s=r(3678);class a{constructor(t){(0,s.yY)(this,"alphabet",t),(0,s.yY)(this,"base",t.length),(0,s.yY)(this,"_alphabetMap",{}),(0,s.yY)(this,"_leader",t.charAt(0));for(let e=0;e<t.length;e++)this._alphabetMap[t.charAt(e)]=e}encode(t){let e=(0,o.k9)(t);if(0===e.length)return"";let r=[0];for(let i=0;i<e.length;++i){let t=e[i];for(let e=0;e<r.length;++e)t+=r[e]<<8,r[e]=t%this.base,t=t/this.base|0;for(;t>0;)r.push(t%this.base),t=t/this.base|0}let n="";for(let i=0;0===e[i]&&i<e.length-1;++i)n+=this._leader;for(let i=r.length-1;i>=0;--i)n+=this.alphabet[r[i]];return n}decode(t){if("string"!==typeof t)throw new TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let r=0;r<t.length;r++){let n=this._alphabetMap[t[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let i=n;for(let t=0;t<e.length;++t)i+=e[t]*this.base,e[t]=255&i,i>>=8;for(;i>0;)e.push(255&i),i>>=8}for(let r=0;t[r]===this._leader&&r<t.length-1;++r)e.push(0);return(0,o.k9)(new Uint8Array(e.reverse()))}}new a("abcdefghijklmnopqrstuvwxyz234567");const u=new a("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var l=r(2776);var c=r(2614),h=r(9547),f=r(4589),d=r(6171);function p(t,e){null==e&&(e=1);const r=[],n=r.forEach,i=function(t,e){n.call(t,(function(t){e>0&&Array.isArray(t)?i(t,e-1):r.push(t)}))};return i(t,e),r}function m(t){return function(t){let e=0;return()=>t[e++]}(function(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let b=1;b<n;b++)o.push(i+=r());let s=r(),a=e;e+=s;let u=0,l=0;function c(){return 0==u&&(l=l<<8|t[e++],u=8),l>>--u&1}const h=Math.pow(2,31),f=h>>>1,d=f>>1,p=h-1;let m=0;for(let b=0;b<31;b++)m=m<<1|c();let g=[],v=0,y=h;for(;;){let t=Math.floor(((m-v+1)*i-1)/y),e=0,r=n;for(;r-e>1;){let n=e+r>>>1;t<o[n]?r=n:e=n}if(0==e)break;g.push(e);let s=v+Math.floor(y*o[e]/i),a=v+Math.floor(y*o[e+1]/i)-1;for(;0==((s^a)&f);)m=m<<1&p|c(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&d;)m=m&f|m<<1&p>>>1|c(),s=s<<1^f,a=(a^f)<<1|f|1;v=s,y=1+a-s}let w=n-4;return g.map((e=>{switch(e-w){case 3:return w+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return w+256+(t[a++]<<8|t[a++]);case 1:return w+t[a++];default:return e-1}}))}(t))}function g(t){return 1&t?~t>>1:t>>1}function v(t,e){let r=Array(t);for(let n=0,i=-1;n<t;n++)r[n]=i+=1+e();return r}function y(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=g(e());return r}function w(t,e){let r=v(t(),t),n=t(),i=v(n,t),o=function(t,e){let r=Array(t);for(let n=0;n<t;n++)r[n]=1+e();return r}(n,t);for(let s=0;s<n;s++)for(let t=0;t<o[s];t++)r.push(i[s]+t);return e?r.map((t=>e[t])):r}function b(t,e,r){let n=Array(t).fill(void 0).map((()=>[]));for(let i=0;i<e;i++)y(t,r).forEach(((t,e)=>n[e].push(t)));return n}function _(t,e){let r=1+e(),n=e(),i=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(r)}return e}(e);return p(b(i.length,1+t,e).map(((t,e)=>{const o=t[0],s=t.slice(1);return Array(i[e]).fill(void 0).map(((t,e)=>{let i=e*n;return[o+e*r,s.map((t=>t+i))]}))})))}function M(t,e){return b(1+e(),1+t,e).map((t=>[t[0],t.slice(1)]))}const E=m((0,i.D)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),k=new Set(w(E)),A=new Set(w(E)),x=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(_(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(M(r,t))}return function(t){const e={};for(let r=0;r<t.length;r++){const n=t[r];e[n[0]]=n[1]}return e}(p(e))}(E),S=function(t){let e=w(t).sort(((t,e)=>t-e));return function r(){let n=[];for(;;){let i=w(t,e);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((t,e)=>e.set.size-t.set.size));let i=t(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:s,save:1==i,check:2==i}}()}(E),N=45,C=95;function I(t){return(0,c.dg)(t)}function P(t){return t.filter((t=>65039!=t))}function R(t){for(let r of t.split(".")){let t=I(r);try{for(let e=t.lastIndexOf(C)-1;e>=0;e--)if(t[e]!==C)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every((t=>t<128))&&t[2]===N&&t[3]===N)throw new Error("invalid label extension")}catch(e){throw new Error('Invalid label "'.concat(r,'": ').concat(e.message))}}return t}function O(t){return R(function(t,e){let r=I(t).reverse(),n=[];for(;r.length;){let t=T(r);if(t){n.push(...e(t));continue}let i=r.pop();if(k.has(i)){n.push(i);continue}if(A.has(i))continue;let o=x[i];if(!o)throw new Error("Disallowed codepoint: 0x".concat(i.toString(16).toUpperCase()));n.push(...o)}return R((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(t,P))}function T(t,e){var r;let n,i,o=S,s=[],a=t.length;for(e&&(e.length=0);a;){let u=t[--a];if(o=null===(r=o.branches.find((t=>t.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;s.push(u),o.fe0f&&(s.push(65039),a>0&&65039==t[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return n}const B=new f.Vy(d.r),L=new Uint8Array(32);function j(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function F(t){const e=(0,c.YW)(O(t)),r=[];if(0===t.length)return r;let n=0;for(let i=0;i<e.length;i++){46===e[i]&&(r.push(j(e.slice(n,i))),n=i+1)}if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(j(e.slice(n))),r}function U(t){"string"!==typeof t&&B.throwArgumentError("invalid ENS name; not a string","name",t);let e=L;const r=F(t);for(;r.length;)e=(0,h.S)((0,o.xW)([e,(0,h.S)(r.pop())]));return(0,o.c$)(e)}L.fill(0);var D=r(3020),z=r(3697),q=r.n(z);new f.Vy("sha2/5.7.0");function V(t){return"0x"+q().sha256().update((0,o.k9)(t)).digest("hex")}var H=r(4031),W=r(2943),Y=r.n(W),K=r(2171),G=r(479),J=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Q=new f.Vy(K.r);function Z(t){return null==t?"null":(32!==(0,o.cm)(t)&&Q.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function X(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((t=>{if(Array.isArray(t)){const e={};t.forEach((t=>{e[Z(t)]=!0}));const r=Object.keys(e);return r.sort(),r.join("|")}return Z(t)})).join("&")}function $(t){if("string"===typeof t){if(t=t.toLowerCase(),32===(0,o.cm)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+X(t);if(n.Rj.isForkEvent(t))throw Q.warn("not implemented"),new Error("not implemented");if(t&&"object"===typeof t)return"filter:"+(t.address||"*")+":"+X(t.topics||[])}throw new Error("invalid event - "+t)}function tt(){return(new Date).getTime()}function et(t){return new Promise((e=>{setTimeout(e,t)}))}const rt=["block","network","pending","poll"];class nt{constructor(t,e,r){(0,s.yY)(this,"tag",t),(0,s.yY)(this,"listener",e),(0,s.yY)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}get filter(){const t=this.tag.split(":");if("filter"!==t[0])return null;const e=t[1],r=""===(n=t[2])?[]:n.split(/&/g).map((t=>{if(""===t)return[];const e=t.split("|").map((t=>"null"===t?null:t));return 1===e.length?e[0]:e}));var n;const i={};return r.length>0&&(i.topics=r),e&&"*"!==e&&(i.address=e),i}pollable(){return this.tag.indexOf(":")>=0||rt.indexOf(this.tag)>=0}}const it={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ot(t){return(0,o.bj)(l.gH.from(t).toHexString(),32)}function st(t){return u.encode((0,o.xW)([t,(0,o.Ab)(V(V(t)),0,4)]))}const at=new RegExp("^(ipfs)://(.*)$","i"),ut=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),at,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function lt(t,e){try{return(0,c._v)(ct(t,e))}catch(r){}return null}function ct(t,e){if("0x"===t)return null;const r=l.gH.from((0,o.Ab)(t,e,e+32)).toNumber(),n=l.gH.from((0,o.Ab)(t,r,r+32)).toNumber();return(0,o.Ab)(t,r+32,r+32+n)}function ht(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Q.throwArgumentError("unsupported IPFS format","link",t),"https://gateway.ipfs.io/ipfs/".concat(t)}function ft(t){const e=(0,o.k9)(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function dt(t){if(t.length%32===0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function pt(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(null),r+=32;for(let n=0;n<t.length;n++){const i=(0,o.k9)(t[n]);e[n]=ft(r),e.push(ft(i.length)),e.push(dt(i)),r+=32+32*Math.ceil(i.length/32)}return(0,o.qn)(e)}class mt{constructor(t,e,r,n){(0,s.yY)(this,"provider",t),(0,s.yY)(this,"name",r),(0,s.yY)(this,"address",t.formatter.address(e)),(0,s.yY)(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((t=>l.gH.from(t).eq(1))).catch((t=>{if(t.code===f.Vy.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t}))),this._supportsEip2544}_fetch(t,e){return J(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,o.qn)([t,U(this.name),e||"0x"])};let n=!1;var i;(yield this.supportsWildcard())&&(n=!0,r.data=(0,o.qn)(["0x9061b923",pt([(i=this.name,(0,o.c$)((0,o.xW)(F(i).map((t=>{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"),r.data])]));try{let t=yield this.provider.call(r);return(0,o.k9)(t).length%32===4&&Q.throwError("resolver threw error",f.Vy.errors.CALL_EXCEPTION,{transaction:r,data:t}),n&&(t=ct(t,0)),t}catch(s){if(s.code===f.Vy.errors.CALL_EXCEPTION)return null;throw s}}))}_fetchBytes(t,e){return J(this,void 0,void 0,(function*(){const r=yield this._fetch(t,e);return null!=r?ct(r,0):null}))}_getAddress(t,e){const r=it[String(t)];if(null==r&&Q.throwError("unsupported coin type: ".concat(t),f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")")}),"eth"===r.ilk)return this.provider.formatter.address(e);const n=(0,o.k9)(e);if(null!=r.p2pkh){const t=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return st((0,o.xW)([[r.p2pkh],"0x"+t[2]]))}}if(null!=r.p2sh){const t=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return st((0,o.xW)([[r.p2sh],"0x"+t[2]]))}}if(null!=r.prefix){const t=n[1];let e=n[0];if(0===e?20!==t&&32!==t&&(e=-1):e=-1,e>=0&&n.length===2+t&&t>=1&&t<=75){const t=Y().toWords(n.slice(2));return t.unshift(e),Y().encode(r.prefix,t)}}return null}getAddress(t){return J(this,void 0,void 0,(function*(){if(null==t&&(t=60),60===t)try{const t=yield this._fetch("0x3b3b57de");return"0x"===t||"0x0000000000000000000000000000000000000000000000000000000000000000"===t?null:this.provider.formatter.callAddress(t)}catch(n){if(n.code===f.Vy.errors.CALL_EXCEPTION)return null;throw n}const e=yield this._fetchBytes("0xf1cb7e06",ot(t));if(null==e||"0x"===e)return null;const r=this._getAddress(t,e);return null==r&&Q.throwError("invalid or unsupported coin data",f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")"),coinType:t,data:e}),r}))}getAvatar(){return J(this,void 0,void 0,(function*(){const t=[{type:"name",content:this.name}];try{const e=yield this.getText("avatar");if(null==e)return null;for(let r=0;r<ut.length;r++){const n=e.match(ut[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":return t.push({type:"url",content:e}),{linkage:t,url:e};case"data":return t.push({type:"data",content:e}),{linkage:t,url:e};case"ipfs":return t.push({type:"ipfs",content:e}),{linkage:t,url:ht(e)};case"erc721":case"erc1155":{const r="erc721"===i?"0xc87b56dd":"0x0e89341c";t.push({type:i,content:e});const s=this._resolvedAddress||(yield this.getAddress()),a=(n[2]||"").split("/");if(2!==a.length)return null;const u=yield this.provider.formatter.address(a[0]),c=(0,o.bj)(l.gH.from(a[1]).toHexString(),32);if("erc721"===i){const e=this.provider.formatter.callAddress(yield this.provider.call({to:u,data:(0,o.qn)(["0x6352211e",c])}));if(s!==e)return null;t.push({type:"owner",content:e})}else if("erc1155"===i){const e=l.gH.from(yield this.provider.call({to:u,data:(0,o.qn)(["0x00fdd58e",(0,o.bj)(s,32),c])}));if(e.isZero())return null;t.push({type:"balance",content:e.toString()})}const h={to:this.provider.formatter.address(a[0]),data:(0,o.qn)([r,c])};let f=lt(yield this.provider.call(h),0);if(null==f)return null;t.push({type:"metadata-url-base",content:f}),"erc1155"===i&&(f=f.replace("{id}",c.substring(2)),t.push({type:"metadata-url-expanded",content:f})),f.match(/^ipfs:/i)&&(f=ht(f)),t.push({type:"metadata-url",content:f});const d=yield(0,H.x6)(f);if(!d)return null;t.push({type:"metadata",content:JSON.stringify(d)});let p=d.image;if("string"!==typeof p)return null;if(p.match(/^(https:\/\/|data:)/i));else{if(null==p.match(at))return null;t.push({type:"url-ipfs",content:p}),p=ht(p)}return t.push({type:"url",content:p}),{linkage:t,url:p}}}}}catch(e){}return null}))}getContentHash(){return J(this,void 0,void 0,(function*(){const t=yield this._fetchBytes("0xbc1c58d1");if(null==t||"0x"===t)return null;const e=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const t=parseInt(e[3],16);if(e[4].length===2*t)return"ipfs://"+u.encode("0x"+e[1])}const r=t.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const t=parseInt(r[3],16);if(r[4].length===2*t)return"ipns://"+u.encode("0x"+r[1])}const n=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const o=t.match(/^0x90b2c605([0-9a-f]*)$/);if(o&&68===o[1].length){const t={"=":"","+":"-","/":"_"};return"sia://"+(0,i.l)("0x"+o[1]).replace(/[=+\/]/g,(e=>t[e]))}return Q.throwError("invalid or unsupported content hash data",f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})}))}getText(t){return J(this,void 0,void 0,(function*(){let e=(0,c.YW)(t);e=(0,o.xW)([ot(64),ot(e.length),e]),e.length%32!==0&&(e=(0,o.xW)([e,(0,o.bj)("0x",32-t.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,o.c$)(e));return null==r||"0x"===r?null:(0,c._v)(r)}))}}let gt=null,vt=1;class yt extends n.Kq{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,s.yY)(this,"anyNetwork","any"===t),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch((t=>{})),this._ready().catch((t=>{}));else{const e=(0,s.$J)(new.target,"getNetwork")(t);e?((0,s.yY)(this,"_network",e),this.emit("network",e,null)):Q.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return J(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(t){}null==e&&(e=yield this.detectNetwork()),e||Q.throwError("no network detected",f.Vy.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,s.yY)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return(0,H.wt)((()=>this._ready().then((t=>t),(t=>{if(t.code!==f.Vy.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))))}static getFormatter(){return null==gt&&(gt=new G.ZA),gt}static getNetwork(t){return(0,D.N)(null==t?"homestead":t)}ccipReadFetch(t,e,r){return J(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let t=0;t<r.length;t++){const e=r[t],s=e.replace("{sender}",n).replace("{data}",i),a=e.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),u=yield(0,H.x6)({url:s,errorPassThrough:!0},a,((t,e)=>(t.status=e.statusCode,t)));if(u.data)return u.data;const l=u.message||"unknown error";if(u.status>=400&&u.status<500)return Q.throwError("response not found during CCIP fetch: ".concat(l),f.Vy.errors.SERVER_ERROR,{url:e,errorMessage:l});o.push(l)}return Q.throwError("error encountered during CCIP fetch: ".concat(o.map((t=>JSON.stringify(t))).join(", ")),f.Vy.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(t){return J(this,void 0,void 0,(function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){const e=this._internalBlockNumber;try{const r=yield e;if(tt()-r.respTime<=t)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===e)break}}const e=tt(),r=(0,s.k_)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((t=>null),(t=>t))}).then((t=>{let{blockNumber:n,networkError:i}=t;if(i)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),i;const o=tt();return n=l.gH.from(n).toNumber(),n<this._maxInternalBlockNumber&&(n=this._maxInternalBlockNumber),this._maxInternalBlockNumber=n,this._setFastBlockNumber(n),{blockNumber:n,reqTime:e,respTime:o}}));return this._internalBlockNumber=r,r.catch((t=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return J(this,void 0,void 0,(function*(){const t=vt++,e=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",t,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Q.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(r,")")),this.emit("error",Q.makeError("network block skew detected",f.Vy.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let t=this._emitted.block+1;t<=r;t++)this.emit("block",t);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((t=>{if("block"===t)return;const e=this._emitted[t];"pending"!==e&&r-e>12&&delete this._emitted[t]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((t=>{switch(t.type){case"tx":{const r=t.hash;let n=this.getTransactionReceipt(r).then((t=>t&&null!=t.blockNumber?(this._emitted["t:"+r]=t.blockNumber,this.emit(r,t),null):null)).catch((t=>{this.emit("error",t)}));e.push(n);break}case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=r-1);const n=t.filter;n.fromBlock=t._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((e=>{t._inflight=!1,0!==e.length&&e.forEach((e=>{e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(n,e)}))})).catch((e=>{this.emit("error",e),t._inflight=!1}));e.push(o)}}})),this._lastBlockNumber=r,Promise.all(e).then((()=>{this.emit("didPoll",t)})).catch((t=>{this.emit("error",t)}))}else this.emit("didPoll",t)}))}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return J(this,void 0,void 0,(function*(){return Q.throwError("provider does not support network detection",f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return J(this,void 0,void 0,(function*(){const t=yield this._ready(),e=yield this.detectNetwork();if(t.chainId!==e.chainId){if(this.anyNetwork)return this._network=e,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",e,t),yield et(0),this._network;const r=Q.makeError("underlying network changed",f.Vy.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:e});throw this.emit("error",r),r}return t}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((t=>{this._setFastBlockNumber(t)}),(t=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(t){t&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if("number"!==typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const t=tt();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=tt(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,e,r){return J(this,void 0,void 0,(function*(){return this._waitForTransaction(t,null==e?1:e,r||0,null)}))}_waitForTransaction(t,e,r,n){return J(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(t);return(i?i.confirmations:0)>=e?i:new Promise(((i,o)=>{const s=[];let a=!1;const u=function(){return!!a||(a=!0,s.forEach((t=>{t()})),!1)},l=t=>{t.confirmations<e||u()||i(t)};if(this.on(t,l),s.push((()=>{this.removeListener(t,l)})),n){let r=n.startBlock,i=null;const l=s=>J(this,void 0,void 0,(function*(){a||(yield et(1e3),this.getTransactionCount(n.from).then((c=>J(this,void 0,void 0,(function*(){if(!a){if(c<=n.nonce)r=s;else{{const e=yield this.getTransaction(t);if(e&&null!=e.blockNumber)return}for(null==i&&(i=r-3,i<n.startBlock&&(i=n.startBlock));i<=s;){if(a)return;const r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){const s=r.transactions[i];if(s.hash===t)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,e);if(u())return;let i="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?i="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(i="cancelled"),void o(Q.makeError("transaction was replaced",f.Vy.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(s),hash:t,receipt:r}))}}i++}}a||this.once("block",l)}}))),(t=>{a||this.once("block",l)})))}));if(a)return;this.once("block",l),s.push((()=>{this.removeListener("block",l)}))}if("number"===typeof r&&r>0){const t=setTimeout((()=>{u()||o(Q.makeError("timeout exceeded",f.Vy.errors.TIMEOUT,{timeout:r}))}),r);t.unref&&t.unref(),s.push((()=>{clearTimeout(t)}))}}))}))}getBlockNumber(){return J(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield this.perform("getGasPrice",{});try{return l.gH.from(t)}catch(e){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e})}}))}getBalance(t,e){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,s.k_)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getBalance",r);try{return l.gH.from(n)}catch(i){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:i})}}))}getTransactionCount(t,e){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,s.k_)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getTransactionCount",r);try{return l.gH.from(n).toNumber()}catch(i){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:i})}}))}getCode(t,e){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,s.k_)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getCode",r);try{return(0,o.c$)(n)}catch(i){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(t,e,r){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,s.k_)({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((t=>(0,o.Fh)(t)))}),i=yield this.perform("getStorageAt",n);try{return(0,o.c$)(i)}catch(a){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:a})}}))}_wrapTransaction(t,e,r){if(null!=e&&32!==(0,o.cm)(e))throw new Error("invalid response - sendTransaction");const n=t;return null!=e&&t.hash!==e&&Q.throwError("Transaction hash mismatch from Provider.sendTransaction.",f.Vy.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=(e,n)=>J(this,void 0,void 0,(function*(){let i;null==e&&(e=1),null==n&&(n=0),0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r});const o=yield this._waitForTransaction(t.hash,e,n,i);return null==o&&0===e?null:(this._emitted["t:"+t.hash]=o.blockNumber,0===o.status&&Q.throwError("transaction failed",f.Vy.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:o}),o)})),n}sendTransaction(t){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield Promise.resolve(t).then((t=>(0,o.c$)(t))),r=this.formatter.transaction(t);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const t=yield this.perform("sendTransaction",{signedTransaction:e});return this._wrapTransaction(r,t,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(t){return J(this,void 0,void 0,(function*(){const e=yield t,r={};return["from","to"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?this._getAddress(t):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?l.gH.from(t):null)))})),["type"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>null!=t?t:null)))})),e.accessList&&(r.accessList=this.formatter.accessList(e.accessList)),["data"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?(0,o.c$)(t):null)))})),this.formatter.transactionRequest(yield(0,s.k_)(r))}))}_getFilter(t){return J(this,void 0,void 0,(function*(){t=yield t;const e={};return null!=t.address&&(e.address=this._getAddress(t.address)),["blockHash","topics"].forEach((r=>{null!=t[r]&&(e[r]=t[r])})),["fromBlock","toBlock"].forEach((r=>{null!=t[r]&&(e[r]=this._getBlockTag(t[r]))})),this.formatter.filter(yield(0,s.k_)(e))}))}_call(t,e,r){return J(this,void 0,void 0,(function*(){r>=10&&Q.throwError("CCIP read exceeded maximum redirections",f.Vy.errors.SERVER_ERROR,{redirects:r,transaction:t});const n=t.to,i=yield this.perform("call",{transaction:t,blockTag:e});if(r>=0&&"latest"===e&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,o.cm)(i)%32===4)try{const s=(0,o.Ab)(i,4),a=(0,o.Ab)(s,0,32);l.gH.from(a).eq(n)||Q.throwError("CCIP Read sender did not match",f.Vy.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});const u=[],c=l.gH.from((0,o.Ab)(s,32,64)).toNumber(),h=l.gH.from((0,o.Ab)(s,c,c+32)).toNumber(),d=(0,o.Ab)(s,c+32);for(let e=0;e<h;e++){const r=lt(d,32*e);null==r&&Q.throwError("CCIP Read contained corrupt URL string",f.Vy.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),u.push(r)}const p=ct(s,64);l.gH.from((0,o.Ab)(s,100,128)).isZero()||Q.throwError("CCIP Read callback selector included junk",f.Vy.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});const m=(0,o.Ab)(s,96,100),g=ct(s,128),v=yield this.ccipReadFetch(t,p,u);null==v&&Q.throwError("CCIP Read disabled or provided no URLs",f.Vy.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});const y={to:n,data:(0,o.qn)([m,pt([v,g])])};return this._call(y,e,r+1)}catch(s){if(s.code===f.Vy.errors.SERVER_ERROR)throw s}try{return(0,o.c$)(i)}catch(s){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"call",params:{transaction:t,blockTag:e},result:i,error:s})}}))}call(t,e){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,s.k_)({transaction:this._getTransactionRequest(t),blockTag:this._getBlockTag(e),ccipReadEnabled:Promise.resolve(t.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(t){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield(0,s.k_)({transaction:this._getTransactionRequest(t)}),r=yield this.perform("estimateGas",e);try{return l.gH.from(r)}catch(n){return Q.throwError("bad result from backend",f.Vy.errors.SERVER_ERROR,{method:"estimateGas",params:e,result:r,error:n})}}))}_getAddress(t){return J(this,void 0,void 0,(function*(){"string"!==typeof(t=yield t)&&Q.throwArgumentError("invalid address or ENS name","name",t);const e=yield this.resolveName(t);return null==e&&Q.throwError("ENS name not configured",f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(t),")")}),e}))}_getBlock(t,e){return J(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;let r=-128;const n={includeTransactions:!!e};if((0,o.Lo)(t,32))n.blockHash=t;else try{n.blockTag=yield this._getBlockTag(t),(0,o.Lo)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(i){Q.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",t)}return(0,H.wt)((()=>J(this,void 0,void 0,(function*(){const t=yield this.perform("getBlock",n);if(null==t)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(e){let e=null;for(let n=0;n<t.transactions.length;n++){const r=t.transactions[n];if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations){null==e&&(e=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let t=e-r.blockNumber+1;t<=0&&(t=1),r.confirmations=t}}const r=this.formatter.blockWithTransactions(t);return r.transactions=r.transactions.map((t=>this._wrapTransaction(t))),r}return this.formatter.block(t)}))),{oncePoll:this})}))}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return J(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return(0,H.wt)((()=>J(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(t){return J(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return(0,H.wt)((()=>J(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return n}))),{oncePoll:this})}))}getLogs(t){return J(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield(0,s.k_)({filter:this._getFilter(t)}),r=yield this.perform("getLogs",e);return r.forEach((t=>{null==t.removed&&(t.removed=!1)})),G.ZA.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return J(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(t){return J(this,void 0,void 0,(function*(){if("number"===typeof(t=yield t)&&t<0){t%1&&Q.throwArgumentError("invalid BlockTag","blockTag",t);let e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return e+=t,e<0&&(e=0),this.formatter.blockTag(e)}return this.formatter.blockTag(t)}))}getResolver(t){return J(this,void 0,void 0,(function*(){let e=t;for(;;){if(""===e||"."===e)return null;if("eth"!==t&&"eth"===e)return null;const r=yield this._getResolver(e,"getResolver");if(null!=r){const n=new mt(this,r,t);return e===t||(yield n.supportsWildcard())?n:null}e=e.split(".").slice(1).join(".")}}))}_getResolver(t,e){return J(this,void 0,void 0,(function*(){null==e&&(e="ENS");const r=yield this.getNetwork();r.ensAddress||Q.throwError("network does not support ENS",f.Vy.errors.UNSUPPORTED_OPERATION,{operation:e,network:r.name});try{const e=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+U(t).substring(2)});return this.formatter.callAddress(e)}catch(n){}return null}))}resolveName(t){return J(this,void 0,void 0,(function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(r){if((0,o.Lo)(t))throw r}"string"!==typeof t&&Q.throwArgumentError("invalid ENS name","name",t);const e=yield this.getResolver(t);return e?yield e.getAddress():null}))}lookupAddress(t){return J(this,void 0,void 0,(function*(){t=yield t;const e=(t=this.formatter.address(t)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(e,"lookupAddress");if(null==r)return null;const n=lt(yield this.call({to:r,data:"0x691f3431"+U(e).substring(2)}),0);return(yield this.resolveName(n))!=t?null:n}))}getAvatar(t){return J(this,void 0,void 0,(function*(){let e=null;if((0,o.Lo)(t)){const r=this.formatter.address(t).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;e=new mt(this,i,r);try{const t=yield e.getAvatar();if(t)return t.url}catch(n){if(n.code!==f.Vy.errors.CALL_EXCEPTION)throw n}try{const t=lt(yield this.call({to:i,data:"0x691f3431"+U(r).substring(2)}),0);e=yield this.getResolver(t)}catch(n){if(n.code!==f.Vy.errors.CALL_EXCEPTION)throw n;return null}}else if(e=yield this.getResolver(t),!e)return null;const r=yield e.getAvatar();return null==r?null:r.url}))}perform(t,e){return Q.throwError(t+" not implemented",f.Vy.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_stopEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_addEventListener(t,e,r){const n=new nt($(t),e,r);return this._events.push(n),this._startEvent(n),this}on(t,e){return this._addEventListener(t,e,!1)}once(t,e){return this._addEventListener(t,e,!0)}emit(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let i=!1,o=[],s=$(t);return this._events=this._events.filter((t=>t.tag!==s||(setTimeout((()=>{t.listener.apply(this,r)}),0),i=!0,!t.once||(o.push(t),!1)))),o.forEach((t=>{this._stopEvent(t)})),i}listenerCount(t){if(!t)return this._events.length;let e=$(t);return this._events.filter((t=>t.tag===e)).length}listeners(t){if(null==t)return this._events.map((t=>t.listener));let e=$(t);return this._events.filter((t=>t.tag===e)).map((t=>t.listener))}off(t,e){if(null==e)return this.removeAllListeners(t);const r=[];let n=!1,i=$(t);return this._events=this._events.filter((t=>t.tag!==i||t.listener!=e||(!!n||(n=!0,r.push(t),!1)))),r.forEach((t=>{this._stopEvent(t)})),this}removeAllListeners(t){let e=[];if(null==t)e=this._events,this._events=[];else{const r=$(t);this._events=this._events.filter((t=>t.tag!==r||(e.push(t),!1)))}return e.forEach((t=>{this._stopEvent(t)})),this}}},479:(t,e,r)=>{"use strict";r.d(e,{ZA:()=>h,fw:()=>f,ws:()=>d,Zd:()=>m});var n=r(8987),i=r(2776),o=r(9106);var s=r(3678),a=r(5481),u=r(4589),l=r(2171);const c=new u.Vy(l.r);class h{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const t={},e=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),a=this.hex.bind(this),u=this.number.bind(this),l=this.type.bind(this);return t.transaction={hash:o,type:l,accessList:h.allowNull(this.accessList.bind(this),null),blockHash:h.allowNull(o,null),blockNumber:h.allowNull(u,null),transactionIndex:h.allowNull(u,null),confirmations:h.allowNull(u,null),from:e,gasPrice:h.allowNull(r),maxPriorityFeePerGas:h.allowNull(r),maxFeePerGas:h.allowNull(r),gasLimit:r,to:h.allowNull(e,null),value:r,nonce:u,data:i,r:h.allowNull(this.uint256),s:h.allowNull(this.uint256),v:h.allowNull(u),creates:h.allowNull(e,null),raw:h.allowNull(i)},t.transactionRequest={from:h.allowNull(e),nonce:h.allowNull(u),gasLimit:h.allowNull(r),gasPrice:h.allowNull(r),maxPriorityFeePerGas:h.allowNull(r),maxFeePerGas:h.allowNull(r),to:h.allowNull(e),value:h.allowNull(r),data:h.allowNull((t=>this.data(t,!0))),type:h.allowNull(u),accessList:h.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:e,topics:h.arrayOf(o),data:i,logIndex:u,blockHash:o},t.receipt={to:h.allowNull(this.address,null),from:h.allowNull(this.address,null),contractAddress:h.allowNull(e,null),transactionIndex:u,root:h.allowNull(a),gasUsed:r,logsBloom:h.allowNull(i),blockHash:o,transactionHash:o,logs:h.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:h.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:h.allowNull(r),status:h.allowNull(u),type:l},t.block={hash:h.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:h.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:h.allowNull(e),extraData:i,transactions:h.allowNull(h.arrayOf(o)),baseFeePerGas:h.allowNull(r)},t.blockWithTransactions=(0,s.Ic)(t.block),t.blockWithTransactions.transactions=h.allowNull(h.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:h.allowNull(n,void 0),toBlock:h.allowNull(n,void 0),blockHash:h.allowNull(o,void 0),address:h.allowNull(e,void 0),topics:h.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:h.allowNull(u),blockHash:h.allowNull(o),transactionIndex:u,removed:h.allowNull(this.boolean.bind(this)),address:e,data:h.allowFalsish(i,"0x"),topics:h.arrayOf(o),transactionHash:o,logIndex:u},t}accessList(t){return(0,a.$2)(t||[])}number(t){return"0x"===t?0:i.gH.from(t).toNumber()}type(t){return"0x"===t||null==t?0:i.gH.from(t).toNumber()}bigNumber(t){return i.gH.from(t)}boolean(t){if("boolean"===typeof t)return t;if("string"===typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}hex(t,e){return"string"===typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),(0,o.Lo)(t))?t.toLowerCase():c.throwArgumentError("invalid hash","value",t)}data(t,e){const r=this.hex(t,e);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+t);return r}address(t){return(0,n.getAddress)(t)}callAddress(t){if(!(0,o.Lo)(t,32))return null;const e=(0,n.getAddress)((0,o.Ab)(t,12));return"0x0000000000000000000000000000000000000000"===e?null:e}contractAddress(t){return(0,n.getContractAddress)(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"===typeof t||(0,o.Lo)(t))return(0,o.Fh)(t);throw new Error("invalid blockTag")}hash(t,e){const r=this.hex(t,e);return 32!==(0,o.cm)(r)?c.throwArgumentError("invalid hash","value",t):r}difficulty(t){if(null==t)return null;const e=i.gH.from(t);try{return e.toNumber()}catch(r){}return null}uint256(t){if(!(0,o.Lo)(t))throw new Error("invalid uint256");return(0,o.bj)(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);const r=null!=t._difficulty?t._difficulty:t.difficulty,n=h.check(e,t);return n._difficulty=null==r?null:i.gH.from(r),n}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return h.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&i.gH.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);const e=h.check(this.formats.transaction,t);if(null!=t.chainId){let r=t.chainId;(0,o.Lo)(r)&&(r=i.gH.from(r).toNumber()),e.chainId=r}else{let r=t.networkId;null==r&&null==e.v&&(r=t.chainId),(0,o.Lo)(r)&&(r=i.gH.from(r).toNumber()),"number"!==typeof r&&null!=e.v&&(r=(e.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),e.chainId=r}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return(0,a.qg)(t)}receiptLog(t){return h.check(this.formats.receiptLog,t)}receipt(t){const e=h.check(this.formats.receipt,t);if(null!=e.root)if(e.root.length<=4){const t=i.gH.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&c.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):c.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&c.throwArgumentError("invalid root hash","value.root",e.root);return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map((t=>this.topics(t))):null!=t?this.hash(t,!0):null}filter(t){return h.check(this.formats.filter,t)}filterLog(t){return h.check(this.formats.filterLog,t)}static check(t,e){const r={};for(const i in t)try{const n=t[i](e[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=e[i],n}return r}static allowNull(t,e){return function(r){return null==r?e:t(r)}}static allowFalsish(t,e){return function(r){return r?t(r):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");const r=[];return e.forEach((function(e){r.push(t(e))})),r}}}function f(t){return t&&"function"===typeof t.isCommunityResource}function d(t){return f(t)&&t.isCommunityResource()}let p=!1;function m(){p||(p=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},5488:(t,e,r)=>{"use strict";r.r(e),r.d(e,{AlchemyProvider:()=>k,AlchemyWebSocketProvider:()=>E,AnkrProvider:()=>N,BaseProvider:()=>o.DJ,CloudflareProvider:()=>P,EtherscanProvider:()=>q,FallbackProvider:()=>nt,Formatter:()=>a.ZA,InfuraProvider:()=>ut,InfuraWebSocketProvider:()=>at,IpcProvider:()=>it,JsonRpcBatchProvider:()=>lt,JsonRpcProvider:()=>l.F,JsonRpcSigner:()=>l.c,NodesmithProvider:()=>ht,PocketProvider:()=>pt,Provider:()=>n.Kq,Resolver:()=>o.xR,StaticJsonRpcProvider:()=>w,UrlJsonRpcProvider:()=>b,Web3Provider:()=>mt.j,WebSocketProvider:()=>g,getDefaultProvider:()=>vt,getNetwork:()=>i.N,isCommunityResourcable:()=>a.fw,isCommunityResource:()=>a.ws,showThrottleMessage:()=>a.Zd});var n=r(7043),i=r(3020),o=r(3031),s=r(3678),a=r(479),u=r(2776),l=r(1812),c=r(4589),h=r(2171);let f=null;try{if(f=WebSocket,null==f)throw new Error("inject please")}catch(yt){const t=new c.Vy(h.r);f=function(){t.throwError("WebSockets not supported in this environment",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var d=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const p=new c.Vy(h.r);let m=1;class g extends l.F{constructor(t,e){"any"===e&&p.throwError("WebSocketProvider does not support 'any' network yet",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof t?t:"_websocket",e),this._pollingInterval=-1,this._wsReady=!1,"string"===typeof t?(0,s.yY)(this,"_websocket",new f(this.connection.url)):(0,s.yY)(this,"_websocket",t),(0,s.yY)(this,"_requests",{}),(0,s.yY)(this,"_subs",{}),(0,s.yY)(this,"_subIds",{}),(0,s.yY)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((t=>{this.websocket.send(this._requests[t].payload)}))},this.websocket.onmessage=t=>{const e=t.data,r=JSON.parse(e);if(null!=r.id){const t=String(r.id),n=this._requests[t];if(delete this._requests[t],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let t=null;r.error?(t=new Error(r.error.message||"unknown error"),(0,s.yY)(t,"code",r.error.code||null),(0,s.yY)(t,"response",e)):t=new Error("unknown error"),n.callback(t,void 0),this.emit("debug",{action:"response",error:t,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const t=this._subs[r.params.subscription];t&&t.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(t){p.throwError("cannot reset events block on WebSocketProvider",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(t){p.throwError("cannot set polling interval on WebSocketProvider",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return d(this,void 0,void 0,(function*(){return null}))}set polling(t){t&&p.throwError("cannot set polling on WebSocketProvider",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(t,e){const r=m++;return new Promise(((n,i)=>{const o=JSON.stringify({method:t,params:e,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(t,e){return t?i(t):n(e)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(t,e,r){return d(this,void 0,void 0,(function*(){let n=this._subIds[t];null==n&&(n=Promise.all(e).then((t=>this.send("eth_subscribe",t))),this._subIds[t]=n);const i=yield n;this._subs[i]={tag:t,processFunc:r}}))}_startEvent(t){switch(t.type){case"block":this._subscribe("block",["newHeads"],(t=>{const e=u.gH.from(t.number).toNumber();this._emitted.block=e,this.emit("block",e)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(t=>{this.emit("pending",t)}));break;case"filter":this._subscribe(t.tag,["logs",this._getFilter(t.filter)],(e=>{null==e.removed&&(e.removed=!1),this.emit(t.filter,this.formatter.filterLog(e))}));break;case"tx":{const e=t=>{const e=t.hash;this.getTransactionReceipt(e).then((t=>{t&&this.emit(e,t)}))};e(t),this._subscribe("tx",["newHeads"],(t=>{this._events.filter((t=>"tx"===t.type)).forEach(e)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",t)}}_stopEvent(t){let e=t.tag;if("tx"===t.type){if(this._events.filter((t=>"tx"===t.type)).length)return;e="tx"}else if(this.listenerCount(t.event))return;const r=this._subIds[e];r&&(delete this._subIds[e],r.then((t=>{this._subs[t]&&(delete this._subs[t],this.send("eth_unsubscribe",[t]))})))}destroy(){return d(this,void 0,void 0,(function*(){this.websocket.readyState===f.CONNECTING&&(yield new Promise((t=>{this.websocket.onopen=function(){t(!0)},this.websocket.onerror=function(){t(!1)}}))),this.websocket.close(1e3)}))}}var v=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const y=new c.Vy(h.r);class w extends l.F{detectNetwork(){const t=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return v(this,void 0,void 0,(function*(){let e=this.network;return null==e&&(e=yield t.detectNetwork.call(this),e||y.throwError("no network detected",c.Vy.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,s.yY)(this,"_network",e),this.emit("network",e,null))),e}))}}class b extends w{constructor(t,e){y.checkAbstract(new.target,b),t=(0,s.$J)(new.target,"getNetwork")(t),e=(0,s.$J)(new.target,"getApiKey")(e);super((0,s.$J)(new.target,"getUrl")(t,e),t),"string"===typeof e?(0,s.yY)(this,"apiKey",e):null!=e&&Object.keys(e).forEach((t=>{(0,s.yY)(this,t,e[t])}))}_startPending(){y.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(t){return y.throwError("API provider does not support signing",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(t){return t}static getUrl(t,e){return y.throwError("not implemented; sub-classes must override getUrl",c.Vy.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const _=new c.Vy(h.r),M="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class E extends g{constructor(t,e){const r=new k(t,e);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,s.yY)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===M}}class k extends b{static getWebSocketProvider(t,e){return new E(t,e)}static getApiKey(t){return null==t?M:(t&&"string"!==typeof t&&_.throwArgumentError("invalid apiKey","apiKey",t),t)}static getUrl(t,e){let r=null;switch(t.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:_.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+e,throttleCallback:(t,r)=>(e===M&&(0,a.Zd)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===M}}const A=new c.Vy(h.r),x="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function S(t){switch(t){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return A.throwArgumentError("unsupported network","name",t)}class N extends b{isCommunityResource(){return this.apiKey===x}static getApiKey(t){return null==t?x:t}static getUrl(t,e){null==e&&(e=x);const r={allowGzip:!0,url:"https://"+S(t.name)+e,throttleCallback:(t,r)=>(e.apiKey===x&&(0,a.Zd)(),Promise.resolve(!0))};return null!=e.projectSecret&&(r.user="",r.password=e.projectSecret),r}}var C=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const I=new c.Vy(h.r);class P extends b{static getApiKey(t){return null!=t&&I.throwArgumentError("apiKey not supported for cloudflare","apiKey",t),null}static getUrl(t,e){let r=null;if("homestead"===t.name)r="https://cloudflare-eth.com/";else I.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(t,e){const r=Object.create(null,{perform:{get:()=>super.perform}});return C(this,void 0,void 0,(function*(){if("getBlockNumber"===t){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,t,e)}))}}var R=r(9106),O=r(5481),T=r(4031),B=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const L=new c.Vy(h.r);function j(t){const e={};for(let r in t){if(null==t[r])continue;let n=t[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,R.Fh)((0,R.c$)(n)):"accessList"===r?"["+(0,O.$2)(n).map((t=>'{address:"'.concat(t.address,'",storageKeys:["').concat(t.storageKeys.join('","'),'"]}'))).join(",")+"]":(0,R.c$)(n),e[r]=n)}return e}function F(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1!=t.status||"string"!==typeof t.message||!t.message.match(/^OK/)){const e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function U(t){if(t&&0==t.status&&"NOTOK"==t.message&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){const e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if("2.0"!=t.jsonrpc){const e=new Error("invalid response");throw e.result=JSON.stringify(t),e}if(t.error){const e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function D(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function z(t,e,r){if("call"===t&&e.code===c.Vy.errors.SERVER_ERROR){const t=e.error;if(t&&(t.message.match(/reverted/i)||t.message.match(/VM execution error/i))){let r=t.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,R.Lo)(r))return r;L.throwError("missing revert data in call exception",c.Vy.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===c.Vy.errors.SERVER_ERROR&&(e.error&&"string"===typeof e.error.message?n=e.error.message:"string"===typeof e.body?n=e.body:"string"===typeof e.responseText&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&L.throwError("insufficient funds for intrinsic transaction cost",c.Vy.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&L.throwError("nonce has already been used",c.Vy.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),n.match(/another transaction with same nonce/)&&L.throwError("replacement fee too low",c.Vy.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&L.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",c.Vy.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}class q extends o.DJ{constructor(t,e){super(t),(0,s.yY)(this,"baseUrl",this.getBaseUrl()),(0,s.yY)(this,"apiKey",e||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return L.throwArgumentError("unsupported network","network",this.network.name)}getUrl(t,e){const r=Object.keys(e).reduce(((t,r)=>{const n=e[r];return null!=n&&(t+="&".concat(r,"=").concat(n)),t}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(t).concat(r).concat(n)}getPostUrl(){return"".concat(this.baseUrl,"/api")}getPostData(t,e){return e.module=t,e.apikey=this.apiKey,e}fetch(t,e,r){return B(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(t,e),i=r?this.getPostData(t,e):null,o="proxy"===t?U:F;this.emit("debug",{action:"request",request:n,provider:this});const u={url:n,throttleSlotInterval:1e3,throttleCallback:(t,e)=>(this.isCommunityResource()&&(0,a.Zd)(),Promise.resolve(!0))};let l=null;i&&(u.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(i).map((t=>"".concat(t,"=").concat(i[t]))).join("&"));const c=yield(0,T.x6)(u,l,o||U);return this.emit("debug",{action:"response",request:n,response:(0,s.A4)(c),provider:this}),c}))}detectNetwork(){return B(this,void 0,void 0,(function*(){return this.network}))}perform(t,e){const r=Object.create(null,{perform:{get:()=>super.perform}});return B(this,void 0,void 0,(function*(){switch(t){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>z("sendTransaction",t,e.signedTransaction)));case"getBlock":if(e.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.transactionHash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=j(e.transaction);t.module="proxy",t.action="eth_call";try{return yield this.fetch("proxy",t,!0)}catch(yt){return z("call",yt,e.transaction)}}case"estimateGas":{const t=j(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return yield this.fetch("proxy",t,!0)}catch(yt){return z("estimateGas",yt,e.transaction)}}case"getLogs":{const t={action:"getLogs"};if(e.filter.fromBlock&&(t.fromBlock=D(e.filter.fromBlock)),e.filter.toBlock&&(t.toBlock=D(e.filter.toBlock)),e.filter.address&&(t.address=e.filter.address),e.filter.topics&&e.filter.topics.length>0&&(e.filter.topics.length>1&&L.throwError("unsupported topic count",c.Vy.errors.UNSUPPORTED_OPERATION,{topics:e.filter.topics}),1===e.filter.topics.length)){const r=e.filter.topics[0];"string"===typeof r&&66===r.length||L.throwError("unsupported topic format",c.Vy.errors.UNSUPPORTED_OPERATION,{topic0:r}),t.topic0=r}const r=yield this.fetch("logs",t);let n={};for(let e=0;e<r.length;e++){const t=r[e];if(null==t.blockHash){if(null==n[t.blockNumber]){const e=yield this.getBlock(t.blockNumber);e&&(n[t.blockNumber]=e.hash)}t.blockHash=n[t.blockNumber]}}return r}case"getEtherPrice":return"homestead"!==this.network.name?0:parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return r.perform.call(this,t,e)}))}getHistory(t,e,r){return B(this,void 0,void 0,(function*(){const n={action:"txlist",address:yield this.resolveName(t),startblock:null==e?0:e,endblock:null==r?99999999:r,sort:"asc"};return(yield this.fetch("account",n)).map((t=>{["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);const e=this.formatter.transactionResponse(t);return t.timeStamp&&(e.timestamp=parseInt(t.timeStamp)),e}))}))}isCommunityResource(){return null==this.apiKey}}var V=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const H=new c.Vy(h.r);function W(){return(new Date).getTime()}function Y(t){let e=null;for(let r=0;r<t.length;r++){const n=t[r];if(null==n)return null;e?e.name===n.name&&e.chainId===n.chainId&&(e.ensAddress===n.ensAddress||null==e.ensAddress&&null==n.ensAddress)||H.throwArgumentError("provider mismatch","networks",t):e=n}return e}function K(t,e){t=t.slice().sort();const r=Math.floor(t.length/2);if(t.length%2)return t[r];const n=t[r-1],i=t[r];return null!=e&&Math.abs(n-i)>e?null:(n+i)/2}function G(t){if(null===t)return"null";if("number"===typeof t||"boolean"===typeof t)return JSON.stringify(t);if("string"===typeof t)return t;if(u.gH.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map((t=>G(t))));if("object"===typeof t){const e=Object.keys(t);return e.sort(),"{"+e.map((e=>{let r=t[e];return r="function"===typeof r?"[function]":G(r),JSON.stringify(e)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let J=1;function Q(t){let e=null,r=null,n=new Promise((n=>{e=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(e,t)}));return{cancel:e,getPromise:function(){return n},wait:t=>(n=n.then(t),n)}}const Z=[c.Vy.errors.CALL_EXCEPTION,c.Vy.errors.INSUFFICIENT_FUNDS,c.Vy.errors.NONCE_EXPIRED,c.Vy.errors.REPLACEMENT_UNDERPRICED,c.Vy.errors.UNPREDICTABLE_GAS_LIMIT],X=["address","args","errorArgs","errorSignature","method","transaction"];function $(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function tt(t,e,r){let n=G;switch(e){case"getBlockNumber":return function(e){const r=e.map((t=>t.result));let n=K(e.map((t=>t.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=t._highestBlockNumber&&(t._highestBlockNumber=n),t._highestBlockNumber};case"getGasPrice":return function(t){const e=t.map((t=>t.result));return e.sort(),e[Math.floor(e.length/2)]};case"getEtherPrice":return function(t){return K(t.map((t=>t.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(t){return null==t?null:((t=(0,s.Ic)(t)).confirmations=-1,G(t))};break;case"getBlock":n=r.includeTransactions?function(t){return null==t?null:((t=(0,s.Ic)(t)).transactions=t.transactions.map((t=>((t=(0,s.Ic)(t)).confirmations=-1,t))),G(t))}:function(t){return null==t?null:G(t)};break;default:throw new Error("unknown method: "+e)}return function(t,e){return function(r){const n={};r.forEach((e=>{const r=t(e.result);n[r]||(n[r]={count:0,result:e.result}),n[r].count++}));const i=Object.keys(n);for(let t=0;t<i.length;t++){const r=n[i[t]];if(r.count>=e)return r.result}}}(n,t.quorum)}function et(t,e){return V(this,void 0,void 0,(function*(){const r=t.provider;return null!=r.blockNumber&&r.blockNumber>=e||-1===e?r:(0,T.wt)((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function rt(t,e,r,n){return V(this,void 0,void 0,(function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,R.Lo)(n.blockTag)&&(i=yield et(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,R.Lo)(n.blockTag)&&(i=yield et(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,R.Lo)(n.blockTag)&&(i=yield et(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,R.Lo)(n.blockTag)&&(i=yield et(t,e)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,R.Lo)(r.fromBlock)||r.toBlock&&(0,R.Lo)(r.toBlock))&&(i=yield et(t,e)),i.getLogs(r)}}return H.throwError("unknown method error",c.Vy.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class nt extends o.DJ{constructor(t,e){0===t.length&&H.throwArgumentError("missing providers","providers",t);const r=t.map(((t,e)=>{if(n.Kq.isProvider(t)){const e=(0,a.ws)(t)?2e3:750,r=1;return Object.freeze({provider:t,weight:1,stallTimeout:e,priority:r})}const r=(0,s.Ic)(t);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=(0,a.ws)(t)?2e3:750),null==r.weight&&(r.weight=1);const i=r.weight;return(i%1||i>512||i<1)&&H.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(e,"].weight"),i),Object.freeze(r)})),i=r.reduce(((t,e)=>t+e.weight),0);null==e?e=i/2:e>i&&H.throwArgumentError("quorum will always fail; larger than total weight","quorum",e);let o=Y(r.map((t=>t.provider.network)));null==o&&(o=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then(t,e)}),0)}))),super(o),(0,s.yY)(this,"providerConfigs",Object.freeze(r)),(0,s.yY)(this,"quorum",e),this._highestBlockNumber=-1}detectNetwork(){return V(this,void 0,void 0,(function*(){return Y(yield Promise.all(this.providerConfigs.map((t=>t.provider.getNetwork()))))}))}perform(t,e){return V(this,void 0,void 0,(function*(){if("sendTransaction"===t){const t=yield Promise.all(this.providerConfigs.map((t=>t.provider.sendTransaction(e.signedTransaction).then((t=>t.hash),(t=>t)))));for(let e=0;e<t.length;e++){const r=t[e];if("string"===typeof r)return r}throw t[0]}-1===this._highestBlockNumber&&"getBlockNumber"!==t&&(yield this.getBlockNumber());const r=tt(this,t,e),n=function(t){for(let e=(t=t.slice()).length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}(this.providerConfigs.map(s.Ic));n.sort(((t,e)=>t.priority-e.priority));const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const u=W();let l=n.filter((t=>t.runner&&u-t.start<t.stallTimeout)).reduce(((t,e)=>t+e.weight),0);for(;l<this.quorum&&o<n.length;){const r=n[o++],a=J++;r.start=W(),r.staller=Q(r.stallTimeout),r.staller.wait((()=>{r.staller=null})),r.runner=rt(r,i,t,e).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:$(r,W()),request:{method:t,params:(0,s.A4)(e)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:$(r,W()),request:{method:t,params:(0,s.A4)(e)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:$(r,null),request:{method:t,params:(0,s.A4)(e)},provider:this}),l+=r.weight}const c=[];n.forEach((t=>{!t.done&&t.runner&&(c.push(t.runner),t.staller&&c.push(t.staller.getPromise()))})),c.length&&(yield Promise.race(c));const h=n.filter((t=>t.done&&null==t.error));if(h.length>=this.quorum){const t=r(h);if(void 0!==t)return n.forEach((t=>{t.staller&&t.staller.cancel(),t.cancelled=!0})),t;a||(yield Q(100).getPromise()),a=!1}const f=n.reduce(((t,e)=>{if(!e.done||null==e.error)return t;const r=e.error.code;return Z.indexOf(r)>=0&&(t[r]||(t[r]={error:e.error,weight:0}),t[r].weight+=e.weight),t}),{});if(Object.keys(f).forEach((t=>{const e=f[t];if(e.weight<this.quorum)return;n.forEach((t=>{t.staller&&t.staller.cancel(),t.cancelled=!0}));const r=e.error,i={};X.forEach((t=>{null!=r[t]&&(i[t]=r[t])})),H.throwError(r.reason||r.message,t,i)})),0===n.filter((t=>!t.done)).length)break}return n.forEach((t=>{t.staller&&t.staller.cancel(),t.cancelled=!0})),H.throwError("failed to meet quorum",c.Vy.errors.SERVER_ERROR,{method:t,params:e,results:n.map((t=>$(t))),provider:this})}))}}const it=null,ot=new c.Vy(h.r),st="84842078b09946638c03157f83405213";class at extends g{constructor(t,e){const r=new ut(t,e),n=r.connection;n.password&&ot.throwError("INFURA WebSocket project secrets unsupported",c.Vy.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),t),(0,s.yY)(this,"apiKey",r.projectId),(0,s.yY)(this,"projectId",r.projectId),(0,s.yY)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===st}}class ut extends b{static getWebSocketProvider(t,e){return new at(t,e)}static getApiKey(t){const e={apiKey:st,projectId:st,projectSecret:null};return null==t||("string"===typeof t?e.projectId=t:null!=t.projectSecret?(ot.assertArgument("string"===typeof t.projectId,"projectSecret requires a projectId","projectId",t.projectId),ot.assertArgument("string"===typeof t.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),e.projectId=t.projectId,e.projectSecret=t.projectSecret):t.projectId&&(e.projectId=t.projectId),e.apiKey=e.projectId),e}static getUrl(t,e){let r=null;switch(t?t.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:ot.throwError("unsupported network",c.Vy.errors.INVALID_ARGUMENT,{argument:"network",value:t})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+e.projectId,throttleCallback:(t,r)=>(e.projectId===st&&(0,a.Zd)(),Promise.resolve(!0))};return null!=e.projectSecret&&(n.user="",n.password=e.projectSecret),n}isCommunityResource(){return this.projectId===st}}class lt extends l.F{send(t,e){const r={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((t,e)=>{n.resolve=t,n.reject=e}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const e=t.map((t=>t.request));return this.emit("debug",{action:"requestBatch",request:(0,s.A4)(e),provider:this}),(0,T.x6)(this.connection,JSON.stringify(e)).then((r=>{this.emit("debug",{action:"response",request:e,response:r,provider:this}),t.forEach(((t,e)=>{const n=r[e];if(n.error){const e=new Error(n.error.message);e.code=n.error.code,e.data=n.error.data,t.reject(e)}else t.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:e,provider:this}),t.forEach((t=>{t.reject(r)}))}))}),10)),i}}const ct=new c.Vy(h.r);class ht extends b{static getApiKey(t){return t&&"string"!==typeof t&&ct.throwArgumentError("invalid apiKey","apiKey",t),t||"ETHERS_JS_SHARED"}static getUrl(t,e){ct.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(t.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:ct.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+e}}const ft=new c.Vy(h.r),dt="62e1ad51b37b8e00394bda3b";class pt extends b{static getApiKey(t){const e={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==t?e.applicationId=dt:"string"===typeof t?e.applicationId=t:null!=t.applicationSecretKey?(e.applicationId=t.applicationId,e.applicationSecretKey=t.applicationSecretKey):t.applicationId?e.applicationId=t.applicationId:ft.throwArgumentError("unsupported PocketProvider apiKey","apiKey",t),e}static getUrl(t,e){let r=null;switch(t?t.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:ft.throwError("unsupported network",c.Vy.errors.INVALID_ARGUMENT,{argument:"network",value:t})}const n={headers:{},url:"https://".concat(r,"/v1/lb/").concat(e.applicationId)};return null!=e.applicationSecretKey&&(n.user="",n.password=e.applicationSecretKey),n}isCommunityResource(){return this.applicationId===dt}}var mt=r(8045);const gt=new c.Vy(h.r);function vt(t,e){if(null==t&&(t="homestead"),"string"===typeof t){const e=t.match(/^(ws|http)s?:/i);if(e)switch(e[1].toLowerCase()){case"http":case"https":return new l.F(t);case"ws":case"wss":return new g(t);default:gt.throwArgumentError("unsupported URL scheme","network",t)}}const r=(0,i.N)(t);return r&&r._defaultProvider||gt.throwError("unsupported getDefaultProvider network",c.Vy.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),r._defaultProvider({FallbackProvider:nt,AlchemyProvider:k,AnkrProvider:N,CloudflareProvider:P,EtherscanProvider:q,InfuraProvider:ut,JsonRpcProvider:l.F,NodesmithProvider:ht,PocketProvider:pt,Web3Provider:mt.j,IpcProvider:it},e)}},1812:(t,e,r)=>{"use strict";r.d(e,{F:()=>W,c:()=>q});var n=r(8298),i=r(2776),o=r(9106),s=r(8987),a=r(9547),u=r(3678),l=r(4589),c=r(6171),h=r(413),f=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const d=new l.Vy(c.r),p=new Uint8Array(32);p.fill(0);const m=i.gH.from(-1),g=i.gH.from(0),v=i.gH.from(1),y=i.gH.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const w=(0,o.bj)(v.toHexString(),32),b=(0,o.bj)(g.toHexString(),32),_={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},M=["name","version","chainId","verifyingContract","salt"];function E(t){return function(e){return"string"!==typeof e&&d.throwArgumentError("invalid domain value for ".concat(JSON.stringify(t)),"domain.".concat(t),e),e}}const k={name:E("name"),version:E("version"),chainId:function(t){try{return i.gH.from(t).toString()}catch(e){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,s.getAddress)(t).toLowerCase()}catch(e){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=(0,o.k9)(t);if(32!==e.length)throw new Error("bad length");return(0,o.c$)(e)}catch(e){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function A(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=""===e[1],n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&d.throwArgumentError("invalid numeric width","type",t);const s=y.mask(r?n-1:n),a=r?s.add(v).mul(m):g;return function(e){const r=i.gH.from(e);return(r.lt(a)||r.gt(s))&&d.throwArgumentError("value out-of-bounds for ".concat(t),"value",e),(0,o.bj)(r.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(0===r||r>32||e[1]!==String(r))&&d.throwArgumentError("invalid bytes width","type",t),function(e){return(0,o.k9)(e).length!==r&&d.throwArgumentError("invalid length for ".concat(t),"value",e),function(t){const e=(0,o.k9)(t),r=e.length%32;return r?(0,o.qn)([e,p.slice(r)]):(0,o.c$)(e)}(e)}}}switch(t){case"address":return function(t){return(0,o.bj)((0,s.getAddress)(t),32)};case"bool":return function(t){return t?w:b};case"bytes":return function(t){return(0,a.S)(t)};case"string":return function(t){return(0,h.id)(t)}}return null}function x(t,e){return"".concat(t,"(").concat(e.map((t=>{let{name:e,type:r}=t;return r+" "+e})).join(","),")")}class S{constructor(t){(0,u.yY)(this,"types",Object.freeze((0,u.A4)(t))),(0,u.yY)(this,"_encoderCache",{}),(0,u.yY)(this,"_types",{});const e={},r={},n={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],n[t]={}}));for(const o in t){const n={};t[o].forEach((i=>{n[i.name]&&d.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(o)),"types",t),n[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===o&&d.throwArgumentError("circular type reference to ".concat(JSON.stringify(s)),"types",t);A(s)||(r[s]||d.throwArgumentError("unknown type ".concat(JSON.stringify(s)),"types",t),r[s].push(o),e[o][s]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?d.throwArgumentError("missing primary type","types",t):i.length>1&&d.throwArgumentError("ambiguous primary types or unused types: ".concat(i.map((t=>JSON.stringify(t))).join(", ")),"types",t),(0,u.yY)(this,"primaryType",i[0]),function i(o,s){s[o]&&d.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),s[o]=!0,Object.keys(e[o]).forEach((t=>{r[t]&&(i(t,s),Object.keys(s).forEach((e=>{n[e][t]=!0})))})),delete s[o]}(this.primaryType,{});for(const o in n){const e=Object.keys(n[o]);e.sort(),this._types[o]=x(o,t[o])+e.map((e=>x(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=A(t);if(e)return e}const e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){const t=e[1],r=this.getEncoder(t),n=parseInt(e[3]);return e=>{n>=0&&e.length!==n&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let i=e.map(r);return this._types[t]&&(i=i.map(a.S)),(0,a.S)((0,o.qn)(i))}}const r=this.types[t];if(r){const e=(0,h.id)(this._types[t]);return t=>{const n=r.map((e=>{let{name:r,type:n}=e;const i=this.getEncoder(n)(t[r]);return this._types[n]?(0,a.S)(i):i}));return n.unshift(e),(0,o.qn)(n)}}return d.throwArgumentError("unknown type: ".concat(t),"type",t)}encodeType(t){const e=this._types[t];return e||d.throwArgumentError("unknown type: ".concat(JSON.stringify(t)),"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return(0,a.S)(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(A(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&e.length!==i&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const i=this.types[t];return i?i.reduce(((t,n)=>{let{name:i,type:o}=n;return t[i]=this._visit(o,e[i],r),t}),{}):d.throwArgumentError("unknown type: ".concat(t),"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new S(t)}static getPrimaryType(t){return S.from(t).primaryType}static hashStruct(t,e,r){return S.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=_[r];n||d.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>M.indexOf(t.name)-M.indexOf(e.name))),S.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return(0,o.qn)(["0x1901",S.hashDomain(t),S.from(e).hash(r)])}static hash(t,e,r){return(0,a.S)(S.encode(t,e,r))}static resolveNames(t,e,r,n){return f(this,void 0,void 0,(function*(){t=(0,u.Ic)(t);const i={};t.verifyingContract&&!(0,o.Lo)(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const s=S.from(e);s.visit(r,((t,e)=>("address"!==t||(0,o.Lo)(e,20)||(i[e]="0x"),e)));for(const t in i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),r=s.visit(r,((t,e)=>"address"===t&&i[e]?i[e]:e)),{domain:t,value:r}}))}static getPayload(t,e,r){S.hashDomain(t);const n={},s=[];M.forEach((e=>{const r=t[e];null!=r&&(n[e]=k[e](r),s.push({name:e,type:_[e]}))}));const a=S.from(e),l=(0,u.Ic)(e);return l.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):l.EIP712Domain=s,a.encode(r),{types:l,domain:n,primaryType:a.primaryType,message:a.visit(r,((t,e)=>{if(t.match(/^bytes(\d*)/))return(0,o.c$)((0,o.k9)(e));if(t.match(/^u?int/))return i.gH.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!==typeof e&&d.throwArgumentError("invalid string","value",e),e}return d.throwArgumentError("unsupported type","type",t)}))}}}var N=r(2614),C=r(5481),I=r(4031),P=r(2171),R=r(3031),O=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const T=new l.Vy(P.r),B=["call","estimateGas"];function L(t,e){if(null==t)return null;if("string"===typeof t.message&&t.message.match("reverted")){const r=(0,o.Lo)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"===typeof t){for(const r in t){const n=L(t[r],e);if(n)return n}return null}if("string"===typeof t)try{return L(JSON.parse(t),e)}catch(r){}return null}function j(t,e,r){const n=r.transaction||r.signedTransaction;if("call"===t){const t=L(e,!0);if(t)return t.data;T.throwError("missing revert data in call exception; Transaction reverted without a reason string",l.Vy.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){let r=L(e.body,!1);null==r&&(r=L(e,!1)),r&&T.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Vy.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===l.Vy.errors.SERVER_ERROR&&e.error&&"string"===typeof e.error.message?i=e.error.message:"string"===typeof e.body?i=e.body:"string"===typeof e.responseText&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&T.throwError("insufficient funds for intrinsic transaction cost",l.Vy.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&T.throwError("nonce has already been used",l.Vy.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&T.throwError("replacement fee too low",l.Vy.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&T.throwError("legacy pre-eip-155 transactions not supported",l.Vy.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),B.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&T.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Vy.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function F(t){return new Promise((function(e){setTimeout(e,t)}))}function U(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function D(t){return t?t.toLowerCase():t}const z={};class q extends n.l{constructor(t,e,r){if(super(),t!==z)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,u.yY)(this,"provider",e),null==r&&(r=0),"string"===typeof r?((0,u.yY)(this,"_address",this.provider.formatter.address(r)),(0,u.yY)(this,"_index",null)):"number"===typeof r?((0,u.yY)(this,"_index",r),(0,u.yY)(this,"_address",null)):T.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(t){return T.throwError("cannot alter JSON-RPC Signer connection",l.Vy.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new V(z,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((t=>(t.length<=this._index&&T.throwError("unknown account #"+this._index,l.Vy.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index]))))}sendUncheckedTransaction(t){t=(0,u.Ic)(t);const e=this.getAddress().then((t=>(t&&(t=t.toLowerCase()),t)));if(null==t.gasLimit){const r=(0,u.Ic)(t);r.from=e,t.gasLimit=this.provider.estimateGas(r)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((t=>O(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.provider.resolveName(t);return null==e&&T.throwArgumentError("provided ENS name resolves to null","tx.to",t),e}))))),(0,u.k_)({tx:(0,u.k_)(t),sender:e}).then((e=>{let{tx:r,sender:n}=e;null!=r.from?r.from.toLowerCase()!==n&&T.throwArgumentError("from address mismatch","transaction",t):r.from=n;const i=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then((t=>t),(t=>("string"===typeof t.message&&t.message.match(/user denied/i)&&T.throwError("user rejected transaction",l.Vy.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),j("sendTransaction",t,i))))}))}signTransaction(t){return T.throwError("signing transactions is unsupported",l.Vy.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return O(this,void 0,void 0,(function*(){const e=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(t);try{return yield(0,I.wt)((()=>O(this,void 0,void 0,(function*(){const t=yield this.provider.getTransaction(r);if(null!==t)return this.provider._wrapTransaction(t,r,e)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(t){return O(this,void 0,void 0,(function*(){const e="string"===typeof t?(0,N.YW)(t):t,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.c$)(e),r.toLowerCase()])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&T.throwError("user rejected signing",l.Vy.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:t}),n}}))}_legacySignMessage(t){return O(this,void 0,void 0,(function*(){const e="string"===typeof t?(0,N.YW)(t):t,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.c$)(e)])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&T.throwError("user rejected signing",l.Vy.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:t}),n}}))}_signTypedData(t,e,r){return O(this,void 0,void 0,(function*(){const n=yield S.resolveNames(t,e,r,(t=>this.provider.resolveName(t))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(S.getPayload(n.domain,e,n.value))])}catch(o){throw"string"===typeof o.message&&o.message.match(/user denied/i)&&T.throwError("user rejected signing",l.Vy.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:e,value:n.value}}),o}}))}unlock(t){return O(this,void 0,void 0,(function*(){const e=this.provider,r=yield this.getAddress();return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])}))}}class V extends q{sendTransaction(t){return this.sendUncheckedTransaction(t).then((t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(t,e)})))}}const H={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class W extends R.DJ{constructor(t,e){let r=e;null==r&&(r=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then((e=>{t(e)}),(t=>{e(t)}))}),0)}))),super(r),t||(t=(0,u.$J)(this.constructor,"defaultUrl")()),"string"===typeof t?(0,u.yY)(this,"connection",Object.freeze({url:t})):(0,u.yY)(this,"connection",Object.freeze((0,u.Ic)(t))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return O(this,void 0,void 0,(function*(){yield F(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch(e){try{t=yield this.send("net_version",[])}catch(e){}}if(null!=t){const r=(0,u.$J)(this.constructor,"getNetwork");try{return r(i.gH.from(t).toNumber())}catch(e){return T.throwError("could not detect network",l.Vy.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return T.throwError("could not detect network",l.Vy.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(t){return new q(z,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((t=>t.map((t=>this.formatter.address(t)))))}send(t,e){const r={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,u.A4)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(n&&this._cache[t])return this._cache[t];const i=(0,I.x6)(this.connection,JSON.stringify(r),U).then((t=>(this.emit("debug",{action:"response",request:r,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",error:t,request:r,provider:this}),t}));return n&&(this._cache[t]=i,setTimeout((()=>{this._cache[t]=null}),0)),i}prepareRequest(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[D(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[D(e.address),e.blockTag]];case"getCode":return["eth_getCode",[D(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[D(e.address),(0,o.bj)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[(0,u.$J)(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,u.$J)(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=D(e.filter.address)),["eth_getLogs",[e.filter]]}return null}perform(t,e){return O(this,void 0,void 0,(function*(){if("call"===t||"estimateGas"===t){const t=e.transaction;if(t&&null!=t.type&&i.gH.from(t.type).isZero()&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((e=(0,u.Ic)(e)).transaction=(0,u.Ic)(t),delete e.transaction.type)}}const r=this.prepareRequest(t,e);null==r&&T.throwError(t+" not implemented",l.Vy.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(r[0],r[1])}catch(n){return j(t,n,e)}}))}_startEvent(t){"pending"===t.tag&&this._startPending(),super._startEvent(t)}_startPending(){if(null!=this._pendingFilter)return;const t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;let n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return F(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((t=>{}))}(),r})).catch((t=>{}))}_stopEvent(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,e){const r=(0,u.Ic)(H);if(e)for(const i in e)e[i]&&(r[i]=!0);(0,u.qN)(t,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null==t[e])return;const r=(0,o.Fh)(i.gH.from(t[e]));"gasLimit"===e&&(e="gas"),n[e]=r})),["from","to","data"].forEach((function(e){null!=t[e]&&(n[e]=(0,o.c$)(t[e]))})),t.accessList&&(n.accessList=(0,C.$2)(t.accessList)),n}}},8045:(t,e,r)=>{"use strict";r.d(e,{j:()=>c});var n=r(3678),i=r(4589),o=r(2171),s=r(1812);const a=new i.Vy(o.r);let u=1;function l(t,e){const r="Web3LegacyFetcher";return function(t,i){const o={method:t,params:i,id:u++,jsonrpc:"2.0"};return new Promise(((t,i)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,n.A4)(o),provider:this}),e(o,((e,n)=>{if(e)return this.emit("debug",{action:"response",fetcher:r,error:e,request:o,provider:this}),i(e);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:n,provider:this}),n.error){const t=new Error(n.error.message);return t.code=n.error.code,t.data=n.error.data,i(t)}t(n.result)}))}))}}class c extends s.F{constructor(t,e){null==t&&a.throwArgumentError("missing provider","provider",t);let r=null,i=null,o=null;"function"===typeof t?(r="unknown:",i=t):(r=t.host||t.path||"",!r&&t.isMetaMask&&(r="metamask"),o=t,t.request?(""===r&&(r="eip-1193:"),i=function(t){return function(e,r){null==r&&(r=[]);const i={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,n.A4)(i),provider:this}),t.request(i).then((t=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:t,provider:this}),t}))}}(t)):t.sendAsync?i=l(0,t.sendAsync.bind(t)):t.send?i=l(0,t.send.bind(t)):a.throwArgumentError("unsupported provider","provider",t),r||(r="unknown:")),super(r,e),(0,n.yY)(this,"jsonRpcFetchFunc",i),(0,n.yY)(this,"provider",o)}send(t,e){return this.jsonRpcFetchFunc(t,e)}}},6465:(t,e,r)=>{"use strict";r.d(e,{D:()=>f,l:()=>l});var n=r(9106),i=r(4589);const o=new i.Vy("rlp/5.7.0");function s(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function a(t,e,r){let n=0;for(let i=0;i<r;i++)n=256*n+t[e+i];return n}function u(t){if(Array.isArray(t)){let e=[];if(t.forEach((function(t){e=e.concat(u(t))})),e.length<=55)return e.unshift(192+e.length),e;const r=s(e.length);return r.unshift(247+r.length),r.concat(e)}(0,n.f)(t)||o.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call((0,n.k9)(t));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=s(e.length);return r.unshift(183+r.length),r.concat(e)}function l(t){return(0,n.c$)(u(t))}function c(t,e,r,n){const s=[];for(;r<e+1+n;){const a=h(t,r);s.push(a.result),(r+=a.consumed)>e+1+n&&o.throwError("child data too short",i.Vy.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function h(t,e){if(0===t.length&&o.throwError("data too short",i.Vy.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&o.throwError("data short segment too short",i.Vy.errors.BUFFER_OVERRUN,{});const n=a(t,e+1,r);return e+1+r+n>t.length&&o.throwError("data long segment too short",i.Vy.errors.BUFFER_OVERRUN,{}),c(t,e,e+1+r,r+n)}if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&o.throwError("data array too short",i.Vy.errors.BUFFER_OVERRUN,{}),c(t,e,e+1,r)}if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&o.throwError("data array too short",i.Vy.errors.BUFFER_OVERRUN,{});const s=a(t,e+1,r);e+1+r+s>t.length&&o.throwError("data array too short",i.Vy.errors.BUFFER_OVERRUN,{});return{consumed:1+r+s,result:(0,n.c$)(t.slice(e+1+r,e+1+r+s))}}if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&o.throwError("data too short",i.Vy.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.c$)(t.slice(e+1,e+1+r))}}return{consumed:1,result:(0,n.c$)(t[e])}}function f(t){const e=(0,n.k9)(t),r=h(e,0);return r.consumed!==e.length&&o.throwArgumentError("invalid rlp data","data",t),r.result}},2614:(t,e,r)=>{"use strict";r.d(e,{YW:()=>c,dg:()=>f,_v:()=>h});var n=r(9106);const i=new(r(4589).Vy)("strings/5.7.0");var o,s;function a(t,e,r,n,i){if(t===s.BAD_PREFIX||t===s.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n<r.length&&r[n]>>6===2;n++)t++;return t}return t===s.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(o||(o={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(s||(s={}));const u=Object.freeze({error:function(t,e,r,n,o){return i.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:a,replace:function(t,e,r,n,i){return t===s.OVERLONG?(n.push(i),0):(n.push(65533),a(t,e,r))}});function l(t,e){null==e&&(e=u.error),t=(0,n.k9)(t);const r=[];let i=0;for(;i<t.length;){const n=t[i++];if(n>>7===0){r.push(n);continue}let o=null,a=null;if(192===(224&n))o=1,a=127;else if(224===(240&n))o=2,a=2047;else{if(240!==(248&n)){i+=e(128===(192&n)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,t,r);continue}o=3,a=65535}if(i-1+o>=t.length){i+=e(s.OVERRUN,i-1,t,r);continue}let u=n&(1<<8-o-1)-1;for(let l=0;l<o;l++){let n=t[i];if(128!=(192&n)){i+=e(s.MISSING_CONTINUE,i,t,r),u=null;break}u=u<<6|63&n,i++}null!==u&&(u>1114111?i+=e(s.OUT_OF_RANGE,i-1-o,t,r,u):u>=55296&&u<=57343?i+=e(s.UTF16_SURROGATE,i-1-o,t,r,u):u<=a?i+=e(s.OVERLONG,i-1-o,t,r,u):r.push(u))}return r}function c(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;e!=o.current&&(i.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const e=t.charCodeAt(n);if(e<128)r.push(e);else if(e<2048)r.push(e>>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return(0,n.k9)(r)}function h(t,e){return l(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function f(t){return l(c(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current))}},5481:(t,e,r)=>{"use strict";r.d(e,{$2:()=>lt,qg:()=>pt});var n=r(8987),i=r(2776),o=r(9106),s=r(4301),a=r(9547),u=r(6465),l=r(6373),c=r.n(l),h=r(3697),f=r.n(h);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function d(t,e,r){return r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===e||null===e)&&r.path)}},t(r,r.exports),r.exports}var p=m;function m(t,e){if(!t)throw new Error(e||"Assertion failed")}m.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var g=d((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!==typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}})),v=d((function(t,e){var r=e;r.assert=p,r.toArray=g.toArray,r.zero2=g.zero2,r.toHex=g.toHex,r.encode=g.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,l=e.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),s=0===(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==l?u:-u,r[0].push(s),a=0===(1&l)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?l:-l,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"===typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new(c())(t,"hex","le")}})),y=v.getNAF,w=v.getJSF,b=v.assert;function _(t,e){this.type=t,this.p=new(c())(e.p,16),this.red=e.prime?c().red(e.prime):c().mont(this.p),this.zero=new(c())(0).toRed(this.red),this.one=new(c())(1).toRed(this.red),this.two=new(c())(2).toRed(this.red),this.n=e.n&&new(c())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var M=_;function E(t,e){this.curve=t,this.type=e,this.precomputed=null}_.prototype.point=function(){throw new Error("Not implemented")},_.prototype.validate=function(){throw new Error("Not implemented")},_.prototype._fixedNafMul=function(t,e){b(t.precomputed);var r=t._getDoubles(),n=y(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var o,s,a=[];for(o=0;o<n.length;o+=r.step){s=0;for(var u=o+r.step-1;u>=o;u--)s=(s<<1)+n[u];a.push(s)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<a.length;o++)(s=a[o])===h?c=c.mixedAdd(r.points[o]):s===-h&&(c=c.mixedAdd(r.points[o].neg()));l=l.add(c)}return l.toP()},_.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=y(e,r,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var u=0;a>=0&&0===o[a];a--)u++;if(a>=0&&u++,s=s.dblp(u),a<0)break;var l=o[a];b(0!==l),s="affine"===t.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===t.type?s.toP():s},_.prototype._wnafMulAdd=function(t,e,r,n,i){var o,s,a,u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,h=0;for(o=0;o<n;o++){var f=(a=e[o])._getNAFPoints(t);u[o]=f.wnd,l[o]=f.points}for(o=n-1;o>=1;o-=2){var d=o-1,p=o;if(1===u[d]&&1===u[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=w(r[d],r[p]);for(h=Math.max(v[0].length,h),c[d]=new Array(h),c[p]=new Array(h),s=0;s<h;s++){var b=0|v[0][s],_=0|v[1][s];c[d][s]=g[3*(b+1)+(_+1)],c[p][s]=0,l[d]=m}}else c[d]=y(r[d],u[d],this._bitLength),c[p]=y(r[p],u[p],this._bitLength),h=Math.max(c[d].length,h),h=Math.max(c[p].length,h)}var M=this.jpoint(null,null,null),E=this._wnafT4;for(o=h;o>=0;o--){for(var k=0;o>=0;){var A=!0;for(s=0;s<n;s++)E[s]=0|c[s][o],0!==E[s]&&(A=!1);if(!A)break;k++,o--}if(o>=0&&k++,M=M.dblp(k),o<0)break;for(s=0;s<n;s++){var x=E[s];0!==x&&(x>0?a=l[s][x-1>>1]:x<0&&(a=l[s][-x-1>>1].neg()),M="affine"===a.type?M.mixedAdd(a):M.add(a))}}for(o=0;o<n;o++)l[o]=null;return i?M:M.toP()},_.BasePoint=E,E.prototype.eq=function(){throw new Error("Not implemented")},E.prototype.validate=function(){return this.curve.validate(this)},_.prototype.decodePoint=function(t,e){t=v.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1===2*r)return 6===t[0]?b(t[t.length-1]%2===0):7===t[0]&&b(t[t.length-1]%2===1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},E.prototype.encodeCompressed=function(t){return this.encode(t,!0)},E.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},E.prototype.encode=function(t,e){return v.encode(this._encode(e),t)},E.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},E.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},E.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},E.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},E.prototype._getBeta=function(){return null},E.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var k=d((function(t){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}})),A=v.assert;function x(t){M.call(this,"short",t),this.a=new(c())(t.a,16).toRed(this.red),this.b=new(c())(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}k(x,M);var S=x;function N(t,e,r,n){M.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(c())(e,16),this.y=new(c())(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function C(t,e,r,n){M.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(c())(0)):(this.x=new(c())(e,16),this.y=new(c())(r,16),this.z=new(c())(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}x.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new(c())(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new(c())(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],A(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new(c())(t.a,16),b:new(c())(t.b,16)}})):this._getEndoBasis(r)}}},x.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:c().mont(t),r=new(c())(2).toRed(e).redInvm(),n=r.redNeg(),i=new(c())(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},x.prototype._getEndoBasis=function(t){for(var e,r,n,i,o,s,a,u,l,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,d=this.n.clone(),p=new(c())(1),m=new(c())(0),g=new(c())(0),v=new(c())(1),y=0;0!==f.cmpn(0);){var w=d.div(f);u=d.sub(w.mul(f)),l=g.sub(w.mul(p));var b=v.sub(w.mul(m));if(!n&&u.cmp(h)<0)e=a.neg(),r=p,n=u.neg(),i=l;else if(n&&2===++y)break;a=u,d=f,f=u,g=p,p=l,v=m,m=b}o=u.neg(),s=l;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=e,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},x.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),l=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(l).neg()}},x.prototype.pointFromX=function(t,e){(t=new(c())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},x.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},x.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var l=this._wnafMulAdd(1,n,i,2*o,r),c=0;c<2*o;c++)n[c]=null,i[c]=null;return l},k(N,M.BasePoint),x.prototype.point=function(t,e,r){return new N(this,t,e,r)},x.prototype.pointFromJSON=function(t,e){return N.fromJSON(this,t,e)},N.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},N.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},N.fromJSON=function(t,e,r){"string"===typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},N.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},N.prototype.isInfinity=function(){return this.inf},N.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},N.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},N.prototype.getX=function(){return this.x.fromRed()},N.prototype.getY=function(){return this.y.fromRed()},N.prototype.mul=function(t){return t=new(c())(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},N.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},N.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},N.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},N.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},N.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},k(C,M.BasePoint),x.prototype.jpoint=function(t,e,r){return new C(this,t,e,r)},C.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},C.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},C.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),h=n.redMul(l),f=u.redSqr().redIAdd(c).redISub(h).redISub(h),d=u.redMul(h.redISub(f)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(f,d,p)},C.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),c=r.redMul(u),h=a.redSqr().redIAdd(l).redISub(c).redISub(c),f=a.redMul(c.redISub(h)).redISub(i.redMul(l)),d=this.z.redMul(s);return this.curve.jpoint(h,f,d)},C.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),l=s.redAdd(s);for(e=0;e<t;e++){var c=o.redSqr(),h=l.redSqr(),f=h.redSqr(),d=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(u)),p=o.redMul(h),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=d.redMul(g);v=v.redIAdd(v).redISub(f);var y=l.redMul(a);e+1<t&&(u=u.redMul(f)),o=m,a=y,l=v}return this.curve.jpoint(o,l.redMul(i),a)},C.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},C.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),t=u,e=a.redMul(s.redISub(u)).redISub(l),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),f=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(c).redISub(f);d=d.redIAdd(d);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},C.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),e=a.redMul(s.redISub(u)).redISub(l),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),f=this.x.redMul(h),d=this.x.redSub(c).redMul(this.x.redAdd(c));d=d.redAdd(d).redIAdd(d);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},C.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),l=(u=u.redIAdd(u)).redMul(s),c=a.redSqr().redISub(l.redAdd(l)),h=l.redISub(c),f=s.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=a.redMul(h).redISub(f),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,d,p)},C.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var l=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),c=e.redMul(l);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(a).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.y.redMul(l.redMul(u.redISub(l)).redISub(s.redMul(a)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,f,d)},C.prototype.mul=function(t,e){return t=new(c())(t,e),this.curve._wnafMul(this,t)},C.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},C.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},C.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},C.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var I=d((function(t,e){var r=e;r.base=M,r.short=S,r.mont=null,r.edwards=null})),P=d((function(t,e){var r,n=e,i=v.assert;function o(t){"short"===t.type?this.curve=new I.short(t):"edwards"===t.type?this.curve=new I.edwards(t):this.curve=new I.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new o(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:f().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:f().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:f().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:f().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:f().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(a){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:f().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function R(t){if(!(this instanceof R))return new R(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=g.toArray(t.entropy,t.entropyEnc||"hex"),r=g.toArray(t.nonce,t.nonceEnc||"hex"),n=g.toArray(t.pers,t.persEnc||"hex");p(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var O=R;R.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},R.prototype._hmac=function(){return new(f().hmac)(this.hash,this.K)},R.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},R.prototype.reseed=function(t,e,r,n){"string"!==typeof e&&(n=r,r=e,e=null),t=g.toArray(t,e),r=g.toArray(r,n),p(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},R.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(n=r,r=e,e=null),r&&(r=g.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,t);return this._update(r),this._reseed++,g.encode(o,e)};var T=v.assert;function B(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var L=B;B.fromPublic=function(t,e,r){return e instanceof B?e:new B(t,{pub:e,pubEnc:r})},B.fromPrivate=function(t,e,r){return e instanceof B?e:new B(t,{priv:e,privEnc:r})},B.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},B.prototype.getPublic=function(t,e){return"string"===typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},B.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},B.prototype._importPrivate=function(t,e){this.priv=new(c())(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},B.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?T(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||T(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},B.prototype.derive=function(t){return t.validate()||T(t.validate(),"public point not validated"),t.mul(this.priv).getX()},B.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},B.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},B.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var j=v.assert;function F(t,e){if(t instanceof F)return t;this._importDER(t,e)||(j(t.r&&t.s,"Signature without r or s"),this.r=new(c())(t.r,16),this.s=new(c())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var U=F;function D(){this.place=0}function z(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function q(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function V(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}F.prototype._importDER=function(t,e){t=v.toArray(t,e);var r=new D;if(48!==t[r.place++])return!1;var n=z(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=z(t,r);if(!1===i)return!1;var o=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var s=z(t,r);if(!1===s)return!1;if(t.length!==s+r.place)return!1;var a=t.slice(r.place,s+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new(c())(o),this.s=new(c())(a),this.recoveryParam=null,!0},F.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=q(e),r=q(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];V(n,e.length),(n=n.concat(e)).push(2),V(n,r.length);var i=n.concat(r),o=[48];return V(o,i.length),o=o.concat(i),v.encode(o,t)};var H=function(){throw new Error("unsupported")},W=v.assert;function Y(t){if(!(this instanceof Y))return new Y(t);"string"===typeof t&&(W(Object.prototype.hasOwnProperty.call(P,t),"Unknown curve "+t),t=P[t]),t instanceof P.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var K=Y;Y.prototype.keyPair=function(t){return new L(this,t)},Y.prototype.keyFromPrivate=function(t,e){return L.fromPrivate(this,t,e)},Y.prototype.keyFromPublic=function(t,e){return L.fromPublic(this,t,e)},Y.prototype.genKeyPair=function(t){t||(t={});for(var e=new O({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||H(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(c())(2));;){var i=new(c())(e.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Y.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},Y.prototype.sign=function(t,e,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new(c())(t,16));for(var i=this.n.byteLength(),o=e.getPrivate().toArray("be",i),s=t.toArray("be",i),a=new O({hash:this.hash,entropy:o,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(c())(1)),l=0;;l++){var h=n.k?n.k(l):new(c())(a.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(u)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var d=f.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var m=h.invm(this.n).mul(p.mul(e.getPrivate()).iadd(t));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(f.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new U({r:p,s:m,recoveryParam:g})}}}}}},Y.prototype.verify=function(t,e,r,n){t=this._truncateToN(new(c())(t,16)),r=this.keyFromPublic(r,n);var i=(e=new U(e,"hex")).r,o=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,a=o.invm(this.n),u=a.mul(t).umod(this.n),l=a.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},Y.prototype.recoverPubKey=function(t,e,r,n){W((3&r)===r,"The recovery param is more than two bits"),e=new U(e,n);var i=this.n,o=new(c())(t),s=e.r,a=e.s,u=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var h=e.r.invm(i),f=i.sub(o).mul(h).umod(i),d=a.mul(h).umod(i);return this.g.mulAdd(f,s,d)},Y.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new U(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var G=d((function(t,e){var r=e;r.version="6.5.4",r.utils=v,r.rand=function(){throw new Error("unsupported")},r.curve=I,r.curves=P,r.ec=K,r.eddsa=null})).ec,J=r(3678),Q=r(4589);const Z=new Q.Vy("signing-key/5.7.0");let X=null;function $(){return X||(X=new G("secp256k1")),X}class tt{constructor(t){(0,J.yY)(this,"curve","secp256k1"),(0,J.yY)(this,"privateKey",(0,o.c$)(t)),32!==(0,o.cm)(this.privateKey)&&Z.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=$().keyFromPrivate((0,o.k9)(this.privateKey));(0,J.yY)(this,"publicKey","0x"+e.getPublic(!1,"hex")),(0,J.yY)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),(0,J.yY)(this,"_isSigningKey",!0)}_addPoint(t){const e=$().keyFromPublic((0,o.k9)(this.publicKey)),r=$().keyFromPublic((0,o.k9)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=$().keyFromPrivate((0,o.k9)(this.privateKey)),r=(0,o.k9)(t);32!==r.length&&Z.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return(0,o.Pc)({recoveryParam:n.recoveryParam,r:(0,o.bj)("0x"+n.r.toString(16),32),s:(0,o.bj)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=$().keyFromPrivate((0,o.k9)(this.privateKey)),r=$().keyFromPublic((0,o.k9)(et(t)));return(0,o.bj)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function et(t,e){const r=(0,o.k9)(t);if(32===r.length){const t=new tt(r);return e?"0x"+$().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?(0,o.c$)(r):"0x"+$().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+$().keyFromPublic(r).getPublic(!0,"hex"):(0,o.c$)(r):Z.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rt=new Q.Vy("transactions/5.7.0");var nt;function it(t){return"0x"===t?null:(0,n.getAddress)(t)}function ot(t){return"0x"===t?s.XK:i.gH.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(nt||(nt={}));function st(t,e){return function(t){const e=et(t);return(0,n.getAddress)((0,o.Ab)((0,a.S)((0,o.Ab)(e,1)),12))}(function(t,e){const r=(0,o.Pc)(e),n={r:(0,o.k9)(r.r),s:(0,o.k9)(r.s)};return"0x"+$().recoverPubKey((0,o.k9)(t),n,r.recoveryParam).encode("hex",!1)}((0,o.k9)(t),e))}function at(t,e){const r=(0,o.gr)(i.gH.from(t).toHexString());return r.length>32&&rt.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function ut(t,e){return{address:(0,n.getAddress)(t),storageKeys:(e||[]).map(((e,r)=>(32!==(0,o.cm)(e)&&rt.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase())))}}function lt(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&rt.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),ut(t[0],t[1])):ut(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return ut(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function ct(t){return lt(t).map((t=>[t.address,t.storageKeys]))}function ht(t,e){if(null!=t.gasPrice){const e=i.gH.from(t.gasPrice),r=i.gH.from(t.maxFeePerGas||0);e.eq(r)||rt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[at(t.chainId||0,"chainId"),at(t.nonce||0,"nonce"),at(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),at(t.maxFeePerGas||0,"maxFeePerGas"),at(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.getAddress)(t.to):"0x",at(t.value||0,"value"),t.data||"0x",ct(t.accessList||[])];if(e){const t=(0,o.Pc)(e);r.push(at(t.recoveryParam,"recoveryParam")),r.push((0,o.gr)(t.r)),r.push((0,o.gr)(t.s))}return(0,o.qn)(["0x02",u.l(r)])}function ft(t,e){const r=[at(t.chainId||0,"chainId"),at(t.nonce||0,"nonce"),at(t.gasPrice||0,"gasPrice"),at(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.getAddress)(t.to):"0x",at(t.value||0,"value"),t.data||"0x",ct(t.accessList||[])];if(e){const t=(0,o.Pc)(e);r.push(at(t.recoveryParam,"recoveryParam")),r.push((0,o.gr)(t.r)),r.push((0,o.gr)(t.s))}return(0,o.qn)(["0x01",u.l(r)])}function dt(t,e,r){try{const r=ot(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(n){rt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,o.bj)(e[1],32),t.s=(0,o.bj)(e[2],32);try{const e=(0,a.S)(r(t));t.from=st(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(n){}}function pt(t){const e=(0,o.k9)(t);if(e[0]>127)return function(t){const e=u.D(t);9!==e.length&&6!==e.length&&rt.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:ot(e[0]).toNumber(),gasPrice:ot(e[1]),gasLimit:ot(e[2]),to:it(e[3]),value:ot(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=i.gH.from(e[6]).toNumber()}catch(n){return r}if(r.r=(0,o.bj)(e[7],32),r.s=(0,o.bj)(e[8],32),i.gH.from(r.r).isZero()&&i.gH.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const s=e.slice(0,6);0!==r.chainId&&(s.push((0,o.c$)(r.chainId)),s.push("0x"),s.push("0x"),i-=2*r.chainId+8);const l=(0,a.S)(u.l(s));try{r.from=st(l,{r:(0,o.c$)(r.r),s:(0,o.c$)(r.s),recoveryParam:i})}catch(n){}r.hash=(0,a.S)(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=u.D(t.slice(1));8!==e.length&&11!==e.length&&rt.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.c$)(t));const r={type:1,chainId:ot(e[0]).toNumber(),nonce:ot(e[1]).toNumber(),gasPrice:ot(e[2]),gasLimit:ot(e[3]),to:it(e[4]),value:ot(e[5]),data:e[6],accessList:lt(e[7])};return 8===e.length||(r.hash=(0,a.S)(t),dt(r,e.slice(8),ft)),r}(e);case 2:return function(t){const e=u.D(t.slice(1));9!==e.length&&12!==e.length&&rt.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.c$)(t));const r=ot(e[2]),n=ot(e[3]),i={type:2,chainId:ot(e[0]).toNumber(),nonce:ot(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:ot(e[4]),to:it(e[5]),value:ot(e[6]),data:e[7],accessList:lt(e[8])};return 9===e.length||(i.hash=(0,a.S)(t),dt(i,e.slice(9),ht)),i}(e)}return rt.throwError("unsupported transaction type: ".concat(e[0]),Q.Vy.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}},4031:(t,e,r)=>{"use strict";r.d(e,{x6:()=>p,wt:()=>m});var n=r(7662),i=r(9106),o=r(3678),s=r(2614),a=r(4589);var u=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};function l(t,e){return u(this,void 0,void 0,(function*(){null==e&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(!0!==e.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=e.fetchOptions){const t=e.fetchOptions;t.mode&&(r.mode=t.mode),t.cache&&(r.cache=t.cache),t.credentials&&(r.credentials=t.credentials),t.redirect&&(r.redirect=t.redirect),t.referrer&&(r.referrer=t.referrer)}const n=yield fetch(t,r),o=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach(((t,e)=>{s[e.toLowerCase()]=t})):n.headers.keys().forEach((t=>{s[t.toLowerCase()]=n.headers.get(t)})),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,i.k9)(new Uint8Array(o))}}))}var c=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const h=new a.Vy("web/5.7.1");function f(t){return new Promise((e=>{setTimeout(e,t)}))}function d(t,e){if(null==t)return null;if("string"===typeof t)return t;if((0,i.f)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return(0,s._v)(t)}catch(r){}return(0,i.c$)(t)}return t}function p(t,e,r){let i=null;if(null!=e){i=(0,s.YW)(e);const r="string"===typeof t?{url:t}:(0,o.Ic)(t);if(r.headers){0!==Object.keys(r.headers).filter((t=>"content-type"===t.toLowerCase())).length||(r.headers=(0,o.Ic)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return function(t,e,r){const i="object"===typeof t&&null!=t.throttleLimit?t.throttleLimit:12;h.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);const u="object"===typeof t?t.throttleCallback:null,p="object"===typeof t&&"number"===typeof t.throttleSlotInterval?t.throttleSlotInterval:100;h.assertArgument(p>0&&p%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const m="object"===typeof t&&!!t.errorPassThrough,g={};let v=null;const y={method:"GET"};let w=!1,b=12e4;if("string"===typeof t)v=t;else if("object"===typeof t){if(null!=t&&null!=t.url||h.throwArgumentError("missing URL","connection.url",t),v=t.url,"number"===typeof t.timeout&&t.timeout>0&&(b=t.timeout),t.headers)for(const e in t.headers)g[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(w=!0);if(y.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==v.substring(0,6)&&!0!==t.allowInsecureAuthentication&&h.throwError("basic authentication requires a secure https url",a.Vy.errors.INVALID_ARGUMENT,{argument:"url",url:v,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;g.authorization={key:"Authorization",value:"Basic "+(0,n.l)((0,s.YW)(e))}}null!=t.skipFetchSetup&&(y.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(y.fetchOptions=(0,o.Ic)(t.fetchOptions))}const _=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),M=v?v.match(_):null;if(M)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":M[1]||"text/plain"},body:M[2]?(0,n.D)(M[3]):(E=M[3],(0,s.YW)(E.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(S){h.throwError("processing response error",a.Vy.errors.SERVER_ERROR,{body:d(M[1],M[2]),error:S,requestBody:null,requestMethod:"GET",url:v})}var E;e&&(y.method="POST",y.body=e,null==g["content-type"]&&(g["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==g["content-length"]&&(g["content-length"]={key:"Content-Length",value:String(e.length)}));const k={};Object.keys(g).forEach((t=>{const e=g[t];k[e.key]=e.value})),y.headers=k;const A=function(){let t=null;return{promise:new Promise((function(e,r){b&&(t=setTimeout((()=>{null!=t&&(t=null,r(h.makeError("timeout",a.Vy.errors.TIMEOUT,{requestBody:d(y.body,k["content-type"]),requestMethod:y.method,timeout:b,url:v})))}),b))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),x=function(){return c(this,void 0,void 0,(function*(){for(let t=0;t<i;t++){let e=null;try{if(e=yield l(v,y),t<i)if(301===e.statusCode||302===e.statusCode){const t=e.headers.location||"";if("GET"===y.method&&t.match(/^https:/)){v=e.headers.location;continue}}else if(429===e.statusCode){let r=!0;if(u&&(r=yield u(t,v)),r){let r=0;const n=e.headers["retry-after"];r="string"===typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):p*parseInt(String(Math.random()*Math.pow(2,t))),yield f(r);continue}}}catch(S){e=S.response,null==e&&(A.cancel(),h.throwError("missing response",a.Vy.errors.SERVER_ERROR,{requestBody:d(y.body,k["content-type"]),requestMethod:y.method,serverError:S,url:v}))}let n=e.body;if(w&&304===e.statusCode?n=null:!m&&(e.statusCode<200||e.statusCode>=300)&&(A.cancel(),h.throwError("bad response",a.Vy.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:d(n,e.headers?e.headers["content-type"]:null),requestBody:d(y.body,k["content-type"]),requestMethod:y.method,url:v})),r)try{const t=yield r(n,e);return A.cancel(),t}catch(S){if(S.throttleRetry&&t<i){let e=!0;if(u&&(e=yield u(t,v)),e){const e=p*parseInt(String(Math.random()*Math.pow(2,t)));yield f(e);continue}}A.cancel(),h.throwError("processing response error",a.Vy.errors.SERVER_ERROR,{body:d(n,e.headers?e.headers["content-type"]:null),error:S,requestBody:d(y.body,k["content-type"]),requestMethod:y.method,url:v})}return A.cancel(),n}return h.throwError("failed response",a.Vy.errors.SERVER_ERROR,{requestBody:d(y.body,k["content-type"]),requestMethod:y.method,url:v})}))}();return Promise.race([A.promise,x])}(t,i,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse((0,s._v)(t))}catch(i){h.throwError("invalid JSON",a.Vy.errors.SERVER_ERROR,{body:t,error:i})}return r&&(n=r(n,e)),n}))}function m(t,e){return e||(e={}),null==(e=(0,o.Ic)(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let u=0;!function i(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(u++,u>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));t<e.floor&&(t=e.floor),t>e.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null}),(function(t){s()&&n(t)}))}()}))}},5254:t=>{"use strict";t.exports=function(){let{mustBeMetaMask:t=!1,silent:e=!1,timeout:r=3e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(){if("boolean"!==typeof t)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!==typeof e)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!==typeof r)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let n=!1;return new Promise((i=>{function o(){if(n)return;n=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:r}=window;if(!r||t&&!r.isMetaMask){const n=t&&r?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum.";!e&&console.error("@metamask/detect-provider:",n),i(null)}else i(r)}window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout((()=>{o()}),r))}))}},5850:(t,e,r)=>{"use strict";r.r(e),r.d(e,{detectEnv:()=>y,detectOS:()=>w,formatIOSMobile:()=>H,formatMobileRegistry:()=>X,formatMobileRegistryEntry:()=>Z,getClientMeta:()=>j,getCrypto:()=>T,getCryptoOrThrow:()=>O,getDappRegistryUrl:()=>Q,getDocument:()=>N,getDocumentOrThrow:()=>S,getFromWindow:()=>A,getFromWindowOrThrow:()=>x,getLocal:()=>z,getLocalStorage:()=>L,getLocalStorageOrThrow:()=>B,getLocation:()=>R,getLocationOrThrow:()=>P,getMobileLinkRegistry:()=>K,getMobileRegistryEntry:()=>Y,getNavigator:()=>I,getNavigatorOrThrow:()=>C,getWalletRegistryUrl:()=>J,isAndroid:()=>b,isBrowser:()=>k,isIOS:()=>_,isMobile:()=>M,isNode:()=>E,mobileLinkChoiceKey:()=>V,removeLocal:()=>q,safeJsonParse:()=>F,safeJsonStringify:()=>U,saveMobileLinkInfo:()=>W,setLocal:()=>D});var n=r(2146),i=r(8599),o=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n},s=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},a=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},u=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},l=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},c=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},h=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,f=3,d=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],p=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function m(t){return t?v(t):"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!==typeof navigator?v(navigator.userAgent):function(){var t="undefined"!==typeof process&&process.version;return t?new a(process.version.slice(1)):null}()}function g(t){return""!==t&&d.reduce((function(e,r){var n=r[0],i=r[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]}),!1)}function v(t){var e=g(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new l;var i=n[1]&&n[1].split(/[._]/).slice(0,3);i?i.length<f&&(i=o(i,function(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}(f-i.length))):i=[];var a=i.join("."),c=function(t){for(var e=0,r=p.length;e<r;e++){var n=p[e],i=n[0];if(n[1].exec(t))return i}return null}(t),d=h.exec(t);return d&&d[1]?new u(r,a,c,d[1]):new s(r,a,c)}function y(t){return m(t)}function w(){const t=y();return t&&t.os?t.os:void 0}function b(){const t=w();return!!t&&t.toLowerCase().includes("android")}function _(){const t=w();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function M(){return!!w()&&(b()||_())}function E(){const t=y();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}function k(){return!E()&&!!I()}const A=i.getFromWindow,x=i.getFromWindowOrThrow,S=i.getDocumentOrThrow,N=i.getDocument,C=i.getNavigatorOrThrow,I=i.getNavigator,P=i.getLocationOrThrow,R=i.getLocation,O=i.getCryptoOrThrow,T=i.getCrypto,B=i.getLocalStorageOrThrow,L=i.getLocalStorage;function j(){return n.g()}const F=function(t){if("string"!==typeof t)throw new Error("Cannot safe json parse value of type ".concat(typeof t));try{return JSON.parse(t)}catch(e){return t}},U=function(t){return"string"===typeof t?t:JSON.stringify(t)};function D(t,e){const r=U(e),n=L();n&&n.setItem(t,r)}function z(t){let e=null,r=null;const n=L();return n&&(r=n.getItem(t)),e=r?F(r):r,e}function q(t){const e=L();e&&e.removeItem(t)}const V="WALLETCONNECT_DEEPLINK_CHOICE";function H(t,e){const r=encodeURIComponent(t);return e.universalLink?"".concat(e.universalLink,"/wc?uri=").concat(r):e.deepLink?"".concat(e.deepLink).concat(e.deepLink.endsWith(":")?"//":"/","wc?uri=").concat(r):""}function W(t){const e=t.href.split("?")[0];D(V,Object.assign(Object.assign({},t),{href:e}))}function Y(t,e){return t.filter((t=>t.name.toLowerCase().includes(e.toLowerCase())))[0]}function K(t,e){let r=t;return e&&(r=e.map((e=>Y(t,e))).filter(Boolean)),r}const G="https://registry.walletconnect.com";function J(){return G+"/api/v2/wallets"}function Q(){return G+"/api/v2/dapps"}function Z(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";var r;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:null!==(r=t.image_url.sm)&&void 0!==r?r:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function X(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";return Object.values(t).filter((t=>!!t[e].universal||!!t[e].native)).map((t=>Z(t,e)))}},8599:(t,e)=>{"use strict";function r(t){let e;return"undefined"!==typeof window&&"undefined"!==typeof window[t]&&(e=window[t]),e}function n(t){const e=r(t);if(!e)throw new Error("".concat(t," is not defined in Window"));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=r,e.getFromWindowOrThrow=n,e.getDocumentOrThrow=function(){return n("document")},e.getDocument=function(){return r("document")},e.getNavigatorOrThrow=function(){return n("navigator")},e.getNavigator=function(){return r("navigator")},e.getLocationOrThrow=function(){return n("location")},e.getLocation=function(){return r("location")},e.getCryptoOrThrow=function(){return n("crypto")},e.getCrypto=function(){return r("crypto")},e.getLocalStorageOrThrow=function(){return n("localStorage")},e.getLocalStorage=function(){return r("localStorage")}},2146:(t,e,r)=>{"use strict";e.g=void 0;const n=r(8599);e.g=function(){let t,e;try{t=n.getDocumentOrThrow(),e=n.getLocationOrThrow()}catch(o){return null}function r(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];const i=t.getElementsByTagName("meta");for(let t=0;t<i.length;t++){const e=i[t],n=["itemprop","property","name"].map((t=>e.getAttribute(t))).filter((t=>!!t&&r.includes(t)));if(n.length&&n){const t=e.getAttribute("content");if(t)return t}}return""}const i=function(){let e=r("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return{description:r("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const r=t.getElementsByTagName("link"),n=[];for(let t=0;t<r.length;t++){const i=r[t],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const t=i.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let r=e.protocol+"//"+e.host;if(0===t.indexOf("/"))r+=t;else{const n=e.pathname.split("/");n.pop();r+=n.join("/")+"/"+t}n.push(r)}else if(0===t.indexOf("//")){const r=e.protocol+t;n.push(r)}else n.push(t)}}return n}(),name:i}}},6528:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(6543).Buffer}catch(k){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=n)l=u(t,c,c+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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],h=[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];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var c=u>>>26,h=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,l=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a<o;a++)l[a]=0}else{for(a=0;a<o-i;a++)l[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[o-a-1]=s}return l},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,l=0,c=0|s[0],h=8191&c,f=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],b=8191&w,_=w>>>13,M=0|s[4],E=8191&M,k=M>>>13,A=0|s[5],x=8191&A,S=A>>>13,N=0|s[6],C=8191&N,I=N>>>13,P=0|s[7],R=8191&P,O=P>>>13,T=0|s[8],B=8191&T,L=T>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],z=8191&D,q=D>>>13,V=0|a[1],H=8191&V,W=V>>>13,Y=0|a[2],K=8191&Y,G=Y>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,lt=at>>>13,ct=0|a[8],ht=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var vt=(l+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(l+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,K)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var wt=(l+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var bt=(l+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;l=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(l+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(l+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var kt=(l+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ft)|0;var At=(l+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(U,H)|0,o=Math.imul(U,W),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ft)|0;var xt=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,lt)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var St=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,Z))+Math.imul(U,Q)|0,o=Math.imul(U,Z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var Nt=(l+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,ft)|0;var Ct=(l+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;l=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ft)|0;var It=(l+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,lt)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,lt)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ft)|0;var Pt=(l+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,lt))+Math.imul(U,ut)|0,o=Math.imul(U,lt),n=n+Math.imul(B,ht)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ft)|0;var Rt=(l+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,ft))+Math.imul(U,ht)|0,o=Math.imul(U,ft);var Ot=(l+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;l=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Tt=(l+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(U,pt)|0))<<13)|0;return l=((o=Math.imul(U,mt))+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=bt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=kt,u[9]=At,u[10]=xt,u[11]=St,u[12]=Nt,u[13]=Ct,u[14]=It,u[15]=Pt,u[16]=Rt,u[17]=Ot,u[18]=Tt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var c=o-l,h=(0|t.words[c])*(0|e.words[l]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,f=l,d=0;d<s;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],v=n[c+d+s],y=h*g-f*v;v=h*v+f*g,g=y,r[c+d]=p+g,n[c+d]=m+v,r[c+d+s]=p-g,n[c+d+s]=m-v,d!==a&&(y=u*h-l*f,f=u*f+l*h,h=y)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,l,n),this.transform(s,o,a,u,n,i),this.transform(l,o,c,h,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"===typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"===typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"===typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var h=0|this.words[l];this.words[l]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"===typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0===(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,v),i(b,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));f=f.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var h=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},635:(t,e,r)=>{"use strict";const n=r(7491),i=r(5707),o=r(1289);function s(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function u(t,e){return e.decode?i(t):t}function l(t){return Array.isArray(t)?t.sort():"object"===typeof t?l(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function c(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function h(t){const e=(t=c(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function f(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function d(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"===typeof r&&r.split("").indexOf(t.arrayFormatSeparator)>-1?r.split(t.arrayFormatSeparator).map((e=>u(e,t))):null===r?r:u(r,t);n[e]=i};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!==typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){let[t,s]=o(e.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),r(u(t,e),s,n)}for(const i of Object.keys(n)){const t=n[i];if("object"===typeof t&&null!==t)for(const r of Object.keys(t))t[r]=f(t[r],e);else n[i]=f(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?t[e]=l(r):t[e]=r,t}),Object.create(null))}e.extract=h,e.parse=d,e.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>{return e.skipNull&&(null===(n=t[r])||void 0===n)||e.skipEmptyString&&""===t[r];var n},n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[",i,"]"].join("")]:[...r,[a(e,t),"[",a(i,t),"]=",a(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[]"].join("")]:[...r,[a(e,t),"[]=",a(n,t)].join("")];case"comma":case"separator":return e=>(r,n)=>null===n||void 0===n||0===n.length?r:0===r.length?[[a(e,t),"=",a(n,t)].join("")]:[[r,a(n,t)].join(t.arrayFormatSeparator)];default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,a(e,t)]:[...r,[a(e,t),"=",a(n,t)].join("")]}}(e),i={};for(const s of Object.keys(t))r(s)||(i[s]=t[s]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((r=>{const i=t[r];return void 0===i?"":null===i?a(r,e):Array.isArray(i)?i.reduce(n(r),[]).join("&"):a(r,e)+"="+a(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=o(t,"#");return Object.assign({url:r.split("?")[0]||"",query:d(h(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=c(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query);let u=e.stringify(s,r);u&&(u="?".concat(u));let l=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(l="#".concat(a(t.fragmentIdentifier,r))),"".concat(n).concat(u).concat(l)}},364:(t,e,r)=>{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=n,e.getSubtleCrypto=i,e.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},6454:(t,e)=>{"use strict";function r(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=r,e.isNode=n,e.isBrowser=function(){return!r()&&!n()}},8129:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(6613);n.__exportStar(r(364),e),n.__exportStar(r(6454),e)},6613:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__assign:()=>o,__asyncDelegator:()=>b,__asyncGenerator:()=>w,__asyncValues:()=>_,__await:()=>y,__awaiter:()=>c,__classPrivateFieldGet:()=>A,__classPrivateFieldSet:()=>x,__createBinding:()=>f,__decorate:()=>a,__exportStar:()=>d,__extends:()=>i,__generator:()=>h,__importDefault:()=>k,__importStar:()=>E,__makeTemplateObject:()=>M,__metadata:()=>l,__param:()=>u,__read:()=>m,__rest:()=>s,__spread:()=>g,__spreadArrays:()=>v,__values:()=>p});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function u(t,e){return function(r,n){e(r,n,t)}}function l(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function h(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function f(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}function d(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||(e[r]=t[r])}function p(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}function v(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function y(t){return this instanceof y?(this.v=t,this):new y(t)}function w(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){o.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof y?Promise.resolve(r.value.v).then(u,l):c(o[0][2],r)}catch(n){c(o[0][3],n)}var r}function u(t){a("next",t)}function l(t){a("throw",t)}function c(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function b(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:y(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function E(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function k(t){return t&&t.__esModule?t:{default:t}}function A(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function x(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},6846:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(8725).Buffer}catch(k){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=n)l=u(t,c,c+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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],h=[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];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var c=u>>>26,h=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,l=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a<o;a++)l[a]=0}else{for(a=0;a<o-i;a++)l[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[o-a-1]=s}return l},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,l=0,c=0|s[0],h=8191&c,f=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],b=8191&w,_=w>>>13,M=0|s[4],E=8191&M,k=M>>>13,A=0|s[5],x=8191&A,S=A>>>13,N=0|s[6],C=8191&N,I=N>>>13,P=0|s[7],R=8191&P,O=P>>>13,T=0|s[8],B=8191&T,L=T>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],z=8191&D,q=D>>>13,V=0|a[1],H=8191&V,W=V>>>13,Y=0|a[2],K=8191&Y,G=Y>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,lt=at>>>13,ct=0|a[8],ht=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var vt=(l+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(l+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,K)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var wt=(l+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var bt=(l+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;l=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(l+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(l+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var kt=(l+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ft)|0;var At=(l+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(U,H)|0,o=Math.imul(U,W),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ft)|0;var xt=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,lt)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var St=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,Z))+Math.imul(U,Q)|0,o=Math.imul(U,Z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var Nt=(l+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,ft)|0;var Ct=(l+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;l=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ft)|0;var It=(l+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,lt)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,lt)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ft)|0;var Pt=(l+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,lt))+Math.imul(U,ut)|0,o=Math.imul(U,lt),n=n+Math.imul(B,ht)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ft)|0;var Rt=(l+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,ft))+Math.imul(U,ht)|0,o=Math.imul(U,ft);var Ot=(l+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;l=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Tt=(l+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(U,pt)|0))<<13)|0;return l=((o=Math.imul(U,mt))+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=bt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=kt,u[9]=At,u[10]=xt,u[11]=St,u[12]=Nt,u[13]=Ct,u[14]=It,u[15]=Pt,u[16]=Rt,u[17]=Ot,u[18]=Tt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var c=o-l,h=(0|t.words[c])*(0|e.words[l]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,f=l,d=0;d<s;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],v=n[c+d+s],y=h*g-f*v;v=h*v+f*g,g=y,r[c+d]=p+g,n[c+d]=m+v,r[c+d+s]=p-g,n[c+d+s]=m-v,d!==a&&(y=u*h-l*f,f=u*f+l*h,h=y)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,l,n),this.transform(s,o,a,u,n,i),this.transform(l,o,c,h,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"===typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"===typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"===typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var h=0|this.words[l];this.words[l]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"===typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0===(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,v),i(b,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));f=f.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var h=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},9117:(t,e,r)=>{"use strict";const n=r(7491),i=r(5707),o=r(1289);function s(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function u(t,e){return e.decode?i(t):t}function l(t){return Array.isArray(t)?t.sort():"object"===typeof t?l(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function c(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function h(t){const e=(t=c(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function f(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function d(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"===typeof r&&r.split("").indexOf(t.arrayFormatSeparator)>-1?r.split(t.arrayFormatSeparator).map((e=>u(e,t))):null===r?r:u(r,t);n[e]=i};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!==typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){let[t,s]=o(e.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),r(u(t,e),s,n)}for(const i of Object.keys(n)){const t=n[i];if("object"===typeof t&&null!==t)for(const r of Object.keys(t))t[r]=f(t[r],e);else n[i]=f(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?t[e]=l(r):t[e]=r,t}),Object.create(null))}e.extract=h,e.parse=d,e.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>{return e.skipNull&&(null===(n=t[r])||void 0===n)||e.skipEmptyString&&""===t[r];var n},n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[",i,"]"].join("")]:[...r,[a(e,t),"[",a(i,t),"]=",a(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[]"].join("")]:[...r,[a(e,t),"[]=",a(n,t)].join("")];case"comma":case"separator":return e=>(r,n)=>null===n||void 0===n||0===n.length?r:0===r.length?[[a(e,t),"=",a(n,t)].join("")]:[[r,a(n,t)].join(t.arrayFormatSeparator)];default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,a(e,t)]:[...r,[a(e,t),"=",a(n,t)].join("")]}}(e),i={};for(const s of Object.keys(t))r(s)||(i[s]=t[s]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((r=>{const i=t[r];return void 0===i?"":null===i?a(r,e):Array.isArray(i)?i.reduce(n(r),[]).join("&"):a(r,e)+"="+a(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=o(t,"#");return Object.assign({url:r.split("?")[0]||"",query:d(h(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=c(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query);let u=e.stringify(s,r);u&&(u="?".concat(u));let l=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(l="#".concat(a(t.fragmentIdentifier,r))),"".concat(n).concat(u).concat(l)}},8596:(t,e,r)=>{"use strict";r.r(e),r.d(e,{HttpConnection:()=>w,default:()=>w});var n=r(7284),i=r(9038),o=r.n(i);function s(t){if("string"!==typeof t)throw new Error("Cannot safe json parse value of type ".concat(typeof t));try{return(t=>{const e=t.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(e,((t,e)=>"string"===typeof e&&e.match(/^\d+n$/)?BigInt(e.substring(0,e.length-1)):e))})(t)}catch(e){return t}}function a(t){return"string"===typeof t?t:(e=t,JSON.stringify(e,((t,e)=>"bigint"===typeof e?e.toString()+"n":e))||"");var e}var u=r(1453),l=Object.defineProperty,c=Object.defineProperties,h=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,g=(t,e)=>{for(var r in e||(e={}))d.call(e,r)&&m(t,r,e[r]);if(f)for(var r of f(e))p.call(e,r)&&m(t,r,e[r]);return t},v=(t,e)=>c(t,h(e));const y={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class w{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.url=t,this.disableProviderPing=e,this.events=new n.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,u.isHttpUrl)(t))throw new Error("Provided URL is not compatible with HTTP connection: ".concat(t));this.url=t,this.disableProviderPing=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async open(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(t)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(t){this.isAvailable||await this.register();try{const e=a(t),r=await(await o()(this.url,v(g({},y),{body:e}))).json();this.onPayload({data:r})}catch(e){this.onError(t.id,e)}}async register(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!(0,u.isHttpUrl)(t))throw new Error("Provided URL is not compatible with HTTP connection: ".concat(t));if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise(((t,e)=>{this.events.once("register_error",(t=>{this.resetMaxListeners(),e(t)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return e(new Error("HTTP connection is missing or invalid"));t()}))}))}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){const e=a({id:1,jsonrpc:"2.0",method:"test",params:[]});await o()(t,v(g({},y),{body:e}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;const e="string"==typeof t.data?s(t.data):t.data;this.events.emit("payload",e)}onError(t,e){const r=this.parseError(e),n=r.message||r.toString(),i=(0,u.formatJsonRpcError)(t,n);this.events.emit("payload",i)}parseError(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return(0,u.parseConnectionError)(t,e,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}},7312:(t,e,r)=>{"use strict";r.r(e),r.d(e,{JsonRpcProvider:()=>o,default:()=>o});var n=r(7284),i=r(1453);class o extends i.IJsonRpcProvider{constructor(t){super(t),this.events=new n.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;await this.open(t)}async disconnect(){await this.close()}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async request(t,e){return this.requestStrict((0,i.formatJsonRpcRequest)(t.method,t.params||[],t.id||(0,i.getBigIntRpcId)().toString()),e)}async requestStrict(t,e){return new Promise((async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(o){n(o)}this.events.on("".concat(t.id),(t=>{(0,i.isJsonRpcError)(t)?n(t.error):r(t.result)}));try{await this.connection.send(t,e)}catch(o){n(o)}}))}setConnection(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection}onPayload(t){this.events.emit("payload",t),(0,i.isJsonRpcResponse)(t)?this.events.emit("".concat(t.id),t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&3e3===t.code&&this.events.emit("error",new Error("WebSocket connection closed abnormally with code: ".concat(t.code," ").concat(t.reason?"(".concat(t.reason,")"):""))),this.events.emit("disconnect")}async open(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof t&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(t=>this.onPayload(t))),this.connection.on("close",(t=>this.onClose(t))),this.connection.on("error",(t=>this.events.emit("error",t))),this.connection.on("register_error",(t=>this.onClose())),this.hasRegisteredEventListeners=!0)}}},2116:(t,e,r)=>{"use strict";r.d(e,{Vc:()=>i,kF:()=>s});class n{}class i extends n{constructor(t){super()}}class o extends n{constructor(){super()}}class s extends o{constructor(t){super()}}},1453:(t,e,r)=>{"use strict";r.d(e,{IJsonRpcProvider:()=>_.kF,formatJsonRpcError:()=>w,formatJsonRpcRequest:()=>y,getBigIntRpcId:()=>v,isHttpUrl:()=>k,isJsonRpcError:()=>S,isJsonRpcResponse:()=>x,parseConnectionError:()=>m,payloadId:()=>g});const n="PARSE_ERROR",i="INVALID_REQUEST",o="METHOD_NOT_FOUND",s="INVALID_PARAMS",a="INTERNAL_ERROR",u="SERVER_ERROR",l=[-32700,-32600,-32601,-32602,-32603],c={[n]:{code:-32700,message:"Parse error"},[i]:{code:-32600,message:"Invalid Request"},[o]:{code:-32601,message:"Method not found"},[s]:{code:-32602,message:"Invalid params"},[a]:{code:-32603,message:"Internal error"},[u]:{code:-32e3,message:"Server error"}},h=u;function f(t){return l.includes(t)}function d(t){return Object.keys(c).includes(t)?c[t]:c[h]}function p(t){const e=Object.values(c).find((e=>e.code===t));return e||c[h]}function m(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error("Unavailable ".concat(r," RPC url at ").concat(e)):t}r(8129);function g(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function v(){return BigInt(g(arguments.length>0&&void 0!==arguments[0]?arguments[0]:6))}function y(t,e,r){return{id:r||g(),jsonrpc:"2.0",method:t,params:e}}function w(t,e,r){return{id:t,jsonrpc:"2.0",error:b(e,r)}}function b(t,e){return"undefined"===typeof t?d(a):("string"===typeof t&&(t=Object.assign(Object.assign({},d(u)),{message:t})),"undefined"!==typeof e&&(t.data=e),f(t.code)&&(t=p(t.code)),t)}var _=r(2116);const M="^https?:";function E(t,e){const r=function(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(t);return"undefined"!==typeof r&&new RegExp(e).test(r)}function k(t){return E(t,M)}function A(t){return"object"===typeof t&&"id"in t&&"jsonrpc"in t&&"2.0"===t.jsonrpc}function x(t){return A(t)&&(function(t){return"result"in t}(t)||S(t))}function S(t){return"error"in t}},3024:(t,e,r)=>{function n(t){return t&&"object"===typeof t&&"default"in t?t.default:t}var i=r(5850),o=n(r(5910)),s=n(r(5270)),a=r(2657);var u=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n';"undefined"!==typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!==typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var l="data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",c="WalletConnect",h=300,f="rgb(64, 153, 255)",d="walletconnect-wrapper",p="walletconnect-style-sheet",m="walletconnect-qrcode-modal",g="walletconnect-qrcode-close",v="walletconnect-qrcode-text",y="walletconnect-connect-button";function w(t){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:l,className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,c),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:t.onClose},a.createElement("div",{id:g,className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function b(t){return a.createElement("a",{className:"walletconnect-connect__button",href:t.href,id:y+"-"+t.name,onClick:t.onClick,rel:"noopener noreferrer",style:{backgroundColor:t.color},target:"_blank"},t.name)}var _="data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E";function M(t){var e=t.color,r=t.href,n=t.name,i=t.logo,o=t.onClick;return a.createElement("a",{className:"walletconnect-modal__base__row",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+e,backgroundSize:"100%"}}),a.createElement("img",{src:_,className:"walletconnect-modal__base__row__right__caret"})))}function E(t){var e=t.color,r=t.href,n=t.name,i=t.logo,o=t.onClick,s=window.innerWidth<768?(n.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+e,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},n))}var k=5,A=12;function x(t){var e=i.isAndroid(),r=a.useState(""),n=r[0],o=r[1],s=a.useState(""),u=s[0],l=s[1],c=a.useState(1),h=c[0],d=c[1],p=u?t.links.filter((function(t){return t.name.toLowerCase().includes(u.toLowerCase())})):t.links,m=t.errorMessage,g=u||p.length>k,y=Math.ceil(p.length/A),w=[(h-1)*A+1,h*A],_=p.length?p.filter((function(t,e){return e+1>=w[0]&&e+1<=w[1]})):[],x=!(e||!(y>1)),S=void 0;return a.createElement("div",null,a.createElement("p",{id:v,className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:function(t){o(t.target.value),clearTimeout(S),t.target.value?S=setTimeout((function(){l(t.target.value),d(1)}),1e3):(o(""),l(""),d(1))}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":g&&p.length?"__wrap":"")},e?a.createElement(b,{name:t.text.connect,color:f,href:t.uri,onClick:a.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:t.uri})}),[])}):_.length?_.map((function(e){var r=e.color,n=e.name,o=e.shortName,s=e.logo,u=i.formatIOSMobile(t.uri,e),l=a.useCallback((function(){i.saveMobileLinkInfo({name:n,href:u})}),[_]);return g?a.createElement(E,{color:r,href:u,name:o||n,logo:s,onClick:l}):a.createElement(M,{color:r,href:u,name:n,logo:s,onClick:l})})):a.createElement(a.Fragment,null,a.createElement("p",null,m.length?t.errorMessage:t.links.length&&!p.length?t.text.no_wallets_found:t.text.loading))),x&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(y).fill(0).map((function(t,e){var r=e+1,n=h===r;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:n?"bold":"normal"},onClick:function(){return d(r)}},r)}))))}function S(t){var e=!!t.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}var N=function(t){try{var e="";return Promise.resolve(o.toString(t,{margin:0,type:"svg"})).then((function(t){return"string"===typeof t&&(e=t.replace("<svg",'<svg class="walletconnect-qrcode__image"')),e}))}catch(r){return Promise.reject(r)}};function C(t){var e=a.useState(""),r=e[0],n=e[1],i=a.useState(""),o=i[0],u=i[1];a.useEffect((function(){try{return Promise.resolve(N(t.uri)).then((function(t){u(t)}))}catch(e){Promise.reject(e)}}),[]);return a.createElement("div",null,a.createElement("p",{id:v,className:"walletconnect-qrcode__text"},t.text.scan_qrcode_with_wallet),a.createElement("div",{dangerouslySetInnerHTML:{__html:o}}),a.createElement("div",{className:"walletconnect-modal__footer"},a.createElement("a",{onClick:function(){s(t.uri)?(n(t.text.copied_to_clipboard),setInterval((function(){return n("")}),1200)):(n("Error"),setInterval((function(){return n("")}),1200))}},t.text.copy_to_clipboard)),a.createElement(S,{message:r}))}function I(t){var e=i.isAndroid(),r=i.isMobile(),n=r?t.qrcodeModalOptions&&t.qrcodeModalOptions.mobileLinks?t.qrcodeModalOptions.mobileLinks:void 0:t.qrcodeModalOptions&&t.qrcodeModalOptions.desktopLinks?t.qrcodeModalOptions.desktopLinks:void 0,o=a.useState(!1),s=o[0],u=o[1],l=a.useState(!1),c=l[0],h=l[1],f=a.useState(!r),d=f[0],p=f[1],g={mobile:r,text:t.text,uri:t.uri,qrcodeModalOptions:t.qrcodeModalOptions},v=a.useState(""),y=v[0],b=v[1],_=a.useState(!1),M=_[0],E=_[1],k=a.useState([]),A=k[0],S=k[1],N=a.useState(""),I=N[0],P=N[1],R=function(){c||s||n&&!n.length||A.length>0||a.useEffect((function(){!function(){try{if(e)return Promise.resolve();u(!0);var o=function(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}((function(){var e=t.qrcodeModalOptions&&t.qrcodeModalOptions.registryUrl?t.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(e)).then((function(e){return Promise.resolve(e.json()).then((function(e){var o=e.listings,s=r?"mobile":"desktop",a=i.getMobileLinkRegistry(i.formatMobileRegistry(o,s),n);u(!1),h(!0),P(a.length?"":t.text.no_supported_wallets),S(a);var l=1===a.length;l&&(b(i.formatIOSMobile(t.uri,a[0])),p(!0)),E(l)}))}))}),(function(e){u(!1),h(!0),P(t.text.something_went_wrong),console.error(e)}));return Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(s){return Promise.reject(s)}}()}))};R();var O=r?d:!d;return a.createElement("div",{id:m,className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(w,{onClose:t.onClose}),M&&d?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:A[0].name,href:y})},href:y,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(M?A[0].name:"")+" \u203a")):e||s||!s&&A.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(O?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return p(!1),R()}},t.text.mobile),a.createElement("a",{onClick:function(){return p(!0)}},t.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return p(!0)}},t.text.qrcode),a.createElement("a",{onClick:function(){return p(!1),R()}},t.text.desktop))):null,a.createElement("div",null,d||!e&&!s&&!A.length?a.createElement(C,Object.assign({},g)):a.createElement(x,Object.assign({},g,{links:A,errorMessage:I})))))}var P={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function R(){var t=i.getDocumentOrThrow(),e=t.getElementById(m);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout((function(){var e=t.getElementById(d);e&&t.body.removeChild(e)}),h))}function O(t){return function(){R(),t&&t()}}function T(){var t=i.getNavigatorOrThrow().language.split("-")[0]||"en";return P[t]||P.en}function B(t,e,r){!function(){var t=i.getDocumentOrThrow(),e=t.getElementById(p);e&&t.head.removeChild(e);var r=t.createElement("style");r.setAttribute("id",p),r.innerText=u,t.head.appendChild(r)}();var n=function(){var t=i.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id",d),t.body.appendChild(e),e}();a.render(a.createElement(I,{text:T(),uri:t,onClose:O(e),qrcodeModalOptions:r}),n)}var L=function(){return"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.node};var j={open:function(t,e,r){console.log(t),L()?function(t){o.toString(t,{type:"terminal"}).then(console.log)}(t):B(t,e,r)},close:function(){L()||R()}};t.exports=j},4978:(t,e,r)=>{"use strict";var n=r(4445),i=r(6900),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=u,e.IS=50;var s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return l(t,e,r)}function l(t,e,r){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=a(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(z(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(z(t,ArrayBuffer)||t&&z(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(z(t,SharedArrayBuffer)||t&&z(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);var i=function(t){if(u.isBuffer(t)){var e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!==typeof t.length||q(t.length)?a(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return c(t),a(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||z(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(i)return n?-1:F(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return N(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(l(t,o+f)!==l(e,f)){h=!1;break}if(h)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(q(a))return s;t[r+s]=a}return s}function _(t,e,r,n){return D(F(e,t.length-r),t,r,n)}function M(t,e,r,n){return D(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return D(U(e),t,r,n)}function k(t,e,r,n){return D(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,l=t[i],c=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(c=l);break;case 2:128===(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128===(192&o)&&128===(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(r){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?a(t):void 0!==e?"string"===typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(z(o,Uint8Array))i+o.length>n.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(n,i),c=t.slice(e,r),h=0;h<a;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"===typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return M(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function N(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=V[t[o]];return i}function P(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function T(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return e=+e,r>>>=0,o||T(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return e=+e,r>>>=0,o||T(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"===typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"===typeof t?t&=255:"boolean"===typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:u.from(t,n),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var j=/[^+/0-9A-Za-z-_]/g;function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function q(t){return t!==t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},2657:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Children:()=>yt,Component:()=>w,Fragment:()=>y,PureComponent:()=>dt,Suspense:()=>_t,SuspenseList:()=>kt,cloneElement:()=>Dt,createContext:()=>F,createElement:()=>m,createFactory:()=>Ft,createPortal:()=>Nt,createRef:()=>v,default:()=>Ht,findDOMNode:()=>qt,forwardRef:()=>gt,hydrate:()=>Rt,isValidElement:()=>Ut,lazy:()=>Et,memo:()=>pt,render:()=>Pt,unmountComponentAtNode:()=>zt,unstable_batchedUpdates:()=>Vt,useCallback:()=>rt,useContext:()=>nt,useDebugValue:()=>it,useEffect:()=>Z,useErrorBoundary:()=>ot,useImperativeHandle:()=>tt,useLayoutEffect:()=>X,useMemo:()=>et,useReducer:()=>Q,useRef:()=>$,useState:()=>J,version:()=>jt});var n,i,o,s,a,u,l,c={},h=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function m(t,e,r){var n,i=arguments,o={};for(n in e)"key"!==n&&"ref"!==n&&(o[n]=e[n]);if(arguments.length>3)for(r=[r],n=3;n<arguments.length;n++)r.push(i[n]);if(null!=r&&(o.children=r),"function"==typeof t&&null!=t.defaultProps)for(n in t.defaultProps)void 0===o[n]&&(o[n]=t.defaultProps[n]);return g(t,o,e&&e.key,e&&e.ref,null)}function g(t,e,r,i,o){var s={type:t,props:e,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(s.__v=s),n.vnode&&n.vnode(s),s}function v(){return{}}function y(t){return t.children}function w(t,e){this.props=t,this.context=e}function b(t,e){if(null==e)return t.__?b(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?b(t):null}function _(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return _(t)}}function M(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!o++||a!==n.debounceRendering)&&((a=n.debounceRendering)||s)(E)}function E(){for(var t;o=i.length;)t=i.sort((function(t,e){return t.__v.__b-e.__v.__b})),i=[],t.some((function(t){var e,r,n,i,o,s,a;t.__d&&(s=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=d({},o)).__v=n,i=C(a,o,n,e.__n,void 0!==a.ownerSVGElement,null,r,null==s?b(o):s),I(r,o),i!=s&&_(o)))}))}function k(t,e,r,n,i,o,s,a,u){var l,f,d,m,g,v,y,w=r&&r.__k||h,_=w.length;if(a==c&&(a=null!=o?o[0]:_?b(r,0):null),l=0,e.__k=A(e.__k,(function(r){if(null!=r){if(r.__=e,r.__b=e.__b+1,null===(d=w[l])||d&&r.key==d.key&&r.type===d.type)w[l]=void 0;else for(f=0;f<_;f++){if((d=w[f])&&r.key==d.key&&r.type===d.type){w[f]=void 0;break}d=null}if(m=C(t,r,d=d||c,n,i,o,s,a,u),(f=r.ref)&&d.ref!=f&&(y||(y=[]),d.ref&&y.push(d.ref,null,r),y.push(f,r.__c||m,r)),null!=m){var h;if(null==v&&(v=m),void 0!==r.__d)h=r.__d,r.__d=void 0;else if(o==d||m!=a||null==m.parentNode){t:if(null==a||a.parentNode!==t)t.appendChild(m),h=null;else{for(g=a,f=0;(g=g.nextSibling)&&f<_;f+=2)if(g==m)break t;t.insertBefore(m,a),h=a}"option"==e.type&&(t.value="")}a=void 0!==h?h:m.nextSibling,"function"==typeof e.type&&(e.__d=a)}else a&&d.__e==a&&a.parentNode!=t&&(a=b(d))}return l++,r})),e.__e=v,null!=o&&"function"!=typeof e.type)for(l=o.length;l--;)null!=o[l]&&p(o[l]);for(l=_;l--;)null!=w[l]&&O(w[l],w[l]);if(y)for(l=0;l<y.length;l++)R(y[l],y[++l],y[++l])}function A(t,e,r){if(null==r&&(r=[]),null==t||"boolean"==typeof t)e&&r.push(e(null));else if(Array.isArray(t))for(var n=0;n<t.length;n++)A(t[n],e,r);else r.push(e?e("string"==typeof t||"number"==typeof t?g(null,t,null,null,t):null!=t.__e||null!=t.__c?g(t.type,t.props,t.key,null,t.__v):t):t);return r}function x(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]="number"==typeof r&&!1===f.test(e)?r+"px":null==r?"":r}function S(t,e,r,n,i){var o,s,a,u,l;if(i?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(o=t.style,"string"==typeof r)o.cssText=r;else{if("string"==typeof n&&(o.cssText="",n=null),n)for(u in n)r&&u in r||x(o,u,"");if(r)for(l in r)n&&r[l]===n[l]||x(o,l,r[l])}else"o"===e[0]&&"n"===e[1]?(s=e!==(e=e.replace(/Capture$/,"")),a=e.toLowerCase(),e=(a in t?a:e).slice(2),r?(n||t.addEventListener(e,N,s),(t.l||(t.l={}))[e]=r):t.removeEventListener(e,N,s)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!i&&e in t?t[e]=null==r?"":r:"function"!=typeof r&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==r||!1===r?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):null==r||!1===r&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,r))}function N(t){this.l[t.type](n.event?n.event(t):t)}function C(t,e,r,i,o,s,a,u,l){var c,h,f,p,m,g,v,b,_,M,E=e.type;if(void 0!==e.constructor)return null;(c=n.__b)&&c(e);try{t:if("function"==typeof E){if(b=e.props,_=(c=E.contextType)&&i[c.__c],M=c?_?_.props.value:c.__:i,r.__c?v=(h=e.__c=r.__c).__=h.__E:("prototype"in E&&E.prototype.render?e.__c=h=new E(b,M):(e.__c=h=new w(b,M),h.constructor=E,h.render=T),_&&_.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,f=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=E.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,E.getDerivedStateFromProps(b,h.__s))),p=h.props,m=h.state,f)null==E.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==E.getDerivedStateFromProps&&b!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||e.__v===r.__v&&!h.__){for(h.props=b,h.state=h.__s,e.__v!==r.__v&&(h.__d=!1),h.__v=e,e.__e=r.__e,e.__k=r.__k,h.__h.length&&a.push(h),c=0;c<e.__k.length;c++)e.__k[c]&&(e.__k[c].__=e);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,m,g)}))}h.context=M,h.props=b,h.state=h.__s,(c=n.__r)&&c(e),h.__d=!1,h.__v=e,h.__P=t,c=h.render(h.props,h.state,h.context),e.__k=null!=c&&c.type==y&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),f||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(p,m)),k(t,e,r,i,o,s,a,u,l),h.base=e.__e,h.__h.length&&a.push(h),v&&(h.__E=h.__=null),h.__e=!1}else null==s&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=P(r.__e,e,r,i,o,s,a,l);(c=n.diffed)&&c(e)}catch(t){e.__v=null,n.__e(t,e,r)}return e.__e}function I(t,e){n.__c&&n.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){n.__e(t,e.__v)}}))}function P(t,e,r,n,i,o,s,a){var u,l,f,d,p,m=r.props,g=e.props;if(i="svg"===e.type||i,null!=o)for(u=0;u<o.length;u++)if(null!=(l=o[u])&&((null===e.type?3===l.nodeType:l.localName===e.type)||t==l)){t=l,o[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(g);t=i?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,g.is&&{is:g.is}),o=null,a=!1}if(null===e.type)m!==g&&t.data!=g&&(t.data=g);else{if(null!=o&&(o=h.slice.call(t.childNodes)),f=(m=r.props||c).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===c)for(m={},p=0;p<t.attributes.length;p++)m[t.attributes[p].name]=t.attributes[p].value;(d||f)&&(d&&f&&d.__html==f.__html||(t.innerHTML=d&&d.__html||""))}(function(t,e,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in e||S(t,o,null,r[o],n);for(o in e)i&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===e[o]||S(t,o,e[o],r[o],n)})(t,g,m,i,a),d?e.__k=[]:(e.__k=e.props.children,k(t,e,r,n,"foreignObject"!==e.type&&i,o,s,c,a)),a||("value"in g&&void 0!==(u=g.value)&&u!==t.value&&S(t,"value",u,m.value,!1),"checked"in g&&void 0!==(u=g.checked)&&u!==t.checked&&S(t,"checked",u,m.checked,!1))}return t}function R(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){n.__e(t,r)}}function O(t,e,r){var i,o,s;if(n.unmount&&n.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||R(i,null,e)),r||"function"==typeof t.type||(r=null!=(o=t.__e)),t.__e=t.__d=void 0,null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){n.__e(t,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&O(i[s],e,r);null!=o&&p(o)}function T(t,e,r){return this.constructor(t,r)}function B(t,e,r){var i,o,s;n.__&&n.__(t,e),o=(i=r===u)?null:r&&r.__k||e.__k,t=m(y,null,[t]),s=[],C(e,(i?e:r||e).__k=t,o||c,c,void 0!==e.ownerSVGElement,r&&!i?[r]:o?null:h.slice.call(e.childNodes),s,r||c,i),I(s,t)}function L(t,e){B(t,e,u)}function j(t,e){var r,n;for(n in e=d(d({},t.props),e),arguments.length>2&&(e.children=h.slice.call(arguments,2)),r={},e)"key"!==n&&"ref"!==n&&(r[n]=e[n]);return g(t.type,r,e.key||t.key,e.ref||t.ref,null)}function F(t){var e={},r={__c:"__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i=this;return this.getChildContext||(n=[],this.getChildContext=function(){return e[r.__c]=i,e},this.shouldComponentUpdate=function(t){i.props.value!==t.value&&n.some((function(e){e.context=t.value,M(e)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}n={__e:function(t,e){for(var r,n;e=e.__;)if((r=e.__c)&&!r.__)try{if(r.constructor&&null!=r.constructor.getDerivedStateFromError&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(t))),null!=r.componentDidCatch&&(n=!0,r.componentDidCatch(t)),n)return M(r.__E=r)}catch(e){t=e}throw t}},w.prototype.setState=function(t,e){var r;r=this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(r,this.props)),t&&d(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),M(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),M(this))},w.prototype.render=y,i=[],o=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=c,l=0;var U,D,z,q=0,V=[],H=n.__r,W=n.diffed,Y=n.__c,K=n.unmount;function G(t,e){n.__h&&n.__h(D,t,q||e),q=0;var r=D.__H||(D.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function J(t){return q=1,Q(ct,t)}function Q(t,e,r){var n=G(U++,2);return n.__c||(n.__c=D,n.__=[r?r(e):ct(void 0,e),function(e){var r=t(n.__[0],e);n.__[0]!==r&&(n.__[0]=r,n.__c.setState({}))}]),n.__}function Z(t,e){var r=G(U++,3);!n.__s&<(r.__H,e)&&(r.__=t,r.__H=e,D.__H.__h.push(r))}function X(t,e){var r=G(U++,4);!n.__s&<(r.__H,e)&&(r.__=t,r.__H=e,D.__h.push(r))}function $(t){return q=5,et((function(){return{current:t}}),[])}function tt(t,e,r){q=6,X((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))}function et(t,e){var r=G(U++,7);return lt(r.__H,e)?(r.__H=e,r.__h=t,r.__=t()):r.__}function rt(t,e){return q=8,et((function(){return t}),e)}function nt(t){var e=D.context[t.__c],r=G(U++,9);return r.__c=t,e?(null==r.__&&(r.__=!0,e.sub(D)),e.props.value):t.__}function it(t,e){n.useDebugValue&&n.useDebugValue(e?e(t):t)}function ot(t){var e=G(U++,10),r=J();return e.__=t,D.componentDidCatch||(D.componentDidCatch=function(t){e.__&&e.__(t),r[1](t)}),[r[0],function(){r[1](void 0)}]}function st(){V.some((function(t){if(t.__P)try{t.__H.__h.forEach(at),t.__H.__h.forEach(ut),t.__H.__h=[]}catch(i){return t.__H.__h=[],n.__e(i,t.__v),!0}})),V=[]}function at(t){t.t&&t.t()}function ut(t){var e=t.__();"function"==typeof e&&(t.t=e)}function lt(t,e){return!t||e.some((function(e,r){return e!==t[r]}))}function ct(t,e){return"function"==typeof e?e(t):e}function ht(t,e){for(var r in e)t[r]=e[r];return t}function ft(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}n.__r=function(t){H&&H(t),U=0,(D=t.__c).__H&&(D.__H.__h.forEach(at),D.__H.__h.forEach(ut),D.__H.__h=[])},n.diffed=function(t){W&&W(t);var e=t.__c;if(e){var r=e.__H;r&&r.__h.length&&(1!==V.push(e)&&z===n.requestAnimationFrame||((z=n.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);"undefined"!=typeof window&&(e=requestAnimationFrame(r))})(st))}},n.__c=function(t,e){e.some((function(t){try{t.__h.forEach(at),t.__h=t.__h.filter((function(t){return!t.__||ut(t)}))}catch(a){e.some((function(t){t.__h&&(t.__h=[])})),e=[],n.__e(a,t.__v)}})),Y&&Y(t,e)},n.unmount=function(t){K&&K(t);var e=t.__c;if(e){var r=e.__H;if(r)try{r.__.forEach((function(t){return t.t&&t.t()}))}catch(t){n.__e(t,e.__v)}}};var dt=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).isPureReactComponent=!0,r}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.shouldComponentUpdate=function(t,e){return ft(this.props,t)||ft(this.state,e)},n}(w);function pt(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:ft(this.props,t)}function n(e){return this.shouldComponentUpdate=r,m(t,ht({},e))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(t.displayName||t.name)+")",n.t=!0,n}var mt=n.__b;function gt(t){function e(e){var r=ht({},e);return delete r.ref,t(r,e.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}n.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),mt&&mt(t)};var vt=function(t,e){return t?A(t).reduce((function(t,r,n){return t.concat(e(r,n))}),[]):null},yt={map:vt,forEach:vt,count:function(t){return t?A(t).length:0},only:function(t){if(1!==(t=A(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:A},wt=n.__e;function bt(t){return t&&((t=ht({},t)).__c=null,t.__k=t.__k&&t.__k.map(bt)),t}function _t(){this.__u=0,this.o=null,this.__b=null}function Mt(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function Et(t){var e,r,n;function i(i){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return m(r,i)}return i.displayName="Lazy",i.t=!0,i}function kt(){this.i=null,this.l=null}n.__e=function(t,e,r){if(t.then)for(var n,i=e;i=i.__;)if((n=i.__c)&&n.__c)return n.__c(t,e.__c);wt(t,e,r)},(_t.prototype=new w).__c=function(t,e){var r=this;null==r.o&&(r.o=[]),r.o.push(e);var n=Mt(r.__v),i=!1,o=function(){i||(i=!0,n?n(s):s())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){o(),e.__c&&e.__c()};var s=function(){var t;if(! --r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});t=r.o.pop();)t.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),t.then(o,o)},_t.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=bt(this.__b),this.__b=null),[m(w,null,e.u?null:t.children),e.u&&t.fallback]};var At=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.i=r=r[2]}};(kt.prototype=new w).u=function(t){var e=this,r=Mt(e.__v),n=e.l.get(t);return n[0]++,function(i){var o=function(){e.props.revealOrder?(n.push(i),At(e,t,n)):i()};r?r(o):o()}},kt.prototype.render=function(t){this.i=null,this.l=new Map;var e=A(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},kt.prototype.componentDidUpdate=kt.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,r){At(t,r,e)}))};var xt=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function St(t){var e=this,r=t.container,n=m(xt,{context:e.context},t.vnode);return e.s&&e.s!==r&&(e.v.parentNode&&e.s.removeChild(e.v),O(e.h),e.p=!1),t.vnode?e.p?(r.__k=e.__k,B(n,r),e.__k=r.__k):(e.v=document.createTextNode(""),L("",r),r.appendChild(e.v),e.p=!0,e.s=r,B(n,r,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),O(e.h)),e.h=n,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),O(e.h)},null}function Nt(t,e){return m(St,{vnode:t,container:e})}var Ct=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;w.prototype.isReactComponent={};var It="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function Pt(t,e,r){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return B(t,e),"function"==typeof r&&r(),t?t.__c:null}function Rt(t,e,r){return L(t,e),"function"==typeof r&&r(),t?t.__c:null}var Ot=n.event;function Tt(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t}})}n.event=function(t){Ot&&(t=Ot(t)),t.persist=function(){};var e=!1,r=!1,n=t.stopPropagation;t.stopPropagation=function(){n.call(t),e=!0};var i=t.preventDefault;return t.preventDefault=function(){i.call(t),r=!0},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return r},t.nativeEvent=t};var Bt={configurable:!0,get:function(){return this.class}},Lt=n.vnode;n.vnode=function(t){t.$$typeof=It;var e=t.type,r=t.props;if(e){if(r.class!=r.className&&(Bt.enumerable="className"in r,null!=r.className&&(r.class=r.className),Object.defineProperty(r,"className",Bt)),"function"!=typeof e){var n,i,o;for(o in r.defaultValue&&void 0!==r.value&&(r.value||0===r.value||(r.value=r.defaultValue),delete r.defaultValue),Array.isArray(r.value)&&r.multiple&&"select"===e&&(A(r.children).forEach((function(t){-1!=r.value.indexOf(t.props.value)&&(t.props.selected=!0)})),delete r.value),r)if(n=Ct.test(o))break;if(n)for(o in i=t.props={},r)i[Ct.test(o)?o.replace(/[A-Z0-9]/,"-$&").toLowerCase():o]=r[o]}!function(e){var r=t.type,n=t.props;if(n&&"string"==typeof r){var i={};for(var o in n)/^on(Ani|Tra|Tou)/.test(o)&&(n[o.toLowerCase()]=n[o],delete n[o]),i[o.toLowerCase()]=o;if(i.ondoubleclick&&(n.ondblclick=n[i.ondoubleclick],delete n[i.ondoubleclick]),i.onbeforeinput&&(n.onbeforeinput=n[i.onbeforeinput],delete n[i.onbeforeinput]),i.onchange&&("textarea"===r||"input"===r.toLowerCase()&&!/^fil|che|ra/i.test(n.type))){var s=i.oninput||"oninput";n[s]||(n[s]=n[i.onchange],delete n[i.onchange])}}}(),"function"==typeof e&&!e.m&&e.prototype&&(Tt(e.prototype,"componentWillMount"),Tt(e.prototype,"componentWillReceiveProps"),Tt(e.prototype,"componentWillUpdate"),e.m=!0)}Lt&&Lt(t)};var jt="16.8.0";function Ft(t){return m.bind(null,t)}function Ut(t){return!!t&&t.$$typeof===It}function Dt(t){return Ut(t)?j.apply(null,arguments):t}function zt(t){return!!t.__k&&(B(null,t),!0)}function qt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Vt=function(t,e){return t(e)};const Ht={useState:J,useReducer:Q,useEffect:Z,useLayoutEffect:X,useRef:$,useImperativeHandle:tt,useMemo:et,useCallback:rt,useContext:nt,useDebugValue:it,version:"16.8.0",Children:yt,render:Pt,hydrate:Pt,unmountComponentAtNode:zt,createPortal:Nt,createElement:m,createContext:F,createFactory:Ft,cloneElement:Dt,createRef:v,Fragment:y,isValidElement:Ut,findDOMNode:qt,Component:w,PureComponent:dt,memo:pt,forwardRef:gt,unstable_batchedUpdates:Vt,Suspense:_t,SuspenseList:kt,lazy:Et}},5910:(t,e,r)=>{var n=r(9168),i=r(6184),o=r(2874),s=r(7011);function a(t,e,r,o,s){var a=[].slice.call(arguments,1),u=a.length,l="function"===typeof a[u-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(r=e,e=o=void 0):2!==u||e.getContext||(o=r,r=e,e=void 0),new Promise((function(n,s){try{var a=i.create(r,o);n(t(a,e,o))}catch(u){s(u)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=r,r=e,e=o=void 0):3===u&&(e.getContext&&"undefined"===typeof s?(s=o,o=void 0):(s=o,o=r,r=e,e=void 0));try{var c=i.create(r,o);s(null,t(c,e,o))}catch(h){s(h)}}e.create=i.create,e.toCanvas=a.bind(null,o.render),e.toDataURL=a.bind(null,o.renderToDataURL),e.toString=a.bind(null,(function(t,e,r){return s.render(t,r)}))},9168:t=>{t.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},5066:(t,e,r)=>{var n=r(7677).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),i=145===r?26:2*Math.ceil((r-13)/(2*e-2)),o=[r-7],s=1;s<e-1;s++)o[s]=o[s-1]-i;return o.push(6),o.reverse()},e.getPositions=function(t){for(var r=[],n=e.getRowColCoords(t),i=n.length,o=0;o<i;o++)for(var s=0;s<i;s++)0===o&&0===s||0===o&&s===i-1||o===i-1&&0===s||r.push([n[o],n[s]]);return r}},4958:(t,e,r)=>{var n=r(2713),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=n.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*i.indexOf(this.data[e]);r+=i.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},t.exports=o},8466:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){var e=Math.floor(t/8);return 1===(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1===(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},8641:(t,e,r)=>{var n=r(8694);function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}i.prototype.set=function(t,e,r,n){var i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,e){return this.data[t*this.size+e]},i.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},i.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=i},357:(t,e,r)=>{var n=r(8694),i=r(2713);function o(t){this.mode=i.BYTE,this.data=n.from(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},t.exports=o},2833:(t,e,r)=>{var n=r(7388),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return o[4*(t-1)+0];case n.M:return o[4*(t-1)+1];case n.Q:return o[4*(t-1)+2];case n.H:return o[4*(t-1)+3];default:return}}},7388:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&"undefined"!==typeof t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(n){return r}}},1233:(t,e,r)=>{var n=r(7677).getSymbolSize;e.getPositions=function(t){var e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},8130:(t,e,r)=>{var n=r(7677),i=n.getBCHDigit(1335);e.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,o=r<<10;n.getBCHDigit(o)-i>=0;)o^=1335<<n.getBCHDigit(o)-i;return 21522^(r<<10|o)}},218:(t,e,r)=>{var n=r(8694),i=n.alloc(512),o=n.alloc(256);!function(){for(var t=1,e=0;e<255;e++)i[e]=t,o[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)i[e]=i[e-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},e.exp=function(t){return i[t]},e.mul=function(t,e){return 0===t||0===e?0:i[o[t]+o[e]]}},4188:(t,e,r)=>{var n=r(2713),i=r(7677);function o(t){this.mode=n.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=i.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},t.exports=o},2653:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var r=3,n=3,i=40,o=10;function s(t,r,n){switch(t){case e.Patterns.PATTERN000:return(r+n)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return n%3===0;case e.Patterns.PATTERN011:return(r+n)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case e.Patterns.PATTERN101:return r*n%2+r*n%3===0;case e.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case e.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,n=0,i=0,o=0,s=null,a=null,u=0;u<e;u++){i=o=0,s=a=null;for(var l=0;l<e;l++){var c=t.get(u,l);c===s?i++:(i>=5&&(n+=r+(i-5)),s=c,i=1),(c=t.get(l,u))===a?o++:(o>=5&&(n+=r+(o-5)),a=c,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},e.getPenaltyN2=function(t){for(var e=t.size,r=0,i=0;i<e-1;i++)for(var o=0;o<e-1;o++){var s=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==s&&0!==s||r++}return r*n},e.getPenaltyN3=function(t){for(var e=t.size,r=0,n=0,o=0,s=0;s<e;s++){n=o=0;for(var a=0;a<e;a++)n=n<<1&2047|t.get(s,a),a>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|t.get(a,s),a>=10&&(1488===o||93===o)&&r++}return r*i},e.getPenaltyN4=function(t){for(var e=0,r=t.data.length,n=0;n<r;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/r/5)-10)*o},e.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var i=0;i<r;i++)e.isReserved(i,n)||e.xor(i,n,s(t,i,n))},e.getBestMask=function(t,r){for(var n=Object.keys(e.Patterns).length,i=0,o=1/0,s=0;s<n;s++){r(s),e.applyMask(s,t);var a=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),a<o&&(o=a,i=s)}return i}},2713:(t,e,r)=>{var n=r(7149),i=r(6971);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(n){return r}}},3480:(t,e,r)=>{var n=r(2713);function i(t){this.mode=n.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var i=this.data.length-e;i>0&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*i+1))},t.exports=i},8220:(t,e,r)=>{var n=r(8694),i=r(218);e.mul=function(t,e){for(var r=n.alloc(t.length+e.length-1),o=0;o<t.length;o++)for(var s=0;s<e.length;s++)r[o+s]^=i.mul(t[o],e[s]);return r},e.mod=function(t,e){for(var r=n.from(t);r.length-e.length>=0;){for(var o=r[0],s=0;s<e.length;s++)r[s]^=i.mul(e[s],o);for(var a=0;a<r.length&&0===r[a];)a++;r=r.slice(a)}return r},e.generateECPolynomial=function(t){for(var r=n.from([1]),o=0;o<t;o++)r=e.mul(r,[1,i.exp(o)]);return r}},6184:(t,e,r)=>{var n=r(8694),i=r(7677),o=r(7388),s=r(8466),a=r(8641),u=r(5066),l=r(1233),c=r(2653),h=r(2833),f=r(4989),d=r(4856),p=r(8130),m=r(2713),g=r(6672),v=r(1141);function y(t,e,r){var n,i,o=t.size,s=p.getEncodedBits(e,r);for(n=0;n<15;n++)i=1===(s>>n&1),n<6?t.set(n,8,i,!0):n<8?t.set(n+1,8,i,!0):t.set(o-15+n,8,i,!0),n<8?t.set(8,o-n-1,i,!0):n<9?t.set(8,15-n-1+1,i,!0):t.set(8,15-n-1,i,!0);t.set(o-8,8,1,!0)}function w(t,e,r){var o=new s;r.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),m.getCharCountIndicator(e.mode,t)),e.write(o)}));var a=8*(i.getSymbolTotalCodewords(t)-h.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);for(var u=(a-o.getLengthInBits())/8,l=0;l<u;l++)o.put(l%2?17:236,8);return function(t,e,r){for(var o=i.getSymbolTotalCodewords(e),s=h.getTotalCodewordsCount(e,r),a=o-s,u=h.getBlocksCount(e,r),l=u-o%u,c=Math.floor(o/u),d=Math.floor(a/u),p=d+1,m=c-d,g=new f(m),v=0,y=new Array(u),w=new Array(u),b=0,_=n.from(t.buffer),M=0;M<u;M++){var E=M<l?d:p;y[M]=_.slice(v,v+E),w[M]=g.encode(y[M]),v+=E,b=Math.max(b,E)}var k,A,x=n.alloc(o),S=0;for(k=0;k<b;k++)for(A=0;A<u;A++)k<y[A].length&&(x[S++]=y[A][k]);for(k=0;k<m;k++)for(A=0;A<u;A++)x[S++]=w[A][k];return x}(o,t,e)}function b(t,e,r,n){var o;if(v(t))o=g.fromArray(t);else{if("string"!==typeof t)throw new Error("Invalid data");var s=e;if(!s){var h=g.rawSplit(t);s=d.getBestVersionForData(h,r)}o=g.fromString(t,s||40)}var f=d.getBestVersionForData(o,r);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else e=f;var p=w(e,r,o),m=i.getSymbolSize(e),b=new a(m);return function(t,e){for(var r=t.size,n=l.getPositions(e),i=0;i<n.length;i++)for(var o=n[i][0],s=n[i][1],a=-1;a<=7;a++)if(!(o+a<=-1||r<=o+a))for(var u=-1;u<=7;u++)s+u<=-1||r<=s+u||(a>=0&&a<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===a||6===a)||a>=2&&a<=4&&u>=2&&u<=4?t.set(o+a,s+u,!0,!0):t.set(o+a,s+u,!1,!0))}(b,e),function(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(b),function(t,e){for(var r=u.getPositions(e),n=0;n<r.length;n++)for(var i=r[n][0],o=r[n][1],s=-2;s<=2;s++)for(var a=-2;a<=2;a++)-2===s||2===s||-2===a||2===a||0===s&&0===a?t.set(i+s,o+a,!0,!0):t.set(i+s,o+a,!1,!0)}(b,e),y(b,r,0),e>=7&&function(t,e){for(var r,n,i,o=t.size,s=d.getEncodedBits(e),a=0;a<18;a++)r=Math.floor(a/3),n=a%3+o-8-3,i=1===(s>>a&1),t.set(r,n,i,!0),t.set(n,r,i,!0)}(b,e),function(t,e){for(var r=t.size,n=-1,i=r-1,o=7,s=0,a=r-1;a>0;a-=2)for(6===a&&a--;;){for(var u=0;u<2;u++)if(!t.isReserved(i,a-u)){var l=!1;s<e.length&&(l=1===(e[s]>>>o&1)),t.set(i,a-u,l),-1===--o&&(s++,o=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(b,p),isNaN(n)&&(n=c.getBestMask(b,y.bind(null,b,r))),c.applyMask(n,b),y(b,r,n),{modules:b,version:e,errorCorrectionLevel:r,maskPattern:n,segments:o}}e.create=function(t,e){if("undefined"===typeof t||""===t)throw new Error("No input text");var r,n,s=o.M;return"undefined"!==typeof e&&(s=o.from(e.errorCorrectionLevel,o.M),r=d.from(e.version),n=c.from(e.maskPattern),e.toSJISFunc&&i.setToSJISFunction(e.toSJISFunc)),b(t,r,s,n)}},4989:(t,e,r)=>{var n=r(8694),i=r(8220),o=r(4978).hp;function s(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}s.prototype.initialize=function(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},s.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=n.alloc(this.degree),r=o.concat([t,e],t.length+this.degree),s=i.mod(r,this.genPoly),a=this.degree-s.length;if(a>0){var u=n.alloc(this.degree);return s.copy(u,a),u}return s},t.exports=s},6971:(t,e)=>{var r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(n,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(r,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),s=new RegExp("^"+r+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return s.test(t)},e.testAlphanumeric=function(t){return a.test(t)}},6672:(t,e,r)=>{var n=r(2713),i=r(3480),o=r(4958),s=r(357),a=r(4188),u=r(6971),l=r(7677),c=r(7347);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,r){for(var n,i=[];null!==(n=t.exec(r));)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}function d(t){var e,r,i=f(u.NUMERIC,n.NUMERIC,t),o=f(u.ALPHANUMERIC,n.ALPHANUMERIC,t);return l.isKanjiModeEnabled()?(e=f(u.BYTE,n.BYTE,t),r=f(u.KANJI,n.KANJI,t)):(e=f(u.BYTE_KANJI,n.BYTE,t),r=[]),i.concat(o,e,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function p(t,e){switch(e){case n.NUMERIC:return i.getBitsLength(t);case n.ALPHANUMERIC:return o.getBitsLength(t);case n.KANJI:return a.getBitsLength(t);case n.BYTE:return s.getBitsLength(t)}}function m(t,e){var r,u=n.getBestModeForData(t);if((r=n.from(e,u))!==n.BYTE&&r.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(u));switch(r!==n.KANJI||l.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(t);case n.ALPHANUMERIC:return new o(t);case n.KANJI:return new a(t);case n.BYTE:return new s(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"===typeof e?t.push(m(e,null)):e.data&&t.push(m(e.data,e.mode)),t}),[])},e.fromString=function(t,r){for(var i=function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];switch(i.mode){case n.NUMERIC:e.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:e.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:e.push([i,{data:i.data,mode:n.BYTE,length:h(i.data)}]);break;case n.BYTE:e.push([{data:i.data,mode:n.BYTE,length:h(i.data)}])}}return e}(d(t,l.isKanjiModeEnabled())),o=function(t,e){for(var r={},i={start:{}},o=["start"],s=0;s<t.length;s++){for(var a=t[s],u=[],l=0;l<a.length;l++){var c=a[l],h=""+s+l;u.push(h),r[h]={node:c,lastCount:0},i[h]={};for(var f=0;f<o.length;f++){var d=o[f];r[d]&&r[d].node.mode===c.mode?(i[d][h]=p(r[d].lastCount+c.length,c.mode)-p(r[d].lastCount,c.mode),r[d].lastCount+=c.length):(r[d]&&(r[d].lastCount=c.length),i[d][h]=p(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,e))}}o=u}for(f=0;f<o.length;f++)i[o[f]].end=0;return{map:i,table:r}}(i,r),s=c.find_path(o.map,"start","end"),a=[],u=1;u<s.length-1;u++)a.push(o.table[s[u]].node);return e.fromArray(function(t){return t.reduce((function(t,e){var r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(a))},e.rawSplit=function(t){return e.fromArray(d(t,l.isKanjiModeEnabled()))}},7677:(t,e)=>{var r,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return n[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!==typeof t)throw new Error('"toSJISFunc" is not a valid function.');r=t},e.isKanjiModeEnabled=function(){return"undefined"!==typeof r},e.toSJIS=function(t){return r(t)}},7149:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},4856:(t,e,r)=>{var n=r(7677),i=r(2833),o=r(7388),s=r(2713),a=r(7149),u=r(1141),l=n.getBCHDigit(7973);function c(t,e){return s.getCharCountIndicator(t,e)+4}function h(t,e){var r=0;return t.forEach((function(t){var n=c(t.mode,e);r+=n+t.getBitsLength()})),r}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,r){if(!a.isValid(t))throw new Error("Invalid QR Code version");"undefined"===typeof r&&(r=s.BYTE);var o=8*(n.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,e));if(r===s.MIXED)return o;var u=o-c(r,t);switch(r){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,r){var n,i=o.from(r,o.M);if(u(t)){if(t.length>1)return function(t,r){for(var n=1;n<=40;n++)if(h(t,n)<=e.getCapacity(n,r,s.MIXED))return n}(t,i);if(0===t.length)return 1;n=t[0]}else n=t;return function(t,r,n){for(var i=1;i<=40;i++)if(r<=e.getCapacity(i,n,t))return i}(n.mode,n.getLength(),i)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;n.getBCHDigit(e)-l>=0;)e^=7973<<n.getBCHDigit(e)-l;return t<<12|e}},2874:(t,e,r)=>{var n=r(6505);e.render=function(t,e,r){var i=r,o=e;"undefined"!==typeof i||e&&e.getContext||(i=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);var s=n.getImageWidth(t.modules.size,i),a=o.getContext("2d"),u=a.createImageData(s,s);return n.qrToImageData(u.data,t,i),function(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}(a,o,s),a.putImageData(u,0,0),o},e.renderToDataURL=function(t,r,n){var i=n;"undefined"!==typeof i||r&&r.getContext||(i=r,r=void 0),i||(i={});var o=e.render(t,r,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},7011:(t,e,r)=>{var n=r(6505);function i(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(t,e,r){var n=t+e;return"undefined"!==typeof r&&(n+=" "+r),n}e.render=function(t,e,r){var s=n.getOptions(e),a=t.modules.size,u=t.modules.data,l=a+2*s.margin,c=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+i(s.color.dark,"stroke")+' d="'+function(t,e,r){for(var n="",i=0,s=!1,a=0,u=0;u<t.length;u++){var l=Math.floor(u%e),c=Math.floor(u/e);l||s||(s=!0),t[u]?(a++,u>0&&l>0&&t[u-1]||(n+=s?o("M",l+r,.5+c+r):o("m",i,0),i=0,s=!1),l+1<e&&t[u+1]||(n+=o("h",a),a=0)):i++}return n}(u,a,s.margin)+'"/>',f='viewBox="0 0 '+l+" "+l+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+f+' shape-rendering="crispEdges">'+c+h+"</svg>\n";return"function"===typeof r&&r(null,d),d}},6505:(t,e)=>{function r(t){if("number"===typeof t&&(t=t.toString()),"string"!==typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e="undefined"===typeof t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:n,scale:n?4:i,margin:e,color:{dark:r(t.color.dark||"#000000ff"),light:r(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,r){var n=e.getScale(t,r);return Math.floor((t+2*r.margin)*n)},e.qrToImageData=function(t,r,n){for(var i=r.modules.size,o=r.modules.data,s=e.getScale(i,n),a=Math.floor((i+2*n.margin)*s),u=n.margin*s,l=[n.color.light,n.color.dark],c=0;c<a;c++)for(var h=0;h<a;h++){var f=4*(c*a+h),d=n.color.light;if(c>=u&&h>=u&&c<a-u&&h<a-u)d=l[o[Math.floor((c-u)/s)*i+Math.floor((h-u)/s)]?1:0];t[f++]=d.r,t[f++]=d.g,t[f++]=d.b,t[f]=d.a}}},8694:(t,e,r)=>{"use strict";var n=r(1141);o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,e,r){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"===typeof t?u(this,t):function(t,e,r,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);o.TYPED_ARRAY_SUPPORT?i.__proto__=o.prototype:i=l(t,i);return i}(t,e,r,n);if("string"===typeof e)return function(t,e){var r=0|h(e),n=a(t,r),i=n.write(e);i!==r&&(n=n.slice(0,i));return n}(t,e);return function(t,e){if(o.isBuffer(e)){var r=0|s(e.length),n=a(t,r);return 0===n.length||e.copy(n,0,0,r),n}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(i=e.length)!==i?a(t,0):l(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return l(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,r):new o(t,e,r)}function s(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function a(t,e){var r;return o.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=o.prototype:(null===(r=t)&&(r=new o(e)),r.length=e),r}function u(t,e){var r=a(t,e<0?0:0|s(e));if(!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function l(t,e){for(var r=e.length<0?0:0|s(e.length),n=a(t,r),i=0;i<r;i+=1)n[i]=255&e[i];return n}function c(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function h(t){return o.isBuffer(t)?t.length:"undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!==typeof t&&(t=""+t),0===t.length?0:c(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"===typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,r,n){return function(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}(c(e,t.length-r),t,r,n)}(this,t,e,r)},o.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),o.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+t]}return r},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,s=n-r;if(this===t&&r<e&&e<n)for(i=s-1;i>=0;--i)t[i+e]=this[i+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),e);return s},o.prototype.fill=function(t,e,r){if("string"===typeof t){if("string"===typeof e?(e=0,r=this.length):"string"===typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=o.isBuffer(t)?t:new o(t),a=s.length;for(i=0;i<r-e;++i)this[i+e]=s[i%a]}return this},o.concat=function(t,e){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a(null,0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=u(null,e),s=0;for(r=0;r<t.length;++r){var l=t[r];if(!o.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(i,s),s+=l.length}return i},o.byteLength=h,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.exports.alloc=function(t){var e=new o(t);return e.fill(0),e},t.exports.from=function(t){return new o(t)}},4358:t=>{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function s(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var u,l,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,i),!0;case 5:return c.fn.call(c.context,e,n,i,o),!0;case 6:return c.fn.call(c.context,e,n,i,o,s),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,i);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(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,t.exports=a},3142:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(1833).Buffer}catch(k){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=n)l=u(t,c,c+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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],h=[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];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var c=u>>>26,h=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,l=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a<o;a++)l[a]=0}else{for(a=0;a<o-i;a++)l[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[o-a-1]=s}return l},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,l=0,c=0|s[0],h=8191&c,f=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],b=8191&w,_=w>>>13,M=0|s[4],E=8191&M,k=M>>>13,A=0|s[5],x=8191&A,S=A>>>13,N=0|s[6],C=8191&N,I=N>>>13,P=0|s[7],R=8191&P,O=P>>>13,T=0|s[8],B=8191&T,L=T>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],z=8191&D,q=D>>>13,V=0|a[1],H=8191&V,W=V>>>13,Y=0|a[2],K=8191&Y,G=Y>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,lt=at>>>13,ct=0|a[8],ht=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var vt=(l+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(l+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,K)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var wt=(l+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var bt=(l+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;l=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(l+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(l+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var kt=(l+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ft)|0;var At=(l+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(U,H)|0,o=Math.imul(U,W),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ft)|0;var xt=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,lt)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var St=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,Z))+Math.imul(U,Q)|0,o=Math.imul(U,Z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var Nt=(l+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,ft)|0;var Ct=(l+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;l=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ft)|0;var It=(l+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,lt)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,lt)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ft)|0;var Pt=(l+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,lt))+Math.imul(U,ut)|0,o=Math.imul(U,lt),n=n+Math.imul(B,ht)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ft)|0;var Rt=(l+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,ft))+Math.imul(U,ht)|0,o=Math.imul(U,ft);var Ot=(l+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;l=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Tt=(l+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(U,pt)|0))<<13)|0;return l=((o=Math.imul(U,mt))+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=bt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=kt,u[9]=At,u[10]=xt,u[11]=St,u[12]=Nt,u[13]=Ct,u[14]=It,u[15]=Pt,u[16]=Rt,u[17]=Ot,u[18]=Tt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var c=o-l,h=(0|t.words[c])*(0|e.words[l]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,f=l,d=0;d<s;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],v=n[c+d+s],y=h*g-f*v;v=h*v+f*g,g=y,r[c+d]=p+g,n[c+d]=m+v,r[c+d+s]=p-g,n[c+d+s]=m-v,d!==a&&(y=u*h-l*f,f=u*f+l*h,h=y)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,l,n),this.transform(s,o,a,u,n,i),this.transform(l,o,c,h,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"===typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"===typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"===typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var h=0|this.words[l];this.words[l]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"===typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0===(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,v),i(b,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));f=f.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var h=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},8837:(t,e,r)=>{"use strict";const n=r(7491),i=r(5707),o=r(1289);function s(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function u(t,e){return e.decode?i(t):t}function l(t){return Array.isArray(t)?t.sort():"object"===typeof t?l(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function c(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function h(t){const e=(t=c(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function f(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function d(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"===typeof r&&r.split("").indexOf(t.arrayFormatSeparator)>-1?r.split(t.arrayFormatSeparator).map((e=>u(e,t))):null===r?r:u(r,t);n[e]=i};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!==typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){let[t,s]=o(e.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),r(u(t,e),s,n)}for(const i of Object.keys(n)){const t=n[i];if("object"===typeof t&&null!==t)for(const r of Object.keys(t))t[r]=f(t[r],e);else n[i]=f(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?t[e]=l(r):t[e]=r,t}),Object.create(null))}e.extract=h,e.parse=d,e.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>{return e.skipNull&&(null===(n=t[r])||void 0===n)||e.skipEmptyString&&""===t[r];var n},n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[",i,"]"].join("")]:[...r,[a(e,t),"[",a(i,t),"]=",a(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[]"].join("")]:[...r,[a(e,t),"[]=",a(n,t)].join("")];case"comma":case"separator":return e=>(r,n)=>null===n||void 0===n||0===n.length?r:0===r.length?[[a(e,t),"=",a(n,t)].join("")]:[[r,a(n,t)].join(t.arrayFormatSeparator)];default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,a(e,t)]:[...r,[a(e,t),"=",a(n,t)].join("")]}}(e),i={};for(const s of Object.keys(t))r(s)||(i[s]=t[s]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((r=>{const i=t[r];return void 0===i?"":null===i?a(r,e):Array.isArray(i)?i.reduce(n(r),[]).join("&"):a(r,e)+"="+a(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=o(t,"#");return Object.assign({url:r.split("?")[0]||"",query:d(h(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=c(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query);let u=e.stringify(s,r);u&&(u="?".concat(u));let l=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(l="#".concat(a(t.fragmentIdentifier,r))),"".concat(n).concat(u).concat(l)}},8421:t=>{"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},9201:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>Vt});var n={};r.r(n),r.d(n,{decrypt:()=>jt,encrypt:()=>Lt,generateKey:()=>Tt,verifyHmac:()=>Bt});var i=r(4874),o=r.n(i),s=r(7312),a=r(8596),u=r(5850);const l=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],c={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};r(3110),r(1390);var h=r(9550),f=r.n(h);const d="hex",p="utf8",m="0";function g(t){return new Uint8Array(t)}function v(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=t.toString(d);return e?I(r):r}function y(t){return t.toString(p)}function w(t){return f()(t)}function b(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return v(w(t),e)}function _(t){return y(w(t))}function M(t){return Buffer.from(C(t),d)}function E(t){return g(M(t))}function k(t){return Buffer.from(t,p)}function A(t){return g(k(t))}function x(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function S(){let t=[];for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function N(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;return function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;return R(t,e,!0,r)}(t,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const r=t%e;return r?(t-r)/e*e+e:t}(t.length,e),r)}function C(t){return t.replace(/^0x/,"")}function I(t){return t.startsWith("0x")?t:"0x".concat(t)}function P(t){return(t=N(t=C(t),2))&&(t=I(t)),t}function R(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m;const i=e-t.length;let o=t;if(i>0){const e=n.repeat(i);o=r?e+t:t+e}return o}var O=r(2161),T=r(1453);T.payloadId;function B(t,e){let r;const n=function(t,e){let r;const n=c[t];return n&&(r="https://".concat(n,".infura.io/v3/").concat(e)),r}(t,e.infuraId);return e.custom&&e.custom[t]?r=e.custom[t]:n&&(r=n),r}r(7285);var L=r(4358),j=r.n(L);const F=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],U=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];var D=r(6528),z=r.n(D);function q(t,e){return function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return v(k(t),e)}(t,!e)}function V(t,e){const r=C(P(new(z())(t).toString(16)));return e?r:I(r)}function H(t){return P(t)}function W(t){return function(t){const e=t.startsWith("0x");return t=(t=C(t)).startsWith(m)?t.substring(1):t,e?I(t):t}(I(t))}const Y=T.payloadId;function K(){return((t,e)=>{for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e})()}function G(t,e){return x(t,e)}function J(t){return"undefined"!==typeof t.result}function Q(t){return"undefined"!==typeof t.error}function Z(t){return"undefined"!==typeof t.event}function X(t){t=C(t.toLowerCase());const e=C((0,O.keccak_256)(k(t)));let r="";for(let n=0;n<t.length;n++)parseInt(e[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return I(r)}function $(t){var e;return(e=t)&&e.length&&!G(t[0])&&(t[0]=q(t[0])),t}function tt(t){if("undefined"!==typeof t.type&&"0"!==t.type)return t;if("undefined"===typeof t.from||(!(e=t.from)||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==X(e)))throw new Error("Transaction object must include a valid 'from' value.");var e;function r(t){let e=t;return("number"===typeof t||"string"===typeof t&&!function(t){return""===t||"string"===typeof t&&""===t.trim()}(t))&&(G(t)?"string"===typeof t&&(e=H(t)):e=V(t)),"string"===typeof e&&(e=W(e)),e}const n={from:H(t.from),to:"undefined"===typeof t.to?void 0:H(t.to),gasPrice:"undefined"===typeof t.gasPrice?"":r(t.gasPrice),gas:"undefined"===typeof t.gas?"undefined"===typeof t.gasLimit?"":r(t.gasLimit):r(t.gas),value:"undefined"===typeof t.value?"":r(t.value),nonce:"undefined"===typeof t.nonce?"":r(t.nonce),data:"undefined"===typeof t.data?"":H(t.data)||"0x"},i=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach((t=>{("undefined"===typeof n[t]||"string"===typeof n[t]&&!n[t].trim().length)&&i.includes(t)&&delete n[t]})),n}var et=r(635);function rt(t){return et.parse(t)}r(3142);T.payloadId;var nt=r(8837);function it(t,e){let r=function(t){return nt.parse(t)}(t);return r=Object.assign(Object.assign({},r),e),t=function(t){return nt.stringify(t)}(r),t}const ot=class{constructor(){this._eventEmitters=[],"undefined"!==typeof window&&"undefined"!==typeof window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(t,e){this._eventEmitters.push({event:t,callback:e})}trigger(t){let e=[];t&&(e=this._eventEmitters.filter((e=>e.event===t))),e.forEach((t=>{t.callback()}))}},st="undefined"!==typeof r.g.WebSocket?r.g.WebSocket:r(8421);const at=class{constructor(t){if(this.opts=t,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=t.protocol,this._version=t.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=t.subscriptions||[],this._netMonitor=t.netMonitor||new ot,!t.url||"string"!==typeof t.url)throw new Error("Missing or invalid WebSocket url");this._url=t.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(t){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(t){}get connecting(){return 0===this.readyState}set connected(t){}get connected(){return 1===this.readyState}set closing(t){}get closing(){return 2===this.readyState}set closed(t){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(t,e,r){if(!e||"string"!==typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:t,silent:!!r})}subscribe(t){this._socketSend({topic:t,type:"sub",payload:"",silent:!0})}on(t,e){this._events.push({event:t,callback:e})}_socketCreate(){if(this._nextSocket)return;const t=function(t,e,r){var n,i;const o=t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t,s=o.split("?"),a=(0,u.isBrowser)()?{protocol:e,version:r,env:"browser",host:(null===(n=(0,u.getLocation)())||void 0===n?void 0:n.host)||""}:{protocol:e,version:r,env:(null===(i=(0,u.detectEnv)())||void 0===i?void 0:i.name)||""},l=it(function(t){const e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return"undefined"!==typeof e?t.substr(e):""}(s[1]||""),a);return s[0]+"?"+l}(this._url,this._protocol,this._version);if(this._nextSocket=new st(t),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=t=>this._socketReceive(t),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=t=>this._socketError(t),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(t){const e=JSON.stringify(t);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(t),this._socketCreate())}async _socketReceive(t){let e;try{e=JSON.parse(t.data)}catch(r){return}if(this._socketSend({topic:e.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const t=this._events.filter((t=>"message"===t.event));t&&t.length&&t.forEach((t=>t.callback(e)))}}_socketError(t){const e=this._events.filter((t=>"error"===t.event));e&&e.length&&e.forEach((e=>e.callback(t)))}_queueSubscriptions(){this._subscriptions.forEach((t=>this._queue.push({topic:t,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(t){this._queue.push(t)}_pushQueue(){this._queue.forEach((t=>this._socketSend(t))),this._queue=[]}},ut="Session currently connected",lt="Session currently disconnected",ct="JSON RPC response format is invalid",ht="User close QRCode Modal";const ft=class{constructor(){this._eventEmitters=[]}subscribe(t){this._eventEmitters.push(t)}unsubscribe(t){this._eventEmitters=this._eventEmitters.filter((e=>e.event!==t))}trigger(t){let e,r=[];e="undefined"!==typeof t.method?t.method:J(t)||Q(t)?"response:".concat(t.id):Z(t)?t.event:"",e&&(r=this._eventEmitters.filter((t=>t.event===e))),r&&r.length||function(t){return F.includes(t)||t.startsWith("wc_")}(e)||Z(e)||(r=this._eventEmitters.filter((t=>"call_request"===t.event))),r.forEach((e=>{if(Q(t)){const r=new Error(t.error.message);e.callback(r,null)}else e.callback(null,t)}))}};const dt=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"walletconnect";this.storageId=t}getSession(){let t=null;const e=(0,u.getLocal)(this.storageId);return e&&"undefined"!==typeof e.bridge&&(t=e),t}setSession(t){return(0,u.setLocal)(this.storageId,t),t}removeSession(){(0,u.removeLocal)(this.storageId)}},pt="walletconnect.org",mt="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((t=>"https://".concat(t,".bridge.walletconnect.org")));function gt(){return mt[Math.floor(Math.random()*mt.length)]}function vt(t){return function(t){return function(t){return function(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}(t).split(".").slice(-2).join(".")}(t)===pt}(t)?gt():t}const yt=class{constructor(t){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new ft,this._clientMeta=(0,u.getClientMeta)()||t.connectorOpts.clientMeta||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new dt(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[...U,...t.connectorOpts.signingMethods||[]],!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");t.connectorOpts.bridge&&(this.bridge=vt(t.connectorOpts.bridge)),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);const e=t.connectorOpts.session||this._getStorageSession();e&&(this.session=e),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new at({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts)}set bridge(t){t&&(this._bridge=t)}get bridge(){return this._bridge}set key(t){if(!t)return;const e=E(t).buffer;this._key=e}get key(){if(this._key){return t=this._key,e=!0,b(new Uint8Array(t),!e)}var t,e;return""}set clientId(t){t&&(this._clientId=t)}get clientId(){let t=this._clientId;return t||(t=this._clientId=K()),this._clientId}set peerId(t){t&&(this._peerId=t)}get peerId(){return this._peerId}set clientMeta(t){}get clientMeta(){let t=this._clientMeta;return t||(t=this._clientMeta=(0,u.getClientMeta)()),t}set peerMeta(t){this._peerMeta=t}get peerMeta(){return this._peerMeta}set handshakeTopic(t){t&&(this._handshakeTopic=t)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(t){t&&(this._handshakeId=t)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(t){if(!t)return;const{handshakeTopic:e,bridge:r,key:n}=this._parseUri(t);this.handshakeTopic=e,this.bridge=r,this.key=n}set chainId(t){this._chainId=t}get chainId(){return this._chainId}set networkId(t){this._networkId=t}get networkId(){return this._networkId}set accounts(t){this._accounts=t}get accounts(){return this._accounts}set rpcUrl(t){this._rpcUrl=t}get rpcUrl(){return this._rpcUrl}set connected(t){}get connected(){return this._connected}set pending(t){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic)}on(t,e){const r={event:t,callback:e};this._eventManager.subscribe(r)}off(t){this._eventManager.unsubscribe(t)}async createInstantRequest(t){this._key=await this._generateKey();const e=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]});this.handshakeId=e.id,this.handshakeTopic=K(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(ht)}));const r=()=>{this.killSession()};try{const t=await this._sendCallRequest(e);return t&&r(),t}catch(n){throw r(),n}}async connect(t){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(t),new Promise((async(t,e)=>{this.on("modal_closed",(()=>e(new Error(ht)))),this.on("connect",((r,n)=>{if(r)return e(r);t(n.params[0])}))})))}async createSession(t){if(this._connected)throw new Error(ut);if(this.pending)return;this._key=await this._generateKey();const e=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:t&&t.chainId?t.chainId:null}]});this.handshakeId=e.id,this.handshakeTopic=K(),this._sendSessionRequest(e,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(t){if(this._connected)throw new Error(ut);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:e};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(t){if(this._connected)throw new Error(ut);const e=t&&t.message?t.message:"Session Rejected",r=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession()}updateSession(t){if(!this._connected)throw new Error(lt);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(t){const e=t?t.message:"Session Disconnected",r=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(r),this._handleSessionDisconnect(e)}async sendTransaction(t){if(!this._connected)throw new Error(lt);const e=tt(t),r=this._formatRequest({method:"eth_sendTransaction",params:[e]});return await this._sendCallRequest(r)}async signTransaction(t){if(!this._connected)throw new Error(lt);const e=tt(t),r=this._formatRequest({method:"eth_signTransaction",params:[e]});return await this._sendCallRequest(r)}async signMessage(t){if(!this._connected)throw new Error(lt);const e=this._formatRequest({method:"eth_sign",params:t});return await this._sendCallRequest(e)}async signPersonalMessage(t){if(!this._connected)throw new Error(lt);t=$(t);const e=this._formatRequest({method:"personal_sign",params:t});return await this._sendCallRequest(e)}async signTypedData(t){if(!this._connected)throw new Error(lt);const e=this._formatRequest({method:"eth_signTypedData",params:t});return await this._sendCallRequest(e)}async updateChain(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"wallet_updateChain",params:[t]});return await this._sendCallRequest(e)}unsafeSend(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise(((e,r)=>{this._subscribeToResponse(t.id,((t,n)=>{if(t)r(t);else{if(!n)throw new Error("Missing JSON RPC response");e(n)}}))}))}async sendCustomRequest(t,e){if(!this._connected)throw new Error(lt);switch(t.method){case"eth_accounts":return this.accounts;case"eth_chainId":return V(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":t.params&&(t.params[0]=tt(t.params[0]));break;case"personal_sign":t.params&&(t.params=$(t.params))}const r=this._formatRequest(t);return await this._sendCallRequest(r,e)}approveRequest(t){if(!J(t))throw new Error('JSON-RPC success response must include "result" field');{const e=this._formatResponse(t);this._sendResponse(e)}}rejectRequest(t){if(!Q(t))throw new Error('JSON-RPC error response must include "error" field');{const e=this._formatResponse(t);this._sendResponse(e)}}transportClose(){this._transport.close()}async _sendRequest(t,e){const r=this._formatRequest(t),n=await this._encrypt(r),i="undefined"!==typeof(null===e||void 0===e?void 0:e.topic)?e.topic:this.peerId,o=JSON.stringify(n),s="undefined"!==typeof(null===e||void 0===e?void 0:e.forcePushNotification)?!e.forcePushNotification:function(t){return!!t.method.startsWith("wc_")||!U.includes(t.method)}(r);this._transport.send(o,i,s)}async _sendResponse(t){const e=await this._encrypt(t),r=this.peerId,n=JSON.stringify(e);this._transport.send(n,r,!0)}async _sendSessionRequest(t,e,r){this._sendRequest(t,r),this._subscribeToSessionResponse(t.id,e)}_sendCallRequest(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)}_formatRequest(t){if("undefined"===typeof t.method)throw new Error('JSON RPC request must have valid "method" value');return{id:"undefined"===typeof t.id?Y():t.id,jsonrpc:"2.0",method:t.method,params:"undefined"===typeof t.params?[]:t.params}}_formatResponse(t){if("undefined"===typeof t.id)throw new Error('JSON RPC request must have valid "id" value');const e={id:t.id,jsonrpc:"2.0"};if(Q(t)){const r=function(t){const e=t.message||"Failed or Rejected Request";let r=-32e3;if(t&&!t.code)switch(e){case"Parse error":r=-32700;break;case"Invalid request":r=-32600;break;case"Method not found":r=-32601;break;case"Invalid params":r=-32602;break;case"Internal error":r=-32603;break;default:r=-32e3}const n={code:r,message:e};return t.data&&(n.data=t.data),n}(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:r})}if(J(t)){return Object.assign(Object.assign({},e),t)}throw new Error(ct)}_handleSessionDisconnect(t){const e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),(0,u.removeLocal)(u.mobileLinkChoiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t)}async _handleIncomingMessages(t){if(![this.clientId,this.handshakeTopic].includes(t.topic))return;let e;try{e=JSON.parse(t.payload)}catch(n){return}const r=await this._decrypt(e);r&&this._eventManager.trigger(r)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(t,e){this.on("response:".concat(t),e)}_subscribeToSessionResponse(t,e){this._subscribeToResponse(t,((t,r)=>{t?this._handleSessionResponse(t.message):J(r)?this._handleSessionResponse(e,r.result):r.error&&r.error.message?this._handleSessionResponse(r.error.message):this._handleSessionResponse(e)}))}_subscribeToCallResponse(t){return new Promise(((e,r)=>{this._subscribeToResponse(t,((t,n)=>{t?r(t):J(n)?e(n.result):n.error&&n.error.message?r(n.error):r(new Error(ct))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((t,e)=>{const{request:r}=e.params[0];if((0,u.isMobile)()&&this._signingMethods.includes(r.method)){const t=(0,u.getLocal)(u.mobileLinkChoiceKey);t&&(window.location.href=t.href)}})),this.on("wc_sessionRequest",((t,e)=>{t&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),this.handshakeId=e.id,this.peerId=e.params[0].peerId,this.peerMeta=e.params[0].peerMeta;const r=Object.assign(Object.assign({},e),{method:"session_request"});this._eventManager.trigger(r)})),this.on("wc_sessionUpdate",((t,e)=>{t&&this._handleSessionResponse(t.message),this._handleSessionResponse("Session disconnected",e.params[0])}))}_initTransport(){this._transport.on("message",(t=>this._handleIncomingMessages(t))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){const t=this.protocol,e=this.handshakeTopic,r=this.version,n=encodeURIComponent(this.bridge),i=this.key;return"".concat(t,":").concat(e,"@").concat(r,"?bridge=").concat(n,"&key=").concat(i)}_parseUri(t){const e=function(t){const e=t.indexOf(":"),r=-1!==t.indexOf("?")?t.indexOf("?"):void 0,n=t.substring(0,e),i=function(t){const e=t.split("@");return{handshakeTopic:e[0],version:parseInt(e[1],10)}}(t.substring(e+1,r)),o=function(t){const e=rt(t);return{key:e.key||"",bridge:e.bridge||""}}("undefined"!==typeof r?t.substr(r):"");return Object.assign(Object.assign({protocol:n},i),o)}(t);if(e.protocol===this.protocol){if(!e.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const t=e.handshakeTopic;if(!e.bridge)throw Error("Invalid or missing bridge url parameter value");const r=decodeURIComponent(e.bridge);if(!e.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:t,bridge:r,key:e.key}}throw new Error("URI format is invalid")}async _generateKey(){if(this._cryptoLib){return await this._cryptoLib.generateKey()}return null}async _encrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.encrypt(t,e)}return null}async _decrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.decrypt(t,e)}return null}_getStorageSession(){let t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(t){if(!t.url||"string"!==typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!==typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!==typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",(async(r,n)=>{if(r)throw r;if(t.peerMeta){const t=n.params[0].peerMeta.name;e.peerName=t}try{const r=await fetch("".concat(t.url,"/new"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!(await r.json()).success)throw Error("Failed to register in Push Server")}catch(r){throw Error("Failed to register in Push Server")}}))}};var wt=r(8129);const bt=256,_t=256,Mt="AES-CBC",Et="SHA-".concat(bt),kt="HMAC",At=("aes-".concat(bt,"-cbc"),"sha".concat(_t),"encrypt"),xt="decrypt",St="sign",Nt="verify";async function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mt;return wt.getSubtleCrypto().importKey("raw",t,function(t){return t===Mt?{length:bt,name:Mt}:{hash:{name:Et},name:kt}}(e),!0,function(t){return t===Mt?[At,xt]:[St,Nt]}(e))}function It(t,e,r){return async function(t,e,r){const n=wt.getSubtleCrypto(),i=await Ct(e,Mt),o=await n.encrypt({iv:t,name:Mt},i,r);return new Uint8Array(o)}(t,e,r)}function Pt(t,e,r){return async function(t,e,r){const n=wt.getSubtleCrypto(),i=await Ct(e,Mt),o=await n.decrypt({iv:t,name:Mt},i,r);return new Uint8Array(o)}(t,e,r)}async function Rt(t,e){const r=await async function(t,e){const r=wt.getSubtleCrypto(),n=await Ct(t,kt),i=await r.sign({length:_t,name:kt},n,e);return new Uint8Array(i)}(t,e);return r}r(6846);function Ot(t){return w(new Uint8Array(t))}T.payloadId;r(9117);async function Tt(t){const e=function(t){return wt.getBrowerCrypto().getRandomValues(new Uint8Array(t))}((t||256)/8);return g(w(e)).buffer}async function Bt(t,e){const r=E(t.data),n=E(t.iv),i=b(E(t.hmac),!1),o=S(r,n),s=b(await Rt(e,o),!1);return C(i)===C(s)}async function Lt(t,e,r){const n=g(Ot(e)),i=g(Ot(r||await Tt(128))),o=b(i,!1),s=A(JSON.stringify(t)),a=await It(i,n,s),u=b(a,!1),l=S(a,i);return{data:u,hmac:b(await Rt(n,l),!1),iv:o}}async function jt(t,e){const r=g(Ot(e));if(!r)throw new Error("Missing key: required for decryption");if(!await Bt(t,r))return null;const n=E(t.data),i=E(t.iv),o=_(await Pt(i,r,n));let s;try{s=JSON.parse(o)}catch(a){return null}return s}const Ft=class extends yt{constructor(t,e){super({cryptoLib:n,connectorOpts:t,pushServerOpts:e})}};var Ut=r(3024),Dt=r.n(Ut),zt=r(2116);class qt extends zt.Vc{constructor(t){super(),this.events=new(j()),this.accounts=[],this.chainId=1,this.pending=!1,this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModalOptions=void 0,this.opts=t,this.chainId=(null===t||void 0===t?void 0:t.chainId)||this.chainId,this.wc=this.register(t)}get connected(){return"undefined"!==typeof this.wc&&this.wc.connected}get connecting(){return this.pending}get connector(){return this.wc=this.register(this.opts),this.wc}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async open(t){if(!this.connected)return new Promise(((e,r)=>{this.on("error",(t=>{r(t)})),this.on("open",(()=>{e()})),this.create(t)}));this.onOpen()}async close(){"undefined"!==typeof this.wc&&(this.wc.connected&&this.wc.killSession(),this.onClose())}async send(t){this.wc=this.register(this.opts),this.connected||await this.open(),this.sendPayload(t).then((t=>this.events.emit("payload",t))).catch((e=>this.events.emit("payload",(0,T.formatJsonRpcError)(t.id,e.message))))}register(t){if(this.wc)return this.wc;this.opts=t||this.opts,this.bridge=(null===t||void 0===t?void 0:t.connector)?t.connector.bridge:(null===t||void 0===t?void 0:t.bridge)||"https://bridge.walletconnect.org",this.qrcode="undefined"===typeof(null===t||void 0===t?void 0:t.qrcode)||!1!==t.qrcode,this.chainId="undefined"!==typeof(null===t||void 0===t?void 0:t.chainId)?t.chainId:this.chainId,this.qrcodeModalOptions=null===t||void 0===t?void 0:t.qrcodeModalOptions;const e={bridge:this.bridge,qrcodeModal:this.qrcode?Dt():void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null===t||void 0===t?void 0:t.storageId,signingMethods:null===t||void 0===t?void 0:t.signingMethods,clientMeta:null===t||void 0===t?void 0:t.clientMeta};if(this.wc="undefined"!==typeof(null===t||void 0===t?void 0:t.connector)?t.connector:new Ft(e),"undefined"===typeof this.wc)throw new Error("Failed to register WalletConnect connector");return this.wc.accounts.length&&(this.accounts=this.wc.accounts),this.wc.chainId&&(this.chainId=this.wc.chainId),this.registerConnectorEvents(),this.wc}onOpen(t){this.pending=!1,t&&(this.wc=t),this.events.emit("open")}onClose(){this.pending=!1,this.wc&&(this.wc=void 0),this.events.emit("close")}onError(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Failed or Rejected Request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-32e3,n=arguments.length>3?arguments[3]:void 0;const i={id:t.id,jsonrpc:t.jsonrpc,error:{code:r,message:e}};return"undefined"!==typeof n&&(i.error.data=n),this.events.emit("payload",i),i}create(t){this.wc=this.register(this.opts),this.chainId=t||this.chainId,this.connected||this.pending||(this.pending=!0,this.registerConnectorEvents(),this.wc.createSession({chainId:this.chainId}).then((()=>this.events.emit("created"))).catch((t=>this.events.emit("error",t))))}registerConnectorEvents(){this.wc=this.register(this.opts),this.wc.on("connect",(t=>{var e,r;t?this.events.emit("error",t):(this.accounts=(null===(e=this.wc)||void 0===e?void 0:e.accounts)||[],this.chainId=(null===(r=this.wc)||void 0===r?void 0:r.chainId)||this.chainId,this.onOpen())})),this.wc.on("disconnect",(t=>{t?this.events.emit("error",t):this.onClose()})),this.wc.on("modal_closed",(()=>{this.events.emit("error",new Error("User closed modal"))})),this.wc.on("session_update",((t,e)=>{const{accounts:r,chainId:n}=e.params[0];(!this.accounts||r&&this.accounts!==r)&&(this.accounts=r,this.events.emit("accountsChanged",r)),(!this.chainId||n&&this.chainId!==n)&&(this.chainId=n,this.events.emit("chainChanged",n))}))}async sendPayload(t){this.wc=this.register(this.opts);try{const e=await this.wc.unsafeSend(t);return this.sanitizeResponse(e)}catch(e){return this.onError(t,e.message)}}sanitizeResponse(t){return"undefined"!==typeof t.error&&"undefined"===typeof t.error.code?(0,T.formatJsonRpcError)(t.id,t.error.message,t.error.data):t}}const Vt=class{constructor(t){this.events=new(o()),this.rpc={infuraId:null===t||void 0===t?void 0:t.infuraId,custom:null===t||void 0===t?void 0:t.rpc},this.signer=new s.JsonRpcProvider(new qt(t));const e=this.signer.connection.chainId||(null===t||void 0===t?void 0:t.chainId)||1;this.http=this.setHttpProvider(e),this.registerEventListeners()}get connected(){return this.signer.connection.connected}get connector(){return this.signer.connection.connector}get accounts(){return this.signer.connection.accounts}get chainId(){return this.signer.connection.chainId}get rpcUrl(){var t;return(null===(t=this.http)||void 0===t?void 0:t.connection).url||""}async request(t){switch(t.method){case"eth_requestAccounts":return await this.connect(),this.signer.connection.accounts;case"eth_accounts":return this.signer.connection.accounts;case"eth_chainId":return this.signer.connection.chainId}if(l.includes(t.method))return this.signer.request(t);if("undefined"===typeof this.http)throw new Error("Cannot request JSON-RPC method (".concat(t.method,") without provided rpc url"));return this.http.request(t)}sendAsync(t,e){this.request(t).then((t=>e(null,t))).catch((t=>e(t,void 0)))}async enable(){return await this.request({method:"eth_requestAccounts"})}async connect(){this.signer.connection.connected||await this.signer.connect()}async disconnect(){this.signer.connection.connected&&await this.signer.disconnect()}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}registerEventListeners(){this.signer.connection.on("accountsChanged",(t=>{this.events.emit("accountsChanged",t)})),this.signer.connection.on("chainChanged",(t=>{this.http=this.setHttpProvider(t),this.events.emit("chainChanged",t)})),this.signer.on("disconnect",(()=>{this.events.emit("disconnect")}))}setHttpProvider(t){const e=B(t,this.rpc);if("undefined"===typeof e)return;return new s.JsonRpcProvider(new a.HttpConnection(e))}}},3110:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(8405).Buffer}catch(k){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,c=r;c<a;c+=n)l=u(t,c,c+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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],h=[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];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var c=u>>>26,h=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,l=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a<o;a++)l[a]=0}else{for(a=0;a<o-i;a++)l[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[o-a-1]=s}return l},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,l=0,c=0|s[0],h=8191&c,f=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],b=8191&w,_=w>>>13,M=0|s[4],E=8191&M,k=M>>>13,A=0|s[5],x=8191&A,S=A>>>13,N=0|s[6],C=8191&N,I=N>>>13,P=0|s[7],R=8191&P,O=P>>>13,T=0|s[8],B=8191&T,L=T>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],z=8191&D,q=D>>>13,V=0|a[1],H=8191&V,W=V>>>13,Y=0|a[2],K=8191&Y,G=Y>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,lt=at>>>13,ct=0|a[8],ht=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var vt=(l+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(l+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,K)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var wt=(l+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var bt=(l+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;l=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(l+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(l+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var kt=(l+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ft)|0;var At=(l+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(U,H)|0,o=Math.imul(U,W),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ft)|0;var xt=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,lt)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var St=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,Z))+Math.imul(U,Q)|0,o=Math.imul(U,Z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var Nt=(l+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,ft)|0;var Ct=(l+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;l=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ft)|0;var It=(l+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,lt)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,lt)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ft)|0;var Pt=(l+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,lt))+Math.imul(U,ut)|0,o=Math.imul(U,lt),n=n+Math.imul(B,ht)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ft)|0;var Rt=(l+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,ft))+Math.imul(U,ht)|0,o=Math.imul(U,ft);var Ot=(l+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;l=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Tt=(l+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(U,pt)|0))<<13)|0;return l=((o=Math.imul(U,mt))+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=bt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=kt,u[9]=At,u[10]=xt,u[11]=St,u[12]=Nt,u[13]=Ct,u[14]=It,u[15]=Pt,u[16]=Rt,u[17]=Ot,u[18]=Tt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=f),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var c=o-l,h=(0|t.words[c])*(0|e.words[l]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,f=l,d=0;d<s;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],v=n[c+d+s],y=h*g-f*v;v=h*v+f*g,g=y,r[c+d]=p+g,n[c+d]=m+v,r[c+d+s]=p-g,n[c+d+s]=m-v,d!==a&&(y=u*h-l*f,f=u*f+l*h,h=y)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,l,n),this.transform(s,o,a,u,n,i),this.transform(l,o,c,h,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"===typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"===typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"===typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var h=0|this.words[l];this.words[l]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"===typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0===(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,v),i(b,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));f=f.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var h=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},4874:t=>{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function s(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var u,l,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,i),!0;case 5:return c.fn.call(c.context,e,n,i,o),!0;case 6:return c.fn.call(c.context,e,n,i,o,s),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,i);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(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,t.exports=a},7285:(t,e,r)=>{"use strict";const n=r(7491),i=r(5707),o=r(1289);function s(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function u(t,e){return e.decode?i(t):t}function l(t){return Array.isArray(t)?t.sort():"object"===typeof t?l(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function c(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function h(t){const e=(t=c(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function f(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function d(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"===typeof r&&r.split("").indexOf(t.arrayFormatSeparator)>-1?r.split(t.arrayFormatSeparator).map((e=>u(e,t))):null===r?r:u(r,t);n[e]=i};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!==typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){let[t,s]=o(e.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),r(u(t,e),s,n)}for(const i of Object.keys(n)){const t=n[i];if("object"===typeof t&&null!==t)for(const r of Object.keys(t))t[r]=f(t[r],e);else n[i]=f(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?t[e]=l(r):t[e]=r,t}),Object.create(null))}e.extract=h,e.parse=d,e.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>{return e.skipNull&&(null===(n=t[r])||void 0===n)||e.skipEmptyString&&""===t[r];var n},n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[",i,"]"].join("")]:[...r,[a(e,t),"[",a(i,t),"]=",a(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[]"].join("")]:[...r,[a(e,t),"[]=",a(n,t)].join("")];case"comma":case"separator":return e=>(r,n)=>null===n||void 0===n||0===n.length?r:0===r.length?[[a(e,t),"=",a(n,t)].join("")]:[[r,a(n,t)].join(t.arrayFormatSeparator)];default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,a(e,t)]:[...r,[a(e,t),"=",a(n,t)].join("")]}}(e),i={};for(const s of Object.keys(t))r(s)||(i[s]=t[s]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((r=>{const i=t[r];return void 0===i?"":null===i?a(r,e):Array.isArray(i)?i.reduce(n(r),[]).join("&"):a(r,e)+"="+a(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=o(t,"#");return Object.assign({url:r.split("?")[0]||"",query:d(h(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=c(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query);let u=e.stringify(s,r);u&&(u="?".concat(u));let l=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(l="#".concat(a(t.fragmentIdentifier,r))),"".concat(n).concat(u).concat(l)}},4445:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[c++]=e>>16&255,l[c++]=e>>8&255,l[c++]=255&e;2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[c++]=255&e);1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[c++]=e>>8&255,l[c++]=255&e);return l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,l=n-i;a<l;a+=s)o.push(u(t,a,a+s>l?l:a+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2943:t=>{"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=e.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(t){var e=t>>25;return(33554431&t)<<5^996825010&-(1&e)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(e=o(e),r=0;r<t.length;++r){var i=t.charCodeAt(r);e=o(e)^31&i}return e}function a(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var a=(t=n).lastIndexOf("1");if(-1===a)return"No separator character for "+t;if(0===a)return"Missing prefix for "+t;var u=t.slice(0,a),l=t.slice(a+1);if(l.length<6)return"Data too short";var c=s(u);if("string"===typeof c)return c;for(var h=[],f=0;f<l.length;++f){var d=l.charAt(f),p=r[d];if(void 0===p)return"Unknown character "+d;c=o(c)^p,f+6>=l.length||h.push(p)}return 1!==c?"Invalid checksum for "+t:{prefix:u,words:h}}function u(t,e,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],u=0;u<t.length;++u)for(i=i<<e|t[u],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}t.exports={decodeUnsafe:function(){var t=a.apply(null,arguments);if("object"===typeof t)return t},decode:function(t){var e=a.apply(null,arguments);if("object"===typeof e)return e;throw new Error(e)},encode:function(t,r,n){if(n=n||90,t.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"===typeof i)throw new Error(i);for(var a=t+"1",u=0;u<r.length;++u){var l=r[u];if(l>>5!==0)throw new Error("Non 5-bit word");i=o(i)^l,a+=e.charAt(l)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){a+=e.charAt(i>>5*(5-u)&31)}return a},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},6373:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(7790).Buffer}catch(N){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function l(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var l=t.charCodeAt(u)-48;o*=i,s=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&s<i,"Invalid character"),o+=s}return o}function c(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c<a;c+=n)u=l(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){c(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(N){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=d[t],c=p[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(c).toString(t);r=(h=h.idivn(c)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var c=u>>>26,h=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,l=0,c=0|s[0],h=8191&c,f=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],b=8191&w,_=w>>>13,M=0|s[4],E=8191&M,k=M>>>13,A=0|s[5],x=8191&A,S=A>>>13,N=0|s[6],C=8191&N,I=N>>>13,P=0|s[7],R=8191&P,O=P>>>13,T=0|s[8],B=8191&T,L=T>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],z=8191&D,q=D>>>13,V=0|a[1],H=8191&V,W=V>>>13,Y=0|a[2],K=8191&Y,G=Y>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,lt=at>>>13,ct=0|a[8],ht=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var vt=(l+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(l+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,K)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var wt=(l+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var bt=(l+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;l=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(l+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(l+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var kt=(l+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,z),i=(i=Math.imul(F,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ft)|0;var At=(l+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(U,H)|0,o=Math.imul(U,W),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ft)|0;var xt=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,lt)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var St=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,Z))+Math.imul(U,Q)|0,o=Math.imul(U,Z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var Nt=(l+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,ft)|0;var Ct=(l+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;l=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ft)|0;var It=(l+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,lt)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,lt)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ft)|0;var Pt=(l+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,lt))+Math.imul(U,ut)|0,o=Math.imul(U,lt),n=n+Math.imul(B,ht)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ft)|0;var Rt=(l+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,ft))+Math.imul(U,ht)|0,o=Math.imul(U,ft);var Ot=(l+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;l=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Tt=(l+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(U,pt)|0))<<13)|0;return l=((o=Math.imul(U,mt))+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=bt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=kt,u[9]=At,u[10]=xt,u[11]=St,u[12]=Nt,u[13]=Ct,u[14]=It,u[15]=Pt,u[16]=Rt,u[17]=Ot,u[18]=Tt,0!==l&&(u[19]=l,r.length++),r};function v(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var c=o-l,h=(0|t.words[c])*(0|e.words[l]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e,r){return v(t,e,r)}function w(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?v(this,t,e):y(this,t,e)},w.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},w.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},w.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},w.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,f=l,d=0;d<s;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],v=n[c+d+s],y=h*g-f*v;v=h*v+f*g,g=y,r[c+d]=p+g,n[c+d]=m+v,r[c+d+s]=p-g,n[c+d+s]=m-v,d!==a&&(y=u*h-l*f,f=u*f+l*h,h=y)}},w.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},w.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},w.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},w.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0===(-8192&o))},w.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},w.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),l=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,l,n),this.transform(s,o,a,u,n,i),this.transform(l,o,c,h,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"===typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"===typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"===typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var h=0|this.words[l];this.words[l]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"===typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0===(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,_),i(k,_),i(A,_),A.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new E;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return b[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));f=f.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return f},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var h=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},5270:(t,e,r)=>{"use strict";var n=r(139),i={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var r,o,s,a,u,l,c=!1;e||(e={}),r=e.debug||!1;try{if(s=n(),a=document.createRange(),u=document.getSelection(),(l=document.createElement("span")).textContent=t,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(n){if(n.stopPropagation(),e.format)if(n.preventDefault(),"undefined"===typeof n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[e.format]||i.default;window.clipboardData.setData(o,t)}else n.clipboardData.clearData(),n.clipboardData.setData(e.format,t);e.onCopy&&(n.preventDefault(),e.onCopy(n.clipboardData))})),document.body.appendChild(l),a.selectNodeContents(l),u.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(h){r&&console.error("unable to copy using execCommand: ",h),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(h){r&&console.error("unable to copy using clipboardData: ",h),r&&console.error("falling back to prompt"),o=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,t)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(a):u.removeAllRanges()),l&&document.body.removeChild(l),s()}return c}},9038:function(t,e){var r="undefined"!==typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function c(t){return"string"!==typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function f(t){this.map={},t instanceof f?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function m(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"===typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=p(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(t,e){t=l(t),e=c(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},f.prototype.delete=function(t){delete this.map[l(t)]},f.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},f.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},f.prototype.set=function(t,e){this.map[l(t)]=c(e)},f.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},f.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),h(t)},f.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},f.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),h(t)},n&&(f.prototype[Symbol.iterator]=f.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(t,e){var r=(e=e||{}).body;if(t instanceof w){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new f(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new f(e.headers)),this.method=function(t){var e=t.toUpperCase();return y.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function b(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function _(t){var e=new f;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e}function M(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new f(e.headers),this.url=e.url||"",this._initBody(t)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(M.prototype),M.prototype.clone=function(){return new M(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},M.error=function(){var t=new M(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];M.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new M(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(A){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function k(t,r){return new Promise((function(n,o){var s=new w(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:_(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;n(new M(e,t))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send("undefined"===typeof s._bodyInit?null:s._bodyInit)}))}k.polyfill=!0,t.fetch||(t.fetch=k,t.Headers=f,t.Request=w,t.Response=M),e.Headers=f,e.Request=w,e.Response=M,e.fetch=k,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},5707:t=>{"use strict";var e="%[a-f0-9]{2}",r=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function i(t,e){try{return[decodeURIComponent(t.join(""))]}catch(o){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],i(r),i(n))}function o(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r)||[],n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r)||[];return t}}t.exports=function(t){if("string"!==typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var r={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},i=n.exec(t);i;){try{r[i[0]]=decodeURIComponent(i[0])}catch(e){var s=o(i[0]);s!==i[0]&&(r[i[0]]=s)}i=n.exec(t)}r["%C2"]="\ufffd";for(var a=Object.keys(r),u=0;u<a.length;u++){var l=a[u];t=t.replace(new RegExp(l,"g"),r[l])}return t}(t)}}},7789:t=>{"use strict";var e=function(t){return function(t){return!!t&&"object"===typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===r}(t)}(t)};var r="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,e){return!1!==e.clone&&e.isMergeableObject(t)?u((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function i(t,e,r){return t.concat(e).map((function(t){return n(t,r)}))}function o(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function s(t,e){try{return e in t}catch(r){return!1}}function a(t,e,r){var i={};return r.isMergeableObject(t)&&o(t).forEach((function(e){i[e]=n(t[e],r)})),o(e).forEach((function(o){(function(t,e){return s(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(s(t,o)&&r.isMergeableObject(e[o])?i[o]=function(t,e){if(!e.customMerge)return u;var r=e.customMerge(t);return"function"===typeof r?r:u}(o,r)(t[o],e[o],r):i[o]=n(e[o],r))})),i}function u(t,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(r);return s===Array.isArray(t)?s?o.arrayMerge(t,r,o):a(t,r,o):n(r,o)}u.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return u(t,r,e)}),{})};var l=u;t.exports=l},7347:t=>{"use strict";var e={single_source_shortest_paths:function(t,r,n){var i={},o={};o[r]=0;var s,a,u,l,c,h,f,d=e.PriorityQueue.make();for(d.push(r,0);!d.empty();)for(u in a=(s=d.pop()).value,l=s.cost,c=t[a]||{})c.hasOwnProperty(u)&&(h=l+c[u],f=o[u],("undefined"===typeof o[u]||f>h)&&(o[u]=h,d.push(u,h),i[u]=a));if("undefined"!==typeof n&&"undefined"===typeof o[n]){var p=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,r,n){var i=e.single_source_shortest_paths(t,r,n);return e.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(t){var r,n=e.PriorityQueue,i={};for(r in t=t||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},7283:t=>{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function s(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var u,l,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,i),!0;case 5:return c.fn.call(c.context,e,n,i,o),!0;case 6:return c.fn.call(c.context,e,n,i,o,s),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,n);break;case 4:c[l].fn.call(c[l].context,e,n,i);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(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,t.exports=a},7284:t=>{"use strict";var e,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!==t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"===typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"===typeof t.on&&m(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var i,o,s,l;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"===typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function m(t,e,r,n){if("function"===typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!==typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!==typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"===typeof u)n(u,this,e);else{var l=u.length,c=p(u,l);for(r=0;r<l;++r)n(c[r],this,e)}return!0},o.prototype.addListener=function(t,e){return l(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return l(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,h(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,h(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!==typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3697:(t,e,r)=>{var n=e;n.utils=r(7643),n.common=r(2629),n.sha=r(2624),n.ripemd=r(1859),n.hmac=r(7355),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2629:(t,e,r)=>{"use strict";var n=r(7643),i=r(5482);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},7355:(t,e,r)=>{"use strict";var n=r(7643),i=r(5482);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},1859:(t,e,r)=>{"use strict";var n=r(7643),i=r(2629),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,l=i.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function f(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(c,l),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],l=this.h[3],c=this.h[4],y=r,w=n,b=i,_=l,M=c,E=0;E<80;E++){var k=s(o(u(r,h(E,n,i,l),t[p[E]+e],f(E)),g[E]),c);r=c,c=l,l=o(i,10),i=n,n=k,k=s(o(u(y,h(79-E,w,b,_),t[m[E]+e],d(E)),v[E]),M),y=M,M=_,_=o(b,10),b=w,w=k}k=a(this.h[1],i,_),this.h[1]=a(this.h[2],l,M),this.h[2]=a(this.h[3],c,y),this.h[3]=a(this.h[4],r,w),this.h[4]=a(this.h[0],n,b),this.h[0]=k},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},2624:(t,e,r)=>{"use strict";e.sha1=r(2236),e.sha224=r(3291),e.sha256=r(3410),e.sha384=r(4282),e.sha512=r(2155)},2236:(t,e,r)=>{"use strict";var n=r(7643),i=r(2629),o=r(1510),s=n.rotl32,a=n.sum32,u=n.sum32_5,l=o.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,c),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],f=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(s(i,5),l(p,o,c,f),d,r[n],h[p]);d=f,f=c,c=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],f),this.h[4]=a(this.h[4],d)},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},3291:(t,e,r)=>{"use strict";var n=r(7643),i=r(3410);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},3410:(t,e,r)=>{"use strict";var n=r(7643),i=r(2629),o=r(1510),s=r(5482),a=n.sum32,u=n.sum32_4,l=n.sum32_5,c=o.ch32,h=o.maj32,f=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(y,g),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],y=this.h[4],w=this.h[5],b=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var M=l(_,d(y),c(y,w,b),this.k[n],r[n]),E=a(f(i),h(i,o,g));_=b,b=w,w=y,y=a(v,M),v=g,g=o,o=i,i=a(M,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],w),this.h[6]=a(this.h[6],b),this.h[7]=a(this.h[7],_)},y.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},4282:(t,e,r)=>{"use strict";var n=r(7643),i=r(2155);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2155:(t,e,r)=>{"use strict";var n=r(7643),i=r(2629),o=r(5482),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,l=n.shr64_lo,c=n.sum64,h=n.sum64_hi,f=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=i.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function b(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function E(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function k(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function N(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function C(t,e){var r=a(t,e,1)^a(t,e,8)^l(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function P(t,e){var r=a(t,e,19)^a(e,t,29)^l(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(w,v),t.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=I(r[n-4],r[n-3]),o=P(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],u=N(r[n-30],r[n-29]),l=C(r[n-30],r[n-29]),c=r[n-32],h=r[n-31];r[n]=d(i,o,s,a,u,l,c,h),r[n+1]=p(i,o,s,a,u,l,c,h)}},w.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],l=this.h[5],d=this.h[6],p=this.h[7],v=this.h[8],y=this.h[9],w=this.h[10],N=this.h[11],C=this.h[12],I=this.h[13],P=this.h[14],R=this.h[15];o(this.k.length===r.length);for(var O=0;O<r.length;O+=2){var T=P,B=R,L=x(v,y),j=S(v,y),F=b(v,y,w,N,C),U=_(v,y,w,N,C,I),D=this.k[O],z=this.k[O+1],q=r[O],V=r[O+1],H=m(T,B,L,j,F,U,D,z,q,V),W=g(T,B,L,j,F,U,D,z,q,V);T=k(n,i),B=A(n,i),L=M(n,i,s,a,u),j=E(n,i,s,a,u,l);var Y=h(T,B,L,j),K=f(T,B,L,j);P=C,R=I,C=w,I=N,w=v,N=y,v=h(d,p,H,W),y=f(p,p,H,W),d=u,p=l,u=s,l=a,s=n,a=i,n=h(H,W,Y,K),i=f(H,W,Y,K)}c(this.h,0,n,i),c(this.h,2,s,a),c(this.h,4,u,l),c(this.h,6,d,p),c(this.h,8,v,y),c(this.h,10,w,N),c(this.h,12,C,I),c(this.h,14,P,R)},w.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},1510:(t,e,r)=>{"use strict";var n=r(7643).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},7643:(t,e,r)=>{"use strict";var n=r(5482),i=r(6329);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4===0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var l;l="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=l>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,l=e;return u+=(l=l+n>>>0)<e?1:0,u+=(l=l+o>>>0)<o?1:0,t+r+i+s+(u+=(l=l+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,l){var c=0,h=e;return c+=(h=h+n>>>0)<e?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+a>>>0)<a?1:0,t+r+i+s+u+(c+=(h=h+l>>>0)<l?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,l){return e+n+o+a+l>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},219:(t,e,r)=>{"use strict";var n=r(2086),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(t){return n.isMemo(t)?s:a[t.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,r,n){if("string"!==typeof r){if(p){var i=d(r);i&&i!==p&&t(e,i,n)}var s=c(r);h&&(s=s.concat(h(r)));for(var a=u(e),m=u(r),g=0;g<s.length;++g){var v=s[g];if(!o[v]&&(!n||!n[v])&&(!m||!m[v])&&(!a||!a[v])){var y=f(r,v);try{l(e,v,y)}catch(w){}}}}return e}},6900:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,l=u>>1,c=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=l}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[r+d]=255&s,d+=p,s/=256,l-=8);t[r+d-p]|=128*m}},6329:t=>{"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},1390:t=>{t.exports=n,n.strict=i,n.loose=o;var e=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function n(t){return i(t)||o(t)}function i(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function o(t){return r[e.call(t)]}},1141:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},2161:(t,e,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"===typeof window,s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&"object"===typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node?s=r.g:a&&(s=self);var u=!s.JS_SHA3_NO_COMMON_JS&&t.exports,l=r.amdO,c=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,h="0123456789abcdef".split(""),f=[4,1024,262144,67108864],d=[0,8,16,24],p=[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],m=[224,256,384,512],g=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],y={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!c||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,r){return function(n){return new T(t,e,t).update(n)[r]()}},b=function(t,e,r){return function(n,i){return new T(t,e,i).update(n)[r]()}},_=function(t,e,r){return function(e,n,i,o){return x["cshake"+t].update(e,n,i,o)[r]()}},M=function(t,e,r){return function(e,n,i,o){return x["kmac"+t].update(e,n,i,o)[r]()}},E=function(t,e,r,n){for(var i=0;i<v.length;++i){var o=v[i];t[o]=e(r,n,o)}return t},k=function(t,e){var r=w(t,e,"hex");return r.create=function(){return new T(t,e,t)},r.update=function(t){return r.create().update(t)},E(r,w,t,e)},A=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:k},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:k},{name:"shake",padding:[31,7936,2031616,520093696],bits:g,createMethod:function(t,e){var r=b(t,e,"hex");return r.create=function(r){return new T(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},E(r,b,t,e)}},{name:"cshake",padding:f,bits:g,createMethod:function(t,e){var r=y[t],n=_(t,0,"hex");return n.create=function(n,i,o){return i||o?new T(t,e,n).bytepad([i,o],r):x["shake"+t].create(n)},n.update=function(t,e,r,i){return n.create(e,r,i).update(t)},E(n,_,t,e)}},{name:"kmac",padding:f,bits:g,createMethod:function(t,e){var r=y[t],n=M(t,0,"hex");return n.create=function(n,i,o){return new B(t,e,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(t,e,r,i){return n.create(t,r,i).update(e)},E(n,M,t,e)}}],x={},S=[],N=0;N<A.length;++N)for(var C=A[N],I=C.bits,P=0;P<I.length;++P){var R=C.name+"_"+I[P];if(S.push(R),x[R]=C.createMethod(I[P],C.padding),"sha3"!==C.name){var O=C.name+I[P];S.push(O),x[O]=x[R]}}function T(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(t,e,r){T.call(this,t,e,r)}T.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(i);if(null===t)throw new Error(i);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw new Error(i);e=!0}for(var n,o,s=this.blocks,a=this.byteCount,u=t.length,l=this.blockCount,h=0,f=this.s;h<u;){if(this.reset)for(this.reset=!1,s[0]=this.block,n=1;n<l+1;++n)s[n]=0;if(e)for(n=this.start;h<u&&n<a;++h)s[n>>2]|=t[h]<<d[3&n++];else for(n=this.start;h<u&&n<a;++h)(o=t.charCodeAt(h))<128?s[n>>2]|=o<<d[3&n++]:o<2048?(s[n>>2]|=(192|o>>6)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]):o<55296||o>=57344?(s[n>>2]|=(224|o>>12)<<d[3&n++],s[n>>2]|=(128|o>>6&63)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++h)),s[n>>2]|=(240|o>>18)<<d[3&n++],s[n>>2]|=(128|o>>12&63)<<d[3&n++],s[n>>2]|=(128|o>>6&63)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]);if(this.lastByteIndex=n,n>=a){for(this.start=n-a,this.block=s[l],n=0;n<l;++n)f[n]^=s[n];L(f),this.reset=!0}else this.start=n}return this},T.prototype.encode=function(t,e){var r=255&t,n=1,i=[r];for(r=255&(t>>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},T.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(i);if(null===t)throw new Error(i);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw new Error(i);e=!0}var n=0,o=t.length;if(e)n=o;else for(var s=0;s<t.length;++s){var a=t.charCodeAt(s);a<128?n+=1:a<2048?n+=2:a<55296||a>=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},T.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var i=e-r%e,o=[];return o.length=i,this.update(o),this},T.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];L(n)}},T.prototype.toString=T.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a="";s<n;){for(o=0;o<e&&s<n;++o,++s)t=r[o],a+=h[t>>4&15]+h[15&t]+h[t>>12&15]+h[t>>8&15]+h[t>>20&15]+h[t>>16&15]+h[t>>28&15]+h[t>>24&15];s%e===0&&(L(r),o=0)}return i&&(t=r[o],a+=h[t>>4&15]+h[15&t],i>1&&(a+=h[t>>12&15]+h[t>>8&15]),i>2&&(a+=h[t>>20&15]+h[t>>16&15])),a},T.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s<n;){for(o=0;o<e&&s<n;++o,++s)u[s]=r[o];s%e===0&&L(r)}return i&&(u[o]=r[o],t=t.slice(0,a)),t},T.prototype.buffer=T.prototype.arrayBuffer,T.prototype.digest=T.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,u=[];a<i;){for(s=0;s<r&&a<i;++s,++a)t=a<<2,e=n[s],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r===0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},B.prototype=new T,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),T.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,l,c,h,f,d,m,g,v,y,w,b,_,M,E,k,A,x,S,N,C,I,P,R,O,T,B,L,j,F,U,D,z,q,V,H,W,Y,K,G,J,Q,Z,X,$,tt,et,rt,nt,it,ot,st,at,ut,lt,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],l=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],h=t[7]^t[17]^t[27]^t[37]^t[47],e=(f=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(c<<1|h>>>31),r=a^(h<<1|c>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(f<<1|d>>>31),r=l^(d<<1|f>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=c^(i<<1|o>>>31),r=h^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,m=t[0],g=t[1],K=t[11]<<4|t[10]>>>28,G=t[10]<<4|t[11]>>>28,C=t[20]<<3|t[21]>>>29,I=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,V=t[40]<<18|t[41]>>>14,H=t[41]<<18|t[40]>>>14,B=t[2]<<1|t[3]>>>31,L=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Q=t[23]<<10|t[22]>>>22,P=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,lt=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,j=t[14]<<6|t[15]>>>26,F=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,Z=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,O=t[45]<<29|t[44]>>>3,T=t[44]<<29|t[45]>>>3,A=t[6]<<28|t[7]>>>4,x=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,_=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,W=t[8]<<27|t[9]>>>5,Y=t[9]<<27|t[8]>>>5,S=t[18]<<20|t[19]>>>12,N=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,z=t[38]<<8|t[39]>>>24,q=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=m^~v&w,t[1]=g^~y&b,t[10]=A^~S&C,t[11]=x^~N&I,t[20]=B^~j&U,t[21]=L^~F&D,t[30]=W^~K&J,t[31]=Y^~G&Q,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=v^~w&_,t[3]=y^~b&M,t[12]=S^~C&P,t[13]=N^~I&R,t[22]=j^~U&z,t[23]=F^~D&q,t[32]=K^~J&Z,t[33]=G^~Q&X,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=w^~_&E,t[5]=b^~M&k,t[14]=C^~P&O,t[15]=I^~R&T,t[24]=U^~z&V,t[25]=D^~q&H,t[34]=J^~Z&$,t[35]=Q^~X&tt,t[44]=ot^~at<,t[45]=st^~ut&ct,t[6]=_^~E&m,t[7]=M^~k&g,t[16]=P^~O&A,t[17]=R^~T&x,t[26]=z^~V&B,t[27]=q^~H&L,t[36]=Z^~$&W,t[37]=X^~tt&Y,t[46]=at^~lt&et,t[47]=ut^~ct&rt,t[8]=E^~m&v,t[9]=k^~g&y,t[18]=O^~A&S,t[19]=T^~x&N,t[28]=V^~B&j,t[29]=H^~L&F,t[38]=$^~W&K,t[39]=tt^~Y&G,t[48]=lt^~et&nt,t[49]=ct^~rt&it,t[0]^=p[n],t[1]^=p[n+1]};if(u)t.exports=x;else{for(N=0;N<S.length;++N)s[S[N]]=x[S[N]];l&&(void 0===(n=function(){return x}.call(e,r,e,t))||(t.exports=n))}}()},5482:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},2730:(t,e,r)=>{"use strict";var n=r(5043),i=r(8853);function o(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function u(t,e){l(t,e),l(t+"Capture",e)}function l(t,e){for(a[t]=e,t=0;t<e.length;t++)s.add(e[t])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function m(t,e,r,n,i,o,s){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){g[t]=new m(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];g[e]=new m(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){g[t]=new m(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){g[t]=new m(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){g[t]=new m(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){g[t]=new m(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){g[t]=new m(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){g[t]=new m(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){g[t]=new m(t,5,!1,t.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(t){return t[1].toUpperCase()}function w(t,e,r,n){var i=g.hasOwnProperty(e)?g[e]:null;(null!==i?0!==i.type:n||!(2<e.length)||"o"!==e[0]&&"O"!==e[0]||"n"!==e[1]&&"N"!==e[1])&&(function(t,e,r,n){if(null===e||"undefined"===typeof e||function(t,e,r,n){if(null!==r&&0===r.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,r,i,n)&&(r=null),n||null===i?function(t){return!!h.call(p,t)||!h.call(d,t)&&(f.test(t)?p[t]=!0:(d[t]=!0,!1))}(e)&&(null===r?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=null===r?3!==i.type&&"":r:(e=i.attributeName,n=i.attributeNamespace,null===r?t.removeAttribute(e):(r=3===(i=i.type)||4===i&&!0===r?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(v,y);g[e]=new m(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(v,y);g[e]=new m(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(v,y);g[e]=new m(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){g[t]=new m(t,1,!1,t.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){g[t]=new m(t,1,!1,t.toLowerCase(),null,!0,!0)}));var b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),M=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),S=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var T=Symbol.iterator;function B(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=T&&t[T]||t["@@iterator"])?t:null}var L,j=Object.assign;function F(t){if(void 0===L)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);L=e&&e[1]||""}return"\n"+L+t}var U=!1;function D(t,e){if(!t||U)return"";U=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(l){var n=l}Reflect.construct(t,[],e)}else{try{e.call()}catch(l){n=l}t.call(e.prototype)}else{try{throw Error()}catch(l){n=l}t()}}catch(l){if(l&&n&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=n.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var u="\n"+i[s].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}}while(1<=s&&0<=a);break}}}finally{U=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?F(t):""}function z(t){switch(t.tag){case 5:return F(t.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return t=D(t.type,!1);case 11:return t=D(t.type.render,!1);case 1:return t=D(t.type,!0);default:return""}}function q(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case E:return"Fragment";case M:return"Portal";case A:return"Profiler";case k:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case S:return(t.displayName||"Context")+".Consumer";case x:return(t._context.displayName||"Context")+".Provider";case N:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case P:return null!==(e=t.displayName||null)?e:q(t.type)||"Memo";case R:e=t._payload,t=t._init;try{return q(t(e))}catch(r){}}return null}function V(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(e);case 8:return e===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e}return null}function H(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function W(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function Y(t){t._valueTracker||(t._valueTracker=function(t){var e=W(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){n=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(t){n=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function K(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=W(t)?t.checked?"true":"false":t.value),(t=n)!==r&&(e.setValue(t),!0)}function G(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function J(t,e){var r=e.checked;return j({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:t._wrapperState.initialChecked})}function Q(t,e){var r=null==e.defaultValue?"":e.defaultValue,n=null!=e.checked?e.checked:e.defaultChecked;r=H(null!=e.value?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function Z(t,e){null!=(e=e.checked)&&w(t,"checked",e,!1)}function X(t,e){Z(t,e);var r=H(e.value),n=e.type;if(null!=r)"number"===n?(0===r&&""===t.value||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if("submit"===n||"reset"===n)return void t.removeAttribute("value");e.hasOwnProperty("value")?tt(t,e.type,r):e.hasOwnProperty("defaultValue")&&tt(t,e.type,H(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function $(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!("submit"!==n&&"reset"!==n||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}""!==(r=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==r&&(t.name=r)}function tt(t,e,r){"number"===e&&G(t.ownerDocument)===t||(null==r?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var et=Array.isArray;function rt(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+H(r),e=null,i=0;i<t.length;i++){if(t[i].value===r)return t[i].selected=!0,void(n&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function nt(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(o(91));return j({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function it(t,e){var r=e.value;if(null==r){if(r=e.children,e=e.defaultValue,null!=r){if(null!=e)throw Error(o(92));if(et(r)){if(1<r.length)throw Error(o(93));r=r[0]}e=r}null==e&&(e=""),r=e}t._wrapperState={initialValue:H(r)}}function ot(t,e){var r=H(e.value),n=H(e.defaultValue);null!=r&&((r=""+r)!==t.value&&(t.value=r),null==e.defaultValue&&t.defaultValue!==r&&(t.defaultValue=r)),null!=n&&(t.defaultValue=""+n)}function st(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}function at(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ut(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?at(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var lt,ct,ht=(ct=function(t,e){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=e;else{for((lt=lt||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=lt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,r,n){MSApp.execUnsafeLocalFunction((function(){return ct(t,e)}))}:ct);function ft(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&3===r.nodeType)return void(r.nodeValue=e)}t.textContent=e}var dt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pt=["Webkit","ms","Moz","O"];function mt(t,e,r){return null==e||"boolean"===typeof e||""===e?"":r||"number"!==typeof e||0===e||dt.hasOwnProperty(t)&&dt[t]?(""+e).trim():e+"px"}function gt(t,e){for(var r in t=t.style,e)if(e.hasOwnProperty(r)){var n=0===r.indexOf("--"),i=mt(r,e[r],n);"float"===r&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}Object.keys(dt).forEach((function(t){pt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),dt[e]=dt[t]}))}));var vt=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yt(t,e){if(e){if(vt[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(o(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(o(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(o(62))}}function wt(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bt=null;function _t(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var Mt=null,Et=null,kt=null;function At(t){if(t=wi(t)){if("function"!==typeof Mt)throw Error(o(280));var e=t.stateNode;e&&(e=_i(e),Mt(t.stateNode,t.type,e))}}function xt(t){Et?kt?kt.push(t):kt=[t]:Et=t}function St(){if(Et){var t=Et,e=kt;if(kt=Et=null,At(t),e)for(t=0;t<e.length;t++)At(e[t])}}function Nt(t,e){return t(e)}function Ct(){}var It=!1;function Pt(t,e,r){if(It)return t(e,r);It=!0;try{return Nt(t,e,r)}finally{It=!1,(null!==Et||null!==kt)&&(Ct(),St())}}function Rt(t,e){var r=t.stateNode;if(null===r)return null;var n=_i(r);if(null===n)return null;r=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(n=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!n;break t;default:t=!1}if(t)return null;if(r&&"function"!==typeof r)throw Error(o(231,e,typeof r));return r}var Ot=!1;if(c)try{var Tt={};Object.defineProperty(Tt,"passive",{get:function(){Ot=!0}}),window.addEventListener("test",Tt,Tt),window.removeEventListener("test",Tt,Tt)}catch(ct){Ot=!1}function Bt(t,e,r,n,i,o,s,a,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(r,l)}catch(c){this.onError(c)}}var Lt=!1,jt=null,Ft=!1,Ut=null,Dt={onError:function(t){Lt=!0,jt=t}};function zt(t,e,r,n,i,o,s,a,u){Lt=!1,jt=null,Bt.apply(Dt,arguments)}function qt(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(4098&(e=t).flags)&&(r=e.return),t=e.return}while(t)}return 3===e.tag?r:null}function Vt(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function Ht(t){if(qt(t)!==t)throw Error(o(188))}function Wt(t){return null!==(t=function(t){var e=t.alternate;if(!e){if(null===(e=qt(t)))throw Error(o(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(n=i.return)){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Ht(i),t;if(s===n)return Ht(i),e;s=s.sibling}throw Error(o(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,u=i.child;u;){if(u===r){a=!0,r=i,n=s;break}if(u===n){a=!0,n=i,r=s;break}u=u.sibling}if(!a){for(u=s.child;u;){if(u===r){a=!0,r=s,n=i;break}if(u===n){a=!0,n=s,r=i;break}u=u.sibling}if(!a)throw Error(o(189))}}if(r.alternate!==n)throw Error(o(190))}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?t:e}(t))?Yt(t):null}function Yt(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=Yt(t);if(null!==e)return e;t=t.sibling}return null}var Kt=i.unstable_scheduleCallback,Gt=i.unstable_cancelCallback,Jt=i.unstable_shouldYield,Qt=i.unstable_requestPaint,Zt=i.unstable_now,Xt=i.unstable_getCurrentPriorityLevel,$t=i.unstable_ImmediatePriority,te=i.unstable_UserBlockingPriority,ee=i.unstable_NormalPriority,re=i.unstable_LowPriority,ne=i.unstable_IdlePriority,ie=null,oe=null;var se=Math.clz32?Math.clz32:function(t){return t>>>=0,0===t?32:31-(ae(t)/ue|0)|0},ae=Math.log,ue=Math.LN2;var le=64,ce=4194304;function he(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function fe(t,e){var r=t.pendingLanes;if(0===r)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=268435455&r;if(0!==s){var a=s&~i;0!==a?n=he(a):0!==(o&=s)&&(n=he(o))}else 0!==(s=r&~i)?n=he(s):0!==o&&(n=he(o));if(0===n)return 0;if(0!==e&&e!==n&&0===(e&i)&&((i=n&-n)>=(o=e&-e)||16===i&&0!==(4194240&o)))return e;if(0!==(4&n)&&(n|=16&r),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=n;0<e;)i=1<<(r=31-se(e)),n|=t[r],e&=~i;return n}function de(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;default:return-1}}function pe(t){return 0!==(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function me(){var t=le;return 0===(4194240&(le<<=1))&&(le=64),t}function ge(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function ve(t,e,r){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-se(e)]=r}function ye(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-se(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var we=0;function be(t){return 1<(t&=-t)?4<t?0!==(268435455&t)?16:536870912:4:1}var _e,Me,Ee,ke,Ae,xe=!1,Se=[],Ne=null,Ce=null,Ie=null,Pe=new Map,Re=new Map,Oe=[],Te="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Be(t,e){switch(t){case"focusin":case"focusout":Ne=null;break;case"dragenter":case"dragleave":Ce=null;break;case"mouseover":case"mouseout":Ie=null;break;case"pointerover":case"pointerout":Pe.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Re.delete(e.pointerId)}}function Le(t,e,r,n,i,o){return null===t||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},null!==e&&(null!==(e=wi(e))&&Me(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function je(t){var e=yi(t.target);if(null!==e){var r=qt(e);if(null!==r)if(13===(e=r.tag)){if(null!==(e=Vt(r)))return t.blockedOn=e,void Ae(t.priority,(function(){Ee(r)}))}else if(3===e&&r.stateNode.current.memoizedState.isDehydrated)return void(t.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}t.blockedOn=null}function Fe(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var r=Je(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==r)return null!==(e=wi(r))&&Me(e),t.blockedOn=r,!1;var n=new(r=t.nativeEvent).constructor(r.type,r);bt=n,r.target.dispatchEvent(n),bt=null,e.shift()}return!0}function Ue(t,e,r){Fe(t)&&r.delete(e)}function De(){xe=!1,null!==Ne&&Fe(Ne)&&(Ne=null),null!==Ce&&Fe(Ce)&&(Ce=null),null!==Ie&&Fe(Ie)&&(Ie=null),Pe.forEach(Ue),Re.forEach(Ue)}function ze(t,e){t.blockedOn===e&&(t.blockedOn=null,xe||(xe=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,De)))}function qe(t){function e(e){return ze(e,t)}if(0<Se.length){ze(Se[0],t);for(var r=1;r<Se.length;r++){var n=Se[r];n.blockedOn===t&&(n.blockedOn=null)}}for(null!==Ne&&ze(Ne,t),null!==Ce&&ze(Ce,t),null!==Ie&&ze(Ie,t),Pe.forEach(e),Re.forEach(e),r=0;r<Oe.length;r++)(n=Oe[r]).blockedOn===t&&(n.blockedOn=null);for(;0<Oe.length&&null===(r=Oe[0]).blockedOn;)je(r),null===r.blockedOn&&Oe.shift()}var Ve=b.ReactCurrentBatchConfig,He=!0;function We(t,e,r,n){var i=we,o=Ve.transition;Ve.transition=null;try{we=1,Ke(t,e,r,n)}finally{we=i,Ve.transition=o}}function Ye(t,e,r,n){var i=we,o=Ve.transition;Ve.transition=null;try{we=4,Ke(t,e,r,n)}finally{we=i,Ve.transition=o}}function Ke(t,e,r,n){if(He){var i=Je(t,e,r,n);if(null===i)Hn(t,e,n,Ge,r),Be(t,n);else if(function(t,e,r,n,i){switch(e){case"focusin":return Ne=Le(Ne,t,e,r,n,i),!0;case"dragenter":return Ce=Le(Ce,t,e,r,n,i),!0;case"mouseover":return Ie=Le(Ie,t,e,r,n,i),!0;case"pointerover":var o=i.pointerId;return Pe.set(o,Le(Pe.get(o)||null,t,e,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Re.set(o,Le(Re.get(o)||null,t,e,r,n,i)),!0}return!1}(i,t,e,r,n))n.stopPropagation();else if(Be(t,n),4&e&&-1<Te.indexOf(t)){for(;null!==i;){var o=wi(i);if(null!==o&&_e(o),null===(o=Je(t,e,r,n))&&Hn(t,e,n,Ge,r),o===i)break;i=o}null!==i&&n.stopPropagation()}else Hn(t,e,n,null,r)}}var Ge=null;function Je(t,e,r,n){if(Ge=null,null!==(t=yi(t=_t(n))))if(null===(e=qt(t)))t=null;else if(13===(r=e.tag)){if(null!==(t=Vt(e)))return t;t=null}else if(3===r){if(e.stateNode.current.memoizedState.isDehydrated)return 3===e.tag?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ge=t,null}function Qe(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xt()){case $t:return 1;case te:return 4;case ee:case re:return 16;case ne:return 536870912;default:return 16}default:return 16}}var Ze=null,Xe=null,$e=null;function tr(){if($e)return $e;var t,e,r=Xe,n=r.length,i="value"in Ze?Ze.value:Ze.textContent,o=i.length;for(t=0;t<n&&r[t]===i[t];t++);var s=n-t;for(e=1;e<=s&&r[n-e]===i[o-e];e++);return $e=i.slice(t,1<e?1-e:void 0)}function er(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function rr(){return!0}function nr(){return!1}function ir(t){function e(e,r,n,i,o){for(var s in this._reactName=e,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(s)&&(e=t[s],this[s]=e?e(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rr:nr,this.isPropagationStopped=nr,this}return j(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),e}var or,sr,ar,ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lr=ir(ur),cr=j({},ur,{view:0,detail:0}),hr=ir(cr),fr=j({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kr,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ar&&(ar&&"mousemove"===t.type?(or=t.screenX-ar.screenX,sr=t.screenY-ar.screenY):sr=or=0,ar=t),or)},movementY:function(t){return"movementY"in t?t.movementY:sr}}),dr=ir(fr),pr=ir(j({},fr,{dataTransfer:0})),mr=ir(j({},cr,{relatedTarget:0})),gr=ir(j({},ur,{animationName:0,elapsedTime:0,pseudoElement:0})),vr=j({},ur,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),yr=ir(vr),wr=ir(j({},ur,{data:0})),br={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Mr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Er(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Mr[t])&&!!e[t]}function kr(){return Er}var Ar=j({},cr,{key:function(t){if(t.key){var e=br[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=er(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?_r[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kr,charCode:function(t){return"keypress"===t.type?er(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?er(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),xr=ir(Ar),Sr=ir(j({},fr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nr=ir(j({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kr})),Cr=ir(j({},ur,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ir=j({},fr,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Pr=ir(Ir),Rr=[9,13,27,32],Or=c&&"CompositionEvent"in window,Tr=null;c&&"documentMode"in document&&(Tr=document.documentMode);var Br=c&&"TextEvent"in window&&!Tr,Lr=c&&(!Or||Tr&&8<Tr&&11>=Tr),jr=String.fromCharCode(32),Fr=!1;function Ur(t,e){switch(t){case"keyup":return-1!==Rr.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dr(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var zr=!1;var qr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!qr[t.type]:"textarea"===e}function Hr(t,e,r,n){xt(n),0<(e=Yn(e,"onChange")).length&&(r=new lr("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var Wr=null,Yr=null;function Kr(t){Fn(t,0)}function Gr(t){if(K(bi(t)))return t}function Jr(t,e){if("change"===t)return e}var Qr=!1;if(c){var Zr;if(c){var Xr="oninput"in document;if(!Xr){var $r=document.createElement("div");$r.setAttribute("oninput","return;"),Xr="function"===typeof $r.oninput}Zr=Xr}else Zr=!1;Qr=Zr&&(!document.documentMode||9<document.documentMode)}function tn(){Wr&&(Wr.detachEvent("onpropertychange",en),Yr=Wr=null)}function en(t){if("value"===t.propertyName&&Gr(Yr)){var e=[];Hr(e,Yr,t,_t(t)),Pt(Kr,e)}}function rn(t,e,r){"focusin"===t?(tn(),Yr=r,(Wr=e).attachEvent("onpropertychange",en)):"focusout"===t&&tn()}function nn(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return Gr(Yr)}function on(t,e){if("click"===t)return Gr(e)}function sn(t,e){if("input"===t||"change"===t)return Gr(e)}var an="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e};function un(t,e){if(an(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!h.call(e,i)||!an(t[i],e[i]))return!1}return!0}function ln(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function cn(t,e){var r,n=ln(t);for(t=0;n;){if(3===n.nodeType){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=ln(n)}}function hn(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?hn(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function fn(){for(var t=window,e=G();e instanceof t.HTMLIFrameElement;){try{var r="string"===typeof e.contentWindow.location.href}catch(n){r=!1}if(!r)break;e=G((t=e.contentWindow).document)}return e}function dn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function pn(t){var e=fn(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&hn(r.ownerDocument.documentElement,r)){if(null!==n&&dn(r))if(e=n.start,void 0===(t=n.end)&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if((t=(e=r.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=void 0===n.end?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=cn(r,o);var s=cn(r,n);i&&s&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&((e=e.createRange()).setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}for(e=[],t=r;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"===typeof r.focus&&r.focus(),r=0;r<e.length;r++)(t=e[r]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}var mn=c&&"documentMode"in document&&11>=document.documentMode,gn=null,vn=null,yn=null,wn=!1;function bn(t,e,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;wn||null==gn||gn!==G(n)||("selectionStart"in(n=gn)&&dn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},yn&&un(yn,n)||(yn=n,0<(n=Yn(vn,"onSelect")).length&&(e=new lr("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=gn)))}function _n(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Mn={animationend:_n("Animation","AnimationEnd"),animationiteration:_n("Animation","AnimationIteration"),animationstart:_n("Animation","AnimationStart"),transitionend:_n("Transition","TransitionEnd")},En={},kn={};function An(t){if(En[t])return En[t];if(!Mn[t])return t;var e,r=Mn[t];for(e in r)if(r.hasOwnProperty(e)&&e in kn)return En[t]=r[e];return t}c&&(kn=document.createElement("div").style,"AnimationEvent"in window||(delete Mn.animationend.animation,delete Mn.animationiteration.animation,delete Mn.animationstart.animation),"TransitionEvent"in window||delete Mn.transitionend.transition);var xn=An("animationend"),Sn=An("animationiteration"),Nn=An("animationstart"),Cn=An("transitionend"),In=new Map,Pn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rn(t,e){In.set(t,e),u(e,[t])}for(var On=0;On<Pn.length;On++){var Tn=Pn[On];Rn(Tn.toLowerCase(),"on"+(Tn[0].toUpperCase()+Tn.slice(1)))}Rn(xn,"onAnimationEnd"),Rn(Sn,"onAnimationIteration"),Rn(Nn,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Cn,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ln=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bn));function jn(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,function(t,e,r,n,i,s,a,u,l){if(zt.apply(this,arguments),Lt){if(!Lt)throw Error(o(198));var c=jt;Lt=!1,jt=null,Ft||(Ft=!0,Ut=c)}}(n,e,void 0,t),t.currentTarget=null}function Fn(t,e){e=0!==(4&e);for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;t:{var o=void 0;if(e)for(var s=n.length-1;0<=s;s--){var a=n[s],u=a.instance,l=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break t;jn(i,a,l),o=u}else for(s=0;s<n.length;s++){if(u=(a=n[s]).instance,l=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break t;jn(i,a,l),o=u}}}if(Ft)throw t=Ut,Ft=!1,Ut=null,t}function Un(t,e){var r=e[mi];void 0===r&&(r=e[mi]=new Set);var n=t+"__bubble";r.has(n)||(Vn(e,t,2,!1),r.add(n))}function Dn(t,e,r){var n=0;e&&(n|=4),Vn(r,t,n,e)}var zn="_reactListening"+Math.random().toString(36).slice(2);function qn(t){if(!t[zn]){t[zn]=!0,s.forEach((function(e){"selectionchange"!==e&&(Ln.has(e)||Dn(e,!1,t),Dn(e,!0,t))}));var e=9===t.nodeType?t:t.ownerDocument;null===e||e[zn]||(e[zn]=!0,Dn("selectionchange",!1,e))}}function Vn(t,e,r,n){switch(Qe(e)){case 1:var i=We;break;case 4:i=Ye;break;default:i=Ke}r=i.bind(null,e,r,t),i=void 0,!Ot||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(i=!0),n?void 0!==i?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):void 0!==i?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function Hn(t,e,r,n,i){var o=n;if(0===(1&e)&&0===(2&e)&&null!==n)t:for(;;){if(null===n)return;var s=n.tag;if(3===s||4===s){var a=n.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=n.return;null!==s;){var u=s.tag;if((3===u||4===u)&&((u=s.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=yi(a)))return;if(5===(u=s.tag)||6===u){n=o=s;continue t}a=a.parentNode}}n=n.return}Pt((function(){var n=o,i=_t(r),s=[];t:{var a=In.get(t);if(void 0!==a){var u=lr,l=t;switch(t){case"keypress":if(0===er(r))break t;case"keydown":case"keyup":u=xr;break;case"focusin":l="focus",u=mr;break;case"focusout":l="blur",u=mr;break;case"beforeblur":case"afterblur":u=mr;break;case"click":if(2===r.button)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=dr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=pr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nr;break;case xn:case Sn:case Nn:u=gr;break;case Cn:u=Cr;break;case"scroll":u=hr;break;case"wheel":u=Pr;break;case"copy":case"cut":case"paste":u=yr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Sr}var c=0!==(4&e),h=!c&&"scroll"===t,f=c?null!==a?a+"Capture":null:a;c=[];for(var d,p=n;null!==p;){var m=(d=p).stateNode;if(5===d.tag&&null!==m&&(d=m,null!==f&&(null!=(m=Rt(p,f))&&c.push(Wn(p,m,d)))),h)break;p=p.return}0<c.length&&(a=new u(a,l,null,r,i),s.push({event:a,listeners:c}))}}if(0===(7&e)){if(u="mouseout"===t||"pointerout"===t,(!(a="mouseover"===t||"pointerover"===t)||r===bt||!(l=r.relatedTarget||r.fromElement)||!yi(l)&&!l[pi])&&(u||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,u?(u=n,null!==(l=(l=r.relatedTarget||r.toElement)?yi(l):null)&&(l!==(h=qt(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=n),u!==l)){if(c=dr,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==t&&"pointerover"!==t||(c=Sr,m="onPointerLeave",f="onPointerEnter",p="pointer"),h=null==u?a:bi(u),d=null==l?a:bi(l),(a=new c(m,p+"leave",u,r,i)).target=h,a.relatedTarget=d,m=null,yi(i)===n&&((c=new c(f,p+"enter",l,r,i)).target=d,c.relatedTarget=h,m=c),h=m,u&&l)t:{for(f=l,p=0,d=c=u;d;d=Kn(d))p++;for(d=0,m=f;m;m=Kn(m))d++;for(;0<p-d;)c=Kn(c),p--;for(;0<d-p;)f=Kn(f),d--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break t;c=Kn(c),f=Kn(f)}c=null}else c=null;null!==u&&Gn(s,a,u,c,!1),null!==l&&null!==h&&Gn(s,h,l,c,!0)}if("select"===(u=(a=n?bi(n):window).nodeName&&a.nodeName.toLowerCase())||"input"===u&&"file"===a.type)var g=Jr;else if(Vr(a))if(Qr)g=sn;else{g=nn;var v=rn}else(u=a.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=on);switch(g&&(g=g(t,n))?Hr(s,g,r,i):(v&&v(t,a,n),"focusout"===t&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&tt(a,"number",a.value)),v=n?bi(n):window,t){case"focusin":(Vr(v)||"true"===v.contentEditable)&&(gn=v,vn=n,yn=null);break;case"focusout":yn=vn=gn=null;break;case"mousedown":wn=!0;break;case"contextmenu":case"mouseup":case"dragend":wn=!1,bn(s,r,i);break;case"selectionchange":if(mn)break;case"keydown":case"keyup":bn(s,r,i)}var y;if(Or)t:{switch(t){case"compositionstart":var w="onCompositionStart";break t;case"compositionend":w="onCompositionEnd";break t;case"compositionupdate":w="onCompositionUpdate";break t}w=void 0}else zr?Ur(t,r)&&(w="onCompositionEnd"):"keydown"===t&&229===r.keyCode&&(w="onCompositionStart");w&&(Lr&&"ko"!==r.locale&&(zr||"onCompositionStart"!==w?"onCompositionEnd"===w&&zr&&(y=tr()):(Xe="value"in(Ze=i)?Ze.value:Ze.textContent,zr=!0)),0<(v=Yn(n,w)).length&&(w=new wr(w,t,null,r,i),s.push({event:w,listeners:v}),y?w.data=y:null!==(y=Dr(r))&&(w.data=y))),(y=Br?function(t,e){switch(t){case"compositionend":return Dr(e);case"keypress":return 32!==e.which?null:(Fr=!0,jr);case"textInput":return(t=e.data)===jr&&Fr?null:t;default:return null}}(t,r):function(t,e){if(zr)return"compositionend"===t||!Or&&Ur(t,e)?(t=tr(),$e=Xe=Ze=null,zr=!1,t):null;switch(t){case"paste":default:return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Lr&&"ko"!==e.locale?null:e.data}}(t,r))&&(0<(n=Yn(n,"onBeforeInput")).length&&(i=new wr("onBeforeInput","beforeinput",null,r,i),s.push({event:i,listeners:n}),i.data=y))}Fn(s,e)}))}function Wn(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Yn(t,e){for(var r=e+"Capture",n=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Rt(t,r))&&n.unshift(Wn(t,o,i)),null!=(o=Rt(t,e))&&n.push(Wn(t,o,i))),t=t.return}return n}function Kn(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Gn(t,e,r,n,i){for(var o=e._reactName,s=[];null!==r&&r!==n;){var a=r,u=a.alternate,l=a.stateNode;if(null!==u&&u===n)break;5===a.tag&&null!==l&&(a=l,i?null!=(u=Rt(r,o))&&s.unshift(Wn(r,u,a)):i||null!=(u=Rt(r,o))&&s.push(Wn(r,u,a))),r=r.return}0!==s.length&&t.push({event:e,listeners:s})}var Jn=/\r\n?/g,Qn=/\u0000|\uFFFD/g;function Zn(t){return("string"===typeof t?t:""+t).replace(Jn,"\n").replace(Qn,"")}function Xn(t,e,r){if(e=Zn(e),Zn(t)!==e&&r)throw Error(o(425))}function $n(){}var ti=null,ei=null;function ri(t,e){return"textarea"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var ni="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,si="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(t){return oi.resolve(null).then(t).catch(ai)}:ni;function ai(t){setTimeout((function(){throw t}))}function ui(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&8===i.nodeType)if("/$"===(r=i.data)){if(0===n)return t.removeChild(i),void qe(e);n--}else"$"!==r&&"$?"!==r&&"$!"!==r||n++;r=i}while(r);qe(e)}function li(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break;if(8===e){if("$"===(e=t.data)||"$!"===e||"$?"===e)break;if("/$"===e)return null}}return t}function ci(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var r=t.data;if("$"===r||"$!"===r||"$?"===r){if(0===e)return t;e--}else"/$"===r&&e++}t=t.previousSibling}return null}var hi=Math.random().toString(36).slice(2),fi="__reactFiber$"+hi,di="__reactProps$"+hi,pi="__reactContainer$"+hi,mi="__reactEvents$"+hi,gi="__reactListeners$"+hi,vi="__reactHandles$"+hi;function yi(t){var e=t[fi];if(e)return e;for(var r=t.parentNode;r;){if(e=r[pi]||r[fi]){if(r=e.alternate,null!==e.child||null!==r&&null!==r.child)for(t=ci(t);null!==t;){if(r=t[fi])return r;t=ci(t)}return e}r=(t=r).parentNode}return null}function wi(t){return!(t=t[fi]||t[pi])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function bi(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(o(33))}function _i(t){return t[di]||null}var Mi=[],Ei=-1;function ki(t){return{current:t}}function Ai(t){0>Ei||(t.current=Mi[Ei],Mi[Ei]=null,Ei--)}function xi(t,e){Ei++,Mi[Ei]=t.current,t.current=e}var Si={},Ni=ki(Si),Ci=ki(!1),Ii=Si;function Pi(t,e){var r=t.type.contextTypes;if(!r)return Si;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in r)o[i]=e[i];return n&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Ri(t){return null!==(t=t.childContextTypes)&&void 0!==t}function Oi(){Ai(Ci),Ai(Ni)}function Ti(t,e,r){if(Ni.current!==Si)throw Error(o(168));xi(Ni,e),xi(Ci,r)}function Bi(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,"function"!==typeof n.getChildContext)return r;for(var i in n=n.getChildContext())if(!(i in e))throw Error(o(108,V(t)||"Unknown",i));return j({},r,n)}function Li(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Si,Ii=Ni.current,xi(Ni,t),xi(Ci,Ci.current),!0}function ji(t,e,r){var n=t.stateNode;if(!n)throw Error(o(169));r?(t=Bi(t,e,Ii),n.__reactInternalMemoizedMergedChildContext=t,Ai(Ci),Ai(Ni),xi(Ni,t)):Ai(Ci),xi(Ci,r)}var Fi=null,Ui=!1,Di=!1;function zi(t){null===Fi?Fi=[t]:Fi.push(t)}function qi(){if(!Di&&null!==Fi){Di=!0;var t=0,e=we;try{var r=Fi;for(we=1;t<r.length;t++){var n=r[t];do{n=n(!0)}while(null!==n)}Fi=null,Ui=!1}catch(i){throw null!==Fi&&(Fi=Fi.slice(t+1)),Kt($t,qi),i}finally{we=e,Di=!1}}return null}var Vi=[],Hi=0,Wi=null,Yi=0,Ki=[],Gi=0,Ji=null,Qi=1,Zi="";function Xi(t,e){Vi[Hi++]=Yi,Vi[Hi++]=Wi,Wi=t,Yi=e}function $i(t,e,r){Ki[Gi++]=Qi,Ki[Gi++]=Zi,Ki[Gi++]=Ji,Ji=t;var n=Qi;t=Zi;var i=32-se(n)-1;n&=~(1<<i),r+=1;var o=32-se(e)+i;if(30<o){var s=i-i%5;o=(n&(1<<s)-1).toString(32),n>>=s,i-=s,Qi=1<<32-se(e)+i|r<<i|n,Zi=o+t}else Qi=1<<o|r<<i|n,Zi=t}function to(t){null!==t.return&&(Xi(t,1),$i(t,1,0))}function eo(t){for(;t===Wi;)Wi=Vi[--Hi],Vi[Hi]=null,Yi=Vi[--Hi],Vi[Hi]=null;for(;t===Ji;)Ji=Ki[--Gi],Ki[Gi]=null,Zi=Ki[--Gi],Ki[Gi]=null,Qi=Ki[--Gi],Ki[Gi]=null}var ro=null,no=null,io=!1,oo=null;function so(t,e){var r=Pl(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,null===(e=t.deletions)?(t.deletions=[r],t.flags|=16):e.push(r)}function ao(t,e){switch(t.tag){case 5:var r=t.type;return null!==(e=1!==e.nodeType||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,ro=t,no=li(e.firstChild),!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,ro=t,no=null,!0);case 13:return null!==(e=8!==e.nodeType?null:e)&&(r=null!==Ji?{id:Qi,overflow:Zi}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},(r=Pl(18,null,null,0)).stateNode=e,r.return=t,t.child=r,ro=t,no=null,!0);default:return!1}}function uo(t){return 0!==(1&t.mode)&&0===(128&t.flags)}function lo(t){if(io){var e=no;if(e){var r=e;if(!ao(t,e)){if(uo(t))throw Error(o(418));e=li(r.nextSibling);var n=ro;e&&ao(t,e)?so(n,r):(t.flags=-4097&t.flags|2,io=!1,ro=t)}}else{if(uo(t))throw Error(o(418));t.flags=-4097&t.flags|2,io=!1,ro=t}}}function co(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;ro=t}function ho(t){if(t!==ro)return!1;if(!io)return co(t),io=!0,!1;var e;if((e=3!==t.tag)&&!(e=5!==t.tag)&&(e="head"!==(e=t.type)&&"body"!==e&&!ri(t.type,t.memoizedProps)),e&&(e=no)){if(uo(t))throw fo(),Error(o(418));for(;e;)so(t,e),e=li(e.nextSibling)}if(co(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(o(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var r=t.data;if("/$"===r){if(0===e){no=li(t.nextSibling);break t}e--}else"$"!==r&&"$!"!==r&&"$?"!==r||e++}t=t.nextSibling}no=null}}else no=ro?li(t.stateNode.nextSibling):null;return!0}function fo(){for(var t=no;t;)t=li(t.nextSibling)}function po(){no=ro=null,io=!1}function mo(t){null===oo?oo=[t]:oo.push(t)}var go=b.ReactCurrentBatchConfig;function vo(t,e,r){if(null!==(t=r.ref)&&"function"!==typeof t&&"object"!==typeof t){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(o(309));var n=r.stateNode}if(!n)throw Error(o(147,t));var i=n,s=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===s?e.ref:(e=function(t){var e=i.refs;null===t?delete e[s]:e[s]=t},e._stringRef=s,e)}if("string"!==typeof t)throw Error(o(284));if(!r._owner)throw Error(o(290,t))}return t}function yo(t,e){throw t=Object.prototype.toString.call(e),Error(o(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function wo(t){return(0,t._init)(t._payload)}function bo(t){function e(e,r){if(t){var n=e.deletions;null===n?(e.deletions=[r],e.flags|=16):n.push(r)}}function r(r,n){if(!t)return null;for(;null!==n;)e(r,n),n=n.sibling;return null}function n(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=Ol(t,e)).index=0,t.sibling=null,t}function s(e,r,n){return e.index=n,t?null!==(n=e.alternate)?(n=n.index)<r?(e.flags|=2,r):n:(e.flags|=2,r):(e.flags|=1048576,r)}function a(e){return t&&null===e.alternate&&(e.flags|=2),e}function u(t,e,r,n){return null===e||6!==e.tag?((e=jl(r,t.mode,n)).return=t,e):((e=i(e,r)).return=t,e)}function l(t,e,r,n){var o=r.type;return o===E?h(t,e,r.props.children,n,r.key):null!==e&&(e.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===R&&wo(o)===e.type)?((n=i(e,r.props)).ref=vo(t,e,r),n.return=t,n):((n=Tl(r.type,r.key,r.props,null,t.mode,n)).ref=vo(t,e,r),n.return=t,n)}function c(t,e,r,n){return null===e||4!==e.tag||e.stateNode.containerInfo!==r.containerInfo||e.stateNode.implementation!==r.implementation?((e=Fl(r,t.mode,n)).return=t,e):((e=i(e,r.children||[])).return=t,e)}function h(t,e,r,n,o){return null===e||7!==e.tag?((e=Bl(r,t.mode,n,o)).return=t,e):((e=i(e,r)).return=t,e)}function f(t,e,r){if("string"===typeof e&&""!==e||"number"===typeof e)return(e=jl(""+e,t.mode,r)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case _:return(r=Tl(e.type,e.key,e.props,null,t.mode,r)).ref=vo(t,null,e),r.return=t,r;case M:return(e=Fl(e,t.mode,r)).return=t,e;case R:return f(t,(0,e._init)(e._payload),r)}if(et(e)||B(e))return(e=Bl(e,t.mode,r,null)).return=t,e;yo(t,e)}return null}function d(t,e,r,n){var i=null!==e?e.key:null;if("string"===typeof r&&""!==r||"number"===typeof r)return null!==i?null:u(t,e,""+r,n);if("object"===typeof r&&null!==r){switch(r.$$typeof){case _:return r.key===i?l(t,e,r,n):null;case M:return r.key===i?c(t,e,r,n):null;case R:return d(t,e,(i=r._init)(r._payload),n)}if(et(r)||B(r))return null!==i?null:h(t,e,r,n,null);yo(t,r)}return null}function p(t,e,r,n,i){if("string"===typeof n&&""!==n||"number"===typeof n)return u(e,t=t.get(r)||null,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case _:return l(e,t=t.get(null===n.key?r:n.key)||null,n,i);case M:return c(e,t=t.get(null===n.key?r:n.key)||null,n,i);case R:return p(t,e,r,(0,n._init)(n._payload),i)}if(et(n)||B(n))return h(e,t=t.get(r)||null,n,i,null);yo(e,n)}return null}function m(i,o,a,u){for(var l=null,c=null,h=o,m=o=0,g=null;null!==h&&m<a.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=d(i,h,a[m],u);if(null===v){null===h&&(h=g);break}t&&h&&null===v.alternate&&e(i,h),o=s(v,o,m),null===c?l=v:c.sibling=v,c=v,h=g}if(m===a.length)return r(i,h),io&&Xi(i,m),l;if(null===h){for(;m<a.length;m++)null!==(h=f(i,a[m],u))&&(o=s(h,o,m),null===c?l=h:c.sibling=h,c=h);return io&&Xi(i,m),l}for(h=n(i,h);m<a.length;m++)null!==(g=p(h,i,m,a[m],u))&&(t&&null!==g.alternate&&h.delete(null===g.key?m:g.key),o=s(g,o,m),null===c?l=g:c.sibling=g,c=g);return t&&h.forEach((function(t){return e(i,t)})),io&&Xi(i,m),l}function g(i,a,u,l){var c=B(u);if("function"!==typeof c)throw Error(o(150));if(null==(u=c.call(u)))throw Error(o(151));for(var h=c=null,m=a,g=a=0,v=null,y=u.next();null!==m&&!y.done;g++,y=u.next()){m.index>g?(v=m,m=null):v=m.sibling;var w=d(i,m,y.value,l);if(null===w){null===m&&(m=v);break}t&&m&&null===w.alternate&&e(i,m),a=s(w,a,g),null===h?c=w:h.sibling=w,h=w,m=v}if(y.done)return r(i,m),io&&Xi(i,g),c;if(null===m){for(;!y.done;g++,y=u.next())null!==(y=f(i,y.value,l))&&(a=s(y,a,g),null===h?c=y:h.sibling=y,h=y);return io&&Xi(i,g),c}for(m=n(i,m);!y.done;g++,y=u.next())null!==(y=p(m,i,g,y.value,l))&&(t&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=s(y,a,g),null===h?c=y:h.sibling=y,h=y);return t&&m.forEach((function(t){return e(i,t)})),io&&Xi(i,g),c}return function t(n,o,s,u){if("object"===typeof s&&null!==s&&s.type===E&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case _:t:{for(var l=s.key,c=o;null!==c;){if(c.key===l){if((l=s.type)===E){if(7===c.tag){r(n,c.sibling),(o=i(c,s.props.children)).return=n,n=o;break t}}else if(c.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===R&&wo(l)===c.type){r(n,c.sibling),(o=i(c,s.props)).ref=vo(n,c,s),o.return=n,n=o;break t}r(n,c);break}e(n,c),c=c.sibling}s.type===E?((o=Bl(s.props.children,n.mode,u,s.key)).return=n,n=o):((u=Tl(s.type,s.key,s.props,null,n.mode,u)).ref=vo(n,o,s),u.return=n,n=u)}return a(n);case M:t:{for(c=s.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){r(n,o.sibling),(o=i(o,s.children||[])).return=n,n=o;break t}r(n,o);break}e(n,o),o=o.sibling}(o=Fl(s,n.mode,u)).return=n,n=o}return a(n);case R:return t(n,o,(c=s._init)(s._payload),u)}if(et(s))return m(n,o,s,u);if(B(s))return g(n,o,s,u);yo(n,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==o&&6===o.tag?(r(n,o.sibling),(o=i(o,s)).return=n,n=o):(r(n,o),(o=jl(s,n.mode,u)).return=n,n=o),a(n)):r(n,o)}}var _o=bo(!0),Mo=bo(!1),Eo=ki(null),ko=null,Ao=null,xo=null;function So(){xo=Ao=ko=null}function No(t){var e=Eo.current;Ai(Eo),t._currentValue=e}function Co(t,e,r){for(;null!==t;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==n&&(n.childLanes|=e)):null!==n&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Io(t,e){ko=t,xo=Ao=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(wa=!0),t.firstContext=null)}function Po(t){var e=t._currentValue;if(xo!==t)if(t={context:t,memoizedValue:e,next:null},null===Ao){if(null===ko)throw Error(o(308));Ao=t,ko.dependencies={lanes:0,firstContext:t}}else Ao=Ao.next=t;return e}var Ro=null;function Oo(t){null===Ro?Ro=[t]:Ro.push(t)}function To(t,e,r,n){var i=e.interleaved;return null===i?(r.next=r,Oo(e)):(r.next=i.next,i.next=r),e.interleaved=r,Bo(t,n)}function Bo(t,e){t.lanes|=e;var r=t.alternate;for(null!==r&&(r.lanes|=e),r=t,t=t.return;null!==t;)t.childLanes|=e,null!==(r=t.alternate)&&(r.childLanes|=e),r=t,t=t.return;return 3===r.tag?r.stateNode:null}var Lo=!1;function jo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fo(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Uo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Do(t,e,r){var n=t.updateQueue;if(null===n)return null;if(n=n.shared,0!==(2&Nu)){var i=n.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),n.pending=e,Bo(t,r)}return null===(i=n.interleaved)?(e.next=e,Oo(n)):(e.next=i.next,i.next=e),n.interleaved=e,Bo(t,r)}function zo(t,e,r){if(null!==(e=e.updateQueue)&&(e=e.shared,0!==(4194240&r))){var n=e.lanes;r|=n&=t.pendingLanes,e.lanes=r,ye(t,r)}}function qo(t,e){var r=t.updateQueue,n=t.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,o=null;if(null!==(r=r.firstBaseUpdate)){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===o?i=o=s:o=o.next=s,r=r.next}while(null!==r);null===o?i=o=e:o=o.next=e}else i=o=e;return r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},void(t.updateQueue=r)}null===(t=r.lastBaseUpdate)?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Vo(t,e,r,n){var i=t.updateQueue;Lo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var u=a,l=u.next;u.next=null,null===s?o=l:s.next=l,s=u;var c=t.alternate;null!==c&&((a=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===a?c.firstBaseUpdate=l:a.next=l,c.lastBaseUpdate=u))}if(null!==o){var h=i.baseState;for(s=0,c=l=u=null,a=o;;){var f=a.lane,d=a.eventTime;if((n&f)===f){null!==c&&(c=c.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});t:{var p=t,m=a;switch(f=e,d=r,m.tag){case 1:if("function"===typeof(p=m.payload)){h=p.call(d,h,f);break t}h=p;break t;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(f="function"===typeof(p=m.payload)?p.call(d,h,f):p)||void 0===f)break t;h=j({},h,f);break t;case 2:Lo=!0}}null!==a.callback&&0!==a.lane&&(t.flags|=64,null===(f=i.effects)?i.effects=[a]:f.push(a))}else d={eventTime:d,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(l=c=d,u=h):c=c.next=d,s|=f;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(f=a).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===c&&(u=h),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null!==(e=i.shared.interleaved)){i=e;do{s|=i.lane,i=i.next}while(i!==e)}else null===o&&(i.shared.lanes=0);Lu|=s,t.lanes=s,t.memoizedState=h}}function Ho(t,e,r){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(null!==i){if(n.callback=null,n=r,"function"!==typeof i)throw Error(o(191,i));i.call(n)}}}var Wo={},Yo=ki(Wo),Ko=ki(Wo),Go=ki(Wo);function Jo(t){if(t===Wo)throw Error(o(174));return t}function Qo(t,e){switch(xi(Go,e),xi(Ko,t),xi(Yo,Wo),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ut(null,"");break;default:e=ut(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}Ai(Yo),xi(Yo,e)}function Zo(){Ai(Yo),Ai(Ko),Ai(Go)}function Xo(t){Jo(Go.current);var e=Jo(Yo.current),r=ut(e,t.type);e!==r&&(xi(Ko,t),xi(Yo,r))}function $o(t){Ko.current===t&&(Ai(Yo),Ai(Ko))}var ts=ki(0);function es(t){for(var e=t;null!==e;){if(13===e.tag){var r=e.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var rs=[];function ns(){for(var t=0;t<rs.length;t++)rs[t]._workInProgressVersionPrimary=null;rs.length=0}var is=b.ReactCurrentDispatcher,os=b.ReactCurrentBatchConfig,ss=0,as=null,us=null,ls=null,cs=!1,hs=!1,fs=0,ds=0;function ps(){throw Error(o(321))}function ms(t,e){if(null===e)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!an(t[r],e[r]))return!1;return!0}function gs(t,e,r,n,i,s){if(ss=s,as=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,is.current=null===t||null===t.memoizedState?$s:ta,t=r(n,i),hs){s=0;do{if(hs=!1,fs=0,25<=s)throw Error(o(301));s+=1,ls=us=null,e.updateQueue=null,is.current=ea,t=r(n,i)}while(hs)}if(is.current=Xs,e=null!==us&&null!==us.next,ss=0,ls=us=as=null,cs=!1,e)throw Error(o(300));return t}function vs(){var t=0!==fs;return fs=0,t}function ys(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ls?as.memoizedState=ls=t:ls=ls.next=t,ls}function ws(){if(null===us){var t=as.alternate;t=null!==t?t.memoizedState:null}else t=us.next;var e=null===ls?as.memoizedState:ls.next;if(null!==e)ls=e,us=t;else{if(null===t)throw Error(o(310));t={memoizedState:(us=t).memoizedState,baseState:us.baseState,baseQueue:us.baseQueue,queue:us.queue,next:null},null===ls?as.memoizedState=ls=t:ls=ls.next=t}return ls}function bs(t,e){return"function"===typeof e?e(t):e}function _s(t){var e=ws(),r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=t;var n=us,i=n.baseQueue,s=r.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(null!==i){s=i.next,n=n.baseState;var u=a=null,l=null,c=s;do{var h=c.lane;if((ss&h)===h)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var f={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(u=l=f,a=n):l=l.next=f,as.lanes|=h,Lu|=h}c=c.next}while(null!==c&&c!==s);null===l?a=n:l.next=u,an(n,e.memoizedState)||(wa=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=l,r.lastRenderedState=n}if(null!==(t=r.interleaved)){i=t;do{s=i.lane,as.lanes|=s,Lu|=s,i=i.next}while(i!==t)}else null===i&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Ms(t){var e=ws(),r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,s=e.memoizedState;if(null!==i){r.pending=null;var a=i=i.next;do{s=t(s,a.action),a=a.next}while(a!==i);an(s,e.memoizedState)||(wa=!0),e.memoizedState=s,null===e.baseQueue&&(e.baseState=s),r.lastRenderedState=s}return[s,n]}function Es(){}function ks(t,e){var r=as,n=ws(),i=e(),s=!an(n.memoizedState,i);if(s&&(n.memoizedState=i,wa=!0),n=n.queue,Ls(Ss.bind(null,r,n,t),[t]),n.getSnapshot!==e||s||null!==ls&&1&ls.memoizedState.tag){if(r.flags|=2048,Ps(9,xs.bind(null,r,n,i,e),void 0,null),null===Cu)throw Error(o(349));0!==(30&ss)||As(r,e,i)}return i}function As(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},null===(e=as.updateQueue)?(e={lastEffect:null,stores:null},as.updateQueue=e,e.stores=[t]):null===(r=e.stores)?e.stores=[t]:r.push(t)}function xs(t,e,r,n){e.value=r,e.getSnapshot=n,Ns(e)&&Cs(t)}function Ss(t,e,r){return r((function(){Ns(e)&&Cs(t)}))}function Ns(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!an(t,r)}catch(n){return!0}}function Cs(t){var e=Bo(t,1);null!==e&&rl(e,t,1,-1)}function Is(t){var e=ys();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:t},e.queue=t,t=t.dispatch=Gs.bind(null,as,t),[e.memoizedState,t]}function Ps(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},null===(e=as.updateQueue)?(e={lastEffect:null,stores:null},as.updateQueue=e,e.lastEffect=t.next=t):null===(r=e.lastEffect)?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t),t}function Rs(){return ws().memoizedState}function Os(t,e,r,n){var i=ys();as.flags|=t,i.memoizedState=Ps(1|e,r,void 0,void 0===n?null:n)}function Ts(t,e,r,n){var i=ws();n=void 0===n?null:n;var o=void 0;if(null!==us){var s=us.memoizedState;if(o=s.destroy,null!==n&&ms(n,s.deps))return void(i.memoizedState=Ps(e,r,o,n))}as.flags|=t,i.memoizedState=Ps(1|e,r,o,n)}function Bs(t,e){return Os(8390656,8,t,e)}function Ls(t,e){return Ts(2048,8,t,e)}function js(t,e){return Ts(4,2,t,e)}function Fs(t,e){return Ts(4,4,t,e)}function Us(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Ds(t,e,r){return r=null!==r&&void 0!==r?r.concat([t]):null,Ts(4,4,Us.bind(null,e,t),r)}function zs(){}function qs(t,e){var r=ws();e=void 0===e?null:e;var n=r.memoizedState;return null!==n&&null!==e&&ms(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Vs(t,e){var r=ws();e=void 0===e?null:e;var n=r.memoizedState;return null!==n&&null!==e&&ms(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function Hs(t,e,r){return 0===(21&ss)?(t.baseState&&(t.baseState=!1,wa=!0),t.memoizedState=r):(an(r,e)||(r=me(),as.lanes|=r,Lu|=r,t.baseState=!0),e)}function Ws(t,e){var r=we;we=0!==r&&4>r?r:4,t(!0);var n=os.transition;os.transition={};try{t(!1),e()}finally{we=r,os.transition=n}}function Ys(){return ws().memoizedState}function Ks(t,e,r){var n=el(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Js(t))Qs(e,r);else if(null!==(r=To(t,e,r,n))){rl(r,t,n,tl()),Zs(r,e,n)}}function Gs(t,e,r){var n=el(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Js(t))Qs(e,i);else{var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var s=e.lastRenderedState,a=o(s,r);if(i.hasEagerState=!0,i.eagerState=a,an(a,s)){var u=e.interleaved;return null===u?(i.next=i,Oo(e)):(i.next=u.next,u.next=i),void(e.interleaved=i)}}catch(l){}null!==(r=To(t,e,i,n))&&(rl(r,t,n,i=tl()),Zs(r,e,n))}}function Js(t){var e=t.alternate;return t===as||null!==e&&e===as}function Qs(t,e){hs=cs=!0;var r=t.pending;null===r?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Zs(t,e,r){if(0!==(4194240&r)){var n=e.lanes;r|=n&=t.pendingLanes,e.lanes=r,ye(t,r)}}var Xs={readContext:Po,useCallback:ps,useContext:ps,useEffect:ps,useImperativeHandle:ps,useInsertionEffect:ps,useLayoutEffect:ps,useMemo:ps,useReducer:ps,useRef:ps,useState:ps,useDebugValue:ps,useDeferredValue:ps,useTransition:ps,useMutableSource:ps,useSyncExternalStore:ps,useId:ps,unstable_isNewReconciler:!1},$s={readContext:Po,useCallback:function(t,e){return ys().memoizedState=[t,void 0===e?null:e],t},useContext:Po,useEffect:Bs,useImperativeHandle:function(t,e,r){return r=null!==r&&void 0!==r?r.concat([t]):null,Os(4194308,4,Us.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Os(4194308,4,t,e)},useInsertionEffect:function(t,e){return Os(4,2,t,e)},useMemo:function(t,e){var r=ys();return e=void 0===e?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ys();return e=void 0!==r?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Ks.bind(null,as,t),[n.memoizedState,t]},useRef:function(t){return t={current:t},ys().memoizedState=t},useState:Is,useDebugValue:zs,useDeferredValue:function(t){return ys().memoizedState=t},useTransition:function(){var t=Is(!1),e=t[0];return t=Ws.bind(null,t[1]),ys().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=as,i=ys();if(io){if(void 0===r)throw Error(o(407));r=r()}else{if(r=e(),null===Cu)throw Error(o(349));0!==(30&ss)||As(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Bs(Ss.bind(null,n,s,t),[t]),n.flags|=2048,Ps(9,xs.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ys(),e=Cu.identifierPrefix;if(io){var r=Zi;e=":"+e+"R"+(r=(Qi&~(1<<32-se(Qi)-1)).toString(32)+r),0<(r=fs++)&&(e+="H"+r.toString(32)),e+=":"}else e=":"+e+"r"+(r=ds++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},ta={readContext:Po,useCallback:qs,useContext:Po,useEffect:Ls,useImperativeHandle:Ds,useInsertionEffect:js,useLayoutEffect:Fs,useMemo:Vs,useReducer:_s,useRef:Rs,useState:function(){return _s(bs)},useDebugValue:zs,useDeferredValue:function(t){return Hs(ws(),us.memoizedState,t)},useTransition:function(){return[_s(bs)[0],ws().memoizedState]},useMutableSource:Es,useSyncExternalStore:ks,useId:Ys,unstable_isNewReconciler:!1},ea={readContext:Po,useCallback:qs,useContext:Po,useEffect:Ls,useImperativeHandle:Ds,useInsertionEffect:js,useLayoutEffect:Fs,useMemo:Vs,useReducer:Ms,useRef:Rs,useState:function(){return Ms(bs)},useDebugValue:zs,useDeferredValue:function(t){var e=ws();return null===us?e.memoizedState=t:Hs(e,us.memoizedState,t)},useTransition:function(){return[Ms(bs)[0],ws().memoizedState]},useMutableSource:Es,useSyncExternalStore:ks,useId:Ys,unstable_isNewReconciler:!1};function ra(t,e){if(t&&t.defaultProps){for(var r in e=j({},e),t=t.defaultProps)void 0===e[r]&&(e[r]=t[r]);return e}return e}function na(t,e,r,n){r=null===(r=r(n,e=t.memoizedState))||void 0===r?e:j({},e,r),t.memoizedState=r,0===t.lanes&&(t.updateQueue.baseState=r)}var ia={isMounted:function(t){return!!(t=t._reactInternals)&&qt(t)===t},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=tl(),i=el(t),o=Uo(n,i);o.payload=e,void 0!==r&&null!==r&&(o.callback=r),null!==(e=Do(t,o,i))&&(rl(e,t,i,n),zo(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=tl(),i=el(t),o=Uo(n,i);o.tag=1,o.payload=e,void 0!==r&&null!==r&&(o.callback=r),null!==(e=Do(t,o,i))&&(rl(e,t,i,n),zo(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=tl(),n=el(t),i=Uo(r,n);i.tag=2,void 0!==e&&null!==e&&(i.callback=e),null!==(e=Do(t,i,n))&&(rl(e,t,n,r),zo(e,t,n))}};function oa(t,e,r,n,i,o,s){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(n,o,s):!e.prototype||!e.prototype.isPureReactComponent||(!un(r,n)||!un(i,o))}function sa(t,e,r){var n=!1,i=Si,o=e.contextType;return"object"===typeof o&&null!==o?o=Po(o):(i=Ri(e)?Ii:Ni.current,o=(n=null!==(n=e.contextTypes)&&void 0!==n)?Pi(t,i):Si),e=new e(r,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=ia,t.stateNode=e,e._reactInternals=t,n&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function aa(t,e,r,n){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(r,n),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&ia.enqueueReplaceState(e,e.state,null)}function ua(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},jo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=Po(o):(o=Ri(e)?Ii:Ni.current,i.context=Pi(t,o)),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(na(t,e,o,r),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&ia.enqueueReplaceState(i,i.state,null),Vo(t,r,i,n),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.flags|=4194308)}function la(t,e){try{var r="",n=e;do{r+=z(n),n=n.return}while(n);var i=r}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:t,source:e,stack:i,digest:null}}function ca(t,e,r){return{value:t,source:null,stack:null!=r?r:null,digest:null!=e?e:null}}function ha(t,e){try{console.error(e.value)}catch(r){setTimeout((function(){throw r}))}}var fa="function"===typeof WeakMap?WeakMap:Map;function da(t,e,r){(r=Uo(-1,r)).tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Hu||(Hu=!0,Wu=n),ha(0,e)},r}function pa(t,e,r){(r=Uo(-1,r)).tag=3;var n=t.type.getDerivedStateFromError;if("function"===typeof n){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){ha(0,e)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){ha(0,e),"function"!==typeof n&&(null===Yu?Yu=new Set([this]):Yu.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),r}function ma(t,e,r){var n=t.pingCache;if(null===n){n=t.pingCache=new fa;var i=new Set;n.set(e,i)}else void 0===(i=n.get(e))&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=Al.bind(null,t,e,r),e.then(t,t))}function ga(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function va(t,e,r,n,i){return 0===(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((e=Uo(-1,1)).tag=2,Do(r,e,1))),r.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var ya=b.ReactCurrentOwner,wa=!1;function ba(t,e,r,n){e.child=null===t?Mo(e,null,r,n):_o(e,t.child,r,n)}function _a(t,e,r,n,i){r=r.render;var o=e.ref;return Io(e,i),n=gs(t,e,r,n,o,i),r=vs(),null===t||wa?(io&&r&&to(e),e.flags|=1,ba(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ha(t,e,i))}function Ma(t,e,r,n,i){if(null===t){var o=r.type;return"function"!==typeof o||Rl(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((t=Tl(r.type,null,n,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,Ea(t,e,o,n,i))}if(o=t.child,0===(t.lanes&i)){var s=o.memoizedProps;if((r=null!==(r=r.compare)?r:un)(s,n)&&t.ref===e.ref)return Ha(t,e,i)}return e.flags|=1,(t=Ol(o,n)).ref=e.ref,t.return=e,e.child=t}function Ea(t,e,r,n,i){if(null!==t){var o=t.memoizedProps;if(un(o,n)&&t.ref===e.ref){if(wa=!1,e.pendingProps=n=o,0===(t.lanes&i))return e.lanes=t.lanes,Ha(t,e,i);0!==(131072&t.flags)&&(wa=!0)}}return xa(t,e,r,n,i)}function ka(t,e,r){var n=e.pendingProps,i=n.children,o=null!==t?t.memoizedState:null;if("hidden"===n.mode)if(0===(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},xi(Ou,Ru),Ru|=r;else{if(0===(1073741824&r))return t=null!==o?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,xi(Ou,Ru),Ru|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==o?o.baseLanes:r,xi(Ou,Ru),Ru|=n}else null!==o?(n=o.baseLanes|r,e.memoizedState=null):n=r,xi(Ou,Ru),Ru|=n;return ba(t,e,i,r),e.child}function Aa(t,e){var r=e.ref;(null===t&&null!==r||null!==t&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function xa(t,e,r,n,i){var o=Ri(r)?Ii:Ni.current;return o=Pi(e,o),Io(e,i),r=gs(t,e,r,n,o,i),n=vs(),null===t||wa?(io&&n&&to(e),e.flags|=1,ba(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ha(t,e,i))}function Sa(t,e,r,n,i){if(Ri(r)){var o=!0;Li(e)}else o=!1;if(Io(e,i),null===e.stateNode)Va(t,e),sa(e,r,n),ua(e,r,n,i),n=!0;else if(null===t){var s=e.stateNode,a=e.memoizedProps;s.props=a;var u=s.context,l=r.contextType;"object"===typeof l&&null!==l?l=Po(l):l=Pi(e,l=Ri(r)?Ii:Ni.current);var c=r.getDerivedStateFromProps,h="function"===typeof c||"function"===typeof s.getSnapshotBeforeUpdate;h||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==n||u!==l)&&aa(e,s,n,l),Lo=!1;var f=e.memoizedState;s.state=f,Vo(e,n,s,i),u=e.memoizedState,a!==n||f!==u||Ci.current||Lo?("function"===typeof c&&(na(e,r,c,n),u=e.memoizedState),(a=Lo||oa(e,r,a,n,f,u,l))?(h||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(e.flags|=4194308)):("function"===typeof s.componentDidMount&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=u),s.props=n,s.state=u,s.context=l,n=a):("function"===typeof s.componentDidMount&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,Fo(t,e),a=e.memoizedProps,l=e.type===e.elementType?a:ra(e.type,a),s.props=l,h=e.pendingProps,f=s.context,"object"===typeof(u=r.contextType)&&null!==u?u=Po(u):u=Pi(e,u=Ri(r)?Ii:Ni.current);var d=r.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==h||f!==u)&&aa(e,s,n,u),Lo=!1,f=e.memoizedState,s.state=f,Vo(e,n,s,i);var p=e.memoizedState;a!==h||f!==p||Ci.current||Lo?("function"===typeof d&&(na(e,r,d,n),p=e.memoizedState),(l=Lo||oa(e,r,l,n,f,p,u)||!1)?(c||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(n,p,u),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(n,p,u)),"function"===typeof s.componentDidUpdate&&(e.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),s.props=n,s.state=p,s.context=u,n=l):("function"!==typeof s.componentDidUpdate||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return Na(t,e,r,n,o,i)}function Na(t,e,r,n,i,o){Aa(t,e);var s=0!==(128&e.flags);if(!n&&!s)return i&&ji(e,r,!1),Ha(t,e,o);n=e.stateNode,ya.current=e;var a=s&&"function"!==typeof r.getDerivedStateFromError?null:n.render();return e.flags|=1,null!==t&&s?(e.child=_o(e,t.child,null,o),e.child=_o(e,null,a,o)):ba(t,e,a,o),e.memoizedState=n.state,i&&ji(e,r,!0),e.child}function Ca(t){var e=t.stateNode;e.pendingContext?Ti(0,e.pendingContext,e.pendingContext!==e.context):e.context&&Ti(0,e.context,!1),Qo(t,e.containerInfo)}function Ia(t,e,r,n,i){return po(),mo(i),e.flags|=256,ba(t,e,r,n),e.child}var Pa,Ra,Oa,Ta,Ba={dehydrated:null,treeContext:null,retryLane:0};function La(t){return{baseLanes:t,cachePool:null,transitions:null}}function ja(t,e,r){var n,i=e.pendingProps,s=ts.current,a=!1,u=0!==(128&e.flags);if((n=u)||(n=(null===t||null!==t.memoizedState)&&0!==(2&s)),n?(a=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(s|=1),xi(ts,1&s),null===t)return lo(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0===(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=1073741824,null):(u=i.children,t=i.fallback,a?(i=e.mode,a=e.child,u={mode:"hidden",children:u},0===(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=u):a=Ll(u,i,0,null),t=Bl(t,i,r,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=La(r),e.memoizedState=Ba,t):Fa(e,u));if(null!==(s=t.memoizedState)&&null!==(n=s.dehydrated))return function(t,e,r,n,i,s,a){if(r)return 256&e.flags?(e.flags&=-257,Ua(t,e,a,n=ca(Error(o(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=Ll({mode:"visible",children:n.children},i,0,null),(s=Bl(s,i,a,null)).flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,0!==(1&e.mode)&&_o(e,t.child,null,a),e.child.memoizedState=La(a),e.memoizedState=Ba,s);if(0===(1&e.mode))return Ua(t,e,a,null);if("$!"===i.data){if(n=i.nextSibling&&i.nextSibling.dataset)var u=n.dgst;return n=u,Ua(t,e,a,n=ca(s=Error(o(419)),n,void 0))}if(u=0!==(a&t.childLanes),wa||u){if(null!==(n=Cu)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(n.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Bo(t,i),rl(n,t,i,-1))}return ml(),Ua(t,e,a,n=ca(Error(o(421))))}return"$?"===i.data?(e.flags|=128,e.child=t.child,e=Sl.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,no=li(i.nextSibling),ro=e,io=!0,oo=null,null!==t&&(Ki[Gi++]=Qi,Ki[Gi++]=Zi,Ki[Gi++]=Ji,Qi=t.id,Zi=t.overflow,Ji=e),e=Fa(e,n.children),e.flags|=4096,e)}(t,e,u,i,n,s,r);if(a){a=i.fallback,u=e.mode,n=(s=t.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&u)&&e.child!==s?((i=e.child).childLanes=0,i.pendingProps=l,e.deletions=null):(i=Ol(s,l)).subtreeFlags=14680064&s.subtreeFlags,null!==n?a=Ol(n,a):(a=Bl(a,u,r,null)).flags|=2,a.return=e,i.return=e,i.sibling=a,e.child=i,i=a,a=e.child,u=null===(u=t.child.memoizedState)?La(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},a.memoizedState=u,a.childLanes=t.childLanes&~r,e.memoizedState=Ba,i}return t=(a=t.child).sibling,i=Ol(a,{mode:"visible",children:i.children}),0===(1&e.mode)&&(i.lanes=r),i.return=e,i.sibling=null,null!==t&&(null===(r=e.deletions)?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=i,e.memoizedState=null,i}function Fa(t,e){return(e=Ll({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function Ua(t,e,r,n){return null!==n&&mo(n),_o(e,t.child,null,r),(t=Fa(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function Da(t,e,r){t.lanes|=e;var n=t.alternate;null!==n&&(n.lanes|=e),Co(t.return,e,r)}function za(t,e,r,n,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function qa(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(ba(t,e,n.children,r),0!==(2&(n=ts.current)))n=1&n|2,e.flags|=128;else{if(null!==t&&0!==(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Da(t,r,e);else if(19===t.tag)Da(t,r,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(xi(ts,n),0===(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;null!==r;)null!==(t=r.alternate)&&null===es(t)&&(i=r),r=r.sibling;null===(r=i)?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),za(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===es(t)){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}za(e,!0,r,null,o);break;case"together":za(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Va(t,e){0===(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ha(t,e,r){if(null!==t&&(e.dependencies=t.dependencies),Lu|=e.lanes,0===(r&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(o(153));if(null!==e.child){for(r=Ol(t=e.child,t.pendingProps),e.child=r,r.return=e;null!==t.sibling;)t=t.sibling,(r=r.sibling=Ol(t,t.pendingProps)).return=e;r.sibling=null}return e.child}function Wa(t,e){if(!io)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;null!==e;)null!==e.alternate&&(r=e),e=e.sibling;null===r?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?e||null===t.tail?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Ya(t){var e=null!==t.alternate&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;null!==i;)r|=i.lanes|i.childLanes,n|=14680064&i.subtreeFlags,n|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function Ka(t,e,r){var n=e.pendingProps;switch(eo(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ya(e),null;case 1:case 17:return Ri(e.type)&&Oi(),Ya(e),null;case 3:return n=e.stateNode,Zo(),Ai(Ci),Ai(Ni),ns(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||(ho(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0===(256&e.flags)||(e.flags|=1024,null!==oo&&(sl(oo),oo=null))),Ra(t,e),Ya(e),null;case 5:$o(e);var i=Jo(Go.current);if(r=e.type,null!==t&&null!=e.stateNode)Oa(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(null===e.stateNode)throw Error(o(166));return Ya(e),null}if(t=Jo(Yo.current),ho(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[fi]=e,n[di]=s,t=0!==(1&e.mode),r){case"dialog":Un("cancel",n),Un("close",n);break;case"iframe":case"object":case"embed":Un("load",n);break;case"video":case"audio":for(i=0;i<Bn.length;i++)Un(Bn[i],n);break;case"source":Un("error",n);break;case"img":case"image":case"link":Un("error",n),Un("load",n);break;case"details":Un("toggle",n);break;case"input":Q(n,s),Un("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Un("invalid",n);break;case"textarea":it(n,s),Un("invalid",n)}for(var u in yt(r,s),i=null,s)if(s.hasOwnProperty(u)){var l=s[u];"children"===u?"string"===typeof l?n.textContent!==l&&(!0!==s.suppressHydrationWarning&&Xn(n.textContent,l,t),i=["children",l]):"number"===typeof l&&n.textContent!==""+l&&(!0!==s.suppressHydrationWarning&&Xn(n.textContent,l,t),i=["children",""+l]):a.hasOwnProperty(u)&&null!=l&&"onScroll"===u&&Un("scroll",n)}switch(r){case"input":Y(n),$(n,s,!0);break;case"textarea":Y(n),st(n);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(n.onclick=$n)}n=i,e.updateQueue=n,null!==n&&(e.flags|=4)}else{u=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===t&&(t=at(r)),"http://www.w3.org/1999/xhtml"===t?"script"===r?((t=u.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof n.is?t=u.createElement(r,{is:n.is}):(t=u.createElement(r),"select"===r&&(u=t,n.multiple?u.multiple=!0:n.size&&(u.size=n.size))):t=u.createElementNS(t,r),t[fi]=e,t[di]=n,Pa(t,e,!1,!1),e.stateNode=t;t:{switch(u=wt(r,n),r){case"dialog":Un("cancel",t),Un("close",t),i=n;break;case"iframe":case"object":case"embed":Un("load",t),i=n;break;case"video":case"audio":for(i=0;i<Bn.length;i++)Un(Bn[i],t);i=n;break;case"source":Un("error",t),i=n;break;case"img":case"image":case"link":Un("error",t),Un("load",t),i=n;break;case"details":Un("toggle",t),i=n;break;case"input":Q(t,n),i=J(t,n),Un("invalid",t);break;case"option":default:i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=j({},n,{value:void 0}),Un("invalid",t);break;case"textarea":it(t,n),i=nt(t,n),Un("invalid",t)}for(s in yt(r,i),l=i)if(l.hasOwnProperty(s)){var c=l[s];"style"===s?gt(t,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&ht(t,c):"children"===s?"string"===typeof c?("textarea"!==r||""!==c)&&ft(t,c):"number"===typeof c&&ft(t,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Un("scroll",t):null!=c&&w(t,s,c,u))}switch(r){case"input":Y(t),$(t,n,!1);break;case"textarea":Y(t),st(t);break;case"option":null!=n.value&&t.setAttribute("value",""+H(n.value));break;case"select":t.multiple=!!n.multiple,null!=(s=n.value)?rt(t,!!n.multiple,s,!1):null!=n.defaultValue&&rt(t,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(t.onclick=$n)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}}n&&(e.flags|=4)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return Ya(e),null;case 6:if(t&&null!=e.stateNode)Ta(t,e,t.memoizedProps,n);else{if("string"!==typeof n&&null===e.stateNode)throw Error(o(166));if(r=Jo(Go.current),Jo(Yo.current),ho(e)){if(n=e.stateNode,r=e.memoizedProps,n[fi]=e,(s=n.nodeValue!==r)&&null!==(t=ro))switch(t.tag){case 3:Xn(n.nodeValue,r,0!==(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&Xn(n.nodeValue,r,0!==(1&t.mode))}s&&(e.flags|=4)}else(n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[fi]=e,e.stateNode=n}return Ya(e),null;case 13:if(Ai(ts),n=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(io&&null!==no&&0!==(1&e.mode)&&0===(128&e.flags))fo(),po(),e.flags|=98560,s=!1;else if(s=ho(e),null!==n&&null!==n.dehydrated){if(null===t){if(!s)throw Error(o(318));if(!(s=null!==(s=e.memoizedState)?s.dehydrated:null))throw Error(o(317));s[fi]=e}else po(),0===(128&e.flags)&&(e.memoizedState=null),e.flags|=4;Ya(e),s=!1}else null!==oo&&(sl(oo),oo=null),s=!0;if(!s)return 65536&e.flags?e:null}return 0!==(128&e.flags)?(e.lanes=r,e):((n=null!==n)!==(null!==t&&null!==t.memoizedState)&&n&&(e.child.flags|=8192,0!==(1&e.mode)&&(null===t||0!==(1&ts.current)?0===Tu&&(Tu=3):ml())),null!==e.updateQueue&&(e.flags|=4),Ya(e),null);case 4:return Zo(),Ra(t,e),null===t&&qn(e.stateNode.containerInfo),Ya(e),null;case 10:return No(e.type._context),Ya(e),null;case 19:if(Ai(ts),null===(s=e.memoizedState))return Ya(e),null;if(n=0!==(128&e.flags),null===(u=s.rendering))if(n)Wa(s,!1);else{if(0!==Tu||null!==t&&0!==(128&t.flags))for(t=e.child;null!==t;){if(null!==(u=es(t))){for(e.flags|=128,Wa(s,!1),null!==(n=u.updateQueue)&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;null!==r;)t=n,(s=r).flags&=14680066,null===(u=s.alternate)?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,t=u.dependencies,s.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return xi(ts,1&ts.current|2),e.child}t=t.sibling}null!==s.tail&&Zt()>qu&&(e.flags|=128,n=!0,Wa(s,!1),e.lanes=4194304)}else{if(!n)if(null!==(t=es(u))){if(e.flags|=128,n=!0,null!==(r=t.updateQueue)&&(e.updateQueue=r,e.flags|=4),Wa(s,!0),null===s.tail&&"hidden"===s.tailMode&&!u.alternate&&!io)return Ya(e),null}else 2*Zt()-s.renderingStartTime>qu&&1073741824!==r&&(e.flags|=128,n=!0,Wa(s,!1),e.lanes=4194304);s.isBackwards?(u.sibling=e.child,e.child=u):(null!==(r=s.last)?r.sibling=u:e.child=u,s.last=u)}return null!==s.tail?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Zt(),e.sibling=null,r=ts.current,xi(ts,n?1&r|2:1&r),e):(Ya(e),null);case 22:case 23:return hl(),n=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==n&&(e.flags|=8192),n&&0!==(1&e.mode)?0!==(1073741824&Ru)&&(Ya(e),6&e.subtreeFlags&&(e.flags|=8192)):Ya(e),null;case 24:case 25:return null}throw Error(o(156,e.tag))}function Ga(t,e){switch(eo(e),e.tag){case 1:return Ri(e.type)&&Oi(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return Zo(),Ai(Ci),Ai(Ni),ns(),0!==(65536&(t=e.flags))&&0===(128&t)?(e.flags=-65537&t|128,e):null;case 5:return $o(e),null;case 13:if(Ai(ts),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(o(340));po()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return Ai(ts),null;case 4:return Zo(),null;case 10:return No(e.type._context),null;case 22:case 23:return hl(),null;default:return null}}Pa=function(t,e){for(var r=e.child;null!==r;){if(5===r.tag||6===r.tag)t.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ra=function(){},Oa=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Jo(Yo.current);var o,s=null;switch(r){case"input":i=J(t,i),n=J(t,n),s=[];break;case"select":i=j({},i,{value:void 0}),n=j({},n,{value:void 0}),s=[];break;case"textarea":i=nt(t,i),n=nt(t,n),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof n.onClick&&(t.onclick=$n)}for(c in yt(r,n),r=null,i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var u=i[c];for(o in u)u.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(a.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(u=null!=i?i[c]:void 0,n.hasOwnProperty(c)&&l!==u&&(null!=l||null!=u))if("style"===c)if(u){for(o in u)!u.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&u[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(c,r)),r=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(s=s||[]).push(c,l)):"children"===c?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(a.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Un("scroll",t),s||u===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(e.updateQueue=c)&&(e.flags|=4)}},Ta=function(t,e,r,n){r!==n&&(e.flags|=4)};var Ja=!1,Qa=!1,Za="function"===typeof WeakSet?WeakSet:Set,Xa=null;function $a(t,e){var r=t.ref;if(null!==r)if("function"===typeof r)try{r(null)}catch(n){kl(t,e,n)}else r.current=null}function tu(t,e,r){try{r()}catch(n){kl(t,e,n)}}var eu=!1;function ru(t,e,r){var n=e.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,void 0!==o&&tu(e,r,o)}i=i.next}while(i!==n)}}function nu(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function iu(t){var e=t.ref;if(null!==e){var r=t.stateNode;t.tag,t=r,"function"===typeof e?e(t):e.current=t}}function ou(t){var e=t.alternate;null!==e&&(t.alternate=null,ou(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&(null!==(e=t.stateNode)&&(delete e[fi],delete e[di],delete e[mi],delete e[gi],delete e[vi])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function su(t){return 5===t.tag||3===t.tag||4===t.tag}function au(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||su(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function uu(t,e,r){var n=t.tag;if(5===n||6===n)t=t.stateNode,e?8===r.nodeType?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(8===r.nodeType?(e=r.parentNode).insertBefore(t,r):(e=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==e.onclick||(e.onclick=$n));else if(4!==n&&null!==(t=t.child))for(uu(t,e,r),t=t.sibling;null!==t;)uu(t,e,r),t=t.sibling}function lu(t,e,r){var n=t.tag;if(5===n||6===n)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(4!==n&&null!==(t=t.child))for(lu(t,e,r),t=t.sibling;null!==t;)lu(t,e,r),t=t.sibling}var cu=null,hu=!1;function fu(t,e,r){for(r=r.child;null!==r;)du(t,e,r),r=r.sibling}function du(t,e,r){if(oe&&"function"===typeof oe.onCommitFiberUnmount)try{oe.onCommitFiberUnmount(ie,r)}catch(a){}switch(r.tag){case 5:Qa||$a(r,e);case 6:var n=cu,i=hu;cu=null,fu(t,e,r),hu=i,null!==(cu=n)&&(hu?(t=cu,r=r.stateNode,8===t.nodeType?t.parentNode.removeChild(r):t.removeChild(r)):cu.removeChild(r.stateNode));break;case 18:null!==cu&&(hu?(t=cu,r=r.stateNode,8===t.nodeType?ui(t.parentNode,r):1===t.nodeType&&ui(t,r),qe(t)):ui(cu,r.stateNode));break;case 4:n=cu,i=hu,cu=r.stateNode.containerInfo,hu=!0,fu(t,e,r),cu=n,hu=i;break;case 0:case 11:case 14:case 15:if(!Qa&&(null!==(n=r.updateQueue)&&null!==(n=n.lastEffect))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!==(2&o)||0!==(4&o))&&tu(r,e,s),i=i.next}while(i!==n)}fu(t,e,r);break;case 1:if(!Qa&&($a(r,e),"function"===typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){kl(r,e,a)}fu(t,e,r);break;case 21:fu(t,e,r);break;case 22:1&r.mode?(Qa=(n=Qa)||null!==r.memoizedState,fu(t,e,r),Qa=n):fu(t,e,r);break;default:fu(t,e,r)}}function pu(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var r=t.stateNode;null===r&&(r=t.stateNode=new Za),e.forEach((function(e){var n=Nl.bind(null,t,e);r.has(e)||(r.add(e),e.then(n,n))}))}}function mu(t,e){var r=e.deletions;if(null!==r)for(var n=0;n<r.length;n++){var i=r[n];try{var s=t,a=e,u=a;t:for(;null!==u;){switch(u.tag){case 5:cu=u.stateNode,hu=!1;break t;case 3:case 4:cu=u.stateNode.containerInfo,hu=!0;break t}u=u.return}if(null===cu)throw Error(o(160));du(s,a,i),cu=null,hu=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(c){kl(i,e,c)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)gu(e,t),e=e.sibling}function gu(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(mu(e,t),vu(t),4&n){try{ru(3,t,t.return),nu(3,t)}catch(g){kl(t,t.return,g)}try{ru(5,t,t.return)}catch(g){kl(t,t.return,g)}}break;case 1:mu(e,t),vu(t),512&n&&null!==r&&$a(r,r.return);break;case 5:if(mu(e,t),vu(t),512&n&&null!==r&&$a(r,r.return),32&t.flags){var i=t.stateNode;try{ft(i,"")}catch(g){kl(t,t.return,g)}}if(4&n&&null!=(i=t.stateNode)){var s=t.memoizedProps,a=null!==r?r.memoizedProps:s,u=t.type,l=t.updateQueue;if(t.updateQueue=null,null!==l)try{"input"===u&&"radio"===s.type&&null!=s.name&&Z(i,s),wt(u,a);var c=wt(u,s);for(a=0;a<l.length;a+=2){var h=l[a],f=l[a+1];"style"===h?gt(i,f):"dangerouslySetInnerHTML"===h?ht(i,f):"children"===h?ft(i,f):w(i,h,f,c)}switch(u){case"input":X(i,s);break;case"textarea":ot(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?rt(i,!!s.multiple,p,!1):d!==!!s.multiple&&(null!=s.defaultValue?rt(i,!!s.multiple,s.defaultValue,!0):rt(i,!!s.multiple,s.multiple?[]:"",!1))}i[di]=s}catch(g){kl(t,t.return,g)}}break;case 6:if(mu(e,t),vu(t),4&n){if(null===t.stateNode)throw Error(o(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(g){kl(t,t.return,g)}}break;case 3:if(mu(e,t),vu(t),4&n&&null!==r&&r.memoizedState.isDehydrated)try{qe(e.containerInfo)}catch(g){kl(t,t.return,g)}break;case 4:default:mu(e,t),vu(t);break;case 13:mu(e,t),vu(t),8192&(i=t.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||(zu=Zt())),4&n&&pu(t);break;case 22:if(h=null!==r&&null!==r.memoizedState,1&t.mode?(Qa=(c=Qa)||h,mu(e,t),Qa=c):mu(e,t),vu(t),8192&n){if(c=null!==t.memoizedState,(t.stateNode.isHidden=c)&&!h&&0!==(1&t.mode))for(Xa=t,h=t.child;null!==h;){for(f=Xa=h;null!==Xa;){switch(p=(d=Xa).child,d.tag){case 0:case 11:case 14:case 15:ru(4,d,d.return);break;case 1:$a(d,d.return);var m=d.stateNode;if("function"===typeof m.componentWillUnmount){n=d,r=d.return;try{e=n,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(g){kl(n,r,g)}}break;case 5:$a(d,d.return);break;case 22:if(null!==d.memoizedState){_u(f);continue}}null!==p?(p.return=d,Xa=p):_u(f)}h=h.sibling}t:for(h=null,f=t;;){if(5===f.tag){if(null===h){h=f;try{i=f.stateNode,c?"function"===typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(u=f.stateNode,a=void 0!==(l=f.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,u.style.display=mt("display",a))}catch(g){kl(t,t.return,g)}}}else if(6===f.tag){if(null===h)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){kl(t,t.return,g)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===t)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===t)break t;for(;null===f.sibling;){if(null===f.return||f.return===t)break t;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:mu(e,t),vu(t),4&n&&pu(t);case 21:}}function vu(t){var e=t.flags;if(2&e){try{t:{for(var r=t.return;null!==r;){if(su(r)){var n=r;break t}r=r.return}throw Error(o(160))}switch(n.tag){case 5:var i=n.stateNode;32&n.flags&&(ft(i,""),n.flags&=-33),lu(t,au(t),i);break;case 3:case 4:var s=n.stateNode.containerInfo;uu(t,au(t),s);break;default:throw Error(o(161))}}catch(a){kl(t,t.return,a)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function yu(t,e,r){Xa=t,wu(t,e,r)}function wu(t,e,r){for(var n=0!==(1&t.mode);null!==Xa;){var i=Xa,o=i.child;if(22===i.tag&&n){var s=null!==i.memoizedState||Ja;if(!s){var a=i.alternate,u=null!==a&&null!==a.memoizedState||Qa;a=Ja;var l=Qa;if(Ja=s,(Qa=u)&&!l)for(Xa=i;null!==Xa;)u=(s=Xa).child,22===s.tag&&null!==s.memoizedState?Mu(i):null!==u?(u.return=s,Xa=u):Mu(i);for(;null!==o;)Xa=o,wu(o,e,r),o=o.sibling;Xa=i,Ja=a,Qa=l}bu(t)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Xa=o):bu(t)}}function bu(t){for(;null!==Xa;){var e=Xa;if(0!==(8772&e.flags)){var r=e.alternate;try{if(0!==(8772&e.flags))switch(e.tag){case 0:case 11:case 15:Qa||nu(5,e);break;case 1:var n=e.stateNode;if(4&e.flags&&!Qa)if(null===r)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:ra(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;null!==s&&Ho(e,s,n);break;case 3:var a=e.updateQueue;if(null!==a){if(r=null,null!==e.child)switch(e.child.tag){case 5:case 1:r=e.child.stateNode}Ho(e,a,r)}break;case 5:var u=e.stateNode;if(null===r&&4&e.flags){r=u;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===e.memoizedState){var c=e.alternate;if(null!==c){var h=c.memoizedState;if(null!==h){var f=h.dehydrated;null!==f&&qe(f)}}}break;default:throw Error(o(163))}Qa||512&e.flags&&iu(e)}catch(d){kl(e,e.return,d)}}if(e===t){Xa=null;break}if(null!==(r=e.sibling)){r.return=e.return,Xa=r;break}Xa=e.return}}function _u(t){for(;null!==Xa;){var e=Xa;if(e===t){Xa=null;break}var r=e.sibling;if(null!==r){r.return=e.return,Xa=r;break}Xa=e.return}}function Mu(t){for(;null!==Xa;){var e=Xa;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{nu(4,e)}catch(u){kl(e,r,u)}break;case 1:var n=e.stateNode;if("function"===typeof n.componentDidMount){var i=e.return;try{n.componentDidMount()}catch(u){kl(e,i,u)}}var o=e.return;try{iu(e)}catch(u){kl(e,o,u)}break;case 5:var s=e.return;try{iu(e)}catch(u){kl(e,s,u)}}}catch(u){kl(e,e.return,u)}if(e===t){Xa=null;break}var a=e.sibling;if(null!==a){a.return=e.return,Xa=a;break}Xa=e.return}}var Eu,ku=Math.ceil,Au=b.ReactCurrentDispatcher,xu=b.ReactCurrentOwner,Su=b.ReactCurrentBatchConfig,Nu=0,Cu=null,Iu=null,Pu=0,Ru=0,Ou=ki(0),Tu=0,Bu=null,Lu=0,ju=0,Fu=0,Uu=null,Du=null,zu=0,qu=1/0,Vu=null,Hu=!1,Wu=null,Yu=null,Ku=!1,Gu=null,Ju=0,Qu=0,Zu=null,Xu=-1,$u=0;function tl(){return 0!==(6&Nu)?Zt():-1!==Xu?Xu:Xu=Zt()}function el(t){return 0===(1&t.mode)?1:0!==(2&Nu)&&0!==Pu?Pu&-Pu:null!==go.transition?(0===$u&&($u=me()),$u):0!==(t=we)?t:t=void 0===(t=window.event)?16:Qe(t.type)}function rl(t,e,r,n){if(50<Qu)throw Qu=0,Zu=null,Error(o(185));ve(t,r,n),0!==(2&Nu)&&t===Cu||(t===Cu&&(0===(2&Nu)&&(ju|=r),4===Tu&&al(t,Pu)),nl(t,n),1===r&&0===Nu&&0===(1&e.mode)&&(qu=Zt()+500,Ui&&qi()))}function nl(t,e){var r=t.callbackNode;!function(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-se(o),a=1<<s,u=i[s];-1===u?0!==(a&r)&&0===(a&n)||(i[s]=de(a,e)):u<=e&&(t.expiredLanes|=a),o&=~a}}(t,e);var n=fe(t,t===Cu?Pu:0);if(0===n)null!==r&&Gt(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(null!=r&&Gt(r),1===e)0===t.tag?function(t){Ui=!0,zi(t)}(ul.bind(null,t)):zi(ul.bind(null,t)),si((function(){0===(6&Nu)&&qi()})),r=null;else{switch(be(n)){case 1:r=$t;break;case 4:r=te;break;case 16:default:r=ee;break;case 536870912:r=ne}r=Cl(r,il.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function il(t,e){if(Xu=-1,$u=0,0!==(6&Nu))throw Error(o(327));var r=t.callbackNode;if(Ml()&&t.callbackNode!==r)return null;var n=fe(t,t===Cu?Pu:0);if(0===n)return null;if(0!==(30&n)||0!==(n&t.expiredLanes)||e)e=gl(t,n);else{e=n;var i=Nu;Nu|=2;var s=pl();for(Cu===t&&Pu===e||(Vu=null,qu=Zt()+500,fl(t,e));;)try{yl();break}catch(u){dl(t,u)}So(),Au.current=s,Nu=i,null!==Iu?e=0:(Cu=null,Pu=0,e=Tu)}if(0!==e){if(2===e&&(0!==(i=pe(t))&&(n=i,e=ol(t,i))),1===e)throw r=Bu,fl(t,0),al(t,n),nl(t,Zt()),r;if(6===e)al(t,n);else{if(i=t.current.alternate,0===(30&n)&&!function(t){for(var e=t;;){if(16384&e.flags){var r=e.updateQueue;if(null!==r&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!an(o(),i))return!1}catch(a){return!1}}}if(r=e.child,16384&e.subtreeFlags&&null!==r)r.return=e,e=r;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(i)&&(2===(e=gl(t,n))&&(0!==(s=pe(t))&&(n=s,e=ol(t,s))),1===e))throw r=Bu,fl(t,0),al(t,n),nl(t,Zt()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(o(345));case 2:case 5:_l(t,Du,Vu);break;case 3:if(al(t,n),(130023424&n)===n&&10<(e=zu+500-Zt())){if(0!==fe(t,0))break;if(((i=t.suspendedLanes)&n)!==n){tl(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=ni(_l.bind(null,t,Du,Vu),e);break}_l(t,Du,Vu);break;case 4:if(al(t,n),(4194240&n)===n)break;for(e=t.eventTimes,i=-1;0<n;){var a=31-se(n);s=1<<a,(a=e[a])>i&&(i=a),n&=~s}if(n=i,10<(n=(120>(n=Zt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ku(n/1960))-n)){t.timeoutHandle=ni(_l.bind(null,t,Du,Vu),n);break}_l(t,Du,Vu);break;default:throw Error(o(329))}}}return nl(t,Zt()),t.callbackNode===r?il.bind(null,t):null}function ol(t,e){var r=Uu;return t.current.memoizedState.isDehydrated&&(fl(t,e).flags|=256),2!==(t=gl(t,e))&&(e=Du,Du=r,null!==e&&sl(e)),t}function sl(t){null===Du?Du=t:Du.push.apply(Du,t)}function al(t,e){for(e&=~Fu,e&=~ju,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-se(e),n=1<<r;t[r]=-1,e&=~n}}function ul(t){if(0!==(6&Nu))throw Error(o(327));Ml();var e=fe(t,0);if(0===(1&e))return nl(t,Zt()),null;var r=gl(t,e);if(0!==t.tag&&2===r){var n=pe(t);0!==n&&(e=n,r=ol(t,n))}if(1===r)throw r=Bu,fl(t,0),al(t,e),nl(t,Zt()),r;if(6===r)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,_l(t,Du,Vu),nl(t,Zt()),null}function ll(t,e){var r=Nu;Nu|=1;try{return t(e)}finally{0===(Nu=r)&&(qu=Zt()+500,Ui&&qi())}}function cl(t){null!==Gu&&0===Gu.tag&&0===(6&Nu)&&Ml();var e=Nu;Nu|=1;var r=Su.transition,n=we;try{if(Su.transition=null,we=1,t)return t()}finally{we=n,Su.transition=r,0===(6&(Nu=e))&&qi()}}function hl(){Ru=Ou.current,Ai(Ou)}function fl(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(-1!==r&&(t.timeoutHandle=-1,ii(r)),null!==Iu)for(r=Iu.return;null!==r;){var n=r;switch(eo(n),n.tag){case 1:null!==(n=n.type.childContextTypes)&&void 0!==n&&Oi();break;case 3:Zo(),Ai(Ci),Ai(Ni),ns();break;case 5:$o(n);break;case 4:Zo();break;case 13:case 19:Ai(ts);break;case 10:No(n.type._context);break;case 22:case 23:hl()}r=r.return}if(Cu=t,Iu=t=Ol(t.current,null),Pu=Ru=e,Tu=0,Bu=null,Fu=ju=Lu=0,Du=Uu=null,null!==Ro){for(e=0;e<Ro.length;e++)if(null!==(n=(r=Ro[e]).interleaved)){r.interleaved=null;var i=n.next,o=r.pending;if(null!==o){var s=o.next;o.next=i,n.next=s}r.pending=n}Ro=null}return t}function dl(t,e){for(;;){var r=Iu;try{if(So(),is.current=Xs,cs){for(var n=as.memoizedState;null!==n;){var i=n.queue;null!==i&&(i.pending=null),n=n.next}cs=!1}if(ss=0,ls=us=as=null,hs=!1,fs=0,xu.current=null,null===r||null===r.return){Tu=1,Bu=e,Iu=null;break}t:{var s=t,a=r.return,u=r,l=e;if(e=Pu,u.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l,h=u,f=h.tag;if(0===(1&h.mode)&&(0===f||11===f||15===f)){var d=h.alternate;d?(h.updateQueue=d.updateQueue,h.memoizedState=d.memoizedState,h.lanes=d.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=ga(a);if(null!==p){p.flags&=-257,va(p,a,u,0,e),1&p.mode&&ma(s,c,e),l=c;var m=(e=p).updateQueue;if(null===m){var g=new Set;g.add(l),e.updateQueue=g}else m.add(l);break t}if(0===(1&e)){ma(s,c,e),ml();break t}l=Error(o(426))}else if(io&&1&u.mode){var v=ga(a);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),va(v,a,u,0,e),mo(la(l,u));break t}}s=l=la(l,u),4!==Tu&&(Tu=2),null===Uu?Uu=[s]:Uu.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e,qo(s,da(0,l,e));break t;case 1:u=l;var y=s.type,w=s.stateNode;if(0===(128&s.flags)&&("function"===typeof y.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===Yu||!Yu.has(w)))){s.flags|=65536,e&=-e,s.lanes|=e,qo(s,pa(s,u,e));break t}}s=s.return}while(null!==s)}bl(r)}catch(b){e=b,Iu===r&&null!==r&&(Iu=r=r.return);continue}break}}function pl(){var t=Au.current;return Au.current=Xs,null===t?Xs:t}function ml(){0!==Tu&&3!==Tu&&2!==Tu||(Tu=4),null===Cu||0===(268435455&Lu)&&0===(268435455&ju)||al(Cu,Pu)}function gl(t,e){var r=Nu;Nu|=2;var n=pl();for(Cu===t&&Pu===e||(Vu=null,fl(t,e));;)try{vl();break}catch(i){dl(t,i)}if(So(),Nu=r,Au.current=n,null!==Iu)throw Error(o(261));return Cu=null,Pu=0,Tu}function vl(){for(;null!==Iu;)wl(Iu)}function yl(){for(;null!==Iu&&!Jt();)wl(Iu)}function wl(t){var e=Eu(t.alternate,t,Ru);t.memoizedProps=t.pendingProps,null===e?bl(t):Iu=e,xu.current=null}function bl(t){var e=t;do{var r=e.alternate;if(t=e.return,0===(32768&e.flags)){if(null!==(r=Ka(r,e,Ru)))return void(Iu=r)}else{if(null!==(r=Ga(r,e)))return r.flags&=32767,void(Iu=r);if(null===t)return Tu=6,void(Iu=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(Iu=e);Iu=e=t}while(null!==e);0===Tu&&(Tu=5)}function _l(t,e,r){var n=we,i=Su.transition;try{Su.transition=null,we=1,function(t,e,r,n){do{Ml()}while(null!==Gu);if(0!==(6&Nu))throw Error(o(327));r=t.finishedWork;var i=t.finishedLanes;if(null===r)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var s=r.lanes|r.childLanes;if(function(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-se(r),o=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~o}}(t,s),t===Cu&&(Iu=Cu=null,Pu=0),0===(2064&r.subtreeFlags)&&0===(2064&r.flags)||Ku||(Ku=!0,Cl(ee,(function(){return Ml(),null}))),s=0!==(15990&r.flags),0!==(15990&r.subtreeFlags)||s){s=Su.transition,Su.transition=null;var a=we;we=1;var u=Nu;Nu|=4,xu.current=null,function(t,e){if(ti=He,dn(t=fn())){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else t:{var n=(r=(r=t.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch(_){r=null;break t}var a=0,u=-1,l=-1,c=0,h=0,f=t,d=null;e:for(;;){for(var p;f!==r||0!==i&&3!==f.nodeType||(u=a+i),f!==s||0!==n&&3!==f.nodeType||(l=a+n),3===f.nodeType&&(a+=f.nodeValue.length),null!==(p=f.firstChild);)d=f,f=p;for(;;){if(f===t)break e;if(d===r&&++c===i&&(u=a),d===s&&++h===n&&(l=a),null!==(p=f.nextSibling))break;d=(f=d).parentNode}f=p}r=-1===u||-1===l?null:{start:u,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ei={focusedElem:t,selectionRange:r},He=!1,Xa=e;null!==Xa;)if(t=(e=Xa).child,0!==(1028&e.subtreeFlags)&&null!==t)t.return=e,Xa=t;else for(;null!==Xa;){e=Xa;try{var m=e.alternate;if(0!==(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=e.stateNode,w=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:ra(e.type,g),v);y.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=e.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(_){kl(e,e.return,_)}if(null!==(t=e.sibling)){t.return=e.return,Xa=t;break}Xa=e.return}m=eu,eu=!1}(t,r),gu(r,t),pn(ei),He=!!ti,ei=ti=null,t.current=r,yu(r,t,i),Qt(),Nu=u,we=a,Su.transition=s}else t.current=r;if(Ku&&(Ku=!1,Gu=t,Ju=i),s=t.pendingLanes,0===s&&(Yu=null),function(t){if(oe&&"function"===typeof oe.onCommitFiberRoot)try{oe.onCommitFiberRoot(ie,t,void 0,128===(128&t.current.flags))}catch(e){}}(r.stateNode),nl(t,Zt()),null!==e)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Hu)throw Hu=!1,t=Wu,Wu=null,t;0!==(1&Ju)&&0!==t.tag&&Ml(),s=t.pendingLanes,0!==(1&s)?t===Zu?Qu++:(Qu=0,Zu=t):Qu=0,qi()}(t,e,r,n)}finally{Su.transition=i,we=n}return null}function Ml(){if(null!==Gu){var t=be(Ju),e=Su.transition,r=we;try{if(Su.transition=null,we=16>t?16:t,null===Gu)var n=!1;else{if(t=Gu,Gu=null,Ju=0,0!==(6&Nu))throw Error(o(331));var i=Nu;for(Nu|=4,Xa=t.current;null!==Xa;){var s=Xa,a=s.child;if(0!==(16&Xa.flags)){var u=s.deletions;if(null!==u){for(var l=0;l<u.length;l++){var c=u[l];for(Xa=c;null!==Xa;){var h=Xa;switch(h.tag){case 0:case 11:case 15:ru(8,h,s)}var f=h.child;if(null!==f)f.return=h,Xa=f;else for(;null!==Xa;){var d=(h=Xa).sibling,p=h.return;if(ou(h),h===c){Xa=null;break}if(null!==d){d.return=p,Xa=d;break}Xa=p}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Xa=s}}if(0!==(2064&s.subtreeFlags)&&null!==a)a.return=s,Xa=a;else t:for(;null!==Xa;){if(0!==(2048&(s=Xa).flags))switch(s.tag){case 0:case 11:case 15:ru(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,Xa=y;break t}Xa=s.return}}var w=t.current;for(Xa=w;null!==Xa;){var b=(a=Xa).child;if(0!==(2064&a.subtreeFlags)&&null!==b)b.return=a,Xa=b;else t:for(a=w;null!==Xa;){if(0!==(2048&(u=Xa).flags))try{switch(u.tag){case 0:case 11:case 15:nu(9,u)}}catch(M){kl(u,u.return,M)}if(u===a){Xa=null;break t}var _=u.sibling;if(null!==_){_.return=u.return,Xa=_;break t}Xa=u.return}}if(Nu=i,qi(),oe&&"function"===typeof oe.onPostCommitFiberRoot)try{oe.onPostCommitFiberRoot(ie,t)}catch(M){}n=!0}return n}finally{we=r,Su.transition=e}}return!1}function El(t,e,r){t=Do(t,e=da(0,e=la(r,e),1),1),e=tl(),null!==t&&(ve(t,1,e),nl(t,e))}function kl(t,e,r){if(3===t.tag)El(t,t,r);else for(;null!==e;){if(3===e.tag){El(e,t,r);break}if(1===e.tag){var n=e.stateNode;if("function"===typeof e.type.getDerivedStateFromError||"function"===typeof n.componentDidCatch&&(null===Yu||!Yu.has(n))){e=Do(e,t=pa(e,t=la(r,t),1),1),t=tl(),null!==e&&(ve(e,1,t),nl(e,t));break}}e=e.return}}function Al(t,e,r){var n=t.pingCache;null!==n&&n.delete(e),e=tl(),t.pingedLanes|=t.suspendedLanes&r,Cu===t&&(Pu&r)===r&&(4===Tu||3===Tu&&(130023424&Pu)===Pu&&500>Zt()-zu?fl(t,0):Fu|=r),nl(t,e)}function xl(t,e){0===e&&(0===(1&t.mode)?e=1:(e=ce,0===(130023424&(ce<<=1))&&(ce=4194304)));var r=tl();null!==(t=Bo(t,e))&&(ve(t,e,r),nl(t,r))}function Sl(t){var e=t.memoizedState,r=0;null!==e&&(r=e.retryLane),xl(t,r)}function Nl(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;null!==i&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(o(314))}null!==n&&n.delete(e),xl(t,r)}function Cl(t,e){return Kt(t,e)}function Il(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pl(t,e,r,n){return new Il(t,e,r,n)}function Rl(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Ol(t,e){var r=t.alternate;return null===r?((r=Pl(t.tag,e,t.key,t.mode)).elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&t.flags,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Tl(t,e,r,n,i,s){var a=2;if(n=t,"function"===typeof t)Rl(t)&&(a=1);else if("string"===typeof t)a=5;else t:switch(t){case E:return Bl(r.children,i,s,e);case k:a=8,i|=8;break;case A:return(t=Pl(12,r,e,2|i)).elementType=A,t.lanes=s,t;case C:return(t=Pl(13,r,e,i)).elementType=C,t.lanes=s,t;case I:return(t=Pl(19,r,e,i)).elementType=I,t.lanes=s,t;case O:return Ll(r,i,s,e);default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case x:a=10;break t;case S:a=9;break t;case N:a=11;break t;case P:a=14;break t;case R:a=16,n=null;break t}throw Error(o(130,null==t?t:typeof t,""))}return(e=Pl(a,r,e,i)).elementType=t,e.type=n,e.lanes=s,e}function Bl(t,e,r,n){return(t=Pl(7,t,n,e)).lanes=r,t}function Ll(t,e,r,n){return(t=Pl(22,t,n,e)).elementType=O,t.lanes=r,t.stateNode={isHidden:!1},t}function jl(t,e,r){return(t=Pl(6,t,null,e)).lanes=r,t}function Fl(t,e,r){return(e=Pl(4,null!==t.children?t.children:[],t.key,e)).lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ul(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ge(0),this.expirationTimes=ge(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ge(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Dl(t,e,r,n,i,o,s,a,u){return t=new Ul(t,e,r,a,u),1===e?(e=1,!0===o&&(e|=8)):e=0,o=Pl(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},jo(o),t}function zl(t){if(!t)return Si;t:{if(qt(t=t._reactInternals)!==t||1!==t.tag)throw Error(o(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(Ri(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(o(171))}if(1===t.tag){var r=t.type;if(Ri(r))return Bi(t,r,e)}return e}function ql(t,e,r,n,i,o,s,a,u){return(t=Dl(r,n,!0,t,0,o,0,a,u)).context=zl(null),r=t.current,(o=Uo(n=tl(),i=el(r))).callback=void 0!==e&&null!==e?e:null,Do(r,o,i),t.current.lanes=i,ve(t,i,n),nl(t,n),t}function Vl(t,e,r,n){var i=e.current,o=tl(),s=el(i);return r=zl(r),null===e.context?e.context=r:e.pendingContext=r,(e=Uo(o,s)).payload={element:t},null!==(n=void 0===n?null:n)&&(e.callback=n),null!==(t=Do(i,e,s))&&(rl(t,i,s,o),zo(t,i,s)),s}function Hl(t){return(t=t.current).child?(t.child.tag,t.child.stateNode):null}function Wl(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var r=t.retryLane;t.retryLane=0!==r&&r<e?r:e}}function Yl(t,e){Wl(t,e),(t=t.alternate)&&Wl(t,e)}Eu=function(t,e,r){if(null!==t)if(t.memoizedProps!==e.pendingProps||Ci.current)wa=!0;else{if(0===(t.lanes&r)&&0===(128&e.flags))return wa=!1,function(t,e,r){switch(e.tag){case 3:Ca(e),po();break;case 5:Xo(e);break;case 1:Ri(e.type)&&Li(e);break;case 4:Qo(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;xi(Eo,n._currentValue),n._currentValue=i;break;case 13:if(null!==(n=e.memoizedState))return null!==n.dehydrated?(xi(ts,1&ts.current),e.flags|=128,null):0!==(r&e.child.childLanes)?ja(t,e,r):(xi(ts,1&ts.current),null!==(t=Ha(t,e,r))?t.sibling:null);xi(ts,1&ts.current);break;case 19:if(n=0!==(r&e.childLanes),0!==(128&t.flags)){if(n)return qa(t,e,r);e.flags|=128}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),xi(ts,ts.current),n)break;return null;case 22:case 23:return e.lanes=0,ka(t,e,r)}return Ha(t,e,r)}(t,e,r);wa=0!==(131072&t.flags)}else wa=!1,io&&0!==(1048576&e.flags)&&$i(e,Yi,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Va(t,e),t=e.pendingProps;var i=Pi(e,Ni.current);Io(e,r),i=gs(null,e,n,t,i,r);var s=vs();return e.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ri(n)?(s=!0,Li(e)):s=!1,e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,jo(e),i.updater=ia,e.stateNode=i,i._reactInternals=e,ua(e,n,t,r),e=Na(null,e,n,!0,s,r)):(e.tag=0,io&&s&&to(e),ba(null,e,i,r),e=e.child),e;case 16:n=e.elementType;t:{switch(Va(t,e),t=e.pendingProps,n=(i=n._init)(n._payload),e.type=n,i=e.tag=function(t){if("function"===typeof t)return Rl(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===N)return 11;if(t===P)return 14}return 2}(n),t=ra(n,t),i){case 0:e=xa(null,e,n,t,r);break t;case 1:e=Sa(null,e,n,t,r);break t;case 11:e=_a(null,e,n,t,r);break t;case 14:e=Ma(null,e,n,ra(n.type,t),r);break t}throw Error(o(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,xa(t,e,n,i=e.elementType===n?i:ra(n,i),r);case 1:return n=e.type,i=e.pendingProps,Sa(t,e,n,i=e.elementType===n?i:ra(n,i),r);case 3:t:{if(Ca(e),null===t)throw Error(o(387));n=e.pendingProps,i=(s=e.memoizedState).element,Fo(t,e),Vo(e,n,null,r);var a=e.memoizedState;if(n=a.element,s.isDehydrated){if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,256&e.flags){e=Ia(t,e,n,r,i=la(Error(o(423)),e));break t}if(n!==i){e=Ia(t,e,n,r,i=la(Error(o(424)),e));break t}for(no=li(e.stateNode.containerInfo.firstChild),ro=e,io=!0,oo=null,r=Mo(e,null,n,r),e.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(po(),n===i){e=Ha(t,e,r);break t}ba(t,e,n,r)}e=e.child}return e;case 5:return Xo(e),null===t&&lo(e),n=e.type,i=e.pendingProps,s=null!==t?t.memoizedProps:null,a=i.children,ri(n,i)?a=null:null!==s&&ri(n,s)&&(e.flags|=32),Aa(t,e),ba(t,e,a,r),e.child;case 6:return null===t&&lo(e),null;case 13:return ja(t,e,r);case 4:return Qo(e,e.stateNode.containerInfo),n=e.pendingProps,null===t?e.child=_o(e,null,n,r):ba(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,_a(t,e,n,i=e.elementType===n?i:ra(n,i),r);case 7:return ba(t,e,e.pendingProps,r),e.child;case 8:case 12:return ba(t,e,e.pendingProps.children,r),e.child;case 10:t:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value,xi(Eo,n._currentValue),n._currentValue=a,null!==s)if(an(s.value,a)){if(s.children===i.children&&!Ci.current){e=Ha(t,e,r);break t}}else for(null!==(s=e.child)&&(s.return=e);null!==s;){var u=s.dependencies;if(null!==u){a=s.child;for(var l=u.firstContext;null!==l;){if(l.context===n){if(1===s.tag){(l=Uo(-1,r&-r)).tag=2;var c=s.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Co(s.return,r,e),u.lanes|=r;break}l=l.next}}else if(10===s.tag)a=s.type===e.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=r,null!==(u=a.alternate)&&(u.lanes|=r),Co(a,r,e),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===e){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}ba(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Io(e,r),n=n(i=Po(i)),e.flags|=1,ba(t,e,n,r),e.child;case 14:return i=ra(n=e.type,e.pendingProps),Ma(t,e,n,i=ra(n.type,i),r);case 15:return Ea(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ra(n,i),Va(t,e),e.tag=1,Ri(n)?(t=!0,Li(e)):t=!1,Io(e,r),sa(e,n,i),ua(e,n,i,r),Na(null,e,n,!0,t,r);case 19:return qa(t,e,r);case 22:return ka(t,e,r)}throw Error(o(156,e.tag))};var Kl="function"===typeof reportError?reportError:function(t){console.error(t)};function Gl(t){this._internalRoot=t}function Jl(t){this._internalRoot=t}function Ql(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)}function Zl(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Xl(){}function $l(t,e,r,n,i){var o=r._reactRootContainer;if(o){var s=o;if("function"===typeof i){var a=i;i=function(){var t=Hl(s);a.call(t)}}Vl(e,s,t,i)}else s=function(t,e,r,n,i){if(i){if("function"===typeof n){var o=n;n=function(){var t=Hl(s);o.call(t)}}var s=ql(e,n,t,0,null,!1,0,"",Xl);return t._reactRootContainer=s,t[pi]=s.current,qn(8===t.nodeType?t.parentNode:t),cl(),s}for(;i=t.lastChild;)t.removeChild(i);if("function"===typeof n){var a=n;n=function(){var t=Hl(u);a.call(t)}}var u=Dl(t,0,!1,null,0,!1,0,"",Xl);return t._reactRootContainer=u,t[pi]=u.current,qn(8===t.nodeType?t.parentNode:t),cl((function(){Vl(e,u,r,n)})),u}(r,e,t,i,n);return Hl(s)}Jl.prototype.render=Gl.prototype.render=function(t){var e=this._internalRoot;if(null===e)throw Error(o(409));Vl(t,e,null,null)},Jl.prototype.unmount=Gl.prototype.unmount=function(){var t=this._internalRoot;if(null!==t){this._internalRoot=null;var e=t.containerInfo;cl((function(){Vl(null,t,null,null)})),e[pi]=null}},Jl.prototype.unstable_scheduleHydration=function(t){if(t){var e=ke();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Oe.length&&0!==e&&e<Oe[r].priority;r++);Oe.splice(r,0,t),0===r&&je(t)}},_e=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=he(e.pendingLanes);0!==r&&(ye(e,1|r),nl(e,Zt()),0===(6&Nu)&&(qu=Zt()+500,qi()))}break;case 13:cl((function(){var e=Bo(t,1);if(null!==e){var r=tl();rl(e,t,1,r)}})),Yl(t,1)}},Me=function(t){if(13===t.tag){var e=Bo(t,134217728);if(null!==e)rl(e,t,134217728,tl());Yl(t,134217728)}},Ee=function(t){if(13===t.tag){var e=el(t),r=Bo(t,e);if(null!==r)rl(r,t,e,tl());Yl(t,e)}},ke=function(){return we},Ae=function(t,e){var r=we;try{return we=t,e()}finally{we=r}},Mt=function(t,e,r){switch(e){case"input":if(X(t,r),e=r.name,"radio"===r.type&&null!=e){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=_i(n);if(!i)throw Error(o(90));K(n),X(n,i)}}}break;case"textarea":ot(t,r);break;case"select":null!=(e=r.value)&&rt(t,!!r.multiple,e,!1)}},Nt=ll,Ct=cl;var tc={usingClientEntryPoint:!1,Events:[wi,bi,_i,xt,St,ll]},ec={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rc={bundleType:ec.bundleType,version:ec.version,rendererPackageName:ec.rendererPackageName,rendererConfig:ec.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Wt(t))?null:t.stateNode},findFiberByHostInstance:ec.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{ie=nc.inject(rc),oe=nc}catch(ct){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,e.createPortal=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ql(e))throw Error(o(200));return function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:M,key:null==n?null:""+n,children:t,containerInfo:e,implementation:r}}(t,e,null,r)},e.createRoot=function(t,e){if(!Ql(t))throw Error(o(299));var r=!1,n="",i=Kl;return null!==e&&void 0!==e&&(!0===e.unstable_strictMode&&(r=!0),void 0!==e.identifierPrefix&&(n=e.identifierPrefix),void 0!==e.onRecoverableError&&(i=e.onRecoverableError)),e=Dl(t,1,!1,null,0,r,0,n,i),t[pi]=e.current,qn(8===t.nodeType?t.parentNode:t),new Gl(e)},e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"===typeof t.render)throw Error(o(188));throw t=Object.keys(t).join(","),Error(o(268,t))}return t=null===(t=Wt(e))?null:t.stateNode},e.flushSync=function(t){return cl(t)},e.hydrate=function(t,e,r){if(!Zl(e))throw Error(o(200));return $l(null,t,e,!0,r)},e.hydrateRoot=function(t,e,r){if(!Ql(t))throw Error(o(405));var n=null!=r&&r.hydratedSources||null,i=!1,s="",a=Kl;if(null!==r&&void 0!==r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(s=r.identifierPrefix),void 0!==r.onRecoverableError&&(a=r.onRecoverableError)),e=ql(e,null,t,1,null!=r?r:null,i,0,s,a),t[pi]=e.current,qn(t),n)for(t=0;t<n.length;t++)i=(i=(r=n[t])._getVersion)(r._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new Jl(e)},e.render=function(t,e,r){if(!Zl(e))throw Error(o(200));return $l(null,t,e,!1,r)},e.unmountComponentAtNode=function(t){if(!Zl(t))throw Error(o(40));return!!t._reactRootContainer&&(cl((function(){$l(null,null,t,!1,(function(){t._reactRootContainer=null,t[pi]=null}))})),!0)},e.unstable_batchedUpdates=ll,e.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Zl(r))throw Error(o(200));if(null==t||void 0===t._reactInternals)throw Error(o(38));return $l(t,e,r,!1,n)},e.version="18.3.1-next-f1338f8080-20240426"},4391:(t,e,r)=>{"use strict";var n=r(7950);e.createRoot=n.createRoot,e.hydrateRoot=n.hydrateRoot},7950:(t,e,r)=>{"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=r(2730)},5082:(t,e)=>{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function _(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case c:case h:case o:case a:case s:case d:return t;default:switch(t=t&&t.$$typeof){case l:case f:case g:case m:case u:return t;default:return e}}case i:return e}}}function M(t){return _(t)===h}e.AsyncMode=c,e.ConcurrentMode=h,e.ContextConsumer=l,e.ContextProvider=u,e.Element=n,e.ForwardRef=f,e.Fragment=o,e.Lazy=g,e.Memo=m,e.Portal=i,e.Profiler=a,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return M(t)||_(t)===c},e.isConcurrentMode=M,e.isContextConsumer=function(t){return _(t)===l},e.isContextProvider=function(t){return _(t)===u},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return _(t)===f},e.isFragment=function(t){return _(t)===o},e.isLazy=function(t){return _(t)===g},e.isMemo=function(t){return _(t)===m},e.isPortal=function(t){return _(t)===i},e.isProfiler=function(t){return _(t)===a},e.isStrictMode=function(t){return _(t)===s},e.isSuspense=function(t){return _(t)===d},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===o||t===h||t===a||t===s||t===d||t===p||"object"===typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===m||t.$$typeof===u||t.$$typeof===l||t.$$typeof===f||t.$$typeof===y||t.$$typeof===w||t.$$typeof===b||t.$$typeof===v)},e.typeOf=_},2086:(t,e,r)=>{"use strict";t.exports=r(5082)},1153:(t,e,r)=>{"use strict";var n=r(5043),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,r){var n,o={},l=null,c=null;for(n in void 0!==r&&(l=""+r),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,n)&&!u.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===o[n]&&(o[n]=e[n]);return{$$typeof:i,type:t,key:l,ref:c,props:o,_owner:a.current}}e.Fragment=o,e.jsx=l,e.jsxs=l},4202:(t,e)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(t,e,r){this.props=t,this.context=e,this.refs=g,this.updater=r||p}function y(){}function w(t,e,r){this.props=t,this.context=e,this.refs=g,this.updater=r||p}v.prototype.isReactComponent={},v.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},v.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},y.prototype=v.prototype;var b=w.prototype=new y;b.constructor=w,m(b,v.prototype),b.isPureReactComponent=!0;var _=Array.isArray,M=Object.prototype.hasOwnProperty,E={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function A(t,e,n){var i,o={},s=null,a=null;if(null!=e)for(i in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(s=""+e.key),e)M.call(e,i)&&!k.hasOwnProperty(i)&&(o[i]=e[i]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:r,type:t,key:s,ref:a,props:o,_owner:E.current}}function x(t){return"object"===typeof t&&null!==t&&t.$$typeof===r}var S=/\/+/g;function N(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function C(t,e,i,o,s){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case r:case n:u=!0}}if(u)return s=s(u=t),t=""===o?"."+N(u,0):o,_(s)?(i="",null!=t&&(i=t.replace(S,"$&/")+"/"),C(s,e,i,"",(function(t){return t}))):null!=s&&(x(s)&&(s=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(s,i+(!s.key||u&&u.key===s.key?"":(""+s.key).replace(S,"$&/")+"/")+t)),e.push(s)),1;if(u=0,o=""===o?".":o+":",_(t))for(var l=0;l<t.length;l++){var c=o+N(a=t[l],l);u+=C(a,e,i,c,s)}else if(c=function(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=d&&t[d]||t["@@iterator"])?t:null}(t),"function"===typeof c)for(t=c.call(t),l=0;!(a=t.next()).done;)u+=C(a=a.value,e,i,c=o+N(a,l++),s);else if("object"===a)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return u}function I(t,e,r){if(null==t)return t;var n=[],i=0;return C(t,n,"","",(function(t){return e.call(r,t,i++)})),n}function P(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var R={current:null},O={transition:null},T={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:O,ReactCurrentOwner:E};function B(){throw Error("act(...) is not supported in production builds of React.")}e.Children={map:I,forEach:function(t,e,r){I(t,(function(){e.apply(this,arguments)}),r)},count:function(t){var e=0;return I(t,(function(){e++})),e},toArray:function(t){return I(t,(function(t){return t}))||[]},only:function(t){if(!x(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=v,e.Fragment=i,e.Profiler=s,e.PureComponent=w,e.StrictMode=o,e.Suspense=c,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,e.act=B,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=m({},t.props),o=t.key,s=t.ref,a=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,a=E.current),void 0!==e.key&&(o=""+e.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(l in e)M.call(e,l)&&!k.hasOwnProperty(l)&&(i[l]=void 0===e[l]&&void 0!==u?u[l]:e[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:r,type:t.type,key:o,ref:s,props:i,_owner:a}},e.createContext=function(t){return(t={$$typeof:u,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=A,e.createFactory=function(t){var e=A.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:l,render:t}},e.isValidElement=x,e.lazy=function(t){return{$$typeof:f,_payload:{_status:-1,_result:t},_init:P}},e.memo=function(t,e){return{$$typeof:h,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=O.transition;O.transition={};try{t()}finally{O.transition=e}},e.unstable_act=B,e.useCallback=function(t,e){return R.current.useCallback(t,e)},e.useContext=function(t){return R.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return R.current.useDeferredValue(t)},e.useEffect=function(t,e){return R.current.useEffect(t,e)},e.useId=function(){return R.current.useId()},e.useImperativeHandle=function(t,e,r){return R.current.useImperativeHandle(t,e,r)},e.useInsertionEffect=function(t,e){return R.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return R.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return R.current.useMemo(t,e)},e.useReducer=function(t,e,r){return R.current.useReducer(t,e,r)},e.useRef=function(t){return R.current.useRef(t)},e.useState=function(t){return R.current.useState(t)},e.useSyncExternalStore=function(t,e,r){return R.current.useSyncExternalStore(t,e,r)},e.useTransition=function(){return R.current.useTransition()},e.version="18.3.1"},5043:(t,e,r)=>{"use strict";t.exports=r(4202)},579:(t,e,r)=>{"use strict";t.exports=r(1153)},7234:(t,e)=>{"use strict";function r(t,e){var r=t.length;t.push(e);t:for(;0<r;){var n=r-1>>>1,i=t[n];if(!(0<o(i,e)))break t;t[n]=e,t[r]=i,r=n}}function n(t){return 0===t.length?null:t[0]}function i(t){if(0===t.length)return null;var e=t[0],r=t.pop();if(r!==e){t[0]=r;t:for(var n=0,i=t.length,s=i>>>1;n<s;){var a=2*(n+1)-1,u=t[a],l=a+1,c=t[l];if(0>o(u,r))l<i&&0>o(c,u)?(t[n]=c,t[l]=r,n=l):(t[n]=u,t[a]=r,n=a);else{if(!(l<i&&0>o(c,r)))break t;t[n]=c,t[l]=r,n=l}}}return e}function o(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var l=[],c=[],h=1,f=null,d=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,w="undefined"!==typeof setImmediate?setImmediate:null;function b(t){for(var e=n(c);null!==e;){if(null===e.callback)i(c);else{if(!(e.startTime<=t))break;i(c),e.sortIndex=e.expirationTime,r(l,e)}e=n(c)}}function _(t){if(g=!1,b(t),!m)if(null!==n(l))m=!0,O(M);else{var e=n(c);null!==e&&T(_,e.startTime-t)}}function M(t,r){m=!1,g&&(g=!1,y(x),x=-1),p=!0;var o=d;try{for(b(r),f=n(l);null!==f&&(!(f.expirationTime>r)||t&&!C());){var s=f.callback;if("function"===typeof s){f.callback=null,d=f.priorityLevel;var a=s(f.expirationTime<=r);r=e.unstable_now(),"function"===typeof a?f.callback=a:f===n(l)&&i(l),b(r)}else i(l);f=n(l)}if(null!==f)var u=!0;else{var h=n(c);null!==h&&T(_,h.startTime-r),u=!1}return u}finally{f=null,d=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,k=!1,A=null,x=-1,S=5,N=-1;function C(){return!(e.unstable_now()-N<S)}function I(){if(null!==A){var t=e.unstable_now();N=t;var r=!0;try{r=A(!0,t)}finally{r?E():(k=!1,A=null)}}else k=!1}if("function"===typeof w)E=function(){w(I)};else if("undefined"!==typeof MessageChannel){var P=new MessageChannel,R=P.port2;P.port1.onmessage=I,E=function(){R.postMessage(null)}}else E=function(){v(I,0)};function O(t){A=t,k||(k=!0,E())}function T(t,r){x=v((function(){t(e.unstable_now())}),r)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,O(M))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(t){switch(d){case 1:case 2:case 3:var e=3;break;default:e=d}var r=d;d=e;try{return t()}finally{d=r}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=d;d=t;try{return e()}finally{d=r}},e.unstable_scheduleCallback=function(t,i,o){var s=e.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+o:s:o=s,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return t={id:h++,callback:i,priorityLevel:t,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(t.sortIndex=o,r(c,t),null===n(l)&&t===n(c)&&(g?(y(x),x=-1):g=!0,T(_,o-s))):(t.sortIndex=a,r(l,t),m||p||(m=!0,O(M))),t},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(t){var e=d;return function(){var r=d;d=e;try{return t.apply(this,arguments)}finally{d=r}}}},8853:(t,e,r)=>{"use strict";t.exports=r(7234)},1289:t=>{"use strict";t.exports=(t,e)=>{if("string"!==typeof t||"string"!==typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const r=t.indexOf(e);return-1===r?[t]:[t.slice(0,r),t.slice(r+e.length)]}},7491:t=>{"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>"%".concat(t.charCodeAt(0).toString(16).toUpperCase())))},139:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||r.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},9550:(t,e,r)=>{var n=r(1390).strict;t.exports=function(t){if(n(t)){var e=Buffer.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(e=e.slice(t.byteOffset,t.byteOffset+t.byteLength)),e}return Buffer.from(t)}},159:(t,e,r)=>{"use strict";r.r(e),r.d(e,{create:()=>l,createStore:()=>n.y,default:()=>c,useStore:()=>a});var n=r(3802),i=r(5043),o=r(5184);const{useSyncExternalStoreWithSelector:s}=o;function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getState,r=arguments.length>2?arguments[2]:void 0;const n=s(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return(0,i.useDebugValue)(n),n}const u=t=>{const e="function"===typeof t?(0,n.y)(t):t,r=(t,r)=>a(e,t,r);return Object.assign(r,e),r},l=t=>t?u(t):u;var c=t=>l(t)},1638:(t,e,r)=>{"use strict";r.r(e),r.d(e,{createWithEqualityFn:()=>l,useStoreWithEqualityFn:()=>a});var n=r(5043),i=r(5184),o=r(3802);const{useSyncExternalStoreWithSelector:s}=i;function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getState,r=arguments.length>2?arguments[2]:void 0;const i=s(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return(0,n.useDebugValue)(i),i}const u=(t,e)=>{const r=(0,o.y)(t),n=function(t){return a(r,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e)};return Object.assign(n,r),n},l=(t,e)=>t?u(t,e):u},3157:(t,e,r)=>{"use strict";var n=r(5043);var i="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},o=n.useState,s=n.useEffect,a=n.useLayoutEffect,u=n.useDebugValue;function l(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!i(t,r)}catch(n){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=o({inst:{value:r,getSnapshot:e}}),i=n[0].inst,c=n[1];return a((function(){i.value=r,i.getSnapshot=e,l(i)&&c({inst:i})}),[t,r,e]),s((function(){return l(i)&&c({inst:i}),t((function(){l(i)&&c({inst:i})}))}),[t]),u(r),r};e.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},5018:(t,e,r)=>{"use strict";var n=r(5043),i=r(4510);var o="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},s=i.useSyncExternalStore,a=n.useRef,u=n.useEffect,l=n.useMemo,c=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var h=a(null);if(null===h.current){var f={hasValue:!1,value:null};h.current=f}else f=h.current;h=l((function(){function t(t){if(!u){if(u=!0,s=t,t=n(t),void 0!==i&&f.hasValue){var e=f.value;if(i(e,t))return a=e}return a=t}if(e=a,o(s,t))return e;var r=n(t);return void 0!==i&&i(e,r)?e:(s=t,a=r)}var s,a,u=!1,l=void 0===r?null:r;return[function(){return t(e())},null===l?void 0:function(){return t(l())}]}),[e,r,n,i]);var d=s(t,h[0],h[1]);return u((function(){f.hasValue=!0,f.value=d}),[d]),c(d),d}},4510:(t,e,r)=>{"use strict";t.exports=r(3157)},5184:(t,e,r)=>{"use strict";t.exports=r(5018)},6543:()=>{},8725:()=>{},1833:()=>{},8405:()=>{},7790:()=>{},6499:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getPriorityConnector=e.getSelectedConnector=e.initializeConnector=void 0;const a=r(611),u=r(5043),l=r(159),c=r(1638);let h;function f(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];function n(t){const r=e.findIndex((e=>{let[r]=e;return t===r}));if(-1===r)throw new Error("Connector not found");return r}return{useSelectedStore:function(t){const r=e[n(t)][2];if(!r)throw new Error("Stores not passed");return r},useSelectedChainId:function(t){return e.map((t=>{let[,{useChainId:e}]=t;return e()}))[n(t)]},useSelectedAccounts:function(t){return e.map((t=>{let[,{useAccounts:e}]=t;return e()}))[n(t)]},useSelectedIsActivating:function(t){return e.map((t=>{let[,{useIsActivating:e}]=t;return e()}))[n(t)]},useSelectedAccount:function(t){return e.map((t=>{let[,{useAccount:e}]=t;return e()}))[n(t)]},useSelectedIsActive:function(t){return e.map((t=>{let[,{useIsActive:e}]=t;return e()}))[n(t)]},useSelectedProvider:function(t,r){const i=n(t);return e.map(((t,e)=>{let[,{useProvider:n}]=t;return n(r,e===i)}))[i]},useSelectedENSNames:function(t,r){const i=n(t);return e.map(((t,e)=>{let[,{useENSNames:n}]=t;return n(e===i?r:void 0)}))[i]},useSelectedENSName:function(t,r){const i=n(t);return e.map(((t,e)=>{let[,{useENSName:n}]=t;return n(e===i?r:void 0)}))[i]}}}e.initializeConnector=function(t){const[e,n]=(0,a.createWeb3ReactStoreAndActions)(),i=t(n),f=function(t){function e(){return(0,l.useStore)(t,d)}function r(){return(0,c.useStoreWithEqualityFn)(t,p,g)}function n(){return(0,l.useStore)(t,m)}return{useChainId:e,useAccounts:r,useIsActivating:n}}(e),y=function(t){let{useChainId:e,useAccounts:r,useIsActivating:n}=t;function i(){var t;return null===(t=r())||void 0===t?void 0:t[0]}function o(){return function(t){let{chainId:e,accounts:r,activating:n}=t;return Boolean(e&&r&&!n)}({chainId:e(),accounts:r(),activating:n()})}return{useAccount:i,useIsActive:o}}(f),w=function(t,e,n){let{useAccounts:i,useChainId:a}=e,{useAccount:l,useIsActive:c}=n;function f(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=c(),l=a(),[f,d]=(0,u.useState)(void 0!==h);return(0,u.useEffect)((()=>{if(f)return;let t=!1;return function(){return s(this,void 0,void 0,(function*(){if(void 0===h)try{const{Web3Provider:t}=yield Promise.resolve().then((()=>o(r(5488))));h=t}catch(t){console.debug("@ethersproject/providers not available"),h=null}}))}().then((()=>{t||d(!0)})),()=>{t=!0}}),[f]),(0,u.useMemo)((()=>{if(n){if(t.customProvider)return t.customProvider;if(h&&t.provider)return new h(t.provider,e)}}),[f,n,i,l,e])}function d(t){return v(t,i())}function p(t){var e;const r=l();return null===(e=v(t,(0,u.useMemo)((()=>void 0===r?void 0:[r]),[r])))||void 0===e?void 0:e[0]}return{useProvider:f,useENSNames:d,useENSName:p}}(i,f,y);return[i,Object.assign(Object.assign(Object.assign({},f),y),w),e]},e.getSelectedConnector=f,e.getPriorityConnector=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const{useSelectedStore:n,useSelectedChainId:i,useSelectedAccounts:o,useSelectedIsActivating:s,useSelectedAccount:a,useSelectedIsActive:u,useSelectedProvider:l,useSelectedENSNames:c,useSelectedENSName:h}=f(...e);function d(){const t=e.map((t=>{let[,{useIsActive:e}]=t;return e()})).findIndex((t=>t));return e[-1===t?0:t][0]}return{useSelectedStore:n,useSelectedChainId:i,useSelectedAccounts:o,useSelectedIsActivating:s,useSelectedAccount:a,useSelectedIsActive:u,useSelectedProvider:l,useSelectedENSNames:c,useSelectedENSName:h,usePriorityConnector:d,usePriorityStore:function(){return n(d())},usePriorityChainId:function(){return i(d())},usePriorityAccounts:function(){return o(d())},usePriorityIsActivating:function(){return s(d())},usePriorityAccount:function(){return a(d())},usePriorityIsActive:function(){return u(d())},usePriorityProvider:function(t){return l(d(),t)},usePriorityENSNames:function(t){return c(d(),t)},usePriorityENSName:function(t){return h(d(),t)}}};const d=t=>{let{chainId:e}=t;return e},p=t=>{let{accounts:e}=t;return e},m=t=>{let{activating:e}=t;return e},g=(t,e)=>void 0===t&&void 0===e||void 0!==t&&t.length===(null===e||void 0===e?void 0:e.length)&&t.every(((t,r)=>t===e[r]));function v(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const[r,n]=(0,u.useState)();return(0,u.useEffect)((()=>{if(t&&e.length){let r=!1;return Promise.all(e.map((e=>t.lookupAddress(e)))).then((t=>{r||n(t)})).catch((t=>{r||(console.debug("Could not fetch ENS names",t),n(new Array(e.length).fill(null)))})),()=>{r=!0,n(void 0)}}}),[t,e]),null!==r&&void 0!==r?r:new Array(e.length).fill(void 0)}},8931:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(6499),e),i(r(4796),e),i(r(5310),e)},4796:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MockEIP1193Provider=void 0;const n=r(7283);class i extends n.EventEmitter{constructor(){super(...arguments),this.eth_chainId=jest.fn((t=>t)),this.eth_accounts=jest.fn((t=>t)),this.eth_requestAccounts=jest.fn((t=>t))}request(t){if(!this.chainId)return Promise.reject(new Error);switch(t.method){case"eth_chainId":return Promise.resolve(this.eth_chainId(this.chainId));case"eth_accounts":return Promise.resolve(this.eth_accounts(this.accounts));case"eth_requestAccounts":return Promise.resolve(this.eth_requestAccounts(this.accounts));default:throw new Error("Method not supported on mock: ".concat(JSON.stringify(t)))}}emitConnect(t){this.emit("connect",{chainId:t})}emitDisconnect(t){this.emit("disconnect",t)}emitChainChanged(t){this.emit("chainChanged",t)}emitAccountsChanged(t){this.emit("accountsChanged",t)}}e.MockEIP1193Provider=i},5310:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useWeb3React=e.Web3ReactProvider=void 0;const s=o(r(5043)),a=r(6499),u=(0,s.createContext)(void 0);e.Web3ReactProvider=function(t){let{children:e,connectors:r,connectorOverride:n,network:i,lookupENS:o=!0}=t;const l=(0,s.useRef)(r);if(r.length!=l.current.length||r.some(((t,e)=>{const r=l.current[e];return t[0]!==r[0]})))throw new Error("The connectors prop passed to Web3ReactProvider must be referentially static. If connectors is changing, try providing a key prop to Web3ReactProvider that changes every time connectors changes.");const c=(0,a.getPriorityConnector)(...r),{usePriorityConnector:h,useSelectedChainId:f,useSelectedAccounts:d,useSelectedIsActivating:p,useSelectedAccount:m,useSelectedIsActive:g,useSelectedProvider:v,useSelectedENSNames:y,useSelectedENSName:w}=c,b=h(),_=null!==n&&void 0!==n?n:b,M=f(_),E=d(_),k=p(_),A=m(_),x=g(_),S=v(_,i),N=y(_,o?S:void 0),C=w(_,o?S:void 0);return s.default.createElement(u.Provider,{value:{connector:_,chainId:M,accounts:E,isActivating:k,account:A,isActive:x,provider:S,ENSNames:N,ENSName:C,hooks:c}},e)},e.useWeb3React=function(){const t=(0,s.useContext)(u);if(!t)throw Error("useWeb3React can only be used within the Web3ReactProvider component");return t}},7261:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.MetaMask=e.NoMetaMaskError=void 0;const a=r(1687);class u extends Error{constructor(){super("MetaMask not installed"),this.name=u.name,Object.setPrototypeOf(this,u.prototype)}}function l(t){return Number.parseInt(t,16)}e.NoMetaMaskError=u;class c extends a.Connector{constructor(t){let{actions:e,options:r,onError:n}=t;super(e,n),this.options=r}isomorphicInitialize(){return s(this,void 0,void 0,(function*(){if(!this.eagerConnection)return this.eagerConnection=Promise.resolve().then((()=>o(r(5254)))).then((t=>s(this,void 0,void 0,(function*(){var e,r;const n=yield t.default(this.options);n&&(this.provider=n,(null===(e=this.provider.providers)||void 0===e?void 0:e.length)&&(this.provider=null!==(r=this.provider.providers.find((t=>t.isMetaMask)))&&void 0!==r?r:this.provider.providers[0]),this.provider.on("connect",(t=>{let{chainId:e}=t;this.actions.update({chainId:l(e)})})),this.provider.on("disconnect",(t=>{var e;1013!==t.code?(this.actions.resetState(),null===(e=this.onError)||void 0===e||e.call(this,t)):console.debug('MetaMask logged connection error 1013: "Try again later"')})),this.provider.on("chainChanged",(t=>{this.actions.update({chainId:l(t)})})),this.provider.on("accountsChanged",(t=>{0===t.length?this.actions.resetState():this.actions.update({accounts:t})})))}))))}))}connectEagerly(){return s(this,void 0,void 0,(function*(){const t=this.actions.startActivation();try{if(yield this.isomorphicInitialize(),!this.provider)return t();const e=yield this.provider.request({method:"eth_accounts"});if(!e.length)throw new Error("No accounts returned");const r=yield this.provider.request({method:"eth_chainId"});this.actions.update({chainId:l(r),accounts:e})}catch(e){console.debug("Could not connect eagerly",e),this.actions.resetState()}}))}activate(t){var e,r;return s(this,void 0,void 0,(function*(){let n;return(null===(r=null===(e=this.provider)||void 0===e?void 0:e.isConnected)||void 0===r?void 0:r.call(e))||(n=this.actions.startActivation()),this.isomorphicInitialize().then((()=>s(this,void 0,void 0,(function*(){if(!this.provider)throw new u;const e=yield this.provider.request({method:"eth_requestAccounts"}),r=l(yield this.provider.request({method:"eth_chainId"})),n="number"===typeof t?t:null===t||void 0===t?void 0:t.chainId;if(!n||r===n)return this.actions.update({chainId:r,accounts:e});const i="0x".concat(n.toString(16));return this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]}).catch((e=>{var r,n;if(4902===((null===(n=null===(r=e.data)||void 0===r?void 0:r.originalError)||void 0===n?void 0:n.code)||e.code)&&"number"!==typeof t){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_addEthereumChain",params:[Object.assign(Object.assign({},t),{chainId:i})]})}throw e})).then((()=>this.activate(n)))})))).catch((t=>{throw null===n||void 0===n||n(),t}))}))}watchAsset(t){let{address:e,symbol:r,decimals:n,image:i}=t;return s(this,void 0,void 0,(function*(){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,symbol:r,decimals:n,image:i}}}).then((t=>{if(!t)throw new Error("Rejected");return!0}))}))}}e.MetaMask=c},5186:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=r(1687),u=r(5123);function l(t){return"string"===typeof t||"url"in t&&!("connection"in t)}class c extends a.Connector{constructor(t){let{actions:e,urlMap:r,defaultChainId:n=Number(Object.keys(r)[0]),timeout:i=5e3}=t;super(e),this.providerCache={},this.urlMap=Object.keys(r).reduce(((t,e)=>{const n=r[Number(e)];return Array.isArray(n)?t[Number(e)]=n:t[Number(e)]=(l(n),[n]),t}),{}),this.defaultChainId=n,this.timeout=i}isomorphicInitialize(t){return s(this,void 0,void 0,(function*(){if(this.providerCache[t])return this.providerCache[t];const e=this.urlMap[t];return 1!==e.length||l(e[0])?this.providerCache[t]=Promise.resolve().then((()=>o(r(5488)))).then((r=>{let{JsonRpcProvider:n}=r;const i=e.map((e=>l(e)?new n(e,t):e));return(0,u.getBestProvider)(i,this.timeout)})):this.providerCache[t]=Promise.resolve(e[0])}))}activate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultChainId;return s(this,void 0,void 0,(function*(){let e;return this.providerCache[t]||(e=this.actions.startActivation()),this.isomorphicInitialize(t).then((t=>s(this,void 0,void 0,(function*(){this.customProvider=t;const{chainId:e}=yield this.customProvider.getNetwork();this.actions.update({chainId:e,accounts:[]})})))).catch((t=>{throw null===e||void 0===e||e(),t}))}))}}e.Network=c},5123:function(t,e){"use strict";var r=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getBestProvider=void 0,e.getBestProvider=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;return r(this,void 0,void 0,(function*(){return 1===t.length?t[0]:new Promise((r=>{let n=!1;const i={};t.forEach(((o,s)=>{const a=new Promise(((t,r)=>{o.getNetwork().then((()=>t())).catch((()=>r())),setTimeout((()=>{r()}),e)}));a.then((()=>!0)).catch((()=>!1)).then((e=>{if(!n){if(i[s]=e,Object.keys(i).length===t.length){const e=Object.keys(i).findIndex((t=>i[Number(t)]));return r(t[-1===e?0:e])}new Array(t.length).fill(0).forEach(((e,o)=>{i[o]&&new Array(o).fill(0).every(((t,e)=>!1===i[e]))&&(n=!0,r(t[o]))}))}}))}))}))}))}},611:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWeb3ReactStoreAndActions=e.MAX_SAFE_CHAIN_ID=void 0;const n=r(8987),i=r(159);e.MAX_SAFE_CHAIN_ID=0xfffffffffffec;const o={chainId:void 0,accounts:void 0,activating:!1};e.createWeb3ReactStoreAndActions=function(){const t=(0,i.createStore)()((()=>o));let r=0;return[t,{startActivation:function(){const e=++r;return t.setState(Object.assign(Object.assign({},o),{activating:!0})),()=>{r===e&&t.setState({activating:!1})}},update:function(i){if(void 0!==i.chainId&&function(t){if(!Number.isInteger(t)||t<=0||t>e.MAX_SAFE_CHAIN_ID)throw new Error("Invalid chainId ".concat(t))}(i.chainId),void 0!==i.accounts)for(let t=0;t<i.accounts.length;t++)i.accounts[t]=(o=i.accounts[t],(0,n.getAddress)(o));var o;r++,t.setState((t=>{var e,r;const n=null!==(e=i.chainId)&&void 0!==e?e:t.chainId,o=null!==(r=i.accounts)&&void 0!==r?r:t.accounts;let s=t.activating;return s&&n&&o&&(s=!1),{chainId:n,accounts:o,activating:s}}))},resetState:function(){r++,t.setState(o)}}]}},1687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Connector=void 0;e.Connector=class{constructor(t,e){this.actions=t,this.onError=e}resetState(){this.actions.resetState()}}},2479:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletConnect=e.URI_AVAILABLE=void 0;const l=r(1687),c=u(r(4874)),h=r(5578);function f(t){return"string"===typeof t?Number.parseInt(t):t}e.URI_AVAILABLE="URI_AVAILABLE";class d extends l.Connector{constructor(t){let{actions:r,options:n,defaultChainId:i,timeout:o=5e3,onError:s}=t;super(r,s),this.events=new c.default,this.disconnectListener=t=>{var e;this.actions.resetState(),t&&(null===(e=this.onError)||void 0===e||e.call(this,t))},this.chainChangedListener=t=>{this.actions.update({chainId:f(t)})},this.accountsChangedListener=t=>{this.actions.update({accounts:t})},this.URIListener=(t,r)=>{this.events.emit(e.URI_AVAILABLE,r.params[0])};const{rpc:u}=n,l=a(n,["rpc"]);this.options=l,this.rpc=Object.keys(u).reduce(((t,e)=>{const r=u[Number(e)];return t[Number(e)]=Array.isArray(r)?r:[r],t}),{}),this.defaultChainId=null!==i&&void 0!==i?i:Number(Object.keys(this.rpc)[0]),this.timeout=o}isomorphicInitialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultChainId;return s(this,void 0,void 0,(function*(){if(this.eagerConnection)return;const e=Promise.all(Object.keys(this.rpc).map((t=>s(this,void 0,void 0,(function*(){return[Number(t),yield(0,h.getBestUrl)(this.rpc[Number(t)],this.timeout)]}))))).then((t=>t.reduce(((t,e)=>{let[r,n]=e;return t[r]=n,t}),{})));return this.eagerConnection=Promise.resolve().then((()=>o(r(9201)))).then((r=>s(this,void 0,void 0,(function*(){this.provider=new r.default(Object.assign(Object.assign({},this.options),{chainId:t,rpc:yield e})),this.provider.on("disconnect",this.disconnectListener),this.provider.on("chainChanged",this.chainChangedListener),this.provider.on("accountsChanged",this.accountsChangedListener),this.provider.connector.on("display_uri",this.URIListener)}))))}))}connectEagerly(){var t;return s(this,void 0,void 0,(function*(){const e=this.actions.startActivation();try{if(yield this.isomorphicInitialize(),!(null===(t=this.provider)||void 0===t?void 0:t.connected))throw Error("No existing connection");const e=yield this.provider.request({method:"eth_accounts"});if(!e.length)throw new Error("No accounts returned");const r=yield this.provider.request({method:"eth_chainId"});this.actions.update({chainId:f(r),accounts:e})}catch(r){throw e(),r}}))}activate(t){var e,r;return s(this,void 0,void 0,(function*(){if(null===(e=this.provider)||void 0===e?void 0:e.connected){if(!t||t===this.provider.chainId)return;return this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x".concat(t.toString(16))}]})}const n=this.actions.startActivation();t&&t!==(null===(r=this.provider)||void 0===r?void 0:r.chainId)&&(yield this.deactivate());try{if(yield this.isomorphicInitialize(t),!this.provider)throw new Error("No provider");const e=yield this.provider.request({method:"eth_requestAccounts"}).catch((t=>s(this,void 0,void 0,(function*(){throw"User closed modal"===(null===t||void 0===t?void 0:t.message)&&(yield this.deactivate()),t})))),r=f(yield this.provider.request({method:"eth_chainId"}));r!==t&&(this.provider.http=this.provider.setHttpProvider(r)),this.actions.update({chainId:r,accounts:e})}catch(i){throw n(),i}}))}deactivate(){var t,e,r,n;return s(this,void 0,void 0,(function*(){null===(t=this.provider)||void 0===t||t.off("disconnect",this.disconnectListener),null===(e=this.provider)||void 0===e||e.off("chainChanged",this.chainChangedListener),null===(r=this.provider)||void 0===r||r.off("accountsChanged",this.accountsChangedListener),yield null===(n=this.provider)||void 0===n?void 0:n.disconnect(),this.provider=void 0,this.eagerConnection=void 0,this.actions.resetState()}))}}e.WalletConnect=d},5578:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getBestUrl=void 0,e.getBestUrl=function(t,e){return s(this,void 0,void 0,(function*(){if(1===t.length)return t[0];const[n,i]=yield Promise.all([Promise.resolve().then((()=>o(r(8596)))).then((t=>{let{HttpConnection:e}=t;return e})),Promise.resolve().then((()=>o(r(7312)))).then((t=>{let{JsonRpcProvider:e}=t;return e}))]);return new Promise((r=>{let o=!1;const s={};t.forEach(((a,u)=>{const l=new i(new n(a)),c=new Promise(((t,r)=>{l.request({method:"eth_chainId"}).then((()=>t())).catch((()=>r())),setTimeout((()=>{r()}),e)}));c.then((()=>!0)).catch((()=>!1)).then((e=>{if(!o){if(s[u]=e,Object.keys(s).length===t.length){const e=Object.keys(s).findIndex((t=>s[Number(t)]));return r(t[-1===e?0:e])}new Array(t.length).fill(0).forEach(((e,n)=>{s[n]&&new Array(n).fill(0).every(((t,e)=>!1===s[e]))&&(o=!0,r(t[n]))}))}}))}))}))}))}},3802:(t,e,r)=>{"use strict";r.d(e,{y:()=>i});const n=t=>{let e;const r=new Set,n=(t,n)=>{const i="function"===typeof t?t(e):t;if(!Object.is(i,e)){const t=e;e=(null!=n?n:"object"!==typeof i)?i:Object.assign({},e,i),r.forEach((r=>r(e,t)))}},i=()=>e,o={setState:n,getState:i,subscribe:t=>(r.add(t),()=>r.delete(t)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,o),o},i=t=>t?n(t):n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=t,r.amdO={},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},(()=>{var t,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"===typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"===typeof n.then)return n}var o=Object.create(null);r.r(o);var s={};t=t||[null,e({}),e([]),e(e)];for(var a=2&i&&n;"object"==typeof a&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach((t=>s[t]=()=>n[t]));return s.default=()=>n,r.d(o,s),o}})(),r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,n)=>(r.f[n](t,e),e)),[])),r.u=t=>"static/js/"+t+".31959e28.chunk.js",r.miniCssF=t=>{},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={},e="@ape.swap/bonds-sdk:";r.l=(n,i,o,s)=>{if(t[n])t[n].push(i);else{var a,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var h=l[c];if(h.getAttribute("src")==n||h.getAttribute("data-webpack")==e+o){a=h;break}}a||(u=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",e+o),a.src=n),t[n]=[i];var f=(e,r)=>{a.onerror=a.onload=null,clearTimeout(d);var i=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((t=>t(r))),e)return e(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),u&&document.head.appendChild(a)}}})(),r.r=t=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.p="/",(()=>{var t={792:0};r.f.j=(e,n)=>{var i=r.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var o=new Promise(((r,n)=>i=t[e]=[r,n]));n.push(i[2]=o);var s=r.p+r.u(e),a=new Error;r.l(s,(n=>{if(r.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,i[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var i,o,s=n[0],a=n[1],u=n[2],l=0;if(s.some((e=>0!==t[e]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)u(r)}for(e&&e(n);l<s.length;l++)o=s[l],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0},n=self.webpackChunk_ape_swap_bonds_sdk=self.webpackChunk_ape_swap_bonds_sdk||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),(()=>{"use strict";var t=r(5043),e=r.t(t,2),n=r(4391),i=r(8931),o=r(1687);let s=function(t){return t[t.POLYGON=0]="POLYGON",t[t.MAINNET=1]="MAINNET",t}({});const a=s.MAINNET,u={polygon:"",mainnet:""},l=1,c=137,h=a===s.POLYGON?137:1,f=(a===s.POLYGON?u.polygon:u.mainnet,{[c]:u.polygon,[l]:u.mainnet});u.mainnet,u.polygon;var d=r(7261);var p=r(5186);var m=r(2479);let g=function(t){return t.INJECTED="INJECTED",t.NETWORK="NETWORK",t.WALLET_CONNECT="WALLET_CONNECT",t}({});function v(t){console.debug("web3-react error: ".concat(t))}const y={[g.INJECTED]:function(){const[t,e]=(0,i.initializeConnector)((t=>new d.MetaMask({actions:t,onError:v})));return{connector:t,hooks:e,type:g.INJECTED}}(),[g.WALLET_CONNECT]:function(){const[t,e]=(0,i.initializeConnector)((t=>new m.WalletConnect({actions:t,options:{rpc:f,qrcode:!0},onError:v})));return{connector:t,hooks:e,type:g.WALLET_CONNECT}}(),[g.NETWORK]:function(){const[t,e]=(0,i.initializeConnector)((t=>new p.Network({actions:t,urlMap:f,defaultChainId:h})));return{connector:t,hooks:e,type:g.NETWORK}}()};function w(t){if(t instanceof o.Connector){const e=Object.values(y).find((e=>e.connector===t));if(!e)throw Error("Unsupported Connector");return e}switch(t){case g.INJECTED:return y[g.INJECTED];case g.WALLET_CONNECT:return y[g.WALLET_CONNECT];case g.NETWORK:return y[g.NETWORK]}}var b=r(579);const _=t=>{let{isEnabled:e,isConnected:r,connectionType:n,onActivate:i,onDeactivate:o}=t;return(0,b.jsx)("div",{children:(0,b.jsx)("button",{onClick:async()=>{if(r){const t=await(async t=>{var e;return null===(e=t.deactivate)||void 0===e||e.call(t),t.resetState(),null})(w(n).connector);if(void 0===t)return;return void o(t)}const t=await(async t=>(await t.activate(),w(t).type))(w(n).connector);t&&i(t)},disabled:!e,children:"".concat(r?"Disconnect":"Connect"," ").concat(n)})})},M=t=>{let{activeConnectionType:e,isConnectionActive:r,onActivate:n,onDeactivate:i}=t;return(0,b.jsx)("div",{className:"connectors",children:function(t){const r=function(){var t,e;return null!==(t=null===(e=window.ethereum)||void 0===e?void 0:e.isMetaMask)&&void 0!==t&&t}(),o=!t||t&&null===e,s=r?(0,b.jsx)(_,{isEnabled:o||e===g.INJECTED,isConnected:e===g.INJECTED,connectionType:g.INJECTED,onActivate:n,onDeactivate:i}):(0,b.jsx)("a",{href:"https://metamask.io/",children:(0,b.jsx)("button",{children:"Install Metamask"})}),a=(0,b.jsx)(_,{isEnabled:o||e===g.WALLET_CONNECT,isConnected:e===g.WALLET_CONNECT,connectionType:g.WALLET_CONNECT,onActivate:n,onDeactivate:i});return(0,b.jsxs)(b.Fragment,{children:[s,a]})}(r)})};var E=function(){function t(t){var e=this;this._insertTag=function(t){var r;r=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,r),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{r.insertRule(t,r.cssRules.length)}catch(n){0}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),k=Math.abs,A=String.fromCharCode,x=Object.assign;function S(t){return t.trim()}function N(t,e,r){return t.replace(e,r)}function C(t,e){return t.indexOf(e)}function I(t,e){return 0|t.charCodeAt(e)}function P(t,e,r){return t.slice(e,r)}function R(t){return t.length}function O(t){return t.length}function T(t,e){return e.push(t),t}var B=1,L=1,j=0,F=0,U=0,D="";function z(t,e,r,n,i,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:B,column:L,length:s,return:""}}function q(t,e){return x(z("",null,null,"",null,null,0),t,{length:-t.length},e)}function V(){return U=F>0?I(D,--F):0,L--,10===U&&(L=1,B--),U}function H(){return U=F<j?I(D,F++):0,L++,10===U&&(L=1,B++),U}function W(){return I(D,F)}function Y(){return F}function K(t,e){return P(D,t,e)}function G(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function J(t){return B=L=1,j=R(D=t),F=0,[]}function Q(t){return D="",t}function Z(t){return S(K(F-1,tt(91===t?t+2:40===t?t+1:t)))}function X(t){for(;(U=W())&&U<33;)H();return G(t)>2||G(U)>3?"":" "}function $(t,e){for(;--e&&H()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return K(t,Y()+(e<6&&32==W()&&32==H()))}function tt(t){for(;H();)switch(U){case t:return F;case 34:case 39:34!==t&&39!==t&&tt(U);break;case 40:41===t&&tt(t);break;case 92:H()}return F}function et(t,e){for(;H()&&t+U!==57&&(t+U!==84||47!==W()););return"/*"+K(e,F-1)+"*"+A(47===t?t:H())}function rt(t){for(;!G(W());)H();return K(t,F)}var nt="-ms-",it="-moz-",ot="-webkit-",st="comm",at="rule",ut="decl",lt="@keyframes";function ct(t,e){for(var r="",n=O(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function ht(t,e,r,n){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case ut:return t.return=t.return||t.value;case st:return"";case lt:return t.return=t.value+"{"+ct(t.children,n)+"}";case at:t.value=t.props.join(",")}return R(r=ct(t.children,n))?t.return=t.value+"{"+r+"}":""}function ft(t){return Q(dt("",null,null,null,[""],t=J(t),0,[0],t))}function dt(t,e,r,n,i,o,s,a,u){for(var l=0,c=0,h=s,f=0,d=0,p=0,m=1,g=1,v=1,y=0,w="",b=i,_=o,M=n,E=w;g;)switch(p=y,y=H()){case 40:if(108!=p&&58==I(E,h-1)){-1!=C(E+=N(Z(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=Z(y);break;case 9:case 10:case 13:case 32:E+=X(p);break;case 92:E+=$(Y()-1,7);continue;case 47:switch(W()){case 42:case 47:T(mt(et(H(),Y()),e,r),u);break;default:E+="/"}break;case 123*m:a[l++]=R(E)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(E=N(E,/\f/g,"")),d>0&&R(E)-h&&T(d>32?gt(E+";",n,r,h-1):gt(N(E," ","")+";",n,r,h-2),u);break;case 59:E+=";";default:if(T(M=pt(E,e,r,l,c,i,a,w,b=[],_=[],h),o),123===y)if(0===c)dt(E,e,M,M,b,o,h,a,_);else switch(99===f&&110===I(E,3)?100:f){case 100:case 108:case 109:case 115:dt(t,M,M,n&&T(pt(t,M,M,0,0,i,a,w,i,b=[],h),_),i,_,h,a,n?b:_);break;default:dt(E,M,M,M,[""],_,0,a,_)}}l=c=d=0,m=v=1,w=E="",h=s;break;case 58:h=1+R(E),d=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==V())continue;switch(E+=A(y),y*m){case 38:v=c>0?1:(E+="\f",-1);break;case 44:a[l++]=(R(E)-1)*v,v=1;break;case 64:45===W()&&(E+=Z(H())),f=W(),c=h=R(w=E+=rt(Y())),y++;break;case 45:45===p&&2==R(E)&&(m=0)}}return o}function pt(t,e,r,n,i,o,s,a,u,l,c){for(var h=i-1,f=0===i?o:[""],d=O(f),p=0,m=0,g=0;p<n;++p)for(var v=0,y=P(t,h+1,h=k(m=s[p])),w=t;v<d;++v)(w=S(m>0?f[v]+" "+y:N(y,/&\f/g,f[v])))&&(u[g++]=w);return z(t,e,r,0===i?at:a,u,l,c)}function mt(t,e,r){return z(t,e,r,st,A(U),P(t,2,-2),0)}function gt(t,e,r,n){return z(t,e,r,ut,P(t,0,n),P(t,n+1,-1),n)}var vt=function(t,e,r){for(var n=0,i=0;n=i,i=W(),38===n&&12===i&&(e[r]=1),!G(i);)H();return K(t,F)},yt=function(t,e){return Q(function(t,e){var r=-1,n=44;do{switch(G(n)){case 0:38===n&&12===W()&&(e[r]=1),t[r]+=vt(F-1,e,r);break;case 2:t[r]+=Z(n);break;case 4:if(44===n){t[++r]=58===W()?"&\f":"",e[r]=t[r].length;break}default:t[r]+=A(n)}}while(n=H());return t}(J(t),e))},wt=new WeakMap,bt=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,r=t.parent,n=t.column===r.column&&t.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||wt.get(r))&&!n){wt.set(t,!0);for(var i=[],o=yt(e,i),s=r.props,a=0,u=0;a<o.length;a++)for(var l=0;l<s.length;l++,u++)t.props[u]=i[a]?o[a].replace(/&\f/g,s[l]):s[l]+" "+o[a]}}},_t=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function Mt(t,e){switch(function(t,e){return 45^I(t,0)?(((e<<2^I(t,0))<<2^I(t,1))<<2^I(t,2))<<2^I(t,3):0}(t,e)){case 5103:return ot+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ot+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ot+t+it+t+nt+t+t;case 6828:case 4268:return ot+t+nt+t+t;case 6165:return ot+t+nt+"flex-"+t+t;case 5187:return ot+t+N(t,/(\w+).+(:[^]+)/,ot+"box-$1$2"+nt+"flex-$1$2")+t;case 5443:return ot+t+nt+"flex-item-"+N(t,/flex-|-self/,"")+t;case 4675:return ot+t+nt+"flex-line-pack"+N(t,/align-content|flex-|-self/,"")+t;case 5548:return ot+t+nt+N(t,"shrink","negative")+t;case 5292:return ot+t+nt+N(t,"basis","preferred-size")+t;case 6060:return ot+"box-"+N(t,"-grow","")+ot+t+nt+N(t,"grow","positive")+t;case 4554:return ot+N(t,/([^-])(transform)/g,"$1"+ot+"$2")+t;case 6187:return N(N(N(t,/(zoom-|grab)/,ot+"$1"),/(image-set)/,ot+"$1"),t,"")+t;case 5495:case 3959:return N(t,/(image-set\([^]*)/,ot+"$1$`$1");case 4968:return N(N(t,/(.+:)(flex-)?(.*)/,ot+"box-pack:$3"+nt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ot+t+t;case 4095:case 3583:case 4068:case 2532:return N(t,/(.+)-inline(.+)/,ot+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(R(t)-1-e>6)switch(I(t,e+1)){case 109:if(45!==I(t,e+4))break;case 102:return N(t,/(.+:)(.+)-([^]+)/,"$1"+ot+"$2-$3$1"+it+(108==I(t,e+3)?"$3":"$2-$3"))+t;case 115:return~C(t,"stretch")?Mt(N(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==I(t,e+1))break;case 6444:switch(I(t,R(t)-3-(~C(t,"!important")&&10))){case 107:return N(t,":",":"+ot)+t;case 101:return N(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ot+(45===I(t,14)?"inline-":"")+"box$3$1"+ot+"$2$3$1"+nt+"$2box$3")+t}break;case 5936:switch(I(t,e+11)){case 114:return ot+t+nt+N(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ot+t+nt+N(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ot+t+nt+N(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ot+t+nt+t+t}return t}var Et=[function(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case ut:t.return=Mt(t.value,t.length);break;case lt:return ct([q(t,{value:N(t.value,"@","@"+ot)})],n);case at:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=e.exec(t))?t[0]:t}(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ct([q(t,{props:[N(e,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return ct([q(t,{props:[N(e,/:(plac\w+)/,":"+ot+"input-$1")]}),q(t,{props:[N(e,/:(plac\w+)/,":-moz-$1")]}),q(t,{props:[N(e,/:(plac\w+)/,nt+"input-$1")]})],n)}return""}))}}],kt=function(t){var e=t.key;if("css"===e){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var n=t.stylisPlugins||Et;var i,o,s={},a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),r=1;r<e.length;r++)s[e[r]]=!0;a.push(t)}));var u,l,c=[ht,(l=function(t){u.insert(t)},function(t){t.root||(t=t.return)&&l(t)})],h=function(t){var e=O(t);return function(r,n,i,o){for(var s="",a=0;a<e;a++)s+=t[a](r,n,i,o)||"";return s}}([bt,_t].concat(n,c));o=function(t,e,r,n){u=r,ct(ft(t?t+"{"+e.styles+"}":e.styles),h),n&&(f.inserted[e.name]=!0)};var f={key:e,sheet:new E({key:e,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:o};return f.sheet.hydrate(a),f};var At=function(t,e,r){var n=t.key+"-"+e.name;!1===r&&void 0===t.registered[n]&&(t.registered[n]=e.styles)},xt=function(t,e,r){At(t,e,r);var n=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+n:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}};var St={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Nt(t){var e=Object.create(null);return function(r){return void 0===e[r]&&(e[r]=t(r)),e[r]}}var Ct=/[A-Z]|^ms/g,It=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pt=function(t){return 45===t.charCodeAt(1)},Rt=function(t){return null!=t&&"boolean"!==typeof t},Ot=Nt((function(t){return Pt(t)?t:t.replace(Ct,"-$&").toLowerCase()})),Tt=function(t,e){switch(t){case"animation":case"animationName":if("string"===typeof e)return e.replace(It,(function(t,e,r){return Lt={name:e,styles:r,next:Lt},e}))}return 1===St[t]||Pt(t)||"number"!==typeof e||0===e?e:e+"px"};function Bt(t,e,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Lt={name:r.name,styles:r.styles,next:Lt},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)Lt={name:n.name,styles:n.styles,next:Lt},n=n.next;return r.styles+";"}return function(t,e,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Bt(t,e,r[i])+";";else for(var o in r){var s=r[o];if("object"!==typeof s)null!=e&&void 0!==e[s]?n+=o+"{"+e[s]+"}":Rt(s)&&(n+=Ot(o)+":"+Tt(o,s)+";");else if(!Array.isArray(s)||"string"!==typeof s[0]||null!=e&&void 0!==e[s[0]]){var a=Bt(t,e,s);switch(o){case"animation":case"animationName":n+=Ot(o)+":"+a+";";break;default:n+=o+"{"+a+"}"}}else for(var u=0;u<s.length;u++)Rt(s[u])&&(n+=Ot(o)+":"+Tt(o,s[u])+";")}return n}(t,e,r);case"function":if(void 0!==t){var i=Lt,o=r(t);return Lt=i,Bt(t,e,o)}}if(null==e)return r;var s=e[r];return void 0!==s?s:r}var Lt,jt=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Ft=function(t,e,r){if(1===t.length&&"object"===typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var n=!0,i="";Lt=void 0;var o=t[0];null==o||void 0===o.raw?(n=!1,i+=Bt(r,e,o)):i+=o[0];for(var s=1;s<t.length;s++)i+=Bt(r,e,t[s]),n&&(i+=o[s]);jt.lastIndex=0;for(var a,u="";null!==(a=jt.exec(i));)u+="-"+a[1];var l=function(t){for(var e,r=0,n=0,i=t.length;i>=4;++n,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+(59797*(e>>>16)<<16),r=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&t.charCodeAt(n+2))<<16;case 2:r^=(255&t.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:l,styles:i,next:Lt}},Ut=!!e.useInsertionEffect&&e.useInsertionEffect,Dt=Ut||function(t){return t()},zt=Ut||t.useLayoutEffect,qt={}.hasOwnProperty,Vt=t.createContext("undefined"!==typeof HTMLElement?kt({key:"css"}):null);Vt.Provider;var Ht=function(e){return(0,t.forwardRef)((function(r,n){var i=(0,t.useContext)(Vt);return e(r,i,n)}))};var Wt=t.createContext({});var Yt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Kt=function(t,e){var r={};for(var n in e)qt.call(e,n)&&(r[n]=e[n]);return r[Yt]=t,r},Gt=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return At(e,r,n),Dt((function(){return xt(e,r,n)})),null};var Jt=Ht((function(e,r,n){var i=e.css;"string"===typeof i&&void 0!==r.registered[i]&&(i=r.registered[i]);var o=e[Yt],s=[i],a="";"string"===typeof e.className?a=function(t,e,r){var n="";return r.split(" ").forEach((function(r){void 0!==t[r]?e.push(t[r]+";"):n+=r+" "})),n}(r.registered,s,e.className):null!=e.className&&(a=e.className+" ");var u=Ft(s,void 0,t.useContext(Wt));a+=r.key+"-"+u.name;var l={};for(var c in e)qt.call(e,c)&&"css"!==c&&c!==Yt&&(l[c]=e[c]);return l.ref=n,l.className=a,t.createElement(t.Fragment,null,t.createElement(Gt,{cache:r,serialized:u,isStringTag:"string"===typeof o}),t.createElement(o,l))})),Qt=(r(219),function(e,r){var n=arguments;if(null==r||!qt.call(r,"css"))return t.createElement.apply(void 0,n);var i=n.length,o=new Array(i);o[0]=Jt,o[1]=Kt(e,r);for(var s=2;s<i;s++)o[s]=n[s];return t.createElement.apply(null,o)}),Zt=Ht((function(e,r){var n=e.styles,i=Ft([n],void 0,t.useContext(Wt)),o=t.useRef();return zt((function(){var t=r.key+"-global",e=new r.sheet.constructor({key:t,nonce:r.sheet.nonce,container:r.sheet.container,speedy:r.sheet.isSpeedy}),n=!1,s=document.querySelector('style[data-emotion="'+t+" "+i.name+'"]');return r.sheet.tags.length&&(e.before=r.sheet.tags[0]),null!==s&&(n=!0,s.setAttribute("data-emotion",t),e.hydrate([s])),o.current=[e,n],function(){e.flush()}}),[r]),zt((function(){var t=o.current,e=t[0];if(t[1])t[1]=!1;else{if(void 0!==i.next&&xt(r,i.next,!0),e.tags.length){var n=e.tags[e.tags.length-1].nextElementSibling;e.before=n,e.flush()}r.insert("",i,e,!1)}}),[r,i.name]),null}));var Xt=r(7789),$t=r.n(Xt);function te(){return te=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},te.apply(this,arguments)}var ee="__default",re=function(t){return"object"===typeof t&&null!==t&&ee in t};function ne(t,e,r,n,i){var o=e&&"string"===typeof e?e.split("."):[e];for(n=0;n<o.length;n++)t=t?t[o[n]]:i;return t===i?r:re(t)?t[ee]:t}var ie=function t(e,r){if(e&&e.variant){var n={};for(var i in e){var o=e[i];if("variant"===i)n=te({},n,t(ne(r,"function"===typeof o?o(r):o),r));else n[i]=o}return n}return e},oe=[40,52,64].map((function(t){return t+"em"})),se={space:[0,4,8,16,32,64,128,256,512],fontSizes:[12,14,16,20,24,32,48,64,72]},ae={bg:"backgroundColor",m:"margin",mt:"marginTop",mr:"marginRight",mb:"marginBottom",ml:"marginLeft",mx:"marginX",my:"marginY",p:"padding",pt:"paddingTop",pr:"paddingRight",pb:"paddingBottom",pl:"paddingLeft",px:"paddingX",py:"paddingY"},ue={marginX:["marginLeft","marginRight"],marginY:["marginTop","marginBottom"],paddingX:["paddingLeft","paddingRight"],paddingY:["paddingTop","paddingBottom"],scrollMarginX:["scrollMarginLeft","scrollMarginRight"],scrollMarginY:["scrollMarginTop","scrollMarginBottom"],scrollPaddingX:["scrollPaddingLeft","scrollPaddingRight"],scrollPaddingY:["scrollPaddingTop","scrollPaddingBottom"],size:["width","height"]},le={color:"colors",background:"colors",backgroundColor:"colors",borderColor:"colors",caretColor:"colors",columnRuleColor:"colors",outlineColor:"colors",textDecorationColor:"colors",opacity:"opacities",transition:"transitions",margin:"space",marginTop:"space",marginRight:"space",marginBottom:"space",marginLeft:"space",marginX:"space",marginY:"space",marginBlock:"space",marginBlockEnd:"space",marginBlockStart:"space",marginInline:"space",marginInlineEnd:"space",marginInlineStart:"space",padding:"space",paddingTop:"space",paddingRight:"space",paddingBottom:"space",paddingLeft:"space",paddingX:"space",paddingY:"space",paddingBlock:"space",paddingBlockEnd:"space",paddingBlockStart:"space",paddingInline:"space",paddingInlineEnd:"space",paddingInlineStart:"space",scrollMargin:"space",scrollMarginTop:"space",scrollMarginRight:"space",scrollMarginBottom:"space",scrollMarginLeft:"space",scrollMarginX:"space",scrollMarginY:"space",scrollPadding:"space",scrollPaddingTop:"space",scrollPaddingRight:"space",scrollPaddingBottom:"space",scrollPaddingLeft:"space",scrollPaddingX:"space",scrollPaddingY:"space",inset:"space",insetBlock:"space",insetBlockEnd:"space",insetBlockStart:"space",insetInline:"space",insetInlineEnd:"space",insetInlineStart:"space",top:"space",right:"space",bottom:"space",left:"space",gridGap:"space",gridColumnGap:"space",gridRowGap:"space",gap:"space",columnGap:"space",rowGap:"space",fontFamily:"fonts",fontSize:"fontSizes",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",border:"borders",borderTop:"borders",borderRight:"borders",borderBottom:"borders",borderLeft:"borders",borderWidth:"borderWidths",borderStyle:"borderStyles",borderRadius:"radii",borderTopRightRadius:"radii",borderTopLeftRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",borderTopWidth:"borderWidths",borderTopColor:"colors",borderTopStyle:"borderStyles",borderBottomWidth:"borderWidths",borderBottomColor:"colors",borderBottomStyle:"borderStyles",borderLeftWidth:"borderWidths",borderLeftColor:"colors",borderLeftStyle:"borderStyles",borderRightWidth:"borderWidths",borderRightColor:"colors",borderRightStyle:"borderStyles",borderBlock:"borders",borderBlockColor:"colors",borderBlockEnd:"borders",borderBlockEndColor:"colors",borderBlockEndStyle:"borderStyles",borderBlockEndWidth:"borderWidths",borderBlockStart:"borders",borderBlockStartColor:"colors",borderBlockStartStyle:"borderStyles",borderBlockStartWidth:"borderWidths",borderBlockStyle:"borderStyles",borderBlockWidth:"borderWidths",borderEndEndRadius:"radii",borderEndStartRadius:"radii",borderInline:"borders",borderInlineColor:"colors",borderInlineEnd:"borders",borderInlineEndColor:"colors",borderInlineEndStyle:"borderStyles",borderInlineEndWidth:"borderWidths",borderInlineStart:"borders",borderInlineStartColor:"colors",borderInlineStartStyle:"borderStyles",borderInlineStartWidth:"borderWidths",borderInlineStyle:"borderStyles",borderInlineWidth:"borderWidths",borderStartEndRadius:"radii",borderStartStartRadius:"radii",columnRuleWidth:"borderWidths",boxShadow:"shadows",textShadow:"shadows",zIndex:"zIndices",width:"sizes",minWidth:"sizes",maxWidth:"sizes",height:"sizes",minHeight:"sizes",maxHeight:"sizes",flexBasis:"sizes",size:"sizes",blockSize:"sizes",inlineSize:"sizes",maxBlockSize:"sizes",maxInlineSize:"sizes",minBlockSize:"sizes",minInlineSize:"sizes",columnWidth:"sizes",fill:"colors",stroke:"colors"},ce=function(t,e){if("number"!==typeof e||e>=0){if("string"===typeof e&&e.startsWith("-")){var r=e.substring(1),n=ne(t,r,r);return"number"===typeof n?-1*n:"-"+n}return ne(t,e,e)}var i=Math.abs(e),o=ne(t,i,i);return"string"===typeof o?"-"+o:-1*Number(o)},he=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","top","bottom","left","right"].reduce((function(t,e){var r;return te({},t,((r={})[e]=ce,r))}),{}),fe=function t(e){return void 0===e&&(e={}),function(r){void 0===r&&(r={});var n=te({},se,"theme"in r?r.theme:r),i=function(t){return function(e){var r={},n=e&&e.breakpoints||oe,i=[null].concat(n.map((function(t){return t.includes("@media")?t:"@media screen and (min-width: "+t+")"})));for(var o in t){var s=o,a=t[s];if("function"===typeof a&&(a=a(e||{})),!1!==a&&null!=a)if(Array.isArray(a))for(var u=0;u<a.slice(0,i.length).length;u++){var l=i[u];l?(r[l]=r[l]||{},null!=a[u]&&(r[l][s]=a[u])):r[s]=a[u]}else r[s]=a}return r}}(ie("function"===typeof e?e(n):e,n))(n),o={};for(var s in i){var a=i[s],u="function"===typeof a?a(n):a;if(u&&"object"===typeof u){if(re(u)){o[s]=u[ee];continue}o[s]=t(u)(n)}else{var l=s in ae?ae[s]:s,c=l in le?le[l]:void 0,h=c?null==n?void 0:n[c]:ne(n,l,{}),f=ne(he,l,ne)(h,u,u);if(l in ue)for(var d=ue[l],p=0;p<d.length;p++)o[d[p]]=f;else o[l]=f}}return o}};function de(t){if(!t||!t.sx&&!t.css)return t;var e={};for(var r in t)"sx"!==r&&(e[r]=t[r]);return e.css=function(t){return function(e){return[fe(t.sx)(e),"function"===typeof t.css?t.css(e):t.css]}}(t),e}function pe(){return pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pe.apply(this,arguments)}var me=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return Qt.apply(void 0,[t,de(e)].concat(n))},ge={__EMOTION_VERSION__:"11.11.4",theme:{}},ve=t.createContext(ge),ye=function(){return t.useContext(ve)},we="function"===typeof Symbol&&Symbol.for,be=we?Symbol.for("react.element"):60103,_e=we?Symbol.for("react.forward_ref"):60103,Me={isMergeableObject:function(t){return!!t&&"object"===typeof t&&t.$$typeof!==be&&t.$$typeof!==_e},arrayMerge:function(t,e){return e}},Ee=function(t,e){return $t()(t,e,Me)};Ee.all=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return $t().all(e,Me)};var ke=function(t){var e=t.context,r=t.children;return me(Wt.Provider,{value:e.theme},me(ve.Provider,{value:e,children:r}))};function Ae(t){var e=t.theme,r=t.children,n=ye();var i="function"===typeof e?pe({},n,{theme:e(n.theme)}):Ee.all({},n,{theme:e});return me(ke,{context:i,children:r})}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xe.apply(this,arguments)}var Se=function(t){return"--theme-ui-"+t.replace("-__default","")},Ne=function(t){return"var("+Se(t)+")"},Ce=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.filter(Boolean).join("-")},Ie=new Set(["useCustomProperties","initialColorModeName","printColorModeName","initialColorMode","useLocalStorage","config"]),Pe=function t(e,r){var n=Array.isArray(e)?[]:{};for(var i in e){var o=e[i],s=Ce(r,i);o&&"object"===typeof o?n[i]=t(o,s):Ie.has(i)?n[i]=o:n[i]=Ne(s)}return n},Re=function t(e,r){var n={};for(var i in r)if("modes"!==i){var o=Ce(e,i),s=r[i];s&&"object"===typeof s?n=xe({},n,t(o,s)):n[Se(o)]=s}return n},Oe=function(t){void 0===t&&(t={});var e=t.config||t||{},r=e.useCustomProperties,n=e.initialColorModeName,i=e.printColorModeName,o=e.useRootStyles,s=t.rawColors||t.colors;if(!s||!1===o)return{};if(!1===r)return fe({color:"text",bg:"background"})(t);var a=s.modes||{},u=Te(s,a);if(i){var l=a[i];l||i!==n||(l=s),l?u["@media print"]=Re("colors",l):console.error("Theme UI `printColorModeName` was not found in colors scale",{colors:s,printColorModeName:i})}var c=function(t){return Ne("colors-"+t)};return fe(xe({},u,{color:c("text"),bg:c("background")}))(t)};function Te(t,e){var r=Re("colors",t);return Object.keys(e).forEach((function(t){var n=".theme-ui-"+t;r["&"+n+", "+n+" &"]=Re("colors",e[t])})),r}var Be="theme-ui-color-mode",Le="(prefers-color-scheme: dark)",je=function(){try{return window.localStorage.getItem(Be)}catch(t){console.warn("localStorage is disabled and color mode might not work as expected.","Please check your Site Settings.",t)}},Fe=function(t){try{window.localStorage.setItem(Be,t)}catch(e){console.warn("localStorage is disabled and color mode might not work as expected.","Please check your Site Settings.",e)}},Ue=function(){if("undefined"!==typeof window&&window.matchMedia){if(window.matchMedia(Le).matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null},De="undefined"===typeof window?function(){}:t.useLayoutEffect,ze=function(e){var r=e.outerCtx,n=e.children,i=r.theme||{},o=i.config||i,s=o.initialColorModeName,a=o.useColorSchemeMediaQuery,u=o.useLocalStorage,l=(0,t.useState)((function(){return!1!==a&&Ue()||s})),c=l[0],h=l[1];De((function(){var t=!1!==u&&je();"undefined"!==typeof document&&document.documentElement.classList.remove("theme-ui-"+t),"system"!==a&&t&&t!==c&&(c=t,h(t))}),[]),(0,t.useEffect)((function(){c&&!1!==u&&Fe(c)}),[c,u]);var f=(0,t.useCallback)((function(){var t=Ue();h(t||s)}),[s]);(0,t.useEffect)((function(){if("system"===a&&window.matchMedia){var t=window.matchMedia(Le);"function"===typeof t.addEventListener?t.addEventListener("change",f):"function"===typeof t.addListener&&t.addListener(f)}return function(){if("system"===a&&window.matchMedia){var t=window.matchMedia(Le);"function"===typeof t.removeEventListener?t.removeEventListener("change",f):"function"===typeof t.removeListener&&t.removeListener(f)}}}),[a,f]);var d=He({colorMode:c,outerTheme:i}),p=xe({},r,{theme:d,colorMode:c,setColorMode:h});return t.createElement(ke,{context:p},t.createElement(We,{theme:d}),n)};var qe=function(t){var e=xe({},t);return delete e.modes,e};function Ve(t,e){for(var r=0,n=Object.entries(t);r<n.length;r++){var i=n[r],o=i[0],s=i[1];if("string"!==typeof s||s.startsWith("var(")){if("object"===typeof s){var a=xe({},e[o]);Ve(s,a),e[o]=a}}else e[o]=s}}function He(e){var r=e.outerTheme,n=e.colorMode,i=(0,t.useMemo)((function(){var t=xe({},r),e=ne(t,"colors.modes",{}),i=ne(e,n,{});n&&(t.colors=xe({},t.colors,i));var o=r.config||r,s=o.useCustomProperties,a=o.initialColorModeName,u=void 0===a?"__default":a,l=r.rawColors||r.colors||{};if(!1!==s){var c=null!=t.rawColors,h=t.colors||{};if(c)Ve(h,l=xe({},l)),l.modes&&(l.modes[u]=qe(l)),t.rawColors=l;else if("modes"in l){var f,d=xe(((f={})[u]=qe(l),f),l.modes);t.rawColors=xe({},h,{modes:d})}else t.rawColors=h;t.colors=Pe(qe(l),"colors")}return t}),[n,r]);return i}function We(t){var e=t.theme;return me(Zt,{styles:function(){return{html:Oe(e)}}})}function Ye(e){var r,n=e.outerCtx,i=e.children,o=He({outerTheme:n.theme,colorMode:n.colorMode}),s=(0,t.useState)((function(){var t;return!1!==(null==(t=o.config)?void 0:t.useLocalStorage)})),a=s[0],u=s[1];De((function(){u(!1)}),[]);var l=o.rawColors||o.colors,c=null==(r=o.config)?void 0:r.useCustomProperties,h=(0,t.useMemo)((function(){if(!1===c)return{};var t=l||{};return fe(Te(t,t.modes||{}))(o)}),[o,l,c]);return t.createElement(ke,{context:xe({},n,{theme:o})},me("div",{"data-themeui-nested-provider":!0,key:Number(a),suppressHydrationWarning:!0,css:h,children:i}))}var Ke=function(e){var r=e.children,n=ye();return"function"!==typeof n.setColorMode?t.createElement(ze,{outerCtx:n},r):t.createElement(Ye,{outerCtx:n},r)},Ge=function(){return me(Zt,{styles:function(t){var e,r=t;if(!1===(r.config||r).useRootStyles||r.styles&&!r.styles.root)return null;var n=!1===(null==(e=r.config)?void 0:e.useBorderBox)?void 0:"border-box";return fe({"*":{boxSizing:n},html:{variant:"styles.root"},body:{margin:0}})(r)}})},Je=function(e){var r=e.theme,n=e.children,i=ye()===ge;return t.createElement(Ae,{theme:r},t.createElement(Ke,null,i&&t.createElement(Ge,null),n))};const Qe=370,Ze=576,Xe=852,$e=968,tr=1080,er=1200,rr=1550,nr={xs:"@media screen and (min-width: ".concat(Qe,"px)"),sm:"@media screen and (min-width: ".concat(Ze,"px)"),md:"@media screen and (min-width: ".concat(Xe,"px)"),lg:"@media screen and (min-width: ".concat($e,"px)"),xl:"@media screen and (min-width: ".concat(tr,"px)"),xxl:"@media screen and (min-width: ".concat(er,"px)"),xxxl:"@media screen and (min-width: ".concat(rr,"px)"),nav:"@media screen and (min-width: ".concat($e,"px)")},ir={padding:"10px 20px 10px 19px",fontSize:"16px",fontFamily:"body",cursor:"pointer",fontWeight:700,display:"flex",alignItems:"center","&&":{borderRadius:"normal"}},or={...{breakpoints:["".concat(Qe,"px"),"".concat(Ze,"px"),"".concat(Xe,"px"),"".concat($e,"px"),"".concat(tr,"px"),"".concat(er,"px"),"".concat(rr,"px")],space:[0,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,48,64],fontSizes:[12,14,16,18,20,22,24,26,28,30,32,48,64],borderWidths:[0,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,48,64],mediaQueries:nr,fontWeights:{light:400,normal:600,bold:700},fonts:{body:"Poppins, sans-serif",poppins:"Poppins"},radii:{small:"6px",default:"16px",normal:"10px",card:"32px",circle:"50%"},zIndices:{dropdown:10,modal:102},styles:{root:{fontFamily:"body",webkitFontSmoothing:"antialiasing",fontWeight:600,color:"text",bg:"white1",textDecoration:"none"},a:{color:"text",textDecoration:"none",":hover":{color:"secondary",textDecoration:"underline"}},nav:{textDecoration:"none",breakpoints:["@media screen and (min-width: ".concat($e,"px)")],a:{textDecoration:"none"}},progress:{primary:"primary",color:"green",background:"#DAA628",height:"20px"},hr:{background:"dividerColor",height:"1px",border:"none"},h1:{variant:"text.heading",fontSize:"30px",lineHeight:"45px"},h2:{variant:"text.heading",fontSize:"25px",lineHeight:"37px"},h3:{variant:"text.heading",fontSize:"22px",lineHeight:"33px"},h4:{variant:"text.heading",fontSize:"20px",lineHeight:"30px"},h5:{variant:"text.heading",fontSize:"16px",lineHeight:"24px"},banner:{variant:"text.heading",fontWeight:"800",fontSize:"60px",lineHeight:"66px"},input:{fontFamily:"base",fontWeight:"base"}}},...{text:{heading:{fontFamily:"body",fontWeight:"bold"},lg:{fontSize:6,lineHeight:"33px"},md:{fontSize:3,lineHeight:"24px"},sm:{fontSize:1,lineHeight:"18px"}},input:{fontFamily:"body",fontWeight:700,sm:{background:"white3",borderRadius:10,height:"32px",width:"200px"},md:{background:"white3",borderRadius:10,height:"36px",width:"200px"},lg:{background:"white3",borderRadius:14,height:"48px",width:"200px"}},textarea:{padding:"10px 13px 10px 10px",borderRadius:"normal",border:"none",fontWeight:"normal",background:"lvl1",resize:"none",color:"textareaColor","&:focus":{outline:"none !important"}},checkbox:{background:"white2",borderRadius:"5px",borderWidth:"2px",borderStyle:"solid",borderColor:"white3",boxShadow:"none",outline:"none",appearance:"none",width:"inherit",height:"inherit",margin:"0px",cursor:"pointer","& + svg":{display:"none",position:"absolute",pointerEvents:"none",top:"0",left:"0",bottom:"0",right:"0",margin:"auto"},"&:checked ":{background:"var(--theme-ui-colors-primaryButton)",borderColor:"var(--theme-ui-colors-primaryButton)","& + svg":{display:"block"}},"&:focus:not(:checked)":{outline:"none",boxShadow:"none"},"&:focus":{outline:"none",boxShadow:"0px 0px 0px 1px var(--theme-ui-colors-primaryButton), 0px 0px 0px 4px var(--theme-ui-colors-white3)"},"&:hover:not(:disabled):not(:checked)":{borderColor:"var(--theme-ui-colors-primaryButton)",boxShadow:"0px 0px 0px 1px var(--theme-ui-colors-primaryButton), 0px 0px 0px 4px var(--theme-ui-colors-white3)"}},radio:{background:"lvl1",borderRadius:"50px",borderWidth:"2px",borderStyle:"solid",borderColor:"lvl2",boxShadow:"none",outline:"none",appearance:"none",width:"inherit",height:"inherit",margin:"0px",cursor:"pointer","& + span":{display:"none",position:"absolute",pointerEvents:"none",top:"0",left:"0",bottom:"0",right:"0",margin:"auto",backgroundColor:"radioChecked",borderRadius:"50px"},"&:checked ":{background:"var(--theme-ui-colors-yellow)",borderColor:"var(--theme-ui-colors-yellow)","& + span":{display:"block"}},"&:focus":{outline:"none",boxShadow:"0px 0px 0px 1px var(--theme-ui-colors-yellow), 0px 0px 0px 4px rgb(255, 179, 0, .2)"},"&:hover:not(:disabled):not(:checked)":{borderColor:"var(--theme-ui-colors-yellow)"}},label:{inline:{display:"inline-flex",alignItems:"center",columnGap:2}},borders:{primaryButton:"3px solid var(--theme-ui-colors-primaryButton)",primaryBtnDisable:"3px solid transparent",secondaryButton:"3px solid var(--theme-ui-colors-primaryButton)",secondaryButtonDisable:"3px solid #FDFBF5",mode:{dark:{secondaryButtonDisable:"3px solid #F9F4E7"}}},buttons:{primary:{...ir,background:"primaryButton",border:"primaryButton",color:"primaryBright","&:disabled":{cursor:"not-allowed",background:"white3",color:"textDisabledButton",border:"primaryBtnDisable",opacity:.9},"&:hover":{"&:not([disabled])":{borderColor:"rgba(var(--theme-ui-colors-primaryButton), 0.7)",background:"rgba(var(--theme-ui-colors-primaryButton), 0.7)"},"&:disabled":{}}},secondary:{...ir,background:"transparent",border:"secondaryButton",color:"var(--theme-ui-colors-primaryButton)","&:disabled":{cursor:"not-allowed",background:"white3",color:"primaryButtonDisable",border:"primaryBtnDisable"},"&&:hover":{"&:not([disabled])":{borderColor:"rgba(var(--theme-ui-colors-primaryButton), 0.7)"},"&:disabled":{}}},tertiary:{...ir,background:"white3",border:"none",color:"text","&:disabled":{cursor:"not-allowed",background:"white3",color:"primaryButtonDisable"},"&:hover":{"&:not([disabled])":{background:"white4"},"&:disabled":{}}},text:{...ir,background:"transparent",color:"text","&:hover":{"&:not([disabled])":{color:"var(--theme-ui-colors-yellow)"},"&:disabled":{}},"&:disabled":{cursor:"not-allowed",background:"white3",color:"primaryButtonDisable"}},success:{...ir,background:"success",color:"primaryBright","&:disabled":{cursor:"not-allowed",background:"white3",color:"primaryButtonDisable"},"&:hover":{"&:not([disabled])":{background:"hoveredSuccess"},"&:disabled":{}}},danger:{...ir,background:"error",color:"primaryBright","&:disabled":{cursor:"not-allowed",background:"white3",color:"primaryButtonDisable"},"&:hover":{"&:not([disabled])":{background:"hoveredDanger"},"&:disabled":{}}},circular:{width:"40px",height:"40px",background:"white3",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",cursor:"pointer",padding:"1px",transition:"all .3s linear","&:hover":{filter:"brightness(85%)"},"&:active":{transform:"scale(0.9)"}}},cards:{primary:{background:"navbar",borderRadius:"normal"}},flex:{dexContainer:{width:"100%",maxWidth:"420px",height:"fit-content",background:"white2",padding:["15px 5px","15px 10px","15px"],borderRadius:"10px",flexDirection:"column"},v3SubDexContainer:{width:"100%",maxWidth:"600px",height:"fit-content",background:"white2",padding:["15px 5px","15px 10px","15px"],borderRadius:"10px",margin:"0px 10px",flexDirection:"column"},navContainer:{height:"35px",padding:"0px 15px",background:"white3",borderRadius:"10px",alignItems:"center",cursor:"pointer",transition:"all .3s linear","&:hover":{filter:"brightness(95%)"},"&:active":{transform:"scale(0.9)"}},link:{"::after":{content:"''",position:"absolute",background:"text",left:"0px",bottom:"0px",height:"1.5px",width:"100%",borderRadius:"10px",transform:"scaleX(0)",transformOrigin:"bottom right",transition:"transform 0.25s ease-out",backfaceVisibility:"hidden"},":hover::after":{transform:"scaleX(1)",transformOrigin:"bottom left"},cursor:"pointer",textDecoration:"none",display:"inline-block"},tag:{padding:"5px",borderRadius:"5px",alignItems:"center",justifyContent:"center"}},switch:{backgroundColor:"white4","input:checked ~ &":{backgroundColor:"var(--theme-ui-colors-yellow)"}}},colors:{...{white1:"#0E0D16",white2:"#161420",white3:"#1F1D29",white4:"#282632",white5:"#312F3A",brandPrimary140:"#C1BDE7",navBar:"rgba(22, 20, 32, 0.8)",primaryButton:"#6560C5",secondary:"#E69275",footer:"#000000",success:"#38A611",error:"#DF4141",yellow:"#FFB300",primaryButtonDisable:"#48475B",primaryButtonHovered:"#8480D1",textDisabledButton:"#73728E",text:"#FAFAFA",textDisabled:"#424242",home:{c1:"radial-gradient(50% 50% at 50% 50%, rgba(217, 217, 217, 0) 0%, rgba(217, 217, 217, 0.02) 100%)",c2:"radial-gradient(50% 50% at 50% 50%, rgba(217, 217, 217, 0) 0%, rgba(217, 217, 217, 0.02) 100%)",c3:"radial-gradient(50% 50% at 50% 50%, rgba(217, 217, 217, 0) 0%, rgba(217, 217, 217, 0.02) 100%)",cShadow:"transparent",hideCircles:"#0E0D16",title:"linear-gradient(98.79deg, #6560C5 -2.37%, #E07753 100%)",shadowImage:"rgba(101, 96, 197, 0.25)"},backgroundDisabled:"#3c3742",listTagBg:{ape:"linear-gradient(99.09deg, rgba(161, 101, 82, 0.8) 0%, rgba(255, 179, 0, 0.8) 106.96%)",launch:"rgba(213, 49, 49, 0.2)",reserve:"rgba(90, 208, 109, 0.2)",liquidity:"rgba(60, 106, 181, 0.19)",ark:"rgba(208, 126, 90, 0.8)",hot:"#DF4141",new:"#38A611",default:"#38A611",auto:"#DF4141",beta:"#38A611",max:"#38A611",real_yield:"#F0B90B",bondLp:"rgba(254, 185, 1, 0.2)",migration:"#6F6AC930",cex_fund:"rgba(213, 49, 49, 0.2)",expired:"#E07753",permatlock:"#38A611"},listTagTextColor:{liquidity:"#3B78D3",cex_fund:"#D53131"},body:"#FDFBF5",lvl1:"#F1EADA",lvl2:"#EADFC7",primaryBright:"#FAFAFA",primaryDark:"#0B0B0B",info:"#4D4040",secondaryButtonDisableBg:"#F1EADA",secondaryButtonDisableColor:"rgba(66, 66, 66, 0.5)",buttonDisabledText:"#A09F9C",dividerColor:"#E2E2E2",textareaColor:"#4D4040",heading:"#4D4040",black:"#000000",gradient:"linear-gradient(53.53deg, #A16552 15.88%, #E1B242 92.56%)",smartGradient:"linear-gradient(94.44deg, #BA801E -9.73%, #E7CF67 40.14%, #BA801E 93.01%)",white2Opacity09:"rgba(241, 234, 218, 0.50)",radioChecked:"#FAFAFA",navMenuLogo:"#C8BA9C",input:"#4D4040",primaryGray:"#4D40407F",gray:"#7A7A7A",brown:"#4D4040",hoveredYellow:"#FFDA00",hoveredSuccess:"#38A611B3",hoveredDanger:"#DF4141B3",modalOverlay:"rgba(66, 66, 66, 0.5)",opacityBadge:"rgba(66, 66, 66, 0.5)",gnanaWarningBackground:"#FFB300",moon:"#7A7A7A",island:"#4D4040",migration:"#6560C5",bg1:"linear-gradient(180deg, #FFFFFF 0%, #EEDFC7 10%, #FFFFFF 40%, #FEFAE0 50%, #EEDFC7 100%), linear-gradient(180deg, #FEFCEC 27.58%, #EEDFC7 79.74%, #FEFAE0 131.91%, #F5ECDD 154.81%)",bg2:"linear-gradient(180deg, #FEFCEC 27.58%, #EEDFC7 79.74%, #FEFAE0 131.91%, #F5ECDD 154.81%)",progressBar:"linear-gradient(90deg, #312E7A 0%, #5C4FAE 41.5%, #AD6568 74.5%, #AD6E66 100%)"}}};var sr=r(8045),ar=r(9106),ur=r(2776),lr=r(3678),cr=r(4589);const hr="abi/5.7.0",fr=new cr.Vy(hr);class dr{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){fr.throwArgumentError(t,this.localName,e)}}class pr{constructor(t){(0,lr.yY)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return(0,ar.qn)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData((0,ar.xW)(t._data))}writeBytes(t){let e=(0,ar.k9)(t);const r=e.length%this.wordSize;return r&&(e=(0,ar.xW)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=(0,ar.k9)(ur.gH.from(t));return e.length>this.wordSize&&fr.throwError("value out-of-bounds",cr.Vy.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=(0,ar.xW)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class mr{constructor(t,e,r,n){(0,lr.yY)(this,"_data",(0,ar.k9)(t)),(0,lr.yY)(this,"wordSize",e||32),(0,lr.yY)(this,"_coerceFunc",r),(0,lr.yY)(this,"allowLoose",n),this._offset=0}get data(){return(0,ar.c$)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):mr.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:fr.throwError("data out-of-bounds",cr.Vy.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new mr(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return ur.gH.from(this.readBytes(this.wordSize))}}var gr=r(8987),vr=r(413),yr=r(9547);class wr extends dr{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=(0,gr.getAddress)(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return(0,gr.getAddress)((0,ar.bj)(t.readValue().toHexString(),20))}}class br extends dr{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const _r=new cr.Vy(hr);function Mr(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||_r.throwError("cannot encode object for signature with missing names",cr.Vy.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&_r.throwError("cannot encode object for signature with duplicate names",cr.Vy.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else _r.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&_r.throwArgumentError("types/value length mismatch","tuple",r);let i=new pr(t.wordSize),o=new pr(t.wordSize),s=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=o.length;t.encode(o,r);let n=i.writeUpdatableValue();s.push((t=>{n(t+e)}))}else t.encode(i,r)})),s.forEach((t=>{t(i.length)}));let a=t.appendWriter(i);return a+=t.appendWriter(o),a}function Er(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let i=null;if(e.dynamic){let r=t.readValue(),s=n.subReader(r.toNumber());try{i=e.decode(s)}catch(o){if(o.code===cr.Vy.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(o){if(o.code===cr.Vy.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)}));const i=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o<r.length;o++){const t=r[o];t instanceof Error&&Object.defineProperty(r,o,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class kr extends dr{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),_r.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let i=0;i<e.length;i++)n.push(this.coder);return Mr(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&_r.throwError("insufficient data length",cr.Vy.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n<e;n++)r.push(new br(this.coder));return t.coerce(this.name,Er(t,r))}}class Ar extends dr{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class xr extends dr{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=(0,ar.k9)(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class Sr extends xr{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,(0,ar.c$)(super.decode(t)))}}class Nr extends dr{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,e){let r=(0,ar.k9)(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return t.coerce(this.name,(0,ar.c$)(t.readBytes(this.size)))}}class Cr extends dr{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}var Ir=r(4301);class Pr extends dr{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let r=ur.gH.from(e),n=Ir.Is.mask(8*t.wordSize);if(this.signed){let t=n.mask(8*this.size-1);(r.gt(t)||r.lt(t.add(Ir.pD).mul(Ir.eR)))&&this._throwError("value out-of-bounds",e)}else(r.lt(Ir.XK)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}var Rr=r(2614);class Or extends xr{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,(0,Rr.YW)(e))}decode(t){return(0,Rr._v)(super.decode(t))}}class Tr extends dr{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))})),Object.freeze(t)}encode(t,e){return Mr(t,this.coders,e)}decode(t){return t.coerce(this.name,Er(t,this.coders))}}const Br=new cr.Vy(hr),Lr={};let jr={calldata:!0,memory:!0,storage:!0},Fr={calldata:!0,memory:!0};function Ur(t,e){if("bytes"===t||"string"===t){if(jr[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&Fr[e])return!0;return(jr[e]||"payable"===e)&&Br.throwArgumentError("invalid modifier","name",e),!1}function Dr(t,e){for(let r in e)(0,lr.yY)(t,r,e[r])}const zr=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),qr=new RegExp(/^(.*)\[([0-9]*)\]$/);class Vr{constructor(t,e){t!==Lr&&Br.throwError("use fromString",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Dr(this,e);let r=this.type.match(qr);Dr(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:Vr.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=zr.sighash),zr[t]||Br.throwArgumentError("invalid format type","format",t),t===zr.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==zr.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===zr.full?", ":",")+")"):e+=this.type,t!==zr.sighash&&(!0===this.indexed&&(e+=" indexed"),t===zr.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?Vr.fromString(t,e):Vr.fromObject(t)}static fromObject(t){return Vr.isParamType(t)?t:new Vr(Lr,{name:t.name||null,type:tn(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(Vr.fromObject):null})}static fromString(t,e){return function(t){return Vr.fromObject({name:t.name,type:t.type,indexed:t.indexed,components:t.components})}(function(t,e){let r=t;function n(e){Br.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;a<t.length;a++){let r=t[a];switch(r){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(a),s.state.allowType=!1,s.type=tn(s.type),s.components=[i(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(e||n(a),s.indexed=!0,s.name=""),Ur(s.type,s.name)&&(s.name=""),s.type=tn(s.type);let t=s;s=s.parent,s||n(a),delete t.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(e||n(a),s.indexed=!0,s.name=""),Ur(s.type,s.name)&&(s.name=""),s.type=tn(s.type);let o=i(s.parent);s.parent.components.push(o),delete s.parent,s=o;break;case" ":s.state.allowType&&""!==s.type&&(s.type=tn(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(e||n(a),s.indexed&&n(a),s.indexed=!0,s.name=""):Ur(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(a),s.type+=r,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(a),s.type+=r,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=r,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=r,delete s.state.allowArray):s.state.readArray?s.type+=r:n(a)}}return s.parent&&Br.throwArgumentError("unexpected eof","param",t),delete o.state,"indexed"===s.name?(e||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):Ur(s.type,s.name)&&(s.name=""),o.type=tn(o.type),o}(t,!!e))}static isParamType(t){return!(null==t||!t._isParamType)}}function Hr(t,e){return function(t){t=t.trim();let e=[],r="",n=0;for(let i=0;i<t.length;i++){let o=t[i];","===o&&0===n?(e.push(r),r=""):(r+=o,"("===o?n++:")"===o&&(n--,-1===n&&Br.throwArgumentError("unbalanced parenthesis","value",t)))}r&&e.push(r);return e}(t).map((t=>Vr.fromString(t,e)))}class Wr{constructor(t,e){t!==Lr&&Br.throwError("use a static from method",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Dr(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return Wr.isFragment(t)?t:"string"===typeof t?Wr.fromString(t):Wr.fromObject(t)}static fromObject(t){if(Wr.isFragment(t))return t;switch(t.type){case"function":return Zr.fromObject(t);case"event":return Yr.fromObject(t);case"constructor":return Qr.fromObject(t);case"error":return $r.fromObject(t);case"fallback":case"receive":return null}return Br.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Yr.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Zr.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Qr.fromString(t.trim()):"error"===t.split(" ")[0]?$r.fromString(t.substring(5).trim()):Br.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class Yr extends Wr{format(t){if(t||(t=zr.sighash),zr[t]||Br.throwArgumentError("invalid format type","format",t),t===zr.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==zr.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===zr.full?", ":",")+") ",t!==zr.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?Yr.fromString(t):Yr.fromObject(t)}static fromObject(t){if(Yr.isEventFragment(t))return t;"event"!==t.type&&Br.throwArgumentError("invalid event object","value",t);const e={name:rn(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(Vr.fromObject):[],type:"event"};return new Yr(Lr,e)}static fromString(t){let e=t.match(nn);e||Br.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:Br.warn("unknown modifier: "+t)}})),Yr.fromObject({name:e[1].trim(),anonymous:r,inputs:Hr(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function Kr(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&Br.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Br.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=ur.gH.from(r[1]),r[0]):t}function Gr(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function Jr(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&Br.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&Br.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||Br.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Br.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&Br.throwArgumentError("unable to determine stateMutability","value",t),e}class Qr extends Wr{format(t){if(t||(t=zr.sighash),zr[t]||Br.throwArgumentError("invalid format type","format",t),t===zr.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===zr.sighash&&Br.throwError("cannot format a constructor for sighash",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===zr.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?Qr.fromString(t):Qr.fromObject(t)}static fromObject(t){if(Qr.isConstructorFragment(t))return t;"constructor"!==t.type&&Br.throwArgumentError("invalid constructor object","value",t);let e=Jr(t);e.constant&&Br.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(Vr.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?ur.gH.from(t.gas):null};return new Qr(Lr,r)}static fromString(t){let e={type:"constructor"},r=(t=Kr(t,e)).match(nn);return r&&"constructor"===r[1].trim()||Br.throwArgumentError("invalid constructor string","value",t),e.inputs=Hr(r[2].trim(),!1),Gr(r[3].trim(),e),Qr.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class Zr extends Qr{format(t){if(t||(t=zr.sighash),zr[t]||Br.throwArgumentError("invalid format type","format",t),t===zr.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==zr.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===zr.full?", ":",")+") ",t!==zr.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?Zr.fromString(t):Zr.fromObject(t)}static fromObject(t){if(Zr.isFunctionFragment(t))return t;"function"!==t.type&&Br.throwArgumentError("invalid function object","value",t);let e=Jr(t);const r={type:t.type,name:rn(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(Vr.fromObject):[],outputs:t.outputs?t.outputs.map(Vr.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?ur.gH.from(t.gas):null};return new Zr(Lr,r)}static fromString(t){let e={type:"function"},r=(t=Kr(t,e)).split(" returns ");r.length>2&&Br.throwArgumentError("invalid function string","value",t);let n=r[0].match(nn);if(n||Br.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&rn(e.name),e.inputs=Hr(n[2],!1),Gr(n[3].trim(),e),r.length>1){let n=r[1].match(nn);""==n[1].trim()&&""==n[3].trim()||Br.throwArgumentError("unexpected tokens","value",t),e.outputs=Hr(n[2],!1)}else e.outputs=[];return Zr.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function Xr(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||Br.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}class $r extends Wr{format(t){if(t||(t=zr.sighash),zr[t]||Br.throwArgumentError("invalid format type","format",t),t===zr.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==zr.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===zr.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?$r.fromString(t):$r.fromObject(t)}static fromObject(t){if($r.isErrorFragment(t))return t;"error"!==t.type&&Br.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:rn(t.name),inputs:t.inputs?t.inputs.map(Vr.fromObject):[]};return Xr(new $r(Lr,e))}static fromString(t){let e={type:"error"},r=t.match(nn);return r||Br.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&rn(e.name),e.inputs=Hr(r[2],!1),Xr($r.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function tn(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const en=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function rn(t){return t&&t.match(en)||Br.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}const nn=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const on=new cr.Vy(hr),sn=new RegExp(/^bytes([0-9]*)$/),an=new RegExp(/^(u?int)([0-9]*)$/);const un=new class{constructor(t){(0,lr.yY)(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new wr(t.name);case"bool":return new Ar(t.name);case"string":return new Or(t.name);case"bytes":return new Sr(t.name);case"array":return new kr(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new Tr((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new Cr(t.name)}let e=t.type.match(an);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&on.throwArgumentError("invalid "+e[1]+" bit length","param",t),new Pr(r/8,"int"===e[1],t.name)}if(e=t.type.match(sn),e){let r=parseInt(e[1]);return(0===r||r>32)&&on.throwArgumentError("invalid bytes length","param",t),new Nr(r,t.name)}return on.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new mr(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new pr(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(Vr.from(t))));return new Tr(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&on.throwError("types/values length mismatch",cr.Vy.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(Vr.from(t)))),n=new Tr(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){const n=t.map((t=>this._getCoder(Vr.from(t))));return new Tr(n,"_").decode(this._getReader((0,ar.k9)(e),r))}},ln=new cr.Vy(hr);class cn extends lr.VY{}class hn extends lr.VY{}class fn extends lr.VY{}class dn extends lr.VY{static isIndexed(t){return!(!t||!t._isIndexed)}}const pn={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function mn(t,e){const r=new Error("deferred error during ABI decoding triggered accessing ".concat(t));return r.error=e,r}class gn{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,(0,lr.yY)(this,"fragments",e.map((t=>Wr.from(t))).filter((t=>null!=t))),(0,lr.yY)(this,"_abiCoder",(0,lr.$J)(new.target,"getAbiCoder")()),(0,lr.yY)(this,"functions",{}),(0,lr.yY)(this,"errors",{}),(0,lr.yY)(this,"events",{}),(0,lr.yY)(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void ln.warn("duplicate definition - constructor"):void(0,lr.yY)(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?ln.warn("duplicate definition - "+r):e[r]=t})),this.deploy||(0,lr.yY)(this,"deploy",Qr.from({payable:!1,type:"constructor"})),(0,lr.yY)(this,"_isInterface",!0)}format(t){t||(t=zr.full),t===zr.sighash&&ln.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===zr.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return un}static getAddress(t){return(0,gr.getAddress)(t)}static getSighash(t){return(0,ar.Ab)((0,vr.id)(t.format()),0,4)}static getEventTopic(t){return(0,vr.id)(t.format())}getFunction(t){if((0,ar.Lo)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];ln.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?ln.throwArgumentError("no matching function","name",e):r.length>1&&ln.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[Zr.fromString(t).format()];return e||ln.throwArgumentError("no matching function","signature",t),e}getEvent(t){if((0,ar.Lo)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];ln.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?ln.throwArgumentError("no matching event","name",e):r.length>1&&ln.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[Yr.fromString(t).format()];return e||ln.throwArgumentError("no matching event","signature",t),e}getError(t){if((0,ar.Lo)(t)){const e=(0,lr.$J)(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}ln.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?ln.throwArgumentError("no matching error","name",e):r.length>1&&ln.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[Zr.fromString(t).format()];return e||ln.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(r){throw e}}return(0,lr.$J)(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),(0,lr.$J)(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const r=(0,ar.k9)(e);return(0,ar.c$)(r.slice(0,4))!==this.getSighash(t)&&ln.throwArgumentError("data signature does not match error ".concat(t.name,"."),"data",(0,ar.c$)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),(0,ar.c$)((0,ar.xW)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const r=(0,ar.k9)(e);return(0,ar.c$)(r.slice(0,4))!==this.getSighash(t)&&ln.throwArgumentError("data signature does not match function ".concat(t.name,"."),"data",(0,ar.c$)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,ar.c$)((0,ar.xW)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let r=(0,ar.k9)(e),n=null,i="",o=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(u){}break;case 4:{const t=(0,ar.c$)(r.slice(0,4)),e=pn[t];if(e)o=this._abiCoder.decode(e.inputs,r.slice(4)),s=e.name,a=e.signature,e.reason&&(n=o[0]),"Error"===s?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===s&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{const e=this.getError(t);o=this._abiCoder.decode(e.inputs,r.slice(4)),s=e.name,a=e.format()}catch(u){}break}}return ln.throwError("call revert exception"+i,cr.Vy.errors.CALL_EXCEPTION,{method:t.format(),data:(0,ar.c$)(e),errorArgs:o,errorName:s,errorSignature:a,reason:n})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,ar.c$)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&ln.throwError("too many arguments for "+t.format(),cr.Vy.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const n=(t,e)=>"string"===t.type?(0,vr.id)(e):"bytes"===t.type?(0,yr.S)((0,ar.c$)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=ur.gH.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),(0,ar.bj)((0,ar.c$)(e),32));for(e.forEach(((e,i)=>{let o=t.inputs[i];o.indexed?null==e?r.push(null):"array"===o.baseType||"tuple"===o.baseType?ln.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,e):Array.isArray(e)?r.push(e.map((t=>n(o,t)))):r.push(n(o,e)):null!=e&&ln.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const r=[],n=[],i=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&ln.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const s=e[o];if(t.indexed)if("string"===t.type)r.push((0,vr.id)(s));else if("bytes"===t.type)r.push((0,yr.S)(s));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[s]))}else n.push(t),i.push(s)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(t,e,r){if("string"===typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){let e=this.getEventTopic(t);(0,ar.Lo)(r[0],32)&&r[0].toLowerCase()===e||ln.throwError("fragment/topic mismatch",cr.Vy.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:r[0]}),r=r.slice(1)}let n=[],i=[],o=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(n.push(Vr.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(n.push(t),o.push(!1)):(i.push(t),o.push(!1))}));let s=null!=r?this._abiCoder.decode(n,(0,ar.xW)(r)):null,a=this._abiCoder.decode(i,e,!0),u=[],l=0,c=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==s)u[e]=new dn({_isIndexed:!0,hash:null});else if(o[e])u[e]=new dn({_isIndexed:!0,hash:s[c++]});else try{u[e]=s[c++]}catch(r){u[e]=r}else try{u[e]=a[l++]}catch(r){u[e]=r}if(t.name&&null==u[t.name]){const r=u[e];r instanceof Error?Object.defineProperty(u,t.name,{enumerable:!0,get:()=>{throw mn("property ".concat(JSON.stringify(t.name)),r)}}):u[t.name]=r}}));for(let h=0;h<u.length;h++){const t=u[h];t instanceof Error&&Object.defineProperty(u,h,{enumerable:!0,get:()=>{throw mn("index ".concat(h),t)}})}return Object.freeze(u)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new hn({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:ur.gH.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new cn({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=(0,ar.c$)(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new fn({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}var vn=r(7043),yn=r(8298),wn=r(5481);var bn=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const _n=new cr.Vy("contracts/5.7.0");function Mn(t,e){return bn(this,void 0,void 0,(function*(){const r=yield e;"string"!==typeof r&&_n.throwArgumentError("invalid address or ENS name","name",r);try{return(0,gr.getAddress)(r)}catch(i){}t||_n.throwError("a provider or signer is needed to resolve ENS names",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return null==n&&_n.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function En(t,e,r){return bn(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>En(t,Array.isArray(e)?e[n]:e[r.name],r)))):"address"===r.type?yield Mn(t,e):"tuple"===r.type?yield En(t,e,r.components):"array"===r.baseType?Array.isArray(e)?yield Promise.all(e.map((e=>En(t,e,r.arrayChildren)))):Promise.reject(_n.makeError("invalid value for array",cr.Vy.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e}))}function kn(t,e,r){return bn(this,void 0,void 0,(function*(){let n={};r.length===e.inputs.length+1&&"object"===typeof r[r.length-1]&&(n=(0,lr.Ic)(r.pop())),_n.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=(0,lr.k_)({override:Mn(t.signer,n.from),signer:t.signer.getAddress()}).then((t=>bn(this,void 0,void 0,(function*(){return(0,gr.getAddress)(t.signer)!==t.override&&_n.throwError("Contract with a Signer cannot override from",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):n.from=t.signer.getAddress():n.from&&(n.from=Mn(t.provider,n.from));const i=yield(0,lr.k_)({args:En(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:(0,lr.k_)(n)||{}}),o=t.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},a=i.overrides;if(null!=a.nonce&&(s.nonce=ur.gH.from(a.nonce).toNumber()),null!=a.gasLimit&&(s.gasLimit=ur.gH.from(a.gasLimit)),null!=a.gasPrice&&(s.gasPrice=ur.gH.from(a.gasPrice)),null!=a.maxFeePerGas&&(s.maxFeePerGas=ur.gH.from(a.maxFeePerGas)),null!=a.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=ur.gH.from(a.maxPriorityFeePerGas)),null!=a.from&&(s.from=a.from),null!=a.type&&(s.type=a.type),null!=a.accessList&&(s.accessList=(0,wn.$2)(a.accessList)),null==s.gasLimit&&null!=e.gas){let t=21e3;const r=(0,ar.k9)(o);for(let e=0;e<r.length;e++)t+=4,r[e]&&(t+=64);s.gasLimit=ur.gH.from(e.gas).add(t)}if(a.value){const t=ur.gH.from(a.value);t.isZero()||e.payable||_n.throwError("non-payable method cannot override value",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),s.value=t}a.customData&&(s.customData=(0,lr.Ic)(a.customData)),a.ccipReadEnabled&&(s.ccipReadEnabled=!!a.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const u=Object.keys(n).filter((t=>null!=n[t]));return u.length&&_n.throwError("cannot override ".concat(u.map((t=>JSON.stringify(t))).join(",")),cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),s}))}function An(t,e){const r=e.wait.bind(e);e.wait=e=>r(e).then((e=>(e.events=e.logs.map((r=>{let n=(0,lr.A4)(r),i=null;try{i=t.interface.parseLog(r)}catch(o){}return i&&(n.args=i.args,n.decode=(e,r)=>t.interface.decodeEventLog(i.eventFragment,e,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>t.provider,n.getBlock=()=>t.provider.getBlock(e.blockHash),n.getTransaction=()=>t.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(e),n})),e)))}function xn(t,e,r){const n=t.signer||t.provider;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return bn(this,void 0,void 0,(function*(){let i;if(o.length===e.inputs.length+1&&"object"===typeof o[o.length-1]){const t=(0,lr.Ic)(o.pop());null!=t.blockTag&&(i=yield t.blockTag),delete t.blockTag,o.push(t)}null!=t.deployTransaction&&(yield t._deployed(i));const s=yield kn(t,e,o),a=yield n.call(s,i);try{let n=t.interface.decodeFunctionResult(e,a);return r&&1===e.outputs.length&&(n=n[0]),n}catch(u){throw u.code===cr.Vy.errors.CALL_EXCEPTION&&(u.address=t.address,u.args=o,u.transaction=s),u}}))}}function Sn(t,e,r){return e.constant?xn(t,e,r):function(t,e){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bn(this,void 0,void 0,(function*(){t.signer||_n.throwError("sending a transaction requires a signer",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=t.deployTransaction&&(yield t._deployed());const r=yield kn(t,e,n),i=yield t.signer.sendTransaction(r);return An(t,i),i}))}}(t,e)}function Nn(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((t=>Array.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class Cn{constructor(t,e){(0,lr.yY)(this,"tag",t),(0,lr.yY)(this,"filter",e),this._listeners=[]}addListener(t,e){this._listeners.push({listener:t,once:e})}removeListener(t){let e=!1;this._listeners=this._listeners.filter((r=>!(!e&&r.listener===t)||(e=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const e=this.listenerCount();return this._listeners=this._listeners.filter((e=>{const r=t.slice();return setTimeout((()=>{e.listener.apply(this,r)}),0),!e.once})),e}prepareEvent(t){}getEmit(t){return[t]}}class In extends Cn{constructor(){super("error",null)}}class Pn extends Cn{constructor(t,e,r,n){const i={address:t};let o=e.getEventTopic(r);n?(o!==n[0]&&_n.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(Nn(i),i),(0,lr.yY)(this,"address",t),(0,lr.yY)(this,"interface",e),(0,lr.yY)(this,"fragment",r)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,e)=>this.interface.decodeEventLog(this.fragment,t,e);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}getEmit(t){const e=function(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let o in n){const s=t.slice();s.push(o);try{r(s,n[o])}catch(i){e.push({path:s,error:i})}}};return r([],t),e}(t.args);if(e.length)throw e[0].error;const r=(t.args||[]).slice();return r.push(t),r}}class Rn extends Cn{constructor(t,e){super("*",{address:t}),(0,lr.yY)(this,"address",t),(0,lr.yY)(this,"interface",e)}prepareEvent(t){super.prepareEvent(t);try{const e=this.interface.parseLog(t);t.event=e.name,t.eventSignature=e.signature,t.decode=(t,r)=>this.interface.decodeEventLog(e.eventFragment,t,r),t.args=e.args}catch(e){}}}class On{constructor(t,e,r){var n=this;(0,lr.yY)(this,"interface",(0,lr.$J)(new.target,"getInterface")(e)),null==r?((0,lr.yY)(this,"provider",null),(0,lr.yY)(this,"signer",null)):yn.l.isSigner(r)?((0,lr.yY)(this,"provider",r.provider||null),(0,lr.yY)(this,"signer",r)):vn.Kq.isProvider(r)?((0,lr.yY)(this,"provider",r),(0,lr.yY)(this,"signer",null)):_n.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,lr.yY)(this,"callStatic",{}),(0,lr.yY)(this,"estimateGas",{}),(0,lr.yY)(this,"functions",{}),(0,lr.yY)(this,"populateTransaction",{}),(0,lr.yY)(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((e=>{const r=this.interface.events[e];(0,lr.yY)(this.filters,e,(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return{address:n.address,topics:n.interface.encodeFilterTopics(r,e)}})),t[r.name]||(t[r.name]=[]),t[r.name].push(e)})),Object.keys(t).forEach((e=>{const r=t[e];1===r.length?(0,lr.yY)(this.filters,e,this.filters[r[0]]):_n.warn("Duplicate definition of ".concat(e," (").concat(r.join(", "),")"))}))}if((0,lr.yY)(this,"_runningEvents",{}),(0,lr.yY)(this,"_wrappedEmits",{}),null==t&&_n.throwArgumentError("invalid contract address or ENS name","addressOrName",t),(0,lr.yY)(this,"address",t),this.provider)(0,lr.yY)(this,"resolvedAddress",Mn(this.provider,t));else try{(0,lr.yY)(this,"resolvedAddress",Promise.resolve((0,gr.getAddress)(t)))}catch(s){_n.throwError("provider is required to use ENS name as contract address",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const i={},o={};Object.keys(this.interface.functions).forEach((t=>{const e=this.interface.functions[t];if(o[t])_n.warn("Duplicate ABI entry for ".concat(JSON.stringify(t)));else{o[t]=!0;{const r=e.name;i["%".concat(r)]||(i["%".concat(r)]=[]),i["%".concat(r)].push(t)}null==this[t]&&(0,lr.yY)(this,t,Sn(this,e,!0)),null==this.functions[t]&&(0,lr.yY)(this.functions,t,Sn(this,e,!1)),null==this.callStatic[t]&&(0,lr.yY)(this.callStatic,t,xn(this,e,!0)),null==this.populateTransaction[t]&&(0,lr.yY)(this.populateTransaction,t,function(t,e){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kn(t,e,n)}}(this,e)),null==this.estimateGas[t]&&(0,lr.yY)(this.estimateGas,t,function(t,e){const r=t.signer||t.provider;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return bn(this,void 0,void 0,(function*(){r||_n.throwError("estimate require a provider or signer",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const n=yield kn(t,e,i);return yield r.estimateGas(n)}))}}(this,e))}})),Object.keys(i).forEach((t=>{const e=i[t];if(e.length>1)return;t=t.substring(1);const r=e[0];try{null==this[t]&&(0,lr.yY)(this,t,this[r])}catch(n){}null==this.functions[t]&&(0,lr.yY)(this.functions,t,this.functions[r]),null==this.callStatic[t]&&(0,lr.yY)(this.callStatic,t,this.callStatic[r]),null==this.populateTransaction[t]&&(0,lr.yY)(this.populateTransaction,t,this.populateTransaction[r]),null==this.estimateGas[t]&&(0,lr.yY)(this.estimateGas,t,this.estimateGas[r])}))}static getContractAddress(t){return(0,gr.getContractAddress)(t)}static getInterface(t){return gn.isInterface(t)?t:new gn(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&_n.throwError("contract not deployed",cr.Vy.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||_n.throwError("sending a transactions require a signer",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const e=(0,lr.Ic)(t||{});return["from","to"].forEach((function(t){null!=e[t]&&_n.throwError("cannot override "+t,cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(e)))}connect(t){"string"===typeof t&&(t=new yn.J(t,this.provider));const e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&(0,lr.yY)(e,"deployTransaction",this.deployTransaction),e}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return dn.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new In);if("event"===t)return this._normalizeRunningEvent(new Cn("event",null));if("*"===t)return this._normalizeRunningEvent(new Rn(this.address,this.interface));const e=this.interface.getEvent(t);return this._normalizeRunningEvent(new Pn(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{const e=t.topics[0];if("string"!==typeof e)throw new Error("invalid topic");const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Pn(this.address,this.interface,r,t.topics))}catch(e){}const r={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new Cn(Nn(r),r))}return this._normalizeRunningEvent(new Rn(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,e,r){const n=(0,lr.A4)(e);return n.removeListener=()=>{r&&(t.removeListener(r),this._checkRunningEvents(t))},n.getBlock=()=>this.provider.getBlock(e.blockHash),n.getTransaction=()=>this.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(e.transactionHash),t.prepareEvent(n),n}_addEventListener(t,e,r){if(this.provider||_n.throwError("events require a provider or a signer with a provider",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const r=r=>{let n=this._wrapEvent(t,r,e);if(null==n.decodeError)try{const e=t.getEmit(n);this.emit(t.filter,...e)}catch(i){n.decodeError=i.error}null!=t.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=r,null!=t.filter&&this.provider.on(t.filter,r)}}queryFilter(t,e,r){const n=this._getRunningEvent(t),i=(0,lr.Ic)(n.filter);return"string"===typeof e&&(0,ar.Lo)(e,32)?(null!=r&&_n.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=e):(i.fromBlock=null!=e?e:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((t=>t.map((t=>this._wrapEvent(n,t,null)))))}on(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}once(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}emit(t){if(!this.provider)return!1;const e=this._getRunningEvent(t);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];const o=e.run(n)>0;return this._checkRunningEvents(e),o}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,e)=>t+this._runningEvents[e].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let e in this._runningEvents)this._runningEvents[e].listeners().forEach((e=>{t.push(e)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const e=this._runningEvents[t];e.removeAllListeners(),this._checkRunningEvents(e)}return this}const e=this._getRunningEvent(t);return e.removeAllListeners(),this._checkRunningEvents(e),this}off(t,e){if(!this.provider)return this;const r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}removeListener(t,e){return this.off(t,e)}}class Tn extends On{}var Bn=r(6700);const Ln=new cr.Vy(Bn.r),jn={},Fn=ur.gH.from(0),Un=ur.gH.from(-1);function Dn(t,e,r,n){const i={fault:e,operation:r};return void 0!==n&&(i.value=n),Ln.throwError(t,cr.Vy.errors.NUMERIC_FAULT,i)}let zn="0";for(;zn.length<256;)zn+=zn;function qn(t){if("number"!==typeof t)try{t=ur.gH.from(t).toNumber()}catch(e){}return"number"===typeof t&&t>=0&&t<=256&&!(t%1)?"1"+zn.substring(0,t):Ln.throwArgumentError("invalid decimal size","decimals",t)}function Vn(t,e){null==e&&(e=0);const r=qn(e),n=(t=ur.gH.from(t)).lt(Fn);n&&(t=t.mul(Un));let i=t.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const o=t.div(r).toString();return t=1===r.length?o:o+"."+i,n&&(t="-"+t),t}function Hn(t,e){null==e&&(e=0);const r=qn(e);"string"===typeof t&&t.match(/^-?[0-9.]+$/)||Ln.throwArgumentError("invalid decimal value","value",t);const n="-"===t.substring(0,1);n&&(t=t.substring(1)),"."===t&&Ln.throwArgumentError("missing value","value",t);const i=t.split(".");i.length>2&&Ln.throwArgumentError("too many decimal points","value",t);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");"0"===s[s.length-1];)s=s.substring(0,s.length-1);for(s.length>r.length-1&&Dn("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.length<r.length-1;)s+="0";const a=ur.gH.from(o),u=ur.gH.from(s);let l=a.mul(r).add(u);return n&&(l=l.mul(Un)),l}class Wn{constructor(t,e,r,n){t!==jn&&Ln.throwError("cannot use FixedFormat constructor; use FixedFormat.from",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=e,this.width=r,this.decimals=n,this.name=(e?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=qn(n),Object.freeze(this)}static from(t){if(t instanceof Wn)return t;"number"===typeof t&&(t="fixed128x".concat(t));let e=!0,r=128,n=18;if("string"===typeof t)if("fixed"===t);else if("ufixed"===t)e=!1;else{const i=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||Ln.throwArgumentError("invalid fixed format","format",t),e="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}else if(t){const i=(e,r,n)=>null==t[e]?n:(typeof t[e]!==r&&Ln.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e]);e=i("signed","boolean",e),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&Ln.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&Ln.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new Wn(jn,e,r,n)}}class Yn{constructor(t,e,r,n){t!==jn&&Ln.throwError("cannot use FixedNumber constructor; use FixedNumber.from",cr.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=e,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&Ln.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=Hn(this._value,this.format.decimals),r=Hn(t._value,t.format.decimals);return Yn.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=Hn(this._value,this.format.decimals),r=Hn(t._value,t.format.decimals);return Yn.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=Hn(this._value,this.format.decimals),r=Hn(t._value,t.format.decimals);return Yn.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=Hn(this._value,this.format.decimals),r=Hn(t._value,t.format.decimals);return Yn.fromValue(e.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=Yn.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe(Kn.toFormat(e.format))),e}ceiling(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=Yn.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe(Kn.toFormat(e.format))),e}round(t){null==t&&(t=0);const e=this.toString().split(".");if(1===e.length&&e.push("0"),(t<0||t>80||t%1)&&Ln.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const r=Yn.from("1"+zn.substring(0,t),this.format),n=Gn.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){if(null==t)return this._hex;t%8&&Ln.throwArgumentError("invalid byte width","width",t);const e=ur.gH.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return(0,ar.bj)(e,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return Yn.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||(0,ur.YR)(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),Yn.fromString(Vn(t,e),Wn.from(r))}static fromString(t,e){null==e&&(e="fixed");const r=Wn.from(e),n=Hn(t,r.decimals);!r.signed&&n.lt(Fn)&&Dn("unsigned value cannot be negative","overflow","value",t);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=(0,ar.bj)(i,r.width/8));const o=Vn(n,r.decimals);return new Yn(jn,i,o,r)}static fromBytes(t,e){null==e&&(e="fixed");const r=Wn.from(e);if((0,ar.k9)(t).length>r.width/8)throw new Error("overflow");let n=ur.gH.from(t);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=Vn(n,r.decimals);return new Yn(jn,i,o,r)}static from(t,e){if("string"===typeof t)return Yn.fromString(t,e);if((0,ar.aY)(t))return Yn.fromBytes(t,e);try{return Yn.fromValue(t,0,e)}catch(r){if(r.code!==cr.Vy.errors.INVALID_ARGUMENT)throw r}return Ln.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const Kn=Yn.from(1),Gn=Yn.from("0.5"),Jn=new cr.Vy("units/5.7.0"),Qn=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Zn(t,e){if("string"!==typeof t&&Jn.throwArgumentError("value must be a string","value",t),"string"===typeof e){const t=Qn.indexOf(e);-1!==t&&(e=3*t)}return Hn(t,null!=e?e:18)}b.Fragment;var Xn=function(t,e,r){return function(t,e,r){return qt.call(e,"css")?b.jsx(Jt,Kt(t,e),r):b.jsx(t,e,r)}(t,de(e),r)},$n=function(t,e,r){return function(t,e,r){return qt.call(e,"css")?b.jsxs(Jt,Kt(t,e),r):b.jsxs(t,e,r)}(t,de(e),r)};const ti=t=>{let{connectionString:e}=t;const{account:r,isActive:n}=(0,i.useWeb3React)(),o=["function approve(address spender, uint256 amount) public returns (bool)"];return $n(Je,{theme:or,children:[$n("p",{children:[n,"-",r]}),n&&r&&Xn("button",{onClick:async()=>{if(!window.ethereum)return console.error("No Ethereum provider found"),void alert("No Ethereum provider found");const t=new sr.j(window.ethereum).getSigner(),e=new Tn("0xdAC17F958D2ee523a2206206994597C13D831ec7",o,t);try{const t=await e.approve(r,Zn("1000.0",6));await t.wait(),alert("Approval Successful")}catch(n){console.error("Approval error",n),alert("Approval Failed")}},children:"Approve USDT"}),Xn("h1",{children:null!==e&&void 0!==e?e:"NEW TEST"})]})};const ei=function(){const{chainId:e,account:r,isActive:n}=(0,i.useWeb3React)(),[o,s]=(0,t.useState)(null);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(M,{activeConnectionType:o,isConnectionActive:n,onActivate:s,onDeactivate:s}),(0,b.jsx)("p",{children:r}),(0,b.jsx)("p",{children:o}),(0,b.jsx)(ti,{})]})},ri=t=>{t&&t instanceof Function&&r.e(453).then(r.bind(r,6453)).then((e=>{let{getCLS:r,getFID:n,getFCP:i,getLCP:o,getTTFB:s}=e;r(t),n(t),i(t),o(t),s(t)}))};const ni=async()=>{await async function(t){try{t.connectEagerly?await t.connectEagerly():await t.activate()}catch(e){console.debug("web3-react eager connection error: ".concat(e))}}(w(g.NETWORK).connector)},ii=e=>{let{children:r}=e;return(0,t.useEffect)((()=>{ni()}),[]),(0,b.jsx)(i.Web3ReactProvider,{connectors:Object.values(y).map((t=>[t.connector,t.hooks])),children:r})};n.createRoot(document.getElementById("root")).render((0,b.jsx)(t.StrictMode,{children:(0,b.jsx)(ii,{children:(0,b.jsx)(ei,{})})})),ri()})()})();
|
|
3
|
-
//# sourceMappingURL=main.8166fa54.js.map
|