From 828acbd7030114ecd9f54aab2bb8c3985973b4b4 Mon Sep 17 00:00:00 2001 From: tempe-techie <95053628+tempe-techie@users.noreply.github.com> Date: Sun, 12 May 2024 09:26:35 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20send2-na?= =?UTF-8?q?me/send2name-frontend@5d576d5c85a7b13c9ce9af8a21280963df00df47?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...or404.7594d0e5.js => Error404.f0a0f48e.js} | 2 +- .../{index.43ab1cac.js => index.999ce201.js} | 24 +++++++++---------- .../{index.416cabcd.js => index.edbf2f79.js} | 2 +- index.html | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) rename assets/{Error404.7594d0e5.js => Error404.f0a0f48e.js} (78%) rename assets/{index.43ab1cac.js => index.999ce201.js} (89%) rename assets/{index.416cabcd.js => index.edbf2f79.js} (99%) diff --git a/assets/Error404.7594d0e5.js b/assets/Error404.f0a0f48e.js similarity index 78% rename from assets/Error404.7594d0e5.js rename to assets/Error404.f0a0f48e.js index 8eeee90..63246ff 100644 --- a/assets/Error404.7594d0e5.js +++ b/assets/Error404.f0a0f48e.js @@ -1 +1 @@ -import{d as r,u as a,c,a as t,b as o,o as l}from"./index.43ab1cac.js";const i={class:"text-center"},d=t("div",{class:"text-primary-600 text-9xl font-bold my-5"},"404",-1),u=t("div",{class:"text-2xl text-gray-500 my-5"},"Oops. Page not found...",-1),m={class:"flex flex-row justify-center space-x-4"},f=r({__name:"Error404",setup(p){const s=a();return(x,e)=>(l(),c("div",i,[d,u,t("div",m,[t("button",{onClick:e[0]||(e[0]=n=>o(s).go(-1)),class:"btn btn-primary my-5"},"Back"),t("button",{onClick:e[1]||(e[1]=n=>o(s).push("/")),class:"btn btn-secondary my-5"},"Home")])]))}});export{f as default}; +import{d as r,u as a,c,a as t,b as o,o as l}from"./index.999ce201.js";const i={class:"text-center"},d=t("div",{class:"text-primary-600 text-9xl font-bold my-5"},"404",-1),u=t("div",{class:"text-2xl text-gray-500 my-5"},"Oops. Page not found...",-1),m={class:"flex flex-row justify-center space-x-4"},f=r({__name:"Error404",setup(p){const s=a();return(x,e)=>(l(),c("div",i,[d,u,t("div",m,[t("button",{onClick:e[0]||(e[0]=n=>o(s).go(-1)),class:"btn btn-primary my-5"},"Back"),t("button",{onClick:e[1]||(e[1]=n=>o(s).push("/")),class:"btn btn-secondary my-5"},"Home")])]))}});export{f as default}; diff --git a/assets/index.43ab1cac.js b/assets/index.999ce201.js similarity index 89% rename from assets/index.43ab1cac.js rename to assets/index.999ce201.js index e223ad3..af04680 100644 --- a/assets/index.43ab1cac.js +++ b/assets/index.999ce201.js @@ -1,12 +1,12 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function gr(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var He={},Al={};Al.byteLength=U8;Al.toByteArray=$8;Al.fromByteArray=z8;var wi=[],Dn=[],F8=typeof Uint8Array<"u"?Uint8Array:Array,qu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var $o=0,L8=qu.length;$o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function U8(t){var e=Vy(t),r=e[0],n=e[1];return(r+n)*3/4-n}function K8(t,e,r){return(e+r)*3/4-r}function $8(t){var e,r=Vy(t),n=r[0],s=r[1],i=new F8(K8(t,n,s)),u=0,v=s>0?n-4:n,b;for(b=0;b>16&255,i[u++]=e>>8&255,i[u++]=e&255;return s===2&&(e=Dn[t.charCodeAt(b)]<<2|Dn[t.charCodeAt(b+1)]>>4,i[u++]=e&255),s===1&&(e=Dn[t.charCodeAt(b)]<<10|Dn[t.charCodeAt(b+1)]<<4|Dn[t.charCodeAt(b+2)]>>2,i[u++]=e>>8&255,i[u++]=e&255),i}function q8(t){return wi[t>>18&63]+wi[t>>12&63]+wi[t>>6&63]+wi[t&63]}function H8(t,e,r){for(var n,s=[],i=e;iv?v:u+i));return n===1?(e=t[r-1],s.push(wi[e>>2]+wi[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],s.push(wi[e>>10]+wi[e>>4&63]+wi[e<<2&63]+"=")),s.join("")}var o1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */o1.read=function(t,e,r,n,s){var i,u,v=s*8-n-1,b=(1<>1,g=-7,_=r?s-1:0,A=r?-1:1,E=t[e+_];for(_+=A,i=E&(1<<-g)-1,E>>=-g,g+=v;g>0;i=i*256+t[e+_],_+=A,g-=8);for(u=i&(1<<-g)-1,i>>=-g,g+=n;g>0;u=u*256+t[e+_],_+=A,g-=8);if(i===0)i=1-m;else{if(i===b)return u?NaN:(E?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-m}return(E?-1:1)*u*Math.pow(2,i-n)};o1.write=function(t,e,r,n,s,i){var u,v,b,m=i*8-s-1,g=(1<>1,A=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:i-1,R=n?1:-1,B=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,u=g):(u=Math.floor(Math.log(e)/Math.LN2),e*(b=Math.pow(2,-u))<1&&(u--,b*=2),u+_>=1?e+=A/b:e+=A*Math.pow(2,1-_),e*b>=2&&(u++,b/=2),u+_>=g?(v=0,u=g):u+_>=1?(v=(e*b-1)*Math.pow(2,s),u=u+_):(v=e*Math.pow(2,_-1)*Math.pow(2,s),u=0));s>=8;t[r+E]=v&255,E+=R,v/=256,s-=8);for(u=u<0;t[r+E]=u&255,E+=R,u/=256,m-=8);t[r+E-R]|=B*128};/*! +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function gr(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var He={},Ml={};Ml.byteLength=U8;Ml.toByteArray=$8;Ml.fromByteArray=z8;var wi=[],Dn=[],F8=typeof Uint8Array<"u"?Uint8Array:Array,$u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var qo=0,L8=$u.length;qo0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function U8(t){var e=Vy(t),r=e[0],n=e[1];return(r+n)*3/4-n}function K8(t,e,r){return(e+r)*3/4-r}function $8(t){var e,r=Vy(t),n=r[0],s=r[1],i=new F8(K8(t,n,s)),u=0,v=s>0?n-4:n,b;for(b=0;b>16&255,i[u++]=e>>8&255,i[u++]=e&255;return s===2&&(e=Dn[t.charCodeAt(b)]<<2|Dn[t.charCodeAt(b+1)]>>4,i[u++]=e&255),s===1&&(e=Dn[t.charCodeAt(b)]<<10|Dn[t.charCodeAt(b+1)]<<4|Dn[t.charCodeAt(b+2)]>>2,i[u++]=e>>8&255,i[u++]=e&255),i}function q8(t){return wi[t>>18&63]+wi[t>>12&63]+wi[t>>6&63]+wi[t&63]}function H8(t,e,r){for(var n,s=[],i=e;iv?v:u+i));return n===1?(e=t[r-1],s.push(wi[e>>2]+wi[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],s.push(wi[e>>10]+wi[e>>4&63]+wi[e<<2&63]+"=")),s.join("")}var o1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */o1.read=function(t,e,r,n,s){var i,u,v=s*8-n-1,b=(1<>1,g=-7,_=r?s-1:0,A=r?-1:1,E=t[e+_];for(_+=A,i=E&(1<<-g)-1,E>>=-g,g+=v;g>0;i=i*256+t[e+_],_+=A,g-=8);for(u=i&(1<<-g)-1,i>>=-g,g+=n;g>0;u=u*256+t[e+_],_+=A,g-=8);if(i===0)i=1-m;else{if(i===b)return u?NaN:(E?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-m}return(E?-1:1)*u*Math.pow(2,i-n)};o1.write=function(t,e,r,n,s,i){var u,v,b,m=i*8-s-1,g=(1<>1,A=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:i-1,R=n?1:-1,B=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,u=g):(u=Math.floor(Math.log(e)/Math.LN2),e*(b=Math.pow(2,-u))<1&&(u--,b*=2),u+_>=1?e+=A/b:e+=A*Math.pow(2,1-_),e*b>=2&&(u++,b/=2),u+_>=g?(v=0,u=g):u+_>=1?(v=(e*b-1)*Math.pow(2,s),u=u+_):(v=e*Math.pow(2,_-1)*Math.pow(2,s),u=0));s>=8;t[r+E]=v&255,E+=R,v/=256,s-=8);for(u=u<0;t[r+E]=u&255,E+=R,u/=256,m-=8);t[r+E-R]|=B*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(t){var e=Al,r=o1,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=v,t.SlowBuffer=O,t.INSPECT_MAX_BYTES=50;var s=2147483647;t.kMaxLength=s,v.TYPED_ARRAY_SUPPORT=i(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var K=new Uint8Array(1),D={foo:function(){return 42}};return Object.setPrototypeOf(D,Uint8Array.prototype),Object.setPrototypeOf(K,D),K.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(!!v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(!!v.isBuffer(this))return this.byteOffset}});function u(K){if(K>s)throw new RangeError('The value "'+K+'" is invalid for option "size"');var D=new Uint8Array(K);return Object.setPrototypeOf(D,v.prototype),D}function v(K,D,k){if(typeof K=="number"){if(typeof D=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(K)}return b(K,D,k)}v.poolSize=8192;function b(K,D,k){if(typeof K=="string")return A(K,D);if(ArrayBuffer.isView(K))return R(K);if(K==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K);if($(K,ArrayBuffer)||K&&$(K.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($(K,SharedArrayBuffer)||K&&$(K.buffer,SharedArrayBuffer)))return B(K,D,k);if(typeof K=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var L=K.valueOf&&K.valueOf();if(L!=null&&L!==K)return v.from(L,D,k);var te=T(K);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof K[Symbol.toPrimitive]=="function")return v.from(K[Symbol.toPrimitive]("string"),D,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K)}v.from=function(K,D,k){return b(K,D,k)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array);function m(K){if(typeof K!="number")throw new TypeError('"size" argument must be of type number');if(K<0)throw new RangeError('The value "'+K+'" is invalid for option "size"')}function g(K,D,k){return m(K),K<=0?u(K):D!==void 0?typeof k=="string"?u(K).fill(D,k):u(K).fill(D):u(K)}v.alloc=function(K,D,k){return g(K,D,k)};function _(K){return m(K),u(K<0?0:F(K)|0)}v.allocUnsafe=function(K){return _(K)},v.allocUnsafeSlow=function(K){return _(K)};function A(K,D){if((typeof D!="string"||D==="")&&(D="utf8"),!v.isEncoding(D))throw new TypeError("Unknown encoding: "+D);var k=q(K,D)|0,L=u(k),te=L.write(K,D);return te!==k&&(L=L.slice(0,te)),L}function E(K){for(var D=K.length<0?0:F(K.length)|0,k=u(D),L=0;L=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return K|0}function O(K){return+K!=K&&(K=0),v.alloc(+K)}v.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==v.prototype},v.compare=function(D,k){if($(D,Uint8Array)&&(D=v.from(D,D.offset,D.byteLength)),$(k,Uint8Array)&&(k=v.from(k,k.offset,k.byteLength)),!v.isBuffer(D)||!v.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===k)return 0;for(var L=D.length,te=k.length,Z=0,Q=Math.min(L,te);Zte.length?v.from(Q).copy(te,Z):Uint8Array.prototype.set.call(te,Q,Z);else if(v.isBuffer(Q))Q.copy(te,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=Q.length}return te};function q(K,D){if(v.isBuffer(K))return K.length;if(ArrayBuffer.isView(K)||$(K,ArrayBuffer))return K.byteLength;if(typeof K!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof K);var k=K.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&k===0)return 0;for(var te=!1;;)switch(D){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return V(K).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return j(K).length;default:if(te)return L?-1:V(K).length;D=(""+D).toLowerCase(),te=!0}}v.byteLength=q;function H(K,D,k){var L=!1;if((D===void 0||D<0)&&(D=0),D>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,D>>>=0,k<=D))return"";for(K||(K="utf8");;)switch(K){case"hex":return p(this,D,k);case"utf8":case"utf-8":return c(this,D,k);case"ascii":return x(this,D,k);case"latin1":case"binary":return w(this,D,k);case"base64":return f(this,D,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,D,k);default:if(L)throw new TypeError("Unknown encoding: "+K);K=(K+"").toLowerCase(),L=!0}}v.prototype._isBuffer=!0;function G(K,D,k){var L=K[D];K[D]=K[k],K[k]=L}v.prototype.swap16=function(){var D=this.length;if(D%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;kk&&(D+=" ... "),""},n&&(v.prototype[n]=v.prototype.inspect),v.prototype.compare=function(D,k,L,te,Z){if($(D,Uint8Array)&&(D=v.from(D,D.offset,D.byteLength)),!v.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(k===void 0&&(k=0),L===void 0&&(L=D?D.length:0),te===void 0&&(te=0),Z===void 0&&(Z=this.length),k<0||L>D.length||te<0||Z>this.length)throw new RangeError("out of range index");if(te>=Z&&k>=L)return 0;if(te>=Z)return-1;if(k>=L)return 1;if(k>>>=0,L>>>=0,te>>>=0,Z>>>=0,this===D)return 0;for(var Q=Z-te,Ie=L-k,ie=Math.min(Q,Ie),oe=this.slice(te,Z),Oe=D.slice(k,L),ae=0;ae2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,ee(k)&&(k=te?0:K.length-1),k<0&&(k=K.length+k),k>=K.length){if(te)return-1;k=K.length-1}else if(k<0)if(te)k=0;else return-1;if(typeof D=="string"&&(D=v.from(D,L)),v.isBuffer(D))return D.length===0?-1:ne(K,D,k,L,te);if(typeof D=="number")return D=D&255,typeof Uint8Array.prototype.indexOf=="function"?te?Uint8Array.prototype.indexOf.call(K,D,k):Uint8Array.prototype.lastIndexOf.call(K,D,k):ne(K,[D],k,L,te);throw new TypeError("val must be string, number or Buffer")}function ne(K,D,k,L,te){var Z=1,Q=K.length,Ie=D.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(K.length<2||D.length<2)return-1;Z=2,Q/=2,Ie/=2,k/=2}function ie(Ke,le){return Z===1?Ke[le]:Ke.readUInt16BE(le*Z)}var oe;if(te){var Oe=-1;for(oe=k;oeQ&&(k=Q-Ie),oe=k;oe>=0;oe--){for(var ae=!0,fe=0;fete&&(L=te)):L=te;var Z=D.length;L>Z/2&&(L=Z/2);for(var Q=0;Q>>0,isFinite(L)?(L=L>>>0,te===void 0&&(te="utf8")):(te=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Z=this.length-k;if((L===void 0||L>Z)&&(L=Z),D.length>0&&(L<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var Q=!1;;)switch(te){case"hex":return Y(this,D,k,L);case"utf8":case"utf-8":return W(this,D,k,L);case"ascii":case"latin1":case"binary":return se(this,D,k,L);case"base64":return y(this,D,k,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,D,k,L);default:if(Q)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),Q=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function f(K,D,k){return D===0&&k===K.length?e.fromByteArray(K):e.fromByteArray(K.slice(D,k))}function c(K,D,k){k=Math.min(K.length,k);for(var L=[],te=D;te239?4:Z>223?3:Z>191?2:1;if(te+Ie<=k){var ie,oe,Oe,ae;switch(Ie){case 1:Z<128&&(Q=Z);break;case 2:ie=K[te+1],(ie&192)===128&&(ae=(Z&31)<<6|ie&63,ae>127&&(Q=ae));break;case 3:ie=K[te+1],oe=K[te+2],(ie&192)===128&&(oe&192)===128&&(ae=(Z&15)<<12|(ie&63)<<6|oe&63,ae>2047&&(ae<55296||ae>57343)&&(Q=ae));break;case 4:ie=K[te+1],oe=K[te+2],Oe=K[te+3],(ie&192)===128&&(oe&192)===128&&(Oe&192)===128&&(ae=(Z&15)<<18|(ie&63)<<12|(oe&63)<<6|Oe&63,ae>65535&&ae<1114112&&(Q=ae))}}Q===null?(Q=65533,Ie=1):Q>65535&&(Q-=65536,L.push(Q>>>10&1023|55296),Q=56320|Q&1023),L.push(Q),te+=Ie}return h(L)}var l=4096;function h(K){var D=K.length;if(D<=l)return String.fromCharCode.apply(String,K);for(var k="",L=0;LL)&&(k=L);for(var te="",Z=D;ZL&&(D=L),k<0?(k+=L,k<0&&(k=0)):k>L&&(k=L),kk)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(D,k,L){D=D>>>0,k=k>>>0,L||d(D,k,this.length);for(var te=this[D],Z=1,Q=0;++Q>>0,k=k>>>0,L||d(D,k,this.length);for(var te=this[D+--k],Z=1;k>0&&(Z*=256);)te+=this[D+--k]*Z;return te},v.prototype.readUint8=v.prototype.readUInt8=function(D,k){return D=D>>>0,k||d(D,1,this.length),this[D]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(D,k){return D=D>>>0,k||d(D,2,this.length),this[D]|this[D+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(D,k){return D=D>>>0,k||d(D,2,this.length),this[D]<<8|this[D+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(D,k){return D=D>>>0,k||d(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+this[D+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(D,k){return D=D>>>0,k||d(D,4,this.length),this[D]*16777216+(this[D+1]<<16|this[D+2]<<8|this[D+3])},v.prototype.readIntLE=function(D,k,L){D=D>>>0,k=k>>>0,L||d(D,k,this.length);for(var te=this[D],Z=1,Q=0;++Q=Z&&(te-=Math.pow(2,8*k)),te},v.prototype.readIntBE=function(D,k,L){D=D>>>0,k=k>>>0,L||d(D,k,this.length);for(var te=k,Z=1,Q=this[D+--te];te>0&&(Z*=256);)Q+=this[D+--te]*Z;return Z*=128,Q>=Z&&(Q-=Math.pow(2,8*k)),Q},v.prototype.readInt8=function(D,k){return D=D>>>0,k||d(D,1,this.length),this[D]&128?(255-this[D]+1)*-1:this[D]},v.prototype.readInt16LE=function(D,k){D=D>>>0,k||d(D,2,this.length);var L=this[D]|this[D+1]<<8;return L&32768?L|4294901760:L},v.prototype.readInt16BE=function(D,k){D=D>>>0,k||d(D,2,this.length);var L=this[D+1]|this[D]<<8;return L&32768?L|4294901760:L},v.prototype.readInt32LE=function(D,k){return D=D>>>0,k||d(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},v.prototype.readInt32BE=function(D,k){return D=D>>>0,k||d(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},v.prototype.readFloatLE=function(D,k){return D=D>>>0,k||d(D,4,this.length),r.read(this,D,!0,23,4)},v.prototype.readFloatBE=function(D,k){return D=D>>>0,k||d(D,4,this.length),r.read(this,D,!1,23,4)},v.prototype.readDoubleLE=function(D,k){return D=D>>>0,k||d(D,8,this.length),r.read(this,D,!0,52,8)},v.prototype.readDoubleBE=function(D,k){return D=D>>>0,k||d(D,8,this.length),r.read(this,D,!1,52,8)};function M(K,D,k,L,te,Z){if(!v.isBuffer(K))throw new TypeError('"buffer" argument must be a Buffer instance');if(D>te||DK.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(D,k,L,te){if(D=+D,k=k>>>0,L=L>>>0,!te){var Z=Math.pow(2,8*L)-1;M(this,D,k,L,Z,0)}var Q=1,Ie=0;for(this[k]=D&255;++Ie>>0,L=L>>>0,!te){var Z=Math.pow(2,8*L)-1;M(this,D,k,L,Z,0)}var Q=L-1,Ie=1;for(this[k+Q]=D&255;--Q>=0&&(Ie*=256);)this[k+Q]=D/Ie&255;return k+L},v.prototype.writeUint8=v.prototype.writeUInt8=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,1,255,0),this[k]=D&255,k+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,65535,0),this[k]=D&255,this[k+1]=D>>>8,k+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,65535,0),this[k]=D>>>8,this[k+1]=D&255,k+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,4294967295,0),this[k+3]=D>>>24,this[k+2]=D>>>16,this[k+1]=D>>>8,this[k]=D&255,k+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,4294967295,0),this[k]=D>>>24,this[k+1]=D>>>16,this[k+2]=D>>>8,this[k+3]=D&255,k+4},v.prototype.writeIntLE=function(D,k,L,te){if(D=+D,k=k>>>0,!te){var Z=Math.pow(2,8*L-1);M(this,D,k,L,Z-1,-Z)}var Q=0,Ie=1,ie=0;for(this[k]=D&255;++Q>0)-ie&255;return k+L},v.prototype.writeIntBE=function(D,k,L,te){if(D=+D,k=k>>>0,!te){var Z=Math.pow(2,8*L-1);M(this,D,k,L,Z-1,-Z)}var Q=L-1,Ie=1,ie=0;for(this[k+Q]=D&255;--Q>=0&&(Ie*=256);)D<0&&ie===0&&this[k+Q+1]!==0&&(ie=1),this[k+Q]=(D/Ie>>0)-ie&255;return k+L},v.prototype.writeInt8=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,1,127,-128),D<0&&(D=255+D+1),this[k]=D&255,k+1},v.prototype.writeInt16LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,32767,-32768),this[k]=D&255,this[k+1]=D>>>8,k+2},v.prototype.writeInt16BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,32767,-32768),this[k]=D>>>8,this[k+1]=D&255,k+2},v.prototype.writeInt32LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,2147483647,-2147483648),this[k]=D&255,this[k+1]=D>>>8,this[k+2]=D>>>16,this[k+3]=D>>>24,k+4},v.prototype.writeInt32BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[k]=D>>>24,this[k+1]=D>>>16,this[k+2]=D>>>8,this[k+3]=D&255,k+4};function C(K,D,k,L,te,Z){if(k+L>K.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function P(K,D,k,L,te){return D=+D,k=k>>>0,te||C(K,D,k,4),r.write(K,D,k,L,23,4),k+4}v.prototype.writeFloatLE=function(D,k,L){return P(this,D,k,!0,L)},v.prototype.writeFloatBE=function(D,k,L){return P(this,D,k,!1,L)};function S(K,D,k,L,te){return D=+D,k=k>>>0,te||C(K,D,k,8),r.write(K,D,k,L,52,8),k+8}v.prototype.writeDoubleLE=function(D,k,L){return S(this,D,k,!0,L)},v.prototype.writeDoubleBE=function(D,k,L){return S(this,D,k,!1,L)},v.prototype.copy=function(D,k,L,te){if(!v.isBuffer(D))throw new TypeError("argument should be a Buffer");if(L||(L=0),!te&&te!==0&&(te=this.length),k>=D.length&&(k=D.length),k||(k=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),D.length-k>>0,L=L===void 0?this.length:L>>>0,D||(D=0);var Q;if(typeof D=="number")for(Q=k;Q55295&&k<57344){if(!te){if(k>56319){(D-=3)>-1&&Z.push(239,191,189);continue}else if(Q+1===L){(D-=3)>-1&&Z.push(239,191,189);continue}te=k;continue}if(k<56320){(D-=3)>-1&&Z.push(239,191,189),te=k;continue}k=(te-55296<<10|k-56320)+65536}else te&&(D-=3)>-1&&Z.push(239,191,189);if(te=null,k<128){if((D-=1)<0)break;Z.push(k)}else if(k<2048){if((D-=2)<0)break;Z.push(k>>6|192,k&63|128)}else if(k<65536){if((D-=3)<0)break;Z.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((D-=4)<0)break;Z.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return Z}function z(K){for(var D=[],k=0;k>8,te=k%256,Z.push(te),Z.push(L);return Z}function j(K){return e.toByteArray(U(K))}function N(K,D,k,L){for(var te=0;te=D.length||te>=K.length);++te)D[te+k]=K[te];return te}function $(K,D){return K instanceof D||K!=null&&K.constructor!=null&&K.constructor.name!=null&&K.constructor.name===D.name}function ee(K){return K!==K}var J=function(){for(var K="0123456789abcdef",D=new Array(256),k=0;k<16;++k)for(var L=k*16,te=0;te<16;++te)D[L+te]=K[k]+K[te];return D}()})(He);var Je={exports:{}},br=Je.exports={},mi,gi;function dp(){throw new Error("setTimeout has not been defined")}function hp(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?mi=setTimeout:mi=dp}catch{mi=dp}try{typeof clearTimeout=="function"?gi=clearTimeout:gi=hp}catch{gi=hp}})();function Wy(t){if(mi===setTimeout)return setTimeout(t,0);if((mi===dp||!mi)&&setTimeout)return mi=setTimeout,setTimeout(t,0);try{return mi(t,0)}catch{try{return mi.call(null,t,0)}catch{return mi.call(this,t,0)}}}function j8(t){if(gi===clearTimeout)return clearTimeout(t);if((gi===hp||!gi)&&clearTimeout)return gi=clearTimeout,clearTimeout(t);try{return gi(t)}catch{try{return gi.call(null,t)}catch{return gi.call(this,t)}}}var Xi=[],ps=!1,lo,_c=-1;function G8(){!ps||!lo||(ps=!1,lo.length?Xi=lo.concat(Xi):_c=-1,Xi.length&&Zy())}function Zy(){if(!ps){var t=Wy(G8);ps=!0;for(var e=Xi.length;e;){for(lo=Xi,Xi=[];++_c1)for(var r=1;r!!r[s.toLowerCase()]:s=>!!r[s]}function v0(t){if(Xe(t)){const e={};for(let r=0;r{if(r){const n=r.split(Z8);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function oi(t){let e="";if(mr(t))e=t;else if(Xe(t))for(let r=0;rmr(t)?t:t==null?"":Xe(t)||nr(t)&&(t.toString===t3||!st(t.toString))?JSON.stringify(t,Yy,2):String(t),Yy=(t,e)=>e&&e.__v_isRef?Yy(t,e.value):ms(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,s])=>(r[`${n} =>`]=s,r),{})}:Qy(e)?{[`Set(${e.size})`]:[...e.values()]}:nr(e)&&!Xe(e)&&!Nf(e)?String(e):e,er={},vs=[],ai=()=>{},ew=()=>!1,tw=/^on[^a-z]/,El=t=>tw.test(t),f1=t=>t.startsWith("onUpdate:"),Tr=Object.assign,c1=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},rw=Object.prototype.hasOwnProperty,At=(t,e)=>rw.call(t,e),Xe=Array.isArray,ms=t=>Sl(t)==="[object Map]",Qy=t=>Sl(t)==="[object Set]",st=t=>typeof t=="function",mr=t=>typeof t=="string",l1=t=>typeof t=="symbol",nr=t=>t!==null&&typeof t=="object",e3=t=>nr(t)&&st(t.then)&&st(t.catch),t3=Object.prototype.toString,Sl=t=>t3.call(t),nw=t=>Sl(t).slice(8,-1),Nf=t=>Sl(t)==="[object Object]",u1=t=>mr(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Mc=s1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rl=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},iw=/-(\w)/g,ki=Rl(t=>t.replace(iw,(e,r)=>r?r.toUpperCase():"")),aw=/\B([A-Z])/g,Ks=Rl(t=>t.replace(aw,"-$1").toLowerCase()),Cl=Rl(t=>t.charAt(0).toUpperCase()+t.slice(1)),Ac=Rl(t=>t?`on${Cl(t)}`:""),zf=(t,e)=>!Object.is(t,e),Ec=(t,e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},jf=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let nm;const ow=()=>nm||(nm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof Gc<"u"?Gc:{});let gn;class r3{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=gn,!e&&gn&&(this.index=(gn.scopes||(gn.scopes=[])).push(this)-1)}run(e){if(this.active){const r=gn;try{return gn=this,e()}finally{gn=r}}}on(){gn=this}off(){gn=this.parent}stop(e){if(this.active){let r,n;for(r=0,n=this.effects.length;r{const e=new Set(t);return e.w=0,e.n=0,e},i3=t=>(t.w&Pa)>0,a3=t=>(t.n&Pa)>0,lw=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n{(g==="length"||g>=b)&&v.push(m)})}else switch(r!==void 0&&v.push(u.get(r)),e){case"add":Xe(t)?u1(r)&&v.push(u.get("length")):(v.push(u.get(vo)),ms(t)&&v.push(u.get(mp)));break;case"delete":Xe(t)||(v.push(u.get(vo)),ms(t)&&v.push(u.get(mp)));break;case"set":ms(t)&&v.push(u.get(vo));break}if(v.length===1)v[0]&&gp(v[0]);else{const b=[];for(const m of v)m&&b.push(...m);gp(d1(b))}}function gp(t,e){const r=Xe(t)?t:[...t];for(const n of r)n.computed&&am(n);for(const n of r)n.computed||am(n)}function am(t,e){(t!==Yn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const dw=s1("__proto__,__v_isRef,__isVue"),f3=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(l1)),hw=p1(),pw=p1(!1,!0),vw=p1(!0),om=mw();function mw(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=Mt(this);for(let i=0,u=this.length;i{t[e]=function(...r){$s();const n=Mt(this)[e].apply(this,r);return qs(),n}}),t}function p1(t=!1,e=!1){return function(n,s,i){if(s==="__v_isReactive")return!t;if(s==="__v_isReadonly")return t;if(s==="__v_isShallow")return e;if(s==="__v_raw"&&i===(t?e?kw:h3:e?d3:u3).get(n))return n;const u=Xe(n);if(!t&&u&&At(om,s))return Reflect.get(om,s,i);const v=Reflect.get(n,s,i);return(l1(s)?f3.has(s):dw(s))||(t||En(n,"get",s),e)?v:pr(v)?u&&u1(s)?v:v.value:nr(v)?t?p3(v):Ua(v):v}}const gw=c3(),bw=c3(!0);function c3(t=!1){return function(r,n,s,i){let u=r[n];if(Ss(u)&&pr(u)&&!pr(s))return!1;if(!t&&(!Wc(s)&&!Ss(s)&&(u=Mt(u),s=Mt(s)),!Xe(r)&&pr(u)&&!pr(s)))return u.value=s,!0;const v=Xe(r)&&u1(n)?Number(n)t,Bl=t=>Reflect.getPrototypeOf(t);function q0(t,e,r=!1,n=!1){t=t.__v_raw;const s=Mt(t),i=Mt(e);r||(e!==i&&En(s,"get",e),En(s,"get",i));const{has:u}=Bl(s),v=n?v1:r?b1:Gf;if(u.call(s,e))return v(t.get(e));if(u.call(s,i))return v(t.get(i));t!==s&&t.get(e)}function H0(t,e=!1){const r=this.__v_raw,n=Mt(r),s=Mt(t);return e||(t!==s&&En(n,"has",t),En(n,"has",s)),t===s?r.has(t):r.has(t)||r.has(s)}function z0(t,e=!1){return t=t.__v_raw,!e&&En(Mt(t),"iterate",vo),Reflect.get(t,"size",t)}function sm(t){t=Mt(t);const e=Mt(this);return Bl(e).has.call(e,t)||(e.add(t),ea(e,"add",t,t)),this}function fm(t,e){e=Mt(e);const r=Mt(this),{has:n,get:s}=Bl(r);let i=n.call(r,t);i||(t=Mt(t),i=n.call(r,t));const u=s.call(r,t);return r.set(t,e),i?zf(e,u)&&ea(r,"set",t,e):ea(r,"add",t,e),this}function cm(t){const e=Mt(this),{has:r,get:n}=Bl(e);let s=r.call(e,t);s||(t=Mt(t),s=r.call(e,t)),n&&n.call(e,t);const i=e.delete(t);return s&&ea(e,"delete",t,void 0),i}function lm(){const t=Mt(this),e=t.size!==0,r=t.clear();return e&&ea(t,"clear",void 0,void 0),r}function j0(t,e){return function(n,s){const i=this,u=i.__v_raw,v=Mt(u),b=e?v1:t?b1:Gf;return!t&&En(v,"iterate",vo),u.forEach((m,g)=>n.call(s,b(m),b(g),i))}}function G0(t,e,r){return function(...n){const s=this.__v_raw,i=Mt(s),u=ms(i),v=t==="entries"||t===Symbol.iterator&&u,b=t==="keys"&&u,m=s[t](...n),g=r?v1:e?b1:Gf;return!e&&En(i,"iterate",b?mp:vo),{next(){const{value:_,done:A}=m.next();return A?{value:_,done:A}:{value:v?[g(_[0]),g(_[1])]:g(_),done:A}},[Symbol.iterator](){return this}}}}function la(t){return function(...e){return t==="delete"?!1:this}}function Aw(){const t={get(i){return q0(this,i)},get size(){return z0(this)},has:H0,add:sm,set:fm,delete:cm,clear:lm,forEach:j0(!1,!1)},e={get(i){return q0(this,i,!1,!0)},get size(){return z0(this)},has:H0,add:sm,set:fm,delete:cm,clear:lm,forEach:j0(!1,!0)},r={get(i){return q0(this,i,!0)},get size(){return z0(this,!0)},has(i){return H0.call(this,i,!0)},add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear"),forEach:j0(!0,!1)},n={get(i){return q0(this,i,!0,!0)},get size(){return z0(this,!0)},has(i){return H0.call(this,i,!0)},add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear"),forEach:j0(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{t[i]=G0(i,!1,!1),r[i]=G0(i,!0,!1),e[i]=G0(i,!1,!0),n[i]=G0(i,!0,!0)}),[t,r,e,n]}const[Ew,Sw,Rw,Cw]=Aw();function m1(t,e){const r=e?t?Cw:Rw:t?Sw:Ew;return(n,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?n:Reflect.get(At(r,s)&&s in n?r:n,s,i)}const Bw={get:m1(!1,!1)},Nw={get:m1(!1,!0)},Tw={get:m1(!0,!1)},u3=new WeakMap,d3=new WeakMap,h3=new WeakMap,kw=new WeakMap;function Pw(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Iw(t){return t.__v_skip||!Object.isExtensible(t)?0:Pw(nw(t))}function Ua(t){return Ss(t)?t:g1(t,!1,l3,Bw,u3)}function Dw(t){return g1(t,!1,Mw,Nw,d3)}function p3(t){return g1(t,!0,_w,Tw,h3)}function g1(t,e,r,n,s){if(!nr(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=s.get(t);if(i)return i;const u=Iw(t);if(u===0)return t;const v=new Proxy(t,u===2?n:r);return s.set(t,v),v}function Na(t){return Ss(t)?Na(t.__v_raw):!!(t&&t.__v_isReactive)}function Ss(t){return!!(t&&t.__v_isReadonly)}function Wc(t){return!!(t&&t.__v_isShallow)}function v3(t){return Na(t)||Ss(t)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}function Pi(t){return Vc(t,"__v_skip",!0),t}const Gf=t=>nr(t)?Ua(t):t,b1=t=>nr(t)?p3(t):t;function m3(t){Ba&&Yn&&(t=Mt(t),s3(t.dep||(t.dep=d1())))}function g3(t,e){t=Mt(t),t.dep&&gp(t.dep)}function pr(t){return!!(t&&t.__v_isRef===!0)}function Qr(t){return b3(t,!1)}function Ow(t){return b3(t,!0)}function b3(t,e){return pr(t)?t:new Fw(t,e)}class Fw{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:Mt(e),this._value=r?e:Gf(e)}get value(){return m3(this),this._value}set value(e){const r=this.__v_isShallow||Wc(e)||Ss(e);e=r?e:Mt(e),zf(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:Gf(e),g3(this))}}function mo(t){return pr(t)?t.value:t}const Lw={get:(t,e,r)=>mo(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const s=t[e];return pr(s)&&!pr(r)?(s.value=r,!0):Reflect.set(t,e,r,n)}};function y3(t){return Na(t)?t:new Proxy(t,Lw)}function Uw(t){const e=Xe(t)?new Array(t.length):{};for(const r in t)e[r]=$w(t,r);return e}class Kw{constructor(e,r,n){this._object=e,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}}function $w(t,e,r){const n=t[e];return pr(n)?n:new Kw(t,e,r)}var x3;class qw{constructor(e,r,n,s){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this[x3]=!1,this._dirty=!0,this.effect=new h1(e,()=>{this._dirty||(this._dirty=!0,g3(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=Mt(this);return m3(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}x3="__v_isReadonly";function Hw(t,e,r=!1){let n,s;const i=st(t);return i?(n=t,s=ai):(n=t.get,s=t.set),new qw(n,s,i||!s,r)}function Ta(t,e,r,n){let s;try{s=n?t(...n):t()}catch(i){Nl(i,e,r)}return s}function Fn(t,e,r,n){if(st(t)){const i=Ta(t,e,r,n);return i&&e3(i)&&i.catch(u=>{Nl(u,e,r)}),i}const s=[];for(let i=0;i>>1;Wf(Wr[n])_i&&Wr.splice(e,1)}function Vw(t){Xe(t)?gs.push(...t):(!Gi||!Gi.includes(t,t.allowRecurse?io+1:io))&&gs.push(t),_3()}function um(t,e=Vf?_i+1:0){for(;eWf(r)-Wf(n)),io=0;iot.id==null?1/0:t.id,Ww=(t,e)=>{const r=Wf(t)-Wf(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function A3(t){bp=!1,Vf=!0,Wr.sort(Ww);const e=ai;try{for(_i=0;_imr(E)?E.trim():E)),_&&(s=r.map(jf))}let v,b=n[v=Ac(e)]||n[v=Ac(ki(e))];!b&&i&&(b=n[v=Ac(Ks(e))]),b&&Fn(b,t,6,s);const m=n[v+"Once"];if(m){if(!t.emitted)t.emitted={};else if(t.emitted[v])return;t.emitted[v]=!0,Fn(m,t,6,s)}}function E3(t,e,r=!1){const n=e.emitsCache,s=n.get(t);if(s!==void 0)return s;const i=t.emits;let u={},v=!1;if(!st(t)){const b=m=>{const g=E3(m,e,!0);g&&(v=!0,Tr(u,g))};!r&&e.mixins.length&&e.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}return!i&&!v?(nr(t)&&n.set(t,null),null):(Xe(i)?i.forEach(b=>u[b]=null):Tr(u,i),nr(t)&&n.set(t,u),u)}function Tl(t,e){return!t||!El(e)?!1:(e=e.slice(2).replace(/Once$/,""),At(t,e[0].toLowerCase()+e.slice(1))||At(t,Ks(e))||At(t,e))}let Ur=null,kl=null;function Zc(t){const e=Ur;return Ur=t,kl=t&&t.type.__scopeId||null,e}function w1(t){kl=t}function _1(){kl=null}function ta(t,e=Ur,r){if(!e||t._n)return t;const n=(...s)=>{n._d&&_m(-1);const i=Zc(e);let u;try{u=t(...s)}finally{Zc(i),n._d&&_m(1)}return u};return n._n=!0,n._c=!0,n._d=!0,n}function Hu(t){const{type:e,vnode:r,proxy:n,withProxy:s,props:i,propsOptions:[u],slots:v,attrs:b,emit:m,render:g,renderCache:_,data:A,setupState:E,ctx:R,inheritAttrs:B}=t;let T,F;const O=Zc(t);try{if(r.shapeFlag&4){const H=s||n;T=yi(g.call(H,H,_,i,E,A,R)),F=b}else{const H=e;T=yi(H.length>1?H(i,{attrs:b,slots:v,emit:m}):H(i,null)),F=e.props?b:Jw(b)}}catch(H){If.length=0,Nl(H,t,1),T=Wt(Ln)}let q=T;if(F&&B!==!1){const H=Object.keys(F),{shapeFlag:G}=q;H.length&&G&7&&(u&&H.some(f1)&&(F=Xw(F,u)),q=Ia(q,F))}return r.dirs&&(q=Ia(q),q.dirs=q.dirs?q.dirs.concat(r.dirs):r.dirs),r.transition&&(q.transition=r.transition),T=q,Zc(O),T}const Jw=t=>{let e;for(const r in t)(r==="class"||r==="style"||El(r))&&((e||(e={}))[r]=t[r]);return e},Xw=(t,e)=>{const r={};for(const n in t)(!f1(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function Yw(t,e,r){const{props:n,children:s,component:i}=t,{props:u,children:v,patchFlag:b}=e,m=i.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&b>=0){if(b&1024)return!0;if(b&16)return n?dm(n,u,m):!!u;if(b&8){const g=e.dynamicProps;for(let _=0;_t.__isSuspense;function t9(t,e){e&&e.pendingBranch?Xe(t)?e.effects.push(...t):e.effects.push(t):Vw(t)}function Sc(t,e){if(Br){let r=Br.provides;const n=Br.parent&&Br.parent.provides;n===r&&(r=Br.provides=Object.create(n)),r[t]=e}}function _n(t,e,r=!1){const n=Br||Ur;if(n){const s=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(s&&t in s)return s[t];if(arguments.length>1)return r&&st(e)?e.call(n.proxy):e}}const V0={};function bs(t,e,r){return S3(t,e,r)}function S3(t,e,{immediate:r,deep:n,flush:s,onTrack:i,onTrigger:u}=er){const v=Br;let b,m=!1,g=!1;if(pr(t)?(b=()=>t.value,m=Wc(t)):Na(t)?(b=()=>t,n=!0):Xe(t)?(g=!0,m=t.some(q=>Na(q)||Wc(q)),b=()=>t.map(q=>{if(pr(q))return q.value;if(Na(q))return uo(q);if(st(q))return Ta(q,v,2)})):st(t)?e?b=()=>Ta(t,v,2):b=()=>{if(!(v&&v.isUnmounted))return _&&_(),Fn(t,v,3,[A])}:b=ai,e&&n){const q=b;b=()=>uo(q())}let _,A=q=>{_=F.onStop=()=>{Ta(q,v,4)}},E;if(Yf)if(A=ai,e?r&&Fn(e,v,3,[b(),g?[]:void 0,A]):b(),s==="sync"){const q=J9();E=q.__watcherHandles||(q.__watcherHandles=[])}else return ai;let R=g?new Array(t.length).fill(V0):V0;const B=()=>{if(!!F.active)if(e){const q=F.run();(n||m||(g?q.some((H,G)=>zf(H,R[G])):zf(q,R)))&&(_&&_(),Fn(e,v,3,[q,R===V0?void 0:g&&R[0]===V0?[]:R,A]),R=q)}else F.run()};B.allowRecurse=!!e;let T;s==="sync"?T=B:s==="post"?T=()=>un(B,v&&v.suspense):(B.pre=!0,v&&(B.id=v.uid),T=()=>x1(B));const F=new h1(b,T);e?r?B():R=F.run():s==="post"?un(F.run.bind(F),v&&v.suspense):F.run();const O=()=>{F.stop(),v&&v.scope&&c1(v.scope.effects,F)};return E&&E.push(O),O}function r9(t,e,r){const n=this.proxy,s=mr(t)?t.includes(".")?R3(n,t):()=>n[t]:t.bind(n,n);let i;st(e)?i=e:(i=e.handler,r=e);const u=Br;Cs(this);const v=S3(s,i.bind(n),r);return u?Cs(u):go(),v}function R3(t,e){const r=e.split(".");return()=>{let n=t;for(let s=0;s{uo(r,e)});else if(Nf(t))for(const r in t)uo(t[r],e);return t}function C3(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return A1(()=>{t.isMounted=!0}),P3(()=>{t.isUnmounting=!0}),t}const Bn=[Function,Array],n9={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Bn,onEnter:Bn,onAfterEnter:Bn,onEnterCancelled:Bn,onBeforeLeave:Bn,onLeave:Bn,onAfterLeave:Bn,onLeaveCancelled:Bn,onBeforeAppear:Bn,onAppear:Bn,onAfterAppear:Bn,onAppearCancelled:Bn},setup(t,{slots:e}){const r=Ll(),n=C3();let s;return()=>{const i=e.default&&M1(e.default(),!0);if(!i||!i.length)return;let u=i[0];if(i.length>1){for(const B of i)if(B.type!==Ln){u=B;break}}const v=Mt(t),{mode:b}=v;if(n.isLeaving)return zu(u);const m=hm(u);if(!m)return zu(u);const g=Zf(m,v,n,r);Jf(m,g);const _=r.subTree,A=_&&hm(_);let E=!1;const{getTransitionKey:R}=m.type;if(R){const B=R();s===void 0?s=B:B!==s&&(s=B,E=!0)}if(A&&A.type!==Ln&&(!ao(m,A)||E)){const B=Zf(A,v,n,r);if(Jf(A,B),b==="out-in")return n.isLeaving=!0,B.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},zu(u);b==="in-out"&&m.type!==Ln&&(B.delayLeave=(T,F,O)=>{const q=N3(n,A);q[String(A.key)]=A,T._leaveCb=()=>{F(),T._leaveCb=void 0,delete g.delayedLeave},g.delayedLeave=O})}return u}}},B3=n9;function N3(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function Zf(t,e,r,n){const{appear:s,mode:i,persisted:u=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:m,onEnterCancelled:g,onBeforeLeave:_,onLeave:A,onAfterLeave:E,onLeaveCancelled:R,onBeforeAppear:B,onAppear:T,onAfterAppear:F,onAppearCancelled:O}=e,q=String(t.key),H=N3(r,t),G=(Y,W)=>{Y&&Fn(Y,n,9,W)},re=(Y,W)=>{const se=W[1];G(Y,W),Xe(Y)?Y.every(y=>y.length<=1)&&se():Y.length<=1&&se()},ne={mode:i,persisted:u,beforeEnter(Y){let W=v;if(!r.isMounted)if(s)W=B||v;else return;Y._leaveCb&&Y._leaveCb(!0);const se=H[q];se&&ao(t,se)&&se.el._leaveCb&&se.el._leaveCb(),G(W,[Y])},enter(Y){let W=b,se=m,y=g;if(!r.isMounted)if(s)W=T||b,se=F||m,y=O||g;else return;let a=!1;const f=Y._enterCb=c=>{a||(a=!0,c?G(y,[Y]):G(se,[Y]),ne.delayedLeave&&ne.delayedLeave(),Y._enterCb=void 0)};W?re(W,[Y,f]):f()},leave(Y,W){const se=String(t.key);if(Y._enterCb&&Y._enterCb(!0),r.isUnmounting)return W();G(_,[Y]);let y=!1;const a=Y._leaveCb=f=>{y||(y=!0,W(),f?G(R,[Y]):G(E,[Y]),Y._leaveCb=void 0,H[se]===t&&delete H[se])};H[se]=t,A?re(A,[Y,a]):a()},clone(Y){return Zf(Y,e,r,n)}};return ne}function zu(t){if(Pl(t))return t=Ia(t),t.children=null,t}function hm(t){return Pl(t)?t.children?t.children[0]:void 0:t}function Jf(t,e){t.shapeFlag&6&&t.component?Jf(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function M1(t,e=!1,r){let n=[],s=0;for(let i=0;i1)for(let i=0;i!!t.type.__asyncLoader,Pl=t=>t.type.__isKeepAlive;function i9(t,e){T3(t,"a",e)}function a9(t,e){T3(t,"da",e)}function T3(t,e,r=Br){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Il(e,n,r),r){let s=r.parent;for(;s&&s.parent;)Pl(s.parent.vnode)&&o9(n,e,r,s),s=s.parent}}function o9(t,e,r,n){const s=Il(e,t,n,!0);I3(()=>{c1(n[e],s)},r)}function Il(t,e,r=Br,n=!1){if(r){const s=r[t]||(r[t]=[]),i=e.__weh||(e.__weh=(...u)=>{if(r.isUnmounted)return;$s(),Cs(r);const v=Fn(e,r,t,u);return go(),qs(),v});return n?s.unshift(i):s.push(i),i}}const fa=t=>(e,r=Br)=>(!Yf||t==="sp")&&Il(t,(...n)=>e(...n),r),s9=fa("bm"),A1=fa("m"),f9=fa("bu"),k3=fa("u"),P3=fa("bum"),I3=fa("um"),c9=fa("sp"),l9=fa("rtg"),u9=fa("rtc");function d9(t,e=Br){Il("ec",t,e)}function ss(t,e){const r=Ur;if(r===null)return t;const n=Ul(r)||r.proxy,s=t.dirs||(t.dirs=[]);for(let i=0;ie(u,v,void 0,i&&i[v]));else{const u=Object.keys(t);s=new Array(u.length);for(let v=0,b=u.length;vYc(e)?!(e.type===Ln||e.type===tr&&!O3(e.children)):!0)?t:null}function v9(t,e){const r={};for(const n in t)r[e&&/[A-Z]/.test(n)?`on:${n}`:Ac(n)]=t[n];return r}const yp=t=>t?V3(t)?Ul(t)||t.proxy:yp(t.parent):null,kf=Tr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>yp(t.parent),$root:t=>yp(t.root),$emit:t=>t.emit,$options:t=>C1(t),$forceUpdate:t=>t.f||(t.f=()=>x1(t.update)),$nextTick:t=>t.n||(t.n=Rs.bind(t.proxy)),$watch:t=>r9.bind(t)}),ju=(t,e)=>t!==er&&!t.__isScriptSetup&&At(t,e),m9={get({_:t},e){const{ctx:r,setupState:n,data:s,props:i,accessCache:u,type:v,appContext:b}=t;let m;if(e[0]!=="$"){const E=u[e];if(E!==void 0)switch(E){case 1:return n[e];case 2:return s[e];case 4:return r[e];case 3:return i[e]}else{if(ju(n,e))return u[e]=1,n[e];if(s!==er&&At(s,e))return u[e]=2,s[e];if((m=t.propsOptions[0])&&At(m,e))return u[e]=3,i[e];if(r!==er&&At(r,e))return u[e]=4,r[e];xp&&(u[e]=0)}}const g=kf[e];let _,A;if(g)return e==="$attrs"&&En(t,"get",e),g(t);if((_=v.__cssModules)&&(_=_[e]))return _;if(r!==er&&At(r,e))return u[e]=4,r[e];if(A=b.config.globalProperties,At(A,e))return A[e]},set({_:t},e,r){const{data:n,setupState:s,ctx:i}=t;return ju(s,e)?(s[e]=r,!0):n!==er&&At(n,e)?(n[e]=r,!0):At(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:s,propsOptions:i}},u){let v;return!!r[u]||t!==er&&At(t,u)||ju(e,u)||(v=i[0])&&At(v,u)||At(n,u)||At(kf,u)||At(s.config.globalProperties,u)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:At(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};let xp=!0;function g9(t){const e=C1(t),r=t.proxy,n=t.ctx;xp=!1,e.beforeCreate&&vm(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:u,watch:v,provide:b,inject:m,created:g,beforeMount:_,mounted:A,beforeUpdate:E,updated:R,activated:B,deactivated:T,beforeDestroy:F,beforeUnmount:O,destroyed:q,unmounted:H,render:G,renderTracked:re,renderTriggered:ne,errorCaptured:Y,serverPrefetch:W,expose:se,inheritAttrs:y,components:a,directives:f,filters:c}=e;if(m&&b9(m,n,null,t.appContext.config.unwrapInjectedRef),u)for(const x in u){const w=u[x];st(w)&&(n[x]=w.bind(r))}if(s){const x=s.call(r,r);nr(x)&&(t.data=Ua(x))}if(xp=!0,i)for(const x in i){const w=i[x],p=st(w)?w.bind(r,r):st(w.get)?w.get.bind(r,r):ai,o=!st(w)&&st(w.set)?w.set.bind(r):ai,d=nn({get:p,set:o});Object.defineProperty(n,x,{enumerable:!0,configurable:!0,get:()=>d.value,set:M=>d.value=M})}if(v)for(const x in v)F3(v[x],n,r,x);if(b){const x=st(b)?b.call(r):b;Reflect.ownKeys(x).forEach(w=>{Sc(w,x[w])})}g&&vm(g,t,"c");function h(x,w){Xe(w)?w.forEach(p=>x(p.bind(r))):w&&x(w.bind(r))}if(h(s9,_),h(A1,A),h(f9,E),h(k3,R),h(i9,B),h(a9,T),h(d9,Y),h(u9,re),h(l9,ne),h(P3,O),h(I3,H),h(c9,W),Xe(se))if(se.length){const x=t.exposed||(t.exposed={});se.forEach(w=>{Object.defineProperty(x,w,{get:()=>r[w],set:p=>r[w]=p})})}else t.exposed||(t.exposed={});G&&t.render===ai&&(t.render=G),y!=null&&(t.inheritAttrs=y),a&&(t.components=a),f&&(t.directives=f)}function b9(t,e,r=ai,n=!1){Xe(t)&&(t=wp(t));for(const s in t){const i=t[s];let u;nr(i)?"default"in i?u=_n(i.from||s,i.default,!0):u=_n(i.from||s):u=_n(i),pr(u)&&n?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>u.value,set:v=>u.value=v}):e[s]=u}}function vm(t,e,r){Fn(Xe(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function F3(t,e,r,n){const s=n.includes(".")?R3(r,n):()=>r[n];if(mr(t)){const i=e[t];st(i)&&bs(s,i)}else if(st(t))bs(s,t.bind(r));else if(nr(t))if(Xe(t))t.forEach(i=>F3(i,e,r,n));else{const i=st(t.handler)?t.handler.bind(r):e[t.handler];st(i)&&bs(s,i,t)}}function C1(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:u}}=t.appContext,v=i.get(e);let b;return v?b=v:!s.length&&!r&&!n?b=e:(b={},s.length&&s.forEach(m=>Xc(b,m,u,!0)),Xc(b,e,u)),nr(e)&&i.set(e,b),b}function Xc(t,e,r,n=!1){const{mixins:s,extends:i}=e;i&&Xc(t,i,r,!0),s&&s.forEach(u=>Xc(t,u,r,!0));for(const u in e)if(!(n&&u==="expose")){const v=y9[u]||r&&r[u];t[u]=v?v(t[u],e[u]):e[u]}return t}const y9={data:mm,props:ro,emits:ro,methods:ro,computed:ro,beforeCreate:tn,created:tn,beforeMount:tn,mounted:tn,beforeUpdate:tn,updated:tn,beforeDestroy:tn,beforeUnmount:tn,destroyed:tn,unmounted:tn,activated:tn,deactivated:tn,errorCaptured:tn,serverPrefetch:tn,components:ro,directives:ro,watch:w9,provide:mm,inject:x9};function mm(t,e){return e?t?function(){return Tr(st(t)?t.call(this,this):t,st(e)?e.call(this,this):e)}:e:t}function x9(t,e){return ro(wp(t),wp(e))}function wp(t){if(Xe(t)){const e={};for(let r=0;r0)&&!(u&16)){if(u&8){const g=t.vnode.dynamicProps;for(let _=0;_{b=!0;const[A,E]=U3(_,e,!0);Tr(u,A),E&&v.push(...E)};!r&&e.mixins.length&&e.mixins.forEach(g),t.extends&&g(t.extends),t.mixins&&t.mixins.forEach(g)}if(!i&&!b)return nr(t)&&n.set(t,vs),vs;if(Xe(i))for(let g=0;g-1,E[1]=B<0||R-1||At(E,"default"))&&v.push(_)}}}const m=[u,v];return nr(t)&&n.set(t,m),m}function gm(t){return t[0]!=="$"}function bm(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:t===null?"null":""}function ym(t,e){return bm(t)===bm(e)}function xm(t,e){return Xe(e)?e.findIndex(r=>ym(r,t)):st(e)&&ym(e,t)?0:-1}const K3=t=>t[0]==="_"||t==="$stable",B1=t=>Xe(t)?t.map(yi):[yi(t)],A9=(t,e,r)=>{if(e._n)return e;const n=ta((...s)=>B1(e(...s)),r);return n._c=!1,n},$3=(t,e,r)=>{const n=t._ctx;for(const s in t){if(K3(s))continue;const i=t[s];if(st(i))e[s]=A9(s,i,n);else if(i!=null){const u=B1(i);e[s]=()=>u}}},q3=(t,e)=>{const r=B1(e);t.slots.default=()=>r},E9=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=Mt(e),Vc(e,"_",r)):$3(e,t.slots={})}else t.slots={},e&&q3(t,e);Vc(t.slots,Ol,1)},S9=(t,e,r)=>{const{vnode:n,slots:s}=t;let i=!0,u=er;if(n.shapeFlag&32){const v=e._;v?r&&v===1?i=!1:(Tr(s,e),!r&&v===1&&delete s._):(i=!e.$stable,$3(e,s)),u=e}else e&&(q3(t,e),u={default:1});if(i)for(const v in s)!K3(v)&&!(v in u)&&delete s[v]};function H3(){return{app:null,config:{isNativeTag:ew,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let R9=0;function C9(t,e){return function(n,s=null){st(n)||(n=Object.assign({},n)),s!=null&&!nr(s)&&(s=null);const i=H3(),u=new Set;let v=!1;const b=i.app={_uid:R9++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:X9,get config(){return i.config},set config(m){},use(m,...g){return u.has(m)||(m&&st(m.install)?(u.add(m),m.install(b,...g)):st(m)&&(u.add(m),m(b,...g))),b},mixin(m){return i.mixins.includes(m)||i.mixins.push(m),b},component(m,g){return g?(i.components[m]=g,b):i.components[m]},directive(m,g){return g?(i.directives[m]=g,b):i.directives[m]},mount(m,g,_){if(!v){const A=Wt(n,s);return A.appContext=i,g&&e?e(A,m):t(A,m,_),v=!0,b._container=m,m.__vue_app__=b,Ul(A.component)||A.component.proxy}},unmount(){v&&(t(null,b._container),delete b._container.__vue_app__)},provide(m,g){return i.provides[m]=g,b}};return b}}function Mp(t,e,r,n,s=!1){if(Xe(t)){t.forEach((A,E)=>Mp(A,e&&(Xe(e)?e[E]:e),r,n,s));return}if(Tf(n)&&!s)return;const i=n.shapeFlag&4?Ul(n.component)||n.component.proxy:n.el,u=s?null:i,{i:v,r:b}=t,m=e&&e.r,g=v.refs===er?v.refs={}:v.refs,_=v.setupState;if(m!=null&&m!==b&&(mr(m)?(g[m]=null,At(_,m)&&(_[m]=null)):pr(m)&&(m.value=null)),st(b))Ta(b,v,12,[u,g]);else{const A=mr(b),E=pr(b);if(A||E){const R=()=>{if(t.f){const B=A?At(_,b)?_[b]:g[b]:b.value;s?Xe(B)&&c1(B,i):Xe(B)?B.includes(i)||B.push(i):A?(g[b]=[i],At(_,b)&&(_[b]=g[b])):(b.value=[i],t.k&&(g[t.k]=b.value))}else A?(g[b]=u,At(_,b)&&(_[b]=u)):E&&(b.value=u,t.k&&(g[t.k]=u))};u?(R.id=-1,un(R,r)):R()}}}const un=t9;function B9(t){return N9(t)}function N9(t,e){const r=ow();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:u,createText:v,createComment:b,setText:m,setElementText:g,parentNode:_,nextSibling:A,setScopeId:E=ai,insertStaticContent:R}=t,B=(N,$,ee,J=null,K=null,D=null,k=!1,L=null,te=!!$.dynamicChildren)=>{if(N===$)return;N&&!ao(N,$)&&(J=U(N),M(N,K,D,!0),N=null),$.patchFlag===-2&&(te=!1,$.dynamicChildren=null);const{type:Z,ref:Q,shapeFlag:Ie}=$;switch(Z){case Dl:T(N,$,ee,J);break;case Ln:F(N,$,ee,J);break;case Rc:N==null&&O($,ee,J,k);break;case tr:a(N,$,ee,J,K,D,k,L,te);break;default:Ie&1?G(N,$,ee,J,K,D,k,L,te):Ie&6?f(N,$,ee,J,K,D,k,L,te):(Ie&64||Ie&128)&&Z.process(N,$,ee,J,K,D,k,L,te,z)}Q!=null&&K&&Mp(Q,N&&N.ref,D,$||N,!$)},T=(N,$,ee,J)=>{if(N==null)n($.el=v($.children),ee,J);else{const K=$.el=N.el;$.children!==N.children&&m(K,$.children)}},F=(N,$,ee,J)=>{N==null?n($.el=b($.children||""),ee,J):$.el=N.el},O=(N,$,ee,J)=>{[N.el,N.anchor]=R(N.children,$,ee,J,N.el,N.anchor)},q=({el:N,anchor:$},ee,J)=>{let K;for(;N&&N!==$;)K=A(N),n(N,ee,J),N=K;n($,ee,J)},H=({el:N,anchor:$})=>{let ee;for(;N&&N!==$;)ee=A(N),s(N),N=ee;s($)},G=(N,$,ee,J,K,D,k,L,te)=>{k=k||$.type==="svg",N==null?re($,ee,J,K,D,k,L,te):W(N,$,K,D,k,L,te)},re=(N,$,ee,J,K,D,k,L)=>{let te,Z;const{type:Q,props:Ie,shapeFlag:ie,transition:oe,dirs:Oe}=N;if(te=N.el=u(N.type,D,Ie&&Ie.is,Ie),ie&8?g(te,N.children):ie&16&&Y(N.children,te,null,J,K,D&&Q!=="foreignObject",k,L),Oe&&Wa(N,null,J,"created"),Ie){for(const fe in Ie)fe!=="value"&&!Mc(fe)&&i(te,fe,null,Ie[fe],D,N.children,J,K,I);"value"in Ie&&i(te,"value",null,Ie.value),(Z=Ie.onVnodeBeforeMount)&&ui(Z,J,N)}ne(te,N,N.scopeId,k,J),Oe&&Wa(N,null,J,"beforeMount");const ae=(!K||K&&!K.pendingBranch)&&oe&&!oe.persisted;ae&&oe.beforeEnter(te),n(te,$,ee),((Z=Ie&&Ie.onVnodeMounted)||ae||Oe)&&un(()=>{Z&&ui(Z,J,N),ae&&oe.enter(te),Oe&&Wa(N,null,J,"mounted")},K)},ne=(N,$,ee,J,K)=>{if(ee&&E(N,ee),J)for(let D=0;D{for(let Z=te;Z{const L=$.el=N.el;let{patchFlag:te,dynamicChildren:Z,dirs:Q}=$;te|=N.patchFlag&16;const Ie=N.props||er,ie=$.props||er;let oe;ee&&Za(ee,!1),(oe=ie.onVnodeBeforeUpdate)&&ui(oe,ee,$,N),Q&&Wa($,N,ee,"beforeUpdate"),ee&&Za(ee,!0);const Oe=K&&$.type!=="foreignObject";if(Z?se(N.dynamicChildren,Z,L,ee,J,Oe,D):k||w(N,$,L,null,ee,J,Oe,D,!1),te>0){if(te&16)y(L,$,Ie,ie,ee,J,K);else if(te&2&&Ie.class!==ie.class&&i(L,"class",null,ie.class,K),te&4&&i(L,"style",Ie.style,ie.style,K),te&8){const ae=$.dynamicProps;for(let fe=0;fe{oe&&ui(oe,ee,$,N),Q&&Wa($,N,ee,"updated")},J)},se=(N,$,ee,J,K,D,k)=>{for(let L=0;L<$.length;L++){const te=N[L],Z=$[L],Q=te.el&&(te.type===tr||!ao(te,Z)||te.shapeFlag&70)?_(te.el):ee;B(te,Z,Q,null,J,K,D,k,!0)}},y=(N,$,ee,J,K,D,k)=>{if(ee!==J){if(ee!==er)for(const L in ee)!Mc(L)&&!(L in J)&&i(N,L,ee[L],null,k,$.children,K,D,I);for(const L in J){if(Mc(L))continue;const te=J[L],Z=ee[L];te!==Z&&L!=="value"&&i(N,L,Z,te,k,$.children,K,D,I)}"value"in J&&i(N,"value",ee.value,J.value)}},a=(N,$,ee,J,K,D,k,L,te)=>{const Z=$.el=N?N.el:v(""),Q=$.anchor=N?N.anchor:v("");let{patchFlag:Ie,dynamicChildren:ie,slotScopeIds:oe}=$;oe&&(L=L?L.concat(oe):oe),N==null?(n(Z,ee,J),n(Q,ee,J),Y($.children,ee,Q,K,D,k,L,te)):Ie>0&&Ie&64&&ie&&N.dynamicChildren?(se(N.dynamicChildren,ie,ee,K,D,k,L),($.key!=null||K&&$===K.subTree)&&N1(N,$,!0)):w(N,$,ee,Q,K,D,k,L,te)},f=(N,$,ee,J,K,D,k,L,te)=>{$.slotScopeIds=L,N==null?$.shapeFlag&512?K.ctx.activate($,ee,J,k,te):c($,ee,J,K,D,k,te):l(N,$,te)},c=(N,$,ee,J,K,D,k)=>{const L=N.component=q9(N,J,K);if(Pl(N)&&(L.ctx.renderer=z),H9(L),L.asyncDep){if(K&&K.registerDep(L,h),!N.el){const te=L.subTree=Wt(Ln);F(null,te,$,ee)}return}h(L,N,$,ee,K,D,k)},l=(N,$,ee)=>{const J=$.component=N.component;if(Yw(N,$,ee))if(J.asyncDep&&!J.asyncResolved){x(J,$,ee);return}else J.next=$,Gw(J.update),J.update();else $.el=N.el,J.vnode=$},h=(N,$,ee,J,K,D,k)=>{const L=()=>{if(N.isMounted){let{next:Q,bu:Ie,u:ie,parent:oe,vnode:Oe}=N,ae=Q,fe;Za(N,!1),Q?(Q.el=Oe.el,x(N,Q,k)):Q=Oe,Ie&&Ec(Ie),(fe=Q.props&&Q.props.onVnodeBeforeUpdate)&&ui(fe,oe,Q,Oe),Za(N,!0);const Ke=Hu(N),le=N.subTree;N.subTree=Ke,B(le,Ke,_(le.el),U(le),N,K,D),Q.el=Ke.el,ae===null&&Qw(N,Ke.el),ie&&un(ie,K),(fe=Q.props&&Q.props.onVnodeUpdated)&&un(()=>ui(fe,oe,Q,Oe),K)}else{let Q;const{el:Ie,props:ie}=$,{bm:oe,m:Oe,parent:ae}=N,fe=Tf($);if(Za(N,!1),oe&&Ec(oe),!fe&&(Q=ie&&ie.onVnodeBeforeMount)&&ui(Q,ae,$),Za(N,!0),Ie&&j){const Ke=()=>{N.subTree=Hu(N),j(Ie,N.subTree,N,K,null)};fe?$.type.__asyncLoader().then(()=>!N.isUnmounted&&Ke()):Ke()}else{const Ke=N.subTree=Hu(N);B(null,Ke,ee,J,N,K,D),$.el=Ke.el}if(Oe&&un(Oe,K),!fe&&(Q=ie&&ie.onVnodeMounted)){const Ke=$;un(()=>ui(Q,ae,Ke),K)}($.shapeFlag&256||ae&&Tf(ae.vnode)&&ae.vnode.shapeFlag&256)&&N.a&&un(N.a,K),N.isMounted=!0,$=ee=J=null}},te=N.effect=new h1(L,()=>x1(Z),N.scope),Z=N.update=()=>te.run();Z.id=N.uid,Za(N,!0),Z()},x=(N,$,ee)=>{$.component=N;const J=N.vnode.props;N.vnode=$,N.next=null,M9(N,$.props,J,ee),S9(N,$.children,ee),$s(),um(),qs()},w=(N,$,ee,J,K,D,k,L,te=!1)=>{const Z=N&&N.children,Q=N?N.shapeFlag:0,Ie=$.children,{patchFlag:ie,shapeFlag:oe}=$;if(ie>0){if(ie&128){o(Z,Ie,ee,J,K,D,k,L,te);return}else if(ie&256){p(Z,Ie,ee,J,K,D,k,L,te);return}}oe&8?(Q&16&&I(Z,K,D),Ie!==Z&&g(ee,Ie)):Q&16?oe&16?o(Z,Ie,ee,J,K,D,k,L,te):I(Z,K,D,!0):(Q&8&&g(ee,""),oe&16&&Y(Ie,ee,J,K,D,k,L,te))},p=(N,$,ee,J,K,D,k,L,te)=>{N=N||vs,$=$||vs;const Z=N.length,Q=$.length,Ie=Math.min(Z,Q);let ie;for(ie=0;ieQ?I(N,K,D,!0,!1,Ie):Y($,ee,J,K,D,k,L,te,Ie)},o=(N,$,ee,J,K,D,k,L,te)=>{let Z=0;const Q=$.length;let Ie=N.length-1,ie=Q-1;for(;Z<=Ie&&Z<=ie;){const oe=N[Z],Oe=$[Z]=te?_a($[Z]):yi($[Z]);if(ao(oe,Oe))B(oe,Oe,ee,null,K,D,k,L,te);else break;Z++}for(;Z<=Ie&&Z<=ie;){const oe=N[Ie],Oe=$[ie]=te?_a($[ie]):yi($[ie]);if(ao(oe,Oe))B(oe,Oe,ee,null,K,D,k,L,te);else break;Ie--,ie--}if(Z>Ie){if(Z<=ie){const oe=ie+1,Oe=oeie)for(;Z<=Ie;)M(N[Z],K,D,!0),Z++;else{const oe=Z,Oe=Z,ae=new Map;for(Z=Oe;Z<=ie;Z++){const ze=$[Z]=te?_a($[Z]):yi($[Z]);ze.key!=null&&ae.set(ze.key,Z)}let fe,Ke=0;const le=ie-Oe+1;let Me=!1,Ze=0;const pe=new Array(le);for(Z=0;Z=le){M(ze,K,D,!0);continue}let he;if(ze.key!=null)he=ae.get(ze.key);else for(fe=Oe;fe<=ie;fe++)if(pe[fe-Oe]===0&&ao(ze,$[fe])){he=fe;break}he===void 0?M(ze,K,D,!0):(pe[he-Oe]=Z+1,he>=Ze?Ze=he:Me=!0,B(ze,$[he],ee,null,K,D,k,L,te),Ke++)}const Ae=Me?T9(pe):vs;for(fe=Ae.length-1,Z=le-1;Z>=0;Z--){const ze=Oe+Z,he=$[ze],Ee=ze+1{const{el:D,type:k,transition:L,children:te,shapeFlag:Z}=N;if(Z&6){d(N.component.subTree,$,ee,J);return}if(Z&128){N.suspense.move($,ee,J);return}if(Z&64){k.move(N,$,ee,z);return}if(k===tr){n(D,$,ee);for(let Ie=0;IeL.enter(D),K);else{const{leave:Ie,delayLeave:ie,afterLeave:oe}=L,Oe=()=>n(D,$,ee),ae=()=>{Ie(D,()=>{Oe(),oe&&oe()})};ie?ie(D,Oe,ae):ae()}else n(D,$,ee)},M=(N,$,ee,J=!1,K=!1)=>{const{type:D,props:k,ref:L,children:te,dynamicChildren:Z,shapeFlag:Q,patchFlag:Ie,dirs:ie}=N;if(L!=null&&Mp(L,null,ee,N,!0),Q&256){$.ctx.deactivate(N);return}const oe=Q&1&&ie,Oe=!Tf(N);let ae;if(Oe&&(ae=k&&k.onVnodeBeforeUnmount)&&ui(ae,$,N),Q&6)S(N.component,ee,J);else{if(Q&128){N.suspense.unmount(ee,J);return}oe&&Wa(N,null,$,"beforeUnmount"),Q&64?N.type.remove(N,$,ee,K,z,J):Z&&(D!==tr||Ie>0&&Ie&64)?I(Z,$,ee,!1,!0):(D===tr&&Ie&384||!K&&Q&16)&&I(te,$,ee),J&&C(N)}(Oe&&(ae=k&&k.onVnodeUnmounted)||oe)&&un(()=>{ae&&ui(ae,$,N),oe&&Wa(N,null,$,"unmounted")},ee)},C=N=>{const{type:$,el:ee,anchor:J,transition:K}=N;if($===tr){P(ee,J);return}if($===Rc){H(N);return}const D=()=>{s(ee),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(N.shapeFlag&1&&K&&!K.persisted){const{leave:k,delayLeave:L}=K,te=()=>k(ee,D);L?L(N.el,D,te):te()}else D()},P=(N,$)=>{let ee;for(;N!==$;)ee=A(N),s(N),N=ee;s($)},S=(N,$,ee)=>{const{bum:J,scope:K,update:D,subTree:k,um:L}=N;J&&Ec(J),K.stop(),D&&(D.active=!1,M(k,N,$,ee)),L&&un(L,$),un(()=>{N.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},I=(N,$,ee,J=!1,K=!1,D=0)=>{for(let k=D;kN.shapeFlag&6?U(N.component.subTree):N.shapeFlag&128?N.suspense.next():A(N.anchor||N.el),V=(N,$,ee)=>{N==null?$._vnode&&M($._vnode,null,null,!0):B($._vnode||null,N,$,null,null,null,ee),um(),M3(),$._vnode=N},z={p:B,um:M,m:d,r:C,mt:c,mc:Y,pc:w,pbc:se,n:U,o:t};let X,j;return e&&([X,j]=e(z)),{render:V,hydrate:X,createApp:C9(V,X)}}function Za({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function N1(t,e,r=!1){const n=t.children,s=e.children;if(Xe(n)&&Xe(s))for(let i=0;i>1,t[r[v]]0&&(e[n]=r[i-1]),r[i]=n)}}for(i=r.length,u=r[i-1];i-- >0;)r[i]=u,u=e[u];return r}const k9=t=>t.__isTeleport,Pf=t=>t&&(t.disabled||t.disabled===""),wm=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Ap=(t,e)=>{const r=t&&t.to;return mr(r)?e?e(r):null:r},P9={__isTeleport:!0,process(t,e,r,n,s,i,u,v,b,m){const{mc:g,pc:_,pbc:A,o:{insert:E,querySelector:R,createText:B,createComment:T}}=m,F=Pf(e.props);let{shapeFlag:O,children:q,dynamicChildren:H}=e;if(t==null){const G=e.el=B(""),re=e.anchor=B("");E(G,r,n),E(re,r,n);const ne=e.target=Ap(e.props,R),Y=e.targetAnchor=B("");ne&&(E(Y,ne),u=u||wm(ne));const W=(se,y)=>{O&16&&g(q,se,y,s,i,u,v,b)};F?W(r,re):ne&&W(ne,Y)}else{e.el=t.el;const G=e.anchor=t.anchor,re=e.target=t.target,ne=e.targetAnchor=t.targetAnchor,Y=Pf(t.props),W=Y?r:re,se=Y?G:ne;if(u=u||wm(re),H?(A(t.dynamicChildren,H,W,s,i,u,v),N1(t,e,!0)):b||_(t,e,W,se,s,i,u,v,!1),F)Y||W0(e,r,G,m,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const y=e.target=Ap(e.props,R);y&&W0(e,y,null,m,0)}else Y&&W0(e,re,ne,m,1)}z3(e)},remove(t,e,r,n,{um:s,o:{remove:i}},u){const{shapeFlag:v,children:b,anchor:m,targetAnchor:g,target:_,props:A}=t;if(_&&i(g),(u||!Pf(A))&&(i(m),v&16))for(let E=0;E0?ti||vs:null,O9(),Xf>0&&ti&&ti.push(t),t}function We(t,e,r,n,s,i){return j3(ce(t,e,r,n,s,i,!0))}function sn(t,e,r,n,s){return j3(Wt(t,e,r,n,s,!0))}function Yc(t){return t?t.__v_isVNode===!0:!1}function ao(t,e){return t.type===e.type&&t.key===e.key}const Ol="__vInternal",G3=({key:t})=>t??null,Cc=({ref:t,ref_key:e,ref_for:r})=>t!=null?mr(t)||pr(t)||st(t)?{i:Ur,r:t,k:e,f:!!r}:t:null;function ce(t,e=null,r=null,n=0,s=null,i=t===tr?0:1,u=!1,v=!1){const b={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&G3(e),ref:e&&Cc(e),scopeId:kl,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ur};return v?(T1(b,r),i&128&&t.normalize(b)):r&&(b.shapeFlag|=mr(r)?8:16),Xf>0&&!u&&ti&&(b.patchFlag>0||i&6)&&b.patchFlag!==32&&ti.push(b),b}const Wt=F9;function F9(t,e=null,r=null,n=0,s=null,i=!1){if((!t||t===D3)&&(t=Ln),Yc(t)){const v=Ia(t,e,!0);return r&&T1(v,r),Xf>0&&!i&&ti&&(v.shapeFlag&6?ti[ti.indexOf(t)]=v:ti.push(v)),v.patchFlag|=-2,v}if(W9(t)&&(t=t.__vccOpts),e){e=L9(e);let{class:v,style:b}=e;v&&!mr(v)&&(e.class=oi(v)),nr(b)&&(v3(b)&&!Xe(b)&&(b=Tr({},b)),e.style=v0(b))}const u=mr(t)?1:e9(t)?128:k9(t)?64:nr(t)?4:st(t)?2:0;return ce(t,e,r,n,s,u,i,!0)}function L9(t){return t?v3(t)||Ol in t?Tr({},t):t:null}function Ia(t,e,r=!1){const{props:n,ref:s,patchFlag:i,children:u}=t,v=e?Fl(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:v,key:v&&G3(v),ref:e&&e.ref?r&&s?Xe(s)?s.concat(Cc(e)):[s,Cc(e)]:Cc(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:u,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==tr?i===-1?16:i|16:i,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ia(t.ssContent),ssFallback:t.ssFallback&&Ia(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx}}function Un(t=" ",e=0){return Wt(Dl,null,t,e)}function U9(t,e){const r=Wt(Rc,null,t);return r.staticCount=e,r}function zt(t="",e=!1){return e?($e(),sn(Ln,null,t)):Wt(Ln,null,t)}function yi(t){return t==null||typeof t=="boolean"?Wt(Ln):Xe(t)?Wt(tr,null,t.slice()):typeof t=="object"?_a(t):Wt(Dl,null,String(t))}function _a(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ia(t)}function T1(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Xe(e))r=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),T1(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!(Ol in e)?e._ctx=Ur:s===3&&Ur&&(Ur.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else st(e)?(e={default:e,_ctx:Ur},r=32):(e=String(e),n&64?(r=16,e=[Un(e)]):r=8);t.children=e,t.shapeFlag|=r}function Fl(...t){const e={};for(let r=0;rBr||Ur,Cs=t=>{Br=t,t.scope.on()},go=()=>{Br&&Br.scope.off(),Br=null};function V3(t){return t.vnode.shapeFlag&4}let Yf=!1;function H9(t,e=!1){Yf=e;const{props:r,children:n}=t.vnode,s=V3(t);_9(t,r,s,e),E9(t,n);const i=s?z9(t,e):void 0;return Yf=!1,i}function z9(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=Pi(new Proxy(t.ctx,m9));const{setup:n}=r;if(n){const s=t.setupContext=n.length>1?G9(t):null;Cs(t),$s();const i=Ta(n,t,0,[t.props,s]);if(qs(),go(),e3(i)){if(i.then(go,go),e)return i.then(u=>{Mm(t,u,e)}).catch(u=>{Nl(u,t,0)});t.asyncDep=i}else Mm(t,i,e)}else W3(t,e)}function Mm(t,e,r){st(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:nr(e)&&(t.setupState=y3(e)),W3(t,r)}let Am;function W3(t,e,r){const n=t.type;if(!t.render){if(!e&&Am&&!n.render){const s=n.template||C1(t).template;if(s){const{isCustomElement:i,compilerOptions:u}=t.appContext.config,{delimiters:v,compilerOptions:b}=n,m=Tr(Tr({isCustomElement:i,delimiters:v},u),b);n.render=Am(s,m)}}t.render=n.render||ai}Cs(t),$s(),g9(t),qs(),go()}function j9(t){return new Proxy(t.attrs,{get(e,r){return En(t,"get","$attrs"),e[r]}})}function G9(t){const e=n=>{t.exposed=n||{}};let r;return{get attrs(){return r||(r=j9(t))},slots:t.slots,emit:t.emit,expose:e}}function Ul(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(y3(Pi(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in kf)return kf[r](t)},has(e,r){return r in e||r in kf}}))}function V9(t,e=!0){return st(t)?t.displayName||t.name:t.name||e&&t.__name}function W9(t){return st(t)&&"__vccOpts"in t}const nn=(t,e)=>Hw(t,e,Yf);function k1(t,e,r){const n=arguments.length;return n===2?nr(e)&&!Xe(e)?Yc(e)?Wt(t,null,[e]):Wt(t,e):Wt(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Yc(r)&&(r=[r]),Wt(t,e,r))}const Z9=Symbol(""),J9=()=>_n(Z9),X9="3.2.45",Y9="http://www.w3.org/2000/svg",oo=typeof document<"u"?document:null,Em=oo&&oo.createElement("template"),Q9={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e?oo.createElementNS(Y9,t):oo.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>oo.createTextNode(t),createComment:t=>oo.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>oo.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const u=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Em.innerHTML=n?`${t}`:t;const v=Em.content;if(n){const b=v.firstChild;for(;b.firstChild;)v.appendChild(b.firstChild);v.removeChild(b)}e.insertBefore(v,r)}return[u?u.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function e7(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function t7(t,e,r){const n=t.style,s=mr(r);if(r&&!s){for(const i in r)Ep(n,i,r[i]);if(e&&!mr(e))for(const i in e)r[i]==null&&Ep(n,i,"")}else{const i=n.display;s?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=i)}}const Sm=/\s*!important$/;function Ep(t,e,r){if(Xe(r))r.forEach(n=>Ep(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=r7(t,e);Sm.test(r)?t.setProperty(Ks(n),r.replace(Sm,""),"important"):t[n]=r}}const Rm=["Webkit","Moz","ms"],Gu={};function r7(t,e){const r=Gu[e];if(r)return r;let n=ki(e);if(n!=="filter"&&n in t)return Gu[e]=n;n=Cl(n);for(let s=0;sVu||(f7.then(()=>Vu=0),Vu=Date.now());function l7(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Fn(u7(n,r.value),e,5,[n])};return r.value=t,r.attached=c7(),r}function u7(t,e){if(Xe(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const Nm=/^on[a-z]/,d7=(t,e,r,n,s=!1,i,u,v,b)=>{e==="class"?e7(t,n,s):e==="style"?t7(t,r,n):El(e)?f1(e)||o7(t,e,r,n,u):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):h7(t,e,n,s))?i7(t,e,n,i,u,v,b):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),n7(t,e,n,s))};function h7(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&Nm.test(e)&&st(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||Nm.test(e)&&mr(r)?!1:e in t}const ua="transition",af="animation",P1=(t,{slots:e})=>k1(B3,J3(t),e);P1.displayName="Transition";const Z3={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},p7=P1.props=Tr({},B3.props,Z3),Ja=(t,e=[])=>{Xe(t)?t.forEach(r=>r(...e)):t&&t(...e)},Tm=t=>t?Xe(t)?t.some(e=>e.length>1):t.length>1:!1;function J3(t){const e={};for(const a in t)a in Z3||(e[a]=t[a]);if(t.css===!1)return e;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:u=`${r}-enter-active`,enterToClass:v=`${r}-enter-to`,appearFromClass:b=i,appearActiveClass:m=u,appearToClass:g=v,leaveFromClass:_=`${r}-leave-from`,leaveActiveClass:A=`${r}-leave-active`,leaveToClass:E=`${r}-leave-to`}=t,R=v7(s),B=R&&R[0],T=R&&R[1],{onBeforeEnter:F,onEnter:O,onEnterCancelled:q,onLeave:H,onLeaveCancelled:G,onBeforeAppear:re=F,onAppear:ne=O,onAppearCancelled:Y=q}=e,W=(a,f,c)=>{ba(a,f?g:v),ba(a,f?m:u),c&&c()},se=(a,f)=>{a._isLeaving=!1,ba(a,_),ba(a,E),ba(a,A),f&&f()},y=a=>(f,c)=>{const l=a?ne:O,h=()=>W(f,a,c);Ja(l,[f,h]),km(()=>{ba(f,a?b:i),ji(f,a?g:v),Tm(l)||Pm(f,n,B,h)})};return Tr(e,{onBeforeEnter(a){Ja(F,[a]),ji(a,i),ji(a,u)},onBeforeAppear(a){Ja(re,[a]),ji(a,b),ji(a,m)},onEnter:y(!1),onAppear:y(!0),onLeave(a,f){a._isLeaving=!0;const c=()=>se(a,f);ji(a,_),Y3(),ji(a,A),km(()=>{!a._isLeaving||(ba(a,_),ji(a,E),Tm(H)||Pm(a,n,T,c))}),Ja(H,[a,c])},onEnterCancelled(a){W(a,!1),Ja(q,[a])},onAppearCancelled(a){W(a,!0),Ja(Y,[a])},onLeaveCancelled(a){se(a),Ja(G,[a])}})}function v7(t){if(t==null)return null;if(nr(t))return[Wu(t.enter),Wu(t.leave)];{const e=Wu(t);return[e,e]}}function Wu(t){return jf(t)}function ji(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t._vtc||(t._vtc=new Set)).add(e)}function ba(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const{_vtc:r}=t;r&&(r.delete(e),r.size||(t._vtc=void 0))}function km(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let m7=0;function Pm(t,e,r,n){const s=t._endId=++m7,i=()=>{s===t._endId&&n()};if(r)return setTimeout(i,r);const{type:u,timeout:v,propCount:b}=X3(t,e);if(!u)return n();const m=u+"end";let g=0;const _=()=>{t.removeEventListener(m,A),i()},A=E=>{E.target===t&&++g>=b&&_()};setTimeout(()=>{g(r[R]||"").split(", "),s=n(`${ua}Delay`),i=n(`${ua}Duration`),u=Im(s,i),v=n(`${af}Delay`),b=n(`${af}Duration`),m=Im(v,b);let g=null,_=0,A=0;e===ua?u>0&&(g=ua,_=u,A=i.length):e===af?m>0&&(g=af,_=m,A=b.length):(_=Math.max(u,m),g=_>0?u>m?ua:af:null,A=g?g===ua?i.length:b.length:0);const E=g===ua&&/\b(transform|all)(,|$)/.test(n(`${ua}Property`).toString());return{type:g,timeout:_,propCount:A,hasTransform:E}}function Im(t,e){for(;t.lengthDm(r)+Dm(t[n])))}function Dm(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function Y3(){return document.body.offsetHeight}const Q3=new WeakMap,e6=new WeakMap,g7={name:"TransitionGroup",props:Tr({},p7,{tag:String,moveClass:String}),setup(t,{slots:e}){const r=Ll(),n=C3();let s,i;return k3(()=>{if(!s.length)return;const u=t.moveClass||`${t.name||"v"}-move`;if(!_7(s[0].el,r.vnode.el,u))return;s.forEach(y7),s.forEach(x7);const v=s.filter(w7);Y3(),v.forEach(b=>{const m=b.el,g=m.style;ji(m,u),g.transform=g.webkitTransform=g.transitionDuration="";const _=m._moveCb=A=>{A&&A.target!==m||(!A||/transform$/.test(A.propertyName))&&(m.removeEventListener("transitionend",_),m._moveCb=null,ba(m,u))};m.addEventListener("transitionend",_)})}),()=>{const u=Mt(t),v=J3(u);let b=u.tag||tr;s=i,i=e.default?M1(e.default()):[];for(let m=0;m{u.split(/\s+/).forEach(v=>v&&n.classList.remove(v))}),r.split(/\s+/).forEach(u=>u&&n.classList.add(u)),n.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(n);const{hasTransform:i}=X3(n);return s.removeChild(n),i}const Om=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Xe(e)?r=>Ec(e,r):e};function M7(t){t.target.composing=!0}function Fm(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Sf={created(t,{modifiers:{lazy:e,trim:r,number:n}},s){t._assign=Om(s);const i=n||s.props&&s.props.type==="number";es(t,e?"change":"input",u=>{if(u.target.composing)return;let v=t.value;r&&(v=v.trim()),i&&(v=jf(v)),t._assign(v)}),r&&es(t,"change",()=>{t.value=t.value.trim()}),e||(es(t,"compositionstart",M7),es(t,"compositionend",Fm),es(t,"change",Fm))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,modifiers:{lazy:r,trim:n,number:s}},i){if(t._assign=Om(i),t.composing||document.activeElement===t&&t.type!=="range"&&(r||n&&t.value.trim()===e||(s||t.type==="number")&&jf(t.value)===e))return;const u=e??"";t.value!==u&&(t.value=u)}},A7=["ctrl","shift","alt","meta"],E7={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>A7.some(r=>t[`${r}Key`]&&!e.includes(r))},S7=(t,e)=>(r,...n)=>{for(let s=0;s{const e=C7().createApp(...t),{mount:r}=e;return e.mount=n=>{const s=B7(n);if(!s)return;const i=e._component;!st(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.innerHTML="";const u=r(s,!1,s instanceof SVGElement);return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),u},e};function B7(t){return mr(t)?document.querySelector(t):t}var N7=!1;let r6;const Kl=t=>r6=t,n6=Symbol();function Sp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Df;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Df||(Df={}));function T7(){const t=n3(!0),e=t.run(()=>Qr({}));let r=[],n=[];const s=Pi({install(i){Kl(s),s._a=i,i.provide(n6,s),i.config.globalProperties.$pinia=s,n.forEach(u=>r.push(u)),n=[]},use(i){return!this._a&&!N7?n.push(i):r.push(i),this},_p:r,_a:null,_e:t,_s:new Map,state:e});return s}const i6=()=>{};function Um(t,e,r,n=i6){t.push(e);const s=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),n())};return!r&&fw()&&cw(s),s}function qo(t,...e){t.slice().forEach(r=>{r(...e)})}function Rp(t,e){t instanceof Map&&e instanceof Map&&e.forEach((r,n)=>t.set(n,r)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const r in e){if(!e.hasOwnProperty(r))continue;const n=e[r],s=t[r];Sp(s)&&Sp(n)&&t.hasOwnProperty(r)&&!pr(n)&&!Na(n)?t[r]=Rp(s,n):t[r]=n}return t}const k7=Symbol();function P7(t){return!Sp(t)||!t.hasOwnProperty(k7)}const{assign:Ma}=Object;function I7(t){return!!(pr(t)&&t.effect)}function D7(t,e,r,n){const{state:s,actions:i,getters:u}=e,v=r.state.value[t];let b;function m(){v||(r.state.value[t]=s?s():{});const g=Uw(r.state.value[t]);return Ma(g,i,Object.keys(u||{}).reduce((_,A)=>(_[A]=Pi(nn(()=>{Kl(r);const E=r._s.get(t);return u[A].call(E,E)})),_),{}))}return b=a6(t,m,e,r,n,!0),b.$reset=function(){const _=s?s():{};this.$patch(A=>{Ma(A,_)})},b}function a6(t,e,r={},n,s,i){let u;const v=Ma({actions:{}},r),b={deep:!0};let m,g,_=Pi([]),A=Pi([]),E;const R=n.state.value[t];!i&&!R&&(n.state.value[t]={}),Qr({});let B;function T(ne){let Y;m=g=!1,typeof ne=="function"?(ne(n.state.value[t]),Y={type:Df.patchFunction,storeId:t,events:E}):(Rp(n.state.value[t],ne),Y={type:Df.patchObject,payload:ne,storeId:t,events:E});const W=B=Symbol();Rs().then(()=>{B===W&&(m=!0)}),g=!0,qo(_,Y,n.state.value[t])}const F=i6;function O(){u.stop(),_=[],A=[],n._s.delete(t)}function q(ne,Y){return function(){Kl(n);const W=Array.from(arguments),se=[],y=[];function a(l){se.push(l)}function f(l){y.push(l)}qo(A,{args:W,name:ne,store:G,after:a,onError:f});let c;try{c=Y.apply(this&&this.$id===t?this:G,W)}catch(l){throw qo(y,l),l}return c instanceof Promise?c.then(l=>(qo(se,l),l)).catch(l=>(qo(y,l),Promise.reject(l))):(qo(se,c),c)}}const H={_p:n,$id:t,$onAction:Um.bind(null,A),$patch:T,$reset:F,$subscribe(ne,Y={}){const W=Um(_,ne,Y.detached,()=>se()),se=u.run(()=>bs(()=>n.state.value[t],y=>{(Y.flush==="sync"?g:m)&&ne({storeId:t,type:Df.direct,events:E},y)},Ma({},b,Y)));return W},$dispose:O},G=Ua(H);n._s.set(t,G);const re=n._e.run(()=>(u=n3(),u.run(()=>e())));for(const ne in re){const Y=re[ne];if(pr(Y)&&!I7(Y)||Na(Y))i||(R&&P7(Y)&&(pr(Y)?Y.value=R[ne]:Rp(Y,R[ne])),n.state.value[t][ne]=Y);else if(typeof Y=="function"){const W=q(ne,Y);re[ne]=W,v.actions[ne]=Y}}return Ma(G,re),Ma(Mt(G),re),Object.defineProperty(G,"$state",{get:()=>n.state.value[t],set:ne=>{T(Y=>{Ma(Y,ne)})}}),n._p.forEach(ne=>{Ma(G,u.run(()=>ne({store:G,app:n._a,pinia:n,options:v})))}),R&&i&&r.hydrate&&r.hydrate(G.$state,R),m=!0,g=!0,G}function O7(t,e,r){let n,s;const i=typeof e=="function";typeof t=="string"?(n=t,s=i?r:e):(s=t,n=t.id);function u(v,b){const m=Ll();return v=v||m&&_n(n6,null),v&&Kl(v),v=r6,v._s.has(n)||(i?a6(n,e,s,v):D7(n,s,v)),v._s.get(n)}return u.$id=n,u}const F7="modulepreload",L7=function(t){return"/"+t},Km={},o6=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=L7(i),i in Km)return;Km[i]=!0;const u=i.endsWith(".css"),v=u?'[rel="stylesheet"]':"";if(!!n)for(let g=s.length-1;g>=0;g--){const _=s[g];if(_.href===i&&(!u||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${v}`))return;const m=document.createElement("link");if(m.rel=u?"stylesheet":F7,u||(m.as="script",m.crossOrigin=""),m.href=i,document.head.appendChild(m),u)return new Promise((g,_)=>{m.addEventListener("load",g),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())};var m0={exports:{}};(function(t){(function(e,r){function n(f,c){if(!f)throw new Error(c||"Assertion failed")}function s(f,c){f.super_=c;var l=function(){};l.prototype=c.prototype,f.prototype=new l,f.prototype.constructor=f}function i(f,c,l){if(i.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((c==="le"||c==="be")&&(l=c,c=10),this._init(f||0,c||10,l||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(c){return c instanceof i?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===i.wordSize&&Array.isArray(c.words)},i.max=function(c,l){return c.cmp(l)>0?c:l},i.min=function(c,l){return c.cmp(l)<0?c:l},i.prototype._init=function(c,l,h){if(typeof c=="number")return this._initNumber(c,l,h);if(typeof c=="object")return this._initArray(c,l,h);l==="hex"&&(l=16),n(l===(l|0)&&l>=2&&l<=36),c=c.toString().replace(/\s+/g,"");var x=0;c[0]==="-"&&(x++,this.negative=1),x=0;x-=3)p=c[x]|c[x-1]<<8|c[x-2]<<16,this.words[w]|=p<>>26-o&67108863,o+=24,o>=26&&(o-=26,w++);else if(h==="le")for(x=0,w=0;x>>26-o&67108863,o+=24,o>=26&&(o-=26,w++);return this._strip()};function v(f,c){var l=f.charCodeAt(c);if(l>=48&&l<=57)return l-48;if(l>=65&&l<=70)return l-55;if(l>=97&&l<=102)return l-87;n(!1,"Invalid character in "+f)}function b(f,c,l){var h=v(f,l);return l-1>=c&&(h|=v(f,l-1)<<4),h}i.prototype._parseHex=function(c,l,h){this.length=Math.ceil((c.length-l)/6),this.words=new Array(this.length);for(var x=0;x=l;x-=2)o=b(c,l,x)<=18?(w-=18,p+=1,this.words[p]|=o>>>26):w+=8;else{var d=c.length-l;for(x=d%2===0?l+1:l;x=18?(w-=18,p+=1,this.words[p]|=o>>>26):w+=8}this._strip()};function m(f,c,l,h){for(var x=0,w=0,p=Math.min(f.length,l),o=c;o=49?w=d-49+10:d>=17?w=d-17+10:w=d,n(d>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch{i.prototype.inspect=_}else i.prototype.inspect=_;function _(){return(this.red?""}var A=["","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"],E=[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],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(c,l){c=c||10,l=l|0||1;var h;if(c===16||c==="hex"){h="";for(var x=0,w=0,p=0;p>>24-x&16777215,x+=2,x>=26&&(x-=26,p--),w!==0||p!==this.length-1?h=A[6-d.length]+d+h:h=d+h}for(w!==0&&(h=w.toString(16)+h);h.length%l!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}if(c===(c|0)&&c>=2&&c<=36){var M=E[c],C=R[c];h="";var P=this.clone();for(P.negative=0;!P.isZero();){var S=P.modrn(C).toString(c);P=P.idivn(C),P.isZero()?h=S+h:h=A[M-S.length]+S+h}for(this.isZero()&&(h="0"+h);h.length%l!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},i.prototype.toJSON=function(){return this.toString(16,2)},u&&(i.prototype.toBuffer=function(c,l){return this.toArrayLike(u,c,l)}),i.prototype.toArray=function(c,l){return this.toArrayLike(Array,c,l)};var B=function(c,l){return c.allocUnsafe?c.allocUnsafe(l):new c(l)};i.prototype.toArrayLike=function(c,l,h){this._strip();var x=this.byteLength(),w=h||Math.max(1,x);n(x<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var p=B(c,w),o=l==="le"?"LE":"BE";return this["_toArrayLike"+o](p,x),p},i.prototype._toArrayLikeLE=function(c,l){for(var h=0,x=0,w=0,p=0;w>8&255),h>16&255),p===6?(h>24&255),x=0,p=0):(x=o>>>24,p+=2)}if(h=0&&(c[h--]=o>>8&255),h>=0&&(c[h--]=o>>16&255),p===6?(h>=0&&(c[h--]=o>>24&255),x=0,p=0):(x=o>>>24,p+=2)}if(h>=0)for(c[h--]=x;h>=0;)c[h--]=0},Math.clz32?i.prototype._countBits=function(c){return 32-Math.clz32(c)}:i.prototype._countBits=function(c){var l=c,h=0;return l>=4096&&(h+=13,l>>>=13),l>=64&&(h+=7,l>>>=7),l>=8&&(h+=4,l>>>=4),l>=2&&(h+=2,l>>>=2),h+l},i.prototype._zeroBits=function(c){if(c===0)return 26;var l=c,h=0;return(l&8191)===0&&(h+=13,l>>>=13),(l&127)===0&&(h+=7,l>>>=7),(l&15)===0&&(h+=4,l>>>=4),(l&3)===0&&(h+=2,l>>>=2),(l&1)===0&&h++,h},i.prototype.bitLength=function(){var c=this.words[this.length-1],l=this._countBits(c);return(this.length-1)*26+l};function T(f){for(var c=new Array(f.bitLength()),l=0;l>>x&1}return c}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,l=0;lc.length?this.clone().ior(c):c.clone().ior(this)},i.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},i.prototype.iuand=function(c){var l;this.length>c.length?l=c:l=this;for(var h=0;hc.length?this.clone().iand(c):c.clone().iand(this)},i.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},i.prototype.iuxor=function(c){var l,h;this.length>c.length?(l=this,h=c):(l=c,h=this);for(var x=0;xc.length?this.clone().ixor(c):c.clone().ixor(this)},i.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},i.prototype.inotn=function(c){n(typeof c=="number"&&c>=0);var l=Math.ceil(c/26)|0,h=c%26;this._expand(l),h>0&&l--;for(var x=0;x0&&(this.words[x]=~this.words[x]&67108863>>26-h),this._strip()},i.prototype.notn=function(c){return this.clone().inotn(c)},i.prototype.setn=function(c,l){n(typeof c=="number"&&c>=0);var h=c/26|0,x=c%26;return this._expand(h+1),l?this.words[h]=this.words[h]|1<c.length?(h=this,x=c):(h=c,x=this);for(var w=0,p=0;p>>26;for(;w!==0&&p>>26;if(this.length=h.length,w!==0)this.words[this.length]=w,this.length++;else if(h!==this)for(;pc.length?this.clone().iadd(c):c.clone().iadd(this)},i.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var l=this.iadd(c);return c.negative=1,l._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var h=this.cmp(c);if(h===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,w;h>0?(x=this,w=c):(x=c,w=this);for(var p=0,o=0;o>26,this.words[o]=l&67108863;for(;p!==0&&o>26,this.words[o]=l&67108863;if(p===0&&o>>26,P=d&67108863,S=Math.min(M,c.length-1),I=Math.max(0,M-f.length+1);I<=S;I++){var U=M-I|0;x=f.words[U]|0,w=c.words[I]|0,p=x*w+P,C+=p/67108864|0,P=p&67108863}l.words[M]=P|0,d=C|0}return d!==0?l.words[M]=d|0:l.length--,l._strip()}var O=function(c,l,h){var x=c.words,w=l.words,p=h.words,o=0,d,M,C,P=x[0]|0,S=P&8191,I=P>>>13,U=x[1]|0,V=U&8191,z=U>>>13,X=x[2]|0,j=X&8191,N=X>>>13,$=x[3]|0,ee=$&8191,J=$>>>13,K=x[4]|0,D=K&8191,k=K>>>13,L=x[5]|0,te=L&8191,Z=L>>>13,Q=x[6]|0,Ie=Q&8191,ie=Q>>>13,oe=x[7]|0,Oe=oe&8191,ae=oe>>>13,fe=x[8]|0,Ke=fe&8191,le=fe>>>13,Me=x[9]|0,Ze=Me&8191,pe=Me>>>13,Ae=w[0]|0,ze=Ae&8191,he=Ae>>>13,Ee=w[1]|0,Ye=Ee&8191,ve=Ee>>>13,Se=w[2]|0,Qe=Se&8191,me=Se>>>13,Re=w[3]|0,et=Re&8191,ge=Re>>>13,Ce=w[4]|0,tt=Ce&8191,be=Ce>>>13,Be=w[5]|0,rt=Be&8191,ye=Be>>>13,Ne=w[6]|0,nt=Ne&8191,xe=Ne>>>13,Te=w[7]|0,it=Te&8191,we=Te>>>13,ke=w[8]|0,at=ke&8191,_e=ke>>>13,Pe=w[9]|0,Ge=Pe&8191,Ve=Pe>>>13;h.negative=c.negative^l.negative,h.length=19,d=Math.imul(S,ze),M=Math.imul(S,he),M=M+Math.imul(I,ze)|0,C=Math.imul(I,he);var pt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(pt>>>26)|0,pt&=67108863,d=Math.imul(V,ze),M=Math.imul(V,he),M=M+Math.imul(z,ze)|0,C=Math.imul(z,he),d=d+Math.imul(S,Ye)|0,M=M+Math.imul(S,ve)|0,M=M+Math.imul(I,Ye)|0,C=C+Math.imul(I,ve)|0;var vt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(vt>>>26)|0,vt&=67108863,d=Math.imul(j,ze),M=Math.imul(j,he),M=M+Math.imul(N,ze)|0,C=Math.imul(N,he),d=d+Math.imul(V,Ye)|0,M=M+Math.imul(V,ve)|0,M=M+Math.imul(z,Ye)|0,C=C+Math.imul(z,ve)|0,d=d+Math.imul(S,Qe)|0,M=M+Math.imul(S,me)|0,M=M+Math.imul(I,Qe)|0,C=C+Math.imul(I,me)|0;var mt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(mt>>>26)|0,mt&=67108863,d=Math.imul(ee,ze),M=Math.imul(ee,he),M=M+Math.imul(J,ze)|0,C=Math.imul(J,he),d=d+Math.imul(j,Ye)|0,M=M+Math.imul(j,ve)|0,M=M+Math.imul(N,Ye)|0,C=C+Math.imul(N,ve)|0,d=d+Math.imul(V,Qe)|0,M=M+Math.imul(V,me)|0,M=M+Math.imul(z,Qe)|0,C=C+Math.imul(z,me)|0,d=d+Math.imul(S,et)|0,M=M+Math.imul(S,ge)|0,M=M+Math.imul(I,et)|0,C=C+Math.imul(I,ge)|0;var gt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(gt>>>26)|0,gt&=67108863,d=Math.imul(D,ze),M=Math.imul(D,he),M=M+Math.imul(k,ze)|0,C=Math.imul(k,he),d=d+Math.imul(ee,Ye)|0,M=M+Math.imul(ee,ve)|0,M=M+Math.imul(J,Ye)|0,C=C+Math.imul(J,ve)|0,d=d+Math.imul(j,Qe)|0,M=M+Math.imul(j,me)|0,M=M+Math.imul(N,Qe)|0,C=C+Math.imul(N,me)|0,d=d+Math.imul(V,et)|0,M=M+Math.imul(V,ge)|0,M=M+Math.imul(z,et)|0,C=C+Math.imul(z,ge)|0,d=d+Math.imul(S,tt)|0,M=M+Math.imul(S,be)|0,M=M+Math.imul(I,tt)|0,C=C+Math.imul(I,be)|0;var bt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(bt>>>26)|0,bt&=67108863,d=Math.imul(te,ze),M=Math.imul(te,he),M=M+Math.imul(Z,ze)|0,C=Math.imul(Z,he),d=d+Math.imul(D,Ye)|0,M=M+Math.imul(D,ve)|0,M=M+Math.imul(k,Ye)|0,C=C+Math.imul(k,ve)|0,d=d+Math.imul(ee,Qe)|0,M=M+Math.imul(ee,me)|0,M=M+Math.imul(J,Qe)|0,C=C+Math.imul(J,me)|0,d=d+Math.imul(j,et)|0,M=M+Math.imul(j,ge)|0,M=M+Math.imul(N,et)|0,C=C+Math.imul(N,ge)|0,d=d+Math.imul(V,tt)|0,M=M+Math.imul(V,be)|0,M=M+Math.imul(z,tt)|0,C=C+Math.imul(z,be)|0,d=d+Math.imul(S,rt)|0,M=M+Math.imul(S,ye)|0,M=M+Math.imul(I,rt)|0,C=C+Math.imul(I,ye)|0;var Rt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,d=Math.imul(Ie,ze),M=Math.imul(Ie,he),M=M+Math.imul(ie,ze)|0,C=Math.imul(ie,he),d=d+Math.imul(te,Ye)|0,M=M+Math.imul(te,ve)|0,M=M+Math.imul(Z,Ye)|0,C=C+Math.imul(Z,ve)|0,d=d+Math.imul(D,Qe)|0,M=M+Math.imul(D,me)|0,M=M+Math.imul(k,Qe)|0,C=C+Math.imul(k,me)|0,d=d+Math.imul(ee,et)|0,M=M+Math.imul(ee,ge)|0,M=M+Math.imul(J,et)|0,C=C+Math.imul(J,ge)|0,d=d+Math.imul(j,tt)|0,M=M+Math.imul(j,be)|0,M=M+Math.imul(N,tt)|0,C=C+Math.imul(N,be)|0,d=d+Math.imul(V,rt)|0,M=M+Math.imul(V,ye)|0,M=M+Math.imul(z,rt)|0,C=C+Math.imul(z,ye)|0,d=d+Math.imul(S,nt)|0,M=M+Math.imul(S,xe)|0,M=M+Math.imul(I,nt)|0,C=C+Math.imul(I,xe)|0;var Ct=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,d=Math.imul(Oe,ze),M=Math.imul(Oe,he),M=M+Math.imul(ae,ze)|0,C=Math.imul(ae,he),d=d+Math.imul(Ie,Ye)|0,M=M+Math.imul(Ie,ve)|0,M=M+Math.imul(ie,Ye)|0,C=C+Math.imul(ie,ve)|0,d=d+Math.imul(te,Qe)|0,M=M+Math.imul(te,me)|0,M=M+Math.imul(Z,Qe)|0,C=C+Math.imul(Z,me)|0,d=d+Math.imul(D,et)|0,M=M+Math.imul(D,ge)|0,M=M+Math.imul(k,et)|0,C=C+Math.imul(k,ge)|0,d=d+Math.imul(ee,tt)|0,M=M+Math.imul(ee,be)|0,M=M+Math.imul(J,tt)|0,C=C+Math.imul(J,be)|0,d=d+Math.imul(j,rt)|0,M=M+Math.imul(j,ye)|0,M=M+Math.imul(N,rt)|0,C=C+Math.imul(N,ye)|0,d=d+Math.imul(V,nt)|0,M=M+Math.imul(V,xe)|0,M=M+Math.imul(z,nt)|0,C=C+Math.imul(z,xe)|0,d=d+Math.imul(S,it)|0,M=M+Math.imul(S,we)|0,M=M+Math.imul(I,it)|0,C=C+Math.imul(I,we)|0;var Bt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,d=Math.imul(Ke,ze),M=Math.imul(Ke,he),M=M+Math.imul(le,ze)|0,C=Math.imul(le,he),d=d+Math.imul(Oe,Ye)|0,M=M+Math.imul(Oe,ve)|0,M=M+Math.imul(ae,Ye)|0,C=C+Math.imul(ae,ve)|0,d=d+Math.imul(Ie,Qe)|0,M=M+Math.imul(Ie,me)|0,M=M+Math.imul(ie,Qe)|0,C=C+Math.imul(ie,me)|0,d=d+Math.imul(te,et)|0,M=M+Math.imul(te,ge)|0,M=M+Math.imul(Z,et)|0,C=C+Math.imul(Z,ge)|0,d=d+Math.imul(D,tt)|0,M=M+Math.imul(D,be)|0,M=M+Math.imul(k,tt)|0,C=C+Math.imul(k,be)|0,d=d+Math.imul(ee,rt)|0,M=M+Math.imul(ee,ye)|0,M=M+Math.imul(J,rt)|0,C=C+Math.imul(J,ye)|0,d=d+Math.imul(j,nt)|0,M=M+Math.imul(j,xe)|0,M=M+Math.imul(N,nt)|0,C=C+Math.imul(N,xe)|0,d=d+Math.imul(V,it)|0,M=M+Math.imul(V,we)|0,M=M+Math.imul(z,it)|0,C=C+Math.imul(z,we)|0,d=d+Math.imul(S,at)|0,M=M+Math.imul(S,_e)|0,M=M+Math.imul(I,at)|0,C=C+Math.imul(I,_e)|0;var Nt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,d=Math.imul(Ze,ze),M=Math.imul(Ze,he),M=M+Math.imul(pe,ze)|0,C=Math.imul(pe,he),d=d+Math.imul(Ke,Ye)|0,M=M+Math.imul(Ke,ve)|0,M=M+Math.imul(le,Ye)|0,C=C+Math.imul(le,ve)|0,d=d+Math.imul(Oe,Qe)|0,M=M+Math.imul(Oe,me)|0,M=M+Math.imul(ae,Qe)|0,C=C+Math.imul(ae,me)|0,d=d+Math.imul(Ie,et)|0,M=M+Math.imul(Ie,ge)|0,M=M+Math.imul(ie,et)|0,C=C+Math.imul(ie,ge)|0,d=d+Math.imul(te,tt)|0,M=M+Math.imul(te,be)|0,M=M+Math.imul(Z,tt)|0,C=C+Math.imul(Z,be)|0,d=d+Math.imul(D,rt)|0,M=M+Math.imul(D,ye)|0,M=M+Math.imul(k,rt)|0,C=C+Math.imul(k,ye)|0,d=d+Math.imul(ee,nt)|0,M=M+Math.imul(ee,xe)|0,M=M+Math.imul(J,nt)|0,C=C+Math.imul(J,xe)|0,d=d+Math.imul(j,it)|0,M=M+Math.imul(j,we)|0,M=M+Math.imul(N,it)|0,C=C+Math.imul(N,we)|0,d=d+Math.imul(V,at)|0,M=M+Math.imul(V,_e)|0,M=M+Math.imul(z,at)|0,C=C+Math.imul(z,_e)|0,d=d+Math.imul(S,Ge)|0,M=M+Math.imul(S,Ve)|0,M=M+Math.imul(I,Ge)|0,C=C+Math.imul(I,Ve)|0;var Tt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,d=Math.imul(Ze,Ye),M=Math.imul(Ze,ve),M=M+Math.imul(pe,Ye)|0,C=Math.imul(pe,ve),d=d+Math.imul(Ke,Qe)|0,M=M+Math.imul(Ke,me)|0,M=M+Math.imul(le,Qe)|0,C=C+Math.imul(le,me)|0,d=d+Math.imul(Oe,et)|0,M=M+Math.imul(Oe,ge)|0,M=M+Math.imul(ae,et)|0,C=C+Math.imul(ae,ge)|0,d=d+Math.imul(Ie,tt)|0,M=M+Math.imul(Ie,be)|0,M=M+Math.imul(ie,tt)|0,C=C+Math.imul(ie,be)|0,d=d+Math.imul(te,rt)|0,M=M+Math.imul(te,ye)|0,M=M+Math.imul(Z,rt)|0,C=C+Math.imul(Z,ye)|0,d=d+Math.imul(D,nt)|0,M=M+Math.imul(D,xe)|0,M=M+Math.imul(k,nt)|0,C=C+Math.imul(k,xe)|0,d=d+Math.imul(ee,it)|0,M=M+Math.imul(ee,we)|0,M=M+Math.imul(J,it)|0,C=C+Math.imul(J,we)|0,d=d+Math.imul(j,at)|0,M=M+Math.imul(j,_e)|0,M=M+Math.imul(N,at)|0,C=C+Math.imul(N,_e)|0,d=d+Math.imul(V,Ge)|0,M=M+Math.imul(V,Ve)|0,M=M+Math.imul(z,Ge)|0,C=C+Math.imul(z,Ve)|0;var kt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(kt>>>26)|0,kt&=67108863,d=Math.imul(Ze,Qe),M=Math.imul(Ze,me),M=M+Math.imul(pe,Qe)|0,C=Math.imul(pe,me),d=d+Math.imul(Ke,et)|0,M=M+Math.imul(Ke,ge)|0,M=M+Math.imul(le,et)|0,C=C+Math.imul(le,ge)|0,d=d+Math.imul(Oe,tt)|0,M=M+Math.imul(Oe,be)|0,M=M+Math.imul(ae,tt)|0,C=C+Math.imul(ae,be)|0,d=d+Math.imul(Ie,rt)|0,M=M+Math.imul(Ie,ye)|0,M=M+Math.imul(ie,rt)|0,C=C+Math.imul(ie,ye)|0,d=d+Math.imul(te,nt)|0,M=M+Math.imul(te,xe)|0,M=M+Math.imul(Z,nt)|0,C=C+Math.imul(Z,xe)|0,d=d+Math.imul(D,it)|0,M=M+Math.imul(D,we)|0,M=M+Math.imul(k,it)|0,C=C+Math.imul(k,we)|0,d=d+Math.imul(ee,at)|0,M=M+Math.imul(ee,_e)|0,M=M+Math.imul(J,at)|0,C=C+Math.imul(J,_e)|0,d=d+Math.imul(j,Ge)|0,M=M+Math.imul(j,Ve)|0,M=M+Math.imul(N,Ge)|0,C=C+Math.imul(N,Ve)|0;var Pt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,d=Math.imul(Ze,et),M=Math.imul(Ze,ge),M=M+Math.imul(pe,et)|0,C=Math.imul(pe,ge),d=d+Math.imul(Ke,tt)|0,M=M+Math.imul(Ke,be)|0,M=M+Math.imul(le,tt)|0,C=C+Math.imul(le,be)|0,d=d+Math.imul(Oe,rt)|0,M=M+Math.imul(Oe,ye)|0,M=M+Math.imul(ae,rt)|0,C=C+Math.imul(ae,ye)|0,d=d+Math.imul(Ie,nt)|0,M=M+Math.imul(Ie,xe)|0,M=M+Math.imul(ie,nt)|0,C=C+Math.imul(ie,xe)|0,d=d+Math.imul(te,it)|0,M=M+Math.imul(te,we)|0,M=M+Math.imul(Z,it)|0,C=C+Math.imul(Z,we)|0,d=d+Math.imul(D,at)|0,M=M+Math.imul(D,_e)|0,M=M+Math.imul(k,at)|0,C=C+Math.imul(k,_e)|0,d=d+Math.imul(ee,Ge)|0,M=M+Math.imul(ee,Ve)|0,M=M+Math.imul(J,Ge)|0,C=C+Math.imul(J,Ve)|0;var It=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(It>>>26)|0,It&=67108863,d=Math.imul(Ze,tt),M=Math.imul(Ze,be),M=M+Math.imul(pe,tt)|0,C=Math.imul(pe,be),d=d+Math.imul(Ke,rt)|0,M=M+Math.imul(Ke,ye)|0,M=M+Math.imul(le,rt)|0,C=C+Math.imul(le,ye)|0,d=d+Math.imul(Oe,nt)|0,M=M+Math.imul(Oe,xe)|0,M=M+Math.imul(ae,nt)|0,C=C+Math.imul(ae,xe)|0,d=d+Math.imul(Ie,it)|0,M=M+Math.imul(Ie,we)|0,M=M+Math.imul(ie,it)|0,C=C+Math.imul(ie,we)|0,d=d+Math.imul(te,at)|0,M=M+Math.imul(te,_e)|0,M=M+Math.imul(Z,at)|0,C=C+Math.imul(Z,_e)|0,d=d+Math.imul(D,Ge)|0,M=M+Math.imul(D,Ve)|0,M=M+Math.imul(k,Ge)|0,C=C+Math.imul(k,Ve)|0;var Dt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,d=Math.imul(Ze,rt),M=Math.imul(Ze,ye),M=M+Math.imul(pe,rt)|0,C=Math.imul(pe,ye),d=d+Math.imul(Ke,nt)|0,M=M+Math.imul(Ke,xe)|0,M=M+Math.imul(le,nt)|0,C=C+Math.imul(le,xe)|0,d=d+Math.imul(Oe,it)|0,M=M+Math.imul(Oe,we)|0,M=M+Math.imul(ae,it)|0,C=C+Math.imul(ae,we)|0,d=d+Math.imul(Ie,at)|0,M=M+Math.imul(Ie,_e)|0,M=M+Math.imul(ie,at)|0,C=C+Math.imul(ie,_e)|0,d=d+Math.imul(te,Ge)|0,M=M+Math.imul(te,Ve)|0,M=M+Math.imul(Z,Ge)|0,C=C+Math.imul(Z,Ve)|0;var Ot=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,d=Math.imul(Ze,nt),M=Math.imul(Ze,xe),M=M+Math.imul(pe,nt)|0,C=Math.imul(pe,xe),d=d+Math.imul(Ke,it)|0,M=M+Math.imul(Ke,we)|0,M=M+Math.imul(le,it)|0,C=C+Math.imul(le,we)|0,d=d+Math.imul(Oe,at)|0,M=M+Math.imul(Oe,_e)|0,M=M+Math.imul(ae,at)|0,C=C+Math.imul(ae,_e)|0,d=d+Math.imul(Ie,Ge)|0,M=M+Math.imul(Ie,Ve)|0,M=M+Math.imul(ie,Ge)|0,C=C+Math.imul(ie,Ve)|0;var Ft=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,d=Math.imul(Ze,it),M=Math.imul(Ze,we),M=M+Math.imul(pe,it)|0,C=Math.imul(pe,we),d=d+Math.imul(Ke,at)|0,M=M+Math.imul(Ke,_e)|0,M=M+Math.imul(le,at)|0,C=C+Math.imul(le,_e)|0,d=d+Math.imul(Oe,Ge)|0,M=M+Math.imul(Oe,Ve)|0,M=M+Math.imul(ae,Ge)|0,C=C+Math.imul(ae,Ve)|0;var Lt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,d=Math.imul(Ze,at),M=Math.imul(Ze,_e),M=M+Math.imul(pe,at)|0,C=Math.imul(pe,_e),d=d+Math.imul(Ke,Ge)|0,M=M+Math.imul(Ke,Ve)|0,M=M+Math.imul(le,Ge)|0,C=C+Math.imul(le,Ve)|0;var Ku=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,d=Math.imul(Ze,Ge),M=Math.imul(Ze,Ve),M=M+Math.imul(pe,Ge)|0,C=Math.imul(pe,Ve);var $u=(o+d|0)+((M&8191)<<13)|0;return o=(C+(M>>>13)|0)+($u>>>26)|0,$u&=67108863,p[0]=pt,p[1]=vt,p[2]=mt,p[3]=gt,p[4]=bt,p[5]=Rt,p[6]=Ct,p[7]=Bt,p[8]=Nt,p[9]=Tt,p[10]=kt,p[11]=Pt,p[12]=It,p[13]=Dt,p[14]=Ot,p[15]=Ft,p[16]=Lt,p[17]=Ku,p[18]=$u,o!==0&&(p[19]=o,h.length++),h};Math.imul||(O=F);function q(f,c,l){l.negative=c.negative^f.negative,l.length=f.length+c.length;for(var h=0,x=0,w=0;w>>26)|0,x+=p>>>26,p&=67108863}l.words[w]=o,h=p,p=x}return h!==0?l.words[w]=h:l.length--,l._strip()}function H(f,c,l){return q(f,c,l)}i.prototype.mulTo=function(c,l){var h,x=this.length+c.length;return this.length===10&&c.length===10?h=O(this,c,l):x<63?h=F(this,c,l):x<1024?h=q(this,c,l):h=H(this,c,l),h},i.prototype.mul=function(c){var l=new i(null);return l.words=new Array(this.length+c.length),this.mulTo(c,l)},i.prototype.mulf=function(c){var l=new i(null);return l.words=new Array(this.length+c.length),H(this,c,l)},i.prototype.imul=function(c){return this.clone().mulTo(c,this)},i.prototype.imuln=function(c){var l=c<0;l&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var h=0,x=0;x>=26,h+=w/67108864|0,h+=p>>>26,this.words[x]=p&67108863}return h!==0&&(this.words[x]=h,this.length++),l?this.ineg():this},i.prototype.muln=function(c){return this.clone().imuln(c)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(c){var l=T(c);if(l.length===0)return new i(1);for(var h=this,x=0;x=0);var l=c%26,h=(c-l)/26,x=67108863>>>26-l<<26-l,w;if(l!==0){var p=0;for(w=0;w>>26-l}p&&(this.words[w]=p,this.length++)}if(h!==0){for(w=this.length-1;w>=0;w--)this.words[w+h]=this.words[w];for(w=0;w=0);var x;l?x=(l-l%26)/26:x=0;var w=c%26,p=Math.min((c-w)/26,this.length),o=67108863^67108863>>>w<p)for(this.length-=p,M=0;M=0&&(C!==0||M>=x);M--){var P=this.words[M]|0;this.words[M]=C<<26-w|P>>>w,C=P&o}return d&&C!==0&&(d.words[d.length++]=C),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(c,l,h){return n(this.negative===0),this.iushrn(c,l,h)},i.prototype.shln=function(c){return this.clone().ishln(c)},i.prototype.ushln=function(c){return this.clone().iushln(c)},i.prototype.shrn=function(c){return this.clone().ishrn(c)},i.prototype.ushrn=function(c){return this.clone().iushrn(c)},i.prototype.testn=function(c){n(typeof c=="number"&&c>=0);var l=c%26,h=(c-l)/26,x=1<=0);var l=c%26,h=(c-l)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=h)return this;if(l!==0&&h++,this.length=Math.min(h,this.length),l!==0){var x=67108863^67108863>>>l<=67108864;l++)this.words[l]-=67108864,l===this.length-1?this.words[l+1]=1:this.words[l+1]++;return this.length=Math.max(this.length,l+1),this},i.prototype.isubn=function(c){if(n(typeof c=="number"),n(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var l=0;l>26)-(d/67108864|0),this.words[w+h]=p&67108863}for(;w>26,this.words[w+h]=p&67108863;if(o===0)return this._strip();for(n(o===-1),o=0,w=0;w>26,this.words[w]=p&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(c,l){var h=this.length-c.length,x=this.clone(),w=c,p=w.words[w.length-1]|0,o=this._countBits(p);h=26-o,h!==0&&(w=w.ushln(h),x.iushln(h),p=w.words[w.length-1]|0);var d=x.length-w.length,M;if(l!=="mod"){M=new i(null),M.length=d+1,M.words=new Array(M.length);for(var C=0;C=0;S--){var I=(x.words[w.length+S]|0)*67108864+(x.words[w.length+S-1]|0);for(I=Math.min(I/p|0,67108863),x._ishlnsubmul(w,I,S);x.negative!==0;)I--,x.negative=0,x._ishlnsubmul(w,1,S),x.isZero()||(x.negative^=1);M&&(M.words[S]=I)}return M&&M._strip(),x._strip(),l!=="div"&&h!==0&&x.iushrn(h),{div:M||null,mod:x}},i.prototype.divmod=function(c,l,h){if(n(!c.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var x,w,p;return this.negative!==0&&c.negative===0?(p=this.neg().divmod(c,l),l!=="mod"&&(x=p.div.neg()),l!=="div"&&(w=p.mod.neg(),h&&w.negative!==0&&w.iadd(c)),{div:x,mod:w}):this.negative===0&&c.negative!==0?(p=this.divmod(c.neg(),l),l!=="mod"&&(x=p.div.neg()),{div:x,mod:p.mod}):(this.negative&c.negative)!==0?(p=this.neg().divmod(c.neg(),l),l!=="div"&&(w=p.mod.neg(),h&&w.negative!==0&&w.isub(c)),{div:p.div,mod:w}):c.length>this.length||this.cmp(c)<0?{div:new i(0),mod:this}:c.length===1?l==="div"?{div:this.divn(c.words[0]),mod:null}:l==="mod"?{div:null,mod:new i(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new i(this.modrn(c.words[0]))}:this._wordDiv(c,l)},i.prototype.div=function(c){return this.divmod(c,"div",!1).div},i.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},i.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},i.prototype.divRound=function(c){var l=this.divmod(c);if(l.mod.isZero())return l.div;var h=l.div.negative!==0?l.mod.isub(c):l.mod,x=c.ushrn(1),w=c.andln(1),p=h.cmp(x);return p<0||w===1&&p===0?l.div:l.div.negative!==0?l.div.isubn(1):l.div.iaddn(1)},i.prototype.modrn=function(c){var l=c<0;l&&(c=-c),n(c<=67108863);for(var h=(1<<26)%c,x=0,w=this.length-1;w>=0;w--)x=(h*x+(this.words[w]|0))%c;return l?-x:x},i.prototype.modn=function(c){return this.modrn(c)},i.prototype.idivn=function(c){var l=c<0;l&&(c=-c),n(c<=67108863);for(var h=0,x=this.length-1;x>=0;x--){var w=(this.words[x]|0)+h*67108864;this.words[x]=w/c|0,h=w%c}return this._strip(),l?this.ineg():this},i.prototype.divn=function(c){return this.clone().idivn(c)},i.prototype.egcd=function(c){n(c.negative===0),n(!c.isZero());var l=this,h=c.clone();l.negative!==0?l=l.umod(c):l=l.clone();for(var x=new i(1),w=new i(0),p=new i(0),o=new i(1),d=0;l.isEven()&&h.isEven();)l.iushrn(1),h.iushrn(1),++d;for(var M=h.clone(),C=l.clone();!l.isZero();){for(var P=0,S=1;(l.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(l.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(M),w.isub(C)),x.iushrn(1),w.iushrn(1);for(var I=0,U=1;(h.words[0]&U)===0&&I<26;++I,U<<=1);if(I>0)for(h.iushrn(I);I-- >0;)(p.isOdd()||o.isOdd())&&(p.iadd(M),o.isub(C)),p.iushrn(1),o.iushrn(1);l.cmp(h)>=0?(l.isub(h),x.isub(p),w.isub(o)):(h.isub(l),p.isub(x),o.isub(w))}return{a:p,b:o,gcd:h.iushln(d)}},i.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var l=this,h=c.clone();l.negative!==0?l=l.umod(c):l=l.clone();for(var x=new i(1),w=new i(0),p=h.clone();l.cmpn(1)>0&&h.cmpn(1)>0;){for(var o=0,d=1;(l.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(l.iushrn(o);o-- >0;)x.isOdd()&&x.iadd(p),x.iushrn(1);for(var M=0,C=1;(h.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(h.iushrn(M);M-- >0;)w.isOdd()&&w.iadd(p),w.iushrn(1);l.cmp(h)>=0?(l.isub(h),x.isub(w)):(h.isub(l),w.isub(x))}var P;return l.cmpn(1)===0?P=x:P=w,P.cmpn(0)<0&&P.iadd(c),P},i.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var l=this.clone(),h=c.clone();l.negative=0,h.negative=0;for(var x=0;l.isEven()&&h.isEven();x++)l.iushrn(1),h.iushrn(1);do{for(;l.isEven();)l.iushrn(1);for(;h.isEven();)h.iushrn(1);var w=l.cmp(h);if(w<0){var p=l;l=h,h=p}else if(w===0||h.cmpn(1)===0)break;l.isub(h)}while(!0);return h.iushln(x)},i.prototype.invm=function(c){return this.egcd(c).a.umod(c)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(c){return this.words[0]&c},i.prototype.bincn=function(c){n(typeof c=="number");var l=c%26,h=(c-l)/26,x=1<>>26,o&=67108863,this.words[p]=o}return w!==0&&(this.words[p]=w,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(c){var l=c<0;if(this.negative!==0&&!l)return-1;if(this.negative===0&&l)return 1;this._strip();var h;if(this.length>1)h=1;else{l&&(c=-c),n(c<=67108863,"Number is too big");var x=this.words[0]|0;h=x===c?0:xc.length)return 1;if(this.length=0;h--){var x=this.words[h]|0,w=c.words[h]|0;if(x!==w){xw&&(l=1);break}}return l},i.prototype.gtn=function(c){return this.cmpn(c)===1},i.prototype.gt=function(c){return this.cmp(c)===1},i.prototype.gten=function(c){return this.cmpn(c)>=0},i.prototype.gte=function(c){return this.cmp(c)>=0},i.prototype.ltn=function(c){return this.cmpn(c)===-1},i.prototype.lt=function(c){return this.cmp(c)===-1},i.prototype.lten=function(c){return this.cmpn(c)<=0},i.prototype.lte=function(c){return this.cmp(c)<=0},i.prototype.eqn=function(c){return this.cmpn(c)===0},i.prototype.eq=function(c){return this.cmp(c)===0},i.red=function(c){return new y(c)},i.prototype.toRed=function(c){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(c){return this.red=c,this},i.prototype.forceRed=function(c){return n(!this.red,"Already a number in reduction context"),this._forceRed(c)},i.prototype.redAdd=function(c){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},i.prototype.redIAdd=function(c){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},i.prototype.redSub=function(c){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},i.prototype.redISub=function(c){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},i.prototype.redShl=function(c){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},i.prototype.redMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},i.prototype.redIMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(c){return n(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var G={k256:null,p224:null,p192:null,p25519:null};function re(f,c){this.name=f,this.p=new i(c,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}re.prototype._tmp=function(){var c=new i(null);return c.words=new Array(Math.ceil(this.n/13)),c},re.prototype.ireduce=function(c){var l=c,h;do this.split(l,this.tmp),l=this.imulK(l),l=l.iadd(this.tmp),h=l.bitLength();while(h>this.n);var x=h0?l.isub(this.p):l.strip!==void 0?l.strip():l._strip(),l},re.prototype.split=function(c,l){c.iushrn(this.n,0,l)},re.prototype.imulK=function(c){return c.imul(this.k)};function ne(){re.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(ne,re),ne.prototype.split=function(c,l){for(var h=4194303,x=Math.min(c.length,9),w=0;w>>22,p=o}p>>>=22,c.words[w-10]=p,p===0&&c.length>10?c.length-=10:c.length-=9},ne.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var l=0,h=0;h>>=26,c.words[h]=w,l=x}return l!==0&&(c.words[c.length++]=l),c},i._prime=function(c){if(G[c])return G[c];var l;if(c==="k256")l=new ne;else if(c==="p224")l=new Y;else if(c==="p192")l=new W;else if(c==="p25519")l=new se;else throw new Error("Unknown prime "+c);return G[c]=l,l};function y(f){if(typeof f=="string"){var c=i._prime(f);this.m=c.p,this.prime=c}else n(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}y.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},y.prototype._verify2=function(c,l){n((c.negative|l.negative)===0,"red works only with positives"),n(c.red&&c.red===l.red,"red works only with red numbers")},y.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(g(c,c.umod(this.m)._forceRed(this)),c)},y.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},y.prototype.add=function(c,l){this._verify2(c,l);var h=c.add(l);return h.cmp(this.m)>=0&&h.isub(this.m),h._forceRed(this)},y.prototype.iadd=function(c,l){this._verify2(c,l);var h=c.iadd(l);return h.cmp(this.m)>=0&&h.isub(this.m),h},y.prototype.sub=function(c,l){this._verify2(c,l);var h=c.sub(l);return h.cmpn(0)<0&&h.iadd(this.m),h._forceRed(this)},y.prototype.isub=function(c,l){this._verify2(c,l);var h=c.isub(l);return h.cmpn(0)<0&&h.iadd(this.m),h},y.prototype.shl=function(c,l){return this._verify1(c),this.imod(c.ushln(l))},y.prototype.imul=function(c,l){return this._verify2(c,l),this.imod(c.imul(l))},y.prototype.mul=function(c,l){return this._verify2(c,l),this.imod(c.mul(l))},y.prototype.isqr=function(c){return this.imul(c,c.clone())},y.prototype.sqr=function(c){return this.mul(c,c)},y.prototype.sqrt=function(c){if(c.isZero())return c.clone();var l=this.m.andln(3);if(n(l%2===1),l===3){var h=this.m.add(new i(1)).iushrn(2);return this.pow(c,h)}for(var x=this.m.subn(1),w=0;!x.isZero()&&x.andln(1)===0;)w++,x.iushrn(1);n(!x.isZero());var p=new i(1).toRed(this),o=p.redNeg(),d=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new i(2*M*M).toRed(this);this.pow(M,d).cmp(o)!==0;)M.redIAdd(o);for(var C=this.pow(M,x),P=this.pow(c,x.addn(1).iushrn(1)),S=this.pow(c,x),I=w;S.cmp(p)!==0;){for(var U=S,V=0;U.cmp(p)!==0;V++)U=U.redSqr();n(V=0;w--){for(var C=l.words[w],P=M-1;P>=0;P--){var S=C>>P&1;if(p!==x[0]&&(p=this.sqr(p)),S===0&&o===0){d=0;continue}o<<=1,o|=S,d++,!(d!==h&&(w!==0||P!==0))&&(p=this.mul(p,x[o]),d=0,o=0)}M=26}return p},y.prototype.convertTo=function(c){var l=c.umod(this.m);return l===c?l.clone():l},y.prototype.convertFrom=function(c){var l=c.clone();return l.red=null,l},i.mont=function(c){return new a(c)};function a(f){y.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(a,y),a.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},a.prototype.convertFrom=function(c){var l=this.imod(c.mul(this.rinv));return l.red=null,l},a.prototype.imul=function(c,l){if(c.isZero()||l.isZero())return c.words[0]=0,c.length=1,c;var h=c.imul(l),x=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=h.isub(x).iushrn(this.shift),p=w;return w.cmp(this.m)>=0?p=w.isub(this.m):w.cmpn(0)<0&&(p=w.iadd(this.m)),p._forceRed(this)},a.prototype.mul=function(c,l){if(c.isZero()||l.isZero())return new i(0)._forceRed(this);var h=c.mul(l),x=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=h.isub(x).iushrn(this.shift),p=w;return w.cmp(this.m)>=0?p=w.isub(this.m):w.cmpn(0)<0&&(p=w.iadd(this.m)),p._forceRed(this)},a.prototype.invm=function(c){var l=this.imod(c._invmp(this.m).mul(this.r2));return l._forceRed(this)}})(t,ue)})(m0);const ft=m0.exports,U7="logger/5.7.0";let $m=!1,qm=!1;const Bc={debug:1,default:2,info:2,warning:3,error:4,off:5};let Hm=Bc.default,Zu=null;function K7(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{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}const zm=K7();var Qc;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Qc||(Qc={}));var On;(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"})(On||(On={}));const jm="0123456789abcdef";class de{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Bc[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Hm>Bc[n])&&console.log.apply(console,r)}debug(...e){this._log(de.levels.DEBUG,e)}info(...e){this._log(de.levels.INFO,e)}warn(...e){this._log(de.levels.WARNING,e)}makeError(e,r,n){if(qm)return this.makeError("censored error",r,{});r||(r=de.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(b=>{const m=n[b];try{if(m instanceof Uint8Array){let g="";for(let _=0;_>4],g+=jm[m[_]&15];s.push(b+"=Uint8Array(0x"+g+")")}else s.push(b+"="+JSON.stringify(m))}catch{s.push(b+"="+JSON.stringify(n[b].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let u="";switch(r){case On.NUMERIC_FAULT:{u="NUMERIC_FAULT";const b=e;switch(b){case"overflow":case"underflow":case"division-by-zero":u+="-"+b;break;case"negative-power":case"negative-width":u+="-unsupported";break;case"unbound-bitwise-result":u+="-unbound-result";break}break}case On.CALL_EXCEPTION:case On.INSUFFICIENT_FUNDS:case On.MISSING_NEW:case On.NONCE_EXPIRED:case On.REPLACEMENT_UNDERPRICED:case On.TRANSACTION_REPLACED:case On.UNPREDICTABLE_GAS_LIMIT:u=r;break}u&&(e+=" [ See: https://links.ethers.org/v5-errors-"+u+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const v=new Error(e);return v.reason=i,v.code=r,Object.keys(n).forEach(function(b){v[b]=n[b]}),v}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,de.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){zm&&this.throwError("platform missing String.prototype.normalize",de.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:zm})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,de.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,de.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,de.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",de.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",de.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",de.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Zu||(Zu=new de(U7)),Zu}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",de.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),$m){if(!e)return;this.globalLogger().throwError("error censorship permanent",de.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}qm=!!e,$m=!!r}static setLogLevel(e){const r=Bc[e.toLowerCase()];if(r==null){de.globalLogger().warn("invalid log level - "+e);return}Hm=r}static from(e){return new de(e)}}de.errors=On;de.levels=Qc;const $7=Object.freeze(Object.defineProperty({__proto__:null,get LogLevel(){return Qc},get ErrorCode(){return On},Logger:de},Symbol.toStringTag,{value:"Module"})),q7="bytes/5.7.0",fr=new de(q7);function s6(t){return!!t.toHexString}function ys(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ys(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function g0(t){return dt(t)&&!(t.length%2)||To(t)}function Gm(t){return typeof t=="number"&&t==t&&t%1===0}function To(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Gm(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Fe(t,e){if(e||(e={}),typeof t=="number"){fr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ys(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),s6(t)&&(t=t.toHexString()),dt(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":fr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sFe(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),ys(n)}function Ri(t){let e=Fe(t);if(e.length===0)return e;let r=0;for(;re&&fr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ys(r)}function dt(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Ju="0123456789abcdef";function Ue(t,e){if(e||(e={}),typeof t=="number"){fr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Ju[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),s6(t))return t.toHexString();if(dt(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":fr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(To(t)){let r="0x";for(let n=0;n>4]+Ju[s&15]}return r}return fr.throwArgumentError("invalid hexlify value","value",t)}function Ii(t){if(typeof t!="string")t=Ue(t);else if(!dt(t)||t.length%2)return null;return(t.length-2)/2}function hr(t,e,r){return typeof t!="string"?t=Ue(t):(!dt(t)||t.length%2)&&fr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function an(t){let e="0x";return t.forEach(r=>{e+=Ue(r).substring(2)}),e}function Bs(t){const e=f6(Ue(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function f6(t){typeof t!="string"&&(t=Ue(t)),dt(t)||fr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&fr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function ko(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(g0(t)){let r=Fe(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Ue(r.slice(0,32)),e.s=Ue(r.slice(32,64))):r.length===65?(e.r=Ue(r.slice(0,32)),e.s=Ue(r.slice(32,64)),e.v=r[64]):fr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:fr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Ue(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,e._vs!=null){const s=Of(Fe(e._vs),32);e._vs=Ue(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&fr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const u=Ue(s);e.s==null?e.s=u:e.s!==u&&fr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?fr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&fr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!dt(e.r)?fr.throwArgumentError("signature missing or invalid r","signature",t):e.r=Zt(e.r,32),e.s==null||!dt(e.s)?fr.throwArgumentError("signature missing or invalid s","signature",t):e.s=Zt(e.s,32);const r=Fe(e.s);r[0]>=128&&fr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Ue(r);e._vs&&(dt(e._vs)||fr.throwArgumentError("signature invalid _vs","signature",t),e._vs=Zt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&fr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Cp(t){return t=ko(t),Ue(Xt([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const H7=Object.freeze(Object.defineProperty({__proto__:null,isBytesLike:g0,isBytes:To,arrayify:Fe,concat:Xt,stripZeros:Ri,zeroPad:Of,isHexString:dt,hexlify:Ue,hexDataLength:Ii,hexDataSlice:hr,hexConcat:an,hexValue:Bs,hexStripZeros:f6,hexZeroPad:Zt,splitSignature:ko,joinSignature:Cp},Symbol.toStringTag,{value:"Module"})),c6="bignumber/5.7.0";var Qf=ft.BN;const Vi=new de(c6),Xu={},Vm=9007199254740991;function z7(t){return t!=null&&(Le.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||dt(t)||typeof t=="bigint"||To(t))}let Wm=!1;class Le{constructor(e,r){e!==Xu&&Vi.throwError("cannot call constructor directly; use BigNumber.from",de.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return fn(yt(this).fromTwos(e))}toTwos(e){return fn(yt(this).toTwos(e))}abs(){return this._hex[0]==="-"?Le.from(this._hex.substring(1)):this}add(e){return fn(yt(this).add(yt(e)))}sub(e){return fn(yt(this).sub(yt(e)))}div(e){return Le.from(e).isZero()&&Nn("division-by-zero","div"),fn(yt(this).div(yt(e)))}mul(e){return fn(yt(this).mul(yt(e)))}mod(e){const r=yt(e);return r.isNeg()&&Nn("division-by-zero","mod"),fn(yt(this).umod(r))}pow(e){const r=yt(e);return r.isNeg()&&Nn("negative-power","pow"),fn(yt(this).pow(r))}and(e){const r=yt(e);return(this.isNegative()||r.isNeg())&&Nn("unbound-bitwise-result","and"),fn(yt(this).and(r))}or(e){const r=yt(e);return(this.isNegative()||r.isNeg())&&Nn("unbound-bitwise-result","or"),fn(yt(this).or(r))}xor(e){const r=yt(e);return(this.isNegative()||r.isNeg())&&Nn("unbound-bitwise-result","xor"),fn(yt(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Nn("negative-width","mask"),fn(yt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Nn("negative-width","shl"),fn(yt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Nn("negative-width","shr"),fn(yt(this).shrn(e))}eq(e){return yt(this).eq(yt(e))}lt(e){return yt(this).lt(yt(e))}lte(e){return yt(this).lte(yt(e))}gt(e){return yt(this).gt(yt(e))}gte(e){return yt(this).gte(yt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return yt(this).isZero()}toNumber(){try{return yt(this).toNumber()}catch{Nn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Vi.throwError("this platform does not support BigInt",de.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Wm||(Wm=!0,Vi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Vi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",de.errors.UNEXPECTED_ARGUMENT,{}):Vi.throwError("BigNumber.toString does not accept parameters",de.errors.UNEXPECTED_ARGUMENT,{})),yt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Le)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Le(Xu,e0(e)):e.match(/^-?[0-9]+$/)?new Le(Xu,e0(new Qf(e))):Vi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Nn("underflow","BigNumber.from",e),(e>=Vm||e<=-Vm)&&Nn("overflow","BigNumber.from",e),Le.from(String(e));const r=e;if(typeof r=="bigint")return Le.from(r.toString());if(To(r))return Le.from(Ue(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Le.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(dt(n)||n[0]==="-"&&dt(n.substring(1))))return Le.from(n)}return Vi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function e0(t){if(typeof t!="string")return e0(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Vi.throwArgumentError("invalid hex","value",t),t=e0(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function fn(t){return Le.from(e0(t))}function yt(t){const e=Le.from(t).toHexString();return e[0]==="-"?new Qf("-"+e.substring(3),16):new Qf(e.substring(2),16)}function Nn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Vi.throwError(t,de.errors.NUMERIC_FAULT,n)}function j7(t){return new Qf(t,36).toString(16)}function G7(t){return new Qf(t,16).toString(36)}const on=new de(c6),Ff={},l6=Le.from(0),u6=Le.from(-1);function d6(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),on.throwError(t,de.errors.NUMERIC_FAULT,s)}let Lf="0";for(;Lf.length<256;)Lf+=Lf;function I1(t){if(typeof t!="number")try{t=Le.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Lf.substring(0,t):on.throwArgumentError("invalid decimal size","decimals",t)}function Nc(t,e){e==null&&(e=0);const r=I1(e);t=Le.from(t);const n=t.lt(l6);n&&(t=t.mul(u6));let s=t.mod(r).toString();for(;s.length2&&on.throwArgumentError("too many decimal points","value",t);let i=s[0],u=s[1];for(i||(i="0"),u||(u="0");u[u.length-1]==="0";)u=u.substring(0,u.length-1);for(u.length>r.length-1&&d6("fractional component exceeds decimals","underflow","parseFixed"),u===""&&(u="0");u.lengthe[u]==null?b:(typeof e[u]!==v&&on.throwArgumentError("invalid fixed format ("+u+" not "+v+")","format."+u,e[u]),e[u]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&on.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&on.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new xs(Ff,r,n,s)}}class Fr{constructor(e,r,n,s){e!==Ff&&on.throwError("cannot use FixedNumber constructor; use FixedNumber.from",de.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&on.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Fr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Zm.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Fr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Zm.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&on.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Fr.from("1"+Lf.substring(0,e),this.format),s=V7.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&on.throwArgumentError("invalid byte width","width",e);const r=Le.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Zt(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Fr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!z7(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Fr.fromString(Nc(e,r),xs.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=xs.from(r),s=pi(e,n.decimals);!n.signed&&s.lt(l6)&&d6("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=Zt(i,n.width/8));const u=Nc(s,n.decimals);return new Fr(Ff,i,u,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=xs.from(r);if(Fe(e).length>n.width/8)throw new Error("overflow");let s=Le.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),u=Nc(s,n.decimals);return new Fr(Ff,i,u,n)}static from(e,r){if(typeof e=="string")return Fr.fromString(e,r);if(To(e))return Fr.fromBytes(e,r);try{return Fr.fromValue(e,0,r)}catch(n){if(n.code!==de.errors.INVALID_ARGUMENT)throw n}return on.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Zm=Fr.from(1),V7=Fr.from("0.5"),W7="properties/5.7.0";var Z7=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const el=new de(W7);function De(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ri(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function cr(t){return Z7(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function D1(t,e){(!t||typeof t!="object")&&el.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||el.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function rr(t){const e={};for(const r in t)e[r]=t[r];return e}const J7={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h6(t){if(t==null||J7[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rMn(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&De(e,r,Mn(n))}return e}return el.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Mn(t){return X7(t)}class Ka{constructor(e){for(const r in e)this[r]=Mn(e[r])}}const Y7=Object.freeze(Object.defineProperty({__proto__:null,defineReadOnly:De,getStatic:ri,resolveProperties:cr,checkProperties:D1,shallowCopy:rr,deepCopy:Mn,Description:Ka},Symbol.toStringTag,{value:"Module"})),b0="abi/5.7.0",wt=new de(b0),Ao={};let Jm={calldata:!0,memory:!0,storage:!0},Q7={calldata:!0,memory:!0};function Z0(t,e){if(t==="bytes"||t==="string"){if(Jm[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Q7[e])return!0;return(Jm[e]||e==="payable")&&wt.throwArgumentError("invalid modifier","name",e),!1}function e_(t,e){let r=t;function n(v){wt.throwArgumentError(`unexpected character at position ${v}`,"param",t)}t=t.replace(/\s/g," ");function s(v){let b={type:"",name:"",parent:v,state:{allowType:!0}};return e&&(b.indexed=!1),b}let i={type:"",name:"",state:{allowType:!0}},u=i;for(let v=0;vJSON.parse(s.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Et.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Et.full?", ":",")+")"):r+=this.type,e!==Et.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Et.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Ar.fromString(e,r):Ar.fromObject(e)}static fromObject(e){return Ar.isParamType(e)?e:new Ar(Ao,{name:e.name||null,type:ts(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Ar.fromObject):null})}static fromString(e,r){function n(s){return Ar.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(e_(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function t0(t,e){return n_(t).map(r=>Ar.fromString(r,e))}class Ai{constructor(e,r){e!==Ao&&wt.throwError("use a static from method",de.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Tc(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Ai.isFragment(e)?e:typeof e=="string"?Ai.fromString(e):Ai.fromObject(e)}static fromObject(e){if(Ai.isFragment(e))return e;switch(e.type){case"function":return ei.fromObject(e);case"event":return Mi.fromObject(e);case"constructor":return Qn.fromObject(e);case"error":return Ji.fromObject(e);case"fallback":case"receive":return null}return wt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Mi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?ei.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Qn.fromString(e.trim()):e.split(" ")[0]==="error"?Ji.fromString(e.substring(5).trim()):wt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Mi extends Ai{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Et.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ",e!==Et.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Mi.fromString(e):Mi.fromObject(e)}static fromObject(e){if(Mi.isEventFragment(e))return e;e.type!=="event"&&wt.throwArgumentError("invalid event object","value",e);const r={name:r0(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Ar.fromObject):[],type:"event"};return new Mi(Ao,r)}static fromString(e){let r=e.match(n0);r||wt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:wt.warn("unknown modifier: "+s)}}),Mi.fromObject({name:r[1].trim(),anonymous:n,inputs:t0(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function p6(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&wt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||wt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Le.from(r[1]),r[0]):t}function v6(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.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: "+r)}})}function m6(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&wt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&wt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&wt.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&&wt.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&wt.throwArgumentError("unable to determine stateMutability","value",t),e}class Qn extends Ai{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Et.sighash&&wt.throwError("cannot format a constructor for sighash",de.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Qn.fromString(e):Qn.fromObject(e)}static fromObject(e){if(Qn.isConstructorFragment(e))return e;e.type!=="constructor"&&wt.throwArgumentError("invalid constructor object","value",e);let r=m6(e);r.constant&&wt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Le.from(e.gas):null};return new Qn(Ao,n)}static fromString(e){let r={type:"constructor"};e=p6(e,r);let n=e.match(n0);return(!n||n[1].trim()!=="constructor")&&wt.throwArgumentError("invalid constructor string","value",e),r.inputs=t0(n[2].trim(),!1),v6(n[3].trim(),r),Qn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class ei extends Qn{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Et.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ",e!==Et.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?ei.fromString(e):ei.fromObject(e)}static fromObject(e){if(ei.isFunctionFragment(e))return e;e.type!=="function"&&wt.throwArgumentError("invalid function object","value",e);let r=m6(e);const n={type:e.type,name:r0(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Ar.fromObject):[],outputs:e.outputs?e.outputs.map(Ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Le.from(e.gas):null};return new ei(Ao,n)}static fromString(e){let r={type:"function"};e=p6(e,r);let n=e.split(" returns ");n.length>2&&wt.throwArgumentError("invalid function string","value",e);let s=n[0].match(n0);if(s||wt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&r0(r.name),r.inputs=t0(s[2],!1),v6(s[3].trim(),r),n.length>1){let i=n[1].match(n0);(i[1].trim()!=""||i[3].trim()!="")&&wt.throwArgumentError("unexpected tokens","value",e),r.outputs=t0(i[2],!1)}else r.outputs=[];return ei.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Xm(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&wt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Ji extends Ai{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Et.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Ji.fromString(e):Ji.fromObject(e)}static fromObject(e){if(Ji.isErrorFragment(e))return e;e.type!=="error"&&wt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:r0(e.name),inputs:e.inputs?e.inputs.map(Ar.fromObject):[]};return Xm(new Ji(Ao,r))}static fromString(e){let r={type:"error"},n=e.match(n0);return n||wt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&r0(r.name),r.inputs=t0(n[2],!1),Xm(Ji.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function ts(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const r_=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function r0(t){return(!t||!t.match(r_))&&wt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const n0=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function n_(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&O1.throwError("value out-of-bounds",de.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Xt([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class tl{constructor(e,r,n,s){De(this,"_data",Fe(e)),De(this,"wordSize",r||32),De(this,"_coerceFunc",n),De(this,"allowLoose",s),this._offset=0}get data(){return Ue(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):tl.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:O1.throwError("data out-of-bounds",de.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new tl(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return Le.from(this.readBytes(this.wordSize))}}var $l={exports:{}};(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",s=n?window:{};s.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",u=!s.JS_SHA3_NO_NODE_JS&&typeof Je.exports=="object"&&Je.exports.versions&&Je.exports.versions.node;u?s=ue:i&&(s=self);var v=!s.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,b=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),g=[31,7936,2031616,520093696],_=[4,1024,262144,67108864],A=[1,256,65536,16777216],E=[6,1536,393216,100663296],R=[0,8,16,24],B=[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],T=[224,256,384,512],F=[128,256],O=["hex","buffer","arrayBuffer","array","digest"],q={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(S){return Object.prototype.toString.call(S)==="[object Array]"}),b&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(S){return typeof S=="object"&&S.buffer&&S.buffer.constructor===ArrayBuffer});for(var H=function(S,I,U){return function(V){return new M(S,I,S).update(V)[U]()}},G=function(S,I,U){return function(V,z){return new M(S,I,z).update(V)[U]()}},re=function(S,I,U){return function(V,z,X,j){return c["cshake"+S].update(V,z,X,j)[U]()}},ne=function(S,I,U){return function(V,z,X,j){return c["kmac"+S].update(V,z,X,j)[U]()}},Y=function(S,I,U,V){for(var z=0;z>5,this.byteCount=this.blockCount<<2,this.outputBlocks=U>>5,this.extraBytes=(U&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}M.prototype.update=function(S){if(this.finalized)throw new Error(r);var I,U=typeof S;if(U!=="string"){if(U==="object"){if(S===null)throw new Error(e);if(b&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!b||!ArrayBuffer.isView(S)))throw new Error(e)}else throw new Error(e);I=!0}for(var V=this.blocks,z=this.byteCount,X=S.length,j=this.blockCount,N=0,$=this.s,ee,J;N>2]|=S[N]<>2]|=J<>2]|=(192|J>>6)<>2]|=(128|J&63)<=57344?(V[ee>>2]|=(224|J>>12)<>2]|=(128|J>>6&63)<>2]|=(128|J&63)<>2]|=(240|J>>18)<>2]|=(128|J>>12&63)<>2]|=(128|J>>6&63)<>2]|=(128|J&63)<=z){for(this.start=ee-z,this.block=V[j],ee=0;ee>8,U=S&255;U>0;)z.unshift(U),S=S>>8,U=S&255,++V;return I?z.push(V):z.unshift(V),this.update(z),z.length},M.prototype.encodeString=function(S){var I,U=typeof S;if(U!=="string"){if(U==="object"){if(S===null)throw new Error(e);if(b&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!b||!ArrayBuffer.isView(S)))throw new Error(e)}else throw new Error(e);I=!0}var V=0,z=S.length;if(I)V=z;else for(var X=0;X=57344?V+=3:(j=65536+((j&1023)<<10|S.charCodeAt(++X)&1023),V+=4)}return V+=this.encode(V*8),this.update(S),V},M.prototype.bytepad=function(S,I){for(var U=this.encode(I),V=0;V>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(S[0]=S[U],I=1;I>4&15]+m[N&15]+m[N>>12&15]+m[N>>8&15]+m[N>>20&15]+m[N>>16&15]+m[N>>28&15]+m[N>>24&15];X%S===0&&(P(I),z=0)}return V&&(N=I[z],j+=m[N>>4&15]+m[N&15],V>1&&(j+=m[N>>12&15]+m[N>>8&15]),V>2&&(j+=m[N>>20&15]+m[N>>16&15])),j},M.prototype.arrayBuffer=function(){this.finalize();var S=this.blockCount,I=this.s,U=this.outputBlocks,V=this.extraBytes,z=0,X=0,j=this.outputBits>>3,N;V?N=new ArrayBuffer(U+1<<2):N=new ArrayBuffer(j);for(var $=new Uint32Array(N);X>8&255,j[N+2]=$>>16&255,j[N+3]=$>>24&255;X%S===0&&P(I)}return V&&(N=X<<2,$=I[z],j[N]=$&255,V>1&&(j[N+1]=$>>8&255),V>2&&(j[N+2]=$>>16&255)),j};function C(S,I,U){M.call(this,S,I,U)}C.prototype=new M,C.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var P=function(S){var I,U,V,z,X,j,N,$,ee,J,K,D,k,L,te,Z,Q,Ie,ie,oe,Oe,ae,fe,Ke,le,Me,Ze,pe,Ae,ze,he,Ee,Ye,ve,Se,Qe,me,Re,et,ge,Ce,tt,be,Be,rt,ye,Ne,nt,xe,Te,it,we,ke,at,_e,Pe,Ge,Ve,pt,vt,mt,gt,bt;for(V=0;V<48;V+=2)z=S[0]^S[10]^S[20]^S[30]^S[40],X=S[1]^S[11]^S[21]^S[31]^S[41],j=S[2]^S[12]^S[22]^S[32]^S[42],N=S[3]^S[13]^S[23]^S[33]^S[43],$=S[4]^S[14]^S[24]^S[34]^S[44],ee=S[5]^S[15]^S[25]^S[35]^S[45],J=S[6]^S[16]^S[26]^S[36]^S[46],K=S[7]^S[17]^S[27]^S[37]^S[47],D=S[8]^S[18]^S[28]^S[38]^S[48],k=S[9]^S[19]^S[29]^S[39]^S[49],I=D^(j<<1|N>>>31),U=k^(N<<1|j>>>31),S[0]^=I,S[1]^=U,S[10]^=I,S[11]^=U,S[20]^=I,S[21]^=U,S[30]^=I,S[31]^=U,S[40]^=I,S[41]^=U,I=z^($<<1|ee>>>31),U=X^(ee<<1|$>>>31),S[2]^=I,S[3]^=U,S[12]^=I,S[13]^=U,S[22]^=I,S[23]^=U,S[32]^=I,S[33]^=U,S[42]^=I,S[43]^=U,I=j^(J<<1|K>>>31),U=N^(K<<1|J>>>31),S[4]^=I,S[5]^=U,S[14]^=I,S[15]^=U,S[24]^=I,S[25]^=U,S[34]^=I,S[35]^=U,S[44]^=I,S[45]^=U,I=$^(D<<1|k>>>31),U=ee^(k<<1|D>>>31),S[6]^=I,S[7]^=U,S[16]^=I,S[17]^=U,S[26]^=I,S[27]^=U,S[36]^=I,S[37]^=U,S[46]^=I,S[47]^=U,I=J^(z<<1|X>>>31),U=K^(X<<1|z>>>31),S[8]^=I,S[9]^=U,S[18]^=I,S[19]^=U,S[28]^=I,S[29]^=U,S[38]^=I,S[39]^=U,S[48]^=I,S[49]^=U,L=S[0],te=S[1],ye=S[11]<<4|S[10]>>>28,Ne=S[10]<<4|S[11]>>>28,pe=S[20]<<3|S[21]>>>29,Ae=S[21]<<3|S[20]>>>29,vt=S[31]<<9|S[30]>>>23,mt=S[30]<<9|S[31]>>>23,tt=S[40]<<18|S[41]>>>14,be=S[41]<<18|S[40]>>>14,ve=S[2]<<1|S[3]>>>31,Se=S[3]<<1|S[2]>>>31,Z=S[13]<<12|S[12]>>>20,Q=S[12]<<12|S[13]>>>20,nt=S[22]<<10|S[23]>>>22,xe=S[23]<<10|S[22]>>>22,ze=S[33]<<13|S[32]>>>19,he=S[32]<<13|S[33]>>>19,gt=S[42]<<2|S[43]>>>30,bt=S[43]<<2|S[42]>>>30,at=S[5]<<30|S[4]>>>2,_e=S[4]<<30|S[5]>>>2,Qe=S[14]<<6|S[15]>>>26,me=S[15]<<6|S[14]>>>26,Ie=S[25]<<11|S[24]>>>21,ie=S[24]<<11|S[25]>>>21,Te=S[34]<<15|S[35]>>>17,it=S[35]<<15|S[34]>>>17,Ee=S[45]<<29|S[44]>>>3,Ye=S[44]<<29|S[45]>>>3,Ke=S[6]<<28|S[7]>>>4,le=S[7]<<28|S[6]>>>4,Pe=S[17]<<23|S[16]>>>9,Ge=S[16]<<23|S[17]>>>9,Re=S[26]<<25|S[27]>>>7,et=S[27]<<25|S[26]>>>7,oe=S[36]<<21|S[37]>>>11,Oe=S[37]<<21|S[36]>>>11,we=S[47]<<24|S[46]>>>8,ke=S[46]<<24|S[47]>>>8,Be=S[8]<<27|S[9]>>>5,rt=S[9]<<27|S[8]>>>5,Me=S[18]<<20|S[19]>>>12,Ze=S[19]<<20|S[18]>>>12,Ve=S[29]<<7|S[28]>>>25,pt=S[28]<<7|S[29]>>>25,ge=S[38]<<8|S[39]>>>24,Ce=S[39]<<8|S[38]>>>24,ae=S[48]<<14|S[49]>>>18,fe=S[49]<<14|S[48]>>>18,S[0]=L^~Z&Ie,S[1]=te^~Q&ie,S[10]=Ke^~Me&pe,S[11]=le^~Ze&Ae,S[20]=ve^~Qe&Re,S[21]=Se^~me&et,S[30]=Be^~ye&nt,S[31]=rt^~Ne&xe,S[40]=at^~Pe&Ve,S[41]=_e^~Ge&pt,S[2]=Z^~Ie&oe,S[3]=Q^~ie&Oe,S[12]=Me^~pe&ze,S[13]=Ze^~Ae&he,S[22]=Qe^~Re&ge,S[23]=me^~et&Ce,S[32]=ye^~nt&Te,S[33]=Ne^~xe&it,S[42]=Pe^~Ve&vt,S[43]=Ge^~pt&mt,S[4]=Ie^~oe&ae,S[5]=ie^~Oe&fe,S[14]=pe^~ze&Ee,S[15]=Ae^~he&Ye,S[24]=Re^~ge&tt,S[25]=et^~Ce&be,S[34]=nt^~Te&we,S[35]=xe^~it&ke,S[44]=Ve^~vt>,S[45]=pt^~mt&bt,S[6]=oe^~ae&L,S[7]=Oe^~fe&te,S[16]=ze^~Ee&Ke,S[17]=he^~Ye&le,S[26]=ge^~tt&ve,S[27]=Ce^~be&Se,S[36]=Te^~we&Be,S[37]=it^~ke&rt,S[46]=vt^~gt&at,S[47]=mt^~bt&_e,S[8]=ae^~L&Z,S[9]=fe^~te&Q,S[18]=Ee^~Ke&Me,S[19]=Ye^~le&Ze,S[28]=tt^~ve&Qe,S[29]=be^~Se&me,S[38]=we^~Be&ye,S[39]=ke^~rt&Ne,S[48]=gt^~at&Pe,S[49]=bt^~_e&Ge,S[0]^=B[V],S[1]^=B[V+1]};if(v)t.exports=c;else for(h=0;h>=8;return e}function Qm(t,e,r){let n=0;for(let s=0;se+1+n&&bi.throwError("child data too short",de.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function y6(t,e){if(t.length===0&&bi.throwError("data too short",de.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&bi.throwError("data short segment too short",de.errors.BUFFER_OVERRUN,{});const n=Qm(t,e+1,r);return e+1+r+n>t.length&&bi.throwError("data long segment too short",de.errors.BUFFER_OVERRUN,{}),e2(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&bi.throwError("data array too short",de.errors.BUFFER_OVERRUN,{}),e2(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&bi.throwError("data array too short",de.errors.BUFFER_OVERRUN,{});const n=Qm(t,e+1,r);e+1+r+n>t.length&&bi.throwError("data array too short",de.errors.BUFFER_OVERRUN,{});const s=Ue(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&bi.throwError("data too short",de.errors.BUFFER_OVERRUN,{});const n=Ue(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Ue(t[e])}}function ql(t){const e=Fe(t),r=y6(e,0);return r.consumed!==e.length&&bi.throwArgumentError("invalid rlp data","data",t),r.result}const s_=Object.freeze(Object.defineProperty({__proto__:null,encode:Eo,decode:ql},Symbol.toStringTag,{value:"Module"})),f_="address/5.7.0",Sa=new de(f_);function t2(t){dt(t,20)||Sa.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=Fe(Gt(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const c_=9007199254740991;function l_(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const F1={};for(let t=0;t<10;t++)F1[String(t)]=String(t);for(let t=0;t<26;t++)F1[String.fromCharCode(65+t)]=String(10+t);const r2=Math.floor(l_(c_));function x6(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>F1[n]).join("");for(;e.length>=r2;){let n=e.substring(0,r2);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function jt(t){let e=null;if(typeof t!="string"&&Sa.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=t2(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Sa.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)!==x6(t)&&Sa.throwArgumentError("bad icap checksum","address",t),e=j7(t.substring(4));e.length<40;)e="0"+e;e=t2("0x"+e)}else Sa.throwArgumentError("invalid address","address",t);return e}function u_(t){try{return jt(t),!0}catch{}return!1}function d_(t){let e=G7(jt(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+x6("XE00"+e)+e}function L1(t){let e=null;try{e=jt(t.from)}catch{Sa.throwArgumentError("missing from address","transaction",t)}const r=Ri(Fe(Le.from(t.nonce).toHexString()));return jt(hr(Gt(Eo([e,r])),12))}function h_(t,e,r){return Ii(e)!==32&&Sa.throwArgumentError("salt must be 32 bytes","salt",e),Ii(r)!==32&&Sa.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),jt(hr(Gt(Xt(["0xff",jt(t),e,r])),12))}const p_=Object.freeze(Object.defineProperty({__proto__:null,getAddress:jt,isAddress:u_,getIcapAddress:d_,getContractAddress:L1,getCreate2Address:h_},Symbol.toStringTag,{value:"Module"}));class v_ extends ca{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=jt(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return jt(Zt(e.readValue().toHexString(),20))}}class m_ extends ca{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const fs=new de(b0);function w6(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let b={};n=e.map(m=>{const g=m.localName;return g||fs.throwError("cannot encode object for signature with missing names",de.errors.INVALID_ARGUMENT,{argument:"values",coder:m,value:r}),b[g]&&fs.throwError("cannot encode object for signature with duplicate names",de.errors.INVALID_ARGUMENT,{argument:"values",coder:m,value:r}),b[g]=!0,r[g]})}else fs.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&fs.throwArgumentError("types/value length mismatch","tuple",r);let s=new Bp(t.wordSize),i=new Bp(t.wordSize),u=[];e.forEach((b,m)=>{let g=n[m];if(b.dynamic){let _=i.length;b.encode(i,g);let A=s.writeUpdatableValue();u.push(E=>{A(E+_)})}else b.encode(s,g)}),u.forEach(b=>{b(s.length)});let v=t.appendWriter(s);return v+=t.appendWriter(i),v}function _6(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let u=null;if(i.dynamic){let v=t.readValue(),b=n.subReader(v.toNumber());try{u=i.decode(b)}catch(m){if(m.code===de.errors.BUFFER_OVERRUN)throw m;u=m,u.baseType=i.name,u.name=i.localName,u.type=i.type}}else try{u=i.decode(t)}catch(v){if(v.code===de.errors.BUFFER_OVERRUN)throw v;u=v,u.baseType=i.name,u.name=i.localName,u.type=i.type}u!=null&&r.push(u)});const s=e.reduce((i,u)=>{const v=u.localName;return v&&(i[v]||(i[v]=0),i[v]++),i},{});e.forEach((i,u)=>{let v=i.localName;if(!v||s[v]!==1||(v==="length"&&(v="_length"),r[v]!=null))return;const b=r[u];b instanceof Error?Object.defineProperty(r,v,{enumerable:!0,get:()=>{throw b}}):r[v]=b});for(let i=0;i{throw u}})}return Object.freeze(r)}class g_ extends ca{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&fs.throwError("insufficient data length",de.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;u++)i++;return i}return t===dn.OVERRUN?r.length-e-1:0}function C_(t,e,r,n,s){return t===dn.OVERLONG?(n.push(s),0):(n.push(65533),C6(t,e,r))}const B6=Object.freeze({error:R_,ignore:C6,replace:C_});function U1(t,e){e==null&&(e=B6.error),t=Fe(t);const r=[];let n=0;for(;n>7===0){r.push(s);continue}let i=null,u=null;if((s&224)===192)i=1,u=127;else if((s&240)===224)i=2,u=2047;else if((s&248)===240)i=3,u=65535;else{(s&192)===128?n+=e(dn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(dn.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(dn.OVERRUN,n-1,t,r);continue}let v=s&(1<<8-i-1)-1;for(let b=0;b1114111){n+=e(dn.OUT_OF_RANGE,n-1-i,t,r,v);continue}if(v>=55296&&v<=57343){n+=e(dn.UTF16_SURROGATE,n-1-i,t,r,v);continue}if(v<=u){n+=e(dn.OVERLONG,n-1-i,t,r,v);continue}r.push(v)}}return r}function vr(t,e=Di.current){e!=Di.current&&(R6.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const u=65536+((s&1023)<<10)+(i&1023);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(u&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return Fe(r)}function Yu(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function B_(t,e){return'"'+U1(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Yu(r):(r-=65536,Yu((r>>10&1023)+55296)+Yu((r&1023)+56320))}).join("")+'"'}function Np(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function $a(t,e){return Np(U1(t,e))}function rl(t,e=Di.current){return U1(vr(t,e))}function N_(t){const e=vr(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Ue(Xt([e,S6]).slice(0,32))}function T_(t){const e=Fe(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return $a(e.slice(0,r))}function k_(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function N6(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function $1(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const P_=N6("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),I_="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),D_=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],O_=K1("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),F_=K1("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),L_=K1("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",k_),U_=N6("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function K_(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function $_(t){return!!$1(t,P_)}function q_(t){let e=$1(t,D_);if(e)return[t+e.s];let r=O_[t];if(r)return r;let n=F_[t];if(n)return[t+n[0]];let s=L_[t];return s||null}function H_(t){return!!$1(t,U_)}function z_(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=rl(t);e=K_(e.map(n=>{if(I_.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=q_(n);return s||[n]})),e=rl(Np(e),Di.NFKC),e.forEach(n=>{if(H_(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if($_(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=Np(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const j_=Object.freeze(Object.defineProperty({__proto__:null,_toEscapedUtf8String:B_,toUtf8Bytes:vr,toUtf8CodePoints:rl,toUtf8String:$a,Utf8ErrorFuncs:B6,get Utf8ErrorReason(){return dn},get UnicodeNormalizationForm(){return Di},formatBytes32String:N_,parseBytes32String:T_,nameprep:z_},Symbol.toStringTag,{value:"Module"}));class G_ extends M6{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,vr(r))}decode(e){return $a(super.decode(e))}}class J0 extends ca{constructor(e,r){let n=!1;const s=[];e.forEach(u=>{u.dynamic&&(n=!0),s.push(u.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return w6(e,this.coders,r)}decode(e){return e.coerce(this.name,_6(e,this.coders))}}const X0=new de(b0),V_=new RegExp(/^bytes([0-9]*)$/),W_=new RegExp(/^(u?int)([0-9]*)$/);class T6{constructor(e){De(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new v_(e.name);case"bool":return new b_(e.name);case"string":return new G_(e.name);case"bytes":return new y_(e.name);case"array":return new g_(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new J0((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new w_(e.name)}let r=e.type.match(W_);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&X0.throwArgumentError("invalid "+r[1]+" bit length","param",e),new E_(n/8,r[1]==="int",e.name)}if(r=e.type.match(V_),r){let n=parseInt(r[1]);return(n===0||n>32)&&X0.throwArgumentError("invalid bytes length","param",e),new x_(n,e.name)}return X0.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new tl(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new Bp(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(Ar.from(s)));return new J0(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&X0.throwError("types/values length mismatch",de.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(u=>this._getCoder(Ar.from(u))),s=new J0(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(u=>this._getCoder(Ar.from(u)));return new J0(s,"_").decode(this._getReader(Fe(r),n))}}const k6=new T6;function Ra(t){return Gt(vr(t))}const P6="hash/5.7.0";function q1(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(v)?s(v,u-1):r.push(v)})};return s(t,e),r}function J_(t){const e={};for(let r=0;r>--b&1}const _=31,A=Math.pow(2,_),E=A>>>1,R=E>>1,B=A-1;let T=0;for(let G=0;G<_;G++)T=T<<1|g();let F=[],O=0,q=A;for(;;){let G=Math.floor(((T-O+1)*s-1)/q),re=0,ne=n;for(;ne-re>1;){let se=re+ne>>>1;G>>1|g(),Y=Y<<1^E,W=(W^E)<<1|E|1;O=Y,q=1+W-Y}let H=n-4;return F.map(G=>{switch(G-H){case 3:return H+65792+(t[v++]<<16|t[v++]<<8|t[v++]);case 2:return H+256+(t[v++]<<8|t[v++]);case 1:return H+t[v++];default:return G-1}})}function Y_(t){let e=0;return()=>t[e++]}function Q_(t){return Y_(X_(t))}function eM(t){return t&1?~t>>1:t>>1}function tM(t,e){let r=Array(t);for(let n=0;ne[u]):r}function nM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(aM(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(oM(r,t))}return J_(I6(e))}function iM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function D6(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[u].push(i));return n}function aM(t,e){let r=1+e(),n=e(),s=iM(e),i=D6(s.length,1+t,e);return I6(i.map((u,v)=>{const b=u[0],m=u.slice(1);return Array(s[v]).fill(void 0).map((g,_)=>{let A=_*n;return[b+_*r,m.map(E=>E+A)]})}))}function oM(t,e){let r=1+e();return D6(r,1+t,e).map(s=>[s[0],s.slice(1)])}function sM(t){let e=nl(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let m=nl(t,e);if(m.length==0)break;n.push({set:new Set(m),node:r()})}n.sort((m,g)=>g.set.size-m.set.size);let s=t(),i=s%3;s=s/3|0;let u=!!(s&1);s>>=1;let v=s==1,b=s==2;return{branches:n,valid:i,fe0f:u,save:v,check:b}}}function fM(){return Q_(q1("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=="))}const Hl=fM(),cM=new Set(nl(Hl)),lM=new Set(nl(Hl)),uM=nM(Hl),dM=sM(Hl),i2=45,a2=95;function O6(t){return rl(t)}function hM(t){return t.filter(e=>e!=65039)}function F6(t){for(let e of t.split(".")){let r=O6(e);try{for(let n=r.lastIndexOf(a2)-1;n>=0;n--)if(r[n]!==a2)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===i2&&r[3]===i2)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function pM(t){return F6(vM(t,hM))}function vM(t,e){let r=O6(t).reverse(),n=[];for(;r.length;){let s=gM(r);if(s){n.push(...e(s));continue}let i=r.pop();if(cM.has(i)){n.push(i);continue}if(lM.has(i))continue;let u=uM[i];if(u){n.push(...u);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return F6(mM(String.fromCodePoint(...n)))}function mM(t){return t.normalize("NFC")}function gM(t,e){var r;let n=dM,s,i,u=[],v=t.length;for(e&&(e.length=0);v;){let b=t[--v];if(n=(r=n.branches.find(m=>m.set.has(b)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=b;else if(n.check&&b===i)break;u.push(b),n.fe0f&&(u.push(65039),v>0&&t[v-1]==65039&&v--),n.valid&&(s=u.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(v).reverse()),t.length=v)}return s}const bM=new de(P6),L6=new Uint8Array(32);L6.fill(0);function o2(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function zl(t){const e=vr(pM(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(o2(e.slice(n))),r}function yM(t){return zl(t).map(e=>$a(e)).join(".")}function xM(t){try{return zl(t).length!==0}catch{}return!1}function Uf(t){typeof t!="string"&&bM.throwArgumentError("invalid ENS name; not a string","name",t);let e=L6;const r=zl(t);for(;r.length;)e=Gt(Xt([e,Gt(r.pop())]));return Ue(e)}function U6(t){return Ue(Xt(zl(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const K6=`Ethereum Signed Message: -`;function z1(t){return typeof t=="string"&&(t=vr(t)),Gt(Xt([vr(K6),vr(String(t.length)),t]))}var wM=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const or=new de(P6),$6=new Uint8Array(32);$6.fill(0);const _M=Le.from(-1),q6=Le.from(0),H6=Le.from(1),MM=Le.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function AM(t){const e=Fe(t),r=e.length%32;return r?an([e,$6.slice(r)]):Ue(e)}const EM=Zt(H6.toHexString(),32),SM=Zt(q6.toHexString(),32),s2={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Qu=["name","version","chainId","verifyingContract","salt"];function f2(t){return function(e){return typeof e!="string"&&or.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const RM={name:f2("name"),version:f2("version"),chainId:function(t){try{return Le.from(t).toString()}catch{}return or.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return jt(t).toLowerCase()}catch{}return or.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Fe(t);if(e.length!==32)throw new Error("bad length");return Ue(e)}catch{}return or.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function ed(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))&&or.throwArgumentError("invalid numeric width","type",t);const s=MM.mask(r?n-1:n),i=r?s.add(H6).mul(_M):q6;return function(u){const v=Le.from(u);return(v.lt(i)||v.gt(s))&&or.throwArgumentError(`value out-of-bounds for ${t}`,"value",u),Zt(v.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&or.throwArgumentError("invalid bytes width","type",t),function(n){return Fe(n).length!==r&&or.throwArgumentError(`invalid length for ${t}`,"value",n),AM(n)}}}switch(t){case"address":return function(e){return Zt(jt(e),32)};case"bool":return function(e){return e?EM:SM};case"bytes":return function(e){return Gt(e)};case"string":return function(e){return Ra(e)}}return null}function c2(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Lr{constructor(e){De(this,"types",Object.freeze(Mn(e))),De(this,"_encoderCache",{}),De(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(v=>{r[v]={},n[v]=[],s[v]={}});for(const v in e){const b={};e[v].forEach(m=>{b[m.name]&&or.throwArgumentError(`duplicate variable name ${JSON.stringify(m.name)} in ${JSON.stringify(v)}`,"types",e),b[m.name]=!0;const g=m.type.match(/^([^\x5b]*)(\x5b|$)/)[1];g===v&&or.throwArgumentError(`circular type reference to ${JSON.stringify(g)}`,"types",e),!ed(g)&&(n[g]||or.throwArgumentError(`unknown type ${JSON.stringify(g)}`,"types",e),n[g].push(v),r[v][g]=!0)})}const i=Object.keys(n).filter(v=>n[v].length===0);i.length===0?or.throwArgumentError("missing primary type","types",e):i.length>1&&or.throwArgumentError(`ambiguous primary types or unused types: ${i.map(v=>JSON.stringify(v)).join(", ")}`,"types",e),De(this,"primaryType",i[0]);function u(v,b){b[v]&&or.throwArgumentError(`circular type reference to ${JSON.stringify(v)}`,"types",e),b[v]=!0,Object.keys(r[v]).forEach(m=>{!n[m]||(u(m,b),Object.keys(b).forEach(g=>{s[g][m]=!0}))}),delete b[v]}u(this.primaryType,{});for(const v in s){const b=Object.keys(s[v]);b.sort(),this._types[v]=c2(v,e[v])+b.map(m=>c2(m,e[m])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=ed(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),u=parseInt(r[3]);return v=>{u>=0&&v.length!==u&&or.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",v);let b=v.map(i);return this._types[s]&&(b=b.map(Gt)),Gt(an(b))}}const n=this.types[e];if(n){const s=Ra(this._types[e]);return i=>{const u=n.map(({name:v,type:b})=>{const m=this.getEncoder(b)(i[v]);return this._types[b]?Gt(m):m});return u.unshift(s),an(u)}}return or.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||or.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Gt(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(ed(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const u=s[1],v=parseInt(s[3]);return v>=0&&r.length!==v&&or.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(b=>this._visit(u,b,n))}const i=this.types[e];return i?i.reduce((u,{name:v,type:b})=>(u[v]=this._visit(b,r[v],n),u),{}):or.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Lr(e)}static getPrimaryType(e){return Lr.from(e).primaryType}static hashStruct(e,r,n){return Lr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=s2[n];s||or.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>Qu.indexOf(n.name)-Qu.indexOf(s.name)),Lr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return an(["0x1901",Lr.hashDomain(e),Lr.from(r).hash(n)])}static hash(e,r,n){return Gt(Lr.encode(e,r,n))}static resolveNames(e,r,n,s){return wM(this,void 0,void 0,function*(){e=rr(e);const i={};e.verifyingContract&&!dt(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const u=Lr.from(r);u.visit(n,(v,b)=>(v==="address"&&!dt(b,20)&&(i[b]="0x"),b));for(const v in i)i[v]=yield s(v);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=u.visit(n,(v,b)=>v==="address"&&i[b]?i[b]:b),{domain:e,value:n}})}static getPayload(e,r,n){Lr.hashDomain(e);const s={},i=[];Qu.forEach(b=>{const m=e[b];m!=null&&(s[b]=RM[b](m),i.push({name:b,type:s2[b]}))});const u=Lr.from(r),v=rr(r);return v.EIP712Domain?or.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):v.EIP712Domain=i,u.encode(n),{types:v,domain:s,primaryType:u.primaryType,message:u.visit(n,(b,m)=>{if(b.match(/^bytes(\d*)/))return Ue(Fe(m));if(b.match(/^u?int/))return Le.from(m).toString();switch(b){case"address":return m.toLowerCase();case"bool":return!!m;case"string":return typeof m!="string"&&or.throwArgumentError("invalid string","value",m),m}return or.throwArgumentError("unsupported type","type",b)})}}}const CM=Object.freeze(Object.defineProperty({__proto__:null,id:Ra,dnsEncode:U6,namehash:Uf,isValidName:xM,ensNormalize:yM,messagePrefix:K6,hashMessage:z1,_TypedDataEncoder:Lr},Symbol.toStringTag,{value:"Module"})),ar=new de(b0);class z6 extends Ka{}class j6 extends Ka{}class BM extends Ka{}class il extends Ka{static isIndexed(e){return!!(e&&e._isIndexed)}}const NM={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function l2(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class ra{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,De(this,"fragments",r.map(n=>Ai.from(n)).filter(n=>n!=null)),De(this,"_abiCoder",ri(new.target,"getAbiCoder")()),De(this,"functions",{}),De(this,"errors",{}),De(this,"events",{}),De(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){ar.warn("duplicate definition - constructor");return}De(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){ar.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||De(this,"deploy",Qn.from({payable:!1,type:"constructor"})),De(this,"_isInterface",!0)}format(e){e||(e=Et.full),e===Et.sighash&&ar.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Et.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return k6}static getAddress(e){return jt(e)}static getSighash(e){return hr(Ra(e.format()),0,4)}static getEventTopic(e){return Ra(e.format())}getFunction(e){if(dt(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];ar.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?ar.throwArgumentError("no matching function","name",n):s.length>1&&ar.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[ei.fromString(e).format()];return r||ar.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(dt(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];ar.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?ar.throwArgumentError("no matching event","name",n):s.length>1&&ar.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[Mi.fromString(e).format()];return r||ar.throwArgumentError("no matching event","signature",e),r}getError(e){if(dt(e)){const n=ri(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}ar.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?ar.throwArgumentError("no matching error","name",n):s.length>1&&ar.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[ei.fromString(e).format()];return r||ar.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return ri(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ri(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=Fe(r);return Ue(n.slice(0,4))!==this.getSighash(e)&&ar.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Ue(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Ue(Xt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=Fe(r);return Ue(n.slice(0,4))!==this.getSighash(e)&&ar.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Ue(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Ue(Xt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=Fe(r),s=null,i="",u=null,v=null,b=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const m=Ue(n.slice(0,4)),g=NM[m];if(g)u=this._abiCoder.decode(g.inputs,n.slice(4)),v=g.name,b=g.signature,g.reason&&(s=u[0]),v==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(u[0])}`:v==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${u[0]}`);else try{const _=this.getError(m);u=this._abiCoder.decode(_.inputs,n.slice(4)),v=_.name,b=_.format()}catch{}break}}return ar.throwError("call revert exception"+i,de.errors.CALL_EXCEPTION,{method:e.format(),data:Ue(r),errorArgs:u,errorName:v,errorSignature:b,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Ue(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&ar.throwError("too many arguments for "+e.format(),de.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const s=(i,u)=>i.type==="string"?Ra(u):i.type==="bytes"?Gt(Ue(u)):(i.type==="bool"&&typeof u=="boolean"&&(u=u?"0x01":"0x00"),i.type.match(/^u?int/)&&(u=Le.from(u).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[u]),Zt(Ue(u),32));for(r.forEach((i,u)=>{let v=e.inputs[u];if(!v.indexed){i!=null&&ar.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+v.name,i);return}i==null?n.push(null):v.baseType==="array"||v.baseType==="tuple"?ar.throwArgumentError("filtering with tuples or arrays not supported","contract."+v.name,i):Array.isArray(i)?n.push(i.map(b=>s(v,b))):n.push(s(v,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&ar.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((u,v)=>{const b=r[v];if(u.indexed)if(u.type==="string")n.push(Ra(b));else if(u.type==="bytes")n.push(Gt(b));else{if(u.baseType==="tuple"||u.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([u.type],[b]))}else s.push(u),i.push(b)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let A=this.getEventTopic(e);(!dt(n[0],32)||n[0].toLowerCase()!==A)&&ar.throwError("fragment/topic mismatch",de.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:A,value:n[0]}),n=n.slice(1)}let s=[],i=[],u=[];e.inputs.forEach((A,E)=>{A.indexed?A.type==="string"||A.type==="bytes"||A.baseType==="tuple"||A.baseType==="array"?(s.push(Ar.fromObject({type:"bytes32",name:A.name})),u.push(!0)):(s.push(A),u.push(!1)):(i.push(A),u.push(!1))});let v=n!=null?this._abiCoder.decode(s,Xt(n)):null,b=this._abiCoder.decode(i,r,!0),m=[],g=0,_=0;e.inputs.forEach((A,E)=>{if(A.indexed)if(v==null)m[E]=new il({_isIndexed:!0,hash:null});else if(u[E])m[E]=new il({_isIndexed:!0,hash:v[_++]});else try{m[E]=v[_++]}catch(R){m[E]=R}else try{m[E]=b[g++]}catch(R){m[E]=R}if(A.name&&m[A.name]==null){const R=m[E];R instanceof Error?Object.defineProperty(m,A.name,{enumerable:!0,get:()=>{throw l2(`property ${JSON.stringify(A.name)}`,R)}}):m[A.name]=R}});for(let A=0;A{throw l2(`index ${A}`,E)}})}return Object.freeze(m)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new j6({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Le.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new z6({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Ue(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new BM({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const TM=Object.freeze(Object.defineProperty({__proto__:null,ConstructorFragment:Qn,ErrorFragment:Ji,EventFragment:Mi,Fragment:Ai,FunctionFragment:ei,ParamType:Ar,FormatTypes:Et,AbiCoder:T6,defaultAbiCoder:k6,Interface:ra,Indexed:il,checkResultErrors:g6,LogDescription:z6,TransactionDescription:j6},Symbol.toStringTag,{value:"Module"}));var i0={};const G6=gr(TM),kM=gr(p_),PM=gr(Z_);class j1{constructor(e){De(this,"alphabet",e),De(this,"base",e.length),De(this,"_alphabetMap",{}),De(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(u%this.base),u=u/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function qM(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),s=0;s>6|192,r[n++]=i&63|128):$M(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}xt.htonl=W6;function zM(t,e){for(var r="",n=0;n>>0}return i}xt.join32=jM;function GM(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}xt.split32=GM;function VM(t,e){return t>>>e|t<<32-e}xt.rotr32=VM;function WM(t,e){return t<>>32-e}xt.rotl32=WM;function ZM(t,e){return t+e>>>0}xt.sum32=ZM;function JM(t,e,r){return t+e+r>>>0}xt.sum32_3=JM;function XM(t,e,r,n){return t+e+r+n>>>0}xt.sum32_4=XM;function YM(t,e,r,n,s){return t+e+r+n+s>>>0}xt.sum32_5=YM;function QM(t,e,r,n){var s=t[e],i=t[e+1],u=n+i>>>0,v=(u>>0,t[e+1]=u}xt.sum64=QM;function eA(t,e,r,n){var s=e+n>>>0,i=(s>>0}xt.sum64_hi=eA;function tA(t,e,r,n){var s=e+n;return s>>>0}xt.sum64_lo=tA;function rA(t,e,r,n,s,i,u,v){var b=0,m=e;m=m+n>>>0,b+=m>>0,b+=m>>0,b+=m>>0}xt.sum64_4_hi=rA;function nA(t,e,r,n,s,i,u,v){var b=e+n+i+v;return b>>>0}xt.sum64_4_lo=nA;function iA(t,e,r,n,s,i,u,v,b,m){var g=0,_=e;_=_+n>>>0,g+=_>>0,g+=_>>0,g+=_>>0,g+=_>>0}xt.sum64_5_hi=iA;function aA(t,e,r,n,s,i,u,v,b,m){var g=e+n+i+v+m;return g>>>0}xt.sum64_5_lo=aA;function oA(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}xt.rotr64_hi=oA;function sA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}xt.rotr64_lo=sA;function fA(t,e,r){return t>>>r}xt.shr64_hi=fA;function cA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}xt.shr64_lo=cA;var Hs={},u2=xt,lA=qn;function jl(){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}Hs.BlockHash=jl;jl.prototype.update=function(e,r){if(e=u2.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=u2.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,u=8;u>>3}Ui.g0_256=vA;function mA(t){return Ci(t,17)^Ci(t,19)^t>>>10}Ui.g1_256=mA;var Ts=xt,gA=Hs,bA=Ui,td=Ts.rotl32,of=Ts.sum32,yA=Ts.sum32_5,xA=bA.ft_1,ex=gA.BlockHash,wA=[1518500249,1859775393,2400959708,3395469782];function Oi(){if(!(this instanceof Oi))return new Oi;ex.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Ts.inherits(Oi,ex);var _A=Oi;Oi.blockSize=512;Oi.outSize=160;Oi.hmacStrength=80;Oi.padLength=64;Oi.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),cE(e.length<=this.blockSize);for(var r=e.length;r>24&255,b[e.length+1]=_>>16&255,b[e.length+2]=_>>8&255,b[e.length+3]=_&255;let A=Fe(a0(s,t,b));i||(i=A.length,g=new Uint8Array(i),u=Math.ceil(n/i),m=n-(u-1)*i),g.set(A);for(let B=1;B>8,A=g&255;_?b.push(_,A):b.push(A)}return b}r.toArray=n;function s(u){return u.length===1?"0"+u:u}r.zero2=s;function i(u){for(var v="",b=0;b(A>>1)-1?B=(A>>1)-T:B=T,E.isubn(B)):B=0,_[R]=B,E.iushrn(1)}return _}r.getNAF=n;function s(b,m){var g=[[],[]];b=b.clone(),m=m.clone();for(var _=0,A=0,E;b.cmpn(-_)>0||m.cmpn(-A)>0;){var R=b.andln(3)+_&3,B=m.andln(3)+A&3;R===3&&(R=-1),B===3&&(B=-1);var T;(R&1)===0?T=0:(E=b.andln(7)+_&7,(E===3||E===5)&&B===2?T=-R:T=R),g[0].push(T);var F;(B&1)===0?F=0:(E=m.andln(7)+A&7,(E===3||E===5)&&R===2?F=-B:F=B),g[1].push(F),2*_===T+1&&(_=1-_),2*A===F+1&&(A=1-A),b.iushrn(1),m.iushrn(1)}return g}r.getJSF=s;function i(b,m,g){var _="_"+m;b.prototype[m]=function(){return this[_]!==void 0?this[_]:this[_]=g.call(this)}}r.cachedProperty=i;function u(b){return typeof b=="string"?r.toArray(b,"hex"):b}r.parseBytes=u;function v(b){return new ft(b,"hex","le")}r.intFromLE=v}),al=Sn.getNAF,mE=Sn.getJSF,ol=Sn.assert;function qa(t,e){this.type=t,this.p=new ft(e.p,16),this.red=e.prime?ft.red(e.prime):ft.mont(this.p),this.zero=new ft(0).toRed(this.red),this.one=new ft(1).toRed(this.red),this.two=new ft(2).toRed(this.red),this.n=e.n&&new ft(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 Po=qa;qa.prototype.point=function(){throw new Error("Not implemented")};qa.prototype.validate=function(){throw new Error("Not implemented")};qa.prototype._fixedNafMul=function(e,r){ol(e.precomputed);var n=e._getDoubles(),s=al(r,1,this._bitLength),i=(1<=v;m--)b=(b<<1)+s[m];u.push(b)}for(var g=this.jpoint(null,null,null),_=this.jpoint(null,null,null),A=i;A>0;A--){for(v=0;v=0;b--){for(var m=0;b>=0&&u[b]===0;b--)m++;if(b>=0&&m++,v=v.dblp(m),b<0)break;var g=u[b];ol(g!==0),e.type==="affine"?g>0?v=v.mixedAdd(i[g-1>>1]):v=v.mixedAdd(i[-g-1>>1].neg()):g>0?v=v.add(i[g-1>>1]):v=v.add(i[-g-1>>1].neg())}return e.type==="affine"?v.toP():v};qa.prototype._wnafMulAdd=function(e,r,n,s,i){var u=this._wnafT1,v=this._wnafT2,b=this._wnafT3,m=0,g,_,A;for(g=0;g=1;g-=2){var R=g-1,B=g;if(u[R]!==1||u[B]!==1){b[R]=al(n[R],u[R],this._bitLength),b[B]=al(n[B],u[B],this._bitLength),m=Math.max(b[R].length,m),m=Math.max(b[B].length,m);continue}var T=[r[R],null,null,r[B]];r[R].y.cmp(r[B].y)===0?(T[1]=r[R].add(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg())):r[R].y.cmp(r[B].y.redNeg())===0?(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].add(r[B].neg())):(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],O=mE(n[R],n[B]);for(m=Math.max(O[0].length,m),b[R]=new Array(m),b[B]=new Array(m),_=0;_=0;g--){for(var ne=0;g>=0;){var Y=!0;for(_=0;_=0&&ne++,G=G.dblp(ne),g<0)break;for(_=0;_0?A=v[_][W-1>>1]:W<0&&(A=v[_][-W-1>>1].neg()),A.type==="affine"?G=G.mixedAdd(A):G=G.add(A))}}for(g=0;g=Math.ceil((e.bitLength()+1)/r.step):!1};Hn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(E=m,R=g),_.negative&&(_=_.neg(),A=A.neg()),E.negative&&(E=E.neg(),R=R.neg()),[{a:_,b:A},{a:E,b:R}]};zn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),u=n.b.neg().mul(e).divRound(this.n),v=i.mul(n.a),b=u.mul(s.a),m=i.mul(n.b),g=u.mul(s.b),_=e.sub(v).sub(b),A=m.add(g).neg();return{k1:_,k2:A}};zn.prototype.pointFromX=function(e,r){e=new ft(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};zn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};zn.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,u=0;u":""};Pr.prototype.isInfinity=function(){return this.inf};Pr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};Pr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),u=i.redSqr().redISub(this.x.redAdd(this.x)),v=i.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,v)};Pr.prototype.getX=function(){return this.x.fromRed()};Pr.prototype.getY=function(){return this.y.fromRed()};Pr.prototype.mul=function(e){return e=new ft(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Pr.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};Pr.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};Pr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Pr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};Pr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Kr(t,e,r,n){Po.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ft(0)):(this.x=new ft(e,16),this.y=new ft(r,16),this.z=new ft(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}W1(Kr,Po.BasePoint);zn.prototype.jpoint=function(e,r,n){return new Kr(this,e,r,n)};Kr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};Kr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Kr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),u=this.y.redMul(r.redMul(e.z)),v=e.y.redMul(n.redMul(this.z)),b=s.redSub(i),m=u.redSub(v);if(b.cmpn(0)===0)return m.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=b.redSqr(),_=g.redMul(b),A=s.redMul(g),E=m.redSqr().redIAdd(_).redISub(A).redISub(A),R=m.redMul(A.redISub(E)).redISub(u.redMul(_)),B=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(E,R,B)};Kr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,u=e.y.redMul(r).redMul(this.z),v=n.redSub(s),b=i.redSub(u);if(v.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var m=v.redSqr(),g=m.redMul(v),_=n.redMul(m),A=b.redSqr().redIAdd(g).redISub(_).redISub(_),E=b.redMul(_.redISub(A)).redISub(i.redMul(g)),R=this.z.redMul(v);return this.curve.jpoint(A,E,R)};Kr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};Kr.prototype.inspect=function(){return this.isInfinity()?"":""};Kr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var kc=Gs(function(t,e){var r=e;r.base=Po,r.short=bE,r.mont=null,r.edwards=null}),Pc=Gs(function(t,e){var r=e,n=Sn.assert;function s(v){v.type==="short"?this.curve=new kc.short(v):v.type==="edwards"?this.curve=new kc.edwards(v):this.curve=new kc.mont(v),this.g=this.curve.g,this.n=this.curve.n,this.hash=v.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=s;function i(v,b){Object.defineProperty(r,v,{configurable:!0,enumerable:!0,get:function(){var m=new s(b);return Object.defineProperty(r,v,{configurable:!0,enumerable:!0,value:m}),m}})}i("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:Cr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:Cr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:Cr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:Cr.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"]}),i("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:Cr.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Cr.sha256,gRed:!1,g:["9"]}),i("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:Cr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=null.crash()}catch{u=void 0}i("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:Cr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})});function Da(t){if(!(this instanceof Da))return new Da(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=ni.toArray(t.entropy,t.entropyEnc||"hex"),r=ni.toArray(t.nonce,t.nonceEnc||"hex"),n=ni.toArray(t.pers,t.persEnc||"hex");V1(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var hx=Da;Da.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Da.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=ni.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var yE=Sn.assert;function Gl(t,e){if(t instanceof Gl)return t;this._importDER(t,e)||(yE(t.r&&t.s,"Signature without r or s"),this.r=new ft(t.r,16),this.s=new ft(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Vl=Gl;function xE(){this.place=0}function id(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var s=0,i=0,u=e.place;i>>=0;return s<=127?!1:(e.place=u,s)}function v2(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Gl.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=v2(r),n=v2(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];ad(s,r.length),s=s.concat(r),s.push(2),ad(s,n.length);var i=s.concat(n),u=[48];return ad(u,i.length),u=u.concat(i),Sn.encode(u,e)};var wE=function(){throw new Error("unsupported")},px=Sn.assert;function Kn(t){if(!(this instanceof Kn))return new Kn(t);typeof t=="string"&&(px(Object.prototype.hasOwnProperty.call(Pc,t),"Unknown curve "+t),t=Pc[t]),t instanceof Pc.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 _E=Kn;Kn.prototype.keyPair=function(e){return new Z1(this,e)};Kn.prototype.keyFromPrivate=function(e,r){return Z1.fromPrivate(this,e,r)};Kn.prototype.keyFromPublic=function(e,r){return Z1.fromPublic(this,e,r)};Kn.prototype.genKeyPair=function(e){e||(e={});for(var r=new hx({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||wE(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new ft(2));;){var i=new ft(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Kn.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Kn.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new ft(e,16));for(var i=this.n.byteLength(),u=r.getPrivate().toArray("be",i),v=e.toArray("be",i),b=new hx({hash:this.hash,entropy:u,nonce:v,pers:s.pers,persEnc:s.persEnc||"utf8"}),m=this.n.sub(new ft(1)),g=0;;g++){var _=s.k?s.k(g):new ft(b.generate(this.n.byteLength()));if(_=this._truncateToN(_,!0),!(_.cmpn(1)<=0||_.cmp(m)>=0)){var A=this.g.mul(_);if(!A.isInfinity()){var E=A.getX(),R=E.umod(this.n);if(R.cmpn(0)!==0){var B=_.invm(this.n).mul(R.mul(r.getPrivate()).iadd(e));if(B=B.umod(this.n),B.cmpn(0)!==0){var T=(A.getY().isOdd()?1:0)|(E.cmp(R)!==0?2:0);return s.canonical&&B.cmp(this.nh)>0&&(B=this.n.sub(B),T^=1),new Vl({r:R,s:B,recoveryParam:T})}}}}}};Kn.prototype.verify=function(e,r,n,s){e=this._truncateToN(new ft(e,16)),n=this.keyFromPublic(n,s),r=new Vl(r,"hex");var i=r.r,u=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var v=u.invm(this.n),b=v.mul(e).umod(this.n),m=v.mul(i).umod(this.n),g;return this.curve._maxwellTrick?(g=this.g.jmulAdd(b,n.getPublic(),m),g.isInfinity()?!1:g.eqXToP(i)):(g=this.g.mulAdd(b,n.getPublic(),m),g.isInfinity()?!1:g.getX().umod(this.n).cmp(i)===0)};Kn.prototype.recoverPubKey=function(t,e,r,n){px((3&r)===r,"The recovery param is more than two bits"),e=new Vl(e,n);var s=this.n,i=new ft(t),u=e.r,v=e.s,b=r&1,m=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");m?u=this.curve.pointFromX(u.add(this.curve.n),b):u=this.curve.pointFromX(u,b);var g=e.r.invm(s),_=s.sub(i).mul(g).umod(s),A=v.mul(g).umod(s);return this.g.mulAdd(_,u,A)};Kn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Vl(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var ME=Gs(function(t,e){var r=e;r.version="6.5.4",r.utils=Sn,r.rand=function(){throw new Error("unsupported")},r.curve=kc,r.curves=Pc,r.ec=_E,r.eddsa=null}),AE=ME.ec;const EE="signing-key/5.7.0",Ip=new de(EE);let od=null;function xi(){return od||(od=new AE("secp256k1")),od}class bo{constructor(e){De(this,"curve","secp256k1"),De(this,"privateKey",Ue(e)),Ii(this.privateKey)!==32&&Ip.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=xi().keyFromPrivate(Fe(this.privateKey));De(this,"publicKey","0x"+r.getPublic(!1,"hex")),De(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),De(this,"_isSigningKey",!0)}_addPoint(e){const r=xi().keyFromPublic(Fe(this.publicKey)),n=xi().keyFromPublic(Fe(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=xi().keyFromPrivate(Fe(this.privateKey)),n=Fe(e);n.length!==32&&Ip.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return ko({recoveryParam:s.recoveryParam,r:Zt("0x"+s.r.toString(16),32),s:Zt("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=xi().keyFromPrivate(Fe(this.privateKey)),n=xi().keyFromPublic(Fe(J1(e)));return Zt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function vx(t,e){const r=ko(e),n={r:Fe(r.r),s:Fe(r.s)};return"0x"+xi().recoverPubKey(Fe(t),n,r.recoveryParam).encode("hex",!1)}function J1(t,e){const r=Fe(t);if(r.length===32){const n=new bo(r);return e?"0x"+xi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Ue(r):"0x"+xi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+xi().keyFromPublic(r).getPublic(!0,"hex"):Ue(r)}return Ip.throwArgumentError("invalid public or private key","key","[REDACTED]")}const SE=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:bo,recoverPublicKey:vx,computePublicKey:J1},Symbol.toStringTag,{value:"Module"})),RE="transactions/5.7.0",Jr=new de(RE);var Dp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Dp||(Dp={}));function X1(t){return t==="0x"?null:jt(t)}function Vr(t){return t==="0x"?E6:Le.from(t)}const CE=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],BE={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ka(t){const e=J1(t);return jt(hr(Gt(hr(e,1)),12))}function y0(t,e){return ka(vx(Fe(t),e))}function yn(t,e){const r=Ri(Le.from(t).toHexString());return r.length>32&&Jr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function sd(t,e){return{address:jt(t),storageKeys:(e||[]).map((r,n)=>(Ii(r)!==32&&Jr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Io(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Jr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),sd(r[0],r[1])):sd(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return sd(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function mx(t){return Io(t).map(e=>[e.address,e.storageKeys])}function gx(t,e){if(t.gasPrice!=null){const n=Le.from(t.gasPrice),s=Le.from(t.maxFeePerGas||0);n.eq(s)||Jr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[yn(t.chainId||0,"chainId"),yn(t.nonce||0,"nonce"),yn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),yn(t.maxFeePerGas||0,"maxFeePerGas"),yn(t.gasLimit||0,"gasLimit"),t.to!=null?jt(t.to):"0x",yn(t.value||0,"value"),t.data||"0x",mx(t.accessList||[])];if(e){const n=ko(e);r.push(yn(n.recoveryParam,"recoveryParam")),r.push(Ri(n.r)),r.push(Ri(n.s))}return an(["0x02",Eo(r)])}function bx(t,e){const r=[yn(t.chainId||0,"chainId"),yn(t.nonce||0,"nonce"),yn(t.gasPrice||0,"gasPrice"),yn(t.gasLimit||0,"gasLimit"),t.to!=null?jt(t.to):"0x",yn(t.value||0,"value"),t.data||"0x",mx(t.accessList||[])];if(e){const n=ko(e);r.push(yn(n.recoveryParam,"recoveryParam")),r.push(Ri(n.r)),r.push(Ri(n.s))}return an(["0x01",Eo(r)])}function NE(t,e){D1(t,BE);const r=[];CE.forEach(function(u){let v=t[u.name]||[];const b={};u.numeric&&(b.hexPad="left"),v=Fe(Ue(v,b)),u.length&&v.length!==u.length&&v.length>0&&Jr.throwArgumentError("invalid length for "+u.name,"transaction:"+u.name,v),u.maxLength&&(v=Ri(v),v.length>u.maxLength&&Jr.throwArgumentError("invalid length for "+u.name,"transaction:"+u.name,v)),r.push(Ue(v))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Jr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!g0(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Ue(n)),r.push("0x"),r.push("0x")),!e)return Eo(r);const s=ko(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&Jr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&Jr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Ue(i)),r.push(Ri(Fe(s.r))),r.push(Ri(Fe(s.s))),Eo(r)}function Op(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Jr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),NE(t,e);switch(t.type){case 1:return bx(t,e);case 2:return gx(t,e)}return Jr.throwError(`unsupported transaction type: ${t.type}`,de.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function yx(t,e,r){try{const n=Vr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Jr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Zt(e[1],32),t.s=Zt(e[2],32);try{const n=Gt(r(t));t.from=y0(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function TE(t){const e=ql(t.slice(1));e.length!==9&&e.length!==12&&Jr.throwArgumentError("invalid component count for transaction type: 2","payload",Ue(t));const r=Vr(e[2]),n=Vr(e[3]),s={type:2,chainId:Vr(e[0]).toNumber(),nonce:Vr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Vr(e[4]),to:X1(e[5]),value:Vr(e[6]),data:e[7],accessList:Io(e[8])};return e.length===9||(s.hash=Gt(t),yx(s,e.slice(9),gx)),s}function kE(t){const e=ql(t.slice(1));e.length!==8&&e.length!==11&&Jr.throwArgumentError("invalid component count for transaction type: 1","payload",Ue(t));const r={type:1,chainId:Vr(e[0]).toNumber(),nonce:Vr(e[1]).toNumber(),gasPrice:Vr(e[2]),gasLimit:Vr(e[3]),to:X1(e[4]),value:Vr(e[5]),data:e[6],accessList:Io(e[7])};return e.length===8||(r.hash=Gt(t),yx(r,e.slice(8),bx)),r}function PE(t){const e=ql(t);e.length!==9&&e.length!==6&&Jr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Vr(e[0]).toNumber(),gasPrice:Vr(e[1]),gasLimit:Vr(e[2]),to:X1(e[3]),value:Vr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Le.from(e[6]).toNumber()}catch{return r}if(r.r=Zt(e[7],32),r.s=Zt(e[8],32),Le.from(r.r).isZero()&&Le.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 n=r.v-27;const s=e.slice(0,6);r.chainId!==0&&(s.push(Ue(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Gt(Eo(s));try{r.from=y0(i,{r:Ue(r.r),s:Ue(r.s),recoveryParam:n})}catch{}r.hash=Gt(t)}return r.type=null,r}function xx(t){const e=Fe(t);if(e[0]>127)return PE(e);switch(e[0]){case 1:return kE(e);case 2:return TE(e)}return Jr.throwError(`unsupported transaction type: ${e[0]}`,de.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const IE=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return Dp},computeAddress:ka,recoverAddress:y0,accessListify:Io,serialize:Op,parse:xx},Symbol.toStringTag,{value:"Module"})),DE="wordlists/5.7.0",OE=new de(DE);class x0{constructor(e){OE.checkAbstract(new.target,x0),De(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const r=[];for(let n=0;n<2048;n++){const s=e.getWord(n);if(n!==e.getWordIndex(s))return"0x";r.push(s)}return Ra(r.join(` + */(function(t){var e=Ml,r=o1,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=v,t.SlowBuffer=O,t.INSPECT_MAX_BYTES=50;var s=2147483647;t.kMaxLength=s,v.TYPED_ARRAY_SUPPORT=i(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var K=new Uint8Array(1),D={foo:function(){return 42}};return Object.setPrototypeOf(D,Uint8Array.prototype),Object.setPrototypeOf(K,D),K.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(!!v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(!!v.isBuffer(this))return this.byteOffset}});function u(K){if(K>s)throw new RangeError('The value "'+K+'" is invalid for option "size"');var D=new Uint8Array(K);return Object.setPrototypeOf(D,v.prototype),D}function v(K,D,k){if(typeof K=="number"){if(typeof D=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(K)}return b(K,D,k)}v.poolSize=8192;function b(K,D,k){if(typeof K=="string")return A(K,D);if(ArrayBuffer.isView(K))return R(K);if(K==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K);if($(K,ArrayBuffer)||K&&$(K.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($(K,SharedArrayBuffer)||K&&$(K.buffer,SharedArrayBuffer)))return B(K,D,k);if(typeof K=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var L=K.valueOf&&K.valueOf();if(L!=null&&L!==K)return v.from(L,D,k);var te=T(K);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof K[Symbol.toPrimitive]=="function")return v.from(K[Symbol.toPrimitive]("string"),D,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K)}v.from=function(K,D,k){return b(K,D,k)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array);function m(K){if(typeof K!="number")throw new TypeError('"size" argument must be of type number');if(K<0)throw new RangeError('The value "'+K+'" is invalid for option "size"')}function g(K,D,k){return m(K),K<=0?u(K):D!==void 0?typeof k=="string"?u(K).fill(D,k):u(K).fill(D):u(K)}v.alloc=function(K,D,k){return g(K,D,k)};function _(K){return m(K),u(K<0?0:F(K)|0)}v.allocUnsafe=function(K){return _(K)},v.allocUnsafeSlow=function(K){return _(K)};function A(K,D){if((typeof D!="string"||D==="")&&(D="utf8"),!v.isEncoding(D))throw new TypeError("Unknown encoding: "+D);var k=q(K,D)|0,L=u(k),te=L.write(K,D);return te!==k&&(L=L.slice(0,te)),L}function E(K){for(var D=K.length<0?0:F(K.length)|0,k=u(D),L=0;L=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return K|0}function O(K){return+K!=K&&(K=0),v.alloc(+K)}v.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==v.prototype},v.compare=function(D,k){if($(D,Uint8Array)&&(D=v.from(D,D.offset,D.byteLength)),$(k,Uint8Array)&&(k=v.from(k,k.offset,k.byteLength)),!v.isBuffer(D)||!v.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===k)return 0;for(var L=D.length,te=k.length,Z=0,Q=Math.min(L,te);Zte.length?v.from(Q).copy(te,Z):Uint8Array.prototype.set.call(te,Q,Z);else if(v.isBuffer(Q))Q.copy(te,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=Q.length}return te};function q(K,D){if(v.isBuffer(K))return K.length;if(ArrayBuffer.isView(K)||$(K,ArrayBuffer))return K.byteLength;if(typeof K!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof K);var k=K.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&k===0)return 0;for(var te=!1;;)switch(D){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return V(K).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return j(K).length;default:if(te)return L?-1:V(K).length;D=(""+D).toLowerCase(),te=!0}}v.byteLength=q;function H(K,D,k){var L=!1;if((D===void 0||D<0)&&(D=0),D>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,D>>>=0,k<=D))return"";for(K||(K="utf8");;)switch(K){case"hex":return p(this,D,k);case"utf8":case"utf-8":return c(this,D,k);case"ascii":return x(this,D,k);case"latin1":case"binary":return w(this,D,k);case"base64":return f(this,D,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,D,k);default:if(L)throw new TypeError("Unknown encoding: "+K);K=(K+"").toLowerCase(),L=!0}}v.prototype._isBuffer=!0;function G(K,D,k){var L=K[D];K[D]=K[k],K[k]=L}v.prototype.swap16=function(){var D=this.length;if(D%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;kk&&(D+=" ... "),""},n&&(v.prototype[n]=v.prototype.inspect),v.prototype.compare=function(D,k,L,te,Z){if($(D,Uint8Array)&&(D=v.from(D,D.offset,D.byteLength)),!v.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(k===void 0&&(k=0),L===void 0&&(L=D?D.length:0),te===void 0&&(te=0),Z===void 0&&(Z=this.length),k<0||L>D.length||te<0||Z>this.length)throw new RangeError("out of range index");if(te>=Z&&k>=L)return 0;if(te>=Z)return-1;if(k>=L)return 1;if(k>>>=0,L>>>=0,te>>>=0,Z>>>=0,this===D)return 0;for(var Q=Z-te,Ie=L-k,ie=Math.min(Q,Ie),oe=this.slice(te,Z),Oe=D.slice(k,L),ae=0;ae2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,ee(k)&&(k=te?0:K.length-1),k<0&&(k=K.length+k),k>=K.length){if(te)return-1;k=K.length-1}else if(k<0)if(te)k=0;else return-1;if(typeof D=="string"&&(D=v.from(D,L)),v.isBuffer(D))return D.length===0?-1:ne(K,D,k,L,te);if(typeof D=="number")return D=D&255,typeof Uint8Array.prototype.indexOf=="function"?te?Uint8Array.prototype.indexOf.call(K,D,k):Uint8Array.prototype.lastIndexOf.call(K,D,k):ne(K,[D],k,L,te);throw new TypeError("val must be string, number or Buffer")}function ne(K,D,k,L,te){var Z=1,Q=K.length,Ie=D.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(K.length<2||D.length<2)return-1;Z=2,Q/=2,Ie/=2,k/=2}function ie(Ke,le){return Z===1?Ke[le]:Ke.readUInt16BE(le*Z)}var oe;if(te){var Oe=-1;for(oe=k;oeQ&&(k=Q-Ie),oe=k;oe>=0;oe--){for(var ae=!0,fe=0;fete&&(L=te)):L=te;var Z=D.length;L>Z/2&&(L=Z/2);for(var Q=0;Q>>0,isFinite(L)?(L=L>>>0,te===void 0&&(te="utf8")):(te=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Z=this.length-k;if((L===void 0||L>Z)&&(L=Z),D.length>0&&(L<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var Q=!1;;)switch(te){case"hex":return Y(this,D,k,L);case"utf8":case"utf-8":return W(this,D,k,L);case"ascii":case"latin1":case"binary":return se(this,D,k,L);case"base64":return y(this,D,k,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,D,k,L);default:if(Q)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),Q=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function f(K,D,k){return D===0&&k===K.length?e.fromByteArray(K):e.fromByteArray(K.slice(D,k))}function c(K,D,k){k=Math.min(K.length,k);for(var L=[],te=D;te239?4:Z>223?3:Z>191?2:1;if(te+Ie<=k){var ie,oe,Oe,ae;switch(Ie){case 1:Z<128&&(Q=Z);break;case 2:ie=K[te+1],(ie&192)===128&&(ae=(Z&31)<<6|ie&63,ae>127&&(Q=ae));break;case 3:ie=K[te+1],oe=K[te+2],(ie&192)===128&&(oe&192)===128&&(ae=(Z&15)<<12|(ie&63)<<6|oe&63,ae>2047&&(ae<55296||ae>57343)&&(Q=ae));break;case 4:ie=K[te+1],oe=K[te+2],Oe=K[te+3],(ie&192)===128&&(oe&192)===128&&(Oe&192)===128&&(ae=(Z&15)<<18|(ie&63)<<12|(oe&63)<<6|Oe&63,ae>65535&&ae<1114112&&(Q=ae))}}Q===null?(Q=65533,Ie=1):Q>65535&&(Q-=65536,L.push(Q>>>10&1023|55296),Q=56320|Q&1023),L.push(Q),te+=Ie}return h(L)}var l=4096;function h(K){var D=K.length;if(D<=l)return String.fromCharCode.apply(String,K);for(var k="",L=0;LL)&&(k=L);for(var te="",Z=D;ZL&&(D=L),k<0?(k+=L,k<0&&(k=0)):k>L&&(k=L),kk)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(D,k,L){D=D>>>0,k=k>>>0,L||d(D,k,this.length);for(var te=this[D],Z=1,Q=0;++Q>>0,k=k>>>0,L||d(D,k,this.length);for(var te=this[D+--k],Z=1;k>0&&(Z*=256);)te+=this[D+--k]*Z;return te},v.prototype.readUint8=v.prototype.readUInt8=function(D,k){return D=D>>>0,k||d(D,1,this.length),this[D]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(D,k){return D=D>>>0,k||d(D,2,this.length),this[D]|this[D+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(D,k){return D=D>>>0,k||d(D,2,this.length),this[D]<<8|this[D+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(D,k){return D=D>>>0,k||d(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+this[D+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(D,k){return D=D>>>0,k||d(D,4,this.length),this[D]*16777216+(this[D+1]<<16|this[D+2]<<8|this[D+3])},v.prototype.readIntLE=function(D,k,L){D=D>>>0,k=k>>>0,L||d(D,k,this.length);for(var te=this[D],Z=1,Q=0;++Q=Z&&(te-=Math.pow(2,8*k)),te},v.prototype.readIntBE=function(D,k,L){D=D>>>0,k=k>>>0,L||d(D,k,this.length);for(var te=k,Z=1,Q=this[D+--te];te>0&&(Z*=256);)Q+=this[D+--te]*Z;return Z*=128,Q>=Z&&(Q-=Math.pow(2,8*k)),Q},v.prototype.readInt8=function(D,k){return D=D>>>0,k||d(D,1,this.length),this[D]&128?(255-this[D]+1)*-1:this[D]},v.prototype.readInt16LE=function(D,k){D=D>>>0,k||d(D,2,this.length);var L=this[D]|this[D+1]<<8;return L&32768?L|4294901760:L},v.prototype.readInt16BE=function(D,k){D=D>>>0,k||d(D,2,this.length);var L=this[D+1]|this[D]<<8;return L&32768?L|4294901760:L},v.prototype.readInt32LE=function(D,k){return D=D>>>0,k||d(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},v.prototype.readInt32BE=function(D,k){return D=D>>>0,k||d(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},v.prototype.readFloatLE=function(D,k){return D=D>>>0,k||d(D,4,this.length),r.read(this,D,!0,23,4)},v.prototype.readFloatBE=function(D,k){return D=D>>>0,k||d(D,4,this.length),r.read(this,D,!1,23,4)},v.prototype.readDoubleLE=function(D,k){return D=D>>>0,k||d(D,8,this.length),r.read(this,D,!0,52,8)},v.prototype.readDoubleBE=function(D,k){return D=D>>>0,k||d(D,8,this.length),r.read(this,D,!1,52,8)};function M(K,D,k,L,te,Z){if(!v.isBuffer(K))throw new TypeError('"buffer" argument must be a Buffer instance');if(D>te||DK.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(D,k,L,te){if(D=+D,k=k>>>0,L=L>>>0,!te){var Z=Math.pow(2,8*L)-1;M(this,D,k,L,Z,0)}var Q=1,Ie=0;for(this[k]=D&255;++Ie>>0,L=L>>>0,!te){var Z=Math.pow(2,8*L)-1;M(this,D,k,L,Z,0)}var Q=L-1,Ie=1;for(this[k+Q]=D&255;--Q>=0&&(Ie*=256);)this[k+Q]=D/Ie&255;return k+L},v.prototype.writeUint8=v.prototype.writeUInt8=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,1,255,0),this[k]=D&255,k+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,65535,0),this[k]=D&255,this[k+1]=D>>>8,k+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,65535,0),this[k]=D>>>8,this[k+1]=D&255,k+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,4294967295,0),this[k+3]=D>>>24,this[k+2]=D>>>16,this[k+1]=D>>>8,this[k]=D&255,k+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,4294967295,0),this[k]=D>>>24,this[k+1]=D>>>16,this[k+2]=D>>>8,this[k+3]=D&255,k+4},v.prototype.writeIntLE=function(D,k,L,te){if(D=+D,k=k>>>0,!te){var Z=Math.pow(2,8*L-1);M(this,D,k,L,Z-1,-Z)}var Q=0,Ie=1,ie=0;for(this[k]=D&255;++Q>0)-ie&255;return k+L},v.prototype.writeIntBE=function(D,k,L,te){if(D=+D,k=k>>>0,!te){var Z=Math.pow(2,8*L-1);M(this,D,k,L,Z-1,-Z)}var Q=L-1,Ie=1,ie=0;for(this[k+Q]=D&255;--Q>=0&&(Ie*=256);)D<0&&ie===0&&this[k+Q+1]!==0&&(ie=1),this[k+Q]=(D/Ie>>0)-ie&255;return k+L},v.prototype.writeInt8=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,1,127,-128),D<0&&(D=255+D+1),this[k]=D&255,k+1},v.prototype.writeInt16LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,32767,-32768),this[k]=D&255,this[k+1]=D>>>8,k+2},v.prototype.writeInt16BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,2,32767,-32768),this[k]=D>>>8,this[k+1]=D&255,k+2},v.prototype.writeInt32LE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,2147483647,-2147483648),this[k]=D&255,this[k+1]=D>>>8,this[k+2]=D>>>16,this[k+3]=D>>>24,k+4},v.prototype.writeInt32BE=function(D,k,L){return D=+D,k=k>>>0,L||M(this,D,k,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[k]=D>>>24,this[k+1]=D>>>16,this[k+2]=D>>>8,this[k+3]=D&255,k+4};function C(K,D,k,L,te,Z){if(k+L>K.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function P(K,D,k,L,te){return D=+D,k=k>>>0,te||C(K,D,k,4),r.write(K,D,k,L,23,4),k+4}v.prototype.writeFloatLE=function(D,k,L){return P(this,D,k,!0,L)},v.prototype.writeFloatBE=function(D,k,L){return P(this,D,k,!1,L)};function S(K,D,k,L,te){return D=+D,k=k>>>0,te||C(K,D,k,8),r.write(K,D,k,L,52,8),k+8}v.prototype.writeDoubleLE=function(D,k,L){return S(this,D,k,!0,L)},v.prototype.writeDoubleBE=function(D,k,L){return S(this,D,k,!1,L)},v.prototype.copy=function(D,k,L,te){if(!v.isBuffer(D))throw new TypeError("argument should be a Buffer");if(L||(L=0),!te&&te!==0&&(te=this.length),k>=D.length&&(k=D.length),k||(k=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),D.length-k>>0,L=L===void 0?this.length:L>>>0,D||(D=0);var Q;if(typeof D=="number")for(Q=k;Q55295&&k<57344){if(!te){if(k>56319){(D-=3)>-1&&Z.push(239,191,189);continue}else if(Q+1===L){(D-=3)>-1&&Z.push(239,191,189);continue}te=k;continue}if(k<56320){(D-=3)>-1&&Z.push(239,191,189),te=k;continue}k=(te-55296<<10|k-56320)+65536}else te&&(D-=3)>-1&&Z.push(239,191,189);if(te=null,k<128){if((D-=1)<0)break;Z.push(k)}else if(k<2048){if((D-=2)<0)break;Z.push(k>>6|192,k&63|128)}else if(k<65536){if((D-=3)<0)break;Z.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((D-=4)<0)break;Z.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return Z}function z(K){for(var D=[],k=0;k>8,te=k%256,Z.push(te),Z.push(L);return Z}function j(K){return e.toByteArray(U(K))}function N(K,D,k,L){for(var te=0;te=D.length||te>=K.length);++te)D[te+k]=K[te];return te}function $(K,D){return K instanceof D||K!=null&&K.constructor!=null&&K.constructor.name!=null&&K.constructor.name===D.name}function ee(K){return K!==K}var J=function(){for(var K="0123456789abcdef",D=new Array(256),k=0;k<16;++k)for(var L=k*16,te=0;te<16;++te)D[L+te]=K[k]+K[te];return D}()})(He);var Je={exports:{}},br=Je.exports={},mi,gi;function dp(){throw new Error("setTimeout has not been defined")}function hp(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?mi=setTimeout:mi=dp}catch{mi=dp}try{typeof clearTimeout=="function"?gi=clearTimeout:gi=hp}catch{gi=hp}})();function Wy(t){if(mi===setTimeout)return setTimeout(t,0);if((mi===dp||!mi)&&setTimeout)return mi=setTimeout,setTimeout(t,0);try{return mi(t,0)}catch{try{return mi.call(null,t,0)}catch{return mi.call(this,t,0)}}}function j8(t){if(gi===clearTimeout)return clearTimeout(t);if((gi===hp||!gi)&&clearTimeout)return gi=clearTimeout,clearTimeout(t);try{return gi(t)}catch{try{return gi.call(null,t)}catch{return gi.call(this,t)}}}var Xi=[],ps=!1,uo,wc=-1;function G8(){!ps||!uo||(ps=!1,uo.length?Xi=uo.concat(Xi):wc=-1,Xi.length&&Zy())}function Zy(){if(!ps){var t=Wy(G8);ps=!0;for(var e=Xi.length;e;){for(uo=Xi,Xi=[];++wc1)for(var r=1;r!!r[s.toLowerCase()]:s=>!!r[s]}function v0(t){if(Xe(t)){const e={};for(let r=0;r{if(r){const n=r.split(Z8);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function oi(t){let e="";if(mr(t))e=t;else if(Xe(t))for(let r=0;rmr(t)?t:t==null?"":Xe(t)||nr(t)&&(t.toString===t3||!st(t.toString))?JSON.stringify(t,Yy,2):String(t),Yy=(t,e)=>e&&e.__v_isRef?Yy(t,e.value):ms(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,s])=>(r[`${n} =>`]=s,r),{})}:Qy(e)?{[`Set(${e.size})`]:[...e.values()]}:nr(e)&&!Xe(e)&&!Nf(e)?String(e):e,er={},vs=[],ai=()=>{},ew=()=>!1,tw=/^on[^a-z]/,Al=t=>tw.test(t),f1=t=>t.startsWith("onUpdate:"),Tr=Object.assign,c1=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},rw=Object.prototype.hasOwnProperty,At=(t,e)=>rw.call(t,e),Xe=Array.isArray,ms=t=>El(t)==="[object Map]",Qy=t=>El(t)==="[object Set]",st=t=>typeof t=="function",mr=t=>typeof t=="string",l1=t=>typeof t=="symbol",nr=t=>t!==null&&typeof t=="object",e3=t=>nr(t)&&st(t.then)&&st(t.catch),t3=Object.prototype.toString,El=t=>t3.call(t),nw=t=>El(t).slice(8,-1),Nf=t=>El(t)==="[object Object]",u1=t=>mr(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,_c=s1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sl=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},iw=/-(\w)/g,ki=Sl(t=>t.replace(iw,(e,r)=>r?r.toUpperCase():"")),aw=/\B([A-Z])/g,Ks=Sl(t=>t.replace(aw,"-$1").toLowerCase()),Rl=Sl(t=>t.charAt(0).toUpperCase()+t.slice(1)),Mc=Sl(t=>t?`on${Rl(t)}`:""),zf=(t,e)=>!Object.is(t,e),Ac=(t,e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},jf=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let nm;const ow=()=>nm||(nm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof jc<"u"?jc:{});let gn;class r3{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=gn,!e&&gn&&(this.index=(gn.scopes||(gn.scopes=[])).push(this)-1)}run(e){if(this.active){const r=gn;try{return gn=this,e()}finally{gn=r}}}on(){gn=this}off(){gn=this.parent}stop(e){if(this.active){let r,n;for(r=0,n=this.effects.length;r{const e=new Set(t);return e.w=0,e.n=0,e},i3=t=>(t.w&Pa)>0,a3=t=>(t.n&Pa)>0,lw=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n{(g==="length"||g>=b)&&v.push(m)})}else switch(r!==void 0&&v.push(u.get(r)),e){case"add":Xe(t)?u1(r)&&v.push(u.get("length")):(v.push(u.get(mo)),ms(t)&&v.push(u.get(mp)));break;case"delete":Xe(t)||(v.push(u.get(mo)),ms(t)&&v.push(u.get(mp)));break;case"set":ms(t)&&v.push(u.get(mo));break}if(v.length===1)v[0]&&gp(v[0]);else{const b=[];for(const m of v)m&&b.push(...m);gp(d1(b))}}function gp(t,e){const r=Xe(t)?t:[...t];for(const n of r)n.computed&&am(n);for(const n of r)n.computed||am(n)}function am(t,e){(t!==Yn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const dw=s1("__proto__,__v_isRef,__isVue"),f3=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(l1)),hw=p1(),pw=p1(!1,!0),vw=p1(!0),om=mw();function mw(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=Mt(this);for(let i=0,u=this.length;i{t[e]=function(...r){$s();const n=Mt(this)[e].apply(this,r);return qs(),n}}),t}function p1(t=!1,e=!1){return function(n,s,i){if(s==="__v_isReactive")return!t;if(s==="__v_isReadonly")return t;if(s==="__v_isShallow")return e;if(s==="__v_raw"&&i===(t?e?kw:h3:e?d3:u3).get(n))return n;const u=Xe(n);if(!t&&u&&At(om,s))return Reflect.get(om,s,i);const v=Reflect.get(n,s,i);return(l1(s)?f3.has(s):dw(s))||(t||En(n,"get",s),e)?v:pr(v)?u&&u1(s)?v:v.value:nr(v)?t?p3(v):Ua(v):v}}const gw=c3(),bw=c3(!0);function c3(t=!1){return function(r,n,s,i){let u=r[n];if(Ss(u)&&pr(u)&&!pr(s))return!1;if(!t&&(!Vc(s)&&!Ss(s)&&(u=Mt(u),s=Mt(s)),!Xe(r)&&pr(u)&&!pr(s)))return u.value=s,!0;const v=Xe(r)&&u1(n)?Number(n)t,Cl=t=>Reflect.getPrototypeOf(t);function q0(t,e,r=!1,n=!1){t=t.__v_raw;const s=Mt(t),i=Mt(e);r||(e!==i&&En(s,"get",e),En(s,"get",i));const{has:u}=Cl(s),v=n?v1:r?b1:Gf;if(u.call(s,e))return v(t.get(e));if(u.call(s,i))return v(t.get(i));t!==s&&t.get(e)}function H0(t,e=!1){const r=this.__v_raw,n=Mt(r),s=Mt(t);return e||(t!==s&&En(n,"has",t),En(n,"has",s)),t===s?r.has(t):r.has(t)||r.has(s)}function z0(t,e=!1){return t=t.__v_raw,!e&&En(Mt(t),"iterate",mo),Reflect.get(t,"size",t)}function sm(t){t=Mt(t);const e=Mt(this);return Cl(e).has.call(e,t)||(e.add(t),ea(e,"add",t,t)),this}function fm(t,e){e=Mt(e);const r=Mt(this),{has:n,get:s}=Cl(r);let i=n.call(r,t);i||(t=Mt(t),i=n.call(r,t));const u=s.call(r,t);return r.set(t,e),i?zf(e,u)&&ea(r,"set",t,e):ea(r,"add",t,e),this}function cm(t){const e=Mt(this),{has:r,get:n}=Cl(e);let s=r.call(e,t);s||(t=Mt(t),s=r.call(e,t)),n&&n.call(e,t);const i=e.delete(t);return s&&ea(e,"delete",t,void 0),i}function lm(){const t=Mt(this),e=t.size!==0,r=t.clear();return e&&ea(t,"clear",void 0,void 0),r}function j0(t,e){return function(n,s){const i=this,u=i.__v_raw,v=Mt(u),b=e?v1:t?b1:Gf;return!t&&En(v,"iterate",mo),u.forEach((m,g)=>n.call(s,b(m),b(g),i))}}function G0(t,e,r){return function(...n){const s=this.__v_raw,i=Mt(s),u=ms(i),v=t==="entries"||t===Symbol.iterator&&u,b=t==="keys"&&u,m=s[t](...n),g=r?v1:e?b1:Gf;return!e&&En(i,"iterate",b?mp:mo),{next(){const{value:_,done:A}=m.next();return A?{value:_,done:A}:{value:v?[g(_[0]),g(_[1])]:g(_),done:A}},[Symbol.iterator](){return this}}}}function la(t){return function(...e){return t==="delete"?!1:this}}function Aw(){const t={get(i){return q0(this,i)},get size(){return z0(this)},has:H0,add:sm,set:fm,delete:cm,clear:lm,forEach:j0(!1,!1)},e={get(i){return q0(this,i,!1,!0)},get size(){return z0(this)},has:H0,add:sm,set:fm,delete:cm,clear:lm,forEach:j0(!1,!0)},r={get(i){return q0(this,i,!0)},get size(){return z0(this,!0)},has(i){return H0.call(this,i,!0)},add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear"),forEach:j0(!0,!1)},n={get(i){return q0(this,i,!0,!0)},get size(){return z0(this,!0)},has(i){return H0.call(this,i,!0)},add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear"),forEach:j0(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{t[i]=G0(i,!1,!1),r[i]=G0(i,!0,!1),e[i]=G0(i,!1,!0),n[i]=G0(i,!0,!0)}),[t,r,e,n]}const[Ew,Sw,Rw,Cw]=Aw();function m1(t,e){const r=e?t?Cw:Rw:t?Sw:Ew;return(n,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?n:Reflect.get(At(r,s)&&s in n?r:n,s,i)}const Bw={get:m1(!1,!1)},Nw={get:m1(!1,!0)},Tw={get:m1(!0,!1)},u3=new WeakMap,d3=new WeakMap,h3=new WeakMap,kw=new WeakMap;function Pw(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Iw(t){return t.__v_skip||!Object.isExtensible(t)?0:Pw(nw(t))}function Ua(t){return Ss(t)?t:g1(t,!1,l3,Bw,u3)}function Dw(t){return g1(t,!1,Mw,Nw,d3)}function p3(t){return g1(t,!0,_w,Tw,h3)}function g1(t,e,r,n,s){if(!nr(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=s.get(t);if(i)return i;const u=Iw(t);if(u===0)return t;const v=new Proxy(t,u===2?n:r);return s.set(t,v),v}function Na(t){return Ss(t)?Na(t.__v_raw):!!(t&&t.__v_isReactive)}function Ss(t){return!!(t&&t.__v_isReadonly)}function Vc(t){return!!(t&&t.__v_isShallow)}function v3(t){return Na(t)||Ss(t)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}function Pi(t){return Gc(t,"__v_skip",!0),t}const Gf=t=>nr(t)?Ua(t):t,b1=t=>nr(t)?p3(t):t;function m3(t){Ba&&Yn&&(t=Mt(t),s3(t.dep||(t.dep=d1())))}function g3(t,e){t=Mt(t),t.dep&&gp(t.dep)}function pr(t){return!!(t&&t.__v_isRef===!0)}function Qr(t){return b3(t,!1)}function Ow(t){return b3(t,!0)}function b3(t,e){return pr(t)?t:new Fw(t,e)}class Fw{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:Mt(e),this._value=r?e:Gf(e)}get value(){return m3(this),this._value}set value(e){const r=this.__v_isShallow||Vc(e)||Ss(e);e=r?e:Mt(e),zf(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:Gf(e),g3(this))}}function go(t){return pr(t)?t.value:t}const Lw={get:(t,e,r)=>go(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const s=t[e];return pr(s)&&!pr(r)?(s.value=r,!0):Reflect.set(t,e,r,n)}};function y3(t){return Na(t)?t:new Proxy(t,Lw)}function Uw(t){const e=Xe(t)?new Array(t.length):{};for(const r in t)e[r]=$w(t,r);return e}class Kw{constructor(e,r,n){this._object=e,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}}function $w(t,e,r){const n=t[e];return pr(n)?n:new Kw(t,e,r)}var x3;class qw{constructor(e,r,n,s){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this[x3]=!1,this._dirty=!0,this.effect=new h1(e,()=>{this._dirty||(this._dirty=!0,g3(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=Mt(this);return m3(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}x3="__v_isReadonly";function Hw(t,e,r=!1){let n,s;const i=st(t);return i?(n=t,s=ai):(n=t.get,s=t.set),new qw(n,s,i||!s,r)}function Ta(t,e,r,n){let s;try{s=n?t(...n):t()}catch(i){Bl(i,e,r)}return s}function Fn(t,e,r,n){if(st(t)){const i=Ta(t,e,r,n);return i&&e3(i)&&i.catch(u=>{Bl(u,e,r)}),i}const s=[];for(let i=0;i>>1;Wf(Wr[n])_i&&Wr.splice(e,1)}function Vw(t){Xe(t)?gs.push(...t):(!Gi||!Gi.includes(t,t.allowRecurse?ao+1:ao))&&gs.push(t),_3()}function um(t,e=Vf?_i+1:0){for(;eWf(r)-Wf(n)),ao=0;aot.id==null?1/0:t.id,Ww=(t,e)=>{const r=Wf(t)-Wf(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function A3(t){bp=!1,Vf=!0,Wr.sort(Ww);const e=ai;try{for(_i=0;_imr(E)?E.trim():E)),_&&(s=r.map(jf))}let v,b=n[v=Mc(e)]||n[v=Mc(ki(e))];!b&&i&&(b=n[v=Mc(Ks(e))]),b&&Fn(b,t,6,s);const m=n[v+"Once"];if(m){if(!t.emitted)t.emitted={};else if(t.emitted[v])return;t.emitted[v]=!0,Fn(m,t,6,s)}}function E3(t,e,r=!1){const n=e.emitsCache,s=n.get(t);if(s!==void 0)return s;const i=t.emits;let u={},v=!1;if(!st(t)){const b=m=>{const g=E3(m,e,!0);g&&(v=!0,Tr(u,g))};!r&&e.mixins.length&&e.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}return!i&&!v?(nr(t)&&n.set(t,null),null):(Xe(i)?i.forEach(b=>u[b]=null):Tr(u,i),nr(t)&&n.set(t,u),u)}function Nl(t,e){return!t||!Al(e)?!1:(e=e.slice(2).replace(/Once$/,""),At(t,e[0].toLowerCase()+e.slice(1))||At(t,Ks(e))||At(t,e))}let Ur=null,Tl=null;function Wc(t){const e=Ur;return Ur=t,Tl=t&&t.type.__scopeId||null,e}function w1(t){Tl=t}function _1(){Tl=null}function ta(t,e=Ur,r){if(!e||t._n)return t;const n=(...s)=>{n._d&&_m(-1);const i=Wc(e);let u;try{u=t(...s)}finally{Wc(i),n._d&&_m(1)}return u};return n._n=!0,n._c=!0,n._d=!0,n}function qu(t){const{type:e,vnode:r,proxy:n,withProxy:s,props:i,propsOptions:[u],slots:v,attrs:b,emit:m,render:g,renderCache:_,data:A,setupState:E,ctx:R,inheritAttrs:B}=t;let T,F;const O=Wc(t);try{if(r.shapeFlag&4){const H=s||n;T=yi(g.call(H,H,_,i,E,A,R)),F=b}else{const H=e;T=yi(H.length>1?H(i,{attrs:b,slots:v,emit:m}):H(i,null)),F=e.props?b:Jw(b)}}catch(H){If.length=0,Bl(H,t,1),T=Wt(Ln)}let q=T;if(F&&B!==!1){const H=Object.keys(F),{shapeFlag:G}=q;H.length&&G&7&&(u&&H.some(f1)&&(F=Xw(F,u)),q=Ia(q,F))}return r.dirs&&(q=Ia(q),q.dirs=q.dirs?q.dirs.concat(r.dirs):r.dirs),r.transition&&(q.transition=r.transition),T=q,Wc(O),T}const Jw=t=>{let e;for(const r in t)(r==="class"||r==="style"||Al(r))&&((e||(e={}))[r]=t[r]);return e},Xw=(t,e)=>{const r={};for(const n in t)(!f1(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function Yw(t,e,r){const{props:n,children:s,component:i}=t,{props:u,children:v,patchFlag:b}=e,m=i.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&b>=0){if(b&1024)return!0;if(b&16)return n?dm(n,u,m):!!u;if(b&8){const g=e.dynamicProps;for(let _=0;_t.__isSuspense;function t9(t,e){e&&e.pendingBranch?Xe(t)?e.effects.push(...t):e.effects.push(t):Vw(t)}function Ec(t,e){if(Br){let r=Br.provides;const n=Br.parent&&Br.parent.provides;n===r&&(r=Br.provides=Object.create(n)),r[t]=e}}function _n(t,e,r=!1){const n=Br||Ur;if(n){const s=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(s&&t in s)return s[t];if(arguments.length>1)return r&&st(e)?e.call(n.proxy):e}}const V0={};function bs(t,e,r){return S3(t,e,r)}function S3(t,e,{immediate:r,deep:n,flush:s,onTrack:i,onTrigger:u}=er){const v=Br;let b,m=!1,g=!1;if(pr(t)?(b=()=>t.value,m=Vc(t)):Na(t)?(b=()=>t,n=!0):Xe(t)?(g=!0,m=t.some(q=>Na(q)||Vc(q)),b=()=>t.map(q=>{if(pr(q))return q.value;if(Na(q))return ho(q);if(st(q))return Ta(q,v,2)})):st(t)?e?b=()=>Ta(t,v,2):b=()=>{if(!(v&&v.isUnmounted))return _&&_(),Fn(t,v,3,[A])}:b=ai,e&&n){const q=b;b=()=>ho(q())}let _,A=q=>{_=F.onStop=()=>{Ta(q,v,4)}},E;if(Yf)if(A=ai,e?r&&Fn(e,v,3,[b(),g?[]:void 0,A]):b(),s==="sync"){const q=J9();E=q.__watcherHandles||(q.__watcherHandles=[])}else return ai;let R=g?new Array(t.length).fill(V0):V0;const B=()=>{if(!!F.active)if(e){const q=F.run();(n||m||(g?q.some((H,G)=>zf(H,R[G])):zf(q,R)))&&(_&&_(),Fn(e,v,3,[q,R===V0?void 0:g&&R[0]===V0?[]:R,A]),R=q)}else F.run()};B.allowRecurse=!!e;let T;s==="sync"?T=B:s==="post"?T=()=>un(B,v&&v.suspense):(B.pre=!0,v&&(B.id=v.uid),T=()=>x1(B));const F=new h1(b,T);e?r?B():R=F.run():s==="post"?un(F.run.bind(F),v&&v.suspense):F.run();const O=()=>{F.stop(),v&&v.scope&&c1(v.scope.effects,F)};return E&&E.push(O),O}function r9(t,e,r){const n=this.proxy,s=mr(t)?t.includes(".")?R3(n,t):()=>n[t]:t.bind(n,n);let i;st(e)?i=e:(i=e.handler,r=e);const u=Br;Cs(this);const v=S3(s,i.bind(n),r);return u?Cs(u):bo(),v}function R3(t,e){const r=e.split(".");return()=>{let n=t;for(let s=0;s{ho(r,e)});else if(Nf(t))for(const r in t)ho(t[r],e);return t}function C3(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return A1(()=>{t.isMounted=!0}),P3(()=>{t.isUnmounting=!0}),t}const Bn=[Function,Array],n9={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Bn,onEnter:Bn,onAfterEnter:Bn,onEnterCancelled:Bn,onBeforeLeave:Bn,onLeave:Bn,onAfterLeave:Bn,onLeaveCancelled:Bn,onBeforeAppear:Bn,onAppear:Bn,onAfterAppear:Bn,onAppearCancelled:Bn},setup(t,{slots:e}){const r=Fl(),n=C3();let s;return()=>{const i=e.default&&M1(e.default(),!0);if(!i||!i.length)return;let u=i[0];if(i.length>1){for(const B of i)if(B.type!==Ln){u=B;break}}const v=Mt(t),{mode:b}=v;if(n.isLeaving)return Hu(u);const m=hm(u);if(!m)return Hu(u);const g=Zf(m,v,n,r);Jf(m,g);const _=r.subTree,A=_&&hm(_);let E=!1;const{getTransitionKey:R}=m.type;if(R){const B=R();s===void 0?s=B:B!==s&&(s=B,E=!0)}if(A&&A.type!==Ln&&(!oo(m,A)||E)){const B=Zf(A,v,n,r);if(Jf(A,B),b==="out-in")return n.isLeaving=!0,B.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},Hu(u);b==="in-out"&&m.type!==Ln&&(B.delayLeave=(T,F,O)=>{const q=N3(n,A);q[String(A.key)]=A,T._leaveCb=()=>{F(),T._leaveCb=void 0,delete g.delayedLeave},g.delayedLeave=O})}return u}}},B3=n9;function N3(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function Zf(t,e,r,n){const{appear:s,mode:i,persisted:u=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:m,onEnterCancelled:g,onBeforeLeave:_,onLeave:A,onAfterLeave:E,onLeaveCancelled:R,onBeforeAppear:B,onAppear:T,onAfterAppear:F,onAppearCancelled:O}=e,q=String(t.key),H=N3(r,t),G=(Y,W)=>{Y&&Fn(Y,n,9,W)},re=(Y,W)=>{const se=W[1];G(Y,W),Xe(Y)?Y.every(y=>y.length<=1)&&se():Y.length<=1&&se()},ne={mode:i,persisted:u,beforeEnter(Y){let W=v;if(!r.isMounted)if(s)W=B||v;else return;Y._leaveCb&&Y._leaveCb(!0);const se=H[q];se&&oo(t,se)&&se.el._leaveCb&&se.el._leaveCb(),G(W,[Y])},enter(Y){let W=b,se=m,y=g;if(!r.isMounted)if(s)W=T||b,se=F||m,y=O||g;else return;let a=!1;const f=Y._enterCb=c=>{a||(a=!0,c?G(y,[Y]):G(se,[Y]),ne.delayedLeave&&ne.delayedLeave(),Y._enterCb=void 0)};W?re(W,[Y,f]):f()},leave(Y,W){const se=String(t.key);if(Y._enterCb&&Y._enterCb(!0),r.isUnmounting)return W();G(_,[Y]);let y=!1;const a=Y._leaveCb=f=>{y||(y=!0,W(),f?G(R,[Y]):G(E,[Y]),Y._leaveCb=void 0,H[se]===t&&delete H[se])};H[se]=t,A?re(A,[Y,a]):a()},clone(Y){return Zf(Y,e,r,n)}};return ne}function Hu(t){if(kl(t))return t=Ia(t),t.children=null,t}function hm(t){return kl(t)?t.children?t.children[0]:void 0:t}function Jf(t,e){t.shapeFlag&6&&t.component?Jf(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function M1(t,e=!1,r){let n=[],s=0;for(let i=0;i1)for(let i=0;i!!t.type.__asyncLoader,kl=t=>t.type.__isKeepAlive;function i9(t,e){T3(t,"a",e)}function a9(t,e){T3(t,"da",e)}function T3(t,e,r=Br){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Pl(e,n,r),r){let s=r.parent;for(;s&&s.parent;)kl(s.parent.vnode)&&o9(n,e,r,s),s=s.parent}}function o9(t,e,r,n){const s=Pl(e,t,n,!0);I3(()=>{c1(n[e],s)},r)}function Pl(t,e,r=Br,n=!1){if(r){const s=r[t]||(r[t]=[]),i=e.__weh||(e.__weh=(...u)=>{if(r.isUnmounted)return;$s(),Cs(r);const v=Fn(e,r,t,u);return bo(),qs(),v});return n?s.unshift(i):s.push(i),i}}const fa=t=>(e,r=Br)=>(!Yf||t==="sp")&&Pl(t,(...n)=>e(...n),r),s9=fa("bm"),A1=fa("m"),f9=fa("bu"),k3=fa("u"),P3=fa("bum"),I3=fa("um"),c9=fa("sp"),l9=fa("rtg"),u9=fa("rtc");function d9(t,e=Br){Pl("ec",t,e)}function ss(t,e){const r=Ur;if(r===null)return t;const n=Ll(r)||r.proxy,s=t.dirs||(t.dirs=[]);for(let i=0;ie(u,v,void 0,i&&i[v]));else{const u=Object.keys(t);s=new Array(u.length);for(let v=0,b=u.length;vXc(e)?!(e.type===Ln||e.type===tr&&!O3(e.children)):!0)?t:null}function v9(t,e){const r={};for(const n in t)r[e&&/[A-Z]/.test(n)?`on:${n}`:Mc(n)]=t[n];return r}const yp=t=>t?V3(t)?Ll(t)||t.proxy:yp(t.parent):null,kf=Tr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>yp(t.parent),$root:t=>yp(t.root),$emit:t=>t.emit,$options:t=>C1(t),$forceUpdate:t=>t.f||(t.f=()=>x1(t.update)),$nextTick:t=>t.n||(t.n=Rs.bind(t.proxy)),$watch:t=>r9.bind(t)}),zu=(t,e)=>t!==er&&!t.__isScriptSetup&&At(t,e),m9={get({_:t},e){const{ctx:r,setupState:n,data:s,props:i,accessCache:u,type:v,appContext:b}=t;let m;if(e[0]!=="$"){const E=u[e];if(E!==void 0)switch(E){case 1:return n[e];case 2:return s[e];case 4:return r[e];case 3:return i[e]}else{if(zu(n,e))return u[e]=1,n[e];if(s!==er&&At(s,e))return u[e]=2,s[e];if((m=t.propsOptions[0])&&At(m,e))return u[e]=3,i[e];if(r!==er&&At(r,e))return u[e]=4,r[e];xp&&(u[e]=0)}}const g=kf[e];let _,A;if(g)return e==="$attrs"&&En(t,"get",e),g(t);if((_=v.__cssModules)&&(_=_[e]))return _;if(r!==er&&At(r,e))return u[e]=4,r[e];if(A=b.config.globalProperties,At(A,e))return A[e]},set({_:t},e,r){const{data:n,setupState:s,ctx:i}=t;return zu(s,e)?(s[e]=r,!0):n!==er&&At(n,e)?(n[e]=r,!0):At(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:s,propsOptions:i}},u){let v;return!!r[u]||t!==er&&At(t,u)||zu(e,u)||(v=i[0])&&At(v,u)||At(n,u)||At(kf,u)||At(s.config.globalProperties,u)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:At(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};let xp=!0;function g9(t){const e=C1(t),r=t.proxy,n=t.ctx;xp=!1,e.beforeCreate&&vm(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:u,watch:v,provide:b,inject:m,created:g,beforeMount:_,mounted:A,beforeUpdate:E,updated:R,activated:B,deactivated:T,beforeDestroy:F,beforeUnmount:O,destroyed:q,unmounted:H,render:G,renderTracked:re,renderTriggered:ne,errorCaptured:Y,serverPrefetch:W,expose:se,inheritAttrs:y,components:a,directives:f,filters:c}=e;if(m&&b9(m,n,null,t.appContext.config.unwrapInjectedRef),u)for(const x in u){const w=u[x];st(w)&&(n[x]=w.bind(r))}if(s){const x=s.call(r,r);nr(x)&&(t.data=Ua(x))}if(xp=!0,i)for(const x in i){const w=i[x],p=st(w)?w.bind(r,r):st(w.get)?w.get.bind(r,r):ai,o=!st(w)&&st(w.set)?w.set.bind(r):ai,d=nn({get:p,set:o});Object.defineProperty(n,x,{enumerable:!0,configurable:!0,get:()=>d.value,set:M=>d.value=M})}if(v)for(const x in v)F3(v[x],n,r,x);if(b){const x=st(b)?b.call(r):b;Reflect.ownKeys(x).forEach(w=>{Ec(w,x[w])})}g&&vm(g,t,"c");function h(x,w){Xe(w)?w.forEach(p=>x(p.bind(r))):w&&x(w.bind(r))}if(h(s9,_),h(A1,A),h(f9,E),h(k3,R),h(i9,B),h(a9,T),h(d9,Y),h(u9,re),h(l9,ne),h(P3,O),h(I3,H),h(c9,W),Xe(se))if(se.length){const x=t.exposed||(t.exposed={});se.forEach(w=>{Object.defineProperty(x,w,{get:()=>r[w],set:p=>r[w]=p})})}else t.exposed||(t.exposed={});G&&t.render===ai&&(t.render=G),y!=null&&(t.inheritAttrs=y),a&&(t.components=a),f&&(t.directives=f)}function b9(t,e,r=ai,n=!1){Xe(t)&&(t=wp(t));for(const s in t){const i=t[s];let u;nr(i)?"default"in i?u=_n(i.from||s,i.default,!0):u=_n(i.from||s):u=_n(i),pr(u)&&n?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>u.value,set:v=>u.value=v}):e[s]=u}}function vm(t,e,r){Fn(Xe(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function F3(t,e,r,n){const s=n.includes(".")?R3(r,n):()=>r[n];if(mr(t)){const i=e[t];st(i)&&bs(s,i)}else if(st(t))bs(s,t.bind(r));else if(nr(t))if(Xe(t))t.forEach(i=>F3(i,e,r,n));else{const i=st(t.handler)?t.handler.bind(r):e[t.handler];st(i)&&bs(s,i,t)}}function C1(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:u}}=t.appContext,v=i.get(e);let b;return v?b=v:!s.length&&!r&&!n?b=e:(b={},s.length&&s.forEach(m=>Jc(b,m,u,!0)),Jc(b,e,u)),nr(e)&&i.set(e,b),b}function Jc(t,e,r,n=!1){const{mixins:s,extends:i}=e;i&&Jc(t,i,r,!0),s&&s.forEach(u=>Jc(t,u,r,!0));for(const u in e)if(!(n&&u==="expose")){const v=y9[u]||r&&r[u];t[u]=v?v(t[u],e[u]):e[u]}return t}const y9={data:mm,props:no,emits:no,methods:no,computed:no,beforeCreate:tn,created:tn,beforeMount:tn,mounted:tn,beforeUpdate:tn,updated:tn,beforeDestroy:tn,beforeUnmount:tn,destroyed:tn,unmounted:tn,activated:tn,deactivated:tn,errorCaptured:tn,serverPrefetch:tn,components:no,directives:no,watch:w9,provide:mm,inject:x9};function mm(t,e){return e?t?function(){return Tr(st(t)?t.call(this,this):t,st(e)?e.call(this,this):e)}:e:t}function x9(t,e){return no(wp(t),wp(e))}function wp(t){if(Xe(t)){const e={};for(let r=0;r0)&&!(u&16)){if(u&8){const g=t.vnode.dynamicProps;for(let _=0;_{b=!0;const[A,E]=U3(_,e,!0);Tr(u,A),E&&v.push(...E)};!r&&e.mixins.length&&e.mixins.forEach(g),t.extends&&g(t.extends),t.mixins&&t.mixins.forEach(g)}if(!i&&!b)return nr(t)&&n.set(t,vs),vs;if(Xe(i))for(let g=0;g-1,E[1]=B<0||R-1||At(E,"default"))&&v.push(_)}}}const m=[u,v];return nr(t)&&n.set(t,m),m}function gm(t){return t[0]!=="$"}function bm(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:t===null?"null":""}function ym(t,e){return bm(t)===bm(e)}function xm(t,e){return Xe(e)?e.findIndex(r=>ym(r,t)):st(e)&&ym(e,t)?0:-1}const K3=t=>t[0]==="_"||t==="$stable",B1=t=>Xe(t)?t.map(yi):[yi(t)],A9=(t,e,r)=>{if(e._n)return e;const n=ta((...s)=>B1(e(...s)),r);return n._c=!1,n},$3=(t,e,r)=>{const n=t._ctx;for(const s in t){if(K3(s))continue;const i=t[s];if(st(i))e[s]=A9(s,i,n);else if(i!=null){const u=B1(i);e[s]=()=>u}}},q3=(t,e)=>{const r=B1(e);t.slots.default=()=>r},E9=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=Mt(e),Gc(e,"_",r)):$3(e,t.slots={})}else t.slots={},e&&q3(t,e);Gc(t.slots,Dl,1)},S9=(t,e,r)=>{const{vnode:n,slots:s}=t;let i=!0,u=er;if(n.shapeFlag&32){const v=e._;v?r&&v===1?i=!1:(Tr(s,e),!r&&v===1&&delete s._):(i=!e.$stable,$3(e,s)),u=e}else e&&(q3(t,e),u={default:1});if(i)for(const v in s)!K3(v)&&!(v in u)&&delete s[v]};function H3(){return{app:null,config:{isNativeTag:ew,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let R9=0;function C9(t,e){return function(n,s=null){st(n)||(n=Object.assign({},n)),s!=null&&!nr(s)&&(s=null);const i=H3(),u=new Set;let v=!1;const b=i.app={_uid:R9++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:X9,get config(){return i.config},set config(m){},use(m,...g){return u.has(m)||(m&&st(m.install)?(u.add(m),m.install(b,...g)):st(m)&&(u.add(m),m(b,...g))),b},mixin(m){return i.mixins.includes(m)||i.mixins.push(m),b},component(m,g){return g?(i.components[m]=g,b):i.components[m]},directive(m,g){return g?(i.directives[m]=g,b):i.directives[m]},mount(m,g,_){if(!v){const A=Wt(n,s);return A.appContext=i,g&&e?e(A,m):t(A,m,_),v=!0,b._container=m,m.__vue_app__=b,Ll(A.component)||A.component.proxy}},unmount(){v&&(t(null,b._container),delete b._container.__vue_app__)},provide(m,g){return i.provides[m]=g,b}};return b}}function Mp(t,e,r,n,s=!1){if(Xe(t)){t.forEach((A,E)=>Mp(A,e&&(Xe(e)?e[E]:e),r,n,s));return}if(Tf(n)&&!s)return;const i=n.shapeFlag&4?Ll(n.component)||n.component.proxy:n.el,u=s?null:i,{i:v,r:b}=t,m=e&&e.r,g=v.refs===er?v.refs={}:v.refs,_=v.setupState;if(m!=null&&m!==b&&(mr(m)?(g[m]=null,At(_,m)&&(_[m]=null)):pr(m)&&(m.value=null)),st(b))Ta(b,v,12,[u,g]);else{const A=mr(b),E=pr(b);if(A||E){const R=()=>{if(t.f){const B=A?At(_,b)?_[b]:g[b]:b.value;s?Xe(B)&&c1(B,i):Xe(B)?B.includes(i)||B.push(i):A?(g[b]=[i],At(_,b)&&(_[b]=g[b])):(b.value=[i],t.k&&(g[t.k]=b.value))}else A?(g[b]=u,At(_,b)&&(_[b]=u)):E&&(b.value=u,t.k&&(g[t.k]=u))};u?(R.id=-1,un(R,r)):R()}}}const un=t9;function B9(t){return N9(t)}function N9(t,e){const r=ow();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:u,createText:v,createComment:b,setText:m,setElementText:g,parentNode:_,nextSibling:A,setScopeId:E=ai,insertStaticContent:R}=t,B=(N,$,ee,J=null,K=null,D=null,k=!1,L=null,te=!!$.dynamicChildren)=>{if(N===$)return;N&&!oo(N,$)&&(J=U(N),M(N,K,D,!0),N=null),$.patchFlag===-2&&(te=!1,$.dynamicChildren=null);const{type:Z,ref:Q,shapeFlag:Ie}=$;switch(Z){case Il:T(N,$,ee,J);break;case Ln:F(N,$,ee,J);break;case Sc:N==null&&O($,ee,J,k);break;case tr:a(N,$,ee,J,K,D,k,L,te);break;default:Ie&1?G(N,$,ee,J,K,D,k,L,te):Ie&6?f(N,$,ee,J,K,D,k,L,te):(Ie&64||Ie&128)&&Z.process(N,$,ee,J,K,D,k,L,te,z)}Q!=null&&K&&Mp(Q,N&&N.ref,D,$||N,!$)},T=(N,$,ee,J)=>{if(N==null)n($.el=v($.children),ee,J);else{const K=$.el=N.el;$.children!==N.children&&m(K,$.children)}},F=(N,$,ee,J)=>{N==null?n($.el=b($.children||""),ee,J):$.el=N.el},O=(N,$,ee,J)=>{[N.el,N.anchor]=R(N.children,$,ee,J,N.el,N.anchor)},q=({el:N,anchor:$},ee,J)=>{let K;for(;N&&N!==$;)K=A(N),n(N,ee,J),N=K;n($,ee,J)},H=({el:N,anchor:$})=>{let ee;for(;N&&N!==$;)ee=A(N),s(N),N=ee;s($)},G=(N,$,ee,J,K,D,k,L,te)=>{k=k||$.type==="svg",N==null?re($,ee,J,K,D,k,L,te):W(N,$,K,D,k,L,te)},re=(N,$,ee,J,K,D,k,L)=>{let te,Z;const{type:Q,props:Ie,shapeFlag:ie,transition:oe,dirs:Oe}=N;if(te=N.el=u(N.type,D,Ie&&Ie.is,Ie),ie&8?g(te,N.children):ie&16&&Y(N.children,te,null,J,K,D&&Q!=="foreignObject",k,L),Oe&&Wa(N,null,J,"created"),Ie){for(const fe in Ie)fe!=="value"&&!_c(fe)&&i(te,fe,null,Ie[fe],D,N.children,J,K,I);"value"in Ie&&i(te,"value",null,Ie.value),(Z=Ie.onVnodeBeforeMount)&&ui(Z,J,N)}ne(te,N,N.scopeId,k,J),Oe&&Wa(N,null,J,"beforeMount");const ae=(!K||K&&!K.pendingBranch)&&oe&&!oe.persisted;ae&&oe.beforeEnter(te),n(te,$,ee),((Z=Ie&&Ie.onVnodeMounted)||ae||Oe)&&un(()=>{Z&&ui(Z,J,N),ae&&oe.enter(te),Oe&&Wa(N,null,J,"mounted")},K)},ne=(N,$,ee,J,K)=>{if(ee&&E(N,ee),J)for(let D=0;D{for(let Z=te;Z{const L=$.el=N.el;let{patchFlag:te,dynamicChildren:Z,dirs:Q}=$;te|=N.patchFlag&16;const Ie=N.props||er,ie=$.props||er;let oe;ee&&Za(ee,!1),(oe=ie.onVnodeBeforeUpdate)&&ui(oe,ee,$,N),Q&&Wa($,N,ee,"beforeUpdate"),ee&&Za(ee,!0);const Oe=K&&$.type!=="foreignObject";if(Z?se(N.dynamicChildren,Z,L,ee,J,Oe,D):k||w(N,$,L,null,ee,J,Oe,D,!1),te>0){if(te&16)y(L,$,Ie,ie,ee,J,K);else if(te&2&&Ie.class!==ie.class&&i(L,"class",null,ie.class,K),te&4&&i(L,"style",Ie.style,ie.style,K),te&8){const ae=$.dynamicProps;for(let fe=0;fe{oe&&ui(oe,ee,$,N),Q&&Wa($,N,ee,"updated")},J)},se=(N,$,ee,J,K,D,k)=>{for(let L=0;L<$.length;L++){const te=N[L],Z=$[L],Q=te.el&&(te.type===tr||!oo(te,Z)||te.shapeFlag&70)?_(te.el):ee;B(te,Z,Q,null,J,K,D,k,!0)}},y=(N,$,ee,J,K,D,k)=>{if(ee!==J){if(ee!==er)for(const L in ee)!_c(L)&&!(L in J)&&i(N,L,ee[L],null,k,$.children,K,D,I);for(const L in J){if(_c(L))continue;const te=J[L],Z=ee[L];te!==Z&&L!=="value"&&i(N,L,Z,te,k,$.children,K,D,I)}"value"in J&&i(N,"value",ee.value,J.value)}},a=(N,$,ee,J,K,D,k,L,te)=>{const Z=$.el=N?N.el:v(""),Q=$.anchor=N?N.anchor:v("");let{patchFlag:Ie,dynamicChildren:ie,slotScopeIds:oe}=$;oe&&(L=L?L.concat(oe):oe),N==null?(n(Z,ee,J),n(Q,ee,J),Y($.children,ee,Q,K,D,k,L,te)):Ie>0&&Ie&64&&ie&&N.dynamicChildren?(se(N.dynamicChildren,ie,ee,K,D,k,L),($.key!=null||K&&$===K.subTree)&&N1(N,$,!0)):w(N,$,ee,Q,K,D,k,L,te)},f=(N,$,ee,J,K,D,k,L,te)=>{$.slotScopeIds=L,N==null?$.shapeFlag&512?K.ctx.activate($,ee,J,k,te):c($,ee,J,K,D,k,te):l(N,$,te)},c=(N,$,ee,J,K,D,k)=>{const L=N.component=q9(N,J,K);if(kl(N)&&(L.ctx.renderer=z),H9(L),L.asyncDep){if(K&&K.registerDep(L,h),!N.el){const te=L.subTree=Wt(Ln);F(null,te,$,ee)}return}h(L,N,$,ee,K,D,k)},l=(N,$,ee)=>{const J=$.component=N.component;if(Yw(N,$,ee))if(J.asyncDep&&!J.asyncResolved){x(J,$,ee);return}else J.next=$,Gw(J.update),J.update();else $.el=N.el,J.vnode=$},h=(N,$,ee,J,K,D,k)=>{const L=()=>{if(N.isMounted){let{next:Q,bu:Ie,u:ie,parent:oe,vnode:Oe}=N,ae=Q,fe;Za(N,!1),Q?(Q.el=Oe.el,x(N,Q,k)):Q=Oe,Ie&&Ac(Ie),(fe=Q.props&&Q.props.onVnodeBeforeUpdate)&&ui(fe,oe,Q,Oe),Za(N,!0);const Ke=qu(N),le=N.subTree;N.subTree=Ke,B(le,Ke,_(le.el),U(le),N,K,D),Q.el=Ke.el,ae===null&&Qw(N,Ke.el),ie&&un(ie,K),(fe=Q.props&&Q.props.onVnodeUpdated)&&un(()=>ui(fe,oe,Q,Oe),K)}else{let Q;const{el:Ie,props:ie}=$,{bm:oe,m:Oe,parent:ae}=N,fe=Tf($);if(Za(N,!1),oe&&Ac(oe),!fe&&(Q=ie&&ie.onVnodeBeforeMount)&&ui(Q,ae,$),Za(N,!0),Ie&&j){const Ke=()=>{N.subTree=qu(N),j(Ie,N.subTree,N,K,null)};fe?$.type.__asyncLoader().then(()=>!N.isUnmounted&&Ke()):Ke()}else{const Ke=N.subTree=qu(N);B(null,Ke,ee,J,N,K,D),$.el=Ke.el}if(Oe&&un(Oe,K),!fe&&(Q=ie&&ie.onVnodeMounted)){const Ke=$;un(()=>ui(Q,ae,Ke),K)}($.shapeFlag&256||ae&&Tf(ae.vnode)&&ae.vnode.shapeFlag&256)&&N.a&&un(N.a,K),N.isMounted=!0,$=ee=J=null}},te=N.effect=new h1(L,()=>x1(Z),N.scope),Z=N.update=()=>te.run();Z.id=N.uid,Za(N,!0),Z()},x=(N,$,ee)=>{$.component=N;const J=N.vnode.props;N.vnode=$,N.next=null,M9(N,$.props,J,ee),S9(N,$.children,ee),$s(),um(),qs()},w=(N,$,ee,J,K,D,k,L,te=!1)=>{const Z=N&&N.children,Q=N?N.shapeFlag:0,Ie=$.children,{patchFlag:ie,shapeFlag:oe}=$;if(ie>0){if(ie&128){o(Z,Ie,ee,J,K,D,k,L,te);return}else if(ie&256){p(Z,Ie,ee,J,K,D,k,L,te);return}}oe&8?(Q&16&&I(Z,K,D),Ie!==Z&&g(ee,Ie)):Q&16?oe&16?o(Z,Ie,ee,J,K,D,k,L,te):I(Z,K,D,!0):(Q&8&&g(ee,""),oe&16&&Y(Ie,ee,J,K,D,k,L,te))},p=(N,$,ee,J,K,D,k,L,te)=>{N=N||vs,$=$||vs;const Z=N.length,Q=$.length,Ie=Math.min(Z,Q);let ie;for(ie=0;ieQ?I(N,K,D,!0,!1,Ie):Y($,ee,J,K,D,k,L,te,Ie)},o=(N,$,ee,J,K,D,k,L,te)=>{let Z=0;const Q=$.length;let Ie=N.length-1,ie=Q-1;for(;Z<=Ie&&Z<=ie;){const oe=N[Z],Oe=$[Z]=te?_a($[Z]):yi($[Z]);if(oo(oe,Oe))B(oe,Oe,ee,null,K,D,k,L,te);else break;Z++}for(;Z<=Ie&&Z<=ie;){const oe=N[Ie],Oe=$[ie]=te?_a($[ie]):yi($[ie]);if(oo(oe,Oe))B(oe,Oe,ee,null,K,D,k,L,te);else break;Ie--,ie--}if(Z>Ie){if(Z<=ie){const oe=ie+1,Oe=oeie)for(;Z<=Ie;)M(N[Z],K,D,!0),Z++;else{const oe=Z,Oe=Z,ae=new Map;for(Z=Oe;Z<=ie;Z++){const ze=$[Z]=te?_a($[Z]):yi($[Z]);ze.key!=null&&ae.set(ze.key,Z)}let fe,Ke=0;const le=ie-Oe+1;let Me=!1,Ze=0;const pe=new Array(le);for(Z=0;Z=le){M(ze,K,D,!0);continue}let he;if(ze.key!=null)he=ae.get(ze.key);else for(fe=Oe;fe<=ie;fe++)if(pe[fe-Oe]===0&&oo(ze,$[fe])){he=fe;break}he===void 0?M(ze,K,D,!0):(pe[he-Oe]=Z+1,he>=Ze?Ze=he:Me=!0,B(ze,$[he],ee,null,K,D,k,L,te),Ke++)}const Ae=Me?T9(pe):vs;for(fe=Ae.length-1,Z=le-1;Z>=0;Z--){const ze=Oe+Z,he=$[ze],Ee=ze+1{const{el:D,type:k,transition:L,children:te,shapeFlag:Z}=N;if(Z&6){d(N.component.subTree,$,ee,J);return}if(Z&128){N.suspense.move($,ee,J);return}if(Z&64){k.move(N,$,ee,z);return}if(k===tr){n(D,$,ee);for(let Ie=0;IeL.enter(D),K);else{const{leave:Ie,delayLeave:ie,afterLeave:oe}=L,Oe=()=>n(D,$,ee),ae=()=>{Ie(D,()=>{Oe(),oe&&oe()})};ie?ie(D,Oe,ae):ae()}else n(D,$,ee)},M=(N,$,ee,J=!1,K=!1)=>{const{type:D,props:k,ref:L,children:te,dynamicChildren:Z,shapeFlag:Q,patchFlag:Ie,dirs:ie}=N;if(L!=null&&Mp(L,null,ee,N,!0),Q&256){$.ctx.deactivate(N);return}const oe=Q&1&&ie,Oe=!Tf(N);let ae;if(Oe&&(ae=k&&k.onVnodeBeforeUnmount)&&ui(ae,$,N),Q&6)S(N.component,ee,J);else{if(Q&128){N.suspense.unmount(ee,J);return}oe&&Wa(N,null,$,"beforeUnmount"),Q&64?N.type.remove(N,$,ee,K,z,J):Z&&(D!==tr||Ie>0&&Ie&64)?I(Z,$,ee,!1,!0):(D===tr&&Ie&384||!K&&Q&16)&&I(te,$,ee),J&&C(N)}(Oe&&(ae=k&&k.onVnodeUnmounted)||oe)&&un(()=>{ae&&ui(ae,$,N),oe&&Wa(N,null,$,"unmounted")},ee)},C=N=>{const{type:$,el:ee,anchor:J,transition:K}=N;if($===tr){P(ee,J);return}if($===Sc){H(N);return}const D=()=>{s(ee),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(N.shapeFlag&1&&K&&!K.persisted){const{leave:k,delayLeave:L}=K,te=()=>k(ee,D);L?L(N.el,D,te):te()}else D()},P=(N,$)=>{let ee;for(;N!==$;)ee=A(N),s(N),N=ee;s($)},S=(N,$,ee)=>{const{bum:J,scope:K,update:D,subTree:k,um:L}=N;J&&Ac(J),K.stop(),D&&(D.active=!1,M(k,N,$,ee)),L&&un(L,$),un(()=>{N.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},I=(N,$,ee,J=!1,K=!1,D=0)=>{for(let k=D;kN.shapeFlag&6?U(N.component.subTree):N.shapeFlag&128?N.suspense.next():A(N.anchor||N.el),V=(N,$,ee)=>{N==null?$._vnode&&M($._vnode,null,null,!0):B($._vnode||null,N,$,null,null,null,ee),um(),M3(),$._vnode=N},z={p:B,um:M,m:d,r:C,mt:c,mc:Y,pc:w,pbc:se,n:U,o:t};let X,j;return e&&([X,j]=e(z)),{render:V,hydrate:X,createApp:C9(V,X)}}function Za({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function N1(t,e,r=!1){const n=t.children,s=e.children;if(Xe(n)&&Xe(s))for(let i=0;i>1,t[r[v]]0&&(e[n]=r[i-1]),r[i]=n)}}for(i=r.length,u=r[i-1];i-- >0;)r[i]=u,u=e[u];return r}const k9=t=>t.__isTeleport,Pf=t=>t&&(t.disabled||t.disabled===""),wm=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Ap=(t,e)=>{const r=t&&t.to;return mr(r)?e?e(r):null:r},P9={__isTeleport:!0,process(t,e,r,n,s,i,u,v,b,m){const{mc:g,pc:_,pbc:A,o:{insert:E,querySelector:R,createText:B,createComment:T}}=m,F=Pf(e.props);let{shapeFlag:O,children:q,dynamicChildren:H}=e;if(t==null){const G=e.el=B(""),re=e.anchor=B("");E(G,r,n),E(re,r,n);const ne=e.target=Ap(e.props,R),Y=e.targetAnchor=B("");ne&&(E(Y,ne),u=u||wm(ne));const W=(se,y)=>{O&16&&g(q,se,y,s,i,u,v,b)};F?W(r,re):ne&&W(ne,Y)}else{e.el=t.el;const G=e.anchor=t.anchor,re=e.target=t.target,ne=e.targetAnchor=t.targetAnchor,Y=Pf(t.props),W=Y?r:re,se=Y?G:ne;if(u=u||wm(re),H?(A(t.dynamicChildren,H,W,s,i,u,v),N1(t,e,!0)):b||_(t,e,W,se,s,i,u,v,!1),F)Y||W0(e,r,G,m,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const y=e.target=Ap(e.props,R);y&&W0(e,y,null,m,0)}else Y&&W0(e,re,ne,m,1)}z3(e)},remove(t,e,r,n,{um:s,o:{remove:i}},u){const{shapeFlag:v,children:b,anchor:m,targetAnchor:g,target:_,props:A}=t;if(_&&i(g),(u||!Pf(A))&&(i(m),v&16))for(let E=0;E0?ti||vs:null,O9(),Xf>0&&ti&&ti.push(t),t}function We(t,e,r,n,s,i){return j3(ce(t,e,r,n,s,i,!0))}function sn(t,e,r,n,s){return j3(Wt(t,e,r,n,s,!0))}function Xc(t){return t?t.__v_isVNode===!0:!1}function oo(t,e){return t.type===e.type&&t.key===e.key}const Dl="__vInternal",G3=({key:t})=>t??null,Rc=({ref:t,ref_key:e,ref_for:r})=>t!=null?mr(t)||pr(t)||st(t)?{i:Ur,r:t,k:e,f:!!r}:t:null;function ce(t,e=null,r=null,n=0,s=null,i=t===tr?0:1,u=!1,v=!1){const b={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&G3(e),ref:e&&Rc(e),scopeId:Tl,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ur};return v?(T1(b,r),i&128&&t.normalize(b)):r&&(b.shapeFlag|=mr(r)?8:16),Xf>0&&!u&&ti&&(b.patchFlag>0||i&6)&&b.patchFlag!==32&&ti.push(b),b}const Wt=F9;function F9(t,e=null,r=null,n=0,s=null,i=!1){if((!t||t===D3)&&(t=Ln),Xc(t)){const v=Ia(t,e,!0);return r&&T1(v,r),Xf>0&&!i&&ti&&(v.shapeFlag&6?ti[ti.indexOf(t)]=v:ti.push(v)),v.patchFlag|=-2,v}if(W9(t)&&(t=t.__vccOpts),e){e=L9(e);let{class:v,style:b}=e;v&&!mr(v)&&(e.class=oi(v)),nr(b)&&(v3(b)&&!Xe(b)&&(b=Tr({},b)),e.style=v0(b))}const u=mr(t)?1:e9(t)?128:k9(t)?64:nr(t)?4:st(t)?2:0;return ce(t,e,r,n,s,u,i,!0)}function L9(t){return t?v3(t)||Dl in t?Tr({},t):t:null}function Ia(t,e,r=!1){const{props:n,ref:s,patchFlag:i,children:u}=t,v=e?Ol(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:v,key:v&&G3(v),ref:e&&e.ref?r&&s?Xe(s)?s.concat(Rc(e)):[s,Rc(e)]:Rc(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:u,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==tr?i===-1?16:i|16:i,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ia(t.ssContent),ssFallback:t.ssFallback&&Ia(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx}}function Un(t=" ",e=0){return Wt(Il,null,t,e)}function U9(t,e){const r=Wt(Sc,null,t);return r.staticCount=e,r}function zt(t="",e=!1){return e?($e(),sn(Ln,null,t)):Wt(Ln,null,t)}function yi(t){return t==null||typeof t=="boolean"?Wt(Ln):Xe(t)?Wt(tr,null,t.slice()):typeof t=="object"?_a(t):Wt(Il,null,String(t))}function _a(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ia(t)}function T1(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Xe(e))r=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),T1(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!(Dl in e)?e._ctx=Ur:s===3&&Ur&&(Ur.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else st(e)?(e={default:e,_ctx:Ur},r=32):(e=String(e),n&64?(r=16,e=[Un(e)]):r=8);t.children=e,t.shapeFlag|=r}function Ol(...t){const e={};for(let r=0;rBr||Ur,Cs=t=>{Br=t,t.scope.on()},bo=()=>{Br&&Br.scope.off(),Br=null};function V3(t){return t.vnode.shapeFlag&4}let Yf=!1;function H9(t,e=!1){Yf=e;const{props:r,children:n}=t.vnode,s=V3(t);_9(t,r,s,e),E9(t,n);const i=s?z9(t,e):void 0;return Yf=!1,i}function z9(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=Pi(new Proxy(t.ctx,m9));const{setup:n}=r;if(n){const s=t.setupContext=n.length>1?G9(t):null;Cs(t),$s();const i=Ta(n,t,0,[t.props,s]);if(qs(),bo(),e3(i)){if(i.then(bo,bo),e)return i.then(u=>{Mm(t,u,e)}).catch(u=>{Bl(u,t,0)});t.asyncDep=i}else Mm(t,i,e)}else W3(t,e)}function Mm(t,e,r){st(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:nr(e)&&(t.setupState=y3(e)),W3(t,r)}let Am;function W3(t,e,r){const n=t.type;if(!t.render){if(!e&&Am&&!n.render){const s=n.template||C1(t).template;if(s){const{isCustomElement:i,compilerOptions:u}=t.appContext.config,{delimiters:v,compilerOptions:b}=n,m=Tr(Tr({isCustomElement:i,delimiters:v},u),b);n.render=Am(s,m)}}t.render=n.render||ai}Cs(t),$s(),g9(t),qs(),bo()}function j9(t){return new Proxy(t.attrs,{get(e,r){return En(t,"get","$attrs"),e[r]}})}function G9(t){const e=n=>{t.exposed=n||{}};let r;return{get attrs(){return r||(r=j9(t))},slots:t.slots,emit:t.emit,expose:e}}function Ll(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(y3(Pi(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in kf)return kf[r](t)},has(e,r){return r in e||r in kf}}))}function V9(t,e=!0){return st(t)?t.displayName||t.name:t.name||e&&t.__name}function W9(t){return st(t)&&"__vccOpts"in t}const nn=(t,e)=>Hw(t,e,Yf);function k1(t,e,r){const n=arguments.length;return n===2?nr(e)&&!Xe(e)?Xc(e)?Wt(t,null,[e]):Wt(t,e):Wt(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Xc(r)&&(r=[r]),Wt(t,e,r))}const Z9=Symbol(""),J9=()=>_n(Z9),X9="3.2.45",Y9="http://www.w3.org/2000/svg",so=typeof document<"u"?document:null,Em=so&&so.createElement("template"),Q9={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e?so.createElementNS(Y9,t):so.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>so.createTextNode(t),createComment:t=>so.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>so.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const u=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Em.innerHTML=n?`${t}`:t;const v=Em.content;if(n){const b=v.firstChild;for(;b.firstChild;)v.appendChild(b.firstChild);v.removeChild(b)}e.insertBefore(v,r)}return[u?u.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function e7(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function t7(t,e,r){const n=t.style,s=mr(r);if(r&&!s){for(const i in r)Ep(n,i,r[i]);if(e&&!mr(e))for(const i in e)r[i]==null&&Ep(n,i,"")}else{const i=n.display;s?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=i)}}const Sm=/\s*!important$/;function Ep(t,e,r){if(Xe(r))r.forEach(n=>Ep(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=r7(t,e);Sm.test(r)?t.setProperty(Ks(n),r.replace(Sm,""),"important"):t[n]=r}}const Rm=["Webkit","Moz","ms"],ju={};function r7(t,e){const r=ju[e];if(r)return r;let n=ki(e);if(n!=="filter"&&n in t)return ju[e]=n;n=Rl(n);for(let s=0;sGu||(f7.then(()=>Gu=0),Gu=Date.now());function l7(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Fn(u7(n,r.value),e,5,[n])};return r.value=t,r.attached=c7(),r}function u7(t,e){if(Xe(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const Nm=/^on[a-z]/,d7=(t,e,r,n,s=!1,i,u,v,b)=>{e==="class"?e7(t,n,s):e==="style"?t7(t,r,n):Al(e)?f1(e)||o7(t,e,r,n,u):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):h7(t,e,n,s))?i7(t,e,n,i,u,v,b):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),n7(t,e,n,s))};function h7(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&Nm.test(e)&&st(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||Nm.test(e)&&mr(r)?!1:e in t}const ua="transition",af="animation",P1=(t,{slots:e})=>k1(B3,J3(t),e);P1.displayName="Transition";const Z3={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},p7=P1.props=Tr({},B3.props,Z3),Ja=(t,e=[])=>{Xe(t)?t.forEach(r=>r(...e)):t&&t(...e)},Tm=t=>t?Xe(t)?t.some(e=>e.length>1):t.length>1:!1;function J3(t){const e={};for(const a in t)a in Z3||(e[a]=t[a]);if(t.css===!1)return e;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:u=`${r}-enter-active`,enterToClass:v=`${r}-enter-to`,appearFromClass:b=i,appearActiveClass:m=u,appearToClass:g=v,leaveFromClass:_=`${r}-leave-from`,leaveActiveClass:A=`${r}-leave-active`,leaveToClass:E=`${r}-leave-to`}=t,R=v7(s),B=R&&R[0],T=R&&R[1],{onBeforeEnter:F,onEnter:O,onEnterCancelled:q,onLeave:H,onLeaveCancelled:G,onBeforeAppear:re=F,onAppear:ne=O,onAppearCancelled:Y=q}=e,W=(a,f,c)=>{ba(a,f?g:v),ba(a,f?m:u),c&&c()},se=(a,f)=>{a._isLeaving=!1,ba(a,_),ba(a,E),ba(a,A),f&&f()},y=a=>(f,c)=>{const l=a?ne:O,h=()=>W(f,a,c);Ja(l,[f,h]),km(()=>{ba(f,a?b:i),ji(f,a?g:v),Tm(l)||Pm(f,n,B,h)})};return Tr(e,{onBeforeEnter(a){Ja(F,[a]),ji(a,i),ji(a,u)},onBeforeAppear(a){Ja(re,[a]),ji(a,b),ji(a,m)},onEnter:y(!1),onAppear:y(!0),onLeave(a,f){a._isLeaving=!0;const c=()=>se(a,f);ji(a,_),Y3(),ji(a,A),km(()=>{!a._isLeaving||(ba(a,_),ji(a,E),Tm(H)||Pm(a,n,T,c))}),Ja(H,[a,c])},onEnterCancelled(a){W(a,!1),Ja(q,[a])},onAppearCancelled(a){W(a,!0),Ja(Y,[a])},onLeaveCancelled(a){se(a),Ja(G,[a])}})}function v7(t){if(t==null)return null;if(nr(t))return[Vu(t.enter),Vu(t.leave)];{const e=Vu(t);return[e,e]}}function Vu(t){return jf(t)}function ji(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t._vtc||(t._vtc=new Set)).add(e)}function ba(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const{_vtc:r}=t;r&&(r.delete(e),r.size||(t._vtc=void 0))}function km(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let m7=0;function Pm(t,e,r,n){const s=t._endId=++m7,i=()=>{s===t._endId&&n()};if(r)return setTimeout(i,r);const{type:u,timeout:v,propCount:b}=X3(t,e);if(!u)return n();const m=u+"end";let g=0;const _=()=>{t.removeEventListener(m,A),i()},A=E=>{E.target===t&&++g>=b&&_()};setTimeout(()=>{g(r[R]||"").split(", "),s=n(`${ua}Delay`),i=n(`${ua}Duration`),u=Im(s,i),v=n(`${af}Delay`),b=n(`${af}Duration`),m=Im(v,b);let g=null,_=0,A=0;e===ua?u>0&&(g=ua,_=u,A=i.length):e===af?m>0&&(g=af,_=m,A=b.length):(_=Math.max(u,m),g=_>0?u>m?ua:af:null,A=g?g===ua?i.length:b.length:0);const E=g===ua&&/\b(transform|all)(,|$)/.test(n(`${ua}Property`).toString());return{type:g,timeout:_,propCount:A,hasTransform:E}}function Im(t,e){for(;t.lengthDm(r)+Dm(t[n])))}function Dm(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function Y3(){return document.body.offsetHeight}const Q3=new WeakMap,e6=new WeakMap,g7={name:"TransitionGroup",props:Tr({},p7,{tag:String,moveClass:String}),setup(t,{slots:e}){const r=Fl(),n=C3();let s,i;return k3(()=>{if(!s.length)return;const u=t.moveClass||`${t.name||"v"}-move`;if(!_7(s[0].el,r.vnode.el,u))return;s.forEach(y7),s.forEach(x7);const v=s.filter(w7);Y3(),v.forEach(b=>{const m=b.el,g=m.style;ji(m,u),g.transform=g.webkitTransform=g.transitionDuration="";const _=m._moveCb=A=>{A&&A.target!==m||(!A||/transform$/.test(A.propertyName))&&(m.removeEventListener("transitionend",_),m._moveCb=null,ba(m,u))};m.addEventListener("transitionend",_)})}),()=>{const u=Mt(t),v=J3(u);let b=u.tag||tr;s=i,i=e.default?M1(e.default()):[];for(let m=0;m{u.split(/\s+/).forEach(v=>v&&n.classList.remove(v))}),r.split(/\s+/).forEach(u=>u&&n.classList.add(u)),n.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(n);const{hasTransform:i}=X3(n);return s.removeChild(n),i}const Om=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Xe(e)?r=>Ac(e,r):e};function M7(t){t.target.composing=!0}function Fm(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Sf={created(t,{modifiers:{lazy:e,trim:r,number:n}},s){t._assign=Om(s);const i=n||s.props&&s.props.type==="number";es(t,e?"change":"input",u=>{if(u.target.composing)return;let v=t.value;r&&(v=v.trim()),i&&(v=jf(v)),t._assign(v)}),r&&es(t,"change",()=>{t.value=t.value.trim()}),e||(es(t,"compositionstart",M7),es(t,"compositionend",Fm),es(t,"change",Fm))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,modifiers:{lazy:r,trim:n,number:s}},i){if(t._assign=Om(i),t.composing||document.activeElement===t&&t.type!=="range"&&(r||n&&t.value.trim()===e||(s||t.type==="number")&&jf(t.value)===e))return;const u=e??"";t.value!==u&&(t.value=u)}},A7=["ctrl","shift","alt","meta"],E7={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>A7.some(r=>t[`${r}Key`]&&!e.includes(r))},S7=(t,e)=>(r,...n)=>{for(let s=0;s{const e=C7().createApp(...t),{mount:r}=e;return e.mount=n=>{const s=B7(n);if(!s)return;const i=e._component;!st(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.innerHTML="";const u=r(s,!1,s instanceof SVGElement);return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),u},e};function B7(t){return mr(t)?document.querySelector(t):t}var N7=!1;let r6;const Ul=t=>r6=t,n6=Symbol();function Sp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Df;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Df||(Df={}));function T7(){const t=n3(!0),e=t.run(()=>Qr({}));let r=[],n=[];const s=Pi({install(i){Ul(s),s._a=i,i.provide(n6,s),i.config.globalProperties.$pinia=s,n.forEach(u=>r.push(u)),n=[]},use(i){return!this._a&&!N7?n.push(i):r.push(i),this},_p:r,_a:null,_e:t,_s:new Map,state:e});return s}const i6=()=>{};function Um(t,e,r,n=i6){t.push(e);const s=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),n())};return!r&&fw()&&cw(s),s}function Ho(t,...e){t.slice().forEach(r=>{r(...e)})}function Rp(t,e){t instanceof Map&&e instanceof Map&&e.forEach((r,n)=>t.set(n,r)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const r in e){if(!e.hasOwnProperty(r))continue;const n=e[r],s=t[r];Sp(s)&&Sp(n)&&t.hasOwnProperty(r)&&!pr(n)&&!Na(n)?t[r]=Rp(s,n):t[r]=n}return t}const k7=Symbol();function P7(t){return!Sp(t)||!t.hasOwnProperty(k7)}const{assign:Ma}=Object;function I7(t){return!!(pr(t)&&t.effect)}function D7(t,e,r,n){const{state:s,actions:i,getters:u}=e,v=r.state.value[t];let b;function m(){v||(r.state.value[t]=s?s():{});const g=Uw(r.state.value[t]);return Ma(g,i,Object.keys(u||{}).reduce((_,A)=>(_[A]=Pi(nn(()=>{Ul(r);const E=r._s.get(t);return u[A].call(E,E)})),_),{}))}return b=a6(t,m,e,r,n,!0),b.$reset=function(){const _=s?s():{};this.$patch(A=>{Ma(A,_)})},b}function a6(t,e,r={},n,s,i){let u;const v=Ma({actions:{}},r),b={deep:!0};let m,g,_=Pi([]),A=Pi([]),E;const R=n.state.value[t];!i&&!R&&(n.state.value[t]={}),Qr({});let B;function T(ne){let Y;m=g=!1,typeof ne=="function"?(ne(n.state.value[t]),Y={type:Df.patchFunction,storeId:t,events:E}):(Rp(n.state.value[t],ne),Y={type:Df.patchObject,payload:ne,storeId:t,events:E});const W=B=Symbol();Rs().then(()=>{B===W&&(m=!0)}),g=!0,Ho(_,Y,n.state.value[t])}const F=i6;function O(){u.stop(),_=[],A=[],n._s.delete(t)}function q(ne,Y){return function(){Ul(n);const W=Array.from(arguments),se=[],y=[];function a(l){se.push(l)}function f(l){y.push(l)}Ho(A,{args:W,name:ne,store:G,after:a,onError:f});let c;try{c=Y.apply(this&&this.$id===t?this:G,W)}catch(l){throw Ho(y,l),l}return c instanceof Promise?c.then(l=>(Ho(se,l),l)).catch(l=>(Ho(y,l),Promise.reject(l))):(Ho(se,c),c)}}const H={_p:n,$id:t,$onAction:Um.bind(null,A),$patch:T,$reset:F,$subscribe(ne,Y={}){const W=Um(_,ne,Y.detached,()=>se()),se=u.run(()=>bs(()=>n.state.value[t],y=>{(Y.flush==="sync"?g:m)&&ne({storeId:t,type:Df.direct,events:E},y)},Ma({},b,Y)));return W},$dispose:O},G=Ua(H);n._s.set(t,G);const re=n._e.run(()=>(u=n3(),u.run(()=>e())));for(const ne in re){const Y=re[ne];if(pr(Y)&&!I7(Y)||Na(Y))i||(R&&P7(Y)&&(pr(Y)?Y.value=R[ne]:Rp(Y,R[ne])),n.state.value[t][ne]=Y);else if(typeof Y=="function"){const W=q(ne,Y);re[ne]=W,v.actions[ne]=Y}}return Ma(G,re),Ma(Mt(G),re),Object.defineProperty(G,"$state",{get:()=>n.state.value[t],set:ne=>{T(Y=>{Ma(Y,ne)})}}),n._p.forEach(ne=>{Ma(G,u.run(()=>ne({store:G,app:n._a,pinia:n,options:v})))}),R&&i&&r.hydrate&&r.hydrate(G.$state,R),m=!0,g=!0,G}function O7(t,e,r){let n,s;const i=typeof e=="function";typeof t=="string"?(n=t,s=i?r:e):(s=t,n=t.id);function u(v,b){const m=Fl();return v=v||m&&_n(n6,null),v&&Ul(v),v=r6,v._s.has(n)||(i?a6(n,e,s,v):D7(n,s,v)),v._s.get(n)}return u.$id=n,u}const F7="modulepreload",L7=function(t){return"/"+t},Km={},o6=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=L7(i),i in Km)return;Km[i]=!0;const u=i.endsWith(".css"),v=u?'[rel="stylesheet"]':"";if(!!n)for(let g=s.length-1;g>=0;g--){const _=s[g];if(_.href===i&&(!u||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${v}`))return;const m=document.createElement("link");if(m.rel=u?"stylesheet":F7,u||(m.as="script",m.crossOrigin=""),m.href=i,document.head.appendChild(m),u)return new Promise((g,_)=>{m.addEventListener("load",g),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())};var m0={exports:{}};(function(t){(function(e,r){function n(f,c){if(!f)throw new Error(c||"Assertion failed")}function s(f,c){f.super_=c;var l=function(){};l.prototype=c.prototype,f.prototype=new l,f.prototype.constructor=f}function i(f,c,l){if(i.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((c==="le"||c==="be")&&(l=c,c=10),this._init(f||0,c||10,l||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(c){return c instanceof i?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===i.wordSize&&Array.isArray(c.words)},i.max=function(c,l){return c.cmp(l)>0?c:l},i.min=function(c,l){return c.cmp(l)<0?c:l},i.prototype._init=function(c,l,h){if(typeof c=="number")return this._initNumber(c,l,h);if(typeof c=="object")return this._initArray(c,l,h);l==="hex"&&(l=16),n(l===(l|0)&&l>=2&&l<=36),c=c.toString().replace(/\s+/g,"");var x=0;c[0]==="-"&&(x++,this.negative=1),x=0;x-=3)p=c[x]|c[x-1]<<8|c[x-2]<<16,this.words[w]|=p<>>26-o&67108863,o+=24,o>=26&&(o-=26,w++);else if(h==="le")for(x=0,w=0;x>>26-o&67108863,o+=24,o>=26&&(o-=26,w++);return this._strip()};function v(f,c){var l=f.charCodeAt(c);if(l>=48&&l<=57)return l-48;if(l>=65&&l<=70)return l-55;if(l>=97&&l<=102)return l-87;n(!1,"Invalid character in "+f)}function b(f,c,l){var h=v(f,l);return l-1>=c&&(h|=v(f,l-1)<<4),h}i.prototype._parseHex=function(c,l,h){this.length=Math.ceil((c.length-l)/6),this.words=new Array(this.length);for(var x=0;x=l;x-=2)o=b(c,l,x)<=18?(w-=18,p+=1,this.words[p]|=o>>>26):w+=8;else{var d=c.length-l;for(x=d%2===0?l+1:l;x=18?(w-=18,p+=1,this.words[p]|=o>>>26):w+=8}this._strip()};function m(f,c,l,h){for(var x=0,w=0,p=Math.min(f.length,l),o=c;o=49?w=d-49+10:d>=17?w=d-17+10:w=d,n(d>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch{i.prototype.inspect=_}else i.prototype.inspect=_;function _(){return(this.red?""}var A=["","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"],E=[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],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(c,l){c=c||10,l=l|0||1;var h;if(c===16||c==="hex"){h="";for(var x=0,w=0,p=0;p>>24-x&16777215,x+=2,x>=26&&(x-=26,p--),w!==0||p!==this.length-1?h=A[6-d.length]+d+h:h=d+h}for(w!==0&&(h=w.toString(16)+h);h.length%l!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}if(c===(c|0)&&c>=2&&c<=36){var M=E[c],C=R[c];h="";var P=this.clone();for(P.negative=0;!P.isZero();){var S=P.modrn(C).toString(c);P=P.idivn(C),P.isZero()?h=S+h:h=A[M-S.length]+S+h}for(this.isZero()&&(h="0"+h);h.length%l!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},i.prototype.toJSON=function(){return this.toString(16,2)},u&&(i.prototype.toBuffer=function(c,l){return this.toArrayLike(u,c,l)}),i.prototype.toArray=function(c,l){return this.toArrayLike(Array,c,l)};var B=function(c,l){return c.allocUnsafe?c.allocUnsafe(l):new c(l)};i.prototype.toArrayLike=function(c,l,h){this._strip();var x=this.byteLength(),w=h||Math.max(1,x);n(x<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var p=B(c,w),o=l==="le"?"LE":"BE";return this["_toArrayLike"+o](p,x),p},i.prototype._toArrayLikeLE=function(c,l){for(var h=0,x=0,w=0,p=0;w>8&255),h>16&255),p===6?(h>24&255),x=0,p=0):(x=o>>>24,p+=2)}if(h=0&&(c[h--]=o>>8&255),h>=0&&(c[h--]=o>>16&255),p===6?(h>=0&&(c[h--]=o>>24&255),x=0,p=0):(x=o>>>24,p+=2)}if(h>=0)for(c[h--]=x;h>=0;)c[h--]=0},Math.clz32?i.prototype._countBits=function(c){return 32-Math.clz32(c)}:i.prototype._countBits=function(c){var l=c,h=0;return l>=4096&&(h+=13,l>>>=13),l>=64&&(h+=7,l>>>=7),l>=8&&(h+=4,l>>>=4),l>=2&&(h+=2,l>>>=2),h+l},i.prototype._zeroBits=function(c){if(c===0)return 26;var l=c,h=0;return(l&8191)===0&&(h+=13,l>>>=13),(l&127)===0&&(h+=7,l>>>=7),(l&15)===0&&(h+=4,l>>>=4),(l&3)===0&&(h+=2,l>>>=2),(l&1)===0&&h++,h},i.prototype.bitLength=function(){var c=this.words[this.length-1],l=this._countBits(c);return(this.length-1)*26+l};function T(f){for(var c=new Array(f.bitLength()),l=0;l>>x&1}return c}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,l=0;lc.length?this.clone().ior(c):c.clone().ior(this)},i.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},i.prototype.iuand=function(c){var l;this.length>c.length?l=c:l=this;for(var h=0;hc.length?this.clone().iand(c):c.clone().iand(this)},i.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},i.prototype.iuxor=function(c){var l,h;this.length>c.length?(l=this,h=c):(l=c,h=this);for(var x=0;xc.length?this.clone().ixor(c):c.clone().ixor(this)},i.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},i.prototype.inotn=function(c){n(typeof c=="number"&&c>=0);var l=Math.ceil(c/26)|0,h=c%26;this._expand(l),h>0&&l--;for(var x=0;x0&&(this.words[x]=~this.words[x]&67108863>>26-h),this._strip()},i.prototype.notn=function(c){return this.clone().inotn(c)},i.prototype.setn=function(c,l){n(typeof c=="number"&&c>=0);var h=c/26|0,x=c%26;return this._expand(h+1),l?this.words[h]=this.words[h]|1<c.length?(h=this,x=c):(h=c,x=this);for(var w=0,p=0;p>>26;for(;w!==0&&p>>26;if(this.length=h.length,w!==0)this.words[this.length]=w,this.length++;else if(h!==this)for(;pc.length?this.clone().iadd(c):c.clone().iadd(this)},i.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var l=this.iadd(c);return c.negative=1,l._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var h=this.cmp(c);if(h===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,w;h>0?(x=this,w=c):(x=c,w=this);for(var p=0,o=0;o>26,this.words[o]=l&67108863;for(;p!==0&&o>26,this.words[o]=l&67108863;if(p===0&&o>>26,P=d&67108863,S=Math.min(M,c.length-1),I=Math.max(0,M-f.length+1);I<=S;I++){var U=M-I|0;x=f.words[U]|0,w=c.words[I]|0,p=x*w+P,C+=p/67108864|0,P=p&67108863}l.words[M]=P|0,d=C|0}return d!==0?l.words[M]=d|0:l.length--,l._strip()}var O=function(c,l,h){var x=c.words,w=l.words,p=h.words,o=0,d,M,C,P=x[0]|0,S=P&8191,I=P>>>13,U=x[1]|0,V=U&8191,z=U>>>13,X=x[2]|0,j=X&8191,N=X>>>13,$=x[3]|0,ee=$&8191,J=$>>>13,K=x[4]|0,D=K&8191,k=K>>>13,L=x[5]|0,te=L&8191,Z=L>>>13,Q=x[6]|0,Ie=Q&8191,ie=Q>>>13,oe=x[7]|0,Oe=oe&8191,ae=oe>>>13,fe=x[8]|0,Ke=fe&8191,le=fe>>>13,Me=x[9]|0,Ze=Me&8191,pe=Me>>>13,Ae=w[0]|0,ze=Ae&8191,he=Ae>>>13,Ee=w[1]|0,Ye=Ee&8191,ve=Ee>>>13,Se=w[2]|0,Qe=Se&8191,me=Se>>>13,Re=w[3]|0,et=Re&8191,ge=Re>>>13,Ce=w[4]|0,tt=Ce&8191,be=Ce>>>13,Be=w[5]|0,rt=Be&8191,ye=Be>>>13,Ne=w[6]|0,nt=Ne&8191,xe=Ne>>>13,Te=w[7]|0,it=Te&8191,we=Te>>>13,ke=w[8]|0,at=ke&8191,_e=ke>>>13,Pe=w[9]|0,Ge=Pe&8191,Ve=Pe>>>13;h.negative=c.negative^l.negative,h.length=19,d=Math.imul(S,ze),M=Math.imul(S,he),M=M+Math.imul(I,ze)|0,C=Math.imul(I,he);var pt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(pt>>>26)|0,pt&=67108863,d=Math.imul(V,ze),M=Math.imul(V,he),M=M+Math.imul(z,ze)|0,C=Math.imul(z,he),d=d+Math.imul(S,Ye)|0,M=M+Math.imul(S,ve)|0,M=M+Math.imul(I,Ye)|0,C=C+Math.imul(I,ve)|0;var vt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(vt>>>26)|0,vt&=67108863,d=Math.imul(j,ze),M=Math.imul(j,he),M=M+Math.imul(N,ze)|0,C=Math.imul(N,he),d=d+Math.imul(V,Ye)|0,M=M+Math.imul(V,ve)|0,M=M+Math.imul(z,Ye)|0,C=C+Math.imul(z,ve)|0,d=d+Math.imul(S,Qe)|0,M=M+Math.imul(S,me)|0,M=M+Math.imul(I,Qe)|0,C=C+Math.imul(I,me)|0;var mt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(mt>>>26)|0,mt&=67108863,d=Math.imul(ee,ze),M=Math.imul(ee,he),M=M+Math.imul(J,ze)|0,C=Math.imul(J,he),d=d+Math.imul(j,Ye)|0,M=M+Math.imul(j,ve)|0,M=M+Math.imul(N,Ye)|0,C=C+Math.imul(N,ve)|0,d=d+Math.imul(V,Qe)|0,M=M+Math.imul(V,me)|0,M=M+Math.imul(z,Qe)|0,C=C+Math.imul(z,me)|0,d=d+Math.imul(S,et)|0,M=M+Math.imul(S,ge)|0,M=M+Math.imul(I,et)|0,C=C+Math.imul(I,ge)|0;var gt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(gt>>>26)|0,gt&=67108863,d=Math.imul(D,ze),M=Math.imul(D,he),M=M+Math.imul(k,ze)|0,C=Math.imul(k,he),d=d+Math.imul(ee,Ye)|0,M=M+Math.imul(ee,ve)|0,M=M+Math.imul(J,Ye)|0,C=C+Math.imul(J,ve)|0,d=d+Math.imul(j,Qe)|0,M=M+Math.imul(j,me)|0,M=M+Math.imul(N,Qe)|0,C=C+Math.imul(N,me)|0,d=d+Math.imul(V,et)|0,M=M+Math.imul(V,ge)|0,M=M+Math.imul(z,et)|0,C=C+Math.imul(z,ge)|0,d=d+Math.imul(S,tt)|0,M=M+Math.imul(S,be)|0,M=M+Math.imul(I,tt)|0,C=C+Math.imul(I,be)|0;var bt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(bt>>>26)|0,bt&=67108863,d=Math.imul(te,ze),M=Math.imul(te,he),M=M+Math.imul(Z,ze)|0,C=Math.imul(Z,he),d=d+Math.imul(D,Ye)|0,M=M+Math.imul(D,ve)|0,M=M+Math.imul(k,Ye)|0,C=C+Math.imul(k,ve)|0,d=d+Math.imul(ee,Qe)|0,M=M+Math.imul(ee,me)|0,M=M+Math.imul(J,Qe)|0,C=C+Math.imul(J,me)|0,d=d+Math.imul(j,et)|0,M=M+Math.imul(j,ge)|0,M=M+Math.imul(N,et)|0,C=C+Math.imul(N,ge)|0,d=d+Math.imul(V,tt)|0,M=M+Math.imul(V,be)|0,M=M+Math.imul(z,tt)|0,C=C+Math.imul(z,be)|0,d=d+Math.imul(S,rt)|0,M=M+Math.imul(S,ye)|0,M=M+Math.imul(I,rt)|0,C=C+Math.imul(I,ye)|0;var Rt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,d=Math.imul(Ie,ze),M=Math.imul(Ie,he),M=M+Math.imul(ie,ze)|0,C=Math.imul(ie,he),d=d+Math.imul(te,Ye)|0,M=M+Math.imul(te,ve)|0,M=M+Math.imul(Z,Ye)|0,C=C+Math.imul(Z,ve)|0,d=d+Math.imul(D,Qe)|0,M=M+Math.imul(D,me)|0,M=M+Math.imul(k,Qe)|0,C=C+Math.imul(k,me)|0,d=d+Math.imul(ee,et)|0,M=M+Math.imul(ee,ge)|0,M=M+Math.imul(J,et)|0,C=C+Math.imul(J,ge)|0,d=d+Math.imul(j,tt)|0,M=M+Math.imul(j,be)|0,M=M+Math.imul(N,tt)|0,C=C+Math.imul(N,be)|0,d=d+Math.imul(V,rt)|0,M=M+Math.imul(V,ye)|0,M=M+Math.imul(z,rt)|0,C=C+Math.imul(z,ye)|0,d=d+Math.imul(S,nt)|0,M=M+Math.imul(S,xe)|0,M=M+Math.imul(I,nt)|0,C=C+Math.imul(I,xe)|0;var Ct=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,d=Math.imul(Oe,ze),M=Math.imul(Oe,he),M=M+Math.imul(ae,ze)|0,C=Math.imul(ae,he),d=d+Math.imul(Ie,Ye)|0,M=M+Math.imul(Ie,ve)|0,M=M+Math.imul(ie,Ye)|0,C=C+Math.imul(ie,ve)|0,d=d+Math.imul(te,Qe)|0,M=M+Math.imul(te,me)|0,M=M+Math.imul(Z,Qe)|0,C=C+Math.imul(Z,me)|0,d=d+Math.imul(D,et)|0,M=M+Math.imul(D,ge)|0,M=M+Math.imul(k,et)|0,C=C+Math.imul(k,ge)|0,d=d+Math.imul(ee,tt)|0,M=M+Math.imul(ee,be)|0,M=M+Math.imul(J,tt)|0,C=C+Math.imul(J,be)|0,d=d+Math.imul(j,rt)|0,M=M+Math.imul(j,ye)|0,M=M+Math.imul(N,rt)|0,C=C+Math.imul(N,ye)|0,d=d+Math.imul(V,nt)|0,M=M+Math.imul(V,xe)|0,M=M+Math.imul(z,nt)|0,C=C+Math.imul(z,xe)|0,d=d+Math.imul(S,it)|0,M=M+Math.imul(S,we)|0,M=M+Math.imul(I,it)|0,C=C+Math.imul(I,we)|0;var Bt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,d=Math.imul(Ke,ze),M=Math.imul(Ke,he),M=M+Math.imul(le,ze)|0,C=Math.imul(le,he),d=d+Math.imul(Oe,Ye)|0,M=M+Math.imul(Oe,ve)|0,M=M+Math.imul(ae,Ye)|0,C=C+Math.imul(ae,ve)|0,d=d+Math.imul(Ie,Qe)|0,M=M+Math.imul(Ie,me)|0,M=M+Math.imul(ie,Qe)|0,C=C+Math.imul(ie,me)|0,d=d+Math.imul(te,et)|0,M=M+Math.imul(te,ge)|0,M=M+Math.imul(Z,et)|0,C=C+Math.imul(Z,ge)|0,d=d+Math.imul(D,tt)|0,M=M+Math.imul(D,be)|0,M=M+Math.imul(k,tt)|0,C=C+Math.imul(k,be)|0,d=d+Math.imul(ee,rt)|0,M=M+Math.imul(ee,ye)|0,M=M+Math.imul(J,rt)|0,C=C+Math.imul(J,ye)|0,d=d+Math.imul(j,nt)|0,M=M+Math.imul(j,xe)|0,M=M+Math.imul(N,nt)|0,C=C+Math.imul(N,xe)|0,d=d+Math.imul(V,it)|0,M=M+Math.imul(V,we)|0,M=M+Math.imul(z,it)|0,C=C+Math.imul(z,we)|0,d=d+Math.imul(S,at)|0,M=M+Math.imul(S,_e)|0,M=M+Math.imul(I,at)|0,C=C+Math.imul(I,_e)|0;var Nt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,d=Math.imul(Ze,ze),M=Math.imul(Ze,he),M=M+Math.imul(pe,ze)|0,C=Math.imul(pe,he),d=d+Math.imul(Ke,Ye)|0,M=M+Math.imul(Ke,ve)|0,M=M+Math.imul(le,Ye)|0,C=C+Math.imul(le,ve)|0,d=d+Math.imul(Oe,Qe)|0,M=M+Math.imul(Oe,me)|0,M=M+Math.imul(ae,Qe)|0,C=C+Math.imul(ae,me)|0,d=d+Math.imul(Ie,et)|0,M=M+Math.imul(Ie,ge)|0,M=M+Math.imul(ie,et)|0,C=C+Math.imul(ie,ge)|0,d=d+Math.imul(te,tt)|0,M=M+Math.imul(te,be)|0,M=M+Math.imul(Z,tt)|0,C=C+Math.imul(Z,be)|0,d=d+Math.imul(D,rt)|0,M=M+Math.imul(D,ye)|0,M=M+Math.imul(k,rt)|0,C=C+Math.imul(k,ye)|0,d=d+Math.imul(ee,nt)|0,M=M+Math.imul(ee,xe)|0,M=M+Math.imul(J,nt)|0,C=C+Math.imul(J,xe)|0,d=d+Math.imul(j,it)|0,M=M+Math.imul(j,we)|0,M=M+Math.imul(N,it)|0,C=C+Math.imul(N,we)|0,d=d+Math.imul(V,at)|0,M=M+Math.imul(V,_e)|0,M=M+Math.imul(z,at)|0,C=C+Math.imul(z,_e)|0,d=d+Math.imul(S,Ge)|0,M=M+Math.imul(S,Ve)|0,M=M+Math.imul(I,Ge)|0,C=C+Math.imul(I,Ve)|0;var Tt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,d=Math.imul(Ze,Ye),M=Math.imul(Ze,ve),M=M+Math.imul(pe,Ye)|0,C=Math.imul(pe,ve),d=d+Math.imul(Ke,Qe)|0,M=M+Math.imul(Ke,me)|0,M=M+Math.imul(le,Qe)|0,C=C+Math.imul(le,me)|0,d=d+Math.imul(Oe,et)|0,M=M+Math.imul(Oe,ge)|0,M=M+Math.imul(ae,et)|0,C=C+Math.imul(ae,ge)|0,d=d+Math.imul(Ie,tt)|0,M=M+Math.imul(Ie,be)|0,M=M+Math.imul(ie,tt)|0,C=C+Math.imul(ie,be)|0,d=d+Math.imul(te,rt)|0,M=M+Math.imul(te,ye)|0,M=M+Math.imul(Z,rt)|0,C=C+Math.imul(Z,ye)|0,d=d+Math.imul(D,nt)|0,M=M+Math.imul(D,xe)|0,M=M+Math.imul(k,nt)|0,C=C+Math.imul(k,xe)|0,d=d+Math.imul(ee,it)|0,M=M+Math.imul(ee,we)|0,M=M+Math.imul(J,it)|0,C=C+Math.imul(J,we)|0,d=d+Math.imul(j,at)|0,M=M+Math.imul(j,_e)|0,M=M+Math.imul(N,at)|0,C=C+Math.imul(N,_e)|0,d=d+Math.imul(V,Ge)|0,M=M+Math.imul(V,Ve)|0,M=M+Math.imul(z,Ge)|0,C=C+Math.imul(z,Ve)|0;var kt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(kt>>>26)|0,kt&=67108863,d=Math.imul(Ze,Qe),M=Math.imul(Ze,me),M=M+Math.imul(pe,Qe)|0,C=Math.imul(pe,me),d=d+Math.imul(Ke,et)|0,M=M+Math.imul(Ke,ge)|0,M=M+Math.imul(le,et)|0,C=C+Math.imul(le,ge)|0,d=d+Math.imul(Oe,tt)|0,M=M+Math.imul(Oe,be)|0,M=M+Math.imul(ae,tt)|0,C=C+Math.imul(ae,be)|0,d=d+Math.imul(Ie,rt)|0,M=M+Math.imul(Ie,ye)|0,M=M+Math.imul(ie,rt)|0,C=C+Math.imul(ie,ye)|0,d=d+Math.imul(te,nt)|0,M=M+Math.imul(te,xe)|0,M=M+Math.imul(Z,nt)|0,C=C+Math.imul(Z,xe)|0,d=d+Math.imul(D,it)|0,M=M+Math.imul(D,we)|0,M=M+Math.imul(k,it)|0,C=C+Math.imul(k,we)|0,d=d+Math.imul(ee,at)|0,M=M+Math.imul(ee,_e)|0,M=M+Math.imul(J,at)|0,C=C+Math.imul(J,_e)|0,d=d+Math.imul(j,Ge)|0,M=M+Math.imul(j,Ve)|0,M=M+Math.imul(N,Ge)|0,C=C+Math.imul(N,Ve)|0;var Pt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,d=Math.imul(Ze,et),M=Math.imul(Ze,ge),M=M+Math.imul(pe,et)|0,C=Math.imul(pe,ge),d=d+Math.imul(Ke,tt)|0,M=M+Math.imul(Ke,be)|0,M=M+Math.imul(le,tt)|0,C=C+Math.imul(le,be)|0,d=d+Math.imul(Oe,rt)|0,M=M+Math.imul(Oe,ye)|0,M=M+Math.imul(ae,rt)|0,C=C+Math.imul(ae,ye)|0,d=d+Math.imul(Ie,nt)|0,M=M+Math.imul(Ie,xe)|0,M=M+Math.imul(ie,nt)|0,C=C+Math.imul(ie,xe)|0,d=d+Math.imul(te,it)|0,M=M+Math.imul(te,we)|0,M=M+Math.imul(Z,it)|0,C=C+Math.imul(Z,we)|0,d=d+Math.imul(D,at)|0,M=M+Math.imul(D,_e)|0,M=M+Math.imul(k,at)|0,C=C+Math.imul(k,_e)|0,d=d+Math.imul(ee,Ge)|0,M=M+Math.imul(ee,Ve)|0,M=M+Math.imul(J,Ge)|0,C=C+Math.imul(J,Ve)|0;var It=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(It>>>26)|0,It&=67108863,d=Math.imul(Ze,tt),M=Math.imul(Ze,be),M=M+Math.imul(pe,tt)|0,C=Math.imul(pe,be),d=d+Math.imul(Ke,rt)|0,M=M+Math.imul(Ke,ye)|0,M=M+Math.imul(le,rt)|0,C=C+Math.imul(le,ye)|0,d=d+Math.imul(Oe,nt)|0,M=M+Math.imul(Oe,xe)|0,M=M+Math.imul(ae,nt)|0,C=C+Math.imul(ae,xe)|0,d=d+Math.imul(Ie,it)|0,M=M+Math.imul(Ie,we)|0,M=M+Math.imul(ie,it)|0,C=C+Math.imul(ie,we)|0,d=d+Math.imul(te,at)|0,M=M+Math.imul(te,_e)|0,M=M+Math.imul(Z,at)|0,C=C+Math.imul(Z,_e)|0,d=d+Math.imul(D,Ge)|0,M=M+Math.imul(D,Ve)|0,M=M+Math.imul(k,Ge)|0,C=C+Math.imul(k,Ve)|0;var Dt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,d=Math.imul(Ze,rt),M=Math.imul(Ze,ye),M=M+Math.imul(pe,rt)|0,C=Math.imul(pe,ye),d=d+Math.imul(Ke,nt)|0,M=M+Math.imul(Ke,xe)|0,M=M+Math.imul(le,nt)|0,C=C+Math.imul(le,xe)|0,d=d+Math.imul(Oe,it)|0,M=M+Math.imul(Oe,we)|0,M=M+Math.imul(ae,it)|0,C=C+Math.imul(ae,we)|0,d=d+Math.imul(Ie,at)|0,M=M+Math.imul(Ie,_e)|0,M=M+Math.imul(ie,at)|0,C=C+Math.imul(ie,_e)|0,d=d+Math.imul(te,Ge)|0,M=M+Math.imul(te,Ve)|0,M=M+Math.imul(Z,Ge)|0,C=C+Math.imul(Z,Ve)|0;var Ot=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,d=Math.imul(Ze,nt),M=Math.imul(Ze,xe),M=M+Math.imul(pe,nt)|0,C=Math.imul(pe,xe),d=d+Math.imul(Ke,it)|0,M=M+Math.imul(Ke,we)|0,M=M+Math.imul(le,it)|0,C=C+Math.imul(le,we)|0,d=d+Math.imul(Oe,at)|0,M=M+Math.imul(Oe,_e)|0,M=M+Math.imul(ae,at)|0,C=C+Math.imul(ae,_e)|0,d=d+Math.imul(Ie,Ge)|0,M=M+Math.imul(Ie,Ve)|0,M=M+Math.imul(ie,Ge)|0,C=C+Math.imul(ie,Ve)|0;var Ft=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,d=Math.imul(Ze,it),M=Math.imul(Ze,we),M=M+Math.imul(pe,it)|0,C=Math.imul(pe,we),d=d+Math.imul(Ke,at)|0,M=M+Math.imul(Ke,_e)|0,M=M+Math.imul(le,at)|0,C=C+Math.imul(le,_e)|0,d=d+Math.imul(Oe,Ge)|0,M=M+Math.imul(Oe,Ve)|0,M=M+Math.imul(ae,Ge)|0,C=C+Math.imul(ae,Ve)|0;var Lt=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,d=Math.imul(Ze,at),M=Math.imul(Ze,_e),M=M+Math.imul(pe,at)|0,C=Math.imul(pe,_e),d=d+Math.imul(Ke,Ge)|0,M=M+Math.imul(Ke,Ve)|0,M=M+Math.imul(le,Ge)|0,C=C+Math.imul(le,Ve)|0;var Uu=(o+d|0)+((M&8191)<<13)|0;o=(C+(M>>>13)|0)+(Uu>>>26)|0,Uu&=67108863,d=Math.imul(Ze,Ge),M=Math.imul(Ze,Ve),M=M+Math.imul(pe,Ge)|0,C=Math.imul(pe,Ve);var Ku=(o+d|0)+((M&8191)<<13)|0;return o=(C+(M>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,p[0]=pt,p[1]=vt,p[2]=mt,p[3]=gt,p[4]=bt,p[5]=Rt,p[6]=Ct,p[7]=Bt,p[8]=Nt,p[9]=Tt,p[10]=kt,p[11]=Pt,p[12]=It,p[13]=Dt,p[14]=Ot,p[15]=Ft,p[16]=Lt,p[17]=Uu,p[18]=Ku,o!==0&&(p[19]=o,h.length++),h};Math.imul||(O=F);function q(f,c,l){l.negative=c.negative^f.negative,l.length=f.length+c.length;for(var h=0,x=0,w=0;w>>26)|0,x+=p>>>26,p&=67108863}l.words[w]=o,h=p,p=x}return h!==0?l.words[w]=h:l.length--,l._strip()}function H(f,c,l){return q(f,c,l)}i.prototype.mulTo=function(c,l){var h,x=this.length+c.length;return this.length===10&&c.length===10?h=O(this,c,l):x<63?h=F(this,c,l):x<1024?h=q(this,c,l):h=H(this,c,l),h},i.prototype.mul=function(c){var l=new i(null);return l.words=new Array(this.length+c.length),this.mulTo(c,l)},i.prototype.mulf=function(c){var l=new i(null);return l.words=new Array(this.length+c.length),H(this,c,l)},i.prototype.imul=function(c){return this.clone().mulTo(c,this)},i.prototype.imuln=function(c){var l=c<0;l&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var h=0,x=0;x>=26,h+=w/67108864|0,h+=p>>>26,this.words[x]=p&67108863}return h!==0&&(this.words[x]=h,this.length++),l?this.ineg():this},i.prototype.muln=function(c){return this.clone().imuln(c)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(c){var l=T(c);if(l.length===0)return new i(1);for(var h=this,x=0;x=0);var l=c%26,h=(c-l)/26,x=67108863>>>26-l<<26-l,w;if(l!==0){var p=0;for(w=0;w>>26-l}p&&(this.words[w]=p,this.length++)}if(h!==0){for(w=this.length-1;w>=0;w--)this.words[w+h]=this.words[w];for(w=0;w=0);var x;l?x=(l-l%26)/26:x=0;var w=c%26,p=Math.min((c-w)/26,this.length),o=67108863^67108863>>>w<p)for(this.length-=p,M=0;M=0&&(C!==0||M>=x);M--){var P=this.words[M]|0;this.words[M]=C<<26-w|P>>>w,C=P&o}return d&&C!==0&&(d.words[d.length++]=C),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(c,l,h){return n(this.negative===0),this.iushrn(c,l,h)},i.prototype.shln=function(c){return this.clone().ishln(c)},i.prototype.ushln=function(c){return this.clone().iushln(c)},i.prototype.shrn=function(c){return this.clone().ishrn(c)},i.prototype.ushrn=function(c){return this.clone().iushrn(c)},i.prototype.testn=function(c){n(typeof c=="number"&&c>=0);var l=c%26,h=(c-l)/26,x=1<=0);var l=c%26,h=(c-l)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=h)return this;if(l!==0&&h++,this.length=Math.min(h,this.length),l!==0){var x=67108863^67108863>>>l<=67108864;l++)this.words[l]-=67108864,l===this.length-1?this.words[l+1]=1:this.words[l+1]++;return this.length=Math.max(this.length,l+1),this},i.prototype.isubn=function(c){if(n(typeof c=="number"),n(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var l=0;l>26)-(d/67108864|0),this.words[w+h]=p&67108863}for(;w>26,this.words[w+h]=p&67108863;if(o===0)return this._strip();for(n(o===-1),o=0,w=0;w>26,this.words[w]=p&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(c,l){var h=this.length-c.length,x=this.clone(),w=c,p=w.words[w.length-1]|0,o=this._countBits(p);h=26-o,h!==0&&(w=w.ushln(h),x.iushln(h),p=w.words[w.length-1]|0);var d=x.length-w.length,M;if(l!=="mod"){M=new i(null),M.length=d+1,M.words=new Array(M.length);for(var C=0;C=0;S--){var I=(x.words[w.length+S]|0)*67108864+(x.words[w.length+S-1]|0);for(I=Math.min(I/p|0,67108863),x._ishlnsubmul(w,I,S);x.negative!==0;)I--,x.negative=0,x._ishlnsubmul(w,1,S),x.isZero()||(x.negative^=1);M&&(M.words[S]=I)}return M&&M._strip(),x._strip(),l!=="div"&&h!==0&&x.iushrn(h),{div:M||null,mod:x}},i.prototype.divmod=function(c,l,h){if(n(!c.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var x,w,p;return this.negative!==0&&c.negative===0?(p=this.neg().divmod(c,l),l!=="mod"&&(x=p.div.neg()),l!=="div"&&(w=p.mod.neg(),h&&w.negative!==0&&w.iadd(c)),{div:x,mod:w}):this.negative===0&&c.negative!==0?(p=this.divmod(c.neg(),l),l!=="mod"&&(x=p.div.neg()),{div:x,mod:p.mod}):(this.negative&c.negative)!==0?(p=this.neg().divmod(c.neg(),l),l!=="div"&&(w=p.mod.neg(),h&&w.negative!==0&&w.isub(c)),{div:p.div,mod:w}):c.length>this.length||this.cmp(c)<0?{div:new i(0),mod:this}:c.length===1?l==="div"?{div:this.divn(c.words[0]),mod:null}:l==="mod"?{div:null,mod:new i(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new i(this.modrn(c.words[0]))}:this._wordDiv(c,l)},i.prototype.div=function(c){return this.divmod(c,"div",!1).div},i.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},i.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},i.prototype.divRound=function(c){var l=this.divmod(c);if(l.mod.isZero())return l.div;var h=l.div.negative!==0?l.mod.isub(c):l.mod,x=c.ushrn(1),w=c.andln(1),p=h.cmp(x);return p<0||w===1&&p===0?l.div:l.div.negative!==0?l.div.isubn(1):l.div.iaddn(1)},i.prototype.modrn=function(c){var l=c<0;l&&(c=-c),n(c<=67108863);for(var h=(1<<26)%c,x=0,w=this.length-1;w>=0;w--)x=(h*x+(this.words[w]|0))%c;return l?-x:x},i.prototype.modn=function(c){return this.modrn(c)},i.prototype.idivn=function(c){var l=c<0;l&&(c=-c),n(c<=67108863);for(var h=0,x=this.length-1;x>=0;x--){var w=(this.words[x]|0)+h*67108864;this.words[x]=w/c|0,h=w%c}return this._strip(),l?this.ineg():this},i.prototype.divn=function(c){return this.clone().idivn(c)},i.prototype.egcd=function(c){n(c.negative===0),n(!c.isZero());var l=this,h=c.clone();l.negative!==0?l=l.umod(c):l=l.clone();for(var x=new i(1),w=new i(0),p=new i(0),o=new i(1),d=0;l.isEven()&&h.isEven();)l.iushrn(1),h.iushrn(1),++d;for(var M=h.clone(),C=l.clone();!l.isZero();){for(var P=0,S=1;(l.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(l.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(M),w.isub(C)),x.iushrn(1),w.iushrn(1);for(var I=0,U=1;(h.words[0]&U)===0&&I<26;++I,U<<=1);if(I>0)for(h.iushrn(I);I-- >0;)(p.isOdd()||o.isOdd())&&(p.iadd(M),o.isub(C)),p.iushrn(1),o.iushrn(1);l.cmp(h)>=0?(l.isub(h),x.isub(p),w.isub(o)):(h.isub(l),p.isub(x),o.isub(w))}return{a:p,b:o,gcd:h.iushln(d)}},i.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var l=this,h=c.clone();l.negative!==0?l=l.umod(c):l=l.clone();for(var x=new i(1),w=new i(0),p=h.clone();l.cmpn(1)>0&&h.cmpn(1)>0;){for(var o=0,d=1;(l.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(l.iushrn(o);o-- >0;)x.isOdd()&&x.iadd(p),x.iushrn(1);for(var M=0,C=1;(h.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(h.iushrn(M);M-- >0;)w.isOdd()&&w.iadd(p),w.iushrn(1);l.cmp(h)>=0?(l.isub(h),x.isub(w)):(h.isub(l),w.isub(x))}var P;return l.cmpn(1)===0?P=x:P=w,P.cmpn(0)<0&&P.iadd(c),P},i.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var l=this.clone(),h=c.clone();l.negative=0,h.negative=0;for(var x=0;l.isEven()&&h.isEven();x++)l.iushrn(1),h.iushrn(1);do{for(;l.isEven();)l.iushrn(1);for(;h.isEven();)h.iushrn(1);var w=l.cmp(h);if(w<0){var p=l;l=h,h=p}else if(w===0||h.cmpn(1)===0)break;l.isub(h)}while(!0);return h.iushln(x)},i.prototype.invm=function(c){return this.egcd(c).a.umod(c)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(c){return this.words[0]&c},i.prototype.bincn=function(c){n(typeof c=="number");var l=c%26,h=(c-l)/26,x=1<>>26,o&=67108863,this.words[p]=o}return w!==0&&(this.words[p]=w,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(c){var l=c<0;if(this.negative!==0&&!l)return-1;if(this.negative===0&&l)return 1;this._strip();var h;if(this.length>1)h=1;else{l&&(c=-c),n(c<=67108863,"Number is too big");var x=this.words[0]|0;h=x===c?0:xc.length)return 1;if(this.length=0;h--){var x=this.words[h]|0,w=c.words[h]|0;if(x!==w){xw&&(l=1);break}}return l},i.prototype.gtn=function(c){return this.cmpn(c)===1},i.prototype.gt=function(c){return this.cmp(c)===1},i.prototype.gten=function(c){return this.cmpn(c)>=0},i.prototype.gte=function(c){return this.cmp(c)>=0},i.prototype.ltn=function(c){return this.cmpn(c)===-1},i.prototype.lt=function(c){return this.cmp(c)===-1},i.prototype.lten=function(c){return this.cmpn(c)<=0},i.prototype.lte=function(c){return this.cmp(c)<=0},i.prototype.eqn=function(c){return this.cmpn(c)===0},i.prototype.eq=function(c){return this.cmp(c)===0},i.red=function(c){return new y(c)},i.prototype.toRed=function(c){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(c){return this.red=c,this},i.prototype.forceRed=function(c){return n(!this.red,"Already a number in reduction context"),this._forceRed(c)},i.prototype.redAdd=function(c){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},i.prototype.redIAdd=function(c){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},i.prototype.redSub=function(c){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},i.prototype.redISub=function(c){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},i.prototype.redShl=function(c){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},i.prototype.redMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},i.prototype.redIMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(c){return n(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var G={k256:null,p224:null,p192:null,p25519:null};function re(f,c){this.name=f,this.p=new i(c,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}re.prototype._tmp=function(){var c=new i(null);return c.words=new Array(Math.ceil(this.n/13)),c},re.prototype.ireduce=function(c){var l=c,h;do this.split(l,this.tmp),l=this.imulK(l),l=l.iadd(this.tmp),h=l.bitLength();while(h>this.n);var x=h0?l.isub(this.p):l.strip!==void 0?l.strip():l._strip(),l},re.prototype.split=function(c,l){c.iushrn(this.n,0,l)},re.prototype.imulK=function(c){return c.imul(this.k)};function ne(){re.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(ne,re),ne.prototype.split=function(c,l){for(var h=4194303,x=Math.min(c.length,9),w=0;w>>22,p=o}p>>>=22,c.words[w-10]=p,p===0&&c.length>10?c.length-=10:c.length-=9},ne.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var l=0,h=0;h>>=26,c.words[h]=w,l=x}return l!==0&&(c.words[c.length++]=l),c},i._prime=function(c){if(G[c])return G[c];var l;if(c==="k256")l=new ne;else if(c==="p224")l=new Y;else if(c==="p192")l=new W;else if(c==="p25519")l=new se;else throw new Error("Unknown prime "+c);return G[c]=l,l};function y(f){if(typeof f=="string"){var c=i._prime(f);this.m=c.p,this.prime=c}else n(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}y.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},y.prototype._verify2=function(c,l){n((c.negative|l.negative)===0,"red works only with positives"),n(c.red&&c.red===l.red,"red works only with red numbers")},y.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(g(c,c.umod(this.m)._forceRed(this)),c)},y.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},y.prototype.add=function(c,l){this._verify2(c,l);var h=c.add(l);return h.cmp(this.m)>=0&&h.isub(this.m),h._forceRed(this)},y.prototype.iadd=function(c,l){this._verify2(c,l);var h=c.iadd(l);return h.cmp(this.m)>=0&&h.isub(this.m),h},y.prototype.sub=function(c,l){this._verify2(c,l);var h=c.sub(l);return h.cmpn(0)<0&&h.iadd(this.m),h._forceRed(this)},y.prototype.isub=function(c,l){this._verify2(c,l);var h=c.isub(l);return h.cmpn(0)<0&&h.iadd(this.m),h},y.prototype.shl=function(c,l){return this._verify1(c),this.imod(c.ushln(l))},y.prototype.imul=function(c,l){return this._verify2(c,l),this.imod(c.imul(l))},y.prototype.mul=function(c,l){return this._verify2(c,l),this.imod(c.mul(l))},y.prototype.isqr=function(c){return this.imul(c,c.clone())},y.prototype.sqr=function(c){return this.mul(c,c)},y.prototype.sqrt=function(c){if(c.isZero())return c.clone();var l=this.m.andln(3);if(n(l%2===1),l===3){var h=this.m.add(new i(1)).iushrn(2);return this.pow(c,h)}for(var x=this.m.subn(1),w=0;!x.isZero()&&x.andln(1)===0;)w++,x.iushrn(1);n(!x.isZero());var p=new i(1).toRed(this),o=p.redNeg(),d=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new i(2*M*M).toRed(this);this.pow(M,d).cmp(o)!==0;)M.redIAdd(o);for(var C=this.pow(M,x),P=this.pow(c,x.addn(1).iushrn(1)),S=this.pow(c,x),I=w;S.cmp(p)!==0;){for(var U=S,V=0;U.cmp(p)!==0;V++)U=U.redSqr();n(V=0;w--){for(var C=l.words[w],P=M-1;P>=0;P--){var S=C>>P&1;if(p!==x[0]&&(p=this.sqr(p)),S===0&&o===0){d=0;continue}o<<=1,o|=S,d++,!(d!==h&&(w!==0||P!==0))&&(p=this.mul(p,x[o]),d=0,o=0)}M=26}return p},y.prototype.convertTo=function(c){var l=c.umod(this.m);return l===c?l.clone():l},y.prototype.convertFrom=function(c){var l=c.clone();return l.red=null,l},i.mont=function(c){return new a(c)};function a(f){y.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(a,y),a.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},a.prototype.convertFrom=function(c){var l=this.imod(c.mul(this.rinv));return l.red=null,l},a.prototype.imul=function(c,l){if(c.isZero()||l.isZero())return c.words[0]=0,c.length=1,c;var h=c.imul(l),x=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=h.isub(x).iushrn(this.shift),p=w;return w.cmp(this.m)>=0?p=w.isub(this.m):w.cmpn(0)<0&&(p=w.iadd(this.m)),p._forceRed(this)},a.prototype.mul=function(c,l){if(c.isZero()||l.isZero())return new i(0)._forceRed(this);var h=c.mul(l),x=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=h.isub(x).iushrn(this.shift),p=w;return w.cmp(this.m)>=0?p=w.isub(this.m):w.cmpn(0)<0&&(p=w.iadd(this.m)),p._forceRed(this)},a.prototype.invm=function(c){var l=this.imod(c._invmp(this.m).mul(this.r2));return l._forceRed(this)}})(t,ue)})(m0);const ft=m0.exports,U7="logger/5.7.0";let $m=!1,qm=!1;const Cc={debug:1,default:2,info:2,warning:3,error:4,off:5};let Hm=Cc.default,Wu=null;function K7(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{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}const zm=K7();var Yc;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Yc||(Yc={}));var On;(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"})(On||(On={}));const jm="0123456789abcdef";class de{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Cc[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Hm>Cc[n])&&console.log.apply(console,r)}debug(...e){this._log(de.levels.DEBUG,e)}info(...e){this._log(de.levels.INFO,e)}warn(...e){this._log(de.levels.WARNING,e)}makeError(e,r,n){if(qm)return this.makeError("censored error",r,{});r||(r=de.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(b=>{const m=n[b];try{if(m instanceof Uint8Array){let g="";for(let _=0;_>4],g+=jm[m[_]&15];s.push(b+"=Uint8Array(0x"+g+")")}else s.push(b+"="+JSON.stringify(m))}catch{s.push(b+"="+JSON.stringify(n[b].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let u="";switch(r){case On.NUMERIC_FAULT:{u="NUMERIC_FAULT";const b=e;switch(b){case"overflow":case"underflow":case"division-by-zero":u+="-"+b;break;case"negative-power":case"negative-width":u+="-unsupported";break;case"unbound-bitwise-result":u+="-unbound-result";break}break}case On.CALL_EXCEPTION:case On.INSUFFICIENT_FUNDS:case On.MISSING_NEW:case On.NONCE_EXPIRED:case On.REPLACEMENT_UNDERPRICED:case On.TRANSACTION_REPLACED:case On.UNPREDICTABLE_GAS_LIMIT:u=r;break}u&&(e+=" [ See: https://links.ethers.org/v5-errors-"+u+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const v=new Error(e);return v.reason=i,v.code=r,Object.keys(n).forEach(function(b){v[b]=n[b]}),v}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,de.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){zm&&this.throwError("platform missing String.prototype.normalize",de.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:zm})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,de.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,de.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,de.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",de.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",de.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",de.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Wu||(Wu=new de(U7)),Wu}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",de.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),$m){if(!e)return;this.globalLogger().throwError("error censorship permanent",de.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}qm=!!e,$m=!!r}static setLogLevel(e){const r=Cc[e.toLowerCase()];if(r==null){de.globalLogger().warn("invalid log level - "+e);return}Hm=r}static from(e){return new de(e)}}de.errors=On;de.levels=Yc;const $7=Object.freeze(Object.defineProperty({__proto__:null,get LogLevel(){return Yc},get ErrorCode(){return On},Logger:de},Symbol.toStringTag,{value:"Module"})),q7="bytes/5.7.0",fr=new de(q7);function s6(t){return!!t.toHexString}function ys(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ys(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function g0(t){return dt(t)&&!(t.length%2)||ko(t)}function Gm(t){return typeof t=="number"&&t==t&&t%1===0}function ko(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Gm(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Fe(t,e){if(e||(e={}),typeof t=="number"){fr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ys(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),s6(t)&&(t=t.toHexString()),dt(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":fr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sFe(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),ys(n)}function Ri(t){let e=Fe(t);if(e.length===0)return e;let r=0;for(;re&&fr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ys(r)}function dt(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Zu="0123456789abcdef";function Ue(t,e){if(e||(e={}),typeof t=="number"){fr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Zu[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),s6(t))return t.toHexString();if(dt(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":fr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(ko(t)){let r="0x";for(let n=0;n>4]+Zu[s&15]}return r}return fr.throwArgumentError("invalid hexlify value","value",t)}function Ii(t){if(typeof t!="string")t=Ue(t);else if(!dt(t)||t.length%2)return null;return(t.length-2)/2}function hr(t,e,r){return typeof t!="string"?t=Ue(t):(!dt(t)||t.length%2)&&fr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function an(t){let e="0x";return t.forEach(r=>{e+=Ue(r).substring(2)}),e}function Bs(t){const e=f6(Ue(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function f6(t){typeof t!="string"&&(t=Ue(t)),dt(t)||fr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&fr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Po(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(g0(t)){let r=Fe(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Ue(r.slice(0,32)),e.s=Ue(r.slice(32,64))):r.length===65?(e.r=Ue(r.slice(0,32)),e.s=Ue(r.slice(32,64)),e.v=r[64]):fr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:fr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Ue(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,e._vs!=null){const s=Of(Fe(e._vs),32);e._vs=Ue(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&fr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const u=Ue(s);e.s==null?e.s=u:e.s!==u&&fr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?fr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&fr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!dt(e.r)?fr.throwArgumentError("signature missing or invalid r","signature",t):e.r=Zt(e.r,32),e.s==null||!dt(e.s)?fr.throwArgumentError("signature missing or invalid s","signature",t):e.s=Zt(e.s,32);const r=Fe(e.s);r[0]>=128&&fr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Ue(r);e._vs&&(dt(e._vs)||fr.throwArgumentError("signature invalid _vs","signature",t),e._vs=Zt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&fr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Cp(t){return t=Po(t),Ue(Xt([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const H7=Object.freeze(Object.defineProperty({__proto__:null,isBytesLike:g0,isBytes:ko,arrayify:Fe,concat:Xt,stripZeros:Ri,zeroPad:Of,isHexString:dt,hexlify:Ue,hexDataLength:Ii,hexDataSlice:hr,hexConcat:an,hexValue:Bs,hexStripZeros:f6,hexZeroPad:Zt,splitSignature:Po,joinSignature:Cp},Symbol.toStringTag,{value:"Module"})),c6="bignumber/5.7.0";var Qf=ft.BN;const Vi=new de(c6),Ju={},Vm=9007199254740991;function z7(t){return t!=null&&(Le.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||dt(t)||typeof t=="bigint"||ko(t))}let Wm=!1;class Le{constructor(e,r){e!==Ju&&Vi.throwError("cannot call constructor directly; use BigNumber.from",de.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return fn(yt(this).fromTwos(e))}toTwos(e){return fn(yt(this).toTwos(e))}abs(){return this._hex[0]==="-"?Le.from(this._hex.substring(1)):this}add(e){return fn(yt(this).add(yt(e)))}sub(e){return fn(yt(this).sub(yt(e)))}div(e){return Le.from(e).isZero()&&Nn("division-by-zero","div"),fn(yt(this).div(yt(e)))}mul(e){return fn(yt(this).mul(yt(e)))}mod(e){const r=yt(e);return r.isNeg()&&Nn("division-by-zero","mod"),fn(yt(this).umod(r))}pow(e){const r=yt(e);return r.isNeg()&&Nn("negative-power","pow"),fn(yt(this).pow(r))}and(e){const r=yt(e);return(this.isNegative()||r.isNeg())&&Nn("unbound-bitwise-result","and"),fn(yt(this).and(r))}or(e){const r=yt(e);return(this.isNegative()||r.isNeg())&&Nn("unbound-bitwise-result","or"),fn(yt(this).or(r))}xor(e){const r=yt(e);return(this.isNegative()||r.isNeg())&&Nn("unbound-bitwise-result","xor"),fn(yt(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Nn("negative-width","mask"),fn(yt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Nn("negative-width","shl"),fn(yt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Nn("negative-width","shr"),fn(yt(this).shrn(e))}eq(e){return yt(this).eq(yt(e))}lt(e){return yt(this).lt(yt(e))}lte(e){return yt(this).lte(yt(e))}gt(e){return yt(this).gt(yt(e))}gte(e){return yt(this).gte(yt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return yt(this).isZero()}toNumber(){try{return yt(this).toNumber()}catch{Nn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Vi.throwError("this platform does not support BigInt",de.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Wm||(Wm=!0,Vi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Vi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",de.errors.UNEXPECTED_ARGUMENT,{}):Vi.throwError("BigNumber.toString does not accept parameters",de.errors.UNEXPECTED_ARGUMENT,{})),yt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Le)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Le(Ju,e0(e)):e.match(/^-?[0-9]+$/)?new Le(Ju,e0(new Qf(e))):Vi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Nn("underflow","BigNumber.from",e),(e>=Vm||e<=-Vm)&&Nn("overflow","BigNumber.from",e),Le.from(String(e));const r=e;if(typeof r=="bigint")return Le.from(r.toString());if(ko(r))return Le.from(Ue(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Le.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(dt(n)||n[0]==="-"&&dt(n.substring(1))))return Le.from(n)}return Vi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function e0(t){if(typeof t!="string")return e0(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Vi.throwArgumentError("invalid hex","value",t),t=e0(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function fn(t){return Le.from(e0(t))}function yt(t){const e=Le.from(t).toHexString();return e[0]==="-"?new Qf("-"+e.substring(3),16):new Qf(e.substring(2),16)}function Nn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Vi.throwError(t,de.errors.NUMERIC_FAULT,n)}function j7(t){return new Qf(t,36).toString(16)}function G7(t){return new Qf(t,16).toString(36)}const on=new de(c6),Ff={},l6=Le.from(0),u6=Le.from(-1);function d6(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),on.throwError(t,de.errors.NUMERIC_FAULT,s)}let Lf="0";for(;Lf.length<256;)Lf+=Lf;function I1(t){if(typeof t!="number")try{t=Le.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Lf.substring(0,t):on.throwArgumentError("invalid decimal size","decimals",t)}function Bc(t,e){e==null&&(e=0);const r=I1(e);t=Le.from(t);const n=t.lt(l6);n&&(t=t.mul(u6));let s=t.mod(r).toString();for(;s.length2&&on.throwArgumentError("too many decimal points","value",t);let i=s[0],u=s[1];for(i||(i="0"),u||(u="0");u[u.length-1]==="0";)u=u.substring(0,u.length-1);for(u.length>r.length-1&&d6("fractional component exceeds decimals","underflow","parseFixed"),u===""&&(u="0");u.lengthe[u]==null?b:(typeof e[u]!==v&&on.throwArgumentError("invalid fixed format ("+u+" not "+v+")","format."+u,e[u]),e[u]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&on.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&on.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new xs(Ff,r,n,s)}}class Fr{constructor(e,r,n,s){e!==Ff&&on.throwError("cannot use FixedNumber constructor; use FixedNumber.from",de.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&on.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=pi(this._value,this.format.decimals),n=pi(e._value,e.format.decimals);return Fr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Fr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Zm.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Fr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Zm.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&on.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Fr.from("1"+Lf.substring(0,e),this.format),s=V7.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&on.throwArgumentError("invalid byte width","width",e);const r=Le.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Zt(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Fr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!z7(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Fr.fromString(Bc(e,r),xs.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=xs.from(r),s=pi(e,n.decimals);!n.signed&&s.lt(l6)&&d6("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=Zt(i,n.width/8));const u=Bc(s,n.decimals);return new Fr(Ff,i,u,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=xs.from(r);if(Fe(e).length>n.width/8)throw new Error("overflow");let s=Le.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),u=Bc(s,n.decimals);return new Fr(Ff,i,u,n)}static from(e,r){if(typeof e=="string")return Fr.fromString(e,r);if(ko(e))return Fr.fromBytes(e,r);try{return Fr.fromValue(e,0,r)}catch(n){if(n.code!==de.errors.INVALID_ARGUMENT)throw n}return on.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Zm=Fr.from(1),V7=Fr.from("0.5"),W7="properties/5.7.0";var Z7=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const Qc=new de(W7);function De(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ri(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function cr(t){return Z7(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function D1(t,e){(!t||typeof t!="object")&&Qc.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||Qc.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function rr(t){const e={};for(const r in t)e[r]=t[r];return e}const J7={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h6(t){if(t==null||J7[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rMn(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&De(e,r,Mn(n))}return e}return Qc.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Mn(t){return X7(t)}class Ka{constructor(e){for(const r in e)this[r]=Mn(e[r])}}const Y7=Object.freeze(Object.defineProperty({__proto__:null,defineReadOnly:De,getStatic:ri,resolveProperties:cr,checkProperties:D1,shallowCopy:rr,deepCopy:Mn,Description:Ka},Symbol.toStringTag,{value:"Module"})),b0="abi/5.7.0",wt=new de(b0),Eo={};let Jm={calldata:!0,memory:!0,storage:!0},Q7={calldata:!0,memory:!0};function Z0(t,e){if(t==="bytes"||t==="string"){if(Jm[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Q7[e])return!0;return(Jm[e]||e==="payable")&&wt.throwArgumentError("invalid modifier","name",e),!1}function e_(t,e){let r=t;function n(v){wt.throwArgumentError(`unexpected character at position ${v}`,"param",t)}t=t.replace(/\s/g," ");function s(v){let b={type:"",name:"",parent:v,state:{allowType:!0}};return e&&(b.indexed=!1),b}let i={type:"",name:"",state:{allowType:!0}},u=i;for(let v=0;vJSON.parse(s.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Et.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Et.full?", ":",")+")"):r+=this.type,e!==Et.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Et.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Ar.fromString(e,r):Ar.fromObject(e)}static fromObject(e){return Ar.isParamType(e)?e:new Ar(Eo,{name:e.name||null,type:ts(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Ar.fromObject):null})}static fromString(e,r){function n(s){return Ar.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(e_(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function t0(t,e){return n_(t).map(r=>Ar.fromString(r,e))}class Ai{constructor(e,r){e!==Eo&&wt.throwError("use a static from method",de.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Nc(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Ai.isFragment(e)?e:typeof e=="string"?Ai.fromString(e):Ai.fromObject(e)}static fromObject(e){if(Ai.isFragment(e))return e;switch(e.type){case"function":return ei.fromObject(e);case"event":return Mi.fromObject(e);case"constructor":return Qn.fromObject(e);case"error":return Ji.fromObject(e);case"fallback":case"receive":return null}return wt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Mi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?ei.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Qn.fromString(e.trim()):e.split(" ")[0]==="error"?Ji.fromString(e.substring(5).trim()):wt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Mi extends Ai{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Et.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ",e!==Et.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Mi.fromString(e):Mi.fromObject(e)}static fromObject(e){if(Mi.isEventFragment(e))return e;e.type!=="event"&&wt.throwArgumentError("invalid event object","value",e);const r={name:r0(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Ar.fromObject):[],type:"event"};return new Mi(Eo,r)}static fromString(e){let r=e.match(n0);r||wt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:wt.warn("unknown modifier: "+s)}}),Mi.fromObject({name:r[1].trim(),anonymous:n,inputs:t0(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function p6(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&wt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||wt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Le.from(r[1]),r[0]):t}function v6(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.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: "+r)}})}function m6(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&wt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&wt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&wt.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&&wt.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&wt.throwArgumentError("unable to determine stateMutability","value",t),e}class Qn extends Ai{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Et.sighash&&wt.throwError("cannot format a constructor for sighash",de.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Qn.fromString(e):Qn.fromObject(e)}static fromObject(e){if(Qn.isConstructorFragment(e))return e;e.type!=="constructor"&&wt.throwArgumentError("invalid constructor object","value",e);let r=m6(e);r.constant&&wt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Le.from(e.gas):null};return new Qn(Eo,n)}static fromString(e){let r={type:"constructor"};e=p6(e,r);let n=e.match(n0);return(!n||n[1].trim()!=="constructor")&&wt.throwArgumentError("invalid constructor string","value",e),r.inputs=t0(n[2].trim(),!1),v6(n[3].trim(),r),Qn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class ei extends Qn{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Et.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ",e!==Et.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?ei.fromString(e):ei.fromObject(e)}static fromObject(e){if(ei.isFunctionFragment(e))return e;e.type!=="function"&&wt.throwArgumentError("invalid function object","value",e);let r=m6(e);const n={type:e.type,name:r0(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Ar.fromObject):[],outputs:e.outputs?e.outputs.map(Ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Le.from(e.gas):null};return new ei(Eo,n)}static fromString(e){let r={type:"function"};e=p6(e,r);let n=e.split(" returns ");n.length>2&&wt.throwArgumentError("invalid function string","value",e);let s=n[0].match(n0);if(s||wt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&r0(r.name),r.inputs=t0(s[2],!1),v6(s[3].trim(),r),n.length>1){let i=n[1].match(n0);(i[1].trim()!=""||i[3].trim()!="")&&wt.throwArgumentError("unexpected tokens","value",e),r.outputs=t0(i[2],!1)}else r.outputs=[];return ei.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Xm(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&wt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Ji extends Ai{format(e){if(e||(e=Et.sighash),Et[e]||wt.throwArgumentError("invalid format type","format",e),e===Et.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Et.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Et.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Ji.fromString(e):Ji.fromObject(e)}static fromObject(e){if(Ji.isErrorFragment(e))return e;e.type!=="error"&&wt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:r0(e.name),inputs:e.inputs?e.inputs.map(Ar.fromObject):[]};return Xm(new Ji(Eo,r))}static fromString(e){let r={type:"error"},n=e.match(n0);return n||wt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&r0(r.name),r.inputs=t0(n[2],!1),Xm(Ji.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function ts(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const r_=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function r0(t){return(!t||!t.match(r_))&&wt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const n0=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function n_(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&O1.throwError("value out-of-bounds",de.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Xt([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class el{constructor(e,r,n,s){De(this,"_data",Fe(e)),De(this,"wordSize",r||32),De(this,"_coerceFunc",n),De(this,"allowLoose",s),this._offset=0}get data(){return Ue(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):el.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:O1.throwError("data out-of-bounds",de.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new el(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return Le.from(this.readBytes(this.wordSize))}}var Kl={exports:{}};(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",s=n?window:{};s.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",u=!s.JS_SHA3_NO_NODE_JS&&typeof Je.exports=="object"&&Je.exports.versions&&Je.exports.versions.node;u?s=ue:i&&(s=self);var v=!s.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,b=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),g=[31,7936,2031616,520093696],_=[4,1024,262144,67108864],A=[1,256,65536,16777216],E=[6,1536,393216,100663296],R=[0,8,16,24],B=[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],T=[224,256,384,512],F=[128,256],O=["hex","buffer","arrayBuffer","array","digest"],q={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(S){return Object.prototype.toString.call(S)==="[object Array]"}),b&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(S){return typeof S=="object"&&S.buffer&&S.buffer.constructor===ArrayBuffer});for(var H=function(S,I,U){return function(V){return new M(S,I,S).update(V)[U]()}},G=function(S,I,U){return function(V,z){return new M(S,I,z).update(V)[U]()}},re=function(S,I,U){return function(V,z,X,j){return c["cshake"+S].update(V,z,X,j)[U]()}},ne=function(S,I,U){return function(V,z,X,j){return c["kmac"+S].update(V,z,X,j)[U]()}},Y=function(S,I,U,V){for(var z=0;z>5,this.byteCount=this.blockCount<<2,this.outputBlocks=U>>5,this.extraBytes=(U&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}M.prototype.update=function(S){if(this.finalized)throw new Error(r);var I,U=typeof S;if(U!=="string"){if(U==="object"){if(S===null)throw new Error(e);if(b&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!b||!ArrayBuffer.isView(S)))throw new Error(e)}else throw new Error(e);I=!0}for(var V=this.blocks,z=this.byteCount,X=S.length,j=this.blockCount,N=0,$=this.s,ee,J;N>2]|=S[N]<>2]|=J<>2]|=(192|J>>6)<>2]|=(128|J&63)<=57344?(V[ee>>2]|=(224|J>>12)<>2]|=(128|J>>6&63)<>2]|=(128|J&63)<>2]|=(240|J>>18)<>2]|=(128|J>>12&63)<>2]|=(128|J>>6&63)<>2]|=(128|J&63)<=z){for(this.start=ee-z,this.block=V[j],ee=0;ee>8,U=S&255;U>0;)z.unshift(U),S=S>>8,U=S&255,++V;return I?z.push(V):z.unshift(V),this.update(z),z.length},M.prototype.encodeString=function(S){var I,U=typeof S;if(U!=="string"){if(U==="object"){if(S===null)throw new Error(e);if(b&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!b||!ArrayBuffer.isView(S)))throw new Error(e)}else throw new Error(e);I=!0}var V=0,z=S.length;if(I)V=z;else for(var X=0;X=57344?V+=3:(j=65536+((j&1023)<<10|S.charCodeAt(++X)&1023),V+=4)}return V+=this.encode(V*8),this.update(S),V},M.prototype.bytepad=function(S,I){for(var U=this.encode(I),V=0;V>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(S[0]=S[U],I=1;I>4&15]+m[N&15]+m[N>>12&15]+m[N>>8&15]+m[N>>20&15]+m[N>>16&15]+m[N>>28&15]+m[N>>24&15];X%S===0&&(P(I),z=0)}return V&&(N=I[z],j+=m[N>>4&15]+m[N&15],V>1&&(j+=m[N>>12&15]+m[N>>8&15]),V>2&&(j+=m[N>>20&15]+m[N>>16&15])),j},M.prototype.arrayBuffer=function(){this.finalize();var S=this.blockCount,I=this.s,U=this.outputBlocks,V=this.extraBytes,z=0,X=0,j=this.outputBits>>3,N;V?N=new ArrayBuffer(U+1<<2):N=new ArrayBuffer(j);for(var $=new Uint32Array(N);X>8&255,j[N+2]=$>>16&255,j[N+3]=$>>24&255;X%S===0&&P(I)}return V&&(N=X<<2,$=I[z],j[N]=$&255,V>1&&(j[N+1]=$>>8&255),V>2&&(j[N+2]=$>>16&255)),j};function C(S,I,U){M.call(this,S,I,U)}C.prototype=new M,C.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var P=function(S){var I,U,V,z,X,j,N,$,ee,J,K,D,k,L,te,Z,Q,Ie,ie,oe,Oe,ae,fe,Ke,le,Me,Ze,pe,Ae,ze,he,Ee,Ye,ve,Se,Qe,me,Re,et,ge,Ce,tt,be,Be,rt,ye,Ne,nt,xe,Te,it,we,ke,at,_e,Pe,Ge,Ve,pt,vt,mt,gt,bt;for(V=0;V<48;V+=2)z=S[0]^S[10]^S[20]^S[30]^S[40],X=S[1]^S[11]^S[21]^S[31]^S[41],j=S[2]^S[12]^S[22]^S[32]^S[42],N=S[3]^S[13]^S[23]^S[33]^S[43],$=S[4]^S[14]^S[24]^S[34]^S[44],ee=S[5]^S[15]^S[25]^S[35]^S[45],J=S[6]^S[16]^S[26]^S[36]^S[46],K=S[7]^S[17]^S[27]^S[37]^S[47],D=S[8]^S[18]^S[28]^S[38]^S[48],k=S[9]^S[19]^S[29]^S[39]^S[49],I=D^(j<<1|N>>>31),U=k^(N<<1|j>>>31),S[0]^=I,S[1]^=U,S[10]^=I,S[11]^=U,S[20]^=I,S[21]^=U,S[30]^=I,S[31]^=U,S[40]^=I,S[41]^=U,I=z^($<<1|ee>>>31),U=X^(ee<<1|$>>>31),S[2]^=I,S[3]^=U,S[12]^=I,S[13]^=U,S[22]^=I,S[23]^=U,S[32]^=I,S[33]^=U,S[42]^=I,S[43]^=U,I=j^(J<<1|K>>>31),U=N^(K<<1|J>>>31),S[4]^=I,S[5]^=U,S[14]^=I,S[15]^=U,S[24]^=I,S[25]^=U,S[34]^=I,S[35]^=U,S[44]^=I,S[45]^=U,I=$^(D<<1|k>>>31),U=ee^(k<<1|D>>>31),S[6]^=I,S[7]^=U,S[16]^=I,S[17]^=U,S[26]^=I,S[27]^=U,S[36]^=I,S[37]^=U,S[46]^=I,S[47]^=U,I=J^(z<<1|X>>>31),U=K^(X<<1|z>>>31),S[8]^=I,S[9]^=U,S[18]^=I,S[19]^=U,S[28]^=I,S[29]^=U,S[38]^=I,S[39]^=U,S[48]^=I,S[49]^=U,L=S[0],te=S[1],ye=S[11]<<4|S[10]>>>28,Ne=S[10]<<4|S[11]>>>28,pe=S[20]<<3|S[21]>>>29,Ae=S[21]<<3|S[20]>>>29,vt=S[31]<<9|S[30]>>>23,mt=S[30]<<9|S[31]>>>23,tt=S[40]<<18|S[41]>>>14,be=S[41]<<18|S[40]>>>14,ve=S[2]<<1|S[3]>>>31,Se=S[3]<<1|S[2]>>>31,Z=S[13]<<12|S[12]>>>20,Q=S[12]<<12|S[13]>>>20,nt=S[22]<<10|S[23]>>>22,xe=S[23]<<10|S[22]>>>22,ze=S[33]<<13|S[32]>>>19,he=S[32]<<13|S[33]>>>19,gt=S[42]<<2|S[43]>>>30,bt=S[43]<<2|S[42]>>>30,at=S[5]<<30|S[4]>>>2,_e=S[4]<<30|S[5]>>>2,Qe=S[14]<<6|S[15]>>>26,me=S[15]<<6|S[14]>>>26,Ie=S[25]<<11|S[24]>>>21,ie=S[24]<<11|S[25]>>>21,Te=S[34]<<15|S[35]>>>17,it=S[35]<<15|S[34]>>>17,Ee=S[45]<<29|S[44]>>>3,Ye=S[44]<<29|S[45]>>>3,Ke=S[6]<<28|S[7]>>>4,le=S[7]<<28|S[6]>>>4,Pe=S[17]<<23|S[16]>>>9,Ge=S[16]<<23|S[17]>>>9,Re=S[26]<<25|S[27]>>>7,et=S[27]<<25|S[26]>>>7,oe=S[36]<<21|S[37]>>>11,Oe=S[37]<<21|S[36]>>>11,we=S[47]<<24|S[46]>>>8,ke=S[46]<<24|S[47]>>>8,Be=S[8]<<27|S[9]>>>5,rt=S[9]<<27|S[8]>>>5,Me=S[18]<<20|S[19]>>>12,Ze=S[19]<<20|S[18]>>>12,Ve=S[29]<<7|S[28]>>>25,pt=S[28]<<7|S[29]>>>25,ge=S[38]<<8|S[39]>>>24,Ce=S[39]<<8|S[38]>>>24,ae=S[48]<<14|S[49]>>>18,fe=S[49]<<14|S[48]>>>18,S[0]=L^~Z&Ie,S[1]=te^~Q&ie,S[10]=Ke^~Me&pe,S[11]=le^~Ze&Ae,S[20]=ve^~Qe&Re,S[21]=Se^~me&et,S[30]=Be^~ye&nt,S[31]=rt^~Ne&xe,S[40]=at^~Pe&Ve,S[41]=_e^~Ge&pt,S[2]=Z^~Ie&oe,S[3]=Q^~ie&Oe,S[12]=Me^~pe&ze,S[13]=Ze^~Ae&he,S[22]=Qe^~Re&ge,S[23]=me^~et&Ce,S[32]=ye^~nt&Te,S[33]=Ne^~xe&it,S[42]=Pe^~Ve&vt,S[43]=Ge^~pt&mt,S[4]=Ie^~oe&ae,S[5]=ie^~Oe&fe,S[14]=pe^~ze&Ee,S[15]=Ae^~he&Ye,S[24]=Re^~ge&tt,S[25]=et^~Ce&be,S[34]=nt^~Te&we,S[35]=xe^~it&ke,S[44]=Ve^~vt>,S[45]=pt^~mt&bt,S[6]=oe^~ae&L,S[7]=Oe^~fe&te,S[16]=ze^~Ee&Ke,S[17]=he^~Ye&le,S[26]=ge^~tt&ve,S[27]=Ce^~be&Se,S[36]=Te^~we&Be,S[37]=it^~ke&rt,S[46]=vt^~gt&at,S[47]=mt^~bt&_e,S[8]=ae^~L&Z,S[9]=fe^~te&Q,S[18]=Ee^~Ke&Me,S[19]=Ye^~le&Ze,S[28]=tt^~ve&Qe,S[29]=be^~Se&me,S[38]=we^~Be&ye,S[39]=ke^~rt&Ne,S[48]=gt^~at&Pe,S[49]=bt^~_e&Ge,S[0]^=B[V],S[1]^=B[V+1]};if(v)t.exports=c;else for(h=0;h>=8;return e}function Qm(t,e,r){let n=0;for(let s=0;se+1+n&&bi.throwError("child data too short",de.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function y6(t,e){if(t.length===0&&bi.throwError("data too short",de.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&bi.throwError("data short segment too short",de.errors.BUFFER_OVERRUN,{});const n=Qm(t,e+1,r);return e+1+r+n>t.length&&bi.throwError("data long segment too short",de.errors.BUFFER_OVERRUN,{}),e2(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&bi.throwError("data array too short",de.errors.BUFFER_OVERRUN,{}),e2(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&bi.throwError("data array too short",de.errors.BUFFER_OVERRUN,{});const n=Qm(t,e+1,r);e+1+r+n>t.length&&bi.throwError("data array too short",de.errors.BUFFER_OVERRUN,{});const s=Ue(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&bi.throwError("data too short",de.errors.BUFFER_OVERRUN,{});const n=Ue(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Ue(t[e])}}function $l(t){const e=Fe(t),r=y6(e,0);return r.consumed!==e.length&&bi.throwArgumentError("invalid rlp data","data",t),r.result}const s_=Object.freeze(Object.defineProperty({__proto__:null,encode:So,decode:$l},Symbol.toStringTag,{value:"Module"})),f_="address/5.7.0",Sa=new de(f_);function t2(t){dt(t,20)||Sa.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=Fe(Gt(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const c_=9007199254740991;function l_(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const F1={};for(let t=0;t<10;t++)F1[String(t)]=String(t);for(let t=0;t<26;t++)F1[String.fromCharCode(65+t)]=String(10+t);const r2=Math.floor(l_(c_));function x6(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>F1[n]).join("");for(;e.length>=r2;){let n=e.substring(0,r2);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function jt(t){let e=null;if(typeof t!="string"&&Sa.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=t2(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Sa.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)!==x6(t)&&Sa.throwArgumentError("bad icap checksum","address",t),e=j7(t.substring(4));e.length<40;)e="0"+e;e=t2("0x"+e)}else Sa.throwArgumentError("invalid address","address",t);return e}function u_(t){try{return jt(t),!0}catch{}return!1}function d_(t){let e=G7(jt(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+x6("XE00"+e)+e}function L1(t){let e=null;try{e=jt(t.from)}catch{Sa.throwArgumentError("missing from address","transaction",t)}const r=Ri(Fe(Le.from(t.nonce).toHexString()));return jt(hr(Gt(So([e,r])),12))}function h_(t,e,r){return Ii(e)!==32&&Sa.throwArgumentError("salt must be 32 bytes","salt",e),Ii(r)!==32&&Sa.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),jt(hr(Gt(Xt(["0xff",jt(t),e,r])),12))}const p_=Object.freeze(Object.defineProperty({__proto__:null,getAddress:jt,isAddress:u_,getIcapAddress:d_,getContractAddress:L1,getCreate2Address:h_},Symbol.toStringTag,{value:"Module"}));class v_ extends ca{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=jt(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return jt(Zt(e.readValue().toHexString(),20))}}class m_ extends ca{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const fs=new de(b0);function w6(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let b={};n=e.map(m=>{const g=m.localName;return g||fs.throwError("cannot encode object for signature with missing names",de.errors.INVALID_ARGUMENT,{argument:"values",coder:m,value:r}),b[g]&&fs.throwError("cannot encode object for signature with duplicate names",de.errors.INVALID_ARGUMENT,{argument:"values",coder:m,value:r}),b[g]=!0,r[g]})}else fs.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&fs.throwArgumentError("types/value length mismatch","tuple",r);let s=new Bp(t.wordSize),i=new Bp(t.wordSize),u=[];e.forEach((b,m)=>{let g=n[m];if(b.dynamic){let _=i.length;b.encode(i,g);let A=s.writeUpdatableValue();u.push(E=>{A(E+_)})}else b.encode(s,g)}),u.forEach(b=>{b(s.length)});let v=t.appendWriter(s);return v+=t.appendWriter(i),v}function _6(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let u=null;if(i.dynamic){let v=t.readValue(),b=n.subReader(v.toNumber());try{u=i.decode(b)}catch(m){if(m.code===de.errors.BUFFER_OVERRUN)throw m;u=m,u.baseType=i.name,u.name=i.localName,u.type=i.type}}else try{u=i.decode(t)}catch(v){if(v.code===de.errors.BUFFER_OVERRUN)throw v;u=v,u.baseType=i.name,u.name=i.localName,u.type=i.type}u!=null&&r.push(u)});const s=e.reduce((i,u)=>{const v=u.localName;return v&&(i[v]||(i[v]=0),i[v]++),i},{});e.forEach((i,u)=>{let v=i.localName;if(!v||s[v]!==1||(v==="length"&&(v="_length"),r[v]!=null))return;const b=r[u];b instanceof Error?Object.defineProperty(r,v,{enumerable:!0,get:()=>{throw b}}):r[v]=b});for(let i=0;i{throw u}})}return Object.freeze(r)}class g_ extends ca{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&fs.throwError("insufficient data length",de.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;u++)i++;return i}return t===dn.OVERRUN?r.length-e-1:0}function C_(t,e,r,n,s){return t===dn.OVERLONG?(n.push(s),0):(n.push(65533),C6(t,e,r))}const B6=Object.freeze({error:R_,ignore:C6,replace:C_});function U1(t,e){e==null&&(e=B6.error),t=Fe(t);const r=[];let n=0;for(;n>7===0){r.push(s);continue}let i=null,u=null;if((s&224)===192)i=1,u=127;else if((s&240)===224)i=2,u=2047;else if((s&248)===240)i=3,u=65535;else{(s&192)===128?n+=e(dn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(dn.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(dn.OVERRUN,n-1,t,r);continue}let v=s&(1<<8-i-1)-1;for(let b=0;b1114111){n+=e(dn.OUT_OF_RANGE,n-1-i,t,r,v);continue}if(v>=55296&&v<=57343){n+=e(dn.UTF16_SURROGATE,n-1-i,t,r,v);continue}if(v<=u){n+=e(dn.OVERLONG,n-1-i,t,r,v);continue}r.push(v)}}return r}function vr(t,e=Di.current){e!=Di.current&&(R6.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const u=65536+((s&1023)<<10)+(i&1023);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(u&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return Fe(r)}function Xu(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function B_(t,e){return'"'+U1(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Xu(r):(r-=65536,Xu((r>>10&1023)+55296)+Xu((r&1023)+56320))}).join("")+'"'}function Np(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function $a(t,e){return Np(U1(t,e))}function tl(t,e=Di.current){return U1(vr(t,e))}function N_(t){const e=vr(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Ue(Xt([e,S6]).slice(0,32))}function T_(t){const e=Fe(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return $a(e.slice(0,r))}function k_(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function N6(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function $1(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const P_=N6("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),I_="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),D_=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],O_=K1("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),F_=K1("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),L_=K1("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",k_),U_=N6("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function K_(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function $_(t){return!!$1(t,P_)}function q_(t){let e=$1(t,D_);if(e)return[t+e.s];let r=O_[t];if(r)return r;let n=F_[t];if(n)return[t+n[0]];let s=L_[t];return s||null}function H_(t){return!!$1(t,U_)}function z_(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=tl(t);e=K_(e.map(n=>{if(I_.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=q_(n);return s||[n]})),e=tl(Np(e),Di.NFKC),e.forEach(n=>{if(H_(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if($_(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=Np(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const j_=Object.freeze(Object.defineProperty({__proto__:null,_toEscapedUtf8String:B_,toUtf8Bytes:vr,toUtf8CodePoints:tl,toUtf8String:$a,Utf8ErrorFuncs:B6,get Utf8ErrorReason(){return dn},get UnicodeNormalizationForm(){return Di},formatBytes32String:N_,parseBytes32String:T_,nameprep:z_},Symbol.toStringTag,{value:"Module"}));class G_ extends M6{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,vr(r))}decode(e){return $a(super.decode(e))}}class J0 extends ca{constructor(e,r){let n=!1;const s=[];e.forEach(u=>{u.dynamic&&(n=!0),s.push(u.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return w6(e,this.coders,r)}decode(e){return e.coerce(this.name,_6(e,this.coders))}}const X0=new de(b0),V_=new RegExp(/^bytes([0-9]*)$/),W_=new RegExp(/^(u?int)([0-9]*)$/);class T6{constructor(e){De(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new v_(e.name);case"bool":return new b_(e.name);case"string":return new G_(e.name);case"bytes":return new y_(e.name);case"array":return new g_(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new J0((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new w_(e.name)}let r=e.type.match(W_);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&X0.throwArgumentError("invalid "+r[1]+" bit length","param",e),new E_(n/8,r[1]==="int",e.name)}if(r=e.type.match(V_),r){let n=parseInt(r[1]);return(n===0||n>32)&&X0.throwArgumentError("invalid bytes length","param",e),new x_(n,e.name)}return X0.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new el(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new Bp(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(Ar.from(s)));return new J0(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&X0.throwError("types/values length mismatch",de.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(u=>this._getCoder(Ar.from(u))),s=new J0(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(u=>this._getCoder(Ar.from(u)));return new J0(s,"_").decode(this._getReader(Fe(r),n))}}const k6=new T6;function Ra(t){return Gt(vr(t))}const P6="hash/5.7.0";function q1(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(v)?s(v,u-1):r.push(v)})};return s(t,e),r}function J_(t){const e={};for(let r=0;r>--b&1}const _=31,A=Math.pow(2,_),E=A>>>1,R=E>>1,B=A-1;let T=0;for(let G=0;G<_;G++)T=T<<1|g();let F=[],O=0,q=A;for(;;){let G=Math.floor(((T-O+1)*s-1)/q),re=0,ne=n;for(;ne-re>1;){let se=re+ne>>>1;G>>1|g(),Y=Y<<1^E,W=(W^E)<<1|E|1;O=Y,q=1+W-Y}let H=n-4;return F.map(G=>{switch(G-H){case 3:return H+65792+(t[v++]<<16|t[v++]<<8|t[v++]);case 2:return H+256+(t[v++]<<8|t[v++]);case 1:return H+t[v++];default:return G-1}})}function Y_(t){let e=0;return()=>t[e++]}function Q_(t){return Y_(X_(t))}function eM(t){return t&1?~t>>1:t>>1}function tM(t,e){let r=Array(t);for(let n=0;ne[u]):r}function nM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(aM(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(oM(r,t))}return J_(I6(e))}function iM(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function D6(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[u].push(i));return n}function aM(t,e){let r=1+e(),n=e(),s=iM(e),i=D6(s.length,1+t,e);return I6(i.map((u,v)=>{const b=u[0],m=u.slice(1);return Array(s[v]).fill(void 0).map((g,_)=>{let A=_*n;return[b+_*r,m.map(E=>E+A)]})}))}function oM(t,e){let r=1+e();return D6(r,1+t,e).map(s=>[s[0],s.slice(1)])}function sM(t){let e=rl(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let m=rl(t,e);if(m.length==0)break;n.push({set:new Set(m),node:r()})}n.sort((m,g)=>g.set.size-m.set.size);let s=t(),i=s%3;s=s/3|0;let u=!!(s&1);s>>=1;let v=s==1,b=s==2;return{branches:n,valid:i,fe0f:u,save:v,check:b}}}function fM(){return Q_(q1("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=="))}const ql=fM(),cM=new Set(rl(ql)),lM=new Set(rl(ql)),uM=nM(ql),dM=sM(ql),i2=45,a2=95;function O6(t){return tl(t)}function hM(t){return t.filter(e=>e!=65039)}function F6(t){for(let e of t.split(".")){let r=O6(e);try{for(let n=r.lastIndexOf(a2)-1;n>=0;n--)if(r[n]!==a2)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===i2&&r[3]===i2)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function pM(t){return F6(vM(t,hM))}function vM(t,e){let r=O6(t).reverse(),n=[];for(;r.length;){let s=gM(r);if(s){n.push(...e(s));continue}let i=r.pop();if(cM.has(i)){n.push(i);continue}if(lM.has(i))continue;let u=uM[i];if(u){n.push(...u);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return F6(mM(String.fromCodePoint(...n)))}function mM(t){return t.normalize("NFC")}function gM(t,e){var r;let n=dM,s,i,u=[],v=t.length;for(e&&(e.length=0);v;){let b=t[--v];if(n=(r=n.branches.find(m=>m.set.has(b)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=b;else if(n.check&&b===i)break;u.push(b),n.fe0f&&(u.push(65039),v>0&&t[v-1]==65039&&v--),n.valid&&(s=u.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(v).reverse()),t.length=v)}return s}const bM=new de(P6),L6=new Uint8Array(32);L6.fill(0);function o2(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Hl(t){const e=vr(pM(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(o2(e.slice(n))),r}function yM(t){return Hl(t).map(e=>$a(e)).join(".")}function xM(t){try{return Hl(t).length!==0}catch{}return!1}function Uf(t){typeof t!="string"&&bM.throwArgumentError("invalid ENS name; not a string","name",t);let e=L6;const r=Hl(t);for(;r.length;)e=Gt(Xt([e,Gt(r.pop())]));return Ue(e)}function U6(t){return Ue(Xt(Hl(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const K6=`Ethereum Signed Message: +`;function z1(t){return typeof t=="string"&&(t=vr(t)),Gt(Xt([vr(K6),vr(String(t.length)),t]))}var wM=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const or=new de(P6),$6=new Uint8Array(32);$6.fill(0);const _M=Le.from(-1),q6=Le.from(0),H6=Le.from(1),MM=Le.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function AM(t){const e=Fe(t),r=e.length%32;return r?an([e,$6.slice(r)]):Ue(e)}const EM=Zt(H6.toHexString(),32),SM=Zt(q6.toHexString(),32),s2={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Yu=["name","version","chainId","verifyingContract","salt"];function f2(t){return function(e){return typeof e!="string"&&or.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const RM={name:f2("name"),version:f2("version"),chainId:function(t){try{return Le.from(t).toString()}catch{}return or.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return jt(t).toLowerCase()}catch{}return or.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Fe(t);if(e.length!==32)throw new Error("bad length");return Ue(e)}catch{}return or.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Qu(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))&&or.throwArgumentError("invalid numeric width","type",t);const s=MM.mask(r?n-1:n),i=r?s.add(H6).mul(_M):q6;return function(u){const v=Le.from(u);return(v.lt(i)||v.gt(s))&&or.throwArgumentError(`value out-of-bounds for ${t}`,"value",u),Zt(v.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&or.throwArgumentError("invalid bytes width","type",t),function(n){return Fe(n).length!==r&&or.throwArgumentError(`invalid length for ${t}`,"value",n),AM(n)}}}switch(t){case"address":return function(e){return Zt(jt(e),32)};case"bool":return function(e){return e?EM:SM};case"bytes":return function(e){return Gt(e)};case"string":return function(e){return Ra(e)}}return null}function c2(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Lr{constructor(e){De(this,"types",Object.freeze(Mn(e))),De(this,"_encoderCache",{}),De(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(v=>{r[v]={},n[v]=[],s[v]={}});for(const v in e){const b={};e[v].forEach(m=>{b[m.name]&&or.throwArgumentError(`duplicate variable name ${JSON.stringify(m.name)} in ${JSON.stringify(v)}`,"types",e),b[m.name]=!0;const g=m.type.match(/^([^\x5b]*)(\x5b|$)/)[1];g===v&&or.throwArgumentError(`circular type reference to ${JSON.stringify(g)}`,"types",e),!Qu(g)&&(n[g]||or.throwArgumentError(`unknown type ${JSON.stringify(g)}`,"types",e),n[g].push(v),r[v][g]=!0)})}const i=Object.keys(n).filter(v=>n[v].length===0);i.length===0?or.throwArgumentError("missing primary type","types",e):i.length>1&&or.throwArgumentError(`ambiguous primary types or unused types: ${i.map(v=>JSON.stringify(v)).join(", ")}`,"types",e),De(this,"primaryType",i[0]);function u(v,b){b[v]&&or.throwArgumentError(`circular type reference to ${JSON.stringify(v)}`,"types",e),b[v]=!0,Object.keys(r[v]).forEach(m=>{!n[m]||(u(m,b),Object.keys(b).forEach(g=>{s[g][m]=!0}))}),delete b[v]}u(this.primaryType,{});for(const v in s){const b=Object.keys(s[v]);b.sort(),this._types[v]=c2(v,e[v])+b.map(m=>c2(m,e[m])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=Qu(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),u=parseInt(r[3]);return v=>{u>=0&&v.length!==u&&or.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",v);let b=v.map(i);return this._types[s]&&(b=b.map(Gt)),Gt(an(b))}}const n=this.types[e];if(n){const s=Ra(this._types[e]);return i=>{const u=n.map(({name:v,type:b})=>{const m=this.getEncoder(b)(i[v]);return this._types[b]?Gt(m):m});return u.unshift(s),an(u)}}return or.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||or.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Gt(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Qu(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const u=s[1],v=parseInt(s[3]);return v>=0&&r.length!==v&&or.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(b=>this._visit(u,b,n))}const i=this.types[e];return i?i.reduce((u,{name:v,type:b})=>(u[v]=this._visit(b,r[v],n),u),{}):or.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Lr(e)}static getPrimaryType(e){return Lr.from(e).primaryType}static hashStruct(e,r,n){return Lr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=s2[n];s||or.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>Yu.indexOf(n.name)-Yu.indexOf(s.name)),Lr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return an(["0x1901",Lr.hashDomain(e),Lr.from(r).hash(n)])}static hash(e,r,n){return Gt(Lr.encode(e,r,n))}static resolveNames(e,r,n,s){return wM(this,void 0,void 0,function*(){e=rr(e);const i={};e.verifyingContract&&!dt(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const u=Lr.from(r);u.visit(n,(v,b)=>(v==="address"&&!dt(b,20)&&(i[b]="0x"),b));for(const v in i)i[v]=yield s(v);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=u.visit(n,(v,b)=>v==="address"&&i[b]?i[b]:b),{domain:e,value:n}})}static getPayload(e,r,n){Lr.hashDomain(e);const s={},i=[];Yu.forEach(b=>{const m=e[b];m!=null&&(s[b]=RM[b](m),i.push({name:b,type:s2[b]}))});const u=Lr.from(r),v=rr(r);return v.EIP712Domain?or.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):v.EIP712Domain=i,u.encode(n),{types:v,domain:s,primaryType:u.primaryType,message:u.visit(n,(b,m)=>{if(b.match(/^bytes(\d*)/))return Ue(Fe(m));if(b.match(/^u?int/))return Le.from(m).toString();switch(b){case"address":return m.toLowerCase();case"bool":return!!m;case"string":return typeof m!="string"&&or.throwArgumentError("invalid string","value",m),m}return or.throwArgumentError("unsupported type","type",b)})}}}const CM=Object.freeze(Object.defineProperty({__proto__:null,id:Ra,dnsEncode:U6,namehash:Uf,isValidName:xM,ensNormalize:yM,messagePrefix:K6,hashMessage:z1,_TypedDataEncoder:Lr},Symbol.toStringTag,{value:"Module"})),ar=new de(b0);class z6 extends Ka{}class j6 extends Ka{}class BM extends Ka{}class nl extends Ka{static isIndexed(e){return!!(e&&e._isIndexed)}}const NM={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function l2(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class ra{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,De(this,"fragments",r.map(n=>Ai.from(n)).filter(n=>n!=null)),De(this,"_abiCoder",ri(new.target,"getAbiCoder")()),De(this,"functions",{}),De(this,"errors",{}),De(this,"events",{}),De(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){ar.warn("duplicate definition - constructor");return}De(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){ar.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||De(this,"deploy",Qn.from({payable:!1,type:"constructor"})),De(this,"_isInterface",!0)}format(e){e||(e=Et.full),e===Et.sighash&&ar.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Et.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return k6}static getAddress(e){return jt(e)}static getSighash(e){return hr(Ra(e.format()),0,4)}static getEventTopic(e){return Ra(e.format())}getFunction(e){if(dt(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];ar.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?ar.throwArgumentError("no matching function","name",n):s.length>1&&ar.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[ei.fromString(e).format()];return r||ar.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(dt(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];ar.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?ar.throwArgumentError("no matching event","name",n):s.length>1&&ar.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[Mi.fromString(e).format()];return r||ar.throwArgumentError("no matching event","signature",e),r}getError(e){if(dt(e)){const n=ri(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}ar.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?ar.throwArgumentError("no matching error","name",n):s.length>1&&ar.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[ei.fromString(e).format()];return r||ar.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return ri(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ri(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=Fe(r);return Ue(n.slice(0,4))!==this.getSighash(e)&&ar.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Ue(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Ue(Xt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=Fe(r);return Ue(n.slice(0,4))!==this.getSighash(e)&&ar.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Ue(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Ue(Xt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=Fe(r),s=null,i="",u=null,v=null,b=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const m=Ue(n.slice(0,4)),g=NM[m];if(g)u=this._abiCoder.decode(g.inputs,n.slice(4)),v=g.name,b=g.signature,g.reason&&(s=u[0]),v==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(u[0])}`:v==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${u[0]}`);else try{const _=this.getError(m);u=this._abiCoder.decode(_.inputs,n.slice(4)),v=_.name,b=_.format()}catch{}break}}return ar.throwError("call revert exception"+i,de.errors.CALL_EXCEPTION,{method:e.format(),data:Ue(r),errorArgs:u,errorName:v,errorSignature:b,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Ue(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&ar.throwError("too many arguments for "+e.format(),de.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const s=(i,u)=>i.type==="string"?Ra(u):i.type==="bytes"?Gt(Ue(u)):(i.type==="bool"&&typeof u=="boolean"&&(u=u?"0x01":"0x00"),i.type.match(/^u?int/)&&(u=Le.from(u).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[u]),Zt(Ue(u),32));for(r.forEach((i,u)=>{let v=e.inputs[u];if(!v.indexed){i!=null&&ar.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+v.name,i);return}i==null?n.push(null):v.baseType==="array"||v.baseType==="tuple"?ar.throwArgumentError("filtering with tuples or arrays not supported","contract."+v.name,i):Array.isArray(i)?n.push(i.map(b=>s(v,b))):n.push(s(v,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&ar.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((u,v)=>{const b=r[v];if(u.indexed)if(u.type==="string")n.push(Ra(b));else if(u.type==="bytes")n.push(Gt(b));else{if(u.baseType==="tuple"||u.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([u.type],[b]))}else s.push(u),i.push(b)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let A=this.getEventTopic(e);(!dt(n[0],32)||n[0].toLowerCase()!==A)&&ar.throwError("fragment/topic mismatch",de.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:A,value:n[0]}),n=n.slice(1)}let s=[],i=[],u=[];e.inputs.forEach((A,E)=>{A.indexed?A.type==="string"||A.type==="bytes"||A.baseType==="tuple"||A.baseType==="array"?(s.push(Ar.fromObject({type:"bytes32",name:A.name})),u.push(!0)):(s.push(A),u.push(!1)):(i.push(A),u.push(!1))});let v=n!=null?this._abiCoder.decode(s,Xt(n)):null,b=this._abiCoder.decode(i,r,!0),m=[],g=0,_=0;e.inputs.forEach((A,E)=>{if(A.indexed)if(v==null)m[E]=new nl({_isIndexed:!0,hash:null});else if(u[E])m[E]=new nl({_isIndexed:!0,hash:v[_++]});else try{m[E]=v[_++]}catch(R){m[E]=R}else try{m[E]=b[g++]}catch(R){m[E]=R}if(A.name&&m[A.name]==null){const R=m[E];R instanceof Error?Object.defineProperty(m,A.name,{enumerable:!0,get:()=>{throw l2(`property ${JSON.stringify(A.name)}`,R)}}):m[A.name]=R}});for(let A=0;A{throw l2(`index ${A}`,E)}})}return Object.freeze(m)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new j6({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Le.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new z6({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Ue(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new BM({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const TM=Object.freeze(Object.defineProperty({__proto__:null,ConstructorFragment:Qn,ErrorFragment:Ji,EventFragment:Mi,Fragment:Ai,FunctionFragment:ei,ParamType:Ar,FormatTypes:Et,AbiCoder:T6,defaultAbiCoder:k6,Interface:ra,Indexed:nl,checkResultErrors:g6,LogDescription:z6,TransactionDescription:j6},Symbol.toStringTag,{value:"Module"}));var i0={};const G6=gr(TM),kM=gr(p_),PM=gr(Z_);class j1{constructor(e){De(this,"alphabet",e),De(this,"base",e.length),De(this,"_alphabetMap",{}),De(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(u%this.base),u=u/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function qM(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),s=0;s>6|192,r[n++]=i&63|128):$M(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}xt.htonl=W6;function zM(t,e){for(var r="",n=0;n>>0}return i}xt.join32=jM;function GM(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}xt.split32=GM;function VM(t,e){return t>>>e|t<<32-e}xt.rotr32=VM;function WM(t,e){return t<>>32-e}xt.rotl32=WM;function ZM(t,e){return t+e>>>0}xt.sum32=ZM;function JM(t,e,r){return t+e+r>>>0}xt.sum32_3=JM;function XM(t,e,r,n){return t+e+r+n>>>0}xt.sum32_4=XM;function YM(t,e,r,n,s){return t+e+r+n+s>>>0}xt.sum32_5=YM;function QM(t,e,r,n){var s=t[e],i=t[e+1],u=n+i>>>0,v=(u>>0,t[e+1]=u}xt.sum64=QM;function eA(t,e,r,n){var s=e+n>>>0,i=(s>>0}xt.sum64_hi=eA;function tA(t,e,r,n){var s=e+n;return s>>>0}xt.sum64_lo=tA;function rA(t,e,r,n,s,i,u,v){var b=0,m=e;m=m+n>>>0,b+=m>>0,b+=m>>0,b+=m>>0}xt.sum64_4_hi=rA;function nA(t,e,r,n,s,i,u,v){var b=e+n+i+v;return b>>>0}xt.sum64_4_lo=nA;function iA(t,e,r,n,s,i,u,v,b,m){var g=0,_=e;_=_+n>>>0,g+=_>>0,g+=_>>0,g+=_>>0,g+=_>>0}xt.sum64_5_hi=iA;function aA(t,e,r,n,s,i,u,v,b,m){var g=e+n+i+v+m;return g>>>0}xt.sum64_5_lo=aA;function oA(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}xt.rotr64_hi=oA;function sA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}xt.rotr64_lo=sA;function fA(t,e,r){return t>>>r}xt.shr64_hi=fA;function cA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}xt.shr64_lo=cA;var Hs={},u2=xt,lA=qn;function zl(){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}Hs.BlockHash=zl;zl.prototype.update=function(e,r){if(e=u2.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=u2.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,u=8;u>>3}Ui.g0_256=vA;function mA(t){return Ci(t,17)^Ci(t,19)^t>>>10}Ui.g1_256=mA;var Ts=xt,gA=Hs,bA=Ui,ed=Ts.rotl32,of=Ts.sum32,yA=Ts.sum32_5,xA=bA.ft_1,ex=gA.BlockHash,wA=[1518500249,1859775393,2400959708,3395469782];function Oi(){if(!(this instanceof Oi))return new Oi;ex.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Ts.inherits(Oi,ex);var _A=Oi;Oi.blockSize=512;Oi.outSize=160;Oi.hmacStrength=80;Oi.padLength=64;Oi.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),cE(e.length<=this.blockSize);for(var r=e.length;r>24&255,b[e.length+1]=_>>16&255,b[e.length+2]=_>>8&255,b[e.length+3]=_&255;let A=Fe(a0(s,t,b));i||(i=A.length,g=new Uint8Array(i),u=Math.ceil(n/i),m=n-(u-1)*i),g.set(A);for(let B=1;B>8,A=g&255;_?b.push(_,A):b.push(A)}return b}r.toArray=n;function s(u){return u.length===1?"0"+u:u}r.zero2=s;function i(u){for(var v="",b=0;b(A>>1)-1?B=(A>>1)-T:B=T,E.isubn(B)):B=0,_[R]=B,E.iushrn(1)}return _}r.getNAF=n;function s(b,m){var g=[[],[]];b=b.clone(),m=m.clone();for(var _=0,A=0,E;b.cmpn(-_)>0||m.cmpn(-A)>0;){var R=b.andln(3)+_&3,B=m.andln(3)+A&3;R===3&&(R=-1),B===3&&(B=-1);var T;(R&1)===0?T=0:(E=b.andln(7)+_&7,(E===3||E===5)&&B===2?T=-R:T=R),g[0].push(T);var F;(B&1)===0?F=0:(E=m.andln(7)+A&7,(E===3||E===5)&&R===2?F=-B:F=B),g[1].push(F),2*_===T+1&&(_=1-_),2*A===F+1&&(A=1-A),b.iushrn(1),m.iushrn(1)}return g}r.getJSF=s;function i(b,m,g){var _="_"+m;b.prototype[m]=function(){return this[_]!==void 0?this[_]:this[_]=g.call(this)}}r.cachedProperty=i;function u(b){return typeof b=="string"?r.toArray(b,"hex"):b}r.parseBytes=u;function v(b){return new ft(b,"hex","le")}r.intFromLE=v}),il=Sn.getNAF,mE=Sn.getJSF,al=Sn.assert;function qa(t,e){this.type=t,this.p=new ft(e.p,16),this.red=e.prime?ft.red(e.prime):ft.mont(this.p),this.zero=new ft(0).toRed(this.red),this.one=new ft(1).toRed(this.red),this.two=new ft(2).toRed(this.red),this.n=e.n&&new ft(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 Io=qa;qa.prototype.point=function(){throw new Error("Not implemented")};qa.prototype.validate=function(){throw new Error("Not implemented")};qa.prototype._fixedNafMul=function(e,r){al(e.precomputed);var n=e._getDoubles(),s=il(r,1,this._bitLength),i=(1<=v;m--)b=(b<<1)+s[m];u.push(b)}for(var g=this.jpoint(null,null,null),_=this.jpoint(null,null,null),A=i;A>0;A--){for(v=0;v=0;b--){for(var m=0;b>=0&&u[b]===0;b--)m++;if(b>=0&&m++,v=v.dblp(m),b<0)break;var g=u[b];al(g!==0),e.type==="affine"?g>0?v=v.mixedAdd(i[g-1>>1]):v=v.mixedAdd(i[-g-1>>1].neg()):g>0?v=v.add(i[g-1>>1]):v=v.add(i[-g-1>>1].neg())}return e.type==="affine"?v.toP():v};qa.prototype._wnafMulAdd=function(e,r,n,s,i){var u=this._wnafT1,v=this._wnafT2,b=this._wnafT3,m=0,g,_,A;for(g=0;g=1;g-=2){var R=g-1,B=g;if(u[R]!==1||u[B]!==1){b[R]=il(n[R],u[R],this._bitLength),b[B]=il(n[B],u[B],this._bitLength),m=Math.max(b[R].length,m),m=Math.max(b[B].length,m);continue}var T=[r[R],null,null,r[B]];r[R].y.cmp(r[B].y)===0?(T[1]=r[R].add(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg())):r[R].y.cmp(r[B].y.redNeg())===0?(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].add(r[B].neg())):(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],O=mE(n[R],n[B]);for(m=Math.max(O[0].length,m),b[R]=new Array(m),b[B]=new Array(m),_=0;_=0;g--){for(var ne=0;g>=0;){var Y=!0;for(_=0;_=0&&ne++,G=G.dblp(ne),g<0)break;for(_=0;_0?A=v[_][W-1>>1]:W<0&&(A=v[_][-W-1>>1].neg()),A.type==="affine"?G=G.mixedAdd(A):G=G.add(A))}}for(g=0;g=Math.ceil((e.bitLength()+1)/r.step):!1};Hn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(E=m,R=g),_.negative&&(_=_.neg(),A=A.neg()),E.negative&&(E=E.neg(),R=R.neg()),[{a:_,b:A},{a:E,b:R}]};zn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),u=n.b.neg().mul(e).divRound(this.n),v=i.mul(n.a),b=u.mul(s.a),m=i.mul(n.b),g=u.mul(s.b),_=e.sub(v).sub(b),A=m.add(g).neg();return{k1:_,k2:A}};zn.prototype.pointFromX=function(e,r){e=new ft(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};zn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};zn.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,u=0;u":""};Pr.prototype.isInfinity=function(){return this.inf};Pr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};Pr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),u=i.redSqr().redISub(this.x.redAdd(this.x)),v=i.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,v)};Pr.prototype.getX=function(){return this.x.fromRed()};Pr.prototype.getY=function(){return this.y.fromRed()};Pr.prototype.mul=function(e){return e=new ft(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Pr.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};Pr.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};Pr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Pr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};Pr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Kr(t,e,r,n){Io.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ft(0)):(this.x=new ft(e,16),this.y=new ft(r,16),this.z=new ft(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}W1(Kr,Io.BasePoint);zn.prototype.jpoint=function(e,r,n){return new Kr(this,e,r,n)};Kr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};Kr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Kr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),u=this.y.redMul(r.redMul(e.z)),v=e.y.redMul(n.redMul(this.z)),b=s.redSub(i),m=u.redSub(v);if(b.cmpn(0)===0)return m.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=b.redSqr(),_=g.redMul(b),A=s.redMul(g),E=m.redSqr().redIAdd(_).redISub(A).redISub(A),R=m.redMul(A.redISub(E)).redISub(u.redMul(_)),B=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(E,R,B)};Kr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,u=e.y.redMul(r).redMul(this.z),v=n.redSub(s),b=i.redSub(u);if(v.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var m=v.redSqr(),g=m.redMul(v),_=n.redMul(m),A=b.redSqr().redIAdd(g).redISub(_).redISub(_),E=b.redMul(_.redISub(A)).redISub(i.redMul(g)),R=this.z.redMul(v);return this.curve.jpoint(A,E,R)};Kr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};Kr.prototype.inspect=function(){return this.isInfinity()?"":""};Kr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Tc=Gs(function(t,e){var r=e;r.base=Io,r.short=bE,r.mont=null,r.edwards=null}),kc=Gs(function(t,e){var r=e,n=Sn.assert;function s(v){v.type==="short"?this.curve=new Tc.short(v):v.type==="edwards"?this.curve=new Tc.edwards(v):this.curve=new Tc.mont(v),this.g=this.curve.g,this.n=this.curve.n,this.hash=v.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=s;function i(v,b){Object.defineProperty(r,v,{configurable:!0,enumerable:!0,get:function(){var m=new s(b);return Object.defineProperty(r,v,{configurable:!0,enumerable:!0,value:m}),m}})}i("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:Cr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:Cr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:Cr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:Cr.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"]}),i("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:Cr.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Cr.sha256,gRed:!1,g:["9"]}),i("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:Cr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=null.crash()}catch{u=void 0}i("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:Cr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})});function Da(t){if(!(this instanceof Da))return new Da(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=ni.toArray(t.entropy,t.entropyEnc||"hex"),r=ni.toArray(t.nonce,t.nonceEnc||"hex"),n=ni.toArray(t.pers,t.persEnc||"hex");V1(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var hx=Da;Da.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Da.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=ni.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var yE=Sn.assert;function jl(t,e){if(t instanceof jl)return t;this._importDER(t,e)||(yE(t.r&&t.s,"Signature without r or s"),this.r=new ft(t.r,16),this.s=new ft(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Gl=jl;function xE(){this.place=0}function nd(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var s=0,i=0,u=e.place;i>>=0;return s<=127?!1:(e.place=u,s)}function v2(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}jl.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=v2(r),n=v2(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];id(s,r.length),s=s.concat(r),s.push(2),id(s,n.length);var i=s.concat(n),u=[48];return id(u,i.length),u=u.concat(i),Sn.encode(u,e)};var wE=function(){throw new Error("unsupported")},px=Sn.assert;function Kn(t){if(!(this instanceof Kn))return new Kn(t);typeof t=="string"&&(px(Object.prototype.hasOwnProperty.call(kc,t),"Unknown curve "+t),t=kc[t]),t instanceof kc.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 _E=Kn;Kn.prototype.keyPair=function(e){return new Z1(this,e)};Kn.prototype.keyFromPrivate=function(e,r){return Z1.fromPrivate(this,e,r)};Kn.prototype.keyFromPublic=function(e,r){return Z1.fromPublic(this,e,r)};Kn.prototype.genKeyPair=function(e){e||(e={});for(var r=new hx({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||wE(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new ft(2));;){var i=new ft(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Kn.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Kn.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new ft(e,16));for(var i=this.n.byteLength(),u=r.getPrivate().toArray("be",i),v=e.toArray("be",i),b=new hx({hash:this.hash,entropy:u,nonce:v,pers:s.pers,persEnc:s.persEnc||"utf8"}),m=this.n.sub(new ft(1)),g=0;;g++){var _=s.k?s.k(g):new ft(b.generate(this.n.byteLength()));if(_=this._truncateToN(_,!0),!(_.cmpn(1)<=0||_.cmp(m)>=0)){var A=this.g.mul(_);if(!A.isInfinity()){var E=A.getX(),R=E.umod(this.n);if(R.cmpn(0)!==0){var B=_.invm(this.n).mul(R.mul(r.getPrivate()).iadd(e));if(B=B.umod(this.n),B.cmpn(0)!==0){var T=(A.getY().isOdd()?1:0)|(E.cmp(R)!==0?2:0);return s.canonical&&B.cmp(this.nh)>0&&(B=this.n.sub(B),T^=1),new Gl({r:R,s:B,recoveryParam:T})}}}}}};Kn.prototype.verify=function(e,r,n,s){e=this._truncateToN(new ft(e,16)),n=this.keyFromPublic(n,s),r=new Gl(r,"hex");var i=r.r,u=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var v=u.invm(this.n),b=v.mul(e).umod(this.n),m=v.mul(i).umod(this.n),g;return this.curve._maxwellTrick?(g=this.g.jmulAdd(b,n.getPublic(),m),g.isInfinity()?!1:g.eqXToP(i)):(g=this.g.mulAdd(b,n.getPublic(),m),g.isInfinity()?!1:g.getX().umod(this.n).cmp(i)===0)};Kn.prototype.recoverPubKey=function(t,e,r,n){px((3&r)===r,"The recovery param is more than two bits"),e=new Gl(e,n);var s=this.n,i=new ft(t),u=e.r,v=e.s,b=r&1,m=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");m?u=this.curve.pointFromX(u.add(this.curve.n),b):u=this.curve.pointFromX(u,b);var g=e.r.invm(s),_=s.sub(i).mul(g).umod(s),A=v.mul(g).umod(s);return this.g.mulAdd(_,u,A)};Kn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Gl(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var ME=Gs(function(t,e){var r=e;r.version="6.5.4",r.utils=Sn,r.rand=function(){throw new Error("unsupported")},r.curve=Tc,r.curves=kc,r.ec=_E,r.eddsa=null}),AE=ME.ec;const EE="signing-key/5.7.0",Ip=new de(EE);let ad=null;function xi(){return ad||(ad=new AE("secp256k1")),ad}class yo{constructor(e){De(this,"curve","secp256k1"),De(this,"privateKey",Ue(e)),Ii(this.privateKey)!==32&&Ip.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=xi().keyFromPrivate(Fe(this.privateKey));De(this,"publicKey","0x"+r.getPublic(!1,"hex")),De(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),De(this,"_isSigningKey",!0)}_addPoint(e){const r=xi().keyFromPublic(Fe(this.publicKey)),n=xi().keyFromPublic(Fe(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=xi().keyFromPrivate(Fe(this.privateKey)),n=Fe(e);n.length!==32&&Ip.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return Po({recoveryParam:s.recoveryParam,r:Zt("0x"+s.r.toString(16),32),s:Zt("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=xi().keyFromPrivate(Fe(this.privateKey)),n=xi().keyFromPublic(Fe(J1(e)));return Zt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function vx(t,e){const r=Po(e),n={r:Fe(r.r),s:Fe(r.s)};return"0x"+xi().recoverPubKey(Fe(t),n,r.recoveryParam).encode("hex",!1)}function J1(t,e){const r=Fe(t);if(r.length===32){const n=new yo(r);return e?"0x"+xi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Ue(r):"0x"+xi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+xi().keyFromPublic(r).getPublic(!0,"hex"):Ue(r)}return Ip.throwArgumentError("invalid public or private key","key","[REDACTED]")}const SE=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:yo,recoverPublicKey:vx,computePublicKey:J1},Symbol.toStringTag,{value:"Module"})),RE="transactions/5.7.0",Jr=new de(RE);var Dp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Dp||(Dp={}));function X1(t){return t==="0x"?null:jt(t)}function Vr(t){return t==="0x"?E6:Le.from(t)}const CE=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],BE={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ka(t){const e=J1(t);return jt(hr(Gt(hr(e,1)),12))}function y0(t,e){return ka(vx(Fe(t),e))}function yn(t,e){const r=Ri(Le.from(t).toHexString());return r.length>32&&Jr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function od(t,e){return{address:jt(t),storageKeys:(e||[]).map((r,n)=>(Ii(r)!==32&&Jr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Do(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Jr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),od(r[0],r[1])):od(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return od(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function mx(t){return Do(t).map(e=>[e.address,e.storageKeys])}function gx(t,e){if(t.gasPrice!=null){const n=Le.from(t.gasPrice),s=Le.from(t.maxFeePerGas||0);n.eq(s)||Jr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[yn(t.chainId||0,"chainId"),yn(t.nonce||0,"nonce"),yn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),yn(t.maxFeePerGas||0,"maxFeePerGas"),yn(t.gasLimit||0,"gasLimit"),t.to!=null?jt(t.to):"0x",yn(t.value||0,"value"),t.data||"0x",mx(t.accessList||[])];if(e){const n=Po(e);r.push(yn(n.recoveryParam,"recoveryParam")),r.push(Ri(n.r)),r.push(Ri(n.s))}return an(["0x02",So(r)])}function bx(t,e){const r=[yn(t.chainId||0,"chainId"),yn(t.nonce||0,"nonce"),yn(t.gasPrice||0,"gasPrice"),yn(t.gasLimit||0,"gasLimit"),t.to!=null?jt(t.to):"0x",yn(t.value||0,"value"),t.data||"0x",mx(t.accessList||[])];if(e){const n=Po(e);r.push(yn(n.recoveryParam,"recoveryParam")),r.push(Ri(n.r)),r.push(Ri(n.s))}return an(["0x01",So(r)])}function NE(t,e){D1(t,BE);const r=[];CE.forEach(function(u){let v=t[u.name]||[];const b={};u.numeric&&(b.hexPad="left"),v=Fe(Ue(v,b)),u.length&&v.length!==u.length&&v.length>0&&Jr.throwArgumentError("invalid length for "+u.name,"transaction:"+u.name,v),u.maxLength&&(v=Ri(v),v.length>u.maxLength&&Jr.throwArgumentError("invalid length for "+u.name,"transaction:"+u.name,v)),r.push(Ue(v))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Jr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!g0(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Ue(n)),r.push("0x"),r.push("0x")),!e)return So(r);const s=Po(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&Jr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&Jr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Ue(i)),r.push(Ri(Fe(s.r))),r.push(Ri(Fe(s.s))),So(r)}function Op(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Jr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),NE(t,e);switch(t.type){case 1:return bx(t,e);case 2:return gx(t,e)}return Jr.throwError(`unsupported transaction type: ${t.type}`,de.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function yx(t,e,r){try{const n=Vr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Jr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Zt(e[1],32),t.s=Zt(e[2],32);try{const n=Gt(r(t));t.from=y0(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function TE(t){const e=$l(t.slice(1));e.length!==9&&e.length!==12&&Jr.throwArgumentError("invalid component count for transaction type: 2","payload",Ue(t));const r=Vr(e[2]),n=Vr(e[3]),s={type:2,chainId:Vr(e[0]).toNumber(),nonce:Vr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Vr(e[4]),to:X1(e[5]),value:Vr(e[6]),data:e[7],accessList:Do(e[8])};return e.length===9||(s.hash=Gt(t),yx(s,e.slice(9),gx)),s}function kE(t){const e=$l(t.slice(1));e.length!==8&&e.length!==11&&Jr.throwArgumentError("invalid component count for transaction type: 1","payload",Ue(t));const r={type:1,chainId:Vr(e[0]).toNumber(),nonce:Vr(e[1]).toNumber(),gasPrice:Vr(e[2]),gasLimit:Vr(e[3]),to:X1(e[4]),value:Vr(e[5]),data:e[6],accessList:Do(e[7])};return e.length===8||(r.hash=Gt(t),yx(r,e.slice(8),bx)),r}function PE(t){const e=$l(t);e.length!==9&&e.length!==6&&Jr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Vr(e[0]).toNumber(),gasPrice:Vr(e[1]),gasLimit:Vr(e[2]),to:X1(e[3]),value:Vr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Le.from(e[6]).toNumber()}catch{return r}if(r.r=Zt(e[7],32),r.s=Zt(e[8],32),Le.from(r.r).isZero()&&Le.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 n=r.v-27;const s=e.slice(0,6);r.chainId!==0&&(s.push(Ue(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Gt(So(s));try{r.from=y0(i,{r:Ue(r.r),s:Ue(r.s),recoveryParam:n})}catch{}r.hash=Gt(t)}return r.type=null,r}function xx(t){const e=Fe(t);if(e[0]>127)return PE(e);switch(e[0]){case 1:return kE(e);case 2:return TE(e)}return Jr.throwError(`unsupported transaction type: ${e[0]}`,de.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const IE=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return Dp},computeAddress:ka,recoverAddress:y0,accessListify:Do,serialize:Op,parse:xx},Symbol.toStringTag,{value:"Module"})),DE="wordlists/5.7.0",OE=new de(DE);class x0{constructor(e){OE.checkAbstract(new.target,x0),De(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const r=[];for(let n=0;n<2048;n++){const s=e.getWord(n);if(n!==e.getWordIndex(s))return"0x";r.push(s)}return Ra(r.join(` `)+` -`)}static register(e,r){r||(r=e.locale)}}const FE="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Kf=null;function m2(t){if(Kf==null&&(Kf=FE.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),x0.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Kf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class LE extends x0{constructor(){super("en")}getWord(e){return m2(this),Kf[e]}getWordIndex(e){return m2(this),Kf.indexOf(e)}}const wx=new LE;x0.register(wx);const g2={en:wx},UE="hdnode/5.7.0",o0=new de(UE),KE=Le.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),$E=vr("Bitcoin seed"),rs=2147483648;function _x(t){return(1<=256)throw new Error("Depth too large!");return b2(Xt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Ue(this.depth),this.parentFingerprint,Zt(Ue(this.index),4),this.chainCode,this.privateKey!=null?Xt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new xn(Ho,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~rs));const n=new Uint8Array(37);if(e&rs){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Fe(this.privateKey),1),r&&(r+="'")}else n.set(Fe(this.publicKey));for(let _=24;_>=0;_-=8)n[33+(_>>3)]=e>>24-_&255;const s=Fe(a0(Is.sha512,this.chainCode,n)),i=s.slice(0,32),u=s.slice(32);let v=null,b=null;this.privateKey?v=Q0(Le.from(i).add(this.privateKey).mod(KE)):b=new bo(Ue(i))._addPoint(this.publicKey);let m=r;const g=this.mnemonic;return g&&(m=Object.freeze({phrase:g.phrase,path:r,locale:g.locale||"en"})),new xn(Ho,v,b,this.fingerprint,Q0(u),e,this.depth+1,m)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let s=0;s=rs)throw new Error("invalid path index - "+i);n=n._derive(rs+u)}else if(i.match(/^[0-9]+$/)){const u=parseInt(i);if(u>=rs)throw new Error("invalid path index - "+i);n=n._derive(u)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=Fe(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=Fe(a0(Is.sha512,$E,n));return new xn(Ho,Q0(s.slice(0,32)),null,"0x00000000",Q0(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Y1(n),e=Zl(Wl(e,n),n),xn._fromSeed(Mx(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return xn._fromSeed(e,null)}static fromExtendedKey(e){const r=Ns.decode(e);(r.length!==82||b2(r.slice(0,78))!==e)&&o0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=Ue(r.slice(5,9)),i=parseInt(Ue(r.slice(9,13)).substring(2),16),u=Ue(r.slice(13,45)),v=r.slice(45,78);switch(Ue(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new xn(Ho,null,Ue(v),s,u,i,n,null);case"0x0488ade4":case"0x04358394 ":if(v[0]!==0)break;return new xn(Ho,Ue(v.slice(1)),null,s,u,i,n,null)}return o0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Mx(t,e){e||(e="");const r=vr("mnemonic"+e,Di.NFKD);return G1(vr(t,Di.NFKD),r,2048,64,"sha512")}function Wl(t,e){e=Y1(e),o0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=Fe(new Uint8Array(Math.ceil(11*r.length/8)));let s=0;for(let m=0;m>3]|=1<<7-s%8),s++}const i=32*r.length/3,u=r.length/3,v=_x(u);if((Fe(aa(n.slice(0,i/8)))[0]&v)!==(n[n.length-1]&v))throw new Error("invalid checksum");return Ue(n.slice(0,i/8))}function Zl(t,e){if(e=Y1(e),t=Fe(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let u=0;u8?(r[r.length-1]<<=8,r[r.length-1]|=t[u],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[u]>>8-n,r.push(t[u]&qE(8-n)),n+=3);const s=t.length/4,i=Fe(aa(t))[0]&_x(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(u=>e.getWord(u)))}function HE(t,e){try{return Wl(t,e),!0}catch{}return!1}function zE(t){return(typeof t!="number"||t<0||t>=rs||t%1)&&o0.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const jE=Object.freeze(Object.defineProperty({__proto__:null,defaultPath:Ds,HDNode:xn,mnemonicToSeed:Mx,mnemonicToEntropy:Wl,entropyToMnemonic:Zl,isValidMnemonic:HE,getAccountPath:zE},Symbol.toStringTag,{value:"Module"})),GE=gr(jE);var Ax={exports:{}};(function(t,e){(function(r){function n(d){return parseInt(d)===d}function s(d){if(!n(d.length))return!1;for(var M=0;M255)return!1;return!0}function i(d,M){if(d.buffer&&ArrayBuffer.isView(d)&&d.name==="Uint8Array")return M&&(d.slice?d=d.slice():d=Array.prototype.slice.call(d)),d;if(Array.isArray(d)){if(!s(d))throw new Error("Array contains invalid value: "+d);return new Uint8Array(d)}if(n(d.length)&&s(d))return new Uint8Array(d);throw new Error("unsupported array-like object")}function u(d){return new Uint8Array(d)}function v(d,M,C,P,S){(P!=null||S!=null)&&(d.slice?d=d.slice(P,S):d=Array.prototype.slice.call(d,P,S)),M.set(d,C)}var b=function(){function d(C){var P=[],S=0;for(C=encodeURI(C);S191&&I<224?(P.push(String.fromCharCode((I&31)<<6|C[S+1]&63)),S+=2):(P.push(String.fromCharCode((I&15)<<12|(C[S+1]&63)<<6|C[S+2]&63)),S+=3)}return P.join("")}return{toBytes:d,fromBytes:M}}(),m=function(){function d(P){for(var S=[],I=0;I>4]+M[U&15])}return S.join("")}return{toBytes:d,fromBytes:C}}(),g={16:10,24:12,32:14},_=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],A=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],E=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],R=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],B=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],T=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],F=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],O=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],q=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],H=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],G=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],re=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],ne=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Y=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],W=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function se(d){for(var M=[],C=0;C>2,this._Ke[I][M%4]=S[M],this._Kd[d-I][M%4]=S[M];for(var U=0,V=P,z;V>16&255]<<24^A[z>>8&255]<<16^A[z&255]<<8^A[z>>24&255]^_[U]<<24,U+=1,P!=8)for(var M=1;M>8&255]<<8^A[z>>16&255]<<16^A[z>>24&255]<<24;for(var M=P/2+1;M>2,j=V%4,this._Ke[X][j]=S[M],this._Kd[d-X][j]=S[M++],V++}for(var X=1;X>24&255]^ne[z>>16&255]^Y[z>>8&255]^W[z&255]},y.prototype.encrypt=function(d){if(d.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var M=this._Ke.length-1,C=[0,0,0,0],P=se(d),S=0;S<4;S++)P[S]^=this._Ke[0][S];for(var I=1;I>24&255]^B[P[(S+1)%4]>>16&255]^T[P[(S+2)%4]>>8&255]^F[P[(S+3)%4]&255]^this._Ke[I][S];P=C.slice()}for(var U=u(16),V,S=0;S<4;S++)V=this._Ke[M][S],U[4*S]=(A[P[S]>>24&255]^V>>24)&255,U[4*S+1]=(A[P[(S+1)%4]>>16&255]^V>>16)&255,U[4*S+2]=(A[P[(S+2)%4]>>8&255]^V>>8)&255,U[4*S+3]=(A[P[(S+3)%4]&255]^V)&255;return U},y.prototype.decrypt=function(d){if(d.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var M=this._Kd.length-1,C=[0,0,0,0],P=se(d),S=0;S<4;S++)P[S]^=this._Kd[0][S];for(var I=1;I>24&255]^q[P[(S+3)%4]>>16&255]^H[P[(S+2)%4]>>8&255]^G[P[(S+1)%4]&255]^this._Kd[I][S];P=C.slice()}for(var U=u(16),V,S=0;S<4;S++)V=this._Kd[M][S],U[4*S]=(E[P[S]>>24&255]^V>>24)&255,U[4*S+1]=(E[P[(S+3)%4]>>16&255]^V>>16)&255,U[4*S+2]=(E[P[(S+2)%4]>>8&255]^V>>8)&255,U[4*S+3]=(E[P[(S+1)%4]&255]^V)&255;return U};var a=function(d){if(!(this instanceof a))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new y(d)};a.prototype.encrypt=function(d){if(d=i(d),d.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var M=u(d.length),C=u(16),P=0;P=0;--M)this._counter[M]=d%256,d=d>>8},h.prototype.setBytes=function(d){if(d=i(d,!0),d.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=d},h.prototype.increment=function(){for(var d=15;d>=0;d--)if(this._counter[d]===255)this._counter[d]=0;else{this._counter[d]++;break}};var x=function(d,M){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",M instanceof h||(M=new h(M)),this._counter=M,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new y(d)};x.prototype.encrypt=function(d){for(var M=i(d,!0),C=0;C16)throw new Error("PKCS#7 padding byte out of range");for(var C=d.length-M,P=0;P=64;){let o=F,d=O,M=q,C=H,P=G,S=re,I=ne,U=Y,V,z,X,j,N;for(z=0;z<16;z++)X=w+z*4,W[z]=(x[X]&255)<<24|(x[X+1]&255)<<16|(x[X+2]&255)<<8|x[X+3]&255;for(z=16;z<64;z++)V=W[z-2],j=(V>>>17|V<<32-17)^(V>>>19|V<<32-19)^V>>>10,V=W[z-15],N=(V>>>7|V<<32-7)^(V>>>18|V<<32-18)^V>>>3,W[z]=(j+W[z-7]|0)+(N+W[z-16]|0)|0;for(z=0;z<64;z++)j=(((P>>>6|P<<32-6)^(P>>>11|P<<32-11)^(P>>>25|P<<32-25))+(P&S^~P&I)|0)+(U+(T[z]+W[z]|0)|0)|0,N=((o>>>2|o<<32-2)^(o>>>13|o<<32-13)^(o>>>22|o<<32-22))+(o&d^o&M^d&M)|0,U=I,I=S,S=P,P=C+j|0,C=M,M=d,d=o,o=j+N|0;F=F+o|0,O=O+d|0,q=q+M|0,H=H+C|0,G=G+P|0,re=re+S|0,ne=ne+I|0,Y=Y+U|0,w+=64,p-=64}}se(B);let y,a=B.length%64,f=B.length/536870912|0,c=B.length<<3,l=a<56?56:120,h=B.slice(B.length-a,B.length);for(h.push(128),y=a+1;y>>24&255),h.push(f>>>16&255),h.push(f>>>8&255),h.push(f>>>0&255),h.push(c>>>24&255),h.push(c>>>16&255),h.push(c>>>8&255),h.push(c>>>0&255),se(h),[F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,re>>>24&255,re>>>16&255,re>>>8&255,re>>>0&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255]}function i(B,T,F){B=B.length<=64?B:s(B);const O=64+T.length+4,q=new Array(O),H=new Array(64);let G,re=[];for(G=0;G<64;G++)q[G]=54;for(G=0;G=O-4;Y--){if(q[Y]++,q[Y]<=255)return;q[Y]=0}}for(;F>=32;)ne(),re=re.concat(s(H.concat(s(q)))),F-=32;return F>0&&(ne(),re=re.concat(s(H.concat(s(q))).slice(0,F))),re}function u(B,T,F,O,q){let H;for(g(B,(2*F-1)*16,q,0,16),H=0;H<2*F;H++)m(B,H*16,q,16),b(q,O),g(q,0,B,T+H*16,16);for(H=0;H>>32-T}function b(B,T){g(B,0,T,0,16);for(let F=8;F>0;F-=2)T[4]^=v(T[0]+T[12],7),T[8]^=v(T[4]+T[0],9),T[12]^=v(T[8]+T[4],13),T[0]^=v(T[12]+T[8],18),T[9]^=v(T[5]+T[1],7),T[13]^=v(T[9]+T[5],9),T[1]^=v(T[13]+T[9],13),T[5]^=v(T[1]+T[13],18),T[14]^=v(T[10]+T[6],7),T[2]^=v(T[14]+T[10],9),T[6]^=v(T[2]+T[14],13),T[10]^=v(T[6]+T[2],18),T[3]^=v(T[15]+T[11],7),T[7]^=v(T[3]+T[15],9),T[11]^=v(T[7]+T[3],13),T[15]^=v(T[11]+T[7],18),T[1]^=v(T[0]+T[3],7),T[2]^=v(T[1]+T[0],9),T[3]^=v(T[2]+T[1],13),T[0]^=v(T[3]+T[2],18),T[6]^=v(T[5]+T[4],7),T[7]^=v(T[6]+T[5],9),T[4]^=v(T[7]+T[6],13),T[5]^=v(T[4]+T[7],18),T[11]^=v(T[10]+T[9],7),T[8]^=v(T[11]+T[10],9),T[9]^=v(T[8]+T[11],13),T[10]^=v(T[9]+T[8],18),T[12]^=v(T[15]+T[14],7),T[13]^=v(T[12]+T[15],9),T[14]^=v(T[13]+T[12],13),T[15]^=v(T[14]+T[13],18);for(let F=0;F<16;++F)B[F]+=T[F]}function m(B,T,F,O){for(let q=0;q=256)return!1}return!0}function A(B,T){if(typeof B!="number"||B%1)throw new Error("invalid "+T);return B}function E(B,T,F,O,q,H,G){if(F=A(F,"N"),O=A(O,"r"),q=A(q,"p"),H=A(H,"dkLen"),F===0||(F&F-1)!==0)throw new Error("N must be power of 2");if(F>2147483647/128/O)throw new Error("N too large");if(O>2147483647/128/q)throw new Error("r too large");if(!_(B))throw new Error("password must be an array or buffer");if(B=Array.prototype.slice.call(B),!_(T))throw new Error("salt must be an array or buffer");T=Array.prototype.slice.call(T);let re=i(B,T,q*128*O);const ne=new Uint32Array(q*32*O);for(let P=0;Pd&&(P=d);for(let I=0;Id&&(P=d);for(let I=0;I>0&255),re.push(ne[I]>>8&255),re.push(ne[I]>>16&255),re.push(ne[I]>>24&255);const S=i(B,re,H);return G&&G(null,1,S),S}G&&M(C)};if(!G)for(;;){const P=C();if(P!=null)return P}C()}const R={scrypt:function(B,T,F,O,q,H,G){return new Promise(function(re,ne){let Y=0;G&&G(0),E(B,T,F,O,q,H,function(W,se,y){if(W)ne(W);else if(y)G&&Y!==1&&G(1),re(new Uint8Array(y));else if(G&&se!==Y)return Y=se,G(se)})})},syncScrypt:function(B,T,F,O,q,H){return new Uint8Array(E(B,T,F,O,q,H))}};t.exports=R})()})(Sx);const tv=Sx.exports,XE="random/5.7.0",Fp=new de(XE);function YE(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Gc<"u")return Gc;throw new Error("unable to locate global object")}const y2=YE();let Ic=y2.crypto||y2.msCrypto;(!Ic||!Ic.getRandomValues)&&(Fp.warn("WARNING: Missing strong random number source"),Ic={getRandomValues:function(t){return Fp.throwError("no secure random source avaialble",de.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function cs(t){(t<=0||t>1024||t%1||t!=t)&&Fp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Ic.getRandomValues(e),Fe(e)}function Rx(t){t=t.slice();for(let e=t.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}const QE=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:cs,shuffled:Rx},Symbol.toStringTag,{value:"Module"}));var eS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const Lp=new de(Ex);function x2(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class tS extends Ka{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function rS(t,e,r){if(ur(t,"crypto/cipher")==="aes-128-ctr"){const s=yo(ur(t,"crypto/cipherparams/iv")),i=new Ei.Counter(s),u=new Ei.ModeOfOperation.ctr(e,i);return Fe(u.decrypt(r))}return null}function Cx(t,e){const r=yo(ur(t,"crypto/ciphertext"));if(Ue(Gt(Xt([e.slice(16,32),r]))).substring(2)!==ur(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const s=rS(t,e.slice(0,16),r);s||Lp.throwError("unsupported cipher",de.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=e.slice(32,64),u=ka(s);if(t.address){let b=t.address.toLowerCase();if(b.substring(0,2)!=="0x"&&(b="0x"+b),jt(b)!==u)throw new Error("address mismatch")}const v={_isKeystoreAccount:!0,address:u,privateKey:Ue(s)};if(ur(t,"x-ethers/version")==="0.1"){const b=yo(ur(t,"x-ethers/mnemonicCiphertext")),m=yo(ur(t,"x-ethers/mnemonicCounter")),g=new Ei.Counter(m),_=new Ei.ModeOfOperation.ctr(i,g),A=ur(t,"x-ethers/path")||Ds,E=ur(t,"x-ethers/locale")||"en",R=Fe(_.decrypt(b));try{const B=Zl(R,E),T=xn.fromMnemonic(B,null,E).derivePath(A);if(T.privateKey!=v.privateKey)throw new Error("mnemonic mismatch");v.mnemonic=T.mnemonic}catch(B){if(B.code!==de.errors.INVALID_ARGUMENT||B.argument!=="wordlist")throw B}}return new tS(v)}function Bx(t,e,r,n,s){return Fe(G1(t,e,r,n,s))}function nS(t,e,r,n,s){return Promise.resolve(Bx(t,e,r,n,s))}function Nx(t,e,r,n,s){const i=Q1(e),u=ur(t,"crypto/kdf");if(u&&typeof u=="string"){const v=function(b,m){return Lp.throwArgumentError("invalid key-derivation function parameters",b,m)};if(u.toLowerCase()==="scrypt"){const b=yo(ur(t,"crypto/kdfparams/salt")),m=parseInt(ur(t,"crypto/kdfparams/n")),g=parseInt(ur(t,"crypto/kdfparams/r")),_=parseInt(ur(t,"crypto/kdfparams/p"));(!m||!g||!_)&&v("kdf",u),(m&m-1)!==0&&v("N",m);const A=parseInt(ur(t,"crypto/kdfparams/dklen"));return A!==32&&v("dklen",A),n(i,b,m,g,_,64,s)}else if(u.toLowerCase()==="pbkdf2"){const b=yo(ur(t,"crypto/kdfparams/salt"));let m=null;const g=ur(t,"crypto/kdfparams/prf");g==="hmac-sha256"?m="sha256":g==="hmac-sha512"?m="sha512":v("prf",g);const _=parseInt(ur(t,"crypto/kdfparams/c")),A=parseInt(ur(t,"crypto/kdfparams/dklen"));return A!==32&&v("dklen",A),r(i,b,_,A,m)}}return Lp.throwArgumentError("unsupported key-derivation function","kdf",u)}function Tx(t,e){const r=JSON.parse(t),n=Nx(r,e,Bx,tv.syncScrypt);return Cx(r,n)}function kx(t,e,r){return eS(this,void 0,void 0,function*(){const n=JSON.parse(t),s=yield Nx(n,e,nS,tv.scrypt,r);return Cx(n,s)})}function Px(t,e,r,n){try{if(jt(t.address)!==ka(t.privateKey))throw new Error("address/privateKey mismatch");if(x2(t)){const T=t.mnemonic;if(xn.fromMnemonic(T.phrase,null,T.locale).derivePath(T.path||Ds).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(T){return Promise.reject(T)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const s=Fe(t.privateKey),i=Q1(e);let u=null,v=null,b=null;if(x2(t)){const T=t.mnemonic;u=Fe(Wl(T.phrase,T.locale||"en")),v=T.path||Ds,b=T.locale||"en"}let m=r.client;m||(m="ethers.js");let g=null;r.salt?g=Fe(r.salt):g=cs(32);let _=null;if(r.iv){if(_=Fe(r.iv),_.length!==16)throw new Error("invalid iv")}else _=cs(16);let A=null;if(r.uuid){if(A=Fe(r.uuid),A.length!==16)throw new Error("invalid uuid")}else A=cs(16);let E=1<<17,R=8,B=1;return r.scrypt&&(r.scrypt.N&&(E=r.scrypt.N),r.scrypt.r&&(R=r.scrypt.r),r.scrypt.p&&(B=r.scrypt.p)),tv.scrypt(i,g,E,R,B,64,n).then(T=>{T=Fe(T);const F=T.slice(0,16),O=T.slice(16,32),q=T.slice(32,64),H=new Ei.Counter(_),G=new Ei.ModeOfOperation.ctr(F,H),re=Fe(G.encrypt(s)),ne=Gt(Xt([O,re])),Y={address:t.address.substring(2).toLowerCase(),id:VE(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Ue(_).substring(2)},ciphertext:Ue(re).substring(2),kdf:"scrypt",kdfparams:{salt:Ue(g).substring(2),n:E,dklen:32,p:B,r:R},mac:ne.substring(2)}};if(u){const W=cs(16),se=new Ei.Counter(W),y=new Ei.ModeOfOperation.ctr(q,se),a=Fe(y.encrypt(u)),f=new Date,c=f.getUTCFullYear()+"-"+ff(f.getUTCMonth()+1,2)+"-"+ff(f.getUTCDate(),2)+"T"+ff(f.getUTCHours(),2)+"-"+ff(f.getUTCMinutes(),2)+"-"+ff(f.getUTCSeconds(),2)+".0Z";Y["x-ethers"]={client:m,gethFilename:"UTC--"+c+"--"+Y.address,mnemonicCounter:Ue(W).substring(2),mnemonicCiphertext:Ue(a).substring(2),path:v,locale:b,version:"0.1"}}return JSON.stringify(Y)})}function Ix(t,e,r){if(Jl(t)){r&&r(0);const n=ev(t,e);return r&&r(1),Promise.resolve(n)}return Xl(t)?kx(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function Dx(t,e){if(Jl(t))return ev(t,e);if(Xl(t))return Tx(t,e);throw new Error("invalid JSON wallet")}const iS=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:ev,decryptKeystore:kx,decryptKeystoreSync:Tx,encryptKeystore:Px,isCrowdsaleWallet:Jl,isKeystoreWallet:Xl,getJsonWalletAddress:JE,decryptJsonWallet:Ix,decryptJsonWalletSync:Dx},Symbol.toStringTag,{value:"Module"})),aS=gr(iS),oS=gr(a_),sS=gr($7),w2=gr(pE),fS="solidity/5.7.0",cS=new RegExp("^bytes([0-9]+)$"),lS=new RegExp("^(u?int)([0-9]*)$"),uS=new RegExp("^(.*)\\[([0-9]*)\\]$"),dS="0000000000000000000000000000000000000000000000000000000000000000",ns=new de(fS);function Ox(t,e,r){switch(t){case"address":return r?Of(e,32):Fe(e);case"string":return vr(e);case"bytes":return Fe(e);case"bool":return e=e?"0x01":"0x00",r?Of(e,32):Fe(e)}let n=t.match(lS);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&ns.throwArgumentError("invalid number type","type",t),r&&(s=256),e=Le.from(e).toTwos(s),Of(e,s/8)}if(n=t.match(cS),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&ns.throwArgumentError("invalid bytes type","type",t),Fe(e).byteLength!==s&&ns.throwArgumentError(`invalid value for ${t}`,"value",e),r?Fe((e+dS).substring(0,66)):e}if(n=t.match(uS),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&ns.throwArgumentError(`invalid array length for ${t}`,"value",e);const u=[];return e.forEach(function(v){u.push(Ox(s,v,!0))}),Xt(u)}return ns.throwArgumentError("invalid type","type",t)}function rv(t,e){t.length!=e.length&&ns.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(Ox(n,e[s]))}),Ue(Xt(r))}function hS(t,e){return Gt(rv(t,e))}function pS(t,e){return aa(rv(t,e))}const vS=Object.freeze(Object.defineProperty({__proto__:null,pack:rv,keccak256:hS,sha256:pS},Symbol.toStringTag,{value:"Module"})),mS=gr(vS),gS=gr(QE),bS=gr(Y7),yS=gr(s_),xS=gr(SE),_2=gr(j_),wS=gr(IE),_S="units/5.7.0",Fx=new de(_S),Lx=["wei","kwei","mwei","gwei","szabo","finney","ether"];function MS(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&Fx.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const u=r.length-3;i.unshift(r.substring(u)),r=r.substring(0,u)}return n+i.join(",")+s}function Yl(t,e){if(typeof e=="string"){const r=Lx.indexOf(e);r!==-1&&(e=3*r)}return Nc(t,e??18)}function nv(t,e){if(typeof t!="string"&&Fx.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=Lx.indexOf(e);r!==-1&&(e=3*r)}return pi(t,e??18)}function iv(t){return Yl(t,18)}function Ux(t){return nv(t,18)}const AS=Object.freeze(Object.defineProperty({__proto__:null,commify:MS,formatUnits:Yl,parseUnits:nv,formatEther:iv,parseEther:Ux},Symbol.toStringTag,{value:"Module"})),ES=gr(AS),SS="abstract-provider/5.7.0";var RS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const CS=new de(SS);class BS extends Ka{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Vs{constructor(){CS.checkAbstract(new.target,Vs),De(this,"_isProvider",!0)}getFeeData(){return RS(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield cr({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(u=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=Le.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const NS="abstract-signer/5.7.0";var Zn=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const In=new de(NS),TS=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],kS=[de.errors.INSUFFICIENT_FUNDS,de.errors.NONCE_EXPIRED,de.errors.REPLACEMENT_UNDERPRICED];class Ws{constructor(){In.checkAbstract(new.target,Ws),De(this,"_isSigner",!0)}getBalance(e){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Zn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield cr(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Zn(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield cr(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Zn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Zn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)TS.indexOf(n)===-1&&In.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=rr(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&In.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Zn(this,void 0,void 0,function*(){const r=yield cr(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>Zn(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&In.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?In.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&In.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&In.throwError("network does not support EIP-1559",de.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):In.throwError("failed to get consistent fee data",de.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(kS.indexOf(s.code)>=0)throw s;return In.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",de.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&In.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield cr(r)})}_checkProvider(e){this.provider||In.throwError("missing provider",de.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class av extends Ws{constructor(e,r){super(),De(this,"address",e),De(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{In.throwError(e,de.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new av(this.address,e)}}const PS="wallet/5.7.0";var M2=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const zo=new de(PS);function IS(t){return t!=null&&dt(t.privateKey,32)&&t.address!=null}function DS(t){const e=t.mnemonic;return e&&e.phrase}class so extends Ws{constructor(e,r){if(super(),IS(e)){const n=new bo(e.privateKey);if(De(this,"_signingKey",()=>n),De(this,"address",ka(this.publicKey)),this.address!==jt(e.address)&&zo.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),DS(e)){const s=e.mnemonic;De(this,"_mnemonic",()=>({phrase:s.phrase,path:s.path||Ds,locale:s.locale||"en"}));const i=this.mnemonic,u=xn.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path);ka(u.privateKey)!==this.address&&zo.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else De(this,"_mnemonic",()=>null)}else{if(bo.isSigningKey(e))e.curve!=="secp256k1"&&zo.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),De(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new bo(e);De(this,"_signingKey",()=>n)}De(this,"_mnemonic",()=>null),De(this,"address",ka(this.publicKey))}r&&!Vs.isProvider(r)&&zo.throwArgumentError("invalid provider","provider",r),De(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new so(this,e)}signTransaction(e){return cr(e).then(r=>{r.from!=null&&(jt(r.from)!==this.address&&zo.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(Gt(Op(r)));return Op(r,n)})}signMessage(e){return M2(this,void 0,void 0,function*(){return Cp(this._signingKey().signDigest(z1(e)))})}_signTypedData(e,r,n){return M2(this,void 0,void 0,function*(){const s=yield Lr.resolveNames(e,r,n,i=>(this.provider==null&&zo.throwError("cannot resolve ENS names without a provider",de.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:i}),this.provider.resolveName(i)));return Cp(this._signingKey().signDigest(Lr.hash(s.domain,r,s.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),Px(this,e,r,n)}static createRandom(e){let r=cs(16);e||(e={}),e.extraEntropy&&(r=Fe(hr(Gt(Xt([r,e.extraEntropy])),0,16)));const n=Zl(r,e.locale);return so.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return Ix(e,r,n).then(s=>new so(s))}static fromEncryptedJsonSync(e,r){return new so(Dx(e,r))}static fromMnemonic(e,r,n){return r||(r=Ds),new so(xn.fromMnemonic(e,null,n).derivePath(r))}}function OS(t,e){return y0(z1(t),e)}function FS(t,e,r,n){return y0(Lr.hash(t,e,r),n)}const LS=Object.freeze(Object.defineProperty({__proto__:null,Wallet:so,verifyMessage:OS,verifyTypedData:FS},Symbol.toStringTag,{value:"Module"})),US=gr(LS),KS="web/5.7.1";var $S=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};function qS(t,e){return $S(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const u=e.fetchOptions;u.mode&&(r.mode=u.mode),u.cache&&(r.cache=u.cache),u.credentials&&(r.credentials=u.credentials),u.redirect&&(r.redirect=u.redirect),u.referrer&&(r.referrer=u.referrer)}const n=yield fetch(t,r),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((u,v)=>{i[v.toLowerCase()]=u}):n.headers.keys().forEach(u=>{i[u.toLowerCase()]=n.headers.get(u)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:Fe(new Uint8Array(s))}})}var HS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const Jn=new de(KS);function A2(t){return new Promise(e=>{setTimeout(e,t)})}function ha(t,e){if(t==null)return null;if(typeof t=="string")return t;if(g0(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return $a(t)}catch{}return Ue(t)}return t}function zS(t){return vr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Kx(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Jn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Jn.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const u=typeof t=="object"?!!t.errorPassThrough:!1,v={};let b=null;const m={method:"GET"};let g=!1,_=2*60*1e3;if(typeof t=="string")b=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Jn.throwArgumentError("missing URL","connection.url",t),b=t.url,typeof t.timeout=="number"&&t.timeout>0&&(_=t.timeout),t.headers)for(const F in t.headers)v[F.toLowerCase()]={key:F,value:String(t.headers[F])},["if-none-match","if-modified-since"].indexOf(F.toLowerCase())>=0&&(g=!0);if(m.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){b.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Jn.throwError("basic authentication requires a secure https url",de.errors.INVALID_ARGUMENT,{argument:"url",url:b,user:t.user,password:"[REDACTED]"});const F=t.user+":"+t.password;v.authorization={key:"Authorization",value:"Basic "+H1(vr(F))}}t.skipFetchSetup!=null&&(m.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(m.fetchOptions=rr(t.fetchOptions))}const A=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=b?b.match(A):null;if(E)try{const F={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?q1(E[3]):zS(E[3])};let O=F.body;return r&&(O=r(F.body,F)),Promise.resolve(O)}catch(F){Jn.throwError("processing response error",de.errors.SERVER_ERROR,{body:ha(E[1],E[2]),error:F,requestBody:null,requestMethod:"GET",url:b})}e&&(m.method="POST",m.body=e,v["content-type"]==null&&(v["content-type"]={key:"Content-Type",value:"application/octet-stream"}),v["content-length"]==null&&(v["content-length"]={key:"Content-Length",value:String(e.length)}));const R={};Object.keys(v).forEach(F=>{const O=v[F];R[O.key]=O.value}),m.headers=R;const B=function(){let F=null;return{promise:new Promise(function(H,G){_&&(F=setTimeout(()=>{F!=null&&(F=null,G(Jn.makeError("timeout",de.errors.TIMEOUT,{requestBody:ha(m.body,R["content-type"]),requestMethod:m.method,timeout:_,url:b})))},_))}),cancel:function(){F!=null&&(clearTimeout(F),F=null)}}}(),T=function(){return HS(this,void 0,void 0,function*(){for(let F=0;F=300)&&(B.cancel(),Jn.throwError("bad response",de.errors.SERVER_ERROR,{status:O.statusCode,headers:O.headers,body:ha(q,O.headers?O.headers["content-type"]:null),requestBody:ha(m.body,R["content-type"]),requestMethod:m.method,url:b})),r)try{const H=yield r(q,O);return B.cancel(),H}catch(H){if(H.throttleRetry&&F{let v=null;if(i!=null)try{v=JSON.parse($a(i))}catch(b){Jn.throwError("invalid JSON",de.errors.SERVER_ERROR,{body:i,error:b})}return r&&(v=r(v,u)),v},s=null;if(e!=null){s=vr(e);const i=typeof t=="string"?{url:t}:rr(t);i.headers?Object.keys(i.headers).filter(v=>v.toLowerCase()==="content-type").length!==0||(i.headers=rr(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return Kx(t,s,n)}function ho(t,e){return e||(e={}),e=rr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let s=null,i=!1;const u=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{u()&&n(new Error("timeout"))},e.timeout));const v=e.retryLimit;let b=0;function m(){return t().then(function(g){if(g!==void 0)u()&&r(g);else if(e.oncePoll)e.oncePoll.once("poll",m);else if(e.onceBlock)e.onceBlock.once("block",m);else if(!i){if(b++,b>v){u()&&n(new Error("retry limit reached"));return}let _=e.interval*parseInt(String(Math.random()*Math.pow(2,b)));_e.ceiling&&(_=e.ceiling),setTimeout(m,_)}return null},function(g){u()&&n(g)})}m()})}const jS=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:Kx,fetchJson:Ql,poll:ho},Symbol.toStringTag,{value:"Module"})),GS=gr(jS);(function(t){var e=ue&&ue.__createBinding||(Object.create?function(y,a,f,c){c===void 0&&(c=f),Object.defineProperty(y,c,{enumerable:!0,get:function(){return a[f]}})}:function(y,a,f,c){c===void 0&&(c=f),y[c]=a[f]}),r=ue&&ue.__setModuleDefault||(Object.create?function(y,a){Object.defineProperty(y,"default",{enumerable:!0,value:a})}:function(y,a){y.default=a}),n=ue&&ue.__importStar||function(y){if(y&&y.__esModule)return y;var a={};if(y!=null)for(var f in y)f!=="default"&&Object.prototype.hasOwnProperty.call(y,f)&&e(a,y,f);return r(a,y),a};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var s=G6;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var i=kM;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return i.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return i.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return i.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return i.isAddress}});var u=n(PM);t.base64=u;var v=OM;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return v.Base58}});var b=FM;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return b.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return b.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return b.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return b.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return b.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return b.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return b.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return b.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return b.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return b.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return b.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return b.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return b.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return b.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return b.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return b.stripZeros}});var m=LM;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return m._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return m.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return m.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return m.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return m.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return m.namehash}});var g=GE;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return g.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return g.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return g.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return g.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return g.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return g.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return g.mnemonicToSeed}});var _=aS;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return _.getJsonWalletAddress}});var A=oS;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return A.keccak256}});var E=sS;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return E.Logger}});var R=w2;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return R.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return R.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return R.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return R.sha512}});var B=mS;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return B.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return B.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return B.sha256}});var T=gS;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return T.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return T.shuffled}});var F=bS;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return F.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return F.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return F.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return F.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return F.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return F.shallowCopy}});var O=n(yS);t.RLP=O;var q=xS;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return q.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return q.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return q.SigningKey}});var H=_2;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return H.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return H.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return H.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return H._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return H.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return H.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return H.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return H.Utf8ErrorFuncs}});var G=wS;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return G.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return G.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return G.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return G.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return G.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return G.TransactionTypes}});var re=ES;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return re.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return re.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return re.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return re.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return re.parseUnits}});var ne=US;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return ne.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return ne.verifyTypedData}});var Y=GS;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return Y._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return Y.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return Y.poll}});var W=w2;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return W.SupportedAlgorithm}});var se=_2;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return se.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return se.Utf8ErrorReason}})})(i0);const VS="networks/5.7.1",E2=new de(VS);function WS(t){return t&&typeof t.renetwork=="function"}function Zi(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const u=new r.PocketProvider(t,n.pocket);u.network&&i.indexOf(u.network.name)===-1&&s.push(u)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],u=new r.AnkrProvider(t,n.ankr);u.network&&i.indexOf(u.network.name)===-1&&s.push(u)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return Zi(r)},e}function sl(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return sl(t,n)},r}const S2={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Zi("homestead")},R2={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Zi("ropsten")},C2={chainId:63,name:"classicMordor",_defaultProvider:sl("https://www.ethercluster.com/mordor","classicMordor")},ec={unspecified:{chainId:0,name:"unspecified"},homestead:S2,mainnet:S2,morden:{chainId:2,name:"morden"},ropsten:R2,testnet:R2,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Zi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Zi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Zi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Zi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:sl("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:C2,classicTestnet:C2,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:sl("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Zi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Zi("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 ZS(t){if(t==null)return null;if(typeof t=="number"){for(const n in ec){const s=ec[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ec[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ec[t.name];if(!e)return typeof t.chainId!="number"&&E2.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&E2.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(WS(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}var fl="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Up={};for(var tc=0;tc>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function $x(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=ws(e)^n>>5}for(e=ws(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=$x(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5!==0)throw new Error("Non 5-bit word");n=ws(n)^u,s+=fl.charAt(u)}for(i=0;i<6;++i)n=ws(n);for(n^=1,i=0;i<6;++i){var v=n>>(5-i)*5&31;s+=fl.charAt(v)}return s}function qx(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),u=t.slice(s+1);if(u.length<6)return"Data too short";var v=$x(i);if(typeof v=="string")return v;for(var b=[],m=0;m=u.length)&&b.push(_)}return v!==1?"Invalid checksum for "+t:{prefix:i,words:b}}function XS(){var t=qx.apply(null,arguments);if(typeof t=="object")return t}function YS(t){var e=qx.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function eu(t,e,r,n){for(var s=0,i=0,u=(1<=r;)i-=r,v.push(s>>i&u);if(n)i>0&&v.push(s<=e)return"Excess padding";if(s<this.data(_,!0);return e.transaction={hash:u,type:m,accessList:qe.allowNull(this.accessList.bind(this),null),blockHash:qe.allowNull(u,null),blockNumber:qe.allowNull(b,null),transactionIndex:qe.allowNull(b,null),confirmations:qe.allowNull(b,null),from:r,gasPrice:qe.allowNull(n),maxPriorityFeePerGas:qe.allowNull(n),maxFeePerGas:qe.allowNull(n),gasLimit:n,to:qe.allowNull(r,null),value:n,nonce:b,data:i,r:qe.allowNull(this.uint256),s:qe.allowNull(this.uint256),v:qe.allowNull(b),creates:qe.allowNull(r,null),raw:qe.allowNull(i)},e.transactionRequest={from:qe.allowNull(r),nonce:qe.allowNull(b),gasLimit:qe.allowNull(n),gasPrice:qe.allowNull(n),maxPriorityFeePerGas:qe.allowNull(n),maxFeePerGas:qe.allowNull(n),to:qe.allowNull(r),value:qe.allowNull(n),data:qe.allowNull(g),type:qe.allowNull(b),accessList:qe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:b,blockNumber:b,transactionHash:u,address:r,topics:qe.arrayOf(u),data:i,logIndex:b,blockHash:u},e.receipt={to:qe.allowNull(this.address,null),from:qe.allowNull(this.address,null),contractAddress:qe.allowNull(r,null),transactionIndex:b,root:qe.allowNull(v),gasUsed:n,logsBloom:qe.allowNull(i),blockHash:u,transactionHash:u,logs:qe.arrayOf(this.receiptLog.bind(this)),blockNumber:b,confirmations:qe.allowNull(b,null),cumulativeGasUsed:n,effectiveGasPrice:qe.allowNull(n),status:qe.allowNull(b),type:m},e.block={hash:qe.allowNull(u),parentHash:u,number:b,timestamp:b,nonce:qe.allowNull(v),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:qe.allowNull(r),extraData:i,transactions:qe.allowNull(qe.arrayOf(u)),baseFeePerGas:qe.allowNull(n)},e.blockWithTransactions=rr(e.block),e.blockWithTransactions.transactions=qe.allowNull(qe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:qe.allowNull(s,void 0),toBlock:qe.allowNull(s,void 0),blockHash:qe.allowNull(u,void 0),address:qe.allowNull(r,void 0),topics:qe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:qe.allowNull(b),blockHash:qe.allowNull(u),transactionIndex:b,removed:qe.allowNull(this.boolean.bind(this)),address:r,data:qe.allowFalsish(i,"0x"),topics:qe.arrayOf(u),transactionHash:u,logIndex:b},e}accessList(e){return Io(e||[])}number(e){return e==="0x"?0:Le.from(e).toNumber()}type(e){return e==="0x"||e==null?0:Le.from(e).toNumber()}bigNumber(e){return Le.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),dt(e))?e.toLowerCase():cf.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return jt(e)}callAddress(e){if(!dt(e,32))return null;const r=jt(hr(e,12));return r===A6?null:r}contractAddress(e){return L1(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||dt(e))return Bs(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ii(n)!==32?cf.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=Le.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!dt(e))throw new Error("invalid uint256");return Zt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=qe.check(r,e);return s._difficulty=n==null?null:Le.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return qe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&Le.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=qe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;dt(n)&&(n=Le.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),dt(n)&&(n=Le.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return xx(e)}receiptLog(e){return qe.check(this.formats.receiptLog,e)}receipt(e){const r=qe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=Le.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&cf.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):cf.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&cf.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return qe.check(this.formats.filter,e)}filterLog(e){return qe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(s){n.push(e(s))}),n}}}function nR(t){return t&&typeof t.isCommunityResource=="function"}function N2(t){return nR(t)&&t.isCommunityResource()}var ot=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const ht=new de(Zs),iR=10;function T2(t){return t==null?"null":(Ii(t)!==32&&ht.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function k2(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(s=>{r[T2(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return T2(e)}).join("&")}function aR(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function jo(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ii(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+k2(t);if(BS.isForkEvent(t))throw ht.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+k2(t.topics||[])}throw new Error("invalid event - "+t)}function lf(){return new Date().getTime()}function P2(t){return new Promise(e=>{setTimeout(e,t)})}const oR=["block","network","pending","poll"];class sR{constructor(e,r,n){De(this,"tag",e),De(this,"listener",r),De(this,"once",n),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 e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=aR(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||oR.indexOf(this.tag)>=0}}const fR={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 cd(t){return Zt(Le.from(t).toHexString(),32)}function I2(t){return Ns.encode(Xt([t,hr(aa(aa(t)),0,4)]))}const Hx=new RegExp("^(ipfs)://(.*)$","i"),D2=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Hx,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Dc(t,e){try{return $a(s0(t,e))}catch{}return null}function s0(t,e){if(t==="0x")return null;const r=Le.from(hr(t,e,e+32)).toNumber(),n=Le.from(hr(t,r,r+32)).toNumber();return hr(t,r+32,r+32+n)}function ld(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):ht.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function O2(t){const e=Fe(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 cR(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function zx(t){const e=[];let r=0;for(let n=0;nLe.from(e).eq(1)).catch(e=>{if(e.code===de.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ot(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:an([e,Uf(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=an(["0x9061b923",zx([U6(this.name),n.data])]));try{let i=yield this.provider.call(n);return Fe(i).length%32===4&&ht.throwError("resolver threw error",de.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=s0(i,0)),i}catch(i){if(i.code===de.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return ot(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?s0(n,0):null})}_getAddress(e,r){const n=fR[String(e)];if(n==null&&ht.throwError(`unsupported coin type: ${e}`,de.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=Fe(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const u=parseInt(i[1],16);if(i[2].length===u*2&&u>=1&&u<=75)return I2(Xt([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const u=parseInt(i[1],16);if(i[2].length===u*2&&u>=1&&u<=75)return I2(Xt([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let u=s[0];if(u===0?i!==20&&i!==32&&(u=-1):u=-1,u>=0&&s.length===2+i&&i>=1&&i<=75){const v=B2.toWords(s.slice(2));return v.unshift(u),B2.encode(n.prefix,v)}}return null}getAddress(e){return ot(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const s=yield this._fetch("0x3b3b57de");return s==="0x"||s===S6?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===de.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",cd(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&ht.throwError("invalid or unsupported coin data",de.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ot(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;nu[b])}return ht.throwError("invalid or unsupported content hash data",de.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ot(this,void 0,void 0,function*(){let r=vr(e);r=Xt([cd(64),cd(r.length),r]),r.length%32!==0&&(r=Xt([r,Zt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Ue(r));return n==null||n==="0x"?null:$a(n)})}}let ud=null,lR=1;class jx extends Vs{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),De(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=ri(new.target,"getNetwork")(e);r?(De(this,"_network",r),this.emit("network",r,null)):ht.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ot(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ht.throwError("no network detected",de.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:De(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return ho(()=>this._ready().then(e=>e,e=>{if(!(e.code===de.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ud==null&&(ud=new qe),ud}static getNetwork(e){return ZS(e??"homestead")}ccipReadFetch(e,r,n){return ot(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),u=[];for(let v=0;v=0?null:JSON.stringify({data:i,sender:s}),_=yield Ql({url:m,errorPassThrough:!0},g,(E,R)=>(E.status=R.statusCode,E));if(_.data)return _.data;const A=_.message||"unknown error";if(_.status>=400&&_.status<500)return ht.throwError(`response not found during CCIP fetch: ${A}`,de.errors.SERVER_ERROR,{url:b,errorMessage:A});u.push(A)}return ht.throwError(`error encountered during CCIP fetch: ${u.map(v=>JSON.stringify(v)).join(", ")}`,de.errors.SERVER_ERROR,{urls:n,errorMessages:u})})}_getInternalBlockNumber(e){return ot(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const s=this._internalBlockNumber;try{const i=yield s;if(lf()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=lf(),n=cr({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const u=lf();return s=Le.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ot(this,void 0,void 0,function*(){const e=lR++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)ht.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",ht.makeError("network block skew detected",de.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let u=this.getTransactionReceipt(i).then(v=>(!v||v.blockNumber==null||(this._emitted["t:"+i]=v.blockNumber,this.emit(i,v)),null)).catch(v=>{this.emit("error",v)});r.push(u);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const u=i.toBlock-this._maxFilterBlockRange;u>i.fromBlock&&(i.fromBlock=u),i.fromBlock<0&&(i.fromBlock=0);const v=this.getLogs(i).then(b=>{s._inflight=!1,b.length!==0&&b.forEach(m=>{m.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=m.blockNumber),this._emitted["b:"+m.blockHash]=m.blockNumber,this._emitted["t:"+m.transactionHash]=m.blockNumber,this.emit(i,m)})}).catch(b=>{this.emit("error",b),s._inflight=!1});r.push(v)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ot(this,void 0,void 0,function*(){return ht.throwError("provider does not support network detection",de.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ot(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,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",r,e),yield P2(0),this._network;const n=ht.makeError("underlying network changed",de.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!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))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=lf();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ot(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,s){return ot(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((u,v)=>{const b=[];let m=!1;const g=function(){return m?!0:(m=!0,b.forEach(A=>{A()}),!1)},_=A=>{A.confirmations{this.removeListener(e,_)}),s){let A=s.startBlock,E=null;const R=B=>ot(this,void 0,void 0,function*(){m||(yield P2(1e3),this.getTransactionCount(s.from).then(T=>ot(this,void 0,void 0,function*(){if(!m){if(T<=s.nonce)A=B;else{{const F=yield this.getTransaction(e);if(F&&F.blockNumber!=null)return}for(E==null&&(E=A-3,E{m||this.once("block",R)}))});if(m)return;this.once("block",R),b.push(()=>{this.removeListener("block",R)})}if(typeof n=="number"&&n>0){const A=setTimeout(()=>{g()||v(ht.makeError("timeout exceeded",de.errors.TIMEOUT,{timeout:n}))},n);A.unref&&A.unref(),b.push(()=>{clearTimeout(A)})}})})}getBlockNumber(){return ot(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Le.from(e)}catch(r){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return Le.from(s)}catch(i){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return Le.from(s).toNumber()}catch(i){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return Ue(s)}catch(i){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(u=>Bs(u))}),i=yield this.perform("getStorageAt",s);try{return Ue(i)}catch(u){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:u})}})}_wrapTransaction(e,r,n){if(r!=null&&Ii(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&ht.throwError("Transaction hash mismatch from Provider.sendTransaction.",de.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,u)=>ot(this,void 0,void 0,function*(){i==null&&(i=1),u==null&&(u=0);let v;i!==0&&n!=null&&(v={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const b=yield this._waitForTransaction(e.hash,i,u,v);return b==null&&i===0?null:(this._emitted["t:"+e.hash]=b.blockNumber,b.status===0&&ht.throwError("transaction failed",de.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:b}),b)}),s}sendTransaction(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>Ue(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return ot(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Le.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Ue(i):null))}),this.formatter.transactionRequest(yield cr(n))})}_getFilter(e){return ot(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield cr(r))})}_call(e,r,n){return ot(this,void 0,void 0,function*(){n>=iR&&ht.throwError("CCIP read exceeded maximum redirections",de.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Ii(i)%32===4)try{const u=hr(i,4),v=hr(u,0,32);Le.from(v).eq(s)||ht.throwError("CCIP Read sender did not match",de.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const b=[],m=Le.from(hr(u,32,64)).toNumber(),g=Le.from(hr(u,m,m+32)).toNumber(),_=hr(u,m+32);for(let F=0;Fot(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let u=null;for(let b=0;bthis._wrapTransaction(b)),v}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ho(()=>ot(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let u=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;u<=0&&(u=1),s.confirmations=u}return this._wrapTransaction(s)}),{oncePoll:this})})}getTransactionReceipt(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ho(()=>ot(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let u=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;u<=0&&(u=1),s.confirmations=u}return s}),{oncePoll:this})})}getLogs(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield cr({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),qe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ot(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ot(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ht.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ot(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const s=new F2(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ot(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||ht.throwError("network does not support ENS",de.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Uf(e).substring(2)});return this.formatter.callAddress(s)}catch{}return null})}resolveName(e){return ot(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(dt(e))throw n}typeof e!="string"&&ht.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ot(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const s=Dc(yield this.call({to:n,data:"0x691f3431"+Uf(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return ot(this,void 0,void 0,function*(){let r=null;if(dt(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",u=yield this._getResolver(i,"getAvatar");if(!u)return null;r=new F2(this,u,i);try{const v=yield r.getAvatar();if(v)return v.url}catch(v){if(v.code!==de.errors.CALL_EXCEPTION)throw v}try{const v=Dc(yield this.call({to:u,data:"0x691f3431"+Uf(i).substring(2)}),0);r=yield this.getResolver(v)}catch(v){if(v.code!==de.errors.CALL_EXCEPTION)throw v;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return ht.throwError(e+" not implemented",de.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const s=new sR(jo(e),r,n);return this._events.push(s),this._startEvent(s),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,s=[],i=jo(e);return this._events=this._events.filter(u=>u.tag!==i?!0:(setTimeout(()=>{u.listener.apply(this,r)},0),n=!0,u.once?(s.push(u),!1):!0)),s.forEach(u=>{this._stopEvent(u)}),n}listenerCount(e){if(!e)return this._events.length;let r=jo(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=jo(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let s=!1,i=jo(e);return this._events=this._events.filter(u=>u.tag!==i||u.listener!=r||s?!0:(s=!0,n.push(u),!1)),n.forEach(u=>{this._stopEvent(u)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=jo(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Wi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const wr=new de(Zs),uR=["call","estimateGas"];function $f(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=dt(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=$f(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return $f(JSON.parse(t),e)}catch{}return null}function Gx(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=$f(e,!0);if(i)return i.data;wr.throwError("missing revert data in call exception; Transaction reverted without a reason string",de.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let i=$f(e.body,!1);i==null&&(i=$f(e,!1)),i&&wr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",de.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===de.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&wr.throwError("insufficient funds for intrinsic transaction cost",de.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&wr.throwError("nonce has already been used",de.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&wr.throwError("replacement fee too low",de.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&wr.throwError("legacy pre-eip-155 transactions not supported",de.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),uR.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&wr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",de.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function L2(t){return new Promise(function(e){setTimeout(e,t)})}function dR(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 uf(t){return t&&t.toLowerCase()}const Kp={};class Vx extends Ws{constructor(e,r,n){if(super(),e!==Kp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");De(this,"provider",r),n==null&&(n=0),typeof n=="string"?(De(this,"_address",this.provider.formatter.address(n)),De(this,"_index",null)):typeof n=="number"?(De(this,"_index",n),De(this,"_address",null)):wr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return wr.throwError("cannot alter JSON-RPC Signer connection",de.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new hR(Kp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&wr.throwError("unknown account #"+this._index,de.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=rr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=rr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Wi(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&wr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),cr({tx:cr(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&wr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(u=>u,u=>(typeof u.message=="string"&&u.message.match(/user denied/i)&&wr.throwError("user rejected transaction",de.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Gx("sendTransaction",u,i)))})}signTransaction(e){return wr.throwError("signing transactions is unsupported",de.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Wi(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield ho(()=>Wi(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Wi(this,void 0,void 0,function*(){const r=typeof e=="string"?vr(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Ue(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&wr.throwError("user rejected signing",de.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Wi(this,void 0,void 0,function*(){const r=typeof e=="string"?vr(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Ue(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&wr.throwError("user rejected signing",de.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Wi(this,void 0,void 0,function*(){const s=yield Lr.resolveNames(e,r,n,u=>this.provider.resolveName(u)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Lr.getPayload(s.domain,r,s.value))])}catch(u){throw typeof u.message=="string"&&u.message.match(/user denied/i)&&wr.throwError("user rejected signing",de.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),u}})}unlock(e){return Wi(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class hR extends Vx{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const pR={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Wx extends jx{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(u=>{s(u)},u=>{i(u)})},0)})),super(n),e||(e=ri(this.constructor,"defaultUrl")()),typeof e=="string"?De(this,"connection",Object.freeze({url:e})):De(this,"connection",Object.freeze(rr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(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 Wi(this,void 0,void 0,function*(){yield L2(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=ri(this.constructor,"getNetwork");try{return r(Le.from(e).toNumber())}catch(n){return wr.throwError("could not detect network",de.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return wr.throwError("could not detect network",de.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Vx(Kp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Mn(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=Ql(this.connection,JSON.stringify(n),dR).then(u=>(this.emit("debug",{action:"response",request:n,response:u,provider:this}),u),u=>{throw this.emit("debug",{action:"response",error:u,request:n,provider:this}),u});return s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[uf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[uf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[uf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[uf(r.address),Zt(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[ri(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ri(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=uf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Wi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&Le.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=rr(r),r.transaction=rr(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&wr.throwError(e+" not implemented",de.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return Gx(e,s,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let u=Promise.resolve();return i.forEach(function(v){e._emitted["t:"+v.toLowerCase()]="pending",u=u.then(function(){return e.getTransaction(v).then(function(b){return e.emit("pending",b),null})})}),u.then(function(){return L2(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=rr(pR);if(r)for(const i in r)r[i]&&(n[i]=!0);D1(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const u=Bs(Le.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=u}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=Ue(e[i]))}),e.accessList&&(s.accessList=Io(e.accessList)),s}}var cl=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const fo=new de(Zs);function rc(){return new Date().getTime()}function U2(t){let e=null;for(let r=0;re?null:(n+s)/2}function ls(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(Le.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>ls(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=ls(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let vR=1;function $2(t){let e=null,r=null,n=new Promise(u=>{e=function(){r&&(clearTimeout(r),r=null),u()},r=setTimeout(e,t)});const s=u=>(n=n.then(u),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const mR=[de.errors.CALL_EXCEPTION,de.errors.INSUFFICIENT_FUNDS,de.errors.NONCE_EXPIRED,de.errors.REPLACEMENT_UNDERPRICED,de.errors.UNPREDICTABLE_GAS_LIMIT],gR=["address","args","errorArgs","errorSignature","method","transaction"];function nc(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 bR(t,e){return function(r){const n={};r.forEach(i=>{const u=t(i.result);n[u]||(n[u]={count:0,result:i.result}),n[u].count++});const s=Object.keys(n);for(let i=0;i=e)return u.result}}}function yR(t,e,r){let n=ls;switch(e){case"getBlockNumber":return function(s){const i=s.map(v=>v.result);let u=K2(s.map(v=>v.result),2);if(u!=null)return u=Math.ceil(u),i.indexOf(u+1)>=0&&u++,u>=t._highestBlockNumber&&(t._highestBlockNumber=u),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(u=>u.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return K2(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=rr(s),s.confirmations=-1,ls(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=rr(s),s.transactions=s.transactions.map(i=>(i=rr(i),i.confirmations=-1,i)),ls(s))}:n=function(s){return s==null?null:ls(s)};break;default:throw new Error("unknown method: "+e)}return bR(n,t.quorum)}function df(t,e){return cl(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:ho(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function xR(t,e,r,n){return cl(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&dt(i.fromBlock)||i.toBlock&&dt(i.toBlock))&&(s=yield df(t,e)),s.getLogs(i)}}return fo.throwError("unknown method error",de.errors.UNKNOWN_ERROR,{method:r,params:n})})}class wR extends jx{constructor(e,r){e.length===0&&fo.throwArgumentError("missing providers","providers",e);const n=e.map((u,v)=>{if(Vs.isProvider(u)){const g=N2(u)?2e3:750;return Object.freeze({provider:u,weight:1,stallTimeout:g,priority:1})}const b=rr(u);b.priority==null&&(b.priority=1),b.stallTimeout==null&&(b.stallTimeout=N2(u)?2e3:750),b.weight==null&&(b.weight=1);const m=b.weight;return(m%1||m>512||m<1)&&fo.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${v}].weight`,m),Object.freeze(b)}),s=n.reduce((u,v)=>u+v.weight,0);r==null?r=s/2:r>s&&fo.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=U2(n.map(u=>u.provider.network));i==null&&(i=new Promise((u,v)=>{setTimeout(()=>{this.detectNetwork().then(u,v)},0)})),super(i),De(this,"providerConfigs",Object.freeze(n)),De(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return cl(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return U2(e)})}perform(e,r){return cl(this,void 0,void 0,function*(){if(e==="sendTransaction"){const b=yield Promise.all(this.providerConfigs.map(m=>m.provider.sendTransaction(r.signedTransaction).then(g=>g.hash,g=>g)));for(let m=0;mb.priority-m.priority);const i=this._highestBlockNumber;let u=0,v=!0;for(;;){const b=rc();let m=s.filter(E=>E.runner&&b-E.startE+R.weight,0);for(;m{E.staller=null}),E.runner=xR(E,i,e,r).then(B=>{E.done=!0,E.result=B,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:R,backend:nc(E,rc()),request:{method:e,params:Mn(r)},provider:this})},B=>{E.done=!0,E.error=B,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:R,backend:nc(E,rc()),request:{method:e,params:Mn(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:R,backend:nc(E,null),request:{method:e,params:Mn(r)},provider:this}),m+=E.weight}const g=[];s.forEach(E=>{E.done||!E.runner||(g.push(E.runner),E.staller&&g.push(E.staller.getPromise()))}),g.length&&(yield Promise.race(g));const _=s.filter(E=>E.done&&E.error==null);if(_.length>=this.quorum){const E=n(_);if(E!==void 0)return s.forEach(R=>{R.staller&&R.staller.cancel(),R.cancelled=!0}),E;v||(yield $2(100).getPromise()),v=!1}const A=s.reduce((E,R)=>{if(!R.done||R.error==null)return E;const B=R.error.code;return mR.indexOf(B)>=0&&(E[B]||(E[B]={error:R.error,weight:0}),E[B].weight+=R.weight),E},{});if(Object.keys(A).forEach(E=>{const R=A[E];if(R.weight{F.staller&&F.staller.cancel(),F.cancelled=!0});const B=R.error,T={};gR.forEach(F=>{B[F]!=null&&(T[F]=B[F])}),fo.throwError(B.reason||B.message,E,T)}),s.filter(E=>!E.done).length===0)break}return s.forEach(b=>{b.staller&&b.staller.cancel(),b.cancelled=!0}),fo.throwError("failed to meet quorum",de.errors.SERVER_ERROR,{method:e,params:r,results:s.map(b=>nc(b)),provider:this})})}}const q2=new de(Zs);let _R=1;function H2(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:_R++,jsonrpc:"2.0"};return new Promise((u,v)=>{this.emit("debug",{action:"request",fetcher:r,request:Mn(i),provider:this}),e(i,(b,m)=>{if(b)return this.emit("debug",{action:"response",fetcher:r,error:b,request:i,provider:this}),v(b);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:m,provider:this}),m.error){const g=new Error(m.error.message);return g.code=m.error.code,g.data=m.error.data,v(g)}u(m.result)})})}}function MR(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Mn(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class AR extends Wx{constructor(e,r){e==null&&q2.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=MR(e)):e.sendAsync?s=H2(e,e.sendAsync.bind(e)):e.send?s=H2(e,e.send.bind(e)):q2.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),De(this,"jsonRpcFetchFunc",s),De(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}new de(Zs);const ER="contracts/5.7.0";var Ro=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const dr=new de(ER);function ll(t,e){return Ro(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&dr.throwArgumentError("invalid address or ENS name","name",r);try{return jt(r)}catch{}t||dr.throwError("a provider or signer is needed to resolve ENS names",de.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&dr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Oc(t,e,r){return Ro(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>Oc(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield ll(t,e):r.type==="tuple"?yield Oc(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Oc(t,n,r.arrayChildren))):Promise.reject(dr.makeError("invalid value for array",de.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function tu(t,e,r){return Ro(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=rr(r.pop())),dr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=cr({override:ll(t.signer,n.from),signer:t.signer.getAddress()}).then(m=>Ro(this,void 0,void 0,function*(){return jt(m.signer)!==m.override&&dr.throwError("Contract with a Signer cannot override from",de.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),m.override})):n.from=t.signer.getAddress():n.from&&(n.from=ll(t.provider,n.from));const s=yield cr({args:Oc(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:cr(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),u={data:i,to:s.address},v=s.overrides;if(v.nonce!=null&&(u.nonce=Le.from(v.nonce).toNumber()),v.gasLimit!=null&&(u.gasLimit=Le.from(v.gasLimit)),v.gasPrice!=null&&(u.gasPrice=Le.from(v.gasPrice)),v.maxFeePerGas!=null&&(u.maxFeePerGas=Le.from(v.maxFeePerGas)),v.maxPriorityFeePerGas!=null&&(u.maxPriorityFeePerGas=Le.from(v.maxPriorityFeePerGas)),v.from!=null&&(u.from=v.from),v.type!=null&&(u.type=v.type),v.accessList!=null&&(u.accessList=Io(v.accessList)),u.gasLimit==null&&e.gas!=null){let m=21e3;const g=Fe(i);for(let _=0;_n[m]!=null);return b.length&&dr.throwError(`cannot override ${b.map(m=>JSON.stringify(m)).join(",")}`,de.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:b}),u})}function SR(t,e){return function(...r){return tu(t,e,r)}}function RR(t,e){const r=t.signer||t.provider;return function(...n){return Ro(this,void 0,void 0,function*(){r||dr.throwError("estimate require a provider or signer",de.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield tu(t,e,n);return yield r.estimateGas(s)})}}function CR(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let u=Mn(i),v=null;try{v=t.interface.parseLog(i)}catch{}return v&&(u.args=v.args,u.decode=(b,m)=>t.interface.decodeEventLog(v.eventFragment,b,m),u.event=v.name,u.eventSignature=v.signature),u.removeListener=()=>t.provider,u.getBlock=()=>t.provider.getBlock(s.blockHash),u.getTransaction=()=>t.provider.getTransaction(s.transactionHash),u.getTransactionReceipt=()=>Promise.resolve(s),u}),s))}function Zx(t,e,r){const n=t.signer||t.provider;return function(...s){return Ro(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const b=rr(s.pop());b.blockTag!=null&&(i=yield b.blockTag),delete b.blockTag,s.push(b)}t.deployTransaction!=null&&(yield t._deployed(i));const u=yield tu(t,e,s),v=yield n.call(u,i);try{let b=t.interface.decodeFunctionResult(e,v);return r&&e.outputs.length===1&&(b=b[0]),b}catch(b){throw b.code===de.errors.CALL_EXCEPTION&&(b.address=t.address,b.args=s,b.transaction=u),b}})}}function BR(t,e){return function(...r){return Ro(this,void 0,void 0,function*(){t.signer||dr.throwError("sending a transaction requires a signer",de.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield tu(t,e,r),s=yield t.signer.sendTransaction(n);return CR(t,s),s})}}function z2(t,e,r){return e.constant?Zx(t,e,r):BR(t,e)}function Jx(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class f0{constructor(e,r){De(this,"tag",e),De(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class NR extends f0{constructor(){super("error",null)}}class j2 extends f0{constructor(e,r,n,s){const i={address:e};let u=r.getEventTopic(n);s?(u!==s[0]&&dr.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[u],super(Jx(i),i),De(this,"address",e),De(this,"interface",r),De(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=g6(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class G2 extends f0{constructor(e,r){super("*",{address:e}),De(this,"address",e),De(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class TR{constructor(e,r,n){De(this,"interface",ri(new.target,"getInterface")(r)),n==null?(De(this,"provider",null),De(this,"signer",null)):Ws.isSigner(n)?(De(this,"provider",n.provider||null),De(this,"signer",n)):Vs.isProvider(n)?(De(this,"provider",n),De(this,"signer",null)):dr.throwArgumentError("invalid signer or provider","signerOrProvider",n),De(this,"callStatic",{}),De(this,"estimateGas",{}),De(this,"functions",{}),De(this,"populateTransaction",{}),De(this,"filters",{});{const u={};Object.keys(this.interface.events).forEach(v=>{const b=this.interface.events[v];De(this.filters,v,(...m)=>({address:this.address,topics:this.interface.encodeFilterTopics(b,m)})),u[b.name]||(u[b.name]=[]),u[b.name].push(v)}),Object.keys(u).forEach(v=>{const b=u[v];b.length===1?De(this.filters,v,this.filters[b[0]]):dr.warn(`Duplicate definition of ${v} (${b.join(", ")})`)})}if(De(this,"_runningEvents",{}),De(this,"_wrappedEmits",{}),e==null&&dr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),De(this,"address",e),this.provider)De(this,"resolvedAddress",ll(this.provider,e));else try{De(this,"resolvedAddress",Promise.resolve(jt(e)))}catch{dr.throwError("provider is required to use ENS name as contract address",de.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(u=>{});const s={},i={};Object.keys(this.interface.functions).forEach(u=>{const v=this.interface.functions[u];if(i[u]){dr.warn(`Duplicate ABI entry for ${JSON.stringify(u)}`);return}i[u]=!0;{const b=v.name;s[`%${b}`]||(s[`%${b}`]=[]),s[`%${b}`].push(u)}this[u]==null&&De(this,u,z2(this,v,!0)),this.functions[u]==null&&De(this.functions,u,z2(this,v,!1)),this.callStatic[u]==null&&De(this.callStatic,u,Zx(this,v,!0)),this.populateTransaction[u]==null&&De(this.populateTransaction,u,SR(this,v)),this.estimateGas[u]==null&&De(this.estimateGas,u,RR(this,v))}),Object.keys(s).forEach(u=>{const v=s[u];if(v.length>1)return;u=u.substring(1);const b=v[0];try{this[u]==null&&De(this,u,this[b])}catch{}this.functions[u]==null&&De(this.functions,u,this.functions[b]),this.callStatic[u]==null&&De(this.callStatic,u,this.callStatic[b]),this.populateTransaction[u]==null&&De(this.populateTransaction,u,this.populateTransaction[b]),this.estimateGas[u]==null&&De(this.estimateGas,u,this.estimateGas[b])})}static getContractAddress(e){return L1(e)}static getInterface(e){return ra.isInterface(e)?e:new ra(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&dr.throwError("contract not deployed",de.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||dr.throwError("sending a transactions require a signer",de.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=rr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&dr.throwError("cannot override "+n,de.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new av(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&De(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return il.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new NR);if(e==="event")return this._normalizeRunningEvent(new f0("event",null));if(e==="*")return this._normalizeRunningEvent(new G2(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new j2(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const s=this.interface.getEvent(n);return this._normalizeRunningEvent(new j2(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new f0(Jx(r),r))}return this._normalizeRunningEvent(new G2(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const s=Mn(r);return s.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||dr.throwError("events require a provider or a signer with a provider",de.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const s=i=>{let u=this._wrapEvent(e,i,r);if(u.decodeError==null)try{const v=e.getEmit(u);this.emit(e.filter,...v)}catch(v){u.decodeError=v.error}e.filter!=null&&this.emit("event",u),u.decodeError!=null&&this.emit("error",u.decodeError,u)};this._wrappedEmits[e.tag]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=rr(s.filter);return typeof r=="string"&&dt(r,32)?(n!=null&&dr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(u=>u.map(v=>this._wrapEvent(s,v,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),s=n.run(r)>0;return this._checkRunningEvents(n),s}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class _s extends TR{}var Ca;(function(t){t[t.Mainnet=1]="Mainnet",t[t.Goerli=5]="Goerli"})(Ca||(Ca={}));Ca.Mainnet+"",Ca.Goerli+"";const Xx={[Ca.Mainnet]:{chainId:"0x"+Ca.Mainnet.toString(16),chainName:"Mainnet",rpcUrls:["https://cloudflare-eth.com","https://rpc.ankr.com/eth","https://main-rpc.linkpool.io"],blockExplorerUrls:["https://etherscan.io"],nativeCurrency:{symbol:"ETH",decimals:18}},[Ca.Goerli]:{chainId:"0x"+Ca.Goerli.toString(16),chainName:"Goerli",rpcUrls:["https://goerli.optimism.io"],blockExplorerUrls:["https://goerli.etherscan.io"],nativeCurrency:{symbol:"ETH",decimals:18}}};var kR="ERC20",PR=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],IR="0x608060405234801561001057600080fd5b506105dd806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610290565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610296565b6100d66004803603604081101561015057600080fd5b50600160a060020a03813516906020013561035f565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a031661040f565b6100d6600480360360408110156101a257600080fd5b50600160a060020a03813516906020013561042a565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610475565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a038135811691602001351661048b565b6000600160a060020a038316151561022957600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526001602090815260408083203384529091528120546102ca908363ffffffff6104b616565b600160a060020a03851660009081526001602090815260408083203384529091529020556102f98484846104cb565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561037657600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff61059816565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561044157600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff6104b616565b60006104823384846104cb565b50600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000828211156104c557600080fd5b50900390565b600160a060020a03821615156104e057600080fd5b600160a060020a038316600090815260208190526040902054610509908263ffffffff6104b616565b600160a060020a03808516600090815260208190526040808220939093559084168152205461053e908263ffffffff61059816565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156105aa57600080fd5b939250505056fea165627a7a72305820722c0187518ce2856a424bdba350d5a263c8f98fcb19cb4cc161372bc3b794c90029",DR="0x608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610290565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610296565b6100d66004803603604081101561015057600080fd5b50600160a060020a03813516906020013561035f565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a031661040f565b6100d6600480360360408110156101a257600080fd5b50600160a060020a03813516906020013561042a565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610475565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a038135811691602001351661048b565b6000600160a060020a038316151561022957600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526001602090815260408083203384529091528120546102ca908363ffffffff6104b616565b600160a060020a03851660009081526001602090815260408083203384529091529020556102f98484846104cb565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561037657600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff61059816565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561044157600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff6104b616565b60006104823384846104cb565b50600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000828211156104c557600080fd5b50900390565b600160a060020a03821615156104e057600080fd5b600160a060020a038316600090815260208190526040902054610509908263ffffffff6104b616565b600160a060020a03808516600090815260208190526040808220939093559084168152205461053e908263ffffffff61059816565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156105aa57600080fd5b939250505056fea165627a7a72305820722c0187518ce2856a424bdba350d5a263c8f98fcb19cb4cc161372bc3b794c90029",OR={name:"solc",version:"0.5.4+commit.9549d8ff.Emscripten.clang"},FR={contractName:kR,abi:PR,bytecode:IR,deployedBytecode:DR,compiler:OR};new ra(FR.abi);const dd=Qr(!1);function ov(){return{boardOpen:dd,open:()=>{dd.value=!0},close:()=>{dd.value=!1}}}function sr(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})}function je(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function bn(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}class LR extends Error{constructor(e,r,n,s){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,this.data=s,this.internal=n}}class Yx extends LR{constructor(e,r,n,s){if(!(Number.isInteger(e)&&e>=1e3&&e<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n,s)}}class UR extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}}class hn extends Error{constructor(){super(...arguments),this.name="ProviderNotFoundError",this.message="Provider not found"}}class V2 extends Error{constructor(){super(...arguments),this.name="AddChainError",this.message="Error adding chain"}}class Qx extends Yx{constructor(e){super(4902,e.message),this.name="SwitchChainError"}}class $p extends Yx{constructor(e){super(4001,e.message),this.name="UserRejectedRequestError"}}class hd extends Error{constructor(e){super(),this.name="ActivateEthersError",this.message="Failed to load wallet data",e&&(this.message=this.message+": "+e)}}class W2 extends Error{constructor(e){super(e),this.name="ConnectError"}}class KR extends Error{constructor(e){super(e),this.name="AutoConnectError"}}class e4{constructor(e){this.options=e}}const sv=Qr(!1),ru=Qr(null),co=Qr(null),ul=Qr(null),fv=Qr(""),cv=Qr(""),dl=Qr(BigInt(0));let qp;const $R=Qr(Object.assign({},Xx)),qR=()=>{clearInterval(qp),sv.value=!1,ru.value=null,co.value=null,ul.value=null,fv.value="",cv.value="",dl.value=BigInt(0)};function HR(t){return sr(this,void 0,void 0,function*(){if(!t)throw new hd("provider not found");const e=new AR(t),r=e.getSigner();let n=null,s="",i=Le.from(0);[n,s,i]=yield v();function v(m=5e3){return sr(this,void 0,void 0,function*(){return Promise.race([Promise.all([e.getNetwork(),r.getAddress(),r.getBalance()]),new Promise((g,_)=>setTimeout(()=>{_(new hd("Operation timed out"))},m))])})}ru.value=Pi(e),co.value=Pi(r),ul.value=n,fv.value=s,dl.value=i.toBigInt();try{cv.value=yield t4(n?.chainId,s)}catch{throw new hd("Failed to look up DNS")}clearInterval(qp),((m=1e4)=>sr(this,void 0,void 0,function*(){qp=setInterval(()=>sr(this,void 0,void 0,function*(){if(!!co.value)try{const g=yield co?.value.getBalance();dl.value=g.toBigInt()}catch{throw new Error("Failed to update balance")}}),m)}))(),sv.value=!0})}function t4(t,e,r){var n;return sr(this,void 0,void 0,function*(){try{switch(t){case 1:case 3:case 4:case 5:return(yield(n=r||ru.value)===null||n===void 0?void 0:n.lookupAddress(e))||"";default:return""}}catch{return""}})}function An(){const t=nn(()=>{var e;return(e=ul.value)===null||e===void 0?void 0:e.chainId});return{isActivated:sv,provider:ru,signer:co,network:ul,address:fv,dnsAlias:cv,balance:dl,availableNetworks:$R,chainId:t,activate:HR,deactivate:qR,lookupDNS:t4}}function Z2(t){return i0.isAddress(t)?t.slice(0,6)+"..."+t.slice(-4):""}function zR(t){if(typeof t=="string"){const e=t.trim().substring(0,2);return Number.parseInt(t,e==="0x"?16:10)}return t}var vi,Rr,ya,xa,wa,no,Hp;class r4 extends e4{constructor(e={}){super(e),vi.add(this),this.name="metaMask",Rr.set(this,void 0),ya.set(this,void 0),xa.set(this,void 0),wa.set(this,void 0)}static checkConnection(){return sr(this,void 0,void 0,function*(){return!!(typeof window<"u"&&!!window.ethereum&&window.ethereum.selectedAddress)})}connect(){var e,r;return sr(this,void 0,void 0,function*(){let n=yield this.getProvider();return(((e=n?.providers)===null||e===void 0?void 0:e.length)||0)>1&&(n=((r=n?.providers)===null||r===void 0?void 0:r.find(v=>v.isMetaMask))||n),bn(this,Rr,n,"f"),{account:(yield je(this,Rr,"f").request({method:"eth_requestAccounts",params:[{eth_accounts:{}}]}))[0],provider:n}})}getProvider(){return sr(this,void 0,void 0,function*(){if(typeof window<"u"&&!!window.ethereum)return window.ethereum;throw this.options.appUrl&&window.open(`https://metamask.app.link/dapp/${this.options.appUrl}`,"_blank"),new hn})}disconnect(){return sr(this,void 0,void 0,function*(){if(!je(this,Rr,"f"))throw new hn;je(this,ya,"f")&&je(this,vi,"m",no).call(this,"disconnect",je(this,ya,"f")),je(this,xa,"f")&&je(this,vi,"m",no).call(this,"accountsChanged",je(this,xa,"f")),je(this,wa,"f")&&je(this,vi,"m",no).call(this,"chainChanged",je(this,wa,"f")),bn(this,Rr,void 0,"f"),bn(this,ya,void 0,"f"),bn(this,xa,void 0,"f"),bn(this,wa,void 0,"f")})}onDisconnect(e){if(!je(this,Rr,"f"))throw new hn;je(this,ya,"f")&&je(this,vi,"m",no).call(this,"disconnect",je(this,ya,"f")),bn(this,ya,e,"f"),je(this,Rr,"f").on("disconnect",e)}onAccountsChanged(e){if(!je(this,Rr,"f"))throw new hn;je(this,xa,"f")&&je(this,vi,"m",no).call(this,"accountsChanged",je(this,xa,"f")),bn(this,xa,e,"f"),je(this,Rr,"f").on("accountsChanged",e)}onChainChanged(e){if(!je(this,Rr,"f"))throw new hn;je(this,wa,"f")&&je(this,vi,"m",no).call(this,"chainChanged",je(this,wa,"f")),bn(this,wa,e,"f"),je(this,Rr,"f").on("chainChanged",r=>{const n=zR(r);e(n)})}switchChain(e){return sr(this,void 0,void 0,function*(){if(!je(this,Rr,"f"))throw new hn;const r=i0.hexValue(e),{availableNetworks:n}=An(),s=JSON.parse(JSON.stringify(n.value));try{yield je(this,Rr,"f").request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})}catch(i){if(i.code===4902)try{yield this.addChain(s[e])}catch(u){throw je(this,vi,"m",Hp).call(this,u)?new $p(u):new V2}throw je(this,vi,"m",Hp).call(this,i)?new $p(i):new Qx(i)}})}addChain(e){return sr(this,void 0,void 0,function*(){if(!je(this,Rr,"f"))throw new hn;try{je(this,Rr,"f").request({method:"wallet_addEthereumChain",params:[e]})}catch{throw new V2}})}}Rr=new WeakMap,ya=new WeakMap,xa=new WeakMap,wa=new WeakMap,vi=new WeakSet,no=function(e,r){if(!je(this,Rr,"f"))throw new hn;je(this,Rr,"f").removeListener(e,r)},Hp=function(e){return/(user rejected)/i.test(e.message)};var is,Gr,Rf,Cf,Bf,Fc,n4;class jR extends e4{constructor(e){super(e),is.add(this),this.name="coinbaseWallet",Gr.set(this,void 0),Rf.set(this,void 0),Cf.set(this,void 0),Bf.set(this,void 0)}connect(){return sr(this,void 0,void 0,function*(){const e=yield this.getProvider();bn(this,Gr,e,"f");const r=yield e.enable();return{account:i0.getAddress(r[0]),provider:e}})}getProvider(){return sr(this,void 0,void 0,function*(){let e=(yield o6(()=>import("./index.416cabcd.js").then(s=>s.i),[])).default;return typeof e!="function"&&typeof e.default=="function"&&(e=e.default),new e(this.options).makeWeb3Provider(this.options.jsonRpcUrl,this.options.chainId)})}disconnect(){return sr(this,void 0,void 0,function*(){if(!je(this,Gr,"f"))throw new hn;yield je(this,Gr,"f").close(),bn(this,Gr,void 0,"f")})}onDisconnect(e){if(!je(this,Gr,"f"))throw new hn;je(this,Rf,"f")&&je(this,is,"m",Fc).call(this,"disconnect",je(this,Rf,"f")),bn(this,Rf,e,"f"),je(this,Gr,"f").on("disconnect",e)}onAccountsChanged(e){if(!je(this,Gr,"f"))throw new hn;je(this,Cf,"f")&&je(this,is,"m",Fc).call(this,"accountsChanged",je(this,Cf,"f")),bn(this,Cf,e,"f"),je(this,Gr,"f").on("accountsChanged",e)}onChainChanged(e){if(!je(this,Gr,"f"))throw new hn;je(this,Bf,"f")&&je(this,is,"m",Fc).call(this,"chainChanged",je(this,Bf,"f")),bn(this,Bf,e,"f"),je(this,Gr,"f").on("chainChanged",e)}switchChain(e){return sr(this,void 0,void 0,function*(){if(!je(this,Gr,"f"))throw new hn;const r=je(this,Gr,"f"),n=i0.hexValue(e);try{yield r.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})}catch(s){throw s.code,je(this,is,"m",n4).call(this,s)?new $p(s):new Qx(s)}})}}Gr=new WeakMap,Rf=new WeakMap,Cf=new WeakMap,Bf=new WeakMap,is=new WeakSet,Fc=function(e,r){if(!je(this,Gr,"f"))throw new hn;je(this,Gr,"f").removeListener(e,r)},n4=function(e){return/(user rejected)/i.test(e.message)};const i4=typeof window>"u",GR=!i4&&window?.parent!==window,J2=()=>!(!i4&&GR),Ut=Ua({connector:null,provider:null,error:"",status:"none"}),pd=Qr(!0),Go=Qr(!0),Hi=Ua({onDisconnectCallback:null,onAccountsChangedCallback:null,onChainChangedCallback:null});function c0(t={useEthers:!0}){const e=()=>{if(Ut.connector=null,Ut.provider=null,Ut.error="",Ut.status="none",t.useEthers){const{deactivate:m}=An();m()}};function r(){return sr(this,void 0,void 0,function*(){const{activate:m}=An();Ut.status="loading";try{Ut.provider?(yield m(Ut.provider),Ut.status="connected"):Ut.status="none"}catch(g){throw e(),Ut.error=g.message,new Error(g)}})}function n(m){return sr(this,void 0,void 0,function*(){Ut.error="",Ut.status="connecting";try{if(!m)throw new UR;const{provider:g}=yield m.connect();Ut.connector=Pi(m),Ut.provider=Pi(g)}catch(g){throw yield s(),Ut.error=g.message,new W2(g)}Ut.status="loading";try{if(t.useEthers){const{activate:g}=An();yield g(Ut.provider)}}catch(g){throw yield s(),Ut.error=g.message,new W2(g)}Ut.status="connected",localStorage.removeItem("VUE_DAPP__hasDisconnected"),Ut.connector&&Ut.connector.onDisconnect((...g)=>{var _;Hi.onDisconnectCallback&&Hi.onDisconnectCallback(...g),((_=Ut.connector)===null||_===void 0?void 0:_.name)!=="metaMask"&&s()}),Ut.connector&&Ut.connector.onAccountsChanged(g=>sr(this,void 0,void 0,function*(){Hi.onAccountsChangedCallback&&Hi.onAccountsChangedCallback(g),t.useEthers&&(yield r())})),Ut.connector&&Ut.connector.onChainChanged(g=>sr(this,void 0,void 0,function*(){Hi.onChainChangedCallback&&Hi.onChainChangedCallback(g),t.useEthers&&(yield r())}))})}function s(){return sr(this,void 0,void 0,function*(){if(Ut.connector)try{yield Ut.connector.disconnect()}catch(m){throw e(),new Error(m)}e(),pd.value&&localStorage.setItem("VUE_DAPP__hasDisconnected","true")})}function i(m){return sr(this,void 0,void 0,function*(){if(pd.value&&localStorage.getItem("VUE_DAPP__hasDisconnected")){!Go.value&&console.warn("No auto-connect: has disconnected");return}const g=m.find(A=>A.name==="safe");if(!!g&&!J2())try{(yield g.isSafeApp())?yield n(g):Go.value||console.warn("No auto-connect to Safe: not safe app from safe.isSafeApp()")}catch{throw new Error("Failed to connect Gnosis Safe")}else Go.value||(g?J2()?console.warn("No auto-connect to Safe: not safe app from isNotSafeApp()"):console.warn("No auto-connect to Safe"):console.warn("No auto-connect to Safe: connector not found"));if(Ut.status!=="none")return;const _=m.find(A=>A.name==="metaMask");if(_)try{(yield r4.checkConnection())?yield n(_):Go.value||console.warn("No auto-connect to MetaMask: not connected")}catch(A){throw new KR(A)}else Go.value||console.warn("No auto-connect to MetaMask: connector not found")})}function u(m){Hi.onDisconnectCallback=m}function v(m){Hi.onAccountsChangedCallback=m}function b(m){Hi.onChainChangedCallback=m}return{wallet:Ut,persistDisconnect:pd,dumb:Go,connectWith:n,disconnect:s,autoConnect:i,onDisconnect:u,onAccountsChanged:v,onChainChanged:b}}An();const VR={beforeMount:(t,e)=>{t.clickOutsideEvent=n=>{n.stopPropagation(),n.target!==t&&!t.contains(n.target)&&e.value(n)};const r="ontouchstart"in document.documentElement?"touchstart":"click";setTimeout(()=>{document.addEventListener(r,t.clickOutsideEvent)},0)},unmounted:t=>{const e=t.clickOutsideEvent;delete t.clickOutsideEvent;const r="ontouchstart"in document.documentElement?"touchstart":"click";document.removeEventListener(r,e)}};var w0=ci({emits:["close"],props:{dark:{type:Boolean,required:!1,default:!1},modalOpen:{type:Boolean,required:!0}},setup(t,{emit:e}){const r=Qr(t.dark?"modal-inner--dark":"modal-inner"),n=()=>{e("close")};return bs(()=>t.modalOpen,s=>{s?document.body.style.overflow="hidden":document.body.style.overflow=""}),{modalInnerClass:r,closeModal:n}}});const WR={key:0,class:"modal"},ZR={class:"modal-content"};function JR(t,e,r,n,s,i){return $e(),sn(D9,{to:"body"},[Wt(P1,{name:"modal-animation"},{default:ta(()=>[t.modalOpen?($e(),We("div",WR,[ce("div",{class:oi(t.modalInnerClass)},[ce("div",ZR,[zt(" Modal Content "),Jc(t.$slots,"default")])],2)])):zt("v-if",!0)]),_:3})])}function lv(t,e){e===void 0&&(e={});var r=e.insertAt;if(!(!t||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}var XR=` +`)}static register(e,r){r||(r=e.locale)}}const FE="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Kf=null;function m2(t){if(Kf==null&&(Kf=FE.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),x0.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Kf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class LE extends x0{constructor(){super("en")}getWord(e){return m2(this),Kf[e]}getWordIndex(e){return m2(this),Kf.indexOf(e)}}const wx=new LE;x0.register(wx);const g2={en:wx},UE="hdnode/5.7.0",o0=new de(UE),KE=Le.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),$E=vr("Bitcoin seed"),rs=2147483648;function _x(t){return(1<=256)throw new Error("Depth too large!");return b2(Xt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Ue(this.depth),this.parentFingerprint,Zt(Ue(this.index),4),this.chainCode,this.privateKey!=null?Xt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new xn(zo,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~rs));const n=new Uint8Array(37);if(e&rs){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Fe(this.privateKey),1),r&&(r+="'")}else n.set(Fe(this.publicKey));for(let _=24;_>=0;_-=8)n[33+(_>>3)]=e>>24-_&255;const s=Fe(a0(Is.sha512,this.chainCode,n)),i=s.slice(0,32),u=s.slice(32);let v=null,b=null;this.privateKey?v=Q0(Le.from(i).add(this.privateKey).mod(KE)):b=new yo(Ue(i))._addPoint(this.publicKey);let m=r;const g=this.mnemonic;return g&&(m=Object.freeze({phrase:g.phrase,path:r,locale:g.locale||"en"})),new xn(zo,v,b,this.fingerprint,Q0(u),e,this.depth+1,m)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let s=0;s=rs)throw new Error("invalid path index - "+i);n=n._derive(rs+u)}else if(i.match(/^[0-9]+$/)){const u=parseInt(i);if(u>=rs)throw new Error("invalid path index - "+i);n=n._derive(u)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=Fe(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=Fe(a0(Is.sha512,$E,n));return new xn(zo,Q0(s.slice(0,32)),null,"0x00000000",Q0(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Y1(n),e=Wl(Vl(e,n),n),xn._fromSeed(Mx(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return xn._fromSeed(e,null)}static fromExtendedKey(e){const r=Ns.decode(e);(r.length!==82||b2(r.slice(0,78))!==e)&&o0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=Ue(r.slice(5,9)),i=parseInt(Ue(r.slice(9,13)).substring(2),16),u=Ue(r.slice(13,45)),v=r.slice(45,78);switch(Ue(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new xn(zo,null,Ue(v),s,u,i,n,null);case"0x0488ade4":case"0x04358394 ":if(v[0]!==0)break;return new xn(zo,Ue(v.slice(1)),null,s,u,i,n,null)}return o0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Mx(t,e){e||(e="");const r=vr("mnemonic"+e,Di.NFKD);return G1(vr(t,Di.NFKD),r,2048,64,"sha512")}function Vl(t,e){e=Y1(e),o0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=Fe(new Uint8Array(Math.ceil(11*r.length/8)));let s=0;for(let m=0;m>3]|=1<<7-s%8),s++}const i=32*r.length/3,u=r.length/3,v=_x(u);if((Fe(aa(n.slice(0,i/8)))[0]&v)!==(n[n.length-1]&v))throw new Error("invalid checksum");return Ue(n.slice(0,i/8))}function Wl(t,e){if(e=Y1(e),t=Fe(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let u=0;u8?(r[r.length-1]<<=8,r[r.length-1]|=t[u],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[u]>>8-n,r.push(t[u]&qE(8-n)),n+=3);const s=t.length/4,i=Fe(aa(t))[0]&_x(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(u=>e.getWord(u)))}function HE(t,e){try{return Vl(t,e),!0}catch{}return!1}function zE(t){return(typeof t!="number"||t<0||t>=rs||t%1)&&o0.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const jE=Object.freeze(Object.defineProperty({__proto__:null,defaultPath:Ds,HDNode:xn,mnemonicToSeed:Mx,mnemonicToEntropy:Vl,entropyToMnemonic:Wl,isValidMnemonic:HE,getAccountPath:zE},Symbol.toStringTag,{value:"Module"})),GE=gr(jE);var Ax={exports:{}};(function(t,e){(function(r){function n(d){return parseInt(d)===d}function s(d){if(!n(d.length))return!1;for(var M=0;M255)return!1;return!0}function i(d,M){if(d.buffer&&ArrayBuffer.isView(d)&&d.name==="Uint8Array")return M&&(d.slice?d=d.slice():d=Array.prototype.slice.call(d)),d;if(Array.isArray(d)){if(!s(d))throw new Error("Array contains invalid value: "+d);return new Uint8Array(d)}if(n(d.length)&&s(d))return new Uint8Array(d);throw new Error("unsupported array-like object")}function u(d){return new Uint8Array(d)}function v(d,M,C,P,S){(P!=null||S!=null)&&(d.slice?d=d.slice(P,S):d=Array.prototype.slice.call(d,P,S)),M.set(d,C)}var b=function(){function d(C){var P=[],S=0;for(C=encodeURI(C);S191&&I<224?(P.push(String.fromCharCode((I&31)<<6|C[S+1]&63)),S+=2):(P.push(String.fromCharCode((I&15)<<12|(C[S+1]&63)<<6|C[S+2]&63)),S+=3)}return P.join("")}return{toBytes:d,fromBytes:M}}(),m=function(){function d(P){for(var S=[],I=0;I>4]+M[U&15])}return S.join("")}return{toBytes:d,fromBytes:C}}(),g={16:10,24:12,32:14},_=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],A=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],E=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],R=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],B=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],T=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],F=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],O=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],q=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],H=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],G=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],re=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],ne=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Y=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],W=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function se(d){for(var M=[],C=0;C>2,this._Ke[I][M%4]=S[M],this._Kd[d-I][M%4]=S[M];for(var U=0,V=P,z;V>16&255]<<24^A[z>>8&255]<<16^A[z&255]<<8^A[z>>24&255]^_[U]<<24,U+=1,P!=8)for(var M=1;M>8&255]<<8^A[z>>16&255]<<16^A[z>>24&255]<<24;for(var M=P/2+1;M>2,j=V%4,this._Ke[X][j]=S[M],this._Kd[d-X][j]=S[M++],V++}for(var X=1;X>24&255]^ne[z>>16&255]^Y[z>>8&255]^W[z&255]},y.prototype.encrypt=function(d){if(d.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var M=this._Ke.length-1,C=[0,0,0,0],P=se(d),S=0;S<4;S++)P[S]^=this._Ke[0][S];for(var I=1;I>24&255]^B[P[(S+1)%4]>>16&255]^T[P[(S+2)%4]>>8&255]^F[P[(S+3)%4]&255]^this._Ke[I][S];P=C.slice()}for(var U=u(16),V,S=0;S<4;S++)V=this._Ke[M][S],U[4*S]=(A[P[S]>>24&255]^V>>24)&255,U[4*S+1]=(A[P[(S+1)%4]>>16&255]^V>>16)&255,U[4*S+2]=(A[P[(S+2)%4]>>8&255]^V>>8)&255,U[4*S+3]=(A[P[(S+3)%4]&255]^V)&255;return U},y.prototype.decrypt=function(d){if(d.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var M=this._Kd.length-1,C=[0,0,0,0],P=se(d),S=0;S<4;S++)P[S]^=this._Kd[0][S];for(var I=1;I>24&255]^q[P[(S+3)%4]>>16&255]^H[P[(S+2)%4]>>8&255]^G[P[(S+1)%4]&255]^this._Kd[I][S];P=C.slice()}for(var U=u(16),V,S=0;S<4;S++)V=this._Kd[M][S],U[4*S]=(E[P[S]>>24&255]^V>>24)&255,U[4*S+1]=(E[P[(S+3)%4]>>16&255]^V>>16)&255,U[4*S+2]=(E[P[(S+2)%4]>>8&255]^V>>8)&255,U[4*S+3]=(E[P[(S+1)%4]&255]^V)&255;return U};var a=function(d){if(!(this instanceof a))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new y(d)};a.prototype.encrypt=function(d){if(d=i(d),d.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var M=u(d.length),C=u(16),P=0;P=0;--M)this._counter[M]=d%256,d=d>>8},h.prototype.setBytes=function(d){if(d=i(d,!0),d.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=d},h.prototype.increment=function(){for(var d=15;d>=0;d--)if(this._counter[d]===255)this._counter[d]=0;else{this._counter[d]++;break}};var x=function(d,M){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",M instanceof h||(M=new h(M)),this._counter=M,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new y(d)};x.prototype.encrypt=function(d){for(var M=i(d,!0),C=0;C16)throw new Error("PKCS#7 padding byte out of range");for(var C=d.length-M,P=0;P=64;){let o=F,d=O,M=q,C=H,P=G,S=re,I=ne,U=Y,V,z,X,j,N;for(z=0;z<16;z++)X=w+z*4,W[z]=(x[X]&255)<<24|(x[X+1]&255)<<16|(x[X+2]&255)<<8|x[X+3]&255;for(z=16;z<64;z++)V=W[z-2],j=(V>>>17|V<<32-17)^(V>>>19|V<<32-19)^V>>>10,V=W[z-15],N=(V>>>7|V<<32-7)^(V>>>18|V<<32-18)^V>>>3,W[z]=(j+W[z-7]|0)+(N+W[z-16]|0)|0;for(z=0;z<64;z++)j=(((P>>>6|P<<32-6)^(P>>>11|P<<32-11)^(P>>>25|P<<32-25))+(P&S^~P&I)|0)+(U+(T[z]+W[z]|0)|0)|0,N=((o>>>2|o<<32-2)^(o>>>13|o<<32-13)^(o>>>22|o<<32-22))+(o&d^o&M^d&M)|0,U=I,I=S,S=P,P=C+j|0,C=M,M=d,d=o,o=j+N|0;F=F+o|0,O=O+d|0,q=q+M|0,H=H+C|0,G=G+P|0,re=re+S|0,ne=ne+I|0,Y=Y+U|0,w+=64,p-=64}}se(B);let y,a=B.length%64,f=B.length/536870912|0,c=B.length<<3,l=a<56?56:120,h=B.slice(B.length-a,B.length);for(h.push(128),y=a+1;y>>24&255),h.push(f>>>16&255),h.push(f>>>8&255),h.push(f>>>0&255),h.push(c>>>24&255),h.push(c>>>16&255),h.push(c>>>8&255),h.push(c>>>0&255),se(h),[F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,H>>>24&255,H>>>16&255,H>>>8&255,H>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,re>>>24&255,re>>>16&255,re>>>8&255,re>>>0&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255]}function i(B,T,F){B=B.length<=64?B:s(B);const O=64+T.length+4,q=new Array(O),H=new Array(64);let G,re=[];for(G=0;G<64;G++)q[G]=54;for(G=0;G=O-4;Y--){if(q[Y]++,q[Y]<=255)return;q[Y]=0}}for(;F>=32;)ne(),re=re.concat(s(H.concat(s(q)))),F-=32;return F>0&&(ne(),re=re.concat(s(H.concat(s(q))).slice(0,F))),re}function u(B,T,F,O,q){let H;for(g(B,(2*F-1)*16,q,0,16),H=0;H<2*F;H++)m(B,H*16,q,16),b(q,O),g(q,0,B,T+H*16,16);for(H=0;H>>32-T}function b(B,T){g(B,0,T,0,16);for(let F=8;F>0;F-=2)T[4]^=v(T[0]+T[12],7),T[8]^=v(T[4]+T[0],9),T[12]^=v(T[8]+T[4],13),T[0]^=v(T[12]+T[8],18),T[9]^=v(T[5]+T[1],7),T[13]^=v(T[9]+T[5],9),T[1]^=v(T[13]+T[9],13),T[5]^=v(T[1]+T[13],18),T[14]^=v(T[10]+T[6],7),T[2]^=v(T[14]+T[10],9),T[6]^=v(T[2]+T[14],13),T[10]^=v(T[6]+T[2],18),T[3]^=v(T[15]+T[11],7),T[7]^=v(T[3]+T[15],9),T[11]^=v(T[7]+T[3],13),T[15]^=v(T[11]+T[7],18),T[1]^=v(T[0]+T[3],7),T[2]^=v(T[1]+T[0],9),T[3]^=v(T[2]+T[1],13),T[0]^=v(T[3]+T[2],18),T[6]^=v(T[5]+T[4],7),T[7]^=v(T[6]+T[5],9),T[4]^=v(T[7]+T[6],13),T[5]^=v(T[4]+T[7],18),T[11]^=v(T[10]+T[9],7),T[8]^=v(T[11]+T[10],9),T[9]^=v(T[8]+T[11],13),T[10]^=v(T[9]+T[8],18),T[12]^=v(T[15]+T[14],7),T[13]^=v(T[12]+T[15],9),T[14]^=v(T[13]+T[12],13),T[15]^=v(T[14]+T[13],18);for(let F=0;F<16;++F)B[F]+=T[F]}function m(B,T,F,O){for(let q=0;q=256)return!1}return!0}function A(B,T){if(typeof B!="number"||B%1)throw new Error("invalid "+T);return B}function E(B,T,F,O,q,H,G){if(F=A(F,"N"),O=A(O,"r"),q=A(q,"p"),H=A(H,"dkLen"),F===0||(F&F-1)!==0)throw new Error("N must be power of 2");if(F>2147483647/128/O)throw new Error("N too large");if(O>2147483647/128/q)throw new Error("r too large");if(!_(B))throw new Error("password must be an array or buffer");if(B=Array.prototype.slice.call(B),!_(T))throw new Error("salt must be an array or buffer");T=Array.prototype.slice.call(T);let re=i(B,T,q*128*O);const ne=new Uint32Array(q*32*O);for(let P=0;Pd&&(P=d);for(let I=0;Id&&(P=d);for(let I=0;I>0&255),re.push(ne[I]>>8&255),re.push(ne[I]>>16&255),re.push(ne[I]>>24&255);const S=i(B,re,H);return G&&G(null,1,S),S}G&&M(C)};if(!G)for(;;){const P=C();if(P!=null)return P}C()}const R={scrypt:function(B,T,F,O,q,H,G){return new Promise(function(re,ne){let Y=0;G&&G(0),E(B,T,F,O,q,H,function(W,se,y){if(W)ne(W);else if(y)G&&Y!==1&&G(1),re(new Uint8Array(y));else if(G&&se!==Y)return Y=se,G(se)})})},syncScrypt:function(B,T,F,O,q,H){return new Uint8Array(E(B,T,F,O,q,H))}};t.exports=R})()})(Sx);const tv=Sx.exports,XE="random/5.7.0",Fp=new de(XE);function YE(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof jc<"u")return jc;throw new Error("unable to locate global object")}const y2=YE();let Pc=y2.crypto||y2.msCrypto;(!Pc||!Pc.getRandomValues)&&(Fp.warn("WARNING: Missing strong random number source"),Pc={getRandomValues:function(t){return Fp.throwError("no secure random source avaialble",de.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function cs(t){(t<=0||t>1024||t%1||t!=t)&&Fp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Pc.getRandomValues(e),Fe(e)}function Rx(t){t=t.slice();for(let e=t.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}const QE=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:cs,shuffled:Rx},Symbol.toStringTag,{value:"Module"}));var eS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const Lp=new de(Ex);function x2(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class tS extends Ka{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function rS(t,e,r){if(ur(t,"crypto/cipher")==="aes-128-ctr"){const s=xo(ur(t,"crypto/cipherparams/iv")),i=new Ei.Counter(s),u=new Ei.ModeOfOperation.ctr(e,i);return Fe(u.decrypt(r))}return null}function Cx(t,e){const r=xo(ur(t,"crypto/ciphertext"));if(Ue(Gt(Xt([e.slice(16,32),r]))).substring(2)!==ur(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const s=rS(t,e.slice(0,16),r);s||Lp.throwError("unsupported cipher",de.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=e.slice(32,64),u=ka(s);if(t.address){let b=t.address.toLowerCase();if(b.substring(0,2)!=="0x"&&(b="0x"+b),jt(b)!==u)throw new Error("address mismatch")}const v={_isKeystoreAccount:!0,address:u,privateKey:Ue(s)};if(ur(t,"x-ethers/version")==="0.1"){const b=xo(ur(t,"x-ethers/mnemonicCiphertext")),m=xo(ur(t,"x-ethers/mnemonicCounter")),g=new Ei.Counter(m),_=new Ei.ModeOfOperation.ctr(i,g),A=ur(t,"x-ethers/path")||Ds,E=ur(t,"x-ethers/locale")||"en",R=Fe(_.decrypt(b));try{const B=Wl(R,E),T=xn.fromMnemonic(B,null,E).derivePath(A);if(T.privateKey!=v.privateKey)throw new Error("mnemonic mismatch");v.mnemonic=T.mnemonic}catch(B){if(B.code!==de.errors.INVALID_ARGUMENT||B.argument!=="wordlist")throw B}}return new tS(v)}function Bx(t,e,r,n,s){return Fe(G1(t,e,r,n,s))}function nS(t,e,r,n,s){return Promise.resolve(Bx(t,e,r,n,s))}function Nx(t,e,r,n,s){const i=Q1(e),u=ur(t,"crypto/kdf");if(u&&typeof u=="string"){const v=function(b,m){return Lp.throwArgumentError("invalid key-derivation function parameters",b,m)};if(u.toLowerCase()==="scrypt"){const b=xo(ur(t,"crypto/kdfparams/salt")),m=parseInt(ur(t,"crypto/kdfparams/n")),g=parseInt(ur(t,"crypto/kdfparams/r")),_=parseInt(ur(t,"crypto/kdfparams/p"));(!m||!g||!_)&&v("kdf",u),(m&m-1)!==0&&v("N",m);const A=parseInt(ur(t,"crypto/kdfparams/dklen"));return A!==32&&v("dklen",A),n(i,b,m,g,_,64,s)}else if(u.toLowerCase()==="pbkdf2"){const b=xo(ur(t,"crypto/kdfparams/salt"));let m=null;const g=ur(t,"crypto/kdfparams/prf");g==="hmac-sha256"?m="sha256":g==="hmac-sha512"?m="sha512":v("prf",g);const _=parseInt(ur(t,"crypto/kdfparams/c")),A=parseInt(ur(t,"crypto/kdfparams/dklen"));return A!==32&&v("dklen",A),r(i,b,_,A,m)}}return Lp.throwArgumentError("unsupported key-derivation function","kdf",u)}function Tx(t,e){const r=JSON.parse(t),n=Nx(r,e,Bx,tv.syncScrypt);return Cx(r,n)}function kx(t,e,r){return eS(this,void 0,void 0,function*(){const n=JSON.parse(t),s=yield Nx(n,e,nS,tv.scrypt,r);return Cx(n,s)})}function Px(t,e,r,n){try{if(jt(t.address)!==ka(t.privateKey))throw new Error("address/privateKey mismatch");if(x2(t)){const T=t.mnemonic;if(xn.fromMnemonic(T.phrase,null,T.locale).derivePath(T.path||Ds).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(T){return Promise.reject(T)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const s=Fe(t.privateKey),i=Q1(e);let u=null,v=null,b=null;if(x2(t)){const T=t.mnemonic;u=Fe(Vl(T.phrase,T.locale||"en")),v=T.path||Ds,b=T.locale||"en"}let m=r.client;m||(m="ethers.js");let g=null;r.salt?g=Fe(r.salt):g=cs(32);let _=null;if(r.iv){if(_=Fe(r.iv),_.length!==16)throw new Error("invalid iv")}else _=cs(16);let A=null;if(r.uuid){if(A=Fe(r.uuid),A.length!==16)throw new Error("invalid uuid")}else A=cs(16);let E=1<<17,R=8,B=1;return r.scrypt&&(r.scrypt.N&&(E=r.scrypt.N),r.scrypt.r&&(R=r.scrypt.r),r.scrypt.p&&(B=r.scrypt.p)),tv.scrypt(i,g,E,R,B,64,n).then(T=>{T=Fe(T);const F=T.slice(0,16),O=T.slice(16,32),q=T.slice(32,64),H=new Ei.Counter(_),G=new Ei.ModeOfOperation.ctr(F,H),re=Fe(G.encrypt(s)),ne=Gt(Xt([O,re])),Y={address:t.address.substring(2).toLowerCase(),id:VE(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Ue(_).substring(2)},ciphertext:Ue(re).substring(2),kdf:"scrypt",kdfparams:{salt:Ue(g).substring(2),n:E,dklen:32,p:B,r:R},mac:ne.substring(2)}};if(u){const W=cs(16),se=new Ei.Counter(W),y=new Ei.ModeOfOperation.ctr(q,se),a=Fe(y.encrypt(u)),f=new Date,c=f.getUTCFullYear()+"-"+ff(f.getUTCMonth()+1,2)+"-"+ff(f.getUTCDate(),2)+"T"+ff(f.getUTCHours(),2)+"-"+ff(f.getUTCMinutes(),2)+"-"+ff(f.getUTCSeconds(),2)+".0Z";Y["x-ethers"]={client:m,gethFilename:"UTC--"+c+"--"+Y.address,mnemonicCounter:Ue(W).substring(2),mnemonicCiphertext:Ue(a).substring(2),path:v,locale:b,version:"0.1"}}return JSON.stringify(Y)})}function Ix(t,e,r){if(Zl(t)){r&&r(0);const n=ev(t,e);return r&&r(1),Promise.resolve(n)}return Jl(t)?kx(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function Dx(t,e){if(Zl(t))return ev(t,e);if(Jl(t))return Tx(t,e);throw new Error("invalid JSON wallet")}const iS=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:ev,decryptKeystore:kx,decryptKeystoreSync:Tx,encryptKeystore:Px,isCrowdsaleWallet:Zl,isKeystoreWallet:Jl,getJsonWalletAddress:JE,decryptJsonWallet:Ix,decryptJsonWalletSync:Dx},Symbol.toStringTag,{value:"Module"})),aS=gr(iS),oS=gr(a_),sS=gr($7),w2=gr(pE),fS="solidity/5.7.0",cS=new RegExp("^bytes([0-9]+)$"),lS=new RegExp("^(u?int)([0-9]*)$"),uS=new RegExp("^(.*)\\[([0-9]*)\\]$"),dS="0000000000000000000000000000000000000000000000000000000000000000",ns=new de(fS);function Ox(t,e,r){switch(t){case"address":return r?Of(e,32):Fe(e);case"string":return vr(e);case"bytes":return Fe(e);case"bool":return e=e?"0x01":"0x00",r?Of(e,32):Fe(e)}let n=t.match(lS);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&ns.throwArgumentError("invalid number type","type",t),r&&(s=256),e=Le.from(e).toTwos(s),Of(e,s/8)}if(n=t.match(cS),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&ns.throwArgumentError("invalid bytes type","type",t),Fe(e).byteLength!==s&&ns.throwArgumentError(`invalid value for ${t}`,"value",e),r?Fe((e+dS).substring(0,66)):e}if(n=t.match(uS),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&ns.throwArgumentError(`invalid array length for ${t}`,"value",e);const u=[];return e.forEach(function(v){u.push(Ox(s,v,!0))}),Xt(u)}return ns.throwArgumentError("invalid type","type",t)}function rv(t,e){t.length!=e.length&&ns.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(Ox(n,e[s]))}),Ue(Xt(r))}function hS(t,e){return Gt(rv(t,e))}function pS(t,e){return aa(rv(t,e))}const vS=Object.freeze(Object.defineProperty({__proto__:null,pack:rv,keccak256:hS,sha256:pS},Symbol.toStringTag,{value:"Module"})),mS=gr(vS),gS=gr(QE),bS=gr(Y7),yS=gr(s_),xS=gr(SE),_2=gr(j_),wS=gr(IE),_S="units/5.7.0",Fx=new de(_S),Lx=["wei","kwei","mwei","gwei","szabo","finney","ether"];function MS(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&Fx.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const u=r.length-3;i.unshift(r.substring(u)),r=r.substring(0,u)}return n+i.join(",")+s}function Xl(t,e){if(typeof e=="string"){const r=Lx.indexOf(e);r!==-1&&(e=3*r)}return Bc(t,e??18)}function nv(t,e){if(typeof t!="string"&&Fx.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=Lx.indexOf(e);r!==-1&&(e=3*r)}return pi(t,e??18)}function iv(t){return Xl(t,18)}function Ux(t){return nv(t,18)}const AS=Object.freeze(Object.defineProperty({__proto__:null,commify:MS,formatUnits:Xl,parseUnits:nv,formatEther:iv,parseEther:Ux},Symbol.toStringTag,{value:"Module"})),ES=gr(AS),SS="abstract-provider/5.7.0";var RS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const CS=new de(SS);class BS extends Ka{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Vs{constructor(){CS.checkAbstract(new.target,Vs),De(this,"_isProvider",!0)}getFeeData(){return RS(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield cr({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(u=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=Le.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const NS="abstract-signer/5.7.0";var Zn=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const In=new de(NS),TS=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],kS=[de.errors.INSUFFICIENT_FUNDS,de.errors.NONCE_EXPIRED,de.errors.REPLACEMENT_UNDERPRICED];class Ws{constructor(){In.checkAbstract(new.target,Ws),De(this,"_isSigner",!0)}getBalance(e){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Zn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield cr(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Zn(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield cr(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Zn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Zn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Zn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)TS.indexOf(n)===-1&&In.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=rr(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&In.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Zn(this,void 0,void 0,function*(){const r=yield cr(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>Zn(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&In.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?In.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&In.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&In.throwError("network does not support EIP-1559",de.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):In.throwError("failed to get consistent fee data",de.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(kS.indexOf(s.code)>=0)throw s;return In.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",de.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&In.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield cr(r)})}_checkProvider(e){this.provider||In.throwError("missing provider",de.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class av extends Ws{constructor(e,r){super(),De(this,"address",e),De(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{In.throwError(e,de.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new av(this.address,e)}}const PS="wallet/5.7.0";var M2=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const jo=new de(PS);function IS(t){return t!=null&&dt(t.privateKey,32)&&t.address!=null}function DS(t){const e=t.mnemonic;return e&&e.phrase}class fo extends Ws{constructor(e,r){if(super(),IS(e)){const n=new yo(e.privateKey);if(De(this,"_signingKey",()=>n),De(this,"address",ka(this.publicKey)),this.address!==jt(e.address)&&jo.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),DS(e)){const s=e.mnemonic;De(this,"_mnemonic",()=>({phrase:s.phrase,path:s.path||Ds,locale:s.locale||"en"}));const i=this.mnemonic,u=xn.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path);ka(u.privateKey)!==this.address&&jo.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else De(this,"_mnemonic",()=>null)}else{if(yo.isSigningKey(e))e.curve!=="secp256k1"&&jo.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),De(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new yo(e);De(this,"_signingKey",()=>n)}De(this,"_mnemonic",()=>null),De(this,"address",ka(this.publicKey))}r&&!Vs.isProvider(r)&&jo.throwArgumentError("invalid provider","provider",r),De(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new fo(this,e)}signTransaction(e){return cr(e).then(r=>{r.from!=null&&(jt(r.from)!==this.address&&jo.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(Gt(Op(r)));return Op(r,n)})}signMessage(e){return M2(this,void 0,void 0,function*(){return Cp(this._signingKey().signDigest(z1(e)))})}_signTypedData(e,r,n){return M2(this,void 0,void 0,function*(){const s=yield Lr.resolveNames(e,r,n,i=>(this.provider==null&&jo.throwError("cannot resolve ENS names without a provider",de.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:i}),this.provider.resolveName(i)));return Cp(this._signingKey().signDigest(Lr.hash(s.domain,r,s.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),Px(this,e,r,n)}static createRandom(e){let r=cs(16);e||(e={}),e.extraEntropy&&(r=Fe(hr(Gt(Xt([r,e.extraEntropy])),0,16)));const n=Wl(r,e.locale);return fo.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return Ix(e,r,n).then(s=>new fo(s))}static fromEncryptedJsonSync(e,r){return new fo(Dx(e,r))}static fromMnemonic(e,r,n){return r||(r=Ds),new fo(xn.fromMnemonic(e,null,n).derivePath(r))}}function OS(t,e){return y0(z1(t),e)}function FS(t,e,r,n){return y0(Lr.hash(t,e,r),n)}const LS=Object.freeze(Object.defineProperty({__proto__:null,Wallet:fo,verifyMessage:OS,verifyTypedData:FS},Symbol.toStringTag,{value:"Module"})),US=gr(LS),KS="web/5.7.1";var $S=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};function qS(t,e){return $S(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const u=e.fetchOptions;u.mode&&(r.mode=u.mode),u.cache&&(r.cache=u.cache),u.credentials&&(r.credentials=u.credentials),u.redirect&&(r.redirect=u.redirect),u.referrer&&(r.referrer=u.referrer)}const n=yield fetch(t,r),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((u,v)=>{i[v.toLowerCase()]=u}):n.headers.keys().forEach(u=>{i[u.toLowerCase()]=n.headers.get(u)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:Fe(new Uint8Array(s))}})}var HS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const Jn=new de(KS);function A2(t){return new Promise(e=>{setTimeout(e,t)})}function ha(t,e){if(t==null)return null;if(typeof t=="string")return t;if(g0(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return $a(t)}catch{}return Ue(t)}return t}function zS(t){return vr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Kx(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Jn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Jn.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const u=typeof t=="object"?!!t.errorPassThrough:!1,v={};let b=null;const m={method:"GET"};let g=!1,_=2*60*1e3;if(typeof t=="string")b=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Jn.throwArgumentError("missing URL","connection.url",t),b=t.url,typeof t.timeout=="number"&&t.timeout>0&&(_=t.timeout),t.headers)for(const F in t.headers)v[F.toLowerCase()]={key:F,value:String(t.headers[F])},["if-none-match","if-modified-since"].indexOf(F.toLowerCase())>=0&&(g=!0);if(m.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){b.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Jn.throwError("basic authentication requires a secure https url",de.errors.INVALID_ARGUMENT,{argument:"url",url:b,user:t.user,password:"[REDACTED]"});const F=t.user+":"+t.password;v.authorization={key:"Authorization",value:"Basic "+H1(vr(F))}}t.skipFetchSetup!=null&&(m.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(m.fetchOptions=rr(t.fetchOptions))}const A=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=b?b.match(A):null;if(E)try{const F={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?q1(E[3]):zS(E[3])};let O=F.body;return r&&(O=r(F.body,F)),Promise.resolve(O)}catch(F){Jn.throwError("processing response error",de.errors.SERVER_ERROR,{body:ha(E[1],E[2]),error:F,requestBody:null,requestMethod:"GET",url:b})}e&&(m.method="POST",m.body=e,v["content-type"]==null&&(v["content-type"]={key:"Content-Type",value:"application/octet-stream"}),v["content-length"]==null&&(v["content-length"]={key:"Content-Length",value:String(e.length)}));const R={};Object.keys(v).forEach(F=>{const O=v[F];R[O.key]=O.value}),m.headers=R;const B=function(){let F=null;return{promise:new Promise(function(H,G){_&&(F=setTimeout(()=>{F!=null&&(F=null,G(Jn.makeError("timeout",de.errors.TIMEOUT,{requestBody:ha(m.body,R["content-type"]),requestMethod:m.method,timeout:_,url:b})))},_))}),cancel:function(){F!=null&&(clearTimeout(F),F=null)}}}(),T=function(){return HS(this,void 0,void 0,function*(){for(let F=0;F=300)&&(B.cancel(),Jn.throwError("bad response",de.errors.SERVER_ERROR,{status:O.statusCode,headers:O.headers,body:ha(q,O.headers?O.headers["content-type"]:null),requestBody:ha(m.body,R["content-type"]),requestMethod:m.method,url:b})),r)try{const H=yield r(q,O);return B.cancel(),H}catch(H){if(H.throttleRetry&&F{let v=null;if(i!=null)try{v=JSON.parse($a(i))}catch(b){Jn.throwError("invalid JSON",de.errors.SERVER_ERROR,{body:i,error:b})}return r&&(v=r(v,u)),v},s=null;if(e!=null){s=vr(e);const i=typeof t=="string"?{url:t}:rr(t);i.headers?Object.keys(i.headers).filter(v=>v.toLowerCase()==="content-type").length!==0||(i.headers=rr(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return Kx(t,s,n)}function po(t,e){return e||(e={}),e=rr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let s=null,i=!1;const u=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{u()&&n(new Error("timeout"))},e.timeout));const v=e.retryLimit;let b=0;function m(){return t().then(function(g){if(g!==void 0)u()&&r(g);else if(e.oncePoll)e.oncePoll.once("poll",m);else if(e.onceBlock)e.onceBlock.once("block",m);else if(!i){if(b++,b>v){u()&&n(new Error("retry limit reached"));return}let _=e.interval*parseInt(String(Math.random()*Math.pow(2,b)));_e.ceiling&&(_=e.ceiling),setTimeout(m,_)}return null},function(g){u()&&n(g)})}m()})}const jS=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:Kx,fetchJson:Yl,poll:po},Symbol.toStringTag,{value:"Module"})),GS=gr(jS);(function(t){var e=ue&&ue.__createBinding||(Object.create?function(y,a,f,c){c===void 0&&(c=f),Object.defineProperty(y,c,{enumerable:!0,get:function(){return a[f]}})}:function(y,a,f,c){c===void 0&&(c=f),y[c]=a[f]}),r=ue&&ue.__setModuleDefault||(Object.create?function(y,a){Object.defineProperty(y,"default",{enumerable:!0,value:a})}:function(y,a){y.default=a}),n=ue&&ue.__importStar||function(y){if(y&&y.__esModule)return y;var a={};if(y!=null)for(var f in y)f!=="default"&&Object.prototype.hasOwnProperty.call(y,f)&&e(a,y,f);return r(a,y),a};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var s=G6;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var i=kM;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return i.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return i.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return i.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return i.isAddress}});var u=n(PM);t.base64=u;var v=OM;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return v.Base58}});var b=FM;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return b.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return b.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return b.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return b.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return b.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return b.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return b.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return b.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return b.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return b.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return b.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return b.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return b.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return b.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return b.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return b.stripZeros}});var m=LM;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return m._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return m.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return m.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return m.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return m.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return m.namehash}});var g=GE;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return g.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return g.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return g.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return g.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return g.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return g.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return g.mnemonicToSeed}});var _=aS;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return _.getJsonWalletAddress}});var A=oS;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return A.keccak256}});var E=sS;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return E.Logger}});var R=w2;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return R.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return R.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return R.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return R.sha512}});var B=mS;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return B.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return B.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return B.sha256}});var T=gS;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return T.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return T.shuffled}});var F=bS;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return F.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return F.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return F.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return F.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return F.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return F.shallowCopy}});var O=n(yS);t.RLP=O;var q=xS;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return q.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return q.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return q.SigningKey}});var H=_2;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return H.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return H.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return H.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return H._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return H.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return H.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return H.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return H.Utf8ErrorFuncs}});var G=wS;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return G.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return G.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return G.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return G.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return G.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return G.TransactionTypes}});var re=ES;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return re.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return re.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return re.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return re.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return re.parseUnits}});var ne=US;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return ne.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return ne.verifyTypedData}});var Y=GS;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return Y._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return Y.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return Y.poll}});var W=w2;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return W.SupportedAlgorithm}});var se=_2;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return se.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return se.Utf8ErrorReason}})})(i0);const VS="networks/5.7.1",E2=new de(VS);function WS(t){return t&&typeof t.renetwork=="function"}function Zi(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const u=new r.PocketProvider(t,n.pocket);u.network&&i.indexOf(u.network.name)===-1&&s.push(u)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],u=new r.AnkrProvider(t,n.ankr);u.network&&i.indexOf(u.network.name)===-1&&s.push(u)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return Zi(r)},e}function ol(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return ol(t,n)},r}const S2={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Zi("homestead")},R2={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Zi("ropsten")},C2={chainId:63,name:"classicMordor",_defaultProvider:ol("https://www.ethercluster.com/mordor","classicMordor")},ec={unspecified:{chainId:0,name:"unspecified"},homestead:S2,mainnet:S2,morden:{chainId:2,name:"morden"},ropsten:R2,testnet:R2,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Zi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Zi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Zi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Zi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:ol("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:C2,classicTestnet:C2,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:ol("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Zi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Zi("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 ZS(t){if(t==null)return null;if(typeof t=="number"){for(const n in ec){const s=ec[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ec[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ec[t.name];if(!e)return typeof t.chainId!="number"&&E2.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&E2.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(WS(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}var sl="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Up={};for(var tc=0;tc>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function $x(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=ws(e)^n>>5}for(e=ws(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=$x(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5!==0)throw new Error("Non 5-bit word");n=ws(n)^u,s+=sl.charAt(u)}for(i=0;i<6;++i)n=ws(n);for(n^=1,i=0;i<6;++i){var v=n>>(5-i)*5&31;s+=sl.charAt(v)}return s}function qx(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),u=t.slice(s+1);if(u.length<6)return"Data too short";var v=$x(i);if(typeof v=="string")return v;for(var b=[],m=0;m=u.length)&&b.push(_)}return v!==1?"Invalid checksum for "+t:{prefix:i,words:b}}function XS(){var t=qx.apply(null,arguments);if(typeof t=="object")return t}function YS(t){var e=qx.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Ql(t,e,r,n){for(var s=0,i=0,u=(1<=r;)i-=r,v.push(s>>i&u);if(n)i>0&&v.push(s<=e)return"Excess padding";if(s<this.data(_,!0);return e.transaction={hash:u,type:m,accessList:qe.allowNull(this.accessList.bind(this),null),blockHash:qe.allowNull(u,null),blockNumber:qe.allowNull(b,null),transactionIndex:qe.allowNull(b,null),confirmations:qe.allowNull(b,null),from:r,gasPrice:qe.allowNull(n),maxPriorityFeePerGas:qe.allowNull(n),maxFeePerGas:qe.allowNull(n),gasLimit:n,to:qe.allowNull(r,null),value:n,nonce:b,data:i,r:qe.allowNull(this.uint256),s:qe.allowNull(this.uint256),v:qe.allowNull(b),creates:qe.allowNull(r,null),raw:qe.allowNull(i)},e.transactionRequest={from:qe.allowNull(r),nonce:qe.allowNull(b),gasLimit:qe.allowNull(n),gasPrice:qe.allowNull(n),maxPriorityFeePerGas:qe.allowNull(n),maxFeePerGas:qe.allowNull(n),to:qe.allowNull(r),value:qe.allowNull(n),data:qe.allowNull(g),type:qe.allowNull(b),accessList:qe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:b,blockNumber:b,transactionHash:u,address:r,topics:qe.arrayOf(u),data:i,logIndex:b,blockHash:u},e.receipt={to:qe.allowNull(this.address,null),from:qe.allowNull(this.address,null),contractAddress:qe.allowNull(r,null),transactionIndex:b,root:qe.allowNull(v),gasUsed:n,logsBloom:qe.allowNull(i),blockHash:u,transactionHash:u,logs:qe.arrayOf(this.receiptLog.bind(this)),blockNumber:b,confirmations:qe.allowNull(b,null),cumulativeGasUsed:n,effectiveGasPrice:qe.allowNull(n),status:qe.allowNull(b),type:m},e.block={hash:qe.allowNull(u),parentHash:u,number:b,timestamp:b,nonce:qe.allowNull(v),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:qe.allowNull(r),extraData:i,transactions:qe.allowNull(qe.arrayOf(u)),baseFeePerGas:qe.allowNull(n)},e.blockWithTransactions=rr(e.block),e.blockWithTransactions.transactions=qe.allowNull(qe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:qe.allowNull(s,void 0),toBlock:qe.allowNull(s,void 0),blockHash:qe.allowNull(u,void 0),address:qe.allowNull(r,void 0),topics:qe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:qe.allowNull(b),blockHash:qe.allowNull(u),transactionIndex:b,removed:qe.allowNull(this.boolean.bind(this)),address:r,data:qe.allowFalsish(i,"0x"),topics:qe.arrayOf(u),transactionHash:u,logIndex:b},e}accessList(e){return Do(e||[])}number(e){return e==="0x"?0:Le.from(e).toNumber()}type(e){return e==="0x"||e==null?0:Le.from(e).toNumber()}bigNumber(e){return Le.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),dt(e))?e.toLowerCase():cf.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return jt(e)}callAddress(e){if(!dt(e,32))return null;const r=jt(hr(e,12));return r===A6?null:r}contractAddress(e){return L1(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||dt(e))return Bs(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ii(n)!==32?cf.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=Le.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!dt(e))throw new Error("invalid uint256");return Zt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=qe.check(r,e);return s._difficulty=n==null?null:Le.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return qe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&Le.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=qe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;dt(n)&&(n=Le.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),dt(n)&&(n=Le.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return xx(e)}receiptLog(e){return qe.check(this.formats.receiptLog,e)}receipt(e){const r=qe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=Le.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&cf.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):cf.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&cf.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return qe.check(this.formats.filter,e)}filterLog(e){return qe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(s){n.push(e(s))}),n}}}function nR(t){return t&&typeof t.isCommunityResource=="function"}function N2(t){return nR(t)&&t.isCommunityResource()}var ot=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const ht=new de(Zs),iR=10;function T2(t){return t==null?"null":(Ii(t)!==32&&ht.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function k2(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(s=>{r[T2(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return T2(e)}).join("&")}function aR(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function Go(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ii(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+k2(t);if(BS.isForkEvent(t))throw ht.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+k2(t.topics||[])}throw new Error("invalid event - "+t)}function lf(){return new Date().getTime()}function P2(t){return new Promise(e=>{setTimeout(e,t)})}const oR=["block","network","pending","poll"];class sR{constructor(e,r,n){De(this,"tag",e),De(this,"listener",r),De(this,"once",n),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 e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=aR(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||oR.indexOf(this.tag)>=0}}const fR={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 fd(t){return Zt(Le.from(t).toHexString(),32)}function I2(t){return Ns.encode(Xt([t,hr(aa(aa(t)),0,4)]))}const Hx=new RegExp("^(ipfs)://(.*)$","i"),D2=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Hx,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ic(t,e){try{return $a(s0(t,e))}catch{}return null}function s0(t,e){if(t==="0x")return null;const r=Le.from(hr(t,e,e+32)).toNumber(),n=Le.from(hr(t,r,r+32)).toNumber();return hr(t,r+32,r+32+n)}function cd(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):ht.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function O2(t){const e=Fe(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 cR(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function zx(t){const e=[];let r=0;for(let n=0;nLe.from(e).eq(1)).catch(e=>{if(e.code===de.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ot(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:an([e,Uf(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=an(["0x9061b923",zx([U6(this.name),n.data])]));try{let i=yield this.provider.call(n);return Fe(i).length%32===4&&ht.throwError("resolver threw error",de.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=s0(i,0)),i}catch(i){if(i.code===de.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return ot(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?s0(n,0):null})}_getAddress(e,r){const n=fR[String(e)];if(n==null&&ht.throwError(`unsupported coin type: ${e}`,de.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=Fe(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const u=parseInt(i[1],16);if(i[2].length===u*2&&u>=1&&u<=75)return I2(Xt([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const u=parseInt(i[1],16);if(i[2].length===u*2&&u>=1&&u<=75)return I2(Xt([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let u=s[0];if(u===0?i!==20&&i!==32&&(u=-1):u=-1,u>=0&&s.length===2+i&&i>=1&&i<=75){const v=B2.toWords(s.slice(2));return v.unshift(u),B2.encode(n.prefix,v)}}return null}getAddress(e){return ot(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const s=yield this._fetch("0x3b3b57de");return s==="0x"||s===S6?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===de.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",fd(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&ht.throwError("invalid or unsupported coin data",de.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ot(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;nu[b])}return ht.throwError("invalid or unsupported content hash data",de.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ot(this,void 0,void 0,function*(){let r=vr(e);r=Xt([fd(64),fd(r.length),r]),r.length%32!==0&&(r=Xt([r,Zt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Ue(r));return n==null||n==="0x"?null:$a(n)})}}let ld=null,lR=1;class jx extends Vs{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),De(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=ri(new.target,"getNetwork")(e);r?(De(this,"_network",r),this.emit("network",r,null)):ht.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ot(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ht.throwError("no network detected",de.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:De(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return po(()=>this._ready().then(e=>e,e=>{if(!(e.code===de.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ld==null&&(ld=new qe),ld}static getNetwork(e){return ZS(e??"homestead")}ccipReadFetch(e,r,n){return ot(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),u=[];for(let v=0;v=0?null:JSON.stringify({data:i,sender:s}),_=yield Yl({url:m,errorPassThrough:!0},g,(E,R)=>(E.status=R.statusCode,E));if(_.data)return _.data;const A=_.message||"unknown error";if(_.status>=400&&_.status<500)return ht.throwError(`response not found during CCIP fetch: ${A}`,de.errors.SERVER_ERROR,{url:b,errorMessage:A});u.push(A)}return ht.throwError(`error encountered during CCIP fetch: ${u.map(v=>JSON.stringify(v)).join(", ")}`,de.errors.SERVER_ERROR,{urls:n,errorMessages:u})})}_getInternalBlockNumber(e){return ot(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const s=this._internalBlockNumber;try{const i=yield s;if(lf()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=lf(),n=cr({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const u=lf();return s=Le.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ot(this,void 0,void 0,function*(){const e=lR++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)ht.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",ht.makeError("network block skew detected",de.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let u=this.getTransactionReceipt(i).then(v=>(!v||v.blockNumber==null||(this._emitted["t:"+i]=v.blockNumber,this.emit(i,v)),null)).catch(v=>{this.emit("error",v)});r.push(u);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const u=i.toBlock-this._maxFilterBlockRange;u>i.fromBlock&&(i.fromBlock=u),i.fromBlock<0&&(i.fromBlock=0);const v=this.getLogs(i).then(b=>{s._inflight=!1,b.length!==0&&b.forEach(m=>{m.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=m.blockNumber),this._emitted["b:"+m.blockHash]=m.blockNumber,this._emitted["t:"+m.transactionHash]=m.blockNumber,this.emit(i,m)})}).catch(b=>{this.emit("error",b),s._inflight=!1});r.push(v)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ot(this,void 0,void 0,function*(){return ht.throwError("provider does not support network detection",de.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ot(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,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",r,e),yield P2(0),this._network;const n=ht.makeError("underlying network changed",de.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!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))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=lf();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ot(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,s){return ot(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((u,v)=>{const b=[];let m=!1;const g=function(){return m?!0:(m=!0,b.forEach(A=>{A()}),!1)},_=A=>{A.confirmations{this.removeListener(e,_)}),s){let A=s.startBlock,E=null;const R=B=>ot(this,void 0,void 0,function*(){m||(yield P2(1e3),this.getTransactionCount(s.from).then(T=>ot(this,void 0,void 0,function*(){if(!m){if(T<=s.nonce)A=B;else{{const F=yield this.getTransaction(e);if(F&&F.blockNumber!=null)return}for(E==null&&(E=A-3,E{m||this.once("block",R)}))});if(m)return;this.once("block",R),b.push(()=>{this.removeListener("block",R)})}if(typeof n=="number"&&n>0){const A=setTimeout(()=>{g()||v(ht.makeError("timeout exceeded",de.errors.TIMEOUT,{timeout:n}))},n);A.unref&&A.unref(),b.push(()=>{clearTimeout(A)})}})})}getBlockNumber(){return ot(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Le.from(e)}catch(r){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return Le.from(s)}catch(i){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return Le.from(s).toNumber()}catch(i){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return Ue(s)}catch(i){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield cr({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(u=>Bs(u))}),i=yield this.perform("getStorageAt",s);try{return Ue(i)}catch(u){return ht.throwError("bad result from backend",de.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:u})}})}_wrapTransaction(e,r,n){if(r!=null&&Ii(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&ht.throwError("Transaction hash mismatch from Provider.sendTransaction.",de.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,u)=>ot(this,void 0,void 0,function*(){i==null&&(i=1),u==null&&(u=0);let v;i!==0&&n!=null&&(v={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const b=yield this._waitForTransaction(e.hash,i,u,v);return b==null&&i===0?null:(this._emitted["t:"+e.hash]=b.blockNumber,b.status===0&&ht.throwError("transaction failed",de.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:b}),b)}),s}sendTransaction(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>Ue(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return ot(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Le.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Ue(i):null))}),this.formatter.transactionRequest(yield cr(n))})}_getFilter(e){return ot(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield cr(r))})}_call(e,r,n){return ot(this,void 0,void 0,function*(){n>=iR&&ht.throwError("CCIP read exceeded maximum redirections",de.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Ii(i)%32===4)try{const u=hr(i,4),v=hr(u,0,32);Le.from(v).eq(s)||ht.throwError("CCIP Read sender did not match",de.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const b=[],m=Le.from(hr(u,32,64)).toNumber(),g=Le.from(hr(u,m,m+32)).toNumber(),_=hr(u,m+32);for(let F=0;Fot(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let u=null;for(let b=0;bthis._wrapTransaction(b)),v}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return po(()=>ot(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let u=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;u<=0&&(u=1),s.confirmations=u}return this._wrapTransaction(s)}),{oncePoll:this})})}getTransactionReceipt(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return po(()=>ot(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let u=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;u<=0&&(u=1),s.confirmations=u}return s}),{oncePoll:this})})}getLogs(e){return ot(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield cr({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),qe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ot(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ot(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ht.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ot(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const s=new F2(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ot(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||ht.throwError("network does not support ENS",de.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Uf(e).substring(2)});return this.formatter.callAddress(s)}catch{}return null})}resolveName(e){return ot(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(dt(e))throw n}typeof e!="string"&&ht.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ot(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const s=Ic(yield this.call({to:n,data:"0x691f3431"+Uf(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return ot(this,void 0,void 0,function*(){let r=null;if(dt(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",u=yield this._getResolver(i,"getAvatar");if(!u)return null;r=new F2(this,u,i);try{const v=yield r.getAvatar();if(v)return v.url}catch(v){if(v.code!==de.errors.CALL_EXCEPTION)throw v}try{const v=Ic(yield this.call({to:u,data:"0x691f3431"+Uf(i).substring(2)}),0);r=yield this.getResolver(v)}catch(v){if(v.code!==de.errors.CALL_EXCEPTION)throw v;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return ht.throwError(e+" not implemented",de.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const s=new sR(Go(e),r,n);return this._events.push(s),this._startEvent(s),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,s=[],i=Go(e);return this._events=this._events.filter(u=>u.tag!==i?!0:(setTimeout(()=>{u.listener.apply(this,r)},0),n=!0,u.once?(s.push(u),!1):!0)),s.forEach(u=>{this._stopEvent(u)}),n}listenerCount(e){if(!e)return this._events.length;let r=Go(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Go(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let s=!1,i=Go(e);return this._events=this._events.filter(u=>u.tag!==i||u.listener!=r||s?!0:(s=!0,n.push(u),!1)),n.forEach(u=>{this._stopEvent(u)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=Go(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Wi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const wr=new de(Zs),uR=["call","estimateGas"];function $f(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=dt(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=$f(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return $f(JSON.parse(t),e)}catch{}return null}function Gx(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=$f(e,!0);if(i)return i.data;wr.throwError("missing revert data in call exception; Transaction reverted without a reason string",de.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let i=$f(e.body,!1);i==null&&(i=$f(e,!1)),i&&wr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",de.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===de.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&wr.throwError("insufficient funds for intrinsic transaction cost",de.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&wr.throwError("nonce has already been used",de.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&wr.throwError("replacement fee too low",de.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&wr.throwError("legacy pre-eip-155 transactions not supported",de.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),uR.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&wr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",de.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function L2(t){return new Promise(function(e){setTimeout(e,t)})}function dR(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 uf(t){return t&&t.toLowerCase()}const Kp={};class Vx extends Ws{constructor(e,r,n){if(super(),e!==Kp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");De(this,"provider",r),n==null&&(n=0),typeof n=="string"?(De(this,"_address",this.provider.formatter.address(n)),De(this,"_index",null)):typeof n=="number"?(De(this,"_index",n),De(this,"_address",null)):wr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return wr.throwError("cannot alter JSON-RPC Signer connection",de.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new hR(Kp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&wr.throwError("unknown account #"+this._index,de.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=rr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=rr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Wi(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&wr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),cr({tx:cr(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&wr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(u=>u,u=>(typeof u.message=="string"&&u.message.match(/user denied/i)&&wr.throwError("user rejected transaction",de.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Gx("sendTransaction",u,i)))})}signTransaction(e){return wr.throwError("signing transactions is unsupported",de.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Wi(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield po(()=>Wi(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Wi(this,void 0,void 0,function*(){const r=typeof e=="string"?vr(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Ue(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&wr.throwError("user rejected signing",de.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Wi(this,void 0,void 0,function*(){const r=typeof e=="string"?vr(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Ue(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&wr.throwError("user rejected signing",de.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Wi(this,void 0,void 0,function*(){const s=yield Lr.resolveNames(e,r,n,u=>this.provider.resolveName(u)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Lr.getPayload(s.domain,r,s.value))])}catch(u){throw typeof u.message=="string"&&u.message.match(/user denied/i)&&wr.throwError("user rejected signing",de.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),u}})}unlock(e){return Wi(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class hR extends Vx{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const pR={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Wx extends jx{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(u=>{s(u)},u=>{i(u)})},0)})),super(n),e||(e=ri(this.constructor,"defaultUrl")()),typeof e=="string"?De(this,"connection",Object.freeze({url:e})):De(this,"connection",Object.freeze(rr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(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 Wi(this,void 0,void 0,function*(){yield L2(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=ri(this.constructor,"getNetwork");try{return r(Le.from(e).toNumber())}catch(n){return wr.throwError("could not detect network",de.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return wr.throwError("could not detect network",de.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Vx(Kp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Mn(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=Yl(this.connection,JSON.stringify(n),dR).then(u=>(this.emit("debug",{action:"response",request:n,response:u,provider:this}),u),u=>{throw this.emit("debug",{action:"response",error:u,request:n,provider:this}),u});return s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[uf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[uf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[uf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[uf(r.address),Zt(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[ri(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ri(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=uf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Wi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&Le.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=rr(r),r.transaction=rr(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&wr.throwError(e+" not implemented",de.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return Gx(e,s,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let u=Promise.resolve();return i.forEach(function(v){e._emitted["t:"+v.toLowerCase()]="pending",u=u.then(function(){return e.getTransaction(v).then(function(b){return e.emit("pending",b),null})})}),u.then(function(){return L2(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=rr(pR);if(r)for(const i in r)r[i]&&(n[i]=!0);D1(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const u=Bs(Le.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=u}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=Ue(e[i]))}),e.accessList&&(s.accessList=Do(e.accessList)),s}}var fl=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const co=new de(Zs);function rc(){return new Date().getTime()}function U2(t){let e=null;for(let r=0;re?null:(n+s)/2}function ls(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(Le.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>ls(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=ls(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let vR=1;function $2(t){let e=null,r=null,n=new Promise(u=>{e=function(){r&&(clearTimeout(r),r=null),u()},r=setTimeout(e,t)});const s=u=>(n=n.then(u),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const mR=[de.errors.CALL_EXCEPTION,de.errors.INSUFFICIENT_FUNDS,de.errors.NONCE_EXPIRED,de.errors.REPLACEMENT_UNDERPRICED,de.errors.UNPREDICTABLE_GAS_LIMIT],gR=["address","args","errorArgs","errorSignature","method","transaction"];function nc(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 bR(t,e){return function(r){const n={};r.forEach(i=>{const u=t(i.result);n[u]||(n[u]={count:0,result:i.result}),n[u].count++});const s=Object.keys(n);for(let i=0;i=e)return u.result}}}function yR(t,e,r){let n=ls;switch(e){case"getBlockNumber":return function(s){const i=s.map(v=>v.result);let u=K2(s.map(v=>v.result),2);if(u!=null)return u=Math.ceil(u),i.indexOf(u+1)>=0&&u++,u>=t._highestBlockNumber&&(t._highestBlockNumber=u),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(u=>u.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return K2(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=rr(s),s.confirmations=-1,ls(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=rr(s),s.transactions=s.transactions.map(i=>(i=rr(i),i.confirmations=-1,i)),ls(s))}:n=function(s){return s==null?null:ls(s)};break;default:throw new Error("unknown method: "+e)}return bR(n,t.quorum)}function df(t,e){return fl(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:po(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function xR(t,e,r,n){return fl(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&dt(n.blockTag)&&(s=yield df(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&dt(i.fromBlock)||i.toBlock&&dt(i.toBlock))&&(s=yield df(t,e)),s.getLogs(i)}}return co.throwError("unknown method error",de.errors.UNKNOWN_ERROR,{method:r,params:n})})}class wR extends jx{constructor(e,r){e.length===0&&co.throwArgumentError("missing providers","providers",e);const n=e.map((u,v)=>{if(Vs.isProvider(u)){const g=N2(u)?2e3:750;return Object.freeze({provider:u,weight:1,stallTimeout:g,priority:1})}const b=rr(u);b.priority==null&&(b.priority=1),b.stallTimeout==null&&(b.stallTimeout=N2(u)?2e3:750),b.weight==null&&(b.weight=1);const m=b.weight;return(m%1||m>512||m<1)&&co.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${v}].weight`,m),Object.freeze(b)}),s=n.reduce((u,v)=>u+v.weight,0);r==null?r=s/2:r>s&&co.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=U2(n.map(u=>u.provider.network));i==null&&(i=new Promise((u,v)=>{setTimeout(()=>{this.detectNetwork().then(u,v)},0)})),super(i),De(this,"providerConfigs",Object.freeze(n)),De(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return fl(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return U2(e)})}perform(e,r){return fl(this,void 0,void 0,function*(){if(e==="sendTransaction"){const b=yield Promise.all(this.providerConfigs.map(m=>m.provider.sendTransaction(r.signedTransaction).then(g=>g.hash,g=>g)));for(let m=0;mb.priority-m.priority);const i=this._highestBlockNumber;let u=0,v=!0;for(;;){const b=rc();let m=s.filter(E=>E.runner&&b-E.startE+R.weight,0);for(;m{E.staller=null}),E.runner=xR(E,i,e,r).then(B=>{E.done=!0,E.result=B,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:R,backend:nc(E,rc()),request:{method:e,params:Mn(r)},provider:this})},B=>{E.done=!0,E.error=B,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:R,backend:nc(E,rc()),request:{method:e,params:Mn(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:R,backend:nc(E,null),request:{method:e,params:Mn(r)},provider:this}),m+=E.weight}const g=[];s.forEach(E=>{E.done||!E.runner||(g.push(E.runner),E.staller&&g.push(E.staller.getPromise()))}),g.length&&(yield Promise.race(g));const _=s.filter(E=>E.done&&E.error==null);if(_.length>=this.quorum){const E=n(_);if(E!==void 0)return s.forEach(R=>{R.staller&&R.staller.cancel(),R.cancelled=!0}),E;v||(yield $2(100).getPromise()),v=!1}const A=s.reduce((E,R)=>{if(!R.done||R.error==null)return E;const B=R.error.code;return mR.indexOf(B)>=0&&(E[B]||(E[B]={error:R.error,weight:0}),E[B].weight+=R.weight),E},{});if(Object.keys(A).forEach(E=>{const R=A[E];if(R.weight{F.staller&&F.staller.cancel(),F.cancelled=!0});const B=R.error,T={};gR.forEach(F=>{B[F]!=null&&(T[F]=B[F])}),co.throwError(B.reason||B.message,E,T)}),s.filter(E=>!E.done).length===0)break}return s.forEach(b=>{b.staller&&b.staller.cancel(),b.cancelled=!0}),co.throwError("failed to meet quorum",de.errors.SERVER_ERROR,{method:e,params:r,results:s.map(b=>nc(b)),provider:this})})}}const q2=new de(Zs);let _R=1;function H2(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:_R++,jsonrpc:"2.0"};return new Promise((u,v)=>{this.emit("debug",{action:"request",fetcher:r,request:Mn(i),provider:this}),e(i,(b,m)=>{if(b)return this.emit("debug",{action:"response",fetcher:r,error:b,request:i,provider:this}),v(b);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:m,provider:this}),m.error){const g=new Error(m.error.message);return g.code=m.error.code,g.data=m.error.data,v(g)}u(m.result)})})}}function MR(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Mn(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class AR extends Wx{constructor(e,r){e==null&&q2.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=MR(e)):e.sendAsync?s=H2(e,e.sendAsync.bind(e)):e.send?s=H2(e,e.send.bind(e)):q2.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),De(this,"jsonRpcFetchFunc",s),De(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}new de(Zs);const ER="contracts/5.7.0";var Co=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})};const dr=new de(ER);function cl(t,e){return Co(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&dr.throwArgumentError("invalid address or ENS name","name",r);try{return jt(r)}catch{}t||dr.throwError("a provider or signer is needed to resolve ENS names",de.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&dr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Dc(t,e,r){return Co(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>Dc(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield cl(t,e):r.type==="tuple"?yield Dc(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Dc(t,n,r.arrayChildren))):Promise.reject(dr.makeError("invalid value for array",de.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function eu(t,e,r){return Co(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=rr(r.pop())),dr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=cr({override:cl(t.signer,n.from),signer:t.signer.getAddress()}).then(m=>Co(this,void 0,void 0,function*(){return jt(m.signer)!==m.override&&dr.throwError("Contract with a Signer cannot override from",de.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),m.override})):n.from=t.signer.getAddress():n.from&&(n.from=cl(t.provider,n.from));const s=yield cr({args:Dc(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:cr(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),u={data:i,to:s.address},v=s.overrides;if(v.nonce!=null&&(u.nonce=Le.from(v.nonce).toNumber()),v.gasLimit!=null&&(u.gasLimit=Le.from(v.gasLimit)),v.gasPrice!=null&&(u.gasPrice=Le.from(v.gasPrice)),v.maxFeePerGas!=null&&(u.maxFeePerGas=Le.from(v.maxFeePerGas)),v.maxPriorityFeePerGas!=null&&(u.maxPriorityFeePerGas=Le.from(v.maxPriorityFeePerGas)),v.from!=null&&(u.from=v.from),v.type!=null&&(u.type=v.type),v.accessList!=null&&(u.accessList=Do(v.accessList)),u.gasLimit==null&&e.gas!=null){let m=21e3;const g=Fe(i);for(let _=0;_n[m]!=null);return b.length&&dr.throwError(`cannot override ${b.map(m=>JSON.stringify(m)).join(",")}`,de.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:b}),u})}function SR(t,e){return function(...r){return eu(t,e,r)}}function RR(t,e){const r=t.signer||t.provider;return function(...n){return Co(this,void 0,void 0,function*(){r||dr.throwError("estimate require a provider or signer",de.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield eu(t,e,n);return yield r.estimateGas(s)})}}function CR(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let u=Mn(i),v=null;try{v=t.interface.parseLog(i)}catch{}return v&&(u.args=v.args,u.decode=(b,m)=>t.interface.decodeEventLog(v.eventFragment,b,m),u.event=v.name,u.eventSignature=v.signature),u.removeListener=()=>t.provider,u.getBlock=()=>t.provider.getBlock(s.blockHash),u.getTransaction=()=>t.provider.getTransaction(s.transactionHash),u.getTransactionReceipt=()=>Promise.resolve(s),u}),s))}function Zx(t,e,r){const n=t.signer||t.provider;return function(...s){return Co(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const b=rr(s.pop());b.blockTag!=null&&(i=yield b.blockTag),delete b.blockTag,s.push(b)}t.deployTransaction!=null&&(yield t._deployed(i));const u=yield eu(t,e,s),v=yield n.call(u,i);try{let b=t.interface.decodeFunctionResult(e,v);return r&&e.outputs.length===1&&(b=b[0]),b}catch(b){throw b.code===de.errors.CALL_EXCEPTION&&(b.address=t.address,b.args=s,b.transaction=u),b}})}}function BR(t,e){return function(...r){return Co(this,void 0,void 0,function*(){t.signer||dr.throwError("sending a transaction requires a signer",de.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield eu(t,e,r),s=yield t.signer.sendTransaction(n);return CR(t,s),s})}}function z2(t,e,r){return e.constant?Zx(t,e,r):BR(t,e)}function Jx(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class f0{constructor(e,r){De(this,"tag",e),De(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class NR extends f0{constructor(){super("error",null)}}class j2 extends f0{constructor(e,r,n,s){const i={address:e};let u=r.getEventTopic(n);s?(u!==s[0]&&dr.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[u],super(Jx(i),i),De(this,"address",e),De(this,"interface",r),De(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=g6(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class G2 extends f0{constructor(e,r){super("*",{address:e}),De(this,"address",e),De(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class TR{constructor(e,r,n){De(this,"interface",ri(new.target,"getInterface")(r)),n==null?(De(this,"provider",null),De(this,"signer",null)):Ws.isSigner(n)?(De(this,"provider",n.provider||null),De(this,"signer",n)):Vs.isProvider(n)?(De(this,"provider",n),De(this,"signer",null)):dr.throwArgumentError("invalid signer or provider","signerOrProvider",n),De(this,"callStatic",{}),De(this,"estimateGas",{}),De(this,"functions",{}),De(this,"populateTransaction",{}),De(this,"filters",{});{const u={};Object.keys(this.interface.events).forEach(v=>{const b=this.interface.events[v];De(this.filters,v,(...m)=>({address:this.address,topics:this.interface.encodeFilterTopics(b,m)})),u[b.name]||(u[b.name]=[]),u[b.name].push(v)}),Object.keys(u).forEach(v=>{const b=u[v];b.length===1?De(this.filters,v,this.filters[b[0]]):dr.warn(`Duplicate definition of ${v} (${b.join(", ")})`)})}if(De(this,"_runningEvents",{}),De(this,"_wrappedEmits",{}),e==null&&dr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),De(this,"address",e),this.provider)De(this,"resolvedAddress",cl(this.provider,e));else try{De(this,"resolvedAddress",Promise.resolve(jt(e)))}catch{dr.throwError("provider is required to use ENS name as contract address",de.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(u=>{});const s={},i={};Object.keys(this.interface.functions).forEach(u=>{const v=this.interface.functions[u];if(i[u]){dr.warn(`Duplicate ABI entry for ${JSON.stringify(u)}`);return}i[u]=!0;{const b=v.name;s[`%${b}`]||(s[`%${b}`]=[]),s[`%${b}`].push(u)}this[u]==null&&De(this,u,z2(this,v,!0)),this.functions[u]==null&&De(this.functions,u,z2(this,v,!1)),this.callStatic[u]==null&&De(this.callStatic,u,Zx(this,v,!0)),this.populateTransaction[u]==null&&De(this.populateTransaction,u,SR(this,v)),this.estimateGas[u]==null&&De(this.estimateGas,u,RR(this,v))}),Object.keys(s).forEach(u=>{const v=s[u];if(v.length>1)return;u=u.substring(1);const b=v[0];try{this[u]==null&&De(this,u,this[b])}catch{}this.functions[u]==null&&De(this.functions,u,this.functions[b]),this.callStatic[u]==null&&De(this.callStatic,u,this.callStatic[b]),this.populateTransaction[u]==null&&De(this.populateTransaction,u,this.populateTransaction[b]),this.estimateGas[u]==null&&De(this.estimateGas,u,this.estimateGas[b])})}static getContractAddress(e){return L1(e)}static getInterface(e){return ra.isInterface(e)?e:new ra(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&dr.throwError("contract not deployed",de.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||dr.throwError("sending a transactions require a signer",de.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=rr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&dr.throwError("cannot override "+n,de.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new av(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&De(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return nl.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new NR);if(e==="event")return this._normalizeRunningEvent(new f0("event",null));if(e==="*")return this._normalizeRunningEvent(new G2(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new j2(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const s=this.interface.getEvent(n);return this._normalizeRunningEvent(new j2(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new f0(Jx(r),r))}return this._normalizeRunningEvent(new G2(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const s=Mn(r);return s.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||dr.throwError("events require a provider or a signer with a provider",de.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const s=i=>{let u=this._wrapEvent(e,i,r);if(u.decodeError==null)try{const v=e.getEmit(u);this.emit(e.filter,...v)}catch(v){u.decodeError=v.error}e.filter!=null&&this.emit("event",u),u.decodeError!=null&&this.emit("error",u.decodeError,u)};this._wrappedEmits[e.tag]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=rr(s.filter);return typeof r=="string"&&dt(r,32)?(n!=null&&dr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(u=>u.map(v=>this._wrapEvent(s,v,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),s=n.run(r)>0;return this._checkRunningEvents(n),s}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class _s extends TR{}var Ca;(function(t){t[t.Mainnet=1]="Mainnet",t[t.Goerli=5]="Goerli"})(Ca||(Ca={}));Ca.Mainnet+"",Ca.Goerli+"";const Xx={[Ca.Mainnet]:{chainId:"0x"+Ca.Mainnet.toString(16),chainName:"Mainnet",rpcUrls:["https://cloudflare-eth.com","https://rpc.ankr.com/eth","https://main-rpc.linkpool.io"],blockExplorerUrls:["https://etherscan.io"],nativeCurrency:{symbol:"ETH",decimals:18}},[Ca.Goerli]:{chainId:"0x"+Ca.Goerli.toString(16),chainName:"Goerli",rpcUrls:["https://goerli.optimism.io"],blockExplorerUrls:["https://goerli.etherscan.io"],nativeCurrency:{symbol:"ETH",decimals:18}}};var kR="ERC20",PR=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],IR="0x608060405234801561001057600080fd5b506105dd806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610290565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610296565b6100d66004803603604081101561015057600080fd5b50600160a060020a03813516906020013561035f565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a031661040f565b6100d6600480360360408110156101a257600080fd5b50600160a060020a03813516906020013561042a565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610475565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a038135811691602001351661048b565b6000600160a060020a038316151561022957600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526001602090815260408083203384529091528120546102ca908363ffffffff6104b616565b600160a060020a03851660009081526001602090815260408083203384529091529020556102f98484846104cb565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561037657600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff61059816565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561044157600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff6104b616565b60006104823384846104cb565b50600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000828211156104c557600080fd5b50900390565b600160a060020a03821615156104e057600080fd5b600160a060020a038316600090815260208190526040902054610509908263ffffffff6104b616565b600160a060020a03808516600090815260208190526040808220939093559084168152205461053e908263ffffffff61059816565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156105aa57600080fd5b939250505056fea165627a7a72305820722c0187518ce2856a424bdba350d5a263c8f98fcb19cb4cc161372bc3b794c90029",DR="0x608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610290565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610296565b6100d66004803603604081101561015057600080fd5b50600160a060020a03813516906020013561035f565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a031661040f565b6100d6600480360360408110156101a257600080fd5b50600160a060020a03813516906020013561042a565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610475565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a038135811691602001351661048b565b6000600160a060020a038316151561022957600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526001602090815260408083203384529091528120546102ca908363ffffffff6104b616565b600160a060020a03851660009081526001602090815260408083203384529091529020556102f98484846104cb565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561037657600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff61059816565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561044157600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff6104b616565b60006104823384846104cb565b50600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000828211156104c557600080fd5b50900390565b600160a060020a03821615156104e057600080fd5b600160a060020a038316600090815260208190526040902054610509908263ffffffff6104b616565b600160a060020a03808516600090815260208190526040808220939093559084168152205461053e908263ffffffff61059816565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156105aa57600080fd5b939250505056fea165627a7a72305820722c0187518ce2856a424bdba350d5a263c8f98fcb19cb4cc161372bc3b794c90029",OR={name:"solc",version:"0.5.4+commit.9549d8ff.Emscripten.clang"},FR={contractName:kR,abi:PR,bytecode:IR,deployedBytecode:DR,compiler:OR};new ra(FR.abi);const ud=Qr(!1);function ov(){return{boardOpen:ud,open:()=>{ud.value=!0},close:()=>{ud.value=!1}}}function sr(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})}function je(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function bn(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}class LR extends Error{constructor(e,r,n,s){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,this.data=s,this.internal=n}}class Yx extends LR{constructor(e,r,n,s){if(!(Number.isInteger(e)&&e>=1e3&&e<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n,s)}}class UR extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}}class hn extends Error{constructor(){super(...arguments),this.name="ProviderNotFoundError",this.message="Provider not found"}}class V2 extends Error{constructor(){super(...arguments),this.name="AddChainError",this.message="Error adding chain"}}class Qx extends Yx{constructor(e){super(4902,e.message),this.name="SwitchChainError"}}class $p extends Yx{constructor(e){super(4001,e.message),this.name="UserRejectedRequestError"}}class dd extends Error{constructor(e){super(),this.name="ActivateEthersError",this.message="Failed to load wallet data",e&&(this.message=this.message+": "+e)}}class W2 extends Error{constructor(e){super(e),this.name="ConnectError"}}class KR extends Error{constructor(e){super(e),this.name="AutoConnectError"}}class e4{constructor(e){this.options=e}}const sv=Qr(!1),tu=Qr(null),lo=Qr(null),ll=Qr(null),fv=Qr(""),cv=Qr(""),ul=Qr(BigInt(0));let qp;const $R=Qr(Object.assign({},Xx)),qR=()=>{clearInterval(qp),sv.value=!1,tu.value=null,lo.value=null,ll.value=null,fv.value="",cv.value="",ul.value=BigInt(0)};function HR(t){return sr(this,void 0,void 0,function*(){if(!t)throw new dd("provider not found");const e=new AR(t),r=e.getSigner();let n=null,s="",i=Le.from(0);[n,s,i]=yield v();function v(m=5e3){return sr(this,void 0,void 0,function*(){return Promise.race([Promise.all([e.getNetwork(),r.getAddress(),r.getBalance()]),new Promise((g,_)=>setTimeout(()=>{_(new dd("Operation timed out"))},m))])})}tu.value=Pi(e),lo.value=Pi(r),ll.value=n,fv.value=s,ul.value=i.toBigInt();try{cv.value=yield t4(n?.chainId,s)}catch{throw new dd("Failed to look up DNS")}clearInterval(qp),((m=1e4)=>sr(this,void 0,void 0,function*(){qp=setInterval(()=>sr(this,void 0,void 0,function*(){if(!!lo.value)try{const g=yield lo?.value.getBalance();ul.value=g.toBigInt()}catch{throw new Error("Failed to update balance")}}),m)}))(),sv.value=!0})}function t4(t,e,r){var n;return sr(this,void 0,void 0,function*(){try{switch(t){case 1:case 3:case 4:case 5:return(yield(n=r||tu.value)===null||n===void 0?void 0:n.lookupAddress(e))||"";default:return""}}catch{return""}})}function An(){const t=nn(()=>{var e;return(e=ll.value)===null||e===void 0?void 0:e.chainId});return{isActivated:sv,provider:tu,signer:lo,network:ll,address:fv,dnsAlias:cv,balance:ul,availableNetworks:$R,chainId:t,activate:HR,deactivate:qR,lookupDNS:t4}}function Z2(t){return i0.isAddress(t)?t.slice(0,6)+"..."+t.slice(-4):""}function zR(t){if(typeof t=="string"){const e=t.trim().substring(0,2);return Number.parseInt(t,e==="0x"?16:10)}return t}var vi,Rr,ya,xa,wa,io,Hp;class r4 extends e4{constructor(e={}){super(e),vi.add(this),this.name="metaMask",Rr.set(this,void 0),ya.set(this,void 0),xa.set(this,void 0),wa.set(this,void 0)}static checkConnection(){return sr(this,void 0,void 0,function*(){return!!(typeof window<"u"&&!!window.ethereum&&window.ethereum.selectedAddress)})}connect(){var e,r;return sr(this,void 0,void 0,function*(){let n=yield this.getProvider();return(((e=n?.providers)===null||e===void 0?void 0:e.length)||0)>1&&(n=((r=n?.providers)===null||r===void 0?void 0:r.find(v=>v.isMetaMask))||n),bn(this,Rr,n,"f"),{account:(yield je(this,Rr,"f").request({method:"eth_requestAccounts",params:[{eth_accounts:{}}]}))[0],provider:n}})}getProvider(){return sr(this,void 0,void 0,function*(){if(typeof window<"u"&&!!window.ethereum)return window.ethereum;throw this.options.appUrl&&window.open(`https://metamask.app.link/dapp/${this.options.appUrl}`,"_blank"),new hn})}disconnect(){return sr(this,void 0,void 0,function*(){if(!je(this,Rr,"f"))throw new hn;je(this,ya,"f")&&je(this,vi,"m",io).call(this,"disconnect",je(this,ya,"f")),je(this,xa,"f")&&je(this,vi,"m",io).call(this,"accountsChanged",je(this,xa,"f")),je(this,wa,"f")&&je(this,vi,"m",io).call(this,"chainChanged",je(this,wa,"f")),bn(this,Rr,void 0,"f"),bn(this,ya,void 0,"f"),bn(this,xa,void 0,"f"),bn(this,wa,void 0,"f")})}onDisconnect(e){if(!je(this,Rr,"f"))throw new hn;je(this,ya,"f")&&je(this,vi,"m",io).call(this,"disconnect",je(this,ya,"f")),bn(this,ya,e,"f"),je(this,Rr,"f").on("disconnect",e)}onAccountsChanged(e){if(!je(this,Rr,"f"))throw new hn;je(this,xa,"f")&&je(this,vi,"m",io).call(this,"accountsChanged",je(this,xa,"f")),bn(this,xa,e,"f"),je(this,Rr,"f").on("accountsChanged",e)}onChainChanged(e){if(!je(this,Rr,"f"))throw new hn;je(this,wa,"f")&&je(this,vi,"m",io).call(this,"chainChanged",je(this,wa,"f")),bn(this,wa,e,"f"),je(this,Rr,"f").on("chainChanged",r=>{const n=zR(r);e(n)})}switchChain(e){return sr(this,void 0,void 0,function*(){if(!je(this,Rr,"f"))throw new hn;const r=i0.hexValue(e),{availableNetworks:n}=An(),s=JSON.parse(JSON.stringify(n.value));try{yield je(this,Rr,"f").request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})}catch(i){if(i.code===4902)try{yield this.addChain(s[e])}catch(u){throw je(this,vi,"m",Hp).call(this,u)?new $p(u):new V2}throw je(this,vi,"m",Hp).call(this,i)?new $p(i):new Qx(i)}})}addChain(e){return sr(this,void 0,void 0,function*(){if(!je(this,Rr,"f"))throw new hn;try{je(this,Rr,"f").request({method:"wallet_addEthereumChain",params:[e]})}catch{throw new V2}})}}Rr=new WeakMap,ya=new WeakMap,xa=new WeakMap,wa=new WeakMap,vi=new WeakSet,io=function(e,r){if(!je(this,Rr,"f"))throw new hn;je(this,Rr,"f").removeListener(e,r)},Hp=function(e){return/(user rejected)/i.test(e.message)};var is,Gr,Rf,Cf,Bf,Oc,n4;class jR extends e4{constructor(e){super(e),is.add(this),this.name="coinbaseWallet",Gr.set(this,void 0),Rf.set(this,void 0),Cf.set(this,void 0),Bf.set(this,void 0)}connect(){return sr(this,void 0,void 0,function*(){const e=yield this.getProvider();bn(this,Gr,e,"f");const r=yield e.enable();return{account:i0.getAddress(r[0]),provider:e}})}getProvider(){return sr(this,void 0,void 0,function*(){let e=(yield o6(()=>import("./index.edbf2f79.js").then(s=>s.i),[])).default;return typeof e!="function"&&typeof e.default=="function"&&(e=e.default),new e(this.options).makeWeb3Provider(this.options.jsonRpcUrl,this.options.chainId)})}disconnect(){return sr(this,void 0,void 0,function*(){if(!je(this,Gr,"f"))throw new hn;yield je(this,Gr,"f").close(),bn(this,Gr,void 0,"f")})}onDisconnect(e){if(!je(this,Gr,"f"))throw new hn;je(this,Rf,"f")&&je(this,is,"m",Oc).call(this,"disconnect",je(this,Rf,"f")),bn(this,Rf,e,"f"),je(this,Gr,"f").on("disconnect",e)}onAccountsChanged(e){if(!je(this,Gr,"f"))throw new hn;je(this,Cf,"f")&&je(this,is,"m",Oc).call(this,"accountsChanged",je(this,Cf,"f")),bn(this,Cf,e,"f"),je(this,Gr,"f").on("accountsChanged",e)}onChainChanged(e){if(!je(this,Gr,"f"))throw new hn;je(this,Bf,"f")&&je(this,is,"m",Oc).call(this,"chainChanged",je(this,Bf,"f")),bn(this,Bf,e,"f"),je(this,Gr,"f").on("chainChanged",e)}switchChain(e){return sr(this,void 0,void 0,function*(){if(!je(this,Gr,"f"))throw new hn;const r=je(this,Gr,"f"),n=i0.hexValue(e);try{yield r.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})}catch(s){throw s.code,je(this,is,"m",n4).call(this,s)?new $p(s):new Qx(s)}})}}Gr=new WeakMap,Rf=new WeakMap,Cf=new WeakMap,Bf=new WeakMap,is=new WeakSet,Oc=function(e,r){if(!je(this,Gr,"f"))throw new hn;je(this,Gr,"f").removeListener(e,r)},n4=function(e){return/(user rejected)/i.test(e.message)};const i4=typeof window>"u",GR=!i4&&window?.parent!==window,J2=()=>!(!i4&&GR),Ut=Ua({connector:null,provider:null,error:"",status:"none"}),hd=Qr(!0),Vo=Qr(!0),Hi=Ua({onDisconnectCallback:null,onAccountsChangedCallback:null,onChainChangedCallback:null});function c0(t={useEthers:!0}){const e=()=>{if(Ut.connector=null,Ut.provider=null,Ut.error="",Ut.status="none",t.useEthers){const{deactivate:m}=An();m()}};function r(){return sr(this,void 0,void 0,function*(){const{activate:m}=An();Ut.status="loading";try{Ut.provider?(yield m(Ut.provider),Ut.status="connected"):Ut.status="none"}catch(g){throw e(),Ut.error=g.message,new Error(g)}})}function n(m){return sr(this,void 0,void 0,function*(){Ut.error="",Ut.status="connecting";try{if(!m)throw new UR;const{provider:g}=yield m.connect();Ut.connector=Pi(m),Ut.provider=Pi(g)}catch(g){throw yield s(),Ut.error=g.message,new W2(g)}Ut.status="loading";try{if(t.useEthers){const{activate:g}=An();yield g(Ut.provider)}}catch(g){throw yield s(),Ut.error=g.message,new W2(g)}Ut.status="connected",localStorage.removeItem("VUE_DAPP__hasDisconnected"),Ut.connector&&Ut.connector.onDisconnect((...g)=>{var _;Hi.onDisconnectCallback&&Hi.onDisconnectCallback(...g),((_=Ut.connector)===null||_===void 0?void 0:_.name)!=="metaMask"&&s()}),Ut.connector&&Ut.connector.onAccountsChanged(g=>sr(this,void 0,void 0,function*(){Hi.onAccountsChangedCallback&&Hi.onAccountsChangedCallback(g),t.useEthers&&(yield r())})),Ut.connector&&Ut.connector.onChainChanged(g=>sr(this,void 0,void 0,function*(){Hi.onChainChangedCallback&&Hi.onChainChangedCallback(g),t.useEthers&&(yield r())}))})}function s(){return sr(this,void 0,void 0,function*(){if(Ut.connector)try{yield Ut.connector.disconnect()}catch(m){throw e(),new Error(m)}e(),hd.value&&localStorage.setItem("VUE_DAPP__hasDisconnected","true")})}function i(m){return sr(this,void 0,void 0,function*(){if(hd.value&&localStorage.getItem("VUE_DAPP__hasDisconnected")){!Vo.value&&console.warn("No auto-connect: has disconnected");return}const g=m.find(A=>A.name==="safe");if(!!g&&!J2())try{(yield g.isSafeApp())?yield n(g):Vo.value||console.warn("No auto-connect to Safe: not safe app from safe.isSafeApp()")}catch{throw new Error("Failed to connect Gnosis Safe")}else Vo.value||(g?J2()?console.warn("No auto-connect to Safe: not safe app from isNotSafeApp()"):console.warn("No auto-connect to Safe"):console.warn("No auto-connect to Safe: connector not found"));if(Ut.status!=="none")return;const _=m.find(A=>A.name==="metaMask");if(_)try{(yield r4.checkConnection())?yield n(_):Vo.value||console.warn("No auto-connect to MetaMask: not connected")}catch(A){throw new KR(A)}else Vo.value||console.warn("No auto-connect to MetaMask: connector not found")})}function u(m){Hi.onDisconnectCallback=m}function v(m){Hi.onAccountsChangedCallback=m}function b(m){Hi.onChainChangedCallback=m}return{wallet:Ut,persistDisconnect:hd,dumb:Vo,connectWith:n,disconnect:s,autoConnect:i,onDisconnect:u,onAccountsChanged:v,onChainChanged:b}}An();const VR={beforeMount:(t,e)=>{t.clickOutsideEvent=n=>{n.stopPropagation(),n.target!==t&&!t.contains(n.target)&&e.value(n)};const r="ontouchstart"in document.documentElement?"touchstart":"click";setTimeout(()=>{document.addEventListener(r,t.clickOutsideEvent)},0)},unmounted:t=>{const e=t.clickOutsideEvent;delete t.clickOutsideEvent;const r="ontouchstart"in document.documentElement?"touchstart":"click";document.removeEventListener(r,e)}};var w0=ci({emits:["close"],props:{dark:{type:Boolean,required:!1,default:!1},modalOpen:{type:Boolean,required:!0}},setup(t,{emit:e}){const r=Qr(t.dark?"modal-inner--dark":"modal-inner"),n=()=>{e("close")};return bs(()=>t.modalOpen,s=>{s?document.body.style.overflow="hidden":document.body.style.overflow=""}),{modalInnerClass:r,closeModal:n}}});const WR={key:0,class:"modal"},ZR={class:"modal-content"};function JR(t,e,r,n,s,i){return $e(),sn(D9,{to:"body"},[Wt(P1,{name:"modal-animation"},{default:ta(()=>[t.modalOpen?($e(),We("div",WR,[ce("div",{class:oi(t.modalInnerClass)},[ce("div",ZR,[zt(" Modal Content "),Zc(t.$slots,"default")])],2)])):zt("v-if",!0)]),_:3})])}function lv(t,e){e===void 0&&(e={});var r=e.insertAt;if(!(!t||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}var XR=` .modal[data-v-701ac82d] { position: fixed; display: flex; @@ -105,7 +105,7 @@ opacity: 0; } } -`;lv(nC);const nu={};nu.render=rC;nu.__scopeId="data-v-04a0d67a";nu.__file="src/components/Loader.vue";const iC={height:"246",viewBox:"0 0 400 246",width:"400",xmlns:"http://www.w3.org/2000/svg"},aC=ce("path",{d:"m81.9180572 48.3416816c65.2149658-63.8508884 170.9493158-63.8508884 236.1642788 0l7.848727 7.6845565c3.260748 3.1925442 3.260748 8.3686816 0 11.5612272l-26.848927 26.2873374c-1.630375 1.5962734-4.273733 1.5962734-5.904108 0l-10.800779-10.5748639c-45.495589-44.5439756-119.258514-44.5439756-164.754105 0l-11.566741 11.3248068c-1.630376 1.5962721-4.273735 1.5962721-5.904108 0l-26.8489263-26.2873375c-3.2607483-3.1925456-3.2607483-8.3686829 0-11.5612272zm291.6903948 54.3649934 23.895596 23.395862c3.260732 3.19253 3.260751 8.368636.000041 11.561187l-107.746894 105.494845c-3.260726 3.192568-8.547443 3.192604-11.808214.000083-.000013-.000013-.000029-.000029-.000042-.000043l-76.472191-74.872762c-.815187-.798136-2.136867-.798136-2.952053 0-.000006.000005-.00001.00001-.000015.000014l-76.470562 74.872708c-3.260715 3.192576-8.547434 3.19263-11.808215.000116-.000019-.000018-.000039-.000037-.000059-.000058l-107.74989297-105.496247c-3.26074695-3.192544-3.26074695-8.368682 0-11.561226l23.89563947-23.395823c3.260747-3.1925446 8.5474652-3.1925446 11.8082136 0l76.4733029 74.873809c.815188.798136 2.136866.798136 2.952054 0 .000012-.000012.000023-.000023.000035-.000032l76.469471-74.873777c3.260673-3.1926181 8.547392-3.1927378 11.808214-.000267.000046.000045.000091.00009.000135.000135l76.473203 74.873909c.815186.798135 2.136866.798135 2.952053 0l76.471967-74.872433c3.260748-3.1925458 8.547465-3.1925458 11.808213 0z",fill:"#3b99fc"},null,-1),oC=[aC];function sC(t,e){return $e(),We("svg",iC,oC)}const uv={};uv.render=sC;uv.__file="src/components/logos/WalletConnect.vue";const fC={height:"355",viewBox:"0 0 397 355",width:"397",xmlns:"http://www.w3.org/2000/svg"},cC=U9('',1),lC=[cC];function uC(t,e){return $e(),We("svg",fC,lC)}const dv={};dv.render=uC;dv.__file="src/components/logos/MetaMask.vue";const dC={width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hC=ce("rect",{width:"1024",height:"1024",fill:"#0052FF"},null,-1),pC=ce("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"},null,-1),vC=[hC,pC];function mC(t,e){return $e(),We("svg",dC,vC)}const hv={};hv.render=mC;hv.__file="src/components/logos/CoinbaseWallet.vue";const gC={width:"1024",height:"1024",viewBox:"0 0 280 280",fill:"#008C73",xmlns:"http://www.w3.org/2000/svg"},bC=ce("path",{d:"M137,9.84A128.75,128.75,0,1,0,265.7,138.59,128.76,128.76,0,0,0,137,9.84Zm94.23,135.78H171.44a36.38,36.38,0,1,1,.28-12.66h59.46a6.33,6.33,0,0,1,0,12.66Z",stroke:"#fff"},null,-1),yC=[bC];function xC(t,e){return $e(),We("svg",gC,yC)}const pv={};pv.render=xC;pv.__file="src/components/logos/GnosisSafe.vue";var iu=ci({components:{Modal:w0,Loader:nu,MetaMaskIcon:dv,WalletConnectIcon:uv,CoinbaseWalletIcon:hv,GnosisSafeIcon:pv},props:{connectors:{type:Array,required:!0,default:[]},dark:{type:Boolean,required:!1,default:!1},connectErrorHandler:{type:Function,required:!1,default:void 0},autoConnectErrorHandler:{type:Function,required:!1,default:void 0}},setup(t){const{boardOpen:e,close:r}=ov(),{connectWith:n,wallet:s,autoConnect:i}=c0(),u=nn(()=>t.dark?"wallet-item--dark":"wallet-item"),v=t.connectors,b=Qr(!1),m=_n("autoConnect");return A1(()=>sr(this,void 0,void 0,function*(){if(m)try{b.value=!0,yield i(v)}catch(_){t.autoConnectErrorHandler&&t.autoConnectErrorHandler(_)}finally{b.value=!1}})),{isAutoConnecting:b,boardOpen:e,wallet:s,connectors:v,walletItemClass:u,onClickWallet:_=>sr(this,void 0,void 0,function*(){try{r(),yield n(_)}catch(A){t.connectErrorHandler&&t.connectErrorHandler(A)}}),close:r}}});const a4=t=>(w1("data-v-e1ee1034"),t=t(),_1(),t),wC=["onClick"],_C={class:"item"},MC={key:4},AC={key:5},EC={key:6},SC={key:7},RC={key:0,class:"loading-modal"},CC=a4(()=>ce("p",null,"Connecting...",-1)),BC=a4(()=>ce("p",{class:"mt-4"},"Approve or reject request using your wallet",-1)),NC=[CC,BC];function TC(t,e,r,n,s,i){const u=Zr("MetaMaskIcon"),v=Zr("WalletConnectIcon"),b=Zr("CoinbaseWalletIcon"),m=Zr("GnosisSafeIcon"),g=Zr("Modal"),_=p9("click-outside");return $e(),We(tr,null,[Wt(g,{modalOpen:t.boardOpen,onClose:t.close,dark:t.dark},{default:ta(()=>[ss(($e(),We("div",null,[($e(!0),We(tr,null,Mo(t.connectors,(A,E)=>($e(),We("div",{key:A.name},[ce("div",{class:oi(t.walletItemClass),onClick:R=>t.onClickWallet(A)},[ce("div",_C,[zt(" TODO: refactor these v-if "),A.name==="metaMask"?($e(),sn(u,{key:0,class:"logo"})):zt("v-if",!0),A.name==="walletConnect"?($e(),sn(v,{key:1,class:"logo"})):zt("v-if",!0),A.name==="coinbaseWallet"?($e(),sn(b,{key:2,class:"logo"})):zt("v-if",!0),A.name==="safe"?($e(),sn(m,{key:3,class:"logo"})):zt("v-if",!0),A.name==="metaMask"?($e(),We("div",MC,"MetaMask")):zt("v-if",!0),A.name==="walletConnect"?($e(),We("div",AC,"WalletConnect")):zt("v-if",!0),A.name==="coinbaseWallet"?($e(),We("div",EC," Coinbase Wallet ")):zt("v-if",!0),A.name==="safe"?($e(),We("div",SC,"Gnosis Safe")):zt("v-if",!0)])],10,wC),E!==t.connectors.length-1?($e(),We("div",{key:0,class:oi(t.dark?"line--dark":"line")},null,2)):zt("v-if",!0)]))),128))])),[[_,t.close]])]),_:1},8,["modalOpen","onClose","dark"]),Jc(t.$slots,"connecting",{},()=>[Wt(g,{modalOpen:t.wallet.status==="connecting"&&!t.isAutoConnecting,dark:t.dark},{default:ta(()=>[t.wallet.status==="connecting"?($e(),We("div",RC,NC)):zt("v-if",!0)]),_:1},8,["modalOpen","dark"])]),Jc(t.$slots,"loading",{},()=>[Wt(g,{modalOpen:t.wallet.status==="loading"&&!t.isAutoConnecting,dark:t.dark},null,8,["modalOpen","dark"])])],64)}var kC=` +`;lv(nC);const ru={};ru.render=rC;ru.__scopeId="data-v-04a0d67a";ru.__file="src/components/Loader.vue";const iC={height:"246",viewBox:"0 0 400 246",width:"400",xmlns:"http://www.w3.org/2000/svg"},aC=ce("path",{d:"m81.9180572 48.3416816c65.2149658-63.8508884 170.9493158-63.8508884 236.1642788 0l7.848727 7.6845565c3.260748 3.1925442 3.260748 8.3686816 0 11.5612272l-26.848927 26.2873374c-1.630375 1.5962734-4.273733 1.5962734-5.904108 0l-10.800779-10.5748639c-45.495589-44.5439756-119.258514-44.5439756-164.754105 0l-11.566741 11.3248068c-1.630376 1.5962721-4.273735 1.5962721-5.904108 0l-26.8489263-26.2873375c-3.2607483-3.1925456-3.2607483-8.3686829 0-11.5612272zm291.6903948 54.3649934 23.895596 23.395862c3.260732 3.19253 3.260751 8.368636.000041 11.561187l-107.746894 105.494845c-3.260726 3.192568-8.547443 3.192604-11.808214.000083-.000013-.000013-.000029-.000029-.000042-.000043l-76.472191-74.872762c-.815187-.798136-2.136867-.798136-2.952053 0-.000006.000005-.00001.00001-.000015.000014l-76.470562 74.872708c-3.260715 3.192576-8.547434 3.19263-11.808215.000116-.000019-.000018-.000039-.000037-.000059-.000058l-107.74989297-105.496247c-3.26074695-3.192544-3.26074695-8.368682 0-11.561226l23.89563947-23.395823c3.260747-3.1925446 8.5474652-3.1925446 11.8082136 0l76.4733029 74.873809c.815188.798136 2.136866.798136 2.952054 0 .000012-.000012.000023-.000023.000035-.000032l76.469471-74.873777c3.260673-3.1926181 8.547392-3.1927378 11.808214-.000267.000046.000045.000091.00009.000135.000135l76.473203 74.873909c.815186.798135 2.136866.798135 2.952053 0l76.471967-74.872433c3.260748-3.1925458 8.547465-3.1925458 11.808213 0z",fill:"#3b99fc"},null,-1),oC=[aC];function sC(t,e){return $e(),We("svg",iC,oC)}const uv={};uv.render=sC;uv.__file="src/components/logos/WalletConnect.vue";const fC={height:"355",viewBox:"0 0 397 355",width:"397",xmlns:"http://www.w3.org/2000/svg"},cC=U9('',1),lC=[cC];function uC(t,e){return $e(),We("svg",fC,lC)}const dv={};dv.render=uC;dv.__file="src/components/logos/MetaMask.vue";const dC={width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hC=ce("rect",{width:"1024",height:"1024",fill:"#0052FF"},null,-1),pC=ce("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"},null,-1),vC=[hC,pC];function mC(t,e){return $e(),We("svg",dC,vC)}const hv={};hv.render=mC;hv.__file="src/components/logos/CoinbaseWallet.vue";const gC={width:"1024",height:"1024",viewBox:"0 0 280 280",fill:"#008C73",xmlns:"http://www.w3.org/2000/svg"},bC=ce("path",{d:"M137,9.84A128.75,128.75,0,1,0,265.7,138.59,128.76,128.76,0,0,0,137,9.84Zm94.23,135.78H171.44a36.38,36.38,0,1,1,.28-12.66h59.46a6.33,6.33,0,0,1,0,12.66Z",stroke:"#fff"},null,-1),yC=[bC];function xC(t,e){return $e(),We("svg",gC,yC)}const pv={};pv.render=xC;pv.__file="src/components/logos/GnosisSafe.vue";var nu=ci({components:{Modal:w0,Loader:ru,MetaMaskIcon:dv,WalletConnectIcon:uv,CoinbaseWalletIcon:hv,GnosisSafeIcon:pv},props:{connectors:{type:Array,required:!0,default:[]},dark:{type:Boolean,required:!1,default:!1},connectErrorHandler:{type:Function,required:!1,default:void 0},autoConnectErrorHandler:{type:Function,required:!1,default:void 0}},setup(t){const{boardOpen:e,close:r}=ov(),{connectWith:n,wallet:s,autoConnect:i}=c0(),u=nn(()=>t.dark?"wallet-item--dark":"wallet-item"),v=t.connectors,b=Qr(!1),m=_n("autoConnect");return A1(()=>sr(this,void 0,void 0,function*(){if(m)try{b.value=!0,yield i(v)}catch(_){t.autoConnectErrorHandler&&t.autoConnectErrorHandler(_)}finally{b.value=!1}})),{isAutoConnecting:b,boardOpen:e,wallet:s,connectors:v,walletItemClass:u,onClickWallet:_=>sr(this,void 0,void 0,function*(){try{r(),yield n(_)}catch(A){t.connectErrorHandler&&t.connectErrorHandler(A)}}),close:r}}});const a4=t=>(w1("data-v-e1ee1034"),t=t(),_1(),t),wC=["onClick"],_C={class:"item"},MC={key:4},AC={key:5},EC={key:6},SC={key:7},RC={key:0,class:"loading-modal"},CC=a4(()=>ce("p",null,"Connecting...",-1)),BC=a4(()=>ce("p",{class:"mt-4"},"Approve or reject request using your wallet",-1)),NC=[CC,BC];function TC(t,e,r,n,s,i){const u=Zr("MetaMaskIcon"),v=Zr("WalletConnectIcon"),b=Zr("CoinbaseWalletIcon"),m=Zr("GnosisSafeIcon"),g=Zr("Modal"),_=p9("click-outside");return $e(),We(tr,null,[Wt(g,{modalOpen:t.boardOpen,onClose:t.close,dark:t.dark},{default:ta(()=>[ss(($e(),We("div",null,[($e(!0),We(tr,null,Ao(t.connectors,(A,E)=>($e(),We("div",{key:A.name},[ce("div",{class:oi(t.walletItemClass),onClick:R=>t.onClickWallet(A)},[ce("div",_C,[zt(" TODO: refactor these v-if "),A.name==="metaMask"?($e(),sn(u,{key:0,class:"logo"})):zt("v-if",!0),A.name==="walletConnect"?($e(),sn(v,{key:1,class:"logo"})):zt("v-if",!0),A.name==="coinbaseWallet"?($e(),sn(b,{key:2,class:"logo"})):zt("v-if",!0),A.name==="safe"?($e(),sn(m,{key:3,class:"logo"})):zt("v-if",!0),A.name==="metaMask"?($e(),We("div",MC,"MetaMask")):zt("v-if",!0),A.name==="walletConnect"?($e(),We("div",AC,"WalletConnect")):zt("v-if",!0),A.name==="coinbaseWallet"?($e(),We("div",EC," Coinbase Wallet ")):zt("v-if",!0),A.name==="safe"?($e(),We("div",SC,"Gnosis Safe")):zt("v-if",!0)])],10,wC),E!==t.connectors.length-1?($e(),We("div",{key:0,class:oi(t.dark?"line--dark":"line")},null,2)):zt("v-if",!0)]))),128))])),[[_,t.close]])]),_:1},8,["modalOpen","onClose","dark"]),Zc(t.$slots,"connecting",{},()=>[Wt(g,{modalOpen:t.wallet.status==="connecting"&&!t.isAutoConnecting,dark:t.dark},{default:ta(()=>[t.wallet.status==="connecting"?($e(),We("div",RC,NC)):zt("v-if",!0)]),_:1},8,["modalOpen","dark"])]),Zc(t.$slots,"loading",{},()=>[Wt(g,{modalOpen:t.wallet.status==="loading"&&!t.isAutoConnecting,dark:t.dark},null,8,["modalOpen","dark"])])],64)}var kC=` .wallet-item[data-v-e1ee1034] { display: flex; justify-content: center; @@ -188,8 +188,8 @@ width: auto; } } -`;lv(kC);iu.render=TC;iu.__scopeId="data-v-e1ee1034";iu.__file="src/components/Board.vue";const PC={install(t,e){if(e&&e.networks){const{availableNetworks:r}=An();r.value=Object.assign(Object.assign({},Xx),e.networks)}if(t.provide("autoConnect",e?.autoConnect||!1),e?.autoConnect&&e?.persistDisconnect===!1){const{persistDisconnect:r}=c0();r.value=!1}if(e?.dumb===!1){const{dumb:r}=c0();r.value=!1}t.directive("click-outside",VR),t.component("vd-board",iu),t.component("vd-modal",w0)}};function vv(){function t(u){return Vo.find(b=>b.chainId==u).blockExplorer}function e(u){let v=Vo.find(b=>b.chainId==u);return v?v.name.toUpperCase():"Unsupported Network".toUpperCase()}function r(u){let b=[Vo.find(m=>m.chainId==u).rpc1];if(b){const m=b.map(g=>new Wx(g));return new wR(m,1)}else return null}function n(){return Vo.map(v=>v.resolver)}function s(){return Vo.map(v=>v.name.toUpperCase())}async function i(u,v){let b=Vo.find(g=>g.name.toUpperCase()==v),m=b.chainId;try{await u.request({method:"wallet_switchEthereumChain",params:[{chainId:Bs(m)}]})}catch(g){g.code===4902&&await u.request({method:"wallet_addEthereumChain",params:[{chainId:Bs(m),chainName:v,nativeCurrency:{name:b.currency,symbol:b.currency,decimals:18},rpcUrls:[b.rpc2],blockExplorerUrls:[b.blockExplorer]}]})}}return{getBlockExplorerBaseUrl:t,getChainName:e,getFallbackProvider:r,getResolvers:n,getSupportedChains:s,switchOrAddChain:i}}const Vo=[{chainId:1,name:"Ethereum",currency:"ETH",rpc1:"https://rpc.ankr.com/eth",rpc2:"https://1rpc.io/eth",blockExplorer:"https://etherscan.io",resolver:"0x985ecBD12566dD8BC05F4Df96729Ee84dE67F519"},{chainId:10,name:"Optimism",currency:"ETH",rpc1:"https://optimism-mainnet.public.blastapi.io",rpc2:"https://rpc.ankr.com/optimism",blockExplorer:"https://optimistic.etherscan.io",resolver:"0xF20fc12a4955c9d47194B8fEd591Fe01777D2b06"},{chainId:14,name:"Flare",currency:"FLR",rpc1:"https://flare-api.flare.network/ext/C/rpc",rpc2:"https://flare-api.flare.network/ext/C/rpc",blockExplorer:"https://flare-explorer.flare.network",resolver:"0x2919f0bE09549814ADF72fb0387D1981699fc6D4"},{chainId:16,name:"Coston Testnet",currency:"CFLR",rpc1:"https://coston-api.flare.network/ext/C/rpc",rpc2:"https://coston-api.flare.network/ext/C/rpc",blockExplorer:"https://coston-explorer.flare.network",resolver:""},{chainId:19,name:"Songbird",currency:"SGB",rpc1:"https://songbird-api.flare.network/ext/C/rpc",rpc2:"https://sgb.ftso.com.au/ext/bc/C/rpc",blockExplorer:"https://songbird-explorer.flare.network",resolver:"0x7e8aB50697C7Abe63Bdab6B155C2FB8D285458cB"},{chainId:56,name:"BNB Smart Chain",currency:"BNB",rpc1:"https://rpc.ankr.com/bsc",rpc2:"https://bsc-dataseed.binance.org",blockExplorer:"https://bscscan.com",resolver:"0x4aBf8b364ac4aF048Ea077AAA2EDF3e1e1EC0f9c"},{chainId:100,name:"Gnosis Chain",currency:"XDAI",rpc1:"https://rpc.ankr.com/gnosis",rpc2:"https://rpc.ankr.com/gnosis",blockExplorer:"https://gnosisscan.io",resolver:"0x4Ef2f5fE2211125b3cadca7FeaE4534D02C29e17"},{chainId:137,name:"Polygon",currency:"MATIC",rpc1:"https://rpc.ankr.com/polygon",rpc2:"https://rpc.ankr.com/polygon",blockExplorer:"https://polygonscan.com",resolver:"0x07884566cdED43eDaec7813C1523624202b060D3"},{chainId:250,name:"Fantom",currency:"FTM",rpc1:"https://rpc.ankr.com/fantom",rpc2:"https://rpc.ankr.com/fantom",blockExplorer:"https://ftmscan.com",resolver:"0xa97c7AF10ee564EBf452A9347bB9653454Ba69C0"},{chainId:8453,name:"Base",currency:"ETH",rpc1:"https://mainnet.base.org",rpc2:"https://mainnet.base.org",blockExplorer:"https://basescan.org",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:34443,name:"Mode",currency:"ETH",rpc1:"https://mainnet.mode.network",rpc2:"https://1rpc.io/mode",blockExplorer:"https://explorer.mode.network",resolver:"0x4aBf8b364ac4aF048Ea077AAA2EDF3e1e1EC0f9c"},{chainId:42161,name:"Arbitrum",currency:"ETH",rpc1:"https://rpc.ankr.com/arbitrum",rpc2:"https://rpc.ankr.com/arbitrum",blockExplorer:"https://arbiscan.io",resolver:"0xd64A2DF9d73CD1Cb50139A3eC3176070e00C67cA"},{chainId:42170,name:"Arbitrum Nova",currency:"ETH",rpc1:"https://arbitrum-nova.public.blastapi.io",rpc2:"https://nova.arbitrum.io/rpc",blockExplorer:"https://nova.arbiscan.io",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:42766,name:"ZKFair",currency:"USDC",rpc1:"https://rpc.zkfair.io",rpc2:"https://rpc.zkfair.io",blockExplorer:"https://scan.zkfair.io",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:81457,name:"Blast",currency:"ETH",rpc1:"https://rpc.blast.io",rpc2:"https://rpc.ankr.com/blast",blockExplorer:"https://blastscan.io",resolver:"0x0F081cad5BCed7B2acA1c1D22CdafcB21322B280"},{chainId:534352,name:"Scroll",currency:"ETH",rpc1:"https://rpc.scroll.io",rpc2:"https://1rpc.io/scroll",blockExplorer:"https://scrollscan.com",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:666666666,name:"Degen",currency:"DEGEN",rpc1:"https://rpc.degen.tips",rpc2:"https://rpc.degen.tips",blockExplorer:"https://explorer.degen.tips",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"}];var o4={},_0={},au={exports:{}};(function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)})(au);var mv={},gv={},bv={exports:{}};function IC(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vd={exports:{}},lt={},Oa={exports:{}},ut={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=He,n=r.Buffer;function s(u,v){for(var b in u)v[b]=u[b]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=i);function i(u,v,b){return n(u,v,b)}i.prototype=Object.create(n.prototype),s(n,i),i.from=function(u,v,b){if(typeof u=="number")throw new TypeError("Argument must not be a number");return n(u,v,b)},i.alloc=function(u,v,b){if(typeof u!="number")throw new TypeError("Argument must be a number");var m=n(u);return v!==void 0?typeof b=="string"?m.fill(v,b):m.fill(v):m.fill(0),m},i.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return n(u)},i.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(u)}})(ut,ut.exports);var md=65536,DC=4294967295;function OC(){throw new Error(`Secure random number generation is not supported by this browser. -Use Chrome, Firefox or Internet Explorer 11`)}var FC=ut.exports.Buffer,hl=ue.crypto||ue.msCrypto;hl&&hl.getRandomValues?Oa.exports=LC:Oa.exports=OC;function LC(t,e){if(t>DC)throw new RangeError("requested too many random bytes");var r=FC.allocUnsafe(t);if(t>0)if(t>md)for(var n=0;n0&&(u=r[0]),u instanceof Error)throw u;var v=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw v.context=u,v}var b=i[e];if(b===void 0)return!1;if(typeof b=="function")X2(b,this,r);else for(var m=b.length,g=h4(b,m),n=0;n0&&u.length>s&&!u.warned){u.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=t,v.type=e,v.count=u.length,UC(v)}return t}Vt.prototype.addListener=function(e,r){return c4(this,e,r,!1)};Vt.prototype.on=Vt.prototype.addListener;Vt.prototype.prependListener=function(e,r){return c4(this,e,r,!0)};function KC(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l4(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},s=KC.bind(n);return s.listener=r,n.wrapFn=s,s}Vt.prototype.once=function(e,r){return ou(r),this.on(e,l4(this,e,r)),this};Vt.prototype.prependOnceListener=function(e,r){return ou(r),this.prependListener(e,l4(this,e,r)),this};Vt.prototype.removeListener=function(e,r){var n,s,i,u,v;if(ou(r),s=this._events,s===void 0)return this;if(n=s[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(i=-1,u=n.length-1;u>=0;u--)if(n[u]===r||n[u].listener===r){v=n[u].listener,i=u;break}if(i<0)return this;i===0?n.shift():$C(n,i),n.length===1&&(s[e]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",e,v||r)}return this};Vt.prototype.off=Vt.prototype.removeListener;Vt.prototype.removeAllListeners=function(e){var r,n,s;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),u;for(s=0;s=0;s--)this.removeListener(e,r[s]);return this};function u4(t,e,r){var n=t._events;if(n===void 0)return[];var s=n[e];return s===void 0?[]:typeof s=="function"?r?[s.listener||s]:[s]:r?qC(s):h4(s,s.length)}Vt.prototype.listeners=function(e){return u4(this,e,!0)};Vt.prototype.rawListeners=function(e){return u4(this,e,!1)};Vt.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):d4.call(t,e)};Vt.prototype.listenerCount=d4;function d4(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Vt.prototype.eventNames=function(){return this._eventsCount>0?Lc(this._events):[]};function h4(t,e){for(var r=new Array(e),n=0;n"u"?_t:Aa(Uint8Array),Es={"%AggregateError%":typeof AggregateError>"u"?_t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_t:ArrayBuffer,"%ArrayIteratorPrototype%":Wo?Aa([][Symbol.iterator]()):_t,"%AsyncFromSyncIteratorPrototype%":_t,"%AsyncFunction%":as,"%AsyncGenerator%":as,"%AsyncGeneratorFunction%":as,"%AsyncIteratorPrototype%":as,"%Atomics%":typeof Atomics>"u"?_t:Atomics,"%BigInt%":typeof BigInt>"u"?_t:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?_t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_t:FinalizationRegistry,"%Function%":b4,"%GeneratorFunction%":as,"%Int8Array%":typeof Int8Array>"u"?_t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Wo?Aa(Aa([][Symbol.iterator]())):_t,"%JSON%":typeof JSON=="object"?JSON:_t,"%Map%":typeof Map>"u"?_t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Wo?_t:Aa(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_t:Promise,"%Proxy%":typeof Proxy>"u"?_t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?_t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Wo?_t:Aa(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Wo?Aa(""[Symbol.iterator]()):_t,"%Symbol%":Wo?Symbol:_t,"%SyntaxError%":Os,"%ThrowTypeError%":XC,"%TypedArray%":YC,"%TypeError%":As,"%Uint8Array%":typeof Uint8Array>"u"?_t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_t:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?_t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_t:WeakSet},QC=function t(e){var r;if(e==="%AsyncFunction%")r=yd("async function () {}");else if(e==="%GeneratorFunction%")r=yd("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=yd("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=t("%AsyncGenerator%");s&&(r=Aa(s.prototype))}return Es[e]=r,r},rg={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A0=xv(),vl=JC,eB=A0.call(Function.call,Array.prototype.concat),tB=A0.call(Function.apply,Array.prototype.splice),ng=A0.call(Function.call,String.prototype.replace),ml=A0.call(Function.call,String.prototype.slice),rB=A0.call(Function.call,RegExp.prototype.exec),nB=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,iB=/\\(\\)?/g,aB=function(e){var r=ml(e,0,1),n=ml(e,-1);if(r==="%"&&n!=="%")throw new Os("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Os("invalid intrinsic syntax, expected opening `%`");var s=[];return ng(e,nB,function(i,u,v,b){s[s.length]=v?ng(b,iB,"$1"):u||i}),s},oB=function(e,r){var n=e,s;if(vl(rg,n)&&(s=rg[n],n="%"+s[0]+"%"),vl(Es,n)){var i=Es[n];if(i===as&&(i=QC(n)),typeof i>"u"&&!r)throw new As("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:i}}throw new Os("intrinsic "+e+" does not exist!")},wv=function(e,r){if(typeof e!="string"||e.length===0)throw new As("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new As('"allowMissing" argument must be a boolean');if(rB(/^%?[^%]*%?$/,e)===null)throw new Os("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=aB(e),s=n.length>0?n[0]:"",i=oB("%"+s+"%",r),u=i.name,v=i.value,b=!1,m=i.alias;m&&(s=m[0],tB(n,eB([0,1],m)));for(var g=1,_=!0;g=n.length){var B=xo(v,A);_=!!B,_&&"get"in B&&!("originalValue"in B.get)?v=B.get:v=v[A]}else _=vl(v,A),v=v[A];_&&!b&&(Es[u]=v)}}return v},wd={exports:{}},ig;function sB(){return ig||(ig=1,function(t){var e=xv(),r=wv,n=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||e.call(s,n),u=r("%Object.getOwnPropertyDescriptor%",!0),v=r("%Object.defineProperty%",!0),b=r("%Math.max%");if(v)try{v({},"a",{value:1})}catch{v=null}t.exports=function(_){var A=i(e,s,arguments);if(u&&v){var E=u(A,"length");E.configurable&&v(A,"length",{value:1+b(0,_.length-(arguments.length-1))})}return A};var m=function(){return i(e,n,arguments)};v?v(t.exports,"apply",{value:m}):t.exports.apply=m}(wd)),wd.exports}var y4=wv,x4=sB(),fB=x4(y4("String.prototype.indexOf")),_v=function(e,r){var n=y4(e,!!r);return typeof n=="function"&&fB(e,".prototype.")>-1?x4(n):n},cB=su(),lB=_v,zp=lB("Object.prototype.toString"),fu=function(e){return cB&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:zp(e)==="[object Arguments]"},w4=function(e){return fu(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&zp(e)!=="[object Array]"&&zp(e.callee)==="[object Function]"},uB=function(){return fu(arguments)}();fu.isLegacyArguments=w4;var dB=uB?fu:w4,hB=Object.prototype.toString,pB=Function.prototype.toString,vB=/^\s*(?:function)?\*/,_4=su(),_d=Object.getPrototypeOf,mB=function(){if(!_4)return!1;try{return Function("return function*() {}")()}catch{}},Md,gB=function(e){if(typeof e!="function")return!1;if(vB.test(pB.call(e)))return!0;if(!_4){var r=hB.call(e);return r==="[object GeneratorFunction]"}if(!_d)return!1;if(typeof Md>"u"){var n=mB();Md=n?_d(n):!1}return _d(e)===Md},M4=Function.prototype.toString,us=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,jp,Uc;if(typeof us=="function"&&typeof Object.defineProperty=="function")try{jp=Object.defineProperty({},"length",{get:function(){throw Uc}}),Uc={},us(function(){throw 42},null,jp)}catch(t){t!==Uc&&(us=null)}else us=null;var bB=/^\s*class\b/,Gp=function(e){try{var r=M4.call(e);return bB.test(r)}catch{return!1}},Ad=function(e){try{return Gp(e)?!1:(M4.call(e),!0)}catch{return!1}},Kc=Object.prototype.toString,yB="[object Object]",xB="[object Function]",wB="[object GeneratorFunction]",_B="[object HTMLAllCollection]",MB="[object HTML document.all class]",AB="[object HTMLCollection]",EB=typeof Symbol=="function"&&!!Symbol.toStringTag,SB=!(0 in[,]),Vp=function(){return!1};if(typeof document=="object"){var RB=document.all;Kc.call(RB)===Kc.call(document.all)&&(Vp=function(e){if((SB||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=Kc.call(e);return(r===_B||r===MB||r===AB||r===yB)&&e("")==null}catch{}return!1})}var CB=us?function(e){if(Vp(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{us(e,null,jp)}catch(r){if(r!==Uc)return!1}return!Gp(e)&&Ad(e)}:function(e){if(Vp(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(EB)return Ad(e);if(Gp(e))return!1;var r=Kc.call(e);return r!==xB&&r!==wB&&!/^\[object HTML/.test(r)?!1:Ad(e)},BB=CB,NB=Object.prototype.toString,A4=Object.prototype.hasOwnProperty,TB=function(e,r,n){for(var s=0,i=e.length;s=3&&(s=n),NB.call(e)==="[object Array]"?TB(e,r,s):typeof e=="string"?kB(e,r,s):PB(e,r,s)},E4=IB,Ed=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],DB=typeof globalThis>"u"?ue:globalThis,S4=function(){for(var e=[],r=0;r"u"?ue:globalThis,N4=FB(),KB=Mv("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n-1}return qc?qB(e):!1},P4=E4,HB=S4,I4=_v,Rd=R4,zB=I4("Object.prototype.toString"),D4=su(),ag=typeof globalThis>"u"?ue:globalThis,jB=HB(),GB=I4("String.prototype.slice"),O4={},Cd=Object.getPrototypeOf;D4&&Rd&&Cd&&P4(jB,function(t){if(typeof ag[t]=="function"){var e=new ag[t];if(Symbol.toStringTag in e){var r=Cd(e),n=Rd(r,Symbol.toStringTag);if(!n){var s=Cd(r);n=Rd(s,Symbol.toStringTag)}O4[t]=n.get}}});var VB=function(e){var r=!1;return P4(O4,function(n,s){if(!r)try{var i=n.call(e);i===s&&(r=i)}catch{}}),r},WB=k4,ZB=function(e){return WB(e)?!D4||!(Symbol.toStringTag in e)?GB(zB(e),8,-1):VB(e):!1};(function(t){var e=dB,r=gB,n=ZB,s=k4;function i(L){return L.call.bind(L)}var u=typeof BigInt<"u",v=typeof Symbol<"u",b=i(Object.prototype.toString),m=i(Number.prototype.valueOf),g=i(String.prototype.valueOf),_=i(Boolean.prototype.valueOf);if(u)var A=i(BigInt.prototype.valueOf);if(v)var E=i(Symbol.prototype.valueOf);function R(L,te){if(typeof L!="object")return!1;try{return te(L),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=s;function B(L){return typeof Promise<"u"&&L instanceof Promise||L!==null&&typeof L=="object"&&typeof L.then=="function"&&typeof L.catch=="function"}t.isPromise=B;function T(L){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(L):s(L)||C(L)}t.isArrayBufferView=T;function F(L){return n(L)==="Uint8Array"}t.isUint8Array=F;function O(L){return n(L)==="Uint8ClampedArray"}t.isUint8ClampedArray=O;function q(L){return n(L)==="Uint16Array"}t.isUint16Array=q;function H(L){return n(L)==="Uint32Array"}t.isUint32Array=H;function G(L){return n(L)==="Int8Array"}t.isInt8Array=G;function re(L){return n(L)==="Int16Array"}t.isInt16Array=re;function ne(L){return n(L)==="Int32Array"}t.isInt32Array=ne;function Y(L){return n(L)==="Float32Array"}t.isFloat32Array=Y;function W(L){return n(L)==="Float64Array"}t.isFloat64Array=W;function se(L){return n(L)==="BigInt64Array"}t.isBigInt64Array=se;function y(L){return n(L)==="BigUint64Array"}t.isBigUint64Array=y;function a(L){return b(L)==="[object Map]"}a.working=typeof Map<"u"&&a(new Map);function f(L){return typeof Map>"u"?!1:a.working?a(L):L instanceof Map}t.isMap=f;function c(L){return b(L)==="[object Set]"}c.working=typeof Set<"u"&&c(new Set);function l(L){return typeof Set>"u"?!1:c.working?c(L):L instanceof Set}t.isSet=l;function h(L){return b(L)==="[object WeakMap]"}h.working=typeof WeakMap<"u"&&h(new WeakMap);function x(L){return typeof WeakMap>"u"?!1:h.working?h(L):L instanceof WeakMap}t.isWeakMap=x;function w(L){return b(L)==="[object WeakSet]"}w.working=typeof WeakSet<"u"&&w(new WeakSet);function p(L){return w(L)}t.isWeakSet=p;function o(L){return b(L)==="[object ArrayBuffer]"}o.working=typeof ArrayBuffer<"u"&&o(new ArrayBuffer);function d(L){return typeof ArrayBuffer>"u"?!1:o.working?o(L):L instanceof ArrayBuffer}t.isArrayBuffer=d;function M(L){return b(L)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function C(L){return typeof DataView>"u"?!1:M.working?M(L):L instanceof DataView}t.isDataView=C;var P=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function S(L){return b(L)==="[object SharedArrayBuffer]"}function I(L){return typeof P>"u"?!1:(typeof S.working>"u"&&(S.working=S(new P)),S.working?S(L):L instanceof P)}t.isSharedArrayBuffer=I;function U(L){return b(L)==="[object AsyncFunction]"}t.isAsyncFunction=U;function V(L){return b(L)==="[object Map Iterator]"}t.isMapIterator=V;function z(L){return b(L)==="[object Set Iterator]"}t.isSetIterator=z;function X(L){return b(L)==="[object Generator]"}t.isGeneratorObject=X;function j(L){return b(L)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=j;function N(L){return R(L,m)}t.isNumberObject=N;function $(L){return R(L,g)}t.isStringObject=$;function ee(L){return R(L,_)}t.isBooleanObject=ee;function J(L){return u&&R(L,A)}t.isBigIntObject=J;function K(L){return v&&R(L,E)}t.isSymbolObject=K;function D(L){return N(L)||$(L)||ee(L)||J(L)||K(L)}t.isBoxedPrimitive=D;function k(L){return typeof Uint8Array<"u"&&(d(L)||I(L))}t.isAnyArrayBuffer=k,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(L){Object.defineProperty(t,L,{enumerable:!1,value:function(){throw new Error(L+" is not supported in userland")}})})})(m4);var JB=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"};(function(t){var e=Object.getOwnPropertyDescriptors||function(C){for(var P=Object.keys(C),S={},I=0;I=I)return z;switch(z){case"%s":return String(S[P++]);case"%d":return Number(S[P++]);case"%j":try{return JSON.stringify(S[P++])}catch{return"[Circular]"}default:return z}}),V=S[P];P"u")return function(){return t.deprecate(M,C).apply(this,arguments)};var P=!1;function S(){if(!P){if(Je.exports.throwDeprecation)throw new Error(C);Je.exports.traceDeprecation?console.trace(C):console.error(C),P=!0}return M.apply(this,arguments)}return S};var n={},s=/^$/;if(Je.exports.env.NODE_DEBUG){var i=Je.exports.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+i+"$","i")}t.debuglog=function(M){if(M=M.toUpperCase(),!n[M])if(s.test(M)){var C=Je.exports.pid;n[M]=function(){var P=t.format.apply(t,arguments);console.error("%s %d: %s",M,C,P)}}else n[M]=function(){};return n[M]};function u(M,C){var P={seen:[],stylize:b};return arguments.length>=3&&(P.depth=arguments[2]),arguments.length>=4&&(P.colors=arguments[3]),F(C)?P.showHidden=C:C&&t._extend(P,C),ne(P.showHidden)&&(P.showHidden=!1),ne(P.depth)&&(P.depth=2),ne(P.colors)&&(P.colors=!1),ne(P.customInspect)&&(P.customInspect=!0),P.colors&&(P.stylize=v),g(P,M,P.depth)}t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function v(M,C){var P=u.styles[C];return P?"\x1B["+u.colors[P][0]+"m"+M+"\x1B["+u.colors[P][1]+"m":M}function b(M,C){return M}function m(M){var C={};return M.forEach(function(P,S){C[P]=!0}),C}function g(M,C,P){if(M.customInspect&&C&&a(C.inspect)&&C.inspect!==t.inspect&&!(C.constructor&&C.constructor.prototype===C)){var S=C.inspect(P,M);return G(S)||(S=g(M,S,P)),S}var I=_(M,C);if(I)return I;var U=Object.keys(C),V=m(U);if(M.showHidden&&(U=Object.getOwnPropertyNames(C)),y(C)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return A(C);if(U.length===0){if(a(C)){var z=C.name?": "+C.name:"";return M.stylize("[Function"+z+"]","special")}if(Y(C))return M.stylize(RegExp.prototype.toString.call(C),"regexp");if(se(C))return M.stylize(Date.prototype.toString.call(C),"date");if(y(C))return A(C)}var X="",j=!1,N=["{","}"];if(T(C)&&(j=!0,N=["[","]"]),a(C)){var $=C.name?": "+C.name:"";X=" [Function"+$+"]"}if(Y(C)&&(X=" "+RegExp.prototype.toString.call(C)),se(C)&&(X=" "+Date.prototype.toUTCString.call(C)),y(C)&&(X=" "+A(C)),U.length===0&&(!j||C.length==0))return N[0]+X+N[1];if(P<0)return Y(C)?M.stylize(RegExp.prototype.toString.call(C),"regexp"):M.stylize("[Object]","special");M.seen.push(C);var ee;return j?ee=E(M,C,P,V,U):ee=U.map(function(J){return R(M,C,P,V,J,j)}),M.seen.pop(),B(ee,X,N)}function _(M,C){if(ne(C))return M.stylize("undefined","undefined");if(G(C)){var P="'"+JSON.stringify(C).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(P,"string")}if(H(C))return M.stylize(""+C,"number");if(F(C))return M.stylize(""+C,"boolean");if(O(C))return M.stylize("null","null")}function A(M){return"["+Error.prototype.toString.call(M)+"]"}function E(M,C,P,S,I){for(var U=[],V=0,z=C.length;Vm.chainId==v).blockExplorer}function e(v){let b=Xa.find(m=>m.chainId==v);return b?b.name.toUpperCase():"Unsupported Network".toUpperCase()}function r(v){let m=[Xa.find(g=>g.chainId==v).rpc1];if(m){const g=m.map(_=>new Wx(_));return new wR(g,1)}else return null}function n(v){return Xa.find(m=>m.chainId==v).resolver}function s(){return Xa.map(b=>b.resolver)}function i(){return Xa.map(b=>b.name.toUpperCase())}async function u(v,b){let m=Xa.find(_=>_.name.toUpperCase()==b),g=m.chainId;try{await v.request({method:"wallet_switchEthereumChain",params:[{chainId:Bs(g)}]})}catch(_){_.code===4902&&await v.request({method:"wallet_addEthereumChain",params:[{chainId:Bs(g),chainName:b,nativeCurrency:{name:m.currency,symbol:m.currency,decimals:18},rpcUrls:[m.rpc2],blockExplorerUrls:[m.blockExplorer]}]})}}return{getBlockExplorerBaseUrl:t,getChainName:e,getFallbackProvider:r,getResolver:n,getResolversList:s,getSupportedChains:i,switchOrAddChain:u}}const Xa=[{chainId:666666666,name:"Degen",currency:"DEGEN",rpc1:"https://rpc.degen.tips",rpc2:"https://rpc.degen.tips",blockExplorer:"https://explorer.degen.tips",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:1,name:"Ethereum",currency:"ETH",rpc1:"https://rpc.ankr.com/eth",rpc2:"https://1rpc.io/eth",blockExplorer:"https://etherscan.io",resolver:"0x985ecBD12566dD8BC05F4Df96729Ee84dE67F519"},{chainId:10,name:"Optimism",currency:"ETH",rpc1:"https://optimism-mainnet.public.blastapi.io",rpc2:"https://rpc.ankr.com/optimism",blockExplorer:"https://optimistic.etherscan.io",resolver:"0xF20fc12a4955c9d47194B8fEd591Fe01777D2b06"},{chainId:14,name:"Flare",currency:"FLR",rpc1:"https://flare-api.flare.network/ext/C/rpc",rpc2:"https://flare-api.flare.network/ext/C/rpc",blockExplorer:"https://flare-explorer.flare.network",resolver:"0x2919f0bE09549814ADF72fb0387D1981699fc6D4"},{chainId:16,name:"Coston Testnet",currency:"CFLR",rpc1:"https://coston-api.flare.network/ext/C/rpc",rpc2:"https://coston-api.flare.network/ext/C/rpc",blockExplorer:"https://coston-explorer.flare.network",resolver:""},{chainId:19,name:"Songbird",currency:"SGB",rpc1:"https://songbird-api.flare.network/ext/C/rpc",rpc2:"https://sgb.ftso.com.au/ext/bc/C/rpc",blockExplorer:"https://songbird-explorer.flare.network",resolver:"0x7e8aB50697C7Abe63Bdab6B155C2FB8D285458cB"},{chainId:56,name:"BNB Smart Chain",currency:"BNB",rpc1:"https://rpc.ankr.com/bsc",rpc2:"https://bsc-dataseed.binance.org",blockExplorer:"https://bscscan.com",resolver:"0x4aBf8b364ac4aF048Ea077AAA2EDF3e1e1EC0f9c"},{chainId:100,name:"Gnosis Chain",currency:"XDAI",rpc1:"https://rpc.ankr.com/gnosis",rpc2:"https://rpc.ankr.com/gnosis",blockExplorer:"https://gnosisscan.io",resolver:"0x4Ef2f5fE2211125b3cadca7FeaE4534D02C29e17"},{chainId:137,name:"Polygon",currency:"MATIC",rpc1:"https://rpc.ankr.com/polygon",rpc2:"https://rpc.ankr.com/polygon",blockExplorer:"https://polygonscan.com",resolver:"0x07884566cdED43eDaec7813C1523624202b060D3"},{chainId:250,name:"Fantom",currency:"FTM",rpc1:"https://rpc.ankr.com/fantom",rpc2:"https://rpc.ankr.com/fantom",blockExplorer:"https://ftmscan.com",resolver:"0xa97c7AF10ee564EBf452A9347bB9653454Ba69C0"},{chainId:8453,name:"Base",currency:"ETH",rpc1:"https://mainnet.base.org",rpc2:"https://mainnet.base.org",blockExplorer:"https://basescan.org",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:34443,name:"Mode",currency:"ETH",rpc1:"https://mainnet.mode.network",rpc2:"https://1rpc.io/mode",blockExplorer:"https://explorer.mode.network",resolver:"0x4aBf8b364ac4aF048Ea077AAA2EDF3e1e1EC0f9c"},{chainId:42161,name:"Arbitrum",currency:"ETH",rpc1:"https://rpc.ankr.com/arbitrum",rpc2:"https://rpc.ankr.com/arbitrum",blockExplorer:"https://arbiscan.io",resolver:"0xd64A2DF9d73CD1Cb50139A3eC3176070e00C67cA"},{chainId:42170,name:"Arbitrum Nova",currency:"ETH",rpc1:"https://arbitrum-nova.public.blastapi.io",rpc2:"https://nova.arbitrum.io/rpc",blockExplorer:"https://nova.arbiscan.io",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:42766,name:"ZKFair",currency:"USDC",rpc1:"https://rpc.zkfair.io",rpc2:"https://rpc.zkfair.io",blockExplorer:"https://scan.zkfair.io",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"},{chainId:81457,name:"Blast",currency:"ETH",rpc1:"https://rpc.blast.io",rpc2:"https://rpc.ankr.com/blast",blockExplorer:"https://blastscan.io",resolver:"0x0F081cad5BCed7B2acA1c1D22CdafcB21322B280"},{chainId:534352,name:"Scroll",currency:"ETH",rpc1:"https://rpc.scroll.io",rpc2:"https://1rpc.io/scroll",blockExplorer:"https://scrollscan.com",resolver:"0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a"}];var o4={},_0={},iu={exports:{}};(function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)})(iu);var mv={},gv={},bv={exports:{}};function IC(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pd={exports:{}},lt={},Oa={exports:{}},ut={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=He,n=r.Buffer;function s(u,v){for(var b in u)v[b]=u[b]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=i);function i(u,v,b){return n(u,v,b)}i.prototype=Object.create(n.prototype),s(n,i),i.from=function(u,v,b){if(typeof u=="number")throw new TypeError("Argument must not be a number");return n(u,v,b)},i.alloc=function(u,v,b){if(typeof u!="number")throw new TypeError("Argument must be a number");var m=n(u);return v!==void 0?typeof b=="string"?m.fill(v,b):m.fill(v):m.fill(0),m},i.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return n(u)},i.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(u)}})(ut,ut.exports);var vd=65536,DC=4294967295;function OC(){throw new Error(`Secure random number generation is not supported by this browser. +Use Chrome, Firefox or Internet Explorer 11`)}var FC=ut.exports.Buffer,dl=ue.crypto||ue.msCrypto;dl&&dl.getRandomValues?Oa.exports=LC:Oa.exports=OC;function LC(t,e){if(t>DC)throw new RangeError("requested too many random bytes");var r=FC.allocUnsafe(t);if(t>0)if(t>vd)for(var n=0;n0&&(u=r[0]),u instanceof Error)throw u;var v=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw v.context=u,v}var b=i[e];if(b===void 0)return!1;if(typeof b=="function")X2(b,this,r);else for(var m=b.length,g=h4(b,m),n=0;n0&&u.length>s&&!u.warned){u.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=t,v.type=e,v.count=u.length,UC(v)}return t}Vt.prototype.addListener=function(e,r){return c4(this,e,r,!1)};Vt.prototype.on=Vt.prototype.addListener;Vt.prototype.prependListener=function(e,r){return c4(this,e,r,!0)};function KC(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l4(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},s=KC.bind(n);return s.listener=r,n.wrapFn=s,s}Vt.prototype.once=function(e,r){return au(r),this.on(e,l4(this,e,r)),this};Vt.prototype.prependOnceListener=function(e,r){return au(r),this.prependListener(e,l4(this,e,r)),this};Vt.prototype.removeListener=function(e,r){var n,s,i,u,v;if(au(r),s=this._events,s===void 0)return this;if(n=s[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(i=-1,u=n.length-1;u>=0;u--)if(n[u]===r||n[u].listener===r){v=n[u].listener,i=u;break}if(i<0)return this;i===0?n.shift():$C(n,i),n.length===1&&(s[e]=n[0]),s.removeListener!==void 0&&this.emit("removeListener",e,v||r)}return this};Vt.prototype.off=Vt.prototype.removeListener;Vt.prototype.removeAllListeners=function(e){var r,n,s;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),u;for(s=0;s=0;s--)this.removeListener(e,r[s]);return this};function u4(t,e,r){var n=t._events;if(n===void 0)return[];var s=n[e];return s===void 0?[]:typeof s=="function"?r?[s.listener||s]:[s]:r?qC(s):h4(s,s.length)}Vt.prototype.listeners=function(e){return u4(this,e,!0)};Vt.prototype.rawListeners=function(e){return u4(this,e,!1)};Vt.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):d4.call(t,e)};Vt.prototype.listenerCount=d4;function d4(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Vt.prototype.eventNames=function(){return this._eventsCount>0?Fc(this._events):[]};function h4(t,e){for(var r=new Array(e),n=0;n"u"?_t:Aa(Uint8Array),Es={"%AggregateError%":typeof AggregateError>"u"?_t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_t:ArrayBuffer,"%ArrayIteratorPrototype%":Wo?Aa([][Symbol.iterator]()):_t,"%AsyncFromSyncIteratorPrototype%":_t,"%AsyncFunction%":as,"%AsyncGenerator%":as,"%AsyncGeneratorFunction%":as,"%AsyncIteratorPrototype%":as,"%Atomics%":typeof Atomics>"u"?_t:Atomics,"%BigInt%":typeof BigInt>"u"?_t:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?_t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_t:FinalizationRegistry,"%Function%":b4,"%GeneratorFunction%":as,"%Int8Array%":typeof Int8Array>"u"?_t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Wo?Aa(Aa([][Symbol.iterator]())):_t,"%JSON%":typeof JSON=="object"?JSON:_t,"%Map%":typeof Map>"u"?_t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Wo?_t:Aa(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_t:Promise,"%Proxy%":typeof Proxy>"u"?_t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?_t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Wo?_t:Aa(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Wo?Aa(""[Symbol.iterator]()):_t,"%Symbol%":Wo?Symbol:_t,"%SyntaxError%":Os,"%ThrowTypeError%":XC,"%TypedArray%":YC,"%TypeError%":As,"%Uint8Array%":typeof Uint8Array>"u"?_t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_t:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?_t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_t:WeakSet},QC=function t(e){var r;if(e==="%AsyncFunction%")r=bd("async function () {}");else if(e==="%GeneratorFunction%")r=bd("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=bd("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=t("%AsyncGenerator%");s&&(r=Aa(s.prototype))}return Es[e]=r,r},rg={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A0=xv(),pl=JC,eB=A0.call(Function.call,Array.prototype.concat),tB=A0.call(Function.apply,Array.prototype.splice),ng=A0.call(Function.call,String.prototype.replace),vl=A0.call(Function.call,String.prototype.slice),rB=A0.call(Function.call,RegExp.prototype.exec),nB=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,iB=/\\(\\)?/g,aB=function(e){var r=vl(e,0,1),n=vl(e,-1);if(r==="%"&&n!=="%")throw new Os("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Os("invalid intrinsic syntax, expected opening `%`");var s=[];return ng(e,nB,function(i,u,v,b){s[s.length]=v?ng(b,iB,"$1"):u||i}),s},oB=function(e,r){var n=e,s;if(pl(rg,n)&&(s=rg[n],n="%"+s[0]+"%"),pl(Es,n)){var i=Es[n];if(i===as&&(i=QC(n)),typeof i>"u"&&!r)throw new As("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:i}}throw new Os("intrinsic "+e+" does not exist!")},wv=function(e,r){if(typeof e!="string"||e.length===0)throw new As("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new As('"allowMissing" argument must be a boolean');if(rB(/^%?[^%]*%?$/,e)===null)throw new Os("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=aB(e),s=n.length>0?n[0]:"",i=oB("%"+s+"%",r),u=i.name,v=i.value,b=!1,m=i.alias;m&&(s=m[0],tB(n,eB([0,1],m)));for(var g=1,_=!0;g=n.length){var B=wo(v,A);_=!!B,_&&"get"in B&&!("originalValue"in B.get)?v=B.get:v=v[A]}else _=pl(v,A),v=v[A];_&&!b&&(Es[u]=v)}}return v},xd={exports:{}},ig;function sB(){return ig||(ig=1,function(t){var e=xv(),r=wv,n=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||e.call(s,n),u=r("%Object.getOwnPropertyDescriptor%",!0),v=r("%Object.defineProperty%",!0),b=r("%Math.max%");if(v)try{v({},"a",{value:1})}catch{v=null}t.exports=function(_){var A=i(e,s,arguments);if(u&&v){var E=u(A,"length");E.configurable&&v(A,"length",{value:1+b(0,_.length-(arguments.length-1))})}return A};var m=function(){return i(e,n,arguments)};v?v(t.exports,"apply",{value:m}):t.exports.apply=m}(xd)),xd.exports}var y4=wv,x4=sB(),fB=x4(y4("String.prototype.indexOf")),_v=function(e,r){var n=y4(e,!!r);return typeof n=="function"&&fB(e,".prototype.")>-1?x4(n):n},cB=ou(),lB=_v,zp=lB("Object.prototype.toString"),su=function(e){return cB&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:zp(e)==="[object Arguments]"},w4=function(e){return su(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&zp(e)!=="[object Array]"&&zp(e.callee)==="[object Function]"},uB=function(){return su(arguments)}();su.isLegacyArguments=w4;var dB=uB?su:w4,hB=Object.prototype.toString,pB=Function.prototype.toString,vB=/^\s*(?:function)?\*/,_4=ou(),wd=Object.getPrototypeOf,mB=function(){if(!_4)return!1;try{return Function("return function*() {}")()}catch{}},_d,gB=function(e){if(typeof e!="function")return!1;if(vB.test(pB.call(e)))return!0;if(!_4){var r=hB.call(e);return r==="[object GeneratorFunction]"}if(!wd)return!1;if(typeof _d>"u"){var n=mB();_d=n?wd(n):!1}return wd(e)===_d},M4=Function.prototype.toString,us=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,jp,Lc;if(typeof us=="function"&&typeof Object.defineProperty=="function")try{jp=Object.defineProperty({},"length",{get:function(){throw Lc}}),Lc={},us(function(){throw 42},null,jp)}catch(t){t!==Lc&&(us=null)}else us=null;var bB=/^\s*class\b/,Gp=function(e){try{var r=M4.call(e);return bB.test(r)}catch{return!1}},Md=function(e){try{return Gp(e)?!1:(M4.call(e),!0)}catch{return!1}},Uc=Object.prototype.toString,yB="[object Object]",xB="[object Function]",wB="[object GeneratorFunction]",_B="[object HTMLAllCollection]",MB="[object HTML document.all class]",AB="[object HTMLCollection]",EB=typeof Symbol=="function"&&!!Symbol.toStringTag,SB=!(0 in[,]),Vp=function(){return!1};if(typeof document=="object"){var RB=document.all;Uc.call(RB)===Uc.call(document.all)&&(Vp=function(e){if((SB||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=Uc.call(e);return(r===_B||r===MB||r===AB||r===yB)&&e("")==null}catch{}return!1})}var CB=us?function(e){if(Vp(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{us(e,null,jp)}catch(r){if(r!==Lc)return!1}return!Gp(e)&&Md(e)}:function(e){if(Vp(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(EB)return Md(e);if(Gp(e))return!1;var r=Uc.call(e);return r!==xB&&r!==wB&&!/^\[object HTML/.test(r)?!1:Md(e)},BB=CB,NB=Object.prototype.toString,A4=Object.prototype.hasOwnProperty,TB=function(e,r,n){for(var s=0,i=e.length;s=3&&(s=n),NB.call(e)==="[object Array]"?TB(e,r,s):typeof e=="string"?kB(e,r,s):PB(e,r,s)},E4=IB,Ad=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],DB=typeof globalThis>"u"?ue:globalThis,S4=function(){for(var e=[],r=0;r"u"?ue:globalThis,N4=FB(),KB=Mv("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n-1}return $c?qB(e):!1},P4=E4,HB=S4,I4=_v,Sd=R4,zB=I4("Object.prototype.toString"),D4=ou(),ag=typeof globalThis>"u"?ue:globalThis,jB=HB(),GB=I4("String.prototype.slice"),O4={},Rd=Object.getPrototypeOf;D4&&Sd&&Rd&&P4(jB,function(t){if(typeof ag[t]=="function"){var e=new ag[t];if(Symbol.toStringTag in e){var r=Rd(e),n=Sd(r,Symbol.toStringTag);if(!n){var s=Rd(r);n=Sd(s,Symbol.toStringTag)}O4[t]=n.get}}});var VB=function(e){var r=!1;return P4(O4,function(n,s){if(!r)try{var i=n.call(e);i===s&&(r=i)}catch{}}),r},WB=k4,ZB=function(e){return WB(e)?!D4||!(Symbol.toStringTag in e)?GB(zB(e),8,-1):VB(e):!1};(function(t){var e=dB,r=gB,n=ZB,s=k4;function i(L){return L.call.bind(L)}var u=typeof BigInt<"u",v=typeof Symbol<"u",b=i(Object.prototype.toString),m=i(Number.prototype.valueOf),g=i(String.prototype.valueOf),_=i(Boolean.prototype.valueOf);if(u)var A=i(BigInt.prototype.valueOf);if(v)var E=i(Symbol.prototype.valueOf);function R(L,te){if(typeof L!="object")return!1;try{return te(L),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=s;function B(L){return typeof Promise<"u"&&L instanceof Promise||L!==null&&typeof L=="object"&&typeof L.then=="function"&&typeof L.catch=="function"}t.isPromise=B;function T(L){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(L):s(L)||C(L)}t.isArrayBufferView=T;function F(L){return n(L)==="Uint8Array"}t.isUint8Array=F;function O(L){return n(L)==="Uint8ClampedArray"}t.isUint8ClampedArray=O;function q(L){return n(L)==="Uint16Array"}t.isUint16Array=q;function H(L){return n(L)==="Uint32Array"}t.isUint32Array=H;function G(L){return n(L)==="Int8Array"}t.isInt8Array=G;function re(L){return n(L)==="Int16Array"}t.isInt16Array=re;function ne(L){return n(L)==="Int32Array"}t.isInt32Array=ne;function Y(L){return n(L)==="Float32Array"}t.isFloat32Array=Y;function W(L){return n(L)==="Float64Array"}t.isFloat64Array=W;function se(L){return n(L)==="BigInt64Array"}t.isBigInt64Array=se;function y(L){return n(L)==="BigUint64Array"}t.isBigUint64Array=y;function a(L){return b(L)==="[object Map]"}a.working=typeof Map<"u"&&a(new Map);function f(L){return typeof Map>"u"?!1:a.working?a(L):L instanceof Map}t.isMap=f;function c(L){return b(L)==="[object Set]"}c.working=typeof Set<"u"&&c(new Set);function l(L){return typeof Set>"u"?!1:c.working?c(L):L instanceof Set}t.isSet=l;function h(L){return b(L)==="[object WeakMap]"}h.working=typeof WeakMap<"u"&&h(new WeakMap);function x(L){return typeof WeakMap>"u"?!1:h.working?h(L):L instanceof WeakMap}t.isWeakMap=x;function w(L){return b(L)==="[object WeakSet]"}w.working=typeof WeakSet<"u"&&w(new WeakSet);function p(L){return w(L)}t.isWeakSet=p;function o(L){return b(L)==="[object ArrayBuffer]"}o.working=typeof ArrayBuffer<"u"&&o(new ArrayBuffer);function d(L){return typeof ArrayBuffer>"u"?!1:o.working?o(L):L instanceof ArrayBuffer}t.isArrayBuffer=d;function M(L){return b(L)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function C(L){return typeof DataView>"u"?!1:M.working?M(L):L instanceof DataView}t.isDataView=C;var P=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function S(L){return b(L)==="[object SharedArrayBuffer]"}function I(L){return typeof P>"u"?!1:(typeof S.working>"u"&&(S.working=S(new P)),S.working?S(L):L instanceof P)}t.isSharedArrayBuffer=I;function U(L){return b(L)==="[object AsyncFunction]"}t.isAsyncFunction=U;function V(L){return b(L)==="[object Map Iterator]"}t.isMapIterator=V;function z(L){return b(L)==="[object Set Iterator]"}t.isSetIterator=z;function X(L){return b(L)==="[object Generator]"}t.isGeneratorObject=X;function j(L){return b(L)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=j;function N(L){return R(L,m)}t.isNumberObject=N;function $(L){return R(L,g)}t.isStringObject=$;function ee(L){return R(L,_)}t.isBooleanObject=ee;function J(L){return u&&R(L,A)}t.isBigIntObject=J;function K(L){return v&&R(L,E)}t.isSymbolObject=K;function D(L){return N(L)||$(L)||ee(L)||J(L)||K(L)}t.isBoxedPrimitive=D;function k(L){return typeof Uint8Array<"u"&&(d(L)||I(L))}t.isAnyArrayBuffer=k,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(L){Object.defineProperty(t,L,{enumerable:!1,value:function(){throw new Error(L+" is not supported in userland")}})})})(m4);var JB=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"};(function(t){var e=Object.getOwnPropertyDescriptors||function(C){for(var P=Object.keys(C),S={},I=0;I=I)return z;switch(z){case"%s":return String(S[P++]);case"%d":return Number(S[P++]);case"%j":try{return JSON.stringify(S[P++])}catch{return"[Circular]"}default:return z}}),V=S[P];P"u")return function(){return t.deprecate(M,C).apply(this,arguments)};var P=!1;function S(){if(!P){if(Je.exports.throwDeprecation)throw new Error(C);Je.exports.traceDeprecation?console.trace(C):console.error(C),P=!0}return M.apply(this,arguments)}return S};var n={},s=/^$/;if(Je.exports.env.NODE_DEBUG){var i=Je.exports.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+i+"$","i")}t.debuglog=function(M){if(M=M.toUpperCase(),!n[M])if(s.test(M)){var C=Je.exports.pid;n[M]=function(){var P=t.format.apply(t,arguments);console.error("%s %d: %s",M,C,P)}}else n[M]=function(){};return n[M]};function u(M,C){var P={seen:[],stylize:b};return arguments.length>=3&&(P.depth=arguments[2]),arguments.length>=4&&(P.colors=arguments[3]),F(C)?P.showHidden=C:C&&t._extend(P,C),ne(P.showHidden)&&(P.showHidden=!1),ne(P.depth)&&(P.depth=2),ne(P.colors)&&(P.colors=!1),ne(P.customInspect)&&(P.customInspect=!0),P.colors&&(P.stylize=v),g(P,M,P.depth)}t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function v(M,C){var P=u.styles[C];return P?"\x1B["+u.colors[P][0]+"m"+M+"\x1B["+u.colors[P][1]+"m":M}function b(M,C){return M}function m(M){var C={};return M.forEach(function(P,S){C[P]=!0}),C}function g(M,C,P){if(M.customInspect&&C&&a(C.inspect)&&C.inspect!==t.inspect&&!(C.constructor&&C.constructor.prototype===C)){var S=C.inspect(P,M);return G(S)||(S=g(M,S,P)),S}var I=_(M,C);if(I)return I;var U=Object.keys(C),V=m(U);if(M.showHidden&&(U=Object.getOwnPropertyNames(C)),y(C)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return A(C);if(U.length===0){if(a(C)){var z=C.name?": "+C.name:"";return M.stylize("[Function"+z+"]","special")}if(Y(C))return M.stylize(RegExp.prototype.toString.call(C),"regexp");if(se(C))return M.stylize(Date.prototype.toString.call(C),"date");if(y(C))return A(C)}var X="",j=!1,N=["{","}"];if(T(C)&&(j=!0,N=["[","]"]),a(C)){var $=C.name?": "+C.name:"";X=" [Function"+$+"]"}if(Y(C)&&(X=" "+RegExp.prototype.toString.call(C)),se(C)&&(X=" "+Date.prototype.toUTCString.call(C)),y(C)&&(X=" "+A(C)),U.length===0&&(!j||C.length==0))return N[0]+X+N[1];if(P<0)return Y(C)?M.stylize(RegExp.prototype.toString.call(C),"regexp"):M.stylize("[Object]","special");M.seen.push(C);var ee;return j?ee=E(M,C,P,V,U):ee=U.map(function(J){return R(M,C,P,V,J,j)}),M.seen.pop(),B(ee,X,N)}function _(M,C){if(ne(C))return M.stylize("undefined","undefined");if(G(C)){var P="'"+JSON.stringify(C).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(P,"string")}if(H(C))return M.stylize(""+C,"number");if(F(C))return M.stylize(""+C,"boolean");if(O(C))return M.stylize("null","null")}function A(M){return"["+Error.prototype.toString.call(M)+"]"}function E(M,C,P,S,I){for(var U=[],V=0,z=C.length;V-1&&(U?z=z.split(` `).map(function(j){return" "+j}).join(` `).slice(2):z=` @@ -198,12 +198,12 @@ Use Chrome, Firefox or Internet Explorer 11`)}var FC=ut.exports.Buffer,hl=ue.cry `))):z=M.stylize("[Circular]","special")),ne(V)){if(U&&I.match(/^\d+$/))return z;V=JSON.stringify(""+I),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=M.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=M.stylize(V,"string"))}return V+": "+z}function B(M,C,P){var S=M.reduce(function(I,U){return U.indexOf(` `)>=0,I+U.replace(/\u001b\[\d\d?m/g,"").length+1},0);return S>60?P[0]+(C===""?"":C+` `)+" "+M.join(`, - `)+" "+P[1]:P[0]+C+" "+M.join(", ")+" "+P[1]}t.types=m4;function T(M){return Array.isArray(M)}t.isArray=T;function F(M){return typeof M=="boolean"}t.isBoolean=F;function O(M){return M===null}t.isNull=O;function q(M){return M==null}t.isNullOrUndefined=q;function H(M){return typeof M=="number"}t.isNumber=H;function G(M){return typeof M=="string"}t.isString=G;function re(M){return typeof M=="symbol"}t.isSymbol=re;function ne(M){return M===void 0}t.isUndefined=ne;function Y(M){return W(M)&&c(M)==="[object RegExp]"}t.isRegExp=Y,t.types.isRegExp=Y;function W(M){return typeof M=="object"&&M!==null}t.isObject=W;function se(M){return W(M)&&c(M)==="[object Date]"}t.isDate=se,t.types.isDate=se;function y(M){return W(M)&&(c(M)==="[object Error]"||M instanceof Error)}t.isError=y,t.types.isNativeError=y;function a(M){return typeof M=="function"}t.isFunction=a;function f(M){return M===null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"||typeof M=="symbol"||typeof M>"u"}t.isPrimitive=f,t.isBuffer=JB;function c(M){return Object.prototype.toString.call(M)}function l(M){return M<10?"0"+M.toString(10):M.toString(10)}var h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(){var M=new Date,C=[l(M.getHours()),l(M.getMinutes()),l(M.getSeconds())].join(":");return[M.getDate(),h[M.getMonth()],C].join(" ")}t.log=function(){console.log("%s - %s",x(),t.format.apply(t,arguments))},t.inherits=ct.exports,t._extend=function(M,C){if(!C||!W(C))return M;for(var P=Object.keys(C),S=P.length;S--;)M[P[S]]=C[P[S]];return M};function w(M,C){return Object.prototype.hasOwnProperty.call(M,C)}var p=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(C){if(typeof C!="function")throw new TypeError('The "original" argument must be of type Function');if(p&&C[p]){var P=C[p];if(typeof P!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(P,p,{value:P,enumerable:!1,writable:!1,configurable:!0}),P}function P(){for(var S,I,U=new Promise(function(X,j){S=X,I=j}),V=[],z=0;z0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(R){var B={data:R,next:this.head};this.length===0&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(this.length!==0){var R=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,R}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(R){if(this.length===0)return"";for(var B=this.head,T=""+B.data;B=B.next;)T+=R+B.data;return T}},{key:"concat",value:function(R){if(this.length===0)return v.alloc(0);for(var B=v.allocUnsafe(R>>>0),T=this.head,F=0;T;)_(T.data,B,F),F+=T.data.length,T=T.next;return B}},{key:"consume",value:function(R,B){var T;return RO.length?O.length:R;if(q===O.length?F+=O:F+=O.slice(0,R),R-=q,R===0){q===O.length?(++T,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=O.slice(q));break}++T}return this.length-=T,F}},{key:"_getBuffer",value:function(R){var B=v.allocUnsafe(R),T=this.head,F=1;for(T.data.copy(B),R-=T.data.length;T=T.next;){var O=T.data,q=R>O.length?O.length:R;if(O.copy(B,B.length-R,0,q),R-=q,R===0){q===O.length?(++F,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=O.slice(q));break}++F}return this.length-=F,B}},{key:g,value:function(R,B){return m(this,e({},B,{depth:0,customInspect:!1}))}}]),A}(),Bd}function YB(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return n||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Je.exports.nextTick(Wp,this,t)):Je.exports.nextTick(Wp,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(i){!e&&i?r._writableState?r._writableState.errorEmitted?Je.exports.nextTick(Hc,r):(r._writableState.errorEmitted=!0,Je.exports.nextTick(sg,r,i)):Je.exports.nextTick(sg,r,i):e?(Je.exports.nextTick(Hc,r),e(i)):Je.exports.nextTick(Hc,r)}),this)}function sg(t,e){Wp(t,e),Hc(t)}function Hc(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function QB(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Wp(t,e){t.emit("error",e)}function eN(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var F4={destroy:YB,undestroy:QB,errorOrDestroy:eN},Do={};function tN(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var L4={};function jn(t,e,r){r||(r=Error);function n(i,u,v){return typeof e=="string"?e:e(i,u,v)}var s=function(i){tN(u,i);function u(v,b,m){return i.call(this,n(v,b,m))||this}return u}(r);s.prototype.name=r.name,s.prototype.code=t,L4[t]=s}function fg(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function rN(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function nN(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function iN(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}jn("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);jn("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&rN(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var s;if(nN(t," argument"))s="The ".concat(t," ").concat(n," ").concat(fg(e,"type"));else{var i=iN(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(i," ").concat(n," ").concat(fg(e,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);jn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");jn("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});jn("ERR_STREAM_PREMATURE_CLOSE","Premature close");jn("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});jn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");jn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");jn("ERR_STREAM_WRITE_AFTER_END","write after end");jn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);jn("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);jn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Do.codes=L4;var aN=Do.codes.ERR_INVALID_OPT_VALUE;function oN(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function sN(t,e,r,n){var s=oN(e,n,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var i=n?r:"highWaterMark";throw new aN(i,s)}return Math.floor(s)}return t.objectMode?16:16*1024}var U4={getHighWaterMark:sN},fN=cN;function cN(t,e){if(Nd("noDeprecation"))return t;var r=!1;function n(){if(!r){if(Nd("throwDeprecation"))throw new Error(e);Nd("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function Nd(t){try{if(!ue.localStorage)return!1}catch{return!1}var e=ue.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var Td,cg;function Av(){if(cg)return Td;cg=1,Td=Y;function t(I){var U=this;this.next=null,this.entry=null,this.finish=function(){S(U,I)}}var e;Y.WritableState=re;var r={deprecate:fN},n=v4,s=He.Buffer,i=ue.Uint8Array||function(){};function u(I){return s.from(I)}function v(I){return s.isBuffer(I)||I instanceof i}var b=F4,m=U4,g=m.getHighWaterMark,_=Do.codes,A=_.ERR_INVALID_ARG_TYPE,E=_.ERR_METHOD_NOT_IMPLEMENTED,R=_.ERR_MULTIPLE_CALLBACK,B=_.ERR_STREAM_CANNOT_PIPE,T=_.ERR_STREAM_DESTROYED,F=_.ERR_STREAM_NULL_VALUES,O=_.ERR_STREAM_WRITE_AFTER_END,q=_.ERR_UNKNOWN_ENCODING,H=b.errorOrDestroy;ct.exports(Y,n);function G(){}function re(I,U,V){e=e||Co(),I=I||{},typeof V!="boolean"&&(V=U instanceof e),this.objectMode=!!I.objectMode,V&&(this.objectMode=this.objectMode||!!I.writableObjectMode),this.highWaterMark=g(this,I,"writableHighWaterMark",V),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var z=I.decodeStrings===!1;this.decodeStrings=!z,this.defaultEncoding=I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){h(U,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}re.prototype.getBuffer=function(){for(var U=this.bufferedRequest,V=[];U;)V.push(U),U=U.next;return V},function(){try{Object.defineProperty(re.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(U){return ne.call(this,U)?!0:this!==Y?!1:U&&U._writableState instanceof re}})):ne=function(U){return U instanceof this};function Y(I){e=e||Co();var U=this instanceof e;if(!U&&!ne.call(Y,this))return new Y(I);this._writableState=new re(I,this,U),this.writable=!0,I&&(typeof I.write=="function"&&(this._write=I.write),typeof I.writev=="function"&&(this._writev=I.writev),typeof I.destroy=="function"&&(this._destroy=I.destroy),typeof I.final=="function"&&(this._final=I.final)),n.call(this)}Y.prototype.pipe=function(){H(this,new B)};function W(I,U){var V=new O;H(I,V),Je.exports.nextTick(U,V)}function se(I,U,V,z){var X;return V===null?X=new F:typeof V!="string"&&!U.objectMode&&(X=new A("chunk",["string","Buffer"],V)),X?(H(I,X),Je.exports.nextTick(z,X),!1):!0}Y.prototype.write=function(I,U,V){var z=this._writableState,X=!1,j=!z.objectMode&&v(I);return j&&!s.isBuffer(I)&&(I=u(I)),typeof U=="function"&&(V=U,U=null),j?U="buffer":U||(U=z.defaultEncoding),typeof V!="function"&&(V=G),z.ending?W(this,V):(j||se(this,z,I,V))&&(z.pendingcb++,X=a(this,z,j,I,U,V)),X},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var I=this._writableState;I.corked&&(I.corked--,!I.writing&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&p(this,I))},Y.prototype.setDefaultEncoding=function(U){if(typeof U=="string"&&(U=U.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw new q(U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function y(I,U,V){return!I.objectMode&&I.decodeStrings!==!1&&typeof U=="string"&&(U=s.from(U,V)),U}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(I,U,V,z,X,j){if(!V){var N=y(U,z,X);z!==N&&(V=!0,X="buffer",z=N)}var $=U.objectMode?1:z.length;U.length+=$;var ee=U.length>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function dN(t,e,r){var n=e.length-1;if(n=0?(s>0&&(t.lastNeed=s-1),s):--n=0?(s>0&&(t.lastNeed=s-2),s):--n=0?(s>0&&(s===2?s=0:t.lastNeed=s-3),s):0))}function hN(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function pN(t){var e=this.lastTotal-this.lastNeed,r=hN(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function vN(t,e){var r=dN(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function mN(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function gN(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function bN(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function yN(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function xN(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function wN(t){return t.toString(this.encoding)}function _N(t){return t&&t.length?this.write(t):""}var dg=Do.codes.ERR_STREAM_PREMATURE_CLOSE;function MN(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),s=0;s0)if(typeof N!="string"&&!K.objectMode&&Object.getPrototypeOf(N)!==n.prototype&&(N=i(N)),ee)K.endEmitted?G(j,new F):y(j,K,N,!0);else if(K.ended)G(j,new B);else{if(K.destroyed)return!1;K.reading=!1,K.decoder&&!$?(N=K.decoder.write(N),K.objectMode||N.length!==0?y(j,K,N,!1):p(j,K)):y(j,K,N,!1)}else ee||(K.reading=!1,p(j,K))}return!K.ended&&(K.length=f?j=f:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}function l(j,N){return j<=0||N.length===0&&N.ended?0:N.objectMode?1:j!==j?N.flowing&&N.length?N.buffer.head.data.length:N.length:(j>N.highWaterMark&&(N.highWaterMark=c(j)),j<=N.length?j:N.ended?N.length:(N.needReadable=!0,0))}W.prototype.read=function(j){b("read",j),j=parseInt(j,10);var N=this._readableState,$=j;if(j!==0&&(N.emittedReadable=!1),j===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended))return b("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?V(this):x(this),null;if(j=l(j,N),j===0&&N.ended)return N.length===0&&V(this),null;var ee=N.needReadable;b("need readable",ee),(N.length===0||N.length-j0?J=U(j,N):J=null,J===null?(N.needReadable=N.length<=N.highWaterMark,j=0):(N.length-=j,N.awaitDrain=0),N.length===0&&(N.ended||(N.needReadable=!0),$!==j&&N.ended&&V(this)),J!==null&&this.emit("data",J),J};function h(j,N){if(b("onEofChunk"),!N.ended){if(N.decoder){var $=N.decoder.end();$&&$.length&&(N.buffer.push($),N.length+=N.objectMode?1:$.length)}N.ended=!0,N.sync?x(j):(N.needReadable=!1,N.emittedReadable||(N.emittedReadable=!0,w(j)))}}function x(j){var N=j._readableState;b("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(b("emitReadable",N.flowing),N.emittedReadable=!0,Je.exports.nextTick(w,j))}function w(j){var N=j._readableState;b("emitReadable_",N.destroyed,N.length,N.ended),!N.destroyed&&(N.length||N.ended)&&(j.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,I(j)}function p(j,N){N.readingMore||(N.readingMore=!0,Je.exports.nextTick(o,j,N))}function o(j,N){for(;!N.reading&&!N.ended&&(N.length1&&X(ee.pipes,j)!==-1)&&!te&&(b("false write response, pause",ee.awaitDrain),ee.awaitDrain++),$.pause())}function Ie(ae){b("onerror",ae),Oe(),j.removeListener("error",Ie),e(j,"error")===0&&G(j,ae)}ne(j,"error",Ie);function ie(){j.removeListener("finish",oe),Oe()}j.once("close",ie);function oe(){b("onfinish"),j.removeListener("close",ie),Oe()}j.once("finish",oe);function Oe(){b("unpipe"),$.unpipe(j)}return j.emit("pipe",$),ee.flowing||(b("pipe resume"),$.resume()),j};function d(j){return function(){var $=j._readableState;b("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&e(j,"data")&&($.flowing=!0,I(j))}}W.prototype.unpipe=function(j){var N=this._readableState,$={hasUnpiped:!1};if(N.pipesCount===0)return this;if(N.pipesCount===1)return j&&j!==N.pipes?this:(j||(j=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,j&&j.emit("unpipe",this,$),this);if(!j){var ee=N.pipes,J=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var K=0;K0,ee.flowing!==!1&&this.resume()):j==="readable"&&!ee.endEmitted&&!ee.readableListening&&(ee.readableListening=ee.needReadable=!0,ee.flowing=!1,ee.emittedReadable=!1,b("on readable",ee.length,ee.reading),ee.length?x(this):ee.reading||Je.exports.nextTick(C,this)),$},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(j,N){var $=r.prototype.removeListener.call(this,j,N);return j==="readable"&&Je.exports.nextTick(M,this),$},W.prototype.removeAllListeners=function(j){var N=r.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&Je.exports.nextTick(M,this),N};function M(j){var N=j._readableState;N.readableListening=j.listenerCount("readable")>0,N.resumeScheduled&&!N.paused?N.flowing=!0:j.listenerCount("data")>0&&j.resume()}function C(j){b("readable nexttick read 0"),j.read(0)}W.prototype.resume=function(){var j=this._readableState;return j.flowing||(b("resume"),j.flowing=!j.readableListening,P(this,j)),j.paused=!1,this};function P(j,N){N.resumeScheduled||(N.resumeScheduled=!0,Je.exports.nextTick(S,j,N))}function S(j,N){b("resume",N.reading),N.reading||j.read(0),N.resumeScheduled=!1,j.emit("resume"),I(j),N.flowing&&!N.reading&&j.read(0)}W.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function I(j){var N=j._readableState;for(b("flow",N.flowing);N.flowing&&j.read()!==null;);}W.prototype.wrap=function(j){var N=this,$=this._readableState,ee=!1;j.on("end",function(){if(b("wrapped end"),$.decoder&&!$.ended){var D=$.decoder.end();D&&D.length&&N.push(D)}N.push(null)}),j.on("data",function(D){if(b("wrapped data"),$.decoder&&(D=$.decoder.write(D)),!($.objectMode&&D==null)&&!(!$.objectMode&&(!D||!D.length))){var k=N.push(D);k||(ee=!0,j.pause())}});for(var J in j)this[J]===void 0&&typeof j[J]=="function"&&(this[J]=function(k){return function(){return j[k].apply(j,arguments)}}(J));for(var K=0;K=N.length?(N.decoder?$=N.buffer.join(""):N.buffer.length===1?$=N.buffer.first():$=N.buffer.concat(N.length),N.buffer.clear()):$=N.buffer.consume(j,N.decoder),$}function V(j){var N=j._readableState;b("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,Je.exports.nextTick(z,N,j))}function z(j,N){if(b("endReadableNT",j.endEmitted,j.length),!j.endEmitted&&j.length===0&&(j.endEmitted=!0,N.readable=!1,N.emit("end"),j.autoDestroy)){var $=N._writableState;(!$||$.autoDestroy&&$.finished)&&N.destroy()}}typeof Symbol=="function"&&(W.from=function(j,N){return H===void 0&&(H=RN()),H(W,j,N)});function X(j,N){for(var $=0,ee=j.length;$0;return LN(u,b,m,function(g){s||(s=g),g&&i.forEach(bg),!b&&(i.forEach(bg),n(s))})});return e.reduce(UN)}var z4=$N;(function(t,e){e=t.exports=Sv(),e.Stream=e,e.Readable=e,e.Writable=Av(),e.Duplex=Co(),e.Transform=Rv,e.PassThrough=$4,e.finished=cu,e.pipeline=z4})(pl,pl.exports);var bl=ut.exports.Buffer,j4=pl.exports.Transform,qN=ct.exports;function HN(t,e){if(!bl.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function Ha(t){j4.call(this),this._block=bl.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}qN(Ha,j4);Ha.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(s){n=s}r(n)};Ha.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Ha.prototype.update=function(t,e){if(HN(t,"Data"),this._finalized)throw new Error("Digest already called");bl.isBuffer(t)||(t=bl.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var s=this._blockOffset;s0;++i)this._length[i]+=u,u=this._length[i]/4294967296|0,u>0&&(this._length[i]-=4294967296*u);return this};Ha.prototype._update=function(){throw new Error("_update is not implemented")};Ha.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Ha.prototype._digest=function(){throw new Error("_digest is not implemented")};var G4=Ha,zN=ct.exports,V4=G4,jN=ut.exports.Buffer,GN=new Array(16);function du(){V4.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}zN(du,V4);du.prototype._update=function(){for(var t=GN,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,s=this._c,i=this._d;r=qr(r,n,s,i,t[0],3614090360,7),i=qr(i,r,n,s,t[1],3905402710,12),s=qr(s,i,r,n,t[2],606105819,17),n=qr(n,s,i,r,t[3],3250441966,22),r=qr(r,n,s,i,t[4],4118548399,7),i=qr(i,r,n,s,t[5],1200080426,12),s=qr(s,i,r,n,t[6],2821735955,17),n=qr(n,s,i,r,t[7],4249261313,22),r=qr(r,n,s,i,t[8],1770035416,7),i=qr(i,r,n,s,t[9],2336552879,12),s=qr(s,i,r,n,t[10],4294925233,17),n=qr(n,s,i,r,t[11],2304563134,22),r=qr(r,n,s,i,t[12],1804603682,7),i=qr(i,r,n,s,t[13],4254626195,12),s=qr(s,i,r,n,t[14],2792965006,17),n=qr(n,s,i,r,t[15],1236535329,22),r=Hr(r,n,s,i,t[1],4129170786,5),i=Hr(i,r,n,s,t[6],3225465664,9),s=Hr(s,i,r,n,t[11],643717713,14),n=Hr(n,s,i,r,t[0],3921069994,20),r=Hr(r,n,s,i,t[5],3593408605,5),i=Hr(i,r,n,s,t[10],38016083,9),s=Hr(s,i,r,n,t[15],3634488961,14),n=Hr(n,s,i,r,t[4],3889429448,20),r=Hr(r,n,s,i,t[9],568446438,5),i=Hr(i,r,n,s,t[14],3275163606,9),s=Hr(s,i,r,n,t[3],4107603335,14),n=Hr(n,s,i,r,t[8],1163531501,20),r=Hr(r,n,s,i,t[13],2850285829,5),i=Hr(i,r,n,s,t[2],4243563512,9),s=Hr(s,i,r,n,t[7],1735328473,14),n=Hr(n,s,i,r,t[12],2368359562,20),r=zr(r,n,s,i,t[5],4294588738,4),i=zr(i,r,n,s,t[8],2272392833,11),s=zr(s,i,r,n,t[11],1839030562,16),n=zr(n,s,i,r,t[14],4259657740,23),r=zr(r,n,s,i,t[1],2763975236,4),i=zr(i,r,n,s,t[4],1272893353,11),s=zr(s,i,r,n,t[7],4139469664,16),n=zr(n,s,i,r,t[10],3200236656,23),r=zr(r,n,s,i,t[13],681279174,4),i=zr(i,r,n,s,t[0],3936430074,11),s=zr(s,i,r,n,t[3],3572445317,16),n=zr(n,s,i,r,t[6],76029189,23),r=zr(r,n,s,i,t[9],3654602809,4),i=zr(i,r,n,s,t[12],3873151461,11),s=zr(s,i,r,n,t[15],530742520,16),n=zr(n,s,i,r,t[2],3299628645,23),r=jr(r,n,s,i,t[0],4096336452,6),i=jr(i,r,n,s,t[7],1126891415,10),s=jr(s,i,r,n,t[14],2878612391,15),n=jr(n,s,i,r,t[5],4237533241,21),r=jr(r,n,s,i,t[12],1700485571,6),i=jr(i,r,n,s,t[3],2399980690,10),s=jr(s,i,r,n,t[10],4293915773,15),n=jr(n,s,i,r,t[1],2240044497,21),r=jr(r,n,s,i,t[8],1873313359,6),i=jr(i,r,n,s,t[15],4264355552,10),s=jr(s,i,r,n,t[6],2734768916,15),n=jr(n,s,i,r,t[13],1309151649,21),r=jr(r,n,s,i,t[4],4149444226,6),i=jr(i,r,n,s,t[11],3174756917,10),s=jr(s,i,r,n,t[2],718787259,15),n=jr(n,s,i,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+s|0,this._d=this._d+i|0};du.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=jN.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function hu(t,e){return t<>>32-e}function qr(t,e,r,n,s,i,u){return hu(t+(e&r|~e&n)+s+i|0,u)+e|0}function Hr(t,e,r,n,s,i,u){return hu(t+(e&n|r&~n)+s+i|0,u)+e|0}function zr(t,e,r,n,s,i,u){return hu(t+(e^r^n)+s+i|0,u)+e|0}function jr(t,e,r,n,s,i,u){return hu(t+(r^(e|~n))+s+i|0,u)+e|0}var Cv=du,Ld=He.Buffer,VN=ct.exports,W4=G4,WN=new Array(16),hf=[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],pf=[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],vf=[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],mf=[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],gf=[0,1518500249,1859775393,2400959708,2840853838],bf=[1352829926,1548603684,1836072691,2053994217,0];function pu(){W4.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}VN(pu,W4);pu.prototype._update=function(){for(var t=WN,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=this._a|0,b=this._b|0,m=this._c|0,g=this._d|0,_=this._e|0,A=0;A<80;A+=1){var E,R;A<16?(E=yg(r,n,s,i,u,t[hf[A]],gf[0],vf[A]),R=Mg(v,b,m,g,_,t[pf[A]],bf[0],mf[A])):A<32?(E=xg(r,n,s,i,u,t[hf[A]],gf[1],vf[A]),R=_g(v,b,m,g,_,t[pf[A]],bf[1],mf[A])):A<48?(E=wg(r,n,s,i,u,t[hf[A]],gf[2],vf[A]),R=wg(v,b,m,g,_,t[pf[A]],bf[2],mf[A])):A<64?(E=_g(r,n,s,i,u,t[hf[A]],gf[3],vf[A]),R=xg(v,b,m,g,_,t[pf[A]],bf[3],mf[A])):(E=Mg(r,n,s,i,u,t[hf[A]],gf[4],vf[A]),R=yg(v,b,m,g,_,t[pf[A]],bf[4],mf[A])),r=u,u=i,i=Bo(s,10),s=n,n=E,v=_,_=g,g=Bo(m,10),m=b,b=R}var B=this._b+s+g|0;this._b=this._c+i+_|0,this._c=this._d+u+v|0,this._d=this._e+r+b|0,this._e=this._a+n+m|0,this._a=B};pu.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Ld.alloc?Ld.alloc(20):new Ld(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function Bo(t,e){return t<>>32-e}function yg(t,e,r,n,s,i,u,v){return Bo(t+(e^r^n)+i+u|0,v)+s|0}function xg(t,e,r,n,s,i,u,v){return Bo(t+(e&r|~e&n)+i+u|0,v)+s|0}function wg(t,e,r,n,s,i,u,v){return Bo(t+((e|~r)^n)+i+u|0,v)+s|0}function _g(t,e,r,n,s,i,u,v){return Bo(t+(e&n|r&~n)+i+u|0,v)+s|0}function Mg(t,e,r,n,s,i,u,v){return Bo(t+(e^(r|~n))+i+u|0,v)+s|0}var Bv=pu,vu={exports:{}},Z4=ut.exports.Buffer;function mu(t,e){this._block=Z4.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}mu.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Z4.from(t,e));for(var r=this._block,n=this._blockSize,s=t.length,i=this._len,u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,s=(r-n)/4294967296;this._block.writeUInt32BE(s,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return t?i.toString(t):i};mu.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Js=mu,ZN=ct.exports,J4=Js,JN=ut.exports.Buffer,XN=[1518500249,1859775393,-1894007588,-899497514],YN=new Array(80);function S0(){this.init(),this._w=YN,J4.call(this,64,56)}ZN(S0,J4);S0.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function QN(t){return t<<5|t>>>27}function eT(t){return t<<30|t>>>2}function tT(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}S0.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=e[v-3]^e[v-8]^e[v-14]^e[v-16];for(var b=0;b<80;++b){var m=~~(b/20),g=QN(r)+tT(m,n,s,i)+u+e[b]+XN[m]|0;u=i,i=s,s=eT(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=u+this._e|0};S0.prototype._hash=function(){var t=JN.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var rT=S0,nT=ct.exports,X4=Js,iT=ut.exports.Buffer,aT=[1518500249,1859775393,-1894007588,-899497514],oT=new Array(80);function R0(){this.init(),this._w=oT,X4.call(this,64,56)}nT(R0,X4);R0.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function sT(t){return t<<1|t>>>31}function fT(t){return t<<5|t>>>27}function cT(t){return t<<30|t>>>2}function lT(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}R0.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=sT(e[v-3]^e[v-8]^e[v-14]^e[v-16]);for(var b=0;b<80;++b){var m=~~(b/20),g=fT(r)+lT(m,n,s,i)+u+e[b]+aT[m]|0;u=i,i=s,s=cT(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=u+this._e|0};R0.prototype._hash=function(){var t=iT.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var uT=R0,dT=ct.exports,Y4=Js,hT=ut.exports.Buffer,pT=[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],vT=new Array(64);function C0(){this.init(),this._w=vT,Y4.call(this,64,56)}dT(C0,Y4);C0.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function mT(t,e,r){return r^t&(e^r)}function gT(t,e,r){return t&e|r&(t|e)}function bT(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function yT(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function xT(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function wT(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}C0.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=this._f|0,b=this._g|0,m=this._h|0,g=0;g<16;++g)e[g]=t.readInt32BE(g*4);for(;g<64;++g)e[g]=wT(e[g-2])+e[g-7]+xT(e[g-15])+e[g-16]|0;for(var _=0;_<64;++_){var A=m+yT(u)+mT(u,v,b)+pT[_]+e[_]|0,E=bT(r)+gT(r,n,s)|0;m=b,b=v,v=u,u=i+A|0,i=s,s=n,n=r,r=A+E|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=u+this._e|0,this._f=v+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0};C0.prototype._hash=function(){var t=hT.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Q4=C0,_T=ct.exports,MT=Q4,AT=Js,ET=ut.exports.Buffer,ST=new Array(64);function gu(){this.init(),this._w=ST,AT.call(this,64,56)}_T(gu,MT);gu.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};gu.prototype._hash=function(){var t=ET.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var RT=gu,CT=ct.exports,e5=Js,BT=ut.exports.Buffer,Ag=[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],NT=new Array(160);function B0(){this.init(),this._w=NT,e5.call(this,128,112)}CT(B0,e5);B0.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Eg(t,e,r){return r^t&(e^r)}function Sg(t,e,r){return t&e|r&(t|e)}function Rg(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Cg(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function TT(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function kT(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function PT(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function IT(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Sr(t,e){return t>>>0>>0?1:0}B0.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,s=this._ch|0,i=this._dh|0,u=this._eh|0,v=this._fh|0,b=this._gh|0,m=this._hh|0,g=this._al|0,_=this._bl|0,A=this._cl|0,E=this._dl|0,R=this._el|0,B=this._fl|0,T=this._gl|0,F=this._hl|0,O=0;O<32;O+=2)e[O]=t.readInt32BE(O*4),e[O+1]=t.readInt32BE(O*4+4);for(;O<160;O+=2){var q=e[O-30],H=e[O-15*2+1],G=TT(q,H),re=kT(H,q);q=e[O-2*2],H=e[O-2*2+1];var ne=PT(q,H),Y=IT(H,q),W=e[O-7*2],se=e[O-7*2+1],y=e[O-16*2],a=e[O-16*2+1],f=re+se|0,c=G+W+Sr(f,re)|0;f=f+Y|0,c=c+ne+Sr(f,Y)|0,f=f+a|0,c=c+y+Sr(f,a)|0,e[O]=c,e[O+1]=f}for(var l=0;l<160;l+=2){c=e[l],f=e[l+1];var h=Sg(r,n,s),x=Sg(g,_,A),w=Rg(r,g),p=Rg(g,r),o=Cg(u,R),d=Cg(R,u),M=Ag[l],C=Ag[l+1],P=Eg(u,v,b),S=Eg(R,B,T),I=F+d|0,U=m+o+Sr(I,F)|0;I=I+S|0,U=U+P+Sr(I,S)|0,I=I+C|0,U=U+M+Sr(I,C)|0,I=I+f|0,U=U+c+Sr(I,f)|0;var V=p+x|0,z=w+h+Sr(V,p)|0;m=b,F=T,b=v,T=B,v=u,B=R,R=E+I|0,u=i+U+Sr(R,E)|0,i=s,E=A,s=n,A=_,n=r,_=g,g=I+V|0,r=U+z+Sr(g,I)|0}this._al=this._al+g|0,this._bl=this._bl+_|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+R|0,this._fl=this._fl+B|0,this._gl=this._gl+T|0,this._hl=this._hl+F|0,this._ah=this._ah+r+Sr(this._al,g)|0,this._bh=this._bh+n+Sr(this._bl,_)|0,this._ch=this._ch+s+Sr(this._cl,A)|0,this._dh=this._dh+i+Sr(this._dl,E)|0,this._eh=this._eh+u+Sr(this._el,R)|0,this._fh=this._fh+v+Sr(this._fl,B)|0,this._gh=this._gh+b+Sr(this._gl,T)|0,this._hh=this._hh+m+Sr(this._hl,F)|0};B0.prototype._hash=function(){var t=BT.allocUnsafe(64);function e(r,n,s){t.writeInt32BE(r,s),t.writeInt32BE(n,s+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var t5=B0,DT=ct.exports,OT=t5,FT=Js,LT=ut.exports.Buffer,UT=new Array(160);function bu(){this.init(),this._w=UT,FT.call(this,128,112)}DT(bu,OT);bu.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};bu.prototype._hash=function(){var t=LT.allocUnsafe(48);function e(r,n,s){t.writeInt32BE(r,s),t.writeInt32BE(n,s+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var KT=bu,Oo=vu.exports=function(e){e=e.toLowerCase();var r=Oo[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};Oo.sha=rT;Oo.sha1=uT;Oo.sha224=RT;Oo.sha256=Q4;Oo.sha384=KT;Oo.sha512=t5;var $T=$n,Nv=M0.exports.EventEmitter,qT=ct.exports;qT($n,Nv);$n.Readable=Sv();$n.Writable=Av();$n.Duplex=Co();$n.Transform=Rv;$n.PassThrough=$4;$n.finished=cu;$n.pipeline=z4;$n.Stream=$n;function $n(){Nv.call(this)}$n.prototype.pipe=function(t,e){var r=this;function n(g){t.writable&&t.write(g)===!1&&r.pause&&r.pause()}r.on("data",n);function s(){r.readable&&r.resume&&r.resume()}t.on("drain",s),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",u),r.on("close",v));var i=!1;function u(){i||(i=!0,t.end())}function v(){i||(i=!0,typeof t.destroy=="function"&&t.destroy())}function b(g){if(m(),Nv.listenerCount(this,"error")===0)throw g}r.on("error",b),t.on("error",b);function m(){r.removeListener("data",n),t.removeListener("drain",s),r.removeListener("end",u),r.removeListener("close",v),r.removeListener("error",b),t.removeListener("error",b),r.removeListener("end",m),r.removeListener("close",m),t.removeListener("close",m)}return r.on("end",m),r.on("close",m),t.on("close",m),t.emit("pipe",r),t};var r5=ut.exports.Buffer,n5=$T.Transform,HT=gl.StringDecoder,zT=ct.exports;function li(t){n5.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}zT(li,n5);li.prototype.update=function(t,e,r){typeof t=="string"&&(t=r5.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};li.prototype.setAutoPadding=function(){};li.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};li.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};li.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};li.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(s){n=s}finally{r(n)}};li.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};li.prototype._finalOrDigest=function(t){var e=this.__final()||r5.alloc(0);return t&&(e=this._toString(e,t,!0)),e};li.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new HT(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};var za=li,jT=ct.exports,GT=Cv,VT=Bv,WT=vu.exports,i5=za;function yu(t){i5.call(this,"digest"),this._hash=t}jT(yu,i5);yu.prototype._update=function(t){this._hash.update(t)};yu.prototype._final=function(){return this._hash.digest()};var N0=function(e){return e=e.toLowerCase(),e==="md5"?new GT:e==="rmd160"||e==="ripemd160"?new VT:new yu(WT(e))},Ud,Bg;function ZT(){if(Bg)return Ud;Bg=1;var t=ct.exports,e=ut.exports.Buffer,r=za,n=e.alloc(128),s=64;function i(u,v){r.call(this,"digest"),typeof v=="string"&&(v=e.from(v)),this._alg=u,this._key=v,v.length>s?v=u(v):v.length_){var A=m==="rmd160"?new i:u(m);g=A.update(g).digest()}else g.length<_&&(g=n.concat([g,v],_));for(var E=this._ipad=n.allocUnsafe(_),R=this._opad=n.allocUnsafe(_),B=0;B<_;B++)E[B]=g[B]^54,R[B]=g[B]^92;this._hash=m==="rmd160"?new i:u(m),this._hash.update(E)}return t(b,r),b.prototype._update=function(m){this._hash.update(m)},b.prototype._final=function(){var m=this._hash.digest(),g=this._alg==="rmd160"?new i:u(this._alg);return g.update(this._opad).update(m).digest()},$d=function(g,_){return g=g.toLowerCase(),g==="rmd160"||g==="ripemd160"?new b("rmd160",_):g==="md5"?new e(s,_):new b(g,_)},$d}var qd={exports:{}};const JT={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},XT={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},YT={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},QT={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},ek={sign:"ecdsa",hash:"sha256",id:""},tk={sign:"ecdsa",hash:"sha224",id:""},rk={sign:"ecdsa",hash:"sha384",id:""},nk={sign:"ecdsa",hash:"sha512",id:""},ik={sign:"dsa",hash:"sha1",id:""},ak={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},ok={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},s5={sha224WithRSAEncryption:JT,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:XT,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:YT,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:QT,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:ek,sha224:tk,sha384:rk,sha512:nk,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:ik,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:ak,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:ok,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var kg;function sk(){return kg||(kg=1,function(t){t.exports=s5}(qd)),qd.exports}var ic={},Hd,Pg;function f5(){if(Pg)return Hd;Pg=1;var t=Math.pow(2,30)-1;return Hd=function(e,r){if(typeof e!="number")throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if(typeof r!="number")throw new TypeError("Key length not a number");if(r<0||r>t||r!==r)throw new TypeError("Bad key length")},Hd}var zd,Ig;function c5(){if(Ig)return zd;Ig=1;var t;if(ue.process&&ue.process.browser)t="utf-8";else if(ue.process&&ue.process.version){var e=parseInt(Je.exports.version.split(".")[0].slice(1),10);t=e>=6?"utf-8":"binary"}else t="utf-8";return zd=t,zd}var jd,Dg;function l5(){if(Dg)return jd;Dg=1;var t=ut.exports.Buffer;return jd=function(e,r,n){if(t.isBuffer(e))return e;if(typeof e=="string")return t.from(e,r);if(ArrayBuffer.isView(e))return t.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},jd}var Gd,Og;function u5(){if(Og)return Gd;Og=1;var t=a5(),e=Bv,r=vu.exports,n=ut.exports.Buffer,s=f5(),i=c5(),u=l5(),v=n.alloc(128),b={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function m(A,E,R){var B=g(A),T=A==="sha512"||A==="sha384"?128:64;E.length>T?E=B(E):E.length>>0},mn.writeUInt32BE=function(s,i,u){s[0+u]=i>>>24,s[1+u]=i>>>16&255,s[2+u]=i>>>8&255,s[3+u]=i&255},mn.ip=function(s,i,u,v){for(var b=0,m=0,g=6;g>=0;g-=2){for(var _=0;_<=24;_+=8)b<<=1,b|=i>>>_+g&1;for(var _=0;_<=24;_+=8)b<<=1,b|=s>>>_+g&1}for(var g=6;g>=0;g-=2){for(var _=1;_<=25;_+=8)m<<=1,m|=i>>>_+g&1;for(var _=1;_<=25;_+=8)m<<=1,m|=s>>>_+g&1}u[v+0]=b>>>0,u[v+1]=m>>>0},mn.rip=function(s,i,u,v){for(var b=0,m=0,g=0;g<4;g++)for(var _=24;_>=0;_-=8)b<<=1,b|=i>>>_+g&1,b<<=1,b|=s>>>_+g&1;for(var g=4;g<8;g++)for(var _=24;_>=0;_-=8)m<<=1,m|=i>>>_+g&1,m<<=1,m|=s>>>_+g&1;u[v+0]=b>>>0,u[v+1]=m>>>0},mn.pc1=function(s,i,u,v){for(var b=0,m=0,g=7;g>=5;g--){for(var _=0;_<=24;_+=8)b<<=1,b|=i>>_+g&1;for(var _=0;_<=24;_+=8)b<<=1,b|=s>>_+g&1}for(var _=0;_<=24;_+=8)b<<=1,b|=i>>_+g&1;for(var g=1;g<=3;g++){for(var _=0;_<=24;_+=8)m<<=1,m|=i>>_+g&1;for(var _=0;_<=24;_+=8)m<<=1,m|=s>>_+g&1}for(var _=0;_<=24;_+=8)m<<=1,m|=s>>_+g&1;u[v+0]=b>>>0,u[v+1]=m>>>0},mn.r28shl=function(s,i){return s<>>28-i};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];mn.pc2=function(s,i,u,v){for(var b=0,m=0,g=t.length>>>1,_=0;_>>t[_]&1;for(var _=g;_>>t[_]&1;u[v+0]=b>>>0,u[v+1]=m>>>0},mn.expand=function(s,i,u){var v=0,b=0;v=(s&1)<<5|s>>>27;for(var m=23;m>=15;m-=4)v<<=6,v|=s>>>m&63;for(var m=11;m>=3;m-=4)b|=s>>>m&63,b<<=6;b|=(s&31)<<1|s>>>31,i[u+0]=v>>>0,i[u+1]=b>>>0};var e=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];mn.substitute=function(s,i){for(var u=0,v=0;v<4;v++){var b=s>>>18-v*6&63,m=e[v*64+b];u<<=4,u|=m}for(var v=0;v<4;v++){var b=i>>>18-v*6&63,m=e[4*64+v*64+b];u<<=4,u|=m}return u>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return mn.permute=function(s){for(var i=0,u=0;u>>r[u]&1;return i>>>0},mn.padSplit=function(s,i,u){for(var v=s.toString(2);v.length0;u--)s+=this._buffer(n,s),i+=this._flushBuffer(v,i);return s+=this._buffer(n,s),v},e.prototype.final=function(n){var s;n&&(s=this.update(n));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),s?s.concat(i):i},e.prototype._pad=function(n,s){if(s===0)return!1;for(;s>>1];g=r.r28shl(g,E),_=r.r28shl(_,E),r.pc2(g,_,b.keys,A)}},i.prototype._update=function(b,m,g,_){var A=this._desState,E=r.readUInt32BE(b,m),R=r.readUInt32BE(b,m+4);r.ip(E,R,A.tmp,0),E=A.tmp[0],R=A.tmp[1],this.type==="encrypt"?this._encrypt(A,E,R,A.tmp,0):this._decrypt(A,E,R,A.tmp,0),E=A.tmp[0],R=A.tmp[1],r.writeUInt32BE(g,E,_),r.writeUInt32BE(g,R,_+4)},i.prototype._pad=function(b,m){for(var g=b.length-m,_=m;_>>0,E=H}r.rip(R,E,_,A)},i.prototype._decrypt=function(b,m,g,_,A){for(var E=g,R=m,B=b.keys.length-2;B>=0;B-=2){var T=b.keys[B],F=b.keys[B+1];r.expand(E,b.tmp,0),T^=b.tmp[0],F^=b.tmp[1];var O=r.substitute(T,F),q=r.permute(O),H=E;E=(R^q)>>>0,R=H}r.rip(E,R,_,A)},Zd}var Jd={},qg;function ck(){if(qg)return Jd;qg=1;var t=qn,e=ct.exports,r={};function n(i){t.equal(i.length,8,"Invalid IV length"),this.iv=new Array(8);for(var u=0;u>v%8,n._prev=r(n._prev,i?g:_);return m}function r(n,s){var i=n.length,u=-1,v=t.allocUnsafe(n.length);for(n=t.concat([n,t.from([s])]);++u>7;return v}return rh.encrypt=function(n,s,i){for(var u=s.length,v=t.allocUnsafe(u),b=-1;++b>>24]^E[F>>>16&255]^R[O>>>8&255]^B[q&255]^b[Y++],G=A[F>>>24]^E[O>>>16&255]^R[q>>>8&255]^B[T&255]^b[Y++],re=A[O>>>24]^E[q>>>16&255]^R[T>>>8&255]^B[F&255]^b[Y++],ne=A[q>>>24]^E[T>>>16&255]^R[F>>>8&255]^B[O&255]^b[Y++],T=H,F=G,O=re,q=ne;return H=(g[T>>>24]<<24|g[F>>>16&255]<<16|g[O>>>8&255]<<8|g[q&255])^b[Y++],G=(g[F>>>24]<<24|g[O>>>16&255]<<16|g[q>>>8&255]<<8|g[T&255])^b[Y++],re=(g[O>>>24]<<24|g[q>>>16&255]<<16|g[T>>>8&255]<<8|g[F&255])^b[Y++],ne=(g[q>>>24]<<24|g[T>>>16&255]<<16|g[F>>>8&255]<<8|g[O&255])^b[Y++],H=H>>>0,G=G>>>0,re=re>>>0,ne=ne>>>0,[H,G,re,ne]}var s=[0,1,2,4,8,16,32,64,128,27,54],i=function(){for(var v=new Array(256),b=0;b<256;b++)b<128?v[b]=b<<1:v[b]=b<<1^283;for(var m=[],g=[],_=[[],[],[],[]],A=[[],[],[],[]],E=0,R=0,B=0;B<256;++B){var T=R^R<<1^R<<2^R<<3^R<<4;T=T>>>8^T&255^99,m[E]=T,g[T]=E;var F=v[E],O=v[F],q=v[O],H=v[T]*257^T*16843008;_[0][E]=H<<24|H>>>8,_[1][E]=H<<16|H>>>16,_[2][E]=H<<8|H>>>24,_[3][E]=H,H=q*16843009^O*65537^F*257^E*16843008,A[0][T]=H<<24|H>>>8,A[1][T]=H<<16|H>>>16,A[2][T]=H<<8|H>>>24,A[3][T]=H,E===0?E=R=1:(E=F^v[v[v[q^F]]],R^=v[v[R]])}return{SBOX:m,INV_SBOX:g,SUB_MIX:_,INV_SUB_MIX:A}}();function u(v){this._key=e(v),this._reset()}return u.blockSize=4*4,u.keySize=256/8,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var v=this._key,b=v.length,m=b+6,g=(m+1)*4,_=[],A=0;A>>24,E=i.SBOX[E>>>24]<<24|i.SBOX[E>>>16&255]<<16|i.SBOX[E>>>8&255]<<8|i.SBOX[E&255],E^=s[A/b|0]<<24):b>6&&A%b===4&&(E=i.SBOX[E>>>24]<<24|i.SBOX[E>>>16&255]<<16|i.SBOX[E>>>8&255]<<8|i.SBOX[E&255]),_[A]=_[A-b]^E}for(var R=[],B=0;B>>24]]^i.INV_SUB_MIX[1][i.SBOX[F>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[F>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[F&255]]}this._nRounds=m,this._keySchedule=_,this._invKeySchedule=R},u.prototype.encryptBlockRaw=function(v){return v=e(v),n(v,this._keySchedule,i.SUB_MIX,i.SBOX,this._nRounds)},u.prototype.encryptBlock=function(v){var b=this.encryptBlockRaw(v),m=t.allocUnsafe(16);return m.writeUInt32BE(b[0],0),m.writeUInt32BE(b[1],4),m.writeUInt32BE(b[2],8),m.writeUInt32BE(b[3],12),m},u.prototype.decryptBlock=function(v){v=e(v);var b=v[1];v[1]=v[3],v[3]=b;var m=n(v,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX,this._nRounds),g=t.allocUnsafe(16);return g.writeUInt32BE(m[0],0),g.writeUInt32BE(m[3],4),g.writeUInt32BE(m[2],8),g.writeUInt32BE(m[1],12),g},u.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},sh.AES=u,sh}var fh,ib;function _k(){if(ib)return fh;ib=1;var t=ut.exports.Buffer,e=t.alloc(16,0);function r(i){return[i.readUInt32BE(0),i.readUInt32BE(4),i.readUInt32BE(8),i.readUInt32BE(12)]}function n(i){var u=t.allocUnsafe(16);return u.writeUInt32BE(i[0]>>>0,0),u.writeUInt32BE(i[1]>>>0,4),u.writeUInt32BE(i[2]>>>0,8),u.writeUInt32BE(i[3]>>>0,12),u}function s(i){this.h=i,this.state=t.alloc(16,0),this.cache=t.allocUnsafe(0)}return s.prototype.ghash=function(i){for(var u=-1;++u0;v--)i[v]=i[v]>>>1|(i[v-1]&1)<<31;i[0]=i[0]>>>1,m&&(i[0]=i[0]^225<<24)}this.state=n(u)},s.prototype.update=function(i){this.cache=t.concat([this.cache,i]);for(var u;this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},s.prototype.final=function(i,u){return this.cache.length&&this.ghash(t.concat([this.cache,e],16)),this.ghash(n([0,i,0,u])),this.state},fh=s,fh}var ch,ab;function g5(){if(ab)return ch;ab=1;var t=xu(),e=ut.exports.Buffer,r=za,n=ct.exports,s=_k(),i=T0(),u=v5();function v(g,_){var A=0;g.length!==_.length&&A++;for(var E=Math.min(g.length,_.length),R=0;R0||u>0;){var _=new e;_.update(g),_.update(n),s&&_.update(s),g=_.digest();var A=0;if(v>0){var E=b.length-v;A=Math.min(v,g.length),g.copy(b,E,0,A),v-=A}if(A0){var R=m.length-u,B=Math.min(u,g.length-A);g.copy(m,R,A,A+B),u-=B}}return g.fill(0),{key:b,iv:m}}return uh=r,uh}var fb;function Mk(){if(fb)return ac;fb=1;var t=kv(),e=g5(),r=ut.exports.Buffer,n=b5(),s=za,i=xu(),u=wu(),v=ct.exports;function b(E,R,B){s.call(this),this._cache=new g,this._cipher=new i.AES(R),this._prev=r.from(B),this._mode=E,this._autopadding=!0}v(b,s),b.prototype._update=function(E){this._cache.add(E);for(var R,B,T=[];R=this._cache.get();)B=this._mode.encrypt(this,R),T.push(B);return r.concat(T)};var m=r.alloc(16,16);b.prototype._final=function(){var E=this._cache.flush();if(this._autopadding)return E=this._mode.encrypt(this,E),this._cipher.scrub(),E;if(!E.equals(m))throw this._cipher.scrub(),new Error("data not multiple of block length")},b.prototype.setAutoPadding=function(E){return this._autopadding=!!E,this};function g(){this.cache=r.allocUnsafe(0)}g.prototype.add=function(E){this.cache=r.concat([this.cache,E])},g.prototype.get=function(){if(this.cache.length>15){var E=this.cache.slice(0,16);return this.cache=this.cache.slice(16),E}return null},g.prototype.flush=function(){for(var E=16-this.cache.length,R=r.allocUnsafe(E),B=-1;++B16)return R=this.cache.slice(0,16),this.cache=this.cache.slice(16),R}else if(this.cache.length>=16)return R=this.cache.slice(0,16),this.cache=this.cache.slice(16),R;return null},m.prototype.flush=function(){if(this.cache.length)return this.cache};function g(E){var R=E[15];if(R<1||R>16)throw new Error("unable to decrypt data");for(var B=-1;++B0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(hh)),hh.exports}var ph={exports:{}},pb;function Rk(){return pb||(pb=1,function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(ph)),ph.exports}var cc={exports:{}},vb;function Iv(){if(vb)return cc.exports;vb=1;var t;cc.exports=function(s){return t||(t=new e(null)),t.generate(s)};function e(n){this.rand=n}if(cc.exports.Rand=e,e.prototype.generate=function(s){return this._rand(s)},e.prototype._rand=function(s){if(this.rand.getBytes)return this.rand.getBytes(s);for(var i=new Uint8Array(s),u=0;u=0);return v},r.prototype._randrange=function(s,i){var u=i.sub(s);return s.add(this._randbelow(u))},r.prototype.test=function(s,i,u){var v=s.bitLength(),b=t.mont(s),m=new t(1).toRed(b);i||(i=Math.max(1,v/48|0));for(var g=s.subn(1),_=0;!g.testn(_);_++);for(var A=s.shrn(_),E=g.toRed(b),R=!0;i>0;i--){var B=this._randrange(new t(2),g);u&&u(B);var T=B.toRed(b).redPow(A);if(!(T.cmp(m)===0||T.cmp(E)===0)){for(var F=1;F<_;F++){if(T=T.redSqr(),T.cmp(m)===0)return!1;if(T.cmp(E)===0)break}if(F===_)return!1}}return R},r.prototype.getDivisor=function(s,i){var u=s.bitLength(),v=t.mont(s),b=new t(1).toRed(v);i||(i=Math.max(1,u/48|0));for(var m=s.subn(1),g=0;!m.testn(g);g++);for(var _=s.shrn(g),A=m.toRed(v);i>0;i--){var E=this._randrange(new t(2),m),R=s.gcd(E);if(R.cmpn(1)!==0)return R;var B=E.toRed(v).redPow(_);if(!(B.cmp(b)===0||B.cmp(A)===0)){for(var T=1;TF;)q.ishrn(1);if(q.isEven()&&q.iadd(i),q.testn(1)||q.iadd(u),O.cmp(u)){if(!O.cmp(v))for(;q.mod(b).cmp(m);)q.iadd(_)}else for(;q.mod(r).cmp(g);)q.iadd(_);if(H=q.shrn(1),R(H)&&R(q)&&B(H)&&B(q)&&s.test(H)&&s.test(q))return q}}return mh}const Ck={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},Bk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},Nk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},Tk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},kk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},Pk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},Ik={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},Dk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},Ok={modp1:Ck,modp2:Bk,modp5:Nk,modp14:Tk,modp15:kk,modp16:Pk,modp17:Ik,modp18:Dk};var gh,bb;function Fk(){if(bb)return gh;bb=1;var t=y5(),e=x5(),r=new e,n=new t(24),s=new t(11),i=new t(10),u=new t(3),v=new t(7),b=w5(),m=Oa.exports;gh=R;function g(T,F){return F=F||"utf8",He.Buffer.isBuffer(T)||(T=new He.Buffer(T,F)),this._pub=new t(T),this}function _(T,F){return F=F||"utf8",He.Buffer.isBuffer(T)||(T=new He.Buffer(T,F)),this._priv=new t(T),this}var A={};function E(T,F){var O=F.toString("hex"),q=[O,T.toString(16)].join("_");if(q in A)return A[q];var H=0;if(T.isEven()||!b.simpleSieve||!b.fermatTest(T)||!r.test(T))return H+=1,O==="02"||O==="05"?H+=8:H+=4,A[q]=H,H;r.test(T.shrn(1))||(H+=2);var G;switch(O){case"02":T.mod(n).cmp(s)&&(H+=8);break;case"05":G=T.mod(i),G.cmp(u)&&G.cmp(v)&&(H+=8);break;default:H+=4}return A[q]=H,H}function R(T,F,O){this.setGenerator(F),this.__prime=new t(T),this._prime=t.mont(this.__prime),this._primeLen=T.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,O?(this.setPublicKey=g,this.setPrivateKey=_):this._primeCode=8}Object.defineProperty(R.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=E(this.__prime,this.__gen)),this._primeCode}}),R.prototype.generateKeys=function(){return this._priv||(this._priv=new t(m(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},R.prototype.computeSecret=function(T){T=new t(T),T=T.toRed(this._prime);var F=T.redPow(this._priv).fromRed(),O=new He.Buffer(F.toArray()),q=this.getPrime();if(O.length=0||!v.umod(i.prime1)||!v.umod(i.prime2));return v}function s(i,u){var v=r(u),b=u.modulus.byteLength(),m=new t(i).mul(v.blinder).umod(u.modulus),g=m.toRed(t.mont(u.prime1)),_=m.toRed(t.mont(u.prime2)),A=u.coefficient,E=u.prime1,R=u.prime2,B=g.redPow(u.exponent1).fromRed(),T=_.redPow(u.exponent2).fromRed(),F=B.isub(T).imul(A).umod(E).imul(R);return T.iadd(F).imul(v.unblinder).umod(u.modulus).toArrayLike(He.Buffer,"be",b)}return s.getr=n,bh=s,bh}var yh={};const Uk="elliptic",Kk="6.5.4",$k="EC cryptography",qk="lib/elliptic.js",Hk=["lib"],zk={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},jk={type:"git",url:"git@github.com:indutny/elliptic"},Gk=["EC","Elliptic","curve","Cryptography"],Vk="Fedor Indutny ",Wk="MIT",Zk={url:"https://github.com/indutny/elliptic/issues"},Jk="https://github.com/indutny/elliptic",Xk={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},Yk={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},Qk={name:Uk,version:Kk,description:$k,main:qk,files:Hk,scripts:zk,repository:jk,keywords:Gk,author:Vk,license:Wk,bugs:Zk,homepage:Jk,devDependencies:Xk,dependencies:Yk};var Rn={},Ki={exports:{}};(function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)})(Ki);var Ov={};(function(t){var e=t;function r(i,u){if(Array.isArray(i))return i.slice();if(!i)return[];var v=[];if(typeof i!="string"){for(var b=0;b>8,_=m&255;g?v.push(g,_):v.push(_)}return v}e.toArray=r;function n(i){return i.length===1?"0"+i:i}e.zero2=n;function s(i){for(var u="",v=0;v(R>>1)-1?F=(R>>1)-O:F=O,B.isubn(F)):F=0,E[T]=F,B.iushrn(1)}return E}e.getNAF=i;function u(g,_){var A=[[],[]];g=g.clone(),_=_.clone();for(var E=0,R=0,B;g.cmpn(-E)>0||_.cmpn(-R)>0;){var T=g.andln(3)+E&3,F=_.andln(3)+R&3;T===3&&(T=-1),F===3&&(F=-1);var O;(T&1)===0?O=0:(B=g.andln(7)+E&7,(B===3||B===5)&&F===2?O=-T:O=T),A[0].push(O);var q;(F&1)===0?q=0:(B=_.andln(7)+R&7,(B===3||B===5)&&T===2?q=-F:q=F),A[1].push(q),2*E===O+1&&(E=1-E),2*R===q+1&&(R=1-R),g.iushrn(1),_.iushrn(1)}return A}e.getJSF=u;function v(g,_,A){var E="_"+_;g.prototype[_]=function(){return this[E]!==void 0?this[E]:this[E]=A.call(this)}}e.cachedProperty=v;function b(g){return typeof g=="string"?e.toArray(g,"hex"):g}e.parseBytes=b;function m(g){return new r(g,"hex","le")}e.intFromLE=m})(Rn);var Fv={},Qa=Ki.exports,k0=Rn,yl=k0.getNAF,eP=k0.getJSF,xl=k0.assert;function ja(t,e){this.type=t,this.p=new Qa(e.p,16),this.red=e.prime?Qa.red(e.prime):Qa.mont(this.p),this.zero=new Qa(0).toRed(this.red),this.one=new Qa(1).toRed(this.red),this.two=new Qa(2).toRed(this.red),this.n=e.n&&new Qa(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 _u=ja;ja.prototype.point=function(){throw new Error("Not implemented")};ja.prototype.validate=function(){throw new Error("Not implemented")};ja.prototype._fixedNafMul=function(e,r){xl(e.precomputed);var n=e._getDoubles(),s=yl(r,1,this._bitLength),i=(1<=v;m--)b=(b<<1)+s[m];u.push(b)}for(var g=this.jpoint(null,null,null),_=this.jpoint(null,null,null),A=i;A>0;A--){for(v=0;v=0;b--){for(var m=0;b>=0&&u[b]===0;b--)m++;if(b>=0&&m++,v=v.dblp(m),b<0)break;var g=u[b];xl(g!==0),e.type==="affine"?g>0?v=v.mixedAdd(i[g-1>>1]):v=v.mixedAdd(i[-g-1>>1].neg()):g>0?v=v.add(i[g-1>>1]):v=v.add(i[-g-1>>1].neg())}return e.type==="affine"?v.toP():v};ja.prototype._wnafMulAdd=function(e,r,n,s,i){var u=this._wnafT1,v=this._wnafT2,b=this._wnafT3,m=0,g,_,A;for(g=0;g=1;g-=2){var R=g-1,B=g;if(u[R]!==1||u[B]!==1){b[R]=yl(n[R],u[R],this._bitLength),b[B]=yl(n[B],u[B],this._bitLength),m=Math.max(b[R].length,m),m=Math.max(b[B].length,m);continue}var T=[r[R],null,null,r[B]];r[R].y.cmp(r[B].y)===0?(T[1]=r[R].add(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg())):r[R].y.cmp(r[B].y.redNeg())===0?(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].add(r[B].neg())):(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],O=eP(n[R],n[B]);for(m=Math.max(O[0].length,m),b[R]=new Array(m),b[B]=new Array(m),_=0;_=0;g--){for(var ne=0;g>=0;){var Y=!0;for(_=0;_=0&&ne++,G=G.dblp(ne),g<0)break;for(_=0;_0?A=v[_][W-1>>1]:W<0&&(A=v[_][-W-1>>1].neg()),A.type==="affine"?G=G.mixedAdd(A):G=G.add(A))}}for(g=0;g=Math.ceil((e.bitLength()+1)/r.step):!1};Gn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(E=m,R=g),_.negative&&(_=_.neg(),A=A.neg()),E.negative&&(E=E.neg(),R=R.neg()),[{a:_,b:A},{a:E,b:R}]};Vn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),u=n.b.neg().mul(e).divRound(this.n),v=i.mul(n.a),b=u.mul(s.a),m=i.mul(n.b),g=u.mul(s.b),_=e.sub(v).sub(b),A=m.add(g).neg();return{k1:_,k2:A}};Vn.prototype.pointFromX=function(e,r){e=new lr(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};Vn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};Vn.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,u=0;u":""};Ir.prototype.isInfinity=function(){return this.inf};Ir.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};Ir.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),u=i.redSqr().redISub(this.x.redAdd(this.x)),v=i.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,v)};Ir.prototype.getX=function(){return this.x.fromRed()};Ir.prototype.getY=function(){return this.y.fromRed()};Ir.prototype.mul=function(e){return e=new lr(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Ir.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};Ir.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};Ir.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Ir.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};Ir.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function $r(t,e,r,n){Xs.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new lr(0)):(this.x=new lr(e,16),this.y=new lr(r,16),this.z=new lr(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}Lv($r,Xs.BasePoint);Vn.prototype.jpoint=function(e,r,n){return new $r(this,e,r,n)};$r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};$r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};$r.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),u=this.y.redMul(r.redMul(e.z)),v=e.y.redMul(n.redMul(this.z)),b=s.redSub(i),m=u.redSub(v);if(b.cmpn(0)===0)return m.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=b.redSqr(),_=g.redMul(b),A=s.redMul(g),E=m.redSqr().redIAdd(_).redISub(A).redISub(A),R=m.redMul(A.redISub(E)).redISub(u.redMul(_)),B=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(E,R,B)};$r.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,u=e.y.redMul(r).redMul(this.z),v=n.redSub(s),b=i.redSub(u);if(v.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var m=v.redSqr(),g=m.redMul(v),_=n.redMul(m),A=b.redSqr().redIAdd(g).redISub(_).redISub(_),E=b.redMul(_.redISub(A)).redISub(i.redMul(g)),R=this.z.redMul(v);return this.curve.jpoint(A,E,R)};$r.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};$r.prototype.inspect=function(){return this.isInfinity()?"":""};$r.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ds=Ki.exports,_5=ct.exports,Mu=_u,iP=Rn;function Ys(t){Mu.call(this,"mont",t),this.a=new ds(t.a,16).toRed(this.red),this.b=new ds(t.b,16).toRed(this.red),this.i4=new ds(4).toRed(this.red).redInvm(),this.two=new ds(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}_5(Ys,Mu);var aP=Ys;Ys.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),s=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=s.redSqrt();return i.redSqr().cmp(s)===0};function kr(t,e,r){Mu.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ds(e,16),this.z=new ds(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}_5(kr,Mu.BasePoint);Ys.prototype.decodePoint=function(e,r){return this.point(iP.toArray(e,r),1)};Ys.prototype.point=function(e,r){return new kr(this,e,r)};Ys.prototype.pointFromJSON=function(e){return kr.fromJSON(this,e)};kr.prototype.precompute=function(){};kr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};kr.fromJSON=function(e,r){return new kr(e,r[0],r[1]||e.one)};kr.prototype.inspect=function(){return this.isInfinity()?"":""};kr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};kr.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),s=n.redSqr(),i=r.redSub(s),u=r.redMul(s),v=i.redMul(s.redAdd(this.curve.a24.redMul(i)));return this.curve.point(u,v)};kr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};kr.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),s=this.x.redSub(this.z),i=e.x.redAdd(e.z),u=e.x.redSub(e.z),v=u.redMul(n),b=i.redMul(s),m=r.z.redMul(v.redAdd(b).redSqr()),g=r.x.redMul(v.redISub(b).redSqr());return this.curve.point(m,g)};kr.prototype.mul=function(e){for(var r=e.clone(),n=this,s=this.curve.point(null,null),i=this,u=[];r.cmpn(0)!==0;r.iushrn(1))u.push(r.andln(1));for(var v=u.length-1;v>=0;v--)u[v]===0?(n=n.diffAdd(s,i),s=s.dbl()):(s=n.diffAdd(s,i),n=n.dbl());return s};kr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};kr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};kr.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};kr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};kr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var oP=Rn,Yi=Ki.exports,M5=ct.exports,Au=_u,sP=oP.assert;function $i(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Au.call(this,"edwards",t),this.a=new Yi(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Yi(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Yi(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),sP(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}M5($i,Au);var fP=$i;$i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};$i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};$i.prototype.jpoint=function(e,r,n,s){return this.point(e,r,n,s)};$i.prototype.pointFromX=function(e,r){e=new Yi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),s=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),u=s.redMul(i.redInvm()),v=u.redSqrt();if(v.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var b=v.fromRed().isOdd();return(r&&!b||!r&&b)&&(v=v.redNeg()),this.point(e,v)};$i.prototype.pointFromY=function(e,r){e=new Yi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),s=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),u=s.redMul(i.redInvm());if(u.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var v=u.redSqrt();if(v.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return v.fromRed().isOdd()!==r&&(v=v.redNeg()),this.point(v,e)};$i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),s=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return s.cmp(i)===0};function Yt(t,e,r,n,s){Au.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Yi(e,16),this.y=new Yi(r,16),this.z=n?new Yi(n,16):this.curve.one,this.t=s&&new Yi(s,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.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}M5(Yt,Au.BasePoint);$i.prototype.pointFromJSON=function(e){return Yt.fromJSON(this,e)};$i.prototype.point=function(e,r,n,s){return new Yt(this,e,r,n,s)};Yt.fromJSON=function(e,r){return new Yt(e,r[0],r[1],r[2])};Yt.prototype.inspect=function(){return this.isInfinity()?"":""};Yt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Yt.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var s=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),u=s.redAdd(r),v=u.redSub(n),b=s.redSub(r),m=i.redMul(v),g=u.redMul(b),_=i.redMul(b),A=v.redMul(u);return this.curve.point(m,g,A,_)};Yt.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),s,i,u,v,b,m;if(this.curve.twisted){v=this.curve._mulA(r);var g=v.redAdd(n);this.zOne?(s=e.redSub(r).redSub(n).redMul(g.redSub(this.curve.two)),i=g.redMul(v.redSub(n)),u=g.redSqr().redSub(g).redSub(g)):(b=this.z.redSqr(),m=g.redSub(b).redISub(b),s=e.redSub(r).redISub(n).redMul(m),i=g.redMul(v.redSub(n)),u=g.redMul(m))}else v=r.redAdd(n),b=this.curve._mulC(this.z).redSqr(),m=v.redSub(b).redSub(b),s=this.curve._mulC(e.redISub(v)).redMul(m),i=this.curve._mulC(v).redMul(r.redISub(n)),u=v.redMul(m);return this.curve.point(s,i,u)};Yt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Yt.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),s=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),u=n.redSub(r),v=i.redSub(s),b=i.redAdd(s),m=n.redAdd(r),g=u.redMul(v),_=b.redMul(m),A=u.redMul(m),E=v.redMul(b);return this.curve.point(g,_,E,A)};Yt.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),s=this.x.redMul(e.x),i=this.y.redMul(e.y),u=this.curve.d.redMul(s).redMul(i),v=n.redSub(u),b=n.redAdd(u),m=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(i),g=r.redMul(v).redMul(m),_,A;return this.curve.twisted?(_=r.redMul(b).redMul(i.redSub(this.curve._mulA(s))),A=v.redMul(b)):(_=r.redMul(b).redMul(i.redSub(s)),A=this.curve._mulC(v).redMul(b)),this.curve.point(g,_,A)};Yt.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Yt.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Yt.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};Yt.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};Yt.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};Yt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Yt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Yt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Yt.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Yt.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),s=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(s),this.x.cmp(r)===0)return!0}};Yt.prototype.toP=Yt.prototype.normalize;Yt.prototype.mixedAdd=Yt.prototype.add;(function(t){var e=t;e.base=_u,e.short=nP,e.mont=aP,e.edwards=fP})(Fv);var Eu={},xh,wb;function cP(){return wb||(wb=1,xh={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),xh}(function(t){var e=t,r=Cr,n=Fv,s=Rn,i=s.assert;function u(m){m.type==="short"?this.curve=new n.short(m):m.type==="edwards"?this.curve=new n.edwards(m):this.curve=new n.mont(m),this.g=this.curve.g,this.n=this.curve.n,this.hash=m.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=u;function v(m,g){Object.defineProperty(e,m,{configurable:!0,enumerable:!0,get:function(){var _=new u(g);return Object.defineProperty(e,m,{configurable:!0,enumerable:!0,value:_}),_}})}v("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:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),v("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:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),v("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:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),v("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:r.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"]}),v("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:r.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"]}),v("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),v("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:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var b;try{b=cP()}catch{b=void 0}v("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:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})})(Eu);var lP=Cr,wo=Ov,A5=qn;function Fa(t){if(!(this instanceof Fa))return new Fa(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=wo.toArray(t.entropy,t.entropyEnc||"hex"),r=wo.toArray(t.nonce,t.nonceEnc||"hex"),n=wo.toArray(t.pers,t.persEnc||"hex");A5(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var uP=Fa;Fa.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Fa.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=wo.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var wl=Ki.exports,Uv=Rn,vP=Uv.assert;function Su(t,e){if(t instanceof Su)return t;this._importDER(t,e)||(vP(t.r&&t.s,"Signature without r or s"),this.r=new wl(t.r,16),this.s=new wl(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var mP=Su;function gP(){this.place=0}function wh(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var s=0,i=0,u=e.place;i>>=0;return s<=127?!1:(e.place=u,s)}function _b(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Su.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=_b(r),n=_b(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];_h(s,r.length),s=s.concat(r),s.push(2),_h(s,n.length);var i=s.concat(n),u=[48];return _h(u,i.length),u=u.concat(i),Uv.encode(u,e)};var Mh,Mb;function bP(){if(Mb)return Mh;Mb=1;var t=Ki.exports,e=uP,r=Rn,n=Eu,s=Iv(),i=r.assert,u=pP,v=mP;function b(m){if(!(this instanceof b))return new b(m);typeof m=="string"&&(i(Object.prototype.hasOwnProperty.call(n,m),"Unknown curve "+m),m=n[m]),m instanceof n.PresetCurve&&(m={curve:m}),this.curve=m.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=m.curve.g,this.g.precompute(m.curve.n.bitLength()+1),this.hash=m.hash||m.curve.hash}return Mh=b,b.prototype.keyPair=function(g){return new u(this,g)},b.prototype.keyFromPrivate=function(g,_){return u.fromPrivate(this,g,_)},b.prototype.keyFromPublic=function(g,_){return u.fromPublic(this,g,_)},b.prototype.genKeyPair=function(g){g||(g={});for(var _=new e({hash:this.hash,pers:g.pers,persEnc:g.persEnc||"utf8",entropy:g.entropy||s(this.hash.hmacStrength),entropyEnc:g.entropy&&g.entropyEnc||"utf8",nonce:this.n.toArray()}),A=this.n.byteLength(),E=this.n.sub(new t(2));;){var R=new t(_.generate(A));if(!(R.cmp(E)>0))return R.iaddn(1),this.keyFromPrivate(R)}},b.prototype._truncateToN=function(g,_){var A=g.byteLength()*8-this.n.bitLength();return A>0&&(g=g.ushrn(A)),!_&&g.cmp(this.n)>=0?g.sub(this.n):g},b.prototype.sign=function(g,_,A,E){typeof A=="object"&&(E=A,A=null),E||(E={}),_=this.keyFromPrivate(_,A),g=this._truncateToN(new t(g,16));for(var R=this.n.byteLength(),B=_.getPrivate().toArray("be",R),T=g.toArray("be",R),F=new e({hash:this.hash,entropy:B,nonce:T,pers:E.pers,persEnc:E.persEnc||"utf8"}),O=this.n.sub(new t(1)),q=0;;q++){var H=E.k?E.k(q):new t(F.generate(this.n.byteLength()));if(H=this._truncateToN(H,!0),!(H.cmpn(1)<=0||H.cmp(O)>=0)){var G=this.g.mul(H);if(!G.isInfinity()){var re=G.getX(),ne=re.umod(this.n);if(ne.cmpn(0)!==0){var Y=H.invm(this.n).mul(ne.mul(_.getPrivate()).iadd(g));if(Y=Y.umod(this.n),Y.cmpn(0)!==0){var W=(G.getY().isOdd()?1:0)|(re.cmp(ne)!==0?2:0);return E.canonical&&Y.cmp(this.nh)>0&&(Y=this.n.sub(Y),W^=1),new v({r:ne,s:Y,recoveryParam:W})}}}}}},b.prototype.verify=function(g,_,A,E){g=this._truncateToN(new t(g,16)),A=this.keyFromPublic(A,E),_=new v(_,"hex");var R=_.r,B=_.s;if(R.cmpn(1)<0||R.cmp(this.n)>=0||B.cmpn(1)<0||B.cmp(this.n)>=0)return!1;var T=B.invm(this.n),F=T.mul(g).umod(this.n),O=T.mul(R).umod(this.n),q;return this.curve._maxwellTrick?(q=this.g.jmulAdd(F,A.getPublic(),O),q.isInfinity()?!1:q.eqXToP(R)):(q=this.g.mulAdd(F,A.getPublic(),O),q.isInfinity()?!1:q.getX().umod(this.n).cmp(R)===0)},b.prototype.recoverPubKey=function(m,g,_,A){i((3&_)===_,"The recovery param is more than two bits"),g=new v(g,A);var E=this.n,R=new t(m),B=g.r,T=g.s,F=_&1,O=_>>1;if(B.cmp(this.curve.p.umod(this.curve.n))>=0&&O)throw new Error("Unable to find sencond key candinate");O?B=this.curve.pointFromX(B.add(this.curve.n),F):B=this.curve.pointFromX(B,F);var q=g.r.invm(E),H=E.sub(R).mul(q).umod(E),G=T.mul(q).umod(E);return this.g.mulAdd(H,B,G)},b.prototype.getKeyRecoveryParam=function(m,g,_,A){if(g=new v(g,A),g.recoveryParam!==null)return g.recoveryParam;for(var E=0;E<4;E++){var R;try{R=this.recoverPubKey(m,g,E)}catch{continue}if(R.eq(_))return E}throw new Error("Unable to find valid recovery factor")},Mh}var P0=Rn,E5=P0.assert,Ab=P0.parseBytes,Qs=P0.cachedProperty;function Nr(t,e){this.eddsa=t,this._secret=Ab(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Ab(e.pub)}Nr.fromPublic=function(e,r){return r instanceof Nr?r:new Nr(e,{pub:r})};Nr.fromSecret=function(e,r){return r instanceof Nr?r:new Nr(e,{secret:r})};Nr.prototype.secret=function(){return this._secret};Qs(Nr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Qs(Nr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Qs(Nr,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,s=r.slice(0,e.encodingLength);return s[0]&=248,s[n]&=127,s[n]|=64,s});Qs(Nr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Qs(Nr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Qs(Nr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Nr.prototype.sign=function(e){return E5(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Nr.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};Nr.prototype.getSecret=function(e){return E5(this._secret,"KeyPair is public only"),P0.encode(this.secret(),e)};Nr.prototype.getPublic=function(e){return P0.encode(this.pubBytes(),e)};var yP=Nr,xP=Ki.exports,Ru=Rn,wP=Ru.assert,Cu=Ru.cachedProperty,_P=Ru.parseBytes;function Fo(t,e){this.eddsa=t,typeof e!="object"&&(e=_P(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),wP(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof xP&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Cu(Fo,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Cu(Fo,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Cu(Fo,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Cu(Fo,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Fo.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Fo.prototype.toHex=function(){return Ru.encode(this.toBytes(),"hex").toUpperCase()};var MP=Fo,AP=Cr,EP=Eu,Fs=Rn,SP=Fs.assert,S5=Fs.parseBytes,R5=yP,Eb=MP;function vn(t){if(SP(t==="ed25519","only tested with ed25519 so far"),!(this instanceof vn))return new vn(t);t=EP[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=AP.sha512}var RP=vn;vn.prototype.sign=function(e,r){e=S5(e);var n=this.keyFromSecret(r),s=this.hashInt(n.messagePrefix(),e),i=this.g.mul(s),u=this.encodePoint(i),v=this.hashInt(u,n.pubBytes(),e).mul(n.priv()),b=s.add(v).umod(this.curve.n);return this.makeSignature({R:i,S:b,Rencoded:u})};vn.prototype.verify=function(e,r,n){e=S5(e),r=this.makeSignature(r);var s=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),s.pubBytes(),e),u=this.g.mul(r.S()),v=r.R().add(s.pub().mul(i));return v.eq(u)};vn.prototype.hashInt=function(){for(var e=this.hash(),r=0;r0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(Eh)),Eh.exports}var Sh={},Rh={},Ch,Cb;function Kv(){if(Cb)return Ch;Cb=1;var t=He,e=t.Buffer,r={},n;for(n in t)!t.hasOwnProperty(n)||n==="SlowBuffer"||n==="Buffer"||(r[n]=t[n]);var s=r.Buffer={};for(n in e)!e.hasOwnProperty(n)||n==="allocUnsafe"||n==="allocUnsafeSlow"||(s[n]=e[n]);if(r.Buffer.prototype=e.prototype,(!s.from||s.from===Uint8Array.from)&&(s.from=function(i,u,v){if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof i);if(i&&typeof i.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);return e(i,u,v)}),s.alloc||(s.alloc=function(i,u,v){if(typeof i!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof i);if(i<0||i>=2*(1<<30))throw new RangeError('The value "'+i+'" is invalid for option "size"');var b=e(i);return!u||u.length===0?b.fill(0):typeof v=="string"?b.fill(u,v):b.fill(u),b}),!r.kStringMaxLength)try{r.kStringMaxLength=Je.exports.binding("buffer").kStringMaxLength}catch{}return r.constants||(r.constants={MAX_LENGTH:r.kMaxLength},r.kStringMaxLength&&(r.constants.MAX_STRING_LENGTH=r.kStringMaxLength)),Ch=r,Ch}var Bh={},Bb;function $v(){if(Bb)return Bh;Bb=1;const t=ct.exports;function e(n){this._reporterState={obj:null,path:[],options:n||{},errors:[]}}Bh.Reporter=e,e.prototype.isError=function(s){return s instanceof r},e.prototype.save=function(){const s=this._reporterState;return{obj:s.obj,pathLen:s.path.length}},e.prototype.restore=function(s){const i=this._reporterState;i.obj=s.obj,i.path=i.path.slice(0,s.pathLen)},e.prototype.enterKey=function(s){return this._reporterState.path.push(s)},e.prototype.exitKey=function(s){const i=this._reporterState;i.path=i.path.slice(0,s-1)},e.prototype.leaveKey=function(s,i,u){const v=this._reporterState;this.exitKey(s),v.obj!==null&&(v.obj[i]=u)},e.prototype.path=function(){return this._reporterState.path.join("/")},e.prototype.enterObject=function(){const s=this._reporterState,i=s.obj;return s.obj={},i},e.prototype.leaveObject=function(s){const i=this._reporterState,u=i.obj;return i.obj=s,u},e.prototype.error=function(s){let i;const u=this._reporterState,v=s instanceof r;if(v?i=s:i=new r(u.path.map(function(b){return"["+JSON.stringify(b)+"]"}).join(""),s.message||s,s.stack),!u.options.partial)throw i;return v||u.errors.push(i),i},e.prototype.wrapResult=function(s){const i=this._reporterState;return i.options.partial?{result:this.isError(s)?null:s,errors:i.errors}:s};function r(n,s){this.path=n,this.rethrow(s)}return t(r,Error),r.prototype.rethrow=function(s){if(this.message=s+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(i){this.stack=i.stack}return this},Bh}var lc={},Nb;function u0(){if(Nb)return lc;Nb=1;const t=ct.exports,e=$v().Reporter,r=Kv().Buffer;function n(i,u){if(e.call(this,u),!r.isBuffer(i)){this.error("Input not Buffer");return}this.base=i,this.offset=0,this.length=i.length}t(n,e),lc.DecoderBuffer=n,n.isDecoderBuffer=function(u){return u instanceof n?!0:typeof u=="object"&&r.isBuffer(u.base)&&u.constructor.name==="DecoderBuffer"&&typeof u.offset=="number"&&typeof u.length=="number"&&typeof u.save=="function"&&typeof u.restore=="function"&&typeof u.isEmpty=="function"&&typeof u.readUInt8=="function"&&typeof u.skip=="function"&&typeof u.raw=="function"},n.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},n.prototype.restore=function(u){const v=new n(this.base);return v.offset=u.offset,v.length=this.offset,this.offset=u.offset,e.prototype.restore.call(this,u.reporter),v},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(u){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(u||"DecoderBuffer overrun")},n.prototype.skip=function(u,v){if(!(this.offset+u<=this.length))return this.error(v||"DecoderBuffer overrun");const b=new n(this.base);return b._reporterState=this._reporterState,b.offset=this.offset,b.length=this.offset+u,this.offset+=u,b},n.prototype.raw=function(u){return this.base.slice(u?u.offset:this.offset,this.length)};function s(i,u){if(Array.isArray(i))this.length=0,this.value=i.map(function(v){return s.isEncoderBuffer(v)||(v=new s(v,u)),this.length+=v.length,v},this);else if(typeof i=="number"){if(!(0<=i&&i<=255))return u.error("non-byte EncoderBuffer value");this.value=i,this.length=1}else if(typeof i=="string")this.value=i,this.length=r.byteLength(i);else if(r.isBuffer(i))this.value=i,this.length=i.length;else return u.error("Unsupported type: "+typeof i)}return lc.EncoderBuffer=s,s.isEncoderBuffer=function(u){return u instanceof s?!0:typeof u=="object"&&u.constructor.name==="EncoderBuffer"&&typeof u.length=="number"&&typeof u.join=="function"},s.prototype.join=function(u,v){return u||(u=r.alloc(this.length)),v||(v=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(b){b.join(u,v),v+=b.length}):(typeof this.value=="number"?u[v]=this.value:typeof this.value=="string"?u.write(this.value,v):r.isBuffer(this.value)&&this.value.copy(u,v),v+=this.length)),u},lc}var Nh,Tb;function qv(){if(Tb)return Nh;Tb=1;const t=$v().Reporter,e=u0().EncoderBuffer,r=u0().DecoderBuffer,n=qn,s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s),u=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function v(m,g,_){const A={};this._baseState=A,A.name=_,A.enc=m,A.parent=g||null,A.children=null,A.tag=null,A.args=null,A.reverseArgs=null,A.choice=null,A.optional=!1,A.any=!1,A.obj=!1,A.use=null,A.useDecoder=null,A.key=null,A.default=null,A.explicit=null,A.implicit=null,A.contains=null,A.parent||(A.children=[],this._wrap())}Nh=v;const b=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return v.prototype.clone=function(){const g=this._baseState,_={};b.forEach(function(E){_[E]=g[E]});const A=new this.constructor(_.parent);return A._baseState=_,A},v.prototype._wrap=function(){const g=this._baseState;i.forEach(function(_){this[_]=function(){const E=new this.constructor(this);return g.children.push(E),E[_].apply(E,arguments)}},this)},v.prototype._init=function(g){const _=this._baseState;n(_.parent===null),g.call(this),_.children=_.children.filter(function(A){return A._baseState.parent===this},this),n.equal(_.children.length,1,"Root node can have only one child")},v.prototype._useArgs=function(g){const _=this._baseState,A=g.filter(function(E){return E instanceof this.constructor},this);g=g.filter(function(E){return!(E instanceof this.constructor)},this),A.length!==0&&(n(_.children===null),_.children=A,A.forEach(function(E){E._baseState.parent=this},this)),g.length!==0&&(n(_.args===null),_.args=g,_.reverseArgs=g.map(function(E){if(typeof E!="object"||E.constructor!==Object)return E;const R={};return Object.keys(E).forEach(function(B){B==(B|0)&&(B|=0);const T=E[B];R[T]=B}),R}))},u.forEach(function(m){v.prototype[m]=function(){const _=this._baseState;throw new Error(m+" not implemented for encoding: "+_.enc)}}),s.forEach(function(m){v.prototype[m]=function(){const _=this._baseState,A=Array.prototype.slice.call(arguments);return n(_.tag===null),_.tag=m,this._useArgs(A),this}}),v.prototype.use=function(g){n(g);const _=this._baseState;return n(_.use===null),_.use=g,this},v.prototype.optional=function(){const g=this._baseState;return g.optional=!0,this},v.prototype.def=function(g){const _=this._baseState;return n(_.default===null),_.default=g,_.optional=!0,this},v.prototype.explicit=function(g){const _=this._baseState;return n(_.explicit===null&&_.implicit===null),_.explicit=g,this},v.prototype.implicit=function(g){const _=this._baseState;return n(_.explicit===null&&_.implicit===null),_.implicit=g,this},v.prototype.obj=function(){const g=this._baseState,_=Array.prototype.slice.call(arguments);return g.obj=!0,_.length!==0&&this._useArgs(_),this},v.prototype.key=function(g){const _=this._baseState;return n(_.key===null),_.key=g,this},v.prototype.any=function(){const g=this._baseState;return g.any=!0,this},v.prototype.choice=function(g){const _=this._baseState;return n(_.choice===null),_.choice=g,this._useArgs(Object.keys(g).map(function(A){return g[A]})),this},v.prototype.contains=function(g){const _=this._baseState;return n(_.use===null),_.contains=g,this},v.prototype._decode=function(g,_){const A=this._baseState;if(A.parent===null)return g.wrapResult(A.children[0]._decode(g,_));let E=A.default,R=!0,B=null;if(A.key!==null&&(B=g.enterKey(A.key)),A.optional){let F=null;if(A.explicit!==null?F=A.explicit:A.implicit!==null?F=A.implicit:A.tag!==null&&(F=A.tag),F===null&&!A.any){const O=g.save();try{A.choice===null?this._decodeGeneric(A.tag,g,_):this._decodeChoice(g,_),R=!0}catch{R=!1}g.restore(O)}else if(R=this._peekTag(g,F,A.any),g.isError(R))return R}let T;if(A.obj&&R&&(T=g.enterObject()),R){if(A.explicit!==null){const O=this._decodeTag(g,A.explicit);if(g.isError(O))return O;g=O}const F=g.offset;if(A.use===null&&A.choice===null){let O;A.any&&(O=g.save());const q=this._decodeTag(g,A.implicit!==null?A.implicit:A.tag,A.any);if(g.isError(q))return q;A.any?E=g.raw(O):g=q}if(_&&_.track&&A.tag!==null&&_.track(g.path(),F,g.length,"tagged"),_&&_.track&&A.tag!==null&&_.track(g.path(),g.offset,g.length,"content"),A.any||(A.choice===null?E=this._decodeGeneric(A.tag,g,_):E=this._decodeChoice(g,_)),g.isError(E))return E;if(!A.any&&A.choice===null&&A.children!==null&&A.children.forEach(function(q){q._decode(g,_)}),A.contains&&(A.tag==="octstr"||A.tag==="bitstr")){const O=new r(E);E=this._getUse(A.contains,g._reporterState.obj)._decode(O,_)}}return A.obj&&R&&(E=g.leaveObject(T)),A.key!==null&&(E!==null||R===!0)?g.leaveKey(B,A.key,E):B!==null&&g.exitKey(B),E},v.prototype._decodeGeneric=function(g,_,A){const E=this._baseState;return g==="seq"||g==="set"?null:g==="seqof"||g==="setof"?this._decodeList(_,g,E.args[0],A):/str$/.test(g)?this._decodeStr(_,g,A):g==="objid"&&E.args?this._decodeObjid(_,E.args[0],E.args[1],A):g==="objid"?this._decodeObjid(_,null,null,A):g==="gentime"||g==="utctime"?this._decodeTime(_,g,A):g==="null_"?this._decodeNull(_,A):g==="bool"?this._decodeBool(_,A):g==="objDesc"?this._decodeStr(_,g,A):g==="int"||g==="enum"?this._decodeInt(_,E.args&&E.args[0],A):E.use!==null?this._getUse(E.use,_._reporterState.obj)._decode(_,A):_.error("unknown tag: "+g)},v.prototype._getUse=function(g,_){const A=this._baseState;return A.useDecoder=this._use(g,_),n(A.useDecoder._baseState.parent===null),A.useDecoder=A.useDecoder._baseState.children[0],A.implicit!==A.useDecoder._baseState.implicit&&(A.useDecoder=A.useDecoder.clone(),A.useDecoder._baseState.implicit=A.implicit),A.useDecoder},v.prototype._decodeChoice=function(g,_){const A=this._baseState;let E=null,R=!1;return Object.keys(A.choice).some(function(B){const T=g.save(),F=A.choice[B];try{const O=F._decode(g,_);if(g.isError(O))return!1;E={type:B,value:O},R=!0}catch{return g.restore(T),!1}return!0},this),R?E:g.error("Choice not matched")},v.prototype._createEncoderBuffer=function(g){return new e(g,this.reporter)},v.prototype._encode=function(g,_,A){const E=this._baseState;if(E.default!==null&&E.default===g)return;const R=this._encodeValue(g,_,A);if(R!==void 0&&!this._skipDefault(R,_,A))return R},v.prototype._encodeValue=function(g,_,A){const E=this._baseState;if(E.parent===null)return E.children[0]._encode(g,_||new t);let R=null;if(this.reporter=_,E.optional&&g===void 0)if(E.default!==null)g=E.default;else return;let B=null,T=!1;if(E.any)R=this._createEncoderBuffer(g);else if(E.choice)R=this._encodeChoice(g,_);else if(E.contains)B=this._getUse(E.contains,A)._encode(g,_),T=!0;else if(E.children)B=E.children.map(function(F){if(F._baseState.tag==="null_")return F._encode(null,_,g);if(F._baseState.key===null)return _.error("Child should have a key");const O=_.enterKey(F._baseState.key);if(typeof g!="object")return _.error("Child expected, but input is not object");const q=F._encode(g[F._baseState.key],_,g);return _.leaveKey(O),q},this).filter(function(F){return F}),B=this._createEncoderBuffer(B);else if(E.tag==="seqof"||E.tag==="setof"){if(!(E.args&&E.args.length===1))return _.error("Too many args for : "+E.tag);if(!Array.isArray(g))return _.error("seqof/setof, but data is not Array");const F=this.clone();F._baseState.implicit=null,B=this._createEncoderBuffer(g.map(function(O){const q=this._baseState;return this._getUse(q.args[0],g)._encode(O,_)},F))}else E.use!==null?R=this._getUse(E.use,A)._encode(g,_):(B=this._encodePrimitive(E.tag,g),T=!0);if(!E.any&&E.choice===null){const F=E.implicit!==null?E.implicit:E.tag,O=E.implicit===null?"universal":"context";F===null?E.use===null&&_.error("Tag could be omitted only for .use()"):E.use===null&&(R=this._encodeComposite(F,T,O,B))}return E.explicit!==null&&(R=this._encodeComposite(E.explicit,!1,"context",R)),R},v.prototype._encodeChoice=function(g,_){const A=this._baseState,E=A.choice[g.type];return E||n(!1,g.type+" not found in "+JSON.stringify(Object.keys(A.choice))),E._encode(g.value,_)},v.prototype._encodePrimitive=function(g,_){const A=this._baseState;if(/str$/.test(g))return this._encodeStr(_,g);if(g==="objid"&&A.args)return this._encodeObjid(_,A.reverseArgs[0],A.args[1]);if(g==="objid")return this._encodeObjid(_,null,null);if(g==="gentime"||g==="utctime")return this._encodeTime(_,g);if(g==="null_")return this._encodeNull();if(g==="int"||g==="enum")return this._encodeInt(_,A.args&&A.reverseArgs[0]);if(g==="bool")return this._encodeBool(_);if(g==="objDesc")return this._encodeStr(_,g);throw new Error("Unsupported tag: "+g)},v.prototype._isNumstr=function(g){return/^[0-9 ]*$/.test(g)},v.prototype._isPrintstr=function(g){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(g)},Nh}var Th={},kb;function Hv(){return kb||(kb=1,function(t){function e(r){const n={};return Object.keys(r).forEach(function(s){(s|0)==s&&(s=s|0);const i=r[s];n[i]=s}),n}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(Th)),Th}var kh,Pb;function B5(){if(Pb)return kh;Pb=1;const t=ct.exports,e=Kv().Buffer,r=qv(),n=Hv();function s(b){this.enc="der",this.name=b.name,this.entity=b,this.tree=new i,this.tree._init(b.body)}kh=s,s.prototype.encode=function(m,g){return this.tree._encode(m,g).join()};function i(b){r.call(this,"der",b)}t(i,r),i.prototype._encodeComposite=function(m,g,_,A){const E=v(m,g,_,this.reporter);if(A.length<128){const T=e.alloc(2);return T[0]=E,T[1]=A.length,this._createEncoderBuffer([T,A])}let R=1;for(let T=A.length;T>=256;T>>=8)R++;const B=e.alloc(1+1+R);B[0]=E,B[1]=128|R;for(let T=1+R,F=A.length;F>0;T--,F>>=8)B[T]=F&255;return this._createEncoderBuffer([B,A])},i.prototype._encodeStr=function(m,g){if(g==="bitstr")return this._createEncoderBuffer([m.unused|0,m.data]);if(g==="bmpstr"){const _=e.alloc(m.length*2);for(let A=0;A=40)return this.reporter.error("Second objid identifier OOB");m.splice(0,2,m[0]*40+m[1])}let A=0;for(let B=0;B=128;T>>=7)A++}const E=e.alloc(A);let R=E.length-1;for(let B=m.length-1;B>=0;B--){let T=m[B];for(E[R--]=T&127;(T>>=7)>0;)E[R--]=128|T&127}return this._createEncoderBuffer(E)};function u(b){return b<10?"0"+b:b}i.prototype._encodeTime=function(m,g){let _;const A=new Date(m);return g==="gentime"?_=[u(A.getUTCFullYear()),u(A.getUTCMonth()+1),u(A.getUTCDate()),u(A.getUTCHours()),u(A.getUTCMinutes()),u(A.getUTCSeconds()),"Z"].join(""):g==="utctime"?_=[u(A.getUTCFullYear()%100),u(A.getUTCMonth()+1),u(A.getUTCDate()),u(A.getUTCHours()),u(A.getUTCMinutes()),u(A.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+g+" time is not supported yet"),this._encodeStr(_,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(m,g){if(typeof m=="string"){if(!g)return this.reporter.error("String int or enum given, but no values map");if(!g.hasOwnProperty(m))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(m));m=g[m]}if(typeof m!="number"&&!e.isBuffer(m)){const E=m.toArray();!m.sign&&E[0]&128&&E.unshift(0),m=e.from(E)}if(e.isBuffer(m)){let E=m.length;m.length===0&&E++;const R=e.alloc(E);return m.copy(R),m.length===0&&(R[0]=0),this._createEncoderBuffer(R)}if(m<128)return this._createEncoderBuffer(m);if(m<256)return this._createEncoderBuffer([0,m]);let _=1;for(let E=m;E>=256;E>>=8)_++;const A=new Array(_);for(let E=A.length-1;E>=0;E--)A[E]=m&255,m>>=8;return A[0]&128&&A.unshift(0),this._createEncoderBuffer(e.from(A))},i.prototype._encodeBool=function(m){return this._createEncoderBuffer(m?255:0)},i.prototype._use=function(m,g){return typeof m=="function"&&(m=m(g)),m._getEncoder("der").tree},i.prototype._skipDefault=function(m,g,_){const A=this._baseState;let E;if(A.default===null)return!1;const R=m.join();if(A.defaultBuffer===void 0&&(A.defaultBuffer=this._encodeValue(A.default,g,_).join()),R.length!==A.defaultBuffer.length)return!1;for(E=0;E=31?_.error("Multi-octet tag encoding unsupported"):(m||(A|=32),A|=n.tagClassByName[g||"universal"]<<6,A)}return kh}var Ph,Ib;function CP(){if(Ib)return Ph;Ib=1;const t=ct.exports,e=B5();function r(n){e.call(this,n),this.enc="pem"}return t(r,e),Ph=r,r.prototype.encode=function(s,i){const v=e.prototype.encode.call(this,s).toString("base64"),b=["-----BEGIN "+i.label+"-----"];for(let m=0;m>6],E=(_&32)===0;if((_&31)===31){let B=_;for(_=0;(B&128)===128;){if(B=m.readUInt8(g),m.isError(B))return B;_<<=7,_|=B&127}}else _&=31;const R=s.tag[_];return{cls:A,primitive:E,tag:_,tagStr:R}}function b(m,g,_){let A=m.readUInt8(_);if(m.isError(A))return A;if(!g&&A===128)return null;if((A&128)===0)return A;const E=A&127;if(E>4)return m.error("length octect is too long");A=0;for(let R=0;R0&&O.ishrn(q),O}function E(T,F){T=A(T,F),T=T.mod(F);var O=t.from(T.toArray());if(O.length=g)throw new Error("invalid sig")}return qh=i,qh}var Hh,Zb;function UP(){if(Zb)return Hh;Zb=1;var t=ut.exports.Buffer,e=N0,r=pl.exports,n=ct.exports,s=FP(),i=LP(),u=s5;Object.keys(u).forEach(function(_){u[_].id=t.from(u[_].id,"hex"),u[_.toLowerCase()]=u[_]});function v(_){r.Writable.call(this);var A=u[_];if(!A)throw new Error("Unknown message digest");this._hashType=A.hash,this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(v,r.Writable),v.prototype._write=function(A,E,R){this._hash.update(A),R()},v.prototype.update=function(A,E){return typeof A=="string"&&(A=t.from(A,E)),this._hash.update(A),this},v.prototype.sign=function(A,E){this.end();var R=this._hash.digest(),B=s(R,A,this._hashType,this._signType,this._tag);return E?B.toString(E):B};function b(_){r.Writable.call(this);var A=u[_];if(!A)throw new Error("Unknown message digest");this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(b,r.Writable),b.prototype._write=function(A,E,R){this._hash.update(A),R()},b.prototype.update=function(A,E){return typeof A=="string"&&(A=t.from(A,E)),this._hash.update(A),this},b.prototype.verify=function(A,E,R){typeof E=="string"&&(E=t.from(E,R)),this.end();var B=this._hash.digest();return i(E,B,A,this._signType,this._tag)};function m(_){return new v(_)}function g(_){return new b(_)}return Hh={Sign:m,Verify:g,createSign:m,createVerify:g},Hh}var zh={exports:{}},Jb;function KP(){return Jb||(Jb=1,function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(zh)),zh.exports}var jh,Xb;function $P(){if(Xb)return jh;Xb=1;var t=Bu(),e=KP();jh=function(u){return new n(u)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function n(i){this.curveType=r[i],this.curveType||(this.curveType={name:i}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(i,u){return this.keys=this.curve.genKeyPair(),this.getPublicKey(i,u)},n.prototype.computeSecret=function(i,u,v){u=u||"utf8",He.Buffer.isBuffer(i)||(i=new He.Buffer(i,u));var b=this.curve.keyFromPublic(i).getPublic(),m=b.mul(this.keys.getPrivate()).getX();return s(m,v,this.curveType.byteLength)},n.prototype.getPublicKey=function(i,u){var v=this.keys.getPublic(u==="compressed",!0);return u==="hybrid"&&(v[v.length-1]%2?v[0]=7:v[0]=6),s(v,i)},n.prototype.getPrivateKey=function(i){return s(this.keys.getPrivate(),i)},n.prototype.setPublicKey=function(i,u){return u=u||"utf8",He.Buffer.isBuffer(i)||(i=new He.Buffer(i,u)),this.keys._importPublic(i),this},n.prototype.setPrivateKey=function(i,u){u=u||"utf8",He.Buffer.isBuffer(i)||(i=new He.Buffer(i,u));var v=new e(i);return v=v.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(v),this};function s(i,u,v){Array.isArray(i)||(i=i.toArray());var b=new He.Buffer(i);if(v&&b.length0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(Zh)),Zh.exports}var Jh,ty;function F5(){if(ty)return Jh;ty=1;var t=zv(),e=ut.exports.Buffer;function r(n,s){return e.from(n.toRed(t.mont(s.modulus)).redPow(new t(s.publicExponent)).fromRed().toArray())}return Jh=r,Jh}var Xh,ry;function qP(){if(ry)return Xh;ry=1;var t=Nu(),e=Oa.exports,r=N0,n=D5(),s=O5(),i=zv(),u=F5(),v=Dv(),b=ut.exports.Buffer;Xh=function(E,R,B){var T;E.padding?T=E.padding:B?T=1:T=4;var F=t(E),O;if(T===4)O=m(F,R);else if(T===1)O=g(F,R,B);else if(T===3){if(O=new i(R),O.cmp(F.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return B?v(O,F):u(O,F)};function m(A,E){var R=A.modulus.byteLength(),B=E.length,T=r("sha1").update(b.alloc(0)).digest(),F=T.length,O=2*F;if(B>R-O-2)throw new Error("message too long");var q=b.alloc(R-B-O-2),H=R-F-1,G=e(F),re=s(b.concat([T,q,b.alloc(1,1),E],H),n(G,H)),ne=s(G,n(re,F));return new i(b.concat([b.alloc(1),ne,re],R))}function g(A,E,R){var B=E.length,T=A.modulus.byteLength();if(B>T-11)throw new Error("message too long");var F;return R?F=b.alloc(T-B-3,255):F=_(T-B-3),new i(b.concat([b.from([0,R?1:2]),F,b.alloc(1),E],T))}function _(A){for(var E=b.allocUnsafe(A),R=0,B=e(A*2),T=0,F;RF||new n(E).cmp(T.modulus)>=0)throw new Error("decryption error");var O;R?O=u(new n(E),T):O=s(E,T);var q=v.alloc(F-O.length);if(O=v.concat([q,O],F),B===4)return b(T,O);if(B===1)return m(T,O,R);if(B===3)return O;throw new Error("unknown padding")};function b(_,A){var E=_.modulus.byteLength(),R=i("sha1").update(v.alloc(0)).digest(),B=R.length;if(A[0]!==0)throw new Error("decryption error");var T=A.slice(1,B+1),F=A.slice(B+1),O=r(T,e(F,B)),q=r(F,e(O,E-B-1));if(g(R,q.slice(0,B)))throw new Error("decryption error");for(var H=B;q[H]===0;)H++;if(q[H++]!==1)throw new Error("decryption error");return q.slice(H)}function m(_,A,E){for(var R=A.slice(0,2),B=2,T=0;A[B++]!==0;)if(B>=A.length){T++;break}var F=A.slice(2,B-1);if((R.toString("hex")!=="0002"&&!E||R.toString("hex")!=="0001"&&E)&&T++,F.length<8&&T++,T)throw new Error("decryption error");return A.slice(B)}function g(_,A){_=v.from(_),A=v.from(A);var E=0,R=_.length;_.length!==A.length&&(E++,R=Math.min(_.length,A.length));for(var B=-1;++B"u"}t.isPrimitive=f,t.isBuffer=JB;function c(M){return Object.prototype.toString.call(M)}function l(M){return M<10?"0"+M.toString(10):M.toString(10)}var h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(){var M=new Date,C=[l(M.getHours()),l(M.getMinutes()),l(M.getSeconds())].join(":");return[M.getDate(),h[M.getMonth()],C].join(" ")}t.log=function(){console.log("%s - %s",x(),t.format.apply(t,arguments))},t.inherits=ct.exports,t._extend=function(M,C){if(!C||!W(C))return M;for(var P=Object.keys(C),S=P.length;S--;)M[P[S]]=C[P[S]];return M};function w(M,C){return Object.prototype.hasOwnProperty.call(M,C)}var p=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(C){if(typeof C!="function")throw new TypeError('The "original" argument must be of type Function');if(p&&C[p]){var P=C[p];if(typeof P!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(P,p,{value:P,enumerable:!1,writable:!1,configurable:!0}),P}function P(){for(var S,I,U=new Promise(function(X,j){S=X,I=j}),V=[],z=0;z0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(R){var B={data:R,next:this.head};this.length===0&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(this.length!==0){var R=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,R}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(R){if(this.length===0)return"";for(var B=this.head,T=""+B.data;B=B.next;)T+=R+B.data;return T}},{key:"concat",value:function(R){if(this.length===0)return v.alloc(0);for(var B=v.allocUnsafe(R>>>0),T=this.head,F=0;T;)_(T.data,B,F),F+=T.data.length,T=T.next;return B}},{key:"consume",value:function(R,B){var T;return RO.length?O.length:R;if(q===O.length?F+=O:F+=O.slice(0,R),R-=q,R===0){q===O.length?(++T,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=O.slice(q));break}++T}return this.length-=T,F}},{key:"_getBuffer",value:function(R){var B=v.allocUnsafe(R),T=this.head,F=1;for(T.data.copy(B),R-=T.data.length;T=T.next;){var O=T.data,q=R>O.length?O.length:R;if(O.copy(B,B.length-R,0,q),R-=q,R===0){q===O.length?(++F,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=O.slice(q));break}++F}return this.length-=F,B}},{key:g,value:function(R,B){return m(this,e({},B,{depth:0,customInspect:!1}))}}]),A}(),Cd}function YB(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return n||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Je.exports.nextTick(Wp,this,t)):Je.exports.nextTick(Wp,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(i){!e&&i?r._writableState?r._writableState.errorEmitted?Je.exports.nextTick(qc,r):(r._writableState.errorEmitted=!0,Je.exports.nextTick(sg,r,i)):Je.exports.nextTick(sg,r,i):e?(Je.exports.nextTick(qc,r),e(i)):Je.exports.nextTick(qc,r)}),this)}function sg(t,e){Wp(t,e),qc(t)}function qc(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function QB(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Wp(t,e){t.emit("error",e)}function eN(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var F4={destroy:YB,undestroy:QB,errorOrDestroy:eN},Oo={};function tN(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var L4={};function jn(t,e,r){r||(r=Error);function n(i,u,v){return typeof e=="string"?e:e(i,u,v)}var s=function(i){tN(u,i);function u(v,b,m){return i.call(this,n(v,b,m))||this}return u}(r);s.prototype.name=r.name,s.prototype.code=t,L4[t]=s}function fg(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function rN(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function nN(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function iN(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}jn("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);jn("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&rN(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var s;if(nN(t," argument"))s="The ".concat(t," ").concat(n," ").concat(fg(e,"type"));else{var i=iN(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(i," ").concat(n," ").concat(fg(e,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);jn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");jn("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});jn("ERR_STREAM_PREMATURE_CLOSE","Premature close");jn("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});jn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");jn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");jn("ERR_STREAM_WRITE_AFTER_END","write after end");jn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);jn("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);jn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Oo.codes=L4;var aN=Oo.codes.ERR_INVALID_OPT_VALUE;function oN(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function sN(t,e,r,n){var s=oN(e,n,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var i=n?r:"highWaterMark";throw new aN(i,s)}return Math.floor(s)}return t.objectMode?16:16*1024}var U4={getHighWaterMark:sN},fN=cN;function cN(t,e){if(Bd("noDeprecation"))return t;var r=!1;function n(){if(!r){if(Bd("throwDeprecation"))throw new Error(e);Bd("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function Bd(t){try{if(!ue.localStorage)return!1}catch{return!1}var e=ue.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var Nd,cg;function Av(){if(cg)return Nd;cg=1,Nd=Y;function t(I){var U=this;this.next=null,this.entry=null,this.finish=function(){S(U,I)}}var e;Y.WritableState=re;var r={deprecate:fN},n=v4,s=He.Buffer,i=ue.Uint8Array||function(){};function u(I){return s.from(I)}function v(I){return s.isBuffer(I)||I instanceof i}var b=F4,m=U4,g=m.getHighWaterMark,_=Oo.codes,A=_.ERR_INVALID_ARG_TYPE,E=_.ERR_METHOD_NOT_IMPLEMENTED,R=_.ERR_MULTIPLE_CALLBACK,B=_.ERR_STREAM_CANNOT_PIPE,T=_.ERR_STREAM_DESTROYED,F=_.ERR_STREAM_NULL_VALUES,O=_.ERR_STREAM_WRITE_AFTER_END,q=_.ERR_UNKNOWN_ENCODING,H=b.errorOrDestroy;ct.exports(Y,n);function G(){}function re(I,U,V){e=e||Bo(),I=I||{},typeof V!="boolean"&&(V=U instanceof e),this.objectMode=!!I.objectMode,V&&(this.objectMode=this.objectMode||!!I.writableObjectMode),this.highWaterMark=g(this,I,"writableHighWaterMark",V),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var z=I.decodeStrings===!1;this.decodeStrings=!z,this.defaultEncoding=I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){h(U,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}re.prototype.getBuffer=function(){for(var U=this.bufferedRequest,V=[];U;)V.push(U),U=U.next;return V},function(){try{Object.defineProperty(re.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(U){return ne.call(this,U)?!0:this!==Y?!1:U&&U._writableState instanceof re}})):ne=function(U){return U instanceof this};function Y(I){e=e||Bo();var U=this instanceof e;if(!U&&!ne.call(Y,this))return new Y(I);this._writableState=new re(I,this,U),this.writable=!0,I&&(typeof I.write=="function"&&(this._write=I.write),typeof I.writev=="function"&&(this._writev=I.writev),typeof I.destroy=="function"&&(this._destroy=I.destroy),typeof I.final=="function"&&(this._final=I.final)),n.call(this)}Y.prototype.pipe=function(){H(this,new B)};function W(I,U){var V=new O;H(I,V),Je.exports.nextTick(U,V)}function se(I,U,V,z){var X;return V===null?X=new F:typeof V!="string"&&!U.objectMode&&(X=new A("chunk",["string","Buffer"],V)),X?(H(I,X),Je.exports.nextTick(z,X),!1):!0}Y.prototype.write=function(I,U,V){var z=this._writableState,X=!1,j=!z.objectMode&&v(I);return j&&!s.isBuffer(I)&&(I=u(I)),typeof U=="function"&&(V=U,U=null),j?U="buffer":U||(U=z.defaultEncoding),typeof V!="function"&&(V=G),z.ending?W(this,V):(j||se(this,z,I,V))&&(z.pendingcb++,X=a(this,z,j,I,U,V)),X},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var I=this._writableState;I.corked&&(I.corked--,!I.writing&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&p(this,I))},Y.prototype.setDefaultEncoding=function(U){if(typeof U=="string"&&(U=U.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw new q(U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function y(I,U,V){return!I.objectMode&&I.decodeStrings!==!1&&typeof U=="string"&&(U=s.from(U,V)),U}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(I,U,V,z,X,j){if(!V){var N=y(U,z,X);z!==N&&(V=!0,X="buffer",z=N)}var $=U.objectMode?1:z.length;U.length+=$;var ee=U.length>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function dN(t,e,r){var n=e.length-1;if(n=0?(s>0&&(t.lastNeed=s-1),s):--n=0?(s>0&&(t.lastNeed=s-2),s):--n=0?(s>0&&(s===2?s=0:t.lastNeed=s-3),s):0))}function hN(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function pN(t){var e=this.lastTotal-this.lastNeed,r=hN(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function vN(t,e){var r=dN(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function mN(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function gN(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function bN(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function yN(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function xN(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function wN(t){return t.toString(this.encoding)}function _N(t){return t&&t.length?this.write(t):""}var dg=Oo.codes.ERR_STREAM_PREMATURE_CLOSE;function MN(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),s=0;s0)if(typeof N!="string"&&!K.objectMode&&Object.getPrototypeOf(N)!==n.prototype&&(N=i(N)),ee)K.endEmitted?G(j,new F):y(j,K,N,!0);else if(K.ended)G(j,new B);else{if(K.destroyed)return!1;K.reading=!1,K.decoder&&!$?(N=K.decoder.write(N),K.objectMode||N.length!==0?y(j,K,N,!1):p(j,K)):y(j,K,N,!1)}else ee||(K.reading=!1,p(j,K))}return!K.ended&&(K.length=f?j=f:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}function l(j,N){return j<=0||N.length===0&&N.ended?0:N.objectMode?1:j!==j?N.flowing&&N.length?N.buffer.head.data.length:N.length:(j>N.highWaterMark&&(N.highWaterMark=c(j)),j<=N.length?j:N.ended?N.length:(N.needReadable=!0,0))}W.prototype.read=function(j){b("read",j),j=parseInt(j,10);var N=this._readableState,$=j;if(j!==0&&(N.emittedReadable=!1),j===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended))return b("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?V(this):x(this),null;if(j=l(j,N),j===0&&N.ended)return N.length===0&&V(this),null;var ee=N.needReadable;b("need readable",ee),(N.length===0||N.length-j0?J=U(j,N):J=null,J===null?(N.needReadable=N.length<=N.highWaterMark,j=0):(N.length-=j,N.awaitDrain=0),N.length===0&&(N.ended||(N.needReadable=!0),$!==j&&N.ended&&V(this)),J!==null&&this.emit("data",J),J};function h(j,N){if(b("onEofChunk"),!N.ended){if(N.decoder){var $=N.decoder.end();$&&$.length&&(N.buffer.push($),N.length+=N.objectMode?1:$.length)}N.ended=!0,N.sync?x(j):(N.needReadable=!1,N.emittedReadable||(N.emittedReadable=!0,w(j)))}}function x(j){var N=j._readableState;b("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(b("emitReadable",N.flowing),N.emittedReadable=!0,Je.exports.nextTick(w,j))}function w(j){var N=j._readableState;b("emitReadable_",N.destroyed,N.length,N.ended),!N.destroyed&&(N.length||N.ended)&&(j.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,I(j)}function p(j,N){N.readingMore||(N.readingMore=!0,Je.exports.nextTick(o,j,N))}function o(j,N){for(;!N.reading&&!N.ended&&(N.length1&&X(ee.pipes,j)!==-1)&&!te&&(b("false write response, pause",ee.awaitDrain),ee.awaitDrain++),$.pause())}function Ie(ae){b("onerror",ae),Oe(),j.removeListener("error",Ie),e(j,"error")===0&&G(j,ae)}ne(j,"error",Ie);function ie(){j.removeListener("finish",oe),Oe()}j.once("close",ie);function oe(){b("onfinish"),j.removeListener("close",ie),Oe()}j.once("finish",oe);function Oe(){b("unpipe"),$.unpipe(j)}return j.emit("pipe",$),ee.flowing||(b("pipe resume"),$.resume()),j};function d(j){return function(){var $=j._readableState;b("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&e(j,"data")&&($.flowing=!0,I(j))}}W.prototype.unpipe=function(j){var N=this._readableState,$={hasUnpiped:!1};if(N.pipesCount===0)return this;if(N.pipesCount===1)return j&&j!==N.pipes?this:(j||(j=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,j&&j.emit("unpipe",this,$),this);if(!j){var ee=N.pipes,J=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var K=0;K0,ee.flowing!==!1&&this.resume()):j==="readable"&&!ee.endEmitted&&!ee.readableListening&&(ee.readableListening=ee.needReadable=!0,ee.flowing=!1,ee.emittedReadable=!1,b("on readable",ee.length,ee.reading),ee.length?x(this):ee.reading||Je.exports.nextTick(C,this)),$},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(j,N){var $=r.prototype.removeListener.call(this,j,N);return j==="readable"&&Je.exports.nextTick(M,this),$},W.prototype.removeAllListeners=function(j){var N=r.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&Je.exports.nextTick(M,this),N};function M(j){var N=j._readableState;N.readableListening=j.listenerCount("readable")>0,N.resumeScheduled&&!N.paused?N.flowing=!0:j.listenerCount("data")>0&&j.resume()}function C(j){b("readable nexttick read 0"),j.read(0)}W.prototype.resume=function(){var j=this._readableState;return j.flowing||(b("resume"),j.flowing=!j.readableListening,P(this,j)),j.paused=!1,this};function P(j,N){N.resumeScheduled||(N.resumeScheduled=!0,Je.exports.nextTick(S,j,N))}function S(j,N){b("resume",N.reading),N.reading||j.read(0),N.resumeScheduled=!1,j.emit("resume"),I(j),N.flowing&&!N.reading&&j.read(0)}W.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function I(j){var N=j._readableState;for(b("flow",N.flowing);N.flowing&&j.read()!==null;);}W.prototype.wrap=function(j){var N=this,$=this._readableState,ee=!1;j.on("end",function(){if(b("wrapped end"),$.decoder&&!$.ended){var D=$.decoder.end();D&&D.length&&N.push(D)}N.push(null)}),j.on("data",function(D){if(b("wrapped data"),$.decoder&&(D=$.decoder.write(D)),!($.objectMode&&D==null)&&!(!$.objectMode&&(!D||!D.length))){var k=N.push(D);k||(ee=!0,j.pause())}});for(var J in j)this[J]===void 0&&typeof j[J]=="function"&&(this[J]=function(k){return function(){return j[k].apply(j,arguments)}}(J));for(var K=0;K=N.length?(N.decoder?$=N.buffer.join(""):N.buffer.length===1?$=N.buffer.first():$=N.buffer.concat(N.length),N.buffer.clear()):$=N.buffer.consume(j,N.decoder),$}function V(j){var N=j._readableState;b("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,Je.exports.nextTick(z,N,j))}function z(j,N){if(b("endReadableNT",j.endEmitted,j.length),!j.endEmitted&&j.length===0&&(j.endEmitted=!0,N.readable=!1,N.emit("end"),j.autoDestroy)){var $=N._writableState;(!$||$.autoDestroy&&$.finished)&&N.destroy()}}typeof Symbol=="function"&&(W.from=function(j,N){return H===void 0&&(H=RN()),H(W,j,N)});function X(j,N){for(var $=0,ee=j.length;$0;return LN(u,b,m,function(g){s||(s=g),g&&i.forEach(bg),!b&&(i.forEach(bg),n(s))})});return e.reduce(UN)}var z4=$N;(function(t,e){e=t.exports=Sv(),e.Stream=e,e.Readable=e,e.Writable=Av(),e.Duplex=Bo(),e.Transform=Rv,e.PassThrough=$4,e.finished=fu,e.pipeline=z4})(hl,hl.exports);var gl=ut.exports.Buffer,j4=hl.exports.Transform,qN=ct.exports;function HN(t,e){if(!gl.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function Ha(t){j4.call(this),this._block=gl.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}qN(Ha,j4);Ha.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(s){n=s}r(n)};Ha.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Ha.prototype.update=function(t,e){if(HN(t,"Data"),this._finalized)throw new Error("Digest already called");gl.isBuffer(t)||(t=gl.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var s=this._blockOffset;s0;++i)this._length[i]+=u,u=this._length[i]/4294967296|0,u>0&&(this._length[i]-=4294967296*u);return this};Ha.prototype._update=function(){throw new Error("_update is not implemented")};Ha.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Ha.prototype._digest=function(){throw new Error("_digest is not implemented")};var G4=Ha,zN=ct.exports,V4=G4,jN=ut.exports.Buffer,GN=new Array(16);function uu(){V4.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}zN(uu,V4);uu.prototype._update=function(){for(var t=GN,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,s=this._c,i=this._d;r=qr(r,n,s,i,t[0],3614090360,7),i=qr(i,r,n,s,t[1],3905402710,12),s=qr(s,i,r,n,t[2],606105819,17),n=qr(n,s,i,r,t[3],3250441966,22),r=qr(r,n,s,i,t[4],4118548399,7),i=qr(i,r,n,s,t[5],1200080426,12),s=qr(s,i,r,n,t[6],2821735955,17),n=qr(n,s,i,r,t[7],4249261313,22),r=qr(r,n,s,i,t[8],1770035416,7),i=qr(i,r,n,s,t[9],2336552879,12),s=qr(s,i,r,n,t[10],4294925233,17),n=qr(n,s,i,r,t[11],2304563134,22),r=qr(r,n,s,i,t[12],1804603682,7),i=qr(i,r,n,s,t[13],4254626195,12),s=qr(s,i,r,n,t[14],2792965006,17),n=qr(n,s,i,r,t[15],1236535329,22),r=Hr(r,n,s,i,t[1],4129170786,5),i=Hr(i,r,n,s,t[6],3225465664,9),s=Hr(s,i,r,n,t[11],643717713,14),n=Hr(n,s,i,r,t[0],3921069994,20),r=Hr(r,n,s,i,t[5],3593408605,5),i=Hr(i,r,n,s,t[10],38016083,9),s=Hr(s,i,r,n,t[15],3634488961,14),n=Hr(n,s,i,r,t[4],3889429448,20),r=Hr(r,n,s,i,t[9],568446438,5),i=Hr(i,r,n,s,t[14],3275163606,9),s=Hr(s,i,r,n,t[3],4107603335,14),n=Hr(n,s,i,r,t[8],1163531501,20),r=Hr(r,n,s,i,t[13],2850285829,5),i=Hr(i,r,n,s,t[2],4243563512,9),s=Hr(s,i,r,n,t[7],1735328473,14),n=Hr(n,s,i,r,t[12],2368359562,20),r=zr(r,n,s,i,t[5],4294588738,4),i=zr(i,r,n,s,t[8],2272392833,11),s=zr(s,i,r,n,t[11],1839030562,16),n=zr(n,s,i,r,t[14],4259657740,23),r=zr(r,n,s,i,t[1],2763975236,4),i=zr(i,r,n,s,t[4],1272893353,11),s=zr(s,i,r,n,t[7],4139469664,16),n=zr(n,s,i,r,t[10],3200236656,23),r=zr(r,n,s,i,t[13],681279174,4),i=zr(i,r,n,s,t[0],3936430074,11),s=zr(s,i,r,n,t[3],3572445317,16),n=zr(n,s,i,r,t[6],76029189,23),r=zr(r,n,s,i,t[9],3654602809,4),i=zr(i,r,n,s,t[12],3873151461,11),s=zr(s,i,r,n,t[15],530742520,16),n=zr(n,s,i,r,t[2],3299628645,23),r=jr(r,n,s,i,t[0],4096336452,6),i=jr(i,r,n,s,t[7],1126891415,10),s=jr(s,i,r,n,t[14],2878612391,15),n=jr(n,s,i,r,t[5],4237533241,21),r=jr(r,n,s,i,t[12],1700485571,6),i=jr(i,r,n,s,t[3],2399980690,10),s=jr(s,i,r,n,t[10],4293915773,15),n=jr(n,s,i,r,t[1],2240044497,21),r=jr(r,n,s,i,t[8],1873313359,6),i=jr(i,r,n,s,t[15],4264355552,10),s=jr(s,i,r,n,t[6],2734768916,15),n=jr(n,s,i,r,t[13],1309151649,21),r=jr(r,n,s,i,t[4],4149444226,6),i=jr(i,r,n,s,t[11],3174756917,10),s=jr(s,i,r,n,t[2],718787259,15),n=jr(n,s,i,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+s|0,this._d=this._d+i|0};uu.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=jN.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function du(t,e){return t<>>32-e}function qr(t,e,r,n,s,i,u){return du(t+(e&r|~e&n)+s+i|0,u)+e|0}function Hr(t,e,r,n,s,i,u){return du(t+(e&n|r&~n)+s+i|0,u)+e|0}function zr(t,e,r,n,s,i,u){return du(t+(e^r^n)+s+i|0,u)+e|0}function jr(t,e,r,n,s,i,u){return du(t+(r^(e|~n))+s+i|0,u)+e|0}var Cv=uu,Fd=He.Buffer,VN=ct.exports,W4=G4,WN=new Array(16),hf=[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],pf=[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],vf=[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],mf=[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],gf=[0,1518500249,1859775393,2400959708,2840853838],bf=[1352829926,1548603684,1836072691,2053994217,0];function hu(){W4.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}VN(hu,W4);hu.prototype._update=function(){for(var t=WN,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=this._a|0,b=this._b|0,m=this._c|0,g=this._d|0,_=this._e|0,A=0;A<80;A+=1){var E,R;A<16?(E=yg(r,n,s,i,u,t[hf[A]],gf[0],vf[A]),R=Mg(v,b,m,g,_,t[pf[A]],bf[0],mf[A])):A<32?(E=xg(r,n,s,i,u,t[hf[A]],gf[1],vf[A]),R=_g(v,b,m,g,_,t[pf[A]],bf[1],mf[A])):A<48?(E=wg(r,n,s,i,u,t[hf[A]],gf[2],vf[A]),R=wg(v,b,m,g,_,t[pf[A]],bf[2],mf[A])):A<64?(E=_g(r,n,s,i,u,t[hf[A]],gf[3],vf[A]),R=xg(v,b,m,g,_,t[pf[A]],bf[3],mf[A])):(E=Mg(r,n,s,i,u,t[hf[A]],gf[4],vf[A]),R=yg(v,b,m,g,_,t[pf[A]],bf[4],mf[A])),r=u,u=i,i=No(s,10),s=n,n=E,v=_,_=g,g=No(m,10),m=b,b=R}var B=this._b+s+g|0;this._b=this._c+i+_|0,this._c=this._d+u+v|0,this._d=this._e+r+b|0,this._e=this._a+n+m|0,this._a=B};hu.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Fd.alloc?Fd.alloc(20):new Fd(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function No(t,e){return t<>>32-e}function yg(t,e,r,n,s,i,u,v){return No(t+(e^r^n)+i+u|0,v)+s|0}function xg(t,e,r,n,s,i,u,v){return No(t+(e&r|~e&n)+i+u|0,v)+s|0}function wg(t,e,r,n,s,i,u,v){return No(t+((e|~r)^n)+i+u|0,v)+s|0}function _g(t,e,r,n,s,i,u,v){return No(t+(e&n|r&~n)+i+u|0,v)+s|0}function Mg(t,e,r,n,s,i,u,v){return No(t+(e^(r|~n))+i+u|0,v)+s|0}var Bv=hu,pu={exports:{}},Z4=ut.exports.Buffer;function vu(t,e){this._block=Z4.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}vu.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Z4.from(t,e));for(var r=this._block,n=this._blockSize,s=t.length,i=this._len,u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,s=(r-n)/4294967296;this._block.writeUInt32BE(s,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return t?i.toString(t):i};vu.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Js=vu,ZN=ct.exports,J4=Js,JN=ut.exports.Buffer,XN=[1518500249,1859775393,-1894007588,-899497514],YN=new Array(80);function S0(){this.init(),this._w=YN,J4.call(this,64,56)}ZN(S0,J4);S0.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function QN(t){return t<<5|t>>>27}function eT(t){return t<<30|t>>>2}function tT(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}S0.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=e[v-3]^e[v-8]^e[v-14]^e[v-16];for(var b=0;b<80;++b){var m=~~(b/20),g=QN(r)+tT(m,n,s,i)+u+e[b]+XN[m]|0;u=i,i=s,s=eT(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=u+this._e|0};S0.prototype._hash=function(){var t=JN.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var rT=S0,nT=ct.exports,X4=Js,iT=ut.exports.Buffer,aT=[1518500249,1859775393,-1894007588,-899497514],oT=new Array(80);function R0(){this.init(),this._w=oT,X4.call(this,64,56)}nT(R0,X4);R0.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function sT(t){return t<<1|t>>>31}function fT(t){return t<<5|t>>>27}function cT(t){return t<<30|t>>>2}function lT(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}R0.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=sT(e[v-3]^e[v-8]^e[v-14]^e[v-16]);for(var b=0;b<80;++b){var m=~~(b/20),g=fT(r)+lT(m,n,s,i)+u+e[b]+aT[m]|0;u=i,i=s,s=cT(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=u+this._e|0};R0.prototype._hash=function(){var t=iT.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var uT=R0,dT=ct.exports,Y4=Js,hT=ut.exports.Buffer,pT=[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],vT=new Array(64);function C0(){this.init(),this._w=vT,Y4.call(this,64,56)}dT(C0,Y4);C0.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function mT(t,e,r){return r^t&(e^r)}function gT(t,e,r){return t&e|r&(t|e)}function bT(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function yT(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function xT(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function wT(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}C0.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,u=this._e|0,v=this._f|0,b=this._g|0,m=this._h|0,g=0;g<16;++g)e[g]=t.readInt32BE(g*4);for(;g<64;++g)e[g]=wT(e[g-2])+e[g-7]+xT(e[g-15])+e[g-16]|0;for(var _=0;_<64;++_){var A=m+yT(u)+mT(u,v,b)+pT[_]+e[_]|0,E=bT(r)+gT(r,n,s)|0;m=b,b=v,v=u,u=i+A|0,i=s,s=n,n=r,r=A+E|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=u+this._e|0,this._f=v+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0};C0.prototype._hash=function(){var t=hT.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Q4=C0,_T=ct.exports,MT=Q4,AT=Js,ET=ut.exports.Buffer,ST=new Array(64);function mu(){this.init(),this._w=ST,AT.call(this,64,56)}_T(mu,MT);mu.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};mu.prototype._hash=function(){var t=ET.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var RT=mu,CT=ct.exports,e5=Js,BT=ut.exports.Buffer,Ag=[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],NT=new Array(160);function B0(){this.init(),this._w=NT,e5.call(this,128,112)}CT(B0,e5);B0.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Eg(t,e,r){return r^t&(e^r)}function Sg(t,e,r){return t&e|r&(t|e)}function Rg(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Cg(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function TT(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function kT(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function PT(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function IT(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Sr(t,e){return t>>>0>>0?1:0}B0.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,s=this._ch|0,i=this._dh|0,u=this._eh|0,v=this._fh|0,b=this._gh|0,m=this._hh|0,g=this._al|0,_=this._bl|0,A=this._cl|0,E=this._dl|0,R=this._el|0,B=this._fl|0,T=this._gl|0,F=this._hl|0,O=0;O<32;O+=2)e[O]=t.readInt32BE(O*4),e[O+1]=t.readInt32BE(O*4+4);for(;O<160;O+=2){var q=e[O-30],H=e[O-15*2+1],G=TT(q,H),re=kT(H,q);q=e[O-2*2],H=e[O-2*2+1];var ne=PT(q,H),Y=IT(H,q),W=e[O-7*2],se=e[O-7*2+1],y=e[O-16*2],a=e[O-16*2+1],f=re+se|0,c=G+W+Sr(f,re)|0;f=f+Y|0,c=c+ne+Sr(f,Y)|0,f=f+a|0,c=c+y+Sr(f,a)|0,e[O]=c,e[O+1]=f}for(var l=0;l<160;l+=2){c=e[l],f=e[l+1];var h=Sg(r,n,s),x=Sg(g,_,A),w=Rg(r,g),p=Rg(g,r),o=Cg(u,R),d=Cg(R,u),M=Ag[l],C=Ag[l+1],P=Eg(u,v,b),S=Eg(R,B,T),I=F+d|0,U=m+o+Sr(I,F)|0;I=I+S|0,U=U+P+Sr(I,S)|0,I=I+C|0,U=U+M+Sr(I,C)|0,I=I+f|0,U=U+c+Sr(I,f)|0;var V=p+x|0,z=w+h+Sr(V,p)|0;m=b,F=T,b=v,T=B,v=u,B=R,R=E+I|0,u=i+U+Sr(R,E)|0,i=s,E=A,s=n,A=_,n=r,_=g,g=I+V|0,r=U+z+Sr(g,I)|0}this._al=this._al+g|0,this._bl=this._bl+_|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+R|0,this._fl=this._fl+B|0,this._gl=this._gl+T|0,this._hl=this._hl+F|0,this._ah=this._ah+r+Sr(this._al,g)|0,this._bh=this._bh+n+Sr(this._bl,_)|0,this._ch=this._ch+s+Sr(this._cl,A)|0,this._dh=this._dh+i+Sr(this._dl,E)|0,this._eh=this._eh+u+Sr(this._el,R)|0,this._fh=this._fh+v+Sr(this._fl,B)|0,this._gh=this._gh+b+Sr(this._gl,T)|0,this._hh=this._hh+m+Sr(this._hl,F)|0};B0.prototype._hash=function(){var t=BT.allocUnsafe(64);function e(r,n,s){t.writeInt32BE(r,s),t.writeInt32BE(n,s+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var t5=B0,DT=ct.exports,OT=t5,FT=Js,LT=ut.exports.Buffer,UT=new Array(160);function gu(){this.init(),this._w=UT,FT.call(this,128,112)}DT(gu,OT);gu.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};gu.prototype._hash=function(){var t=LT.allocUnsafe(48);function e(r,n,s){t.writeInt32BE(r,s),t.writeInt32BE(n,s+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var KT=gu,Fo=pu.exports=function(e){e=e.toLowerCase();var r=Fo[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};Fo.sha=rT;Fo.sha1=uT;Fo.sha224=RT;Fo.sha256=Q4;Fo.sha384=KT;Fo.sha512=t5;var $T=$n,Nv=M0.exports.EventEmitter,qT=ct.exports;qT($n,Nv);$n.Readable=Sv();$n.Writable=Av();$n.Duplex=Bo();$n.Transform=Rv;$n.PassThrough=$4;$n.finished=fu;$n.pipeline=z4;$n.Stream=$n;function $n(){Nv.call(this)}$n.prototype.pipe=function(t,e){var r=this;function n(g){t.writable&&t.write(g)===!1&&r.pause&&r.pause()}r.on("data",n);function s(){r.readable&&r.resume&&r.resume()}t.on("drain",s),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",u),r.on("close",v));var i=!1;function u(){i||(i=!0,t.end())}function v(){i||(i=!0,typeof t.destroy=="function"&&t.destroy())}function b(g){if(m(),Nv.listenerCount(this,"error")===0)throw g}r.on("error",b),t.on("error",b);function m(){r.removeListener("data",n),t.removeListener("drain",s),r.removeListener("end",u),r.removeListener("close",v),r.removeListener("error",b),t.removeListener("error",b),r.removeListener("end",m),r.removeListener("close",m),t.removeListener("close",m)}return r.on("end",m),r.on("close",m),t.on("close",m),t.emit("pipe",r),t};var r5=ut.exports.Buffer,n5=$T.Transform,HT=ml.StringDecoder,zT=ct.exports;function li(t){n5.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}zT(li,n5);li.prototype.update=function(t,e,r){typeof t=="string"&&(t=r5.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};li.prototype.setAutoPadding=function(){};li.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};li.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};li.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};li.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(s){n=s}finally{r(n)}};li.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};li.prototype._finalOrDigest=function(t){var e=this.__final()||r5.alloc(0);return t&&(e=this._toString(e,t,!0)),e};li.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new HT(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};var za=li,jT=ct.exports,GT=Cv,VT=Bv,WT=pu.exports,i5=za;function bu(t){i5.call(this,"digest"),this._hash=t}jT(bu,i5);bu.prototype._update=function(t){this._hash.update(t)};bu.prototype._final=function(){return this._hash.digest()};var N0=function(e){return e=e.toLowerCase(),e==="md5"?new GT:e==="rmd160"||e==="ripemd160"?new VT:new bu(WT(e))},Ld,Bg;function ZT(){if(Bg)return Ld;Bg=1;var t=ct.exports,e=ut.exports.Buffer,r=za,n=e.alloc(128),s=64;function i(u,v){r.call(this,"digest"),typeof v=="string"&&(v=e.from(v)),this._alg=u,this._key=v,v.length>s?v=u(v):v.length_){var A=m==="rmd160"?new i:u(m);g=A.update(g).digest()}else g.length<_&&(g=n.concat([g,v],_));for(var E=this._ipad=n.allocUnsafe(_),R=this._opad=n.allocUnsafe(_),B=0;B<_;B++)E[B]=g[B]^54,R[B]=g[B]^92;this._hash=m==="rmd160"?new i:u(m),this._hash.update(E)}return t(b,r),b.prototype._update=function(m){this._hash.update(m)},b.prototype._final=function(){var m=this._hash.digest(),g=this._alg==="rmd160"?new i:u(this._alg);return g.update(this._opad).update(m).digest()},Kd=function(g,_){return g=g.toLowerCase(),g==="rmd160"||g==="ripemd160"?new b("rmd160",_):g==="md5"?new e(s,_):new b(g,_)},Kd}var $d={exports:{}};const JT={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},XT={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},YT={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},QT={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},ek={sign:"ecdsa",hash:"sha256",id:""},tk={sign:"ecdsa",hash:"sha224",id:""},rk={sign:"ecdsa",hash:"sha384",id:""},nk={sign:"ecdsa",hash:"sha512",id:""},ik={sign:"dsa",hash:"sha1",id:""},ak={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},ok={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},s5={sha224WithRSAEncryption:JT,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:XT,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:YT,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:QT,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:ek,sha224:tk,sha384:rk,sha512:nk,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:ik,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:ak,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:ok,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var kg;function sk(){return kg||(kg=1,function(t){t.exports=s5}($d)),$d.exports}var ic={},qd,Pg;function f5(){if(Pg)return qd;Pg=1;var t=Math.pow(2,30)-1;return qd=function(e,r){if(typeof e!="number")throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if(typeof r!="number")throw new TypeError("Key length not a number");if(r<0||r>t||r!==r)throw new TypeError("Bad key length")},qd}var Hd,Ig;function c5(){if(Ig)return Hd;Ig=1;var t;if(ue.process&&ue.process.browser)t="utf-8";else if(ue.process&&ue.process.version){var e=parseInt(Je.exports.version.split(".")[0].slice(1),10);t=e>=6?"utf-8":"binary"}else t="utf-8";return Hd=t,Hd}var zd,Dg;function l5(){if(Dg)return zd;Dg=1;var t=ut.exports.Buffer;return zd=function(e,r,n){if(t.isBuffer(e))return e;if(typeof e=="string")return t.from(e,r);if(ArrayBuffer.isView(e))return t.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},zd}var jd,Og;function u5(){if(Og)return jd;Og=1;var t=a5(),e=Bv,r=pu.exports,n=ut.exports.Buffer,s=f5(),i=c5(),u=l5(),v=n.alloc(128),b={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function m(A,E,R){var B=g(A),T=A==="sha512"||A==="sha384"?128:64;E.length>T?E=B(E):E.length>>0},mn.writeUInt32BE=function(s,i,u){s[0+u]=i>>>24,s[1+u]=i>>>16&255,s[2+u]=i>>>8&255,s[3+u]=i&255},mn.ip=function(s,i,u,v){for(var b=0,m=0,g=6;g>=0;g-=2){for(var _=0;_<=24;_+=8)b<<=1,b|=i>>>_+g&1;for(var _=0;_<=24;_+=8)b<<=1,b|=s>>>_+g&1}for(var g=6;g>=0;g-=2){for(var _=1;_<=25;_+=8)m<<=1,m|=i>>>_+g&1;for(var _=1;_<=25;_+=8)m<<=1,m|=s>>>_+g&1}u[v+0]=b>>>0,u[v+1]=m>>>0},mn.rip=function(s,i,u,v){for(var b=0,m=0,g=0;g<4;g++)for(var _=24;_>=0;_-=8)b<<=1,b|=i>>>_+g&1,b<<=1,b|=s>>>_+g&1;for(var g=4;g<8;g++)for(var _=24;_>=0;_-=8)m<<=1,m|=i>>>_+g&1,m<<=1,m|=s>>>_+g&1;u[v+0]=b>>>0,u[v+1]=m>>>0},mn.pc1=function(s,i,u,v){for(var b=0,m=0,g=7;g>=5;g--){for(var _=0;_<=24;_+=8)b<<=1,b|=i>>_+g&1;for(var _=0;_<=24;_+=8)b<<=1,b|=s>>_+g&1}for(var _=0;_<=24;_+=8)b<<=1,b|=i>>_+g&1;for(var g=1;g<=3;g++){for(var _=0;_<=24;_+=8)m<<=1,m|=i>>_+g&1;for(var _=0;_<=24;_+=8)m<<=1,m|=s>>_+g&1}for(var _=0;_<=24;_+=8)m<<=1,m|=s>>_+g&1;u[v+0]=b>>>0,u[v+1]=m>>>0},mn.r28shl=function(s,i){return s<>>28-i};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];mn.pc2=function(s,i,u,v){for(var b=0,m=0,g=t.length>>>1,_=0;_>>t[_]&1;for(var _=g;_>>t[_]&1;u[v+0]=b>>>0,u[v+1]=m>>>0},mn.expand=function(s,i,u){var v=0,b=0;v=(s&1)<<5|s>>>27;for(var m=23;m>=15;m-=4)v<<=6,v|=s>>>m&63;for(var m=11;m>=3;m-=4)b|=s>>>m&63,b<<=6;b|=(s&31)<<1|s>>>31,i[u+0]=v>>>0,i[u+1]=b>>>0};var e=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];mn.substitute=function(s,i){for(var u=0,v=0;v<4;v++){var b=s>>>18-v*6&63,m=e[v*64+b];u<<=4,u|=m}for(var v=0;v<4;v++){var b=i>>>18-v*6&63,m=e[4*64+v*64+b];u<<=4,u|=m}return u>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return mn.permute=function(s){for(var i=0,u=0;u>>r[u]&1;return i>>>0},mn.padSplit=function(s,i,u){for(var v=s.toString(2);v.length0;u--)s+=this._buffer(n,s),i+=this._flushBuffer(v,i);return s+=this._buffer(n,s),v},e.prototype.final=function(n){var s;n&&(s=this.update(n));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),s?s.concat(i):i},e.prototype._pad=function(n,s){if(s===0)return!1;for(;s>>1];g=r.r28shl(g,E),_=r.r28shl(_,E),r.pc2(g,_,b.keys,A)}},i.prototype._update=function(b,m,g,_){var A=this._desState,E=r.readUInt32BE(b,m),R=r.readUInt32BE(b,m+4);r.ip(E,R,A.tmp,0),E=A.tmp[0],R=A.tmp[1],this.type==="encrypt"?this._encrypt(A,E,R,A.tmp,0):this._decrypt(A,E,R,A.tmp,0),E=A.tmp[0],R=A.tmp[1],r.writeUInt32BE(g,E,_),r.writeUInt32BE(g,R,_+4)},i.prototype._pad=function(b,m){for(var g=b.length-m,_=m;_>>0,E=H}r.rip(R,E,_,A)},i.prototype._decrypt=function(b,m,g,_,A){for(var E=g,R=m,B=b.keys.length-2;B>=0;B-=2){var T=b.keys[B],F=b.keys[B+1];r.expand(E,b.tmp,0),T^=b.tmp[0],F^=b.tmp[1];var O=r.substitute(T,F),q=r.permute(O),H=E;E=(R^q)>>>0,R=H}r.rip(E,R,_,A)},Wd}var Zd={},qg;function ck(){if(qg)return Zd;qg=1;var t=qn,e=ct.exports,r={};function n(i){t.equal(i.length,8,"Invalid IV length"),this.iv=new Array(8);for(var u=0;u>v%8,n._prev=r(n._prev,i?g:_);return m}function r(n,s){var i=n.length,u=-1,v=t.allocUnsafe(n.length);for(n=t.concat([n,t.from([s])]);++u>7;return v}return th.encrypt=function(n,s,i){for(var u=s.length,v=t.allocUnsafe(u),b=-1;++b>>24]^E[F>>>16&255]^R[O>>>8&255]^B[q&255]^b[Y++],G=A[F>>>24]^E[O>>>16&255]^R[q>>>8&255]^B[T&255]^b[Y++],re=A[O>>>24]^E[q>>>16&255]^R[T>>>8&255]^B[F&255]^b[Y++],ne=A[q>>>24]^E[T>>>16&255]^R[F>>>8&255]^B[O&255]^b[Y++],T=H,F=G,O=re,q=ne;return H=(g[T>>>24]<<24|g[F>>>16&255]<<16|g[O>>>8&255]<<8|g[q&255])^b[Y++],G=(g[F>>>24]<<24|g[O>>>16&255]<<16|g[q>>>8&255]<<8|g[T&255])^b[Y++],re=(g[O>>>24]<<24|g[q>>>16&255]<<16|g[T>>>8&255]<<8|g[F&255])^b[Y++],ne=(g[q>>>24]<<24|g[T>>>16&255]<<16|g[F>>>8&255]<<8|g[O&255])^b[Y++],H=H>>>0,G=G>>>0,re=re>>>0,ne=ne>>>0,[H,G,re,ne]}var s=[0,1,2,4,8,16,32,64,128,27,54],i=function(){for(var v=new Array(256),b=0;b<256;b++)b<128?v[b]=b<<1:v[b]=b<<1^283;for(var m=[],g=[],_=[[],[],[],[]],A=[[],[],[],[]],E=0,R=0,B=0;B<256;++B){var T=R^R<<1^R<<2^R<<3^R<<4;T=T>>>8^T&255^99,m[E]=T,g[T]=E;var F=v[E],O=v[F],q=v[O],H=v[T]*257^T*16843008;_[0][E]=H<<24|H>>>8,_[1][E]=H<<16|H>>>16,_[2][E]=H<<8|H>>>24,_[3][E]=H,H=q*16843009^O*65537^F*257^E*16843008,A[0][T]=H<<24|H>>>8,A[1][T]=H<<16|H>>>16,A[2][T]=H<<8|H>>>24,A[3][T]=H,E===0?E=R=1:(E=F^v[v[v[q^F]]],R^=v[v[R]])}return{SBOX:m,INV_SBOX:g,SUB_MIX:_,INV_SUB_MIX:A}}();function u(v){this._key=e(v),this._reset()}return u.blockSize=4*4,u.keySize=256/8,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var v=this._key,b=v.length,m=b+6,g=(m+1)*4,_=[],A=0;A>>24,E=i.SBOX[E>>>24]<<24|i.SBOX[E>>>16&255]<<16|i.SBOX[E>>>8&255]<<8|i.SBOX[E&255],E^=s[A/b|0]<<24):b>6&&A%b===4&&(E=i.SBOX[E>>>24]<<24|i.SBOX[E>>>16&255]<<16|i.SBOX[E>>>8&255]<<8|i.SBOX[E&255]),_[A]=_[A-b]^E}for(var R=[],B=0;B>>24]]^i.INV_SUB_MIX[1][i.SBOX[F>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[F>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[F&255]]}this._nRounds=m,this._keySchedule=_,this._invKeySchedule=R},u.prototype.encryptBlockRaw=function(v){return v=e(v),n(v,this._keySchedule,i.SUB_MIX,i.SBOX,this._nRounds)},u.prototype.encryptBlock=function(v){var b=this.encryptBlockRaw(v),m=t.allocUnsafe(16);return m.writeUInt32BE(b[0],0),m.writeUInt32BE(b[1],4),m.writeUInt32BE(b[2],8),m.writeUInt32BE(b[3],12),m},u.prototype.decryptBlock=function(v){v=e(v);var b=v[1];v[1]=v[3],v[3]=b;var m=n(v,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX,this._nRounds),g=t.allocUnsafe(16);return g.writeUInt32BE(m[0],0),g.writeUInt32BE(m[3],4),g.writeUInt32BE(m[2],8),g.writeUInt32BE(m[1],12),g},u.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},oh.AES=u,oh}var sh,ib;function _k(){if(ib)return sh;ib=1;var t=ut.exports.Buffer,e=t.alloc(16,0);function r(i){return[i.readUInt32BE(0),i.readUInt32BE(4),i.readUInt32BE(8),i.readUInt32BE(12)]}function n(i){var u=t.allocUnsafe(16);return u.writeUInt32BE(i[0]>>>0,0),u.writeUInt32BE(i[1]>>>0,4),u.writeUInt32BE(i[2]>>>0,8),u.writeUInt32BE(i[3]>>>0,12),u}function s(i){this.h=i,this.state=t.alloc(16,0),this.cache=t.allocUnsafe(0)}return s.prototype.ghash=function(i){for(var u=-1;++u0;v--)i[v]=i[v]>>>1|(i[v-1]&1)<<31;i[0]=i[0]>>>1,m&&(i[0]=i[0]^225<<24)}this.state=n(u)},s.prototype.update=function(i){this.cache=t.concat([this.cache,i]);for(var u;this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},s.prototype.final=function(i,u){return this.cache.length&&this.ghash(t.concat([this.cache,e],16)),this.ghash(n([0,i,0,u])),this.state},sh=s,sh}var fh,ab;function g5(){if(ab)return fh;ab=1;var t=yu(),e=ut.exports.Buffer,r=za,n=ct.exports,s=_k(),i=T0(),u=v5();function v(g,_){var A=0;g.length!==_.length&&A++;for(var E=Math.min(g.length,_.length),R=0;R0||u>0;){var _=new e;_.update(g),_.update(n),s&&_.update(s),g=_.digest();var A=0;if(v>0){var E=b.length-v;A=Math.min(v,g.length),g.copy(b,E,0,A),v-=A}if(A0){var R=m.length-u,B=Math.min(u,g.length-A);g.copy(m,R,A,A+B),u-=B}}return g.fill(0),{key:b,iv:m}}return lh=r,lh}var fb;function Mk(){if(fb)return ac;fb=1;var t=kv(),e=g5(),r=ut.exports.Buffer,n=b5(),s=za,i=yu(),u=xu(),v=ct.exports;function b(E,R,B){s.call(this),this._cache=new g,this._cipher=new i.AES(R),this._prev=r.from(B),this._mode=E,this._autopadding=!0}v(b,s),b.prototype._update=function(E){this._cache.add(E);for(var R,B,T=[];R=this._cache.get();)B=this._mode.encrypt(this,R),T.push(B);return r.concat(T)};var m=r.alloc(16,16);b.prototype._final=function(){var E=this._cache.flush();if(this._autopadding)return E=this._mode.encrypt(this,E),this._cipher.scrub(),E;if(!E.equals(m))throw this._cipher.scrub(),new Error("data not multiple of block length")},b.prototype.setAutoPadding=function(E){return this._autopadding=!!E,this};function g(){this.cache=r.allocUnsafe(0)}g.prototype.add=function(E){this.cache=r.concat([this.cache,E])},g.prototype.get=function(){if(this.cache.length>15){var E=this.cache.slice(0,16);return this.cache=this.cache.slice(16),E}return null},g.prototype.flush=function(){for(var E=16-this.cache.length,R=r.allocUnsafe(E),B=-1;++B16)return R=this.cache.slice(0,16),this.cache=this.cache.slice(16),R}else if(this.cache.length>=16)return R=this.cache.slice(0,16),this.cache=this.cache.slice(16),R;return null},m.prototype.flush=function(){if(this.cache.length)return this.cache};function g(E){var R=E[15];if(R<1||R>16)throw new Error("unable to decrypt data");for(var B=-1;++B0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(dh)),dh.exports}var hh={exports:{}},pb;function Rk(){return pb||(pb=1,function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(hh)),hh.exports}var cc={exports:{}},vb;function Iv(){if(vb)return cc.exports;vb=1;var t;cc.exports=function(s){return t||(t=new e(null)),t.generate(s)};function e(n){this.rand=n}if(cc.exports.Rand=e,e.prototype.generate=function(s){return this._rand(s)},e.prototype._rand=function(s){if(this.rand.getBytes)return this.rand.getBytes(s);for(var i=new Uint8Array(s),u=0;u=0);return v},r.prototype._randrange=function(s,i){var u=i.sub(s);return s.add(this._randbelow(u))},r.prototype.test=function(s,i,u){var v=s.bitLength(),b=t.mont(s),m=new t(1).toRed(b);i||(i=Math.max(1,v/48|0));for(var g=s.subn(1),_=0;!g.testn(_);_++);for(var A=s.shrn(_),E=g.toRed(b),R=!0;i>0;i--){var B=this._randrange(new t(2),g);u&&u(B);var T=B.toRed(b).redPow(A);if(!(T.cmp(m)===0||T.cmp(E)===0)){for(var F=1;F<_;F++){if(T=T.redSqr(),T.cmp(m)===0)return!1;if(T.cmp(E)===0)break}if(F===_)return!1}}return R},r.prototype.getDivisor=function(s,i){var u=s.bitLength(),v=t.mont(s),b=new t(1).toRed(v);i||(i=Math.max(1,u/48|0));for(var m=s.subn(1),g=0;!m.testn(g);g++);for(var _=s.shrn(g),A=m.toRed(v);i>0;i--){var E=this._randrange(new t(2),m),R=s.gcd(E);if(R.cmpn(1)!==0)return R;var B=E.toRed(v).redPow(_);if(!(B.cmp(b)===0||B.cmp(A)===0)){for(var T=1;TF;)q.ishrn(1);if(q.isEven()&&q.iadd(i),q.testn(1)||q.iadd(u),O.cmp(u)){if(!O.cmp(v))for(;q.mod(b).cmp(m);)q.iadd(_)}else for(;q.mod(r).cmp(g);)q.iadd(_);if(H=q.shrn(1),R(H)&&R(q)&&B(H)&&B(q)&&s.test(H)&&s.test(q))return q}}return vh}const Ck={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},Bk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},Nk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},Tk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},kk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},Pk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},Ik={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},Dk={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},Ok={modp1:Ck,modp2:Bk,modp5:Nk,modp14:Tk,modp15:kk,modp16:Pk,modp17:Ik,modp18:Dk};var mh,bb;function Fk(){if(bb)return mh;bb=1;var t=y5(),e=x5(),r=new e,n=new t(24),s=new t(11),i=new t(10),u=new t(3),v=new t(7),b=w5(),m=Oa.exports;mh=R;function g(T,F){return F=F||"utf8",He.Buffer.isBuffer(T)||(T=new He.Buffer(T,F)),this._pub=new t(T),this}function _(T,F){return F=F||"utf8",He.Buffer.isBuffer(T)||(T=new He.Buffer(T,F)),this._priv=new t(T),this}var A={};function E(T,F){var O=F.toString("hex"),q=[O,T.toString(16)].join("_");if(q in A)return A[q];var H=0;if(T.isEven()||!b.simpleSieve||!b.fermatTest(T)||!r.test(T))return H+=1,O==="02"||O==="05"?H+=8:H+=4,A[q]=H,H;r.test(T.shrn(1))||(H+=2);var G;switch(O){case"02":T.mod(n).cmp(s)&&(H+=8);break;case"05":G=T.mod(i),G.cmp(u)&&G.cmp(v)&&(H+=8);break;default:H+=4}return A[q]=H,H}function R(T,F,O){this.setGenerator(F),this.__prime=new t(T),this._prime=t.mont(this.__prime),this._primeLen=T.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,O?(this.setPublicKey=g,this.setPrivateKey=_):this._primeCode=8}Object.defineProperty(R.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=E(this.__prime,this.__gen)),this._primeCode}}),R.prototype.generateKeys=function(){return this._priv||(this._priv=new t(m(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},R.prototype.computeSecret=function(T){T=new t(T),T=T.toRed(this._prime);var F=T.redPow(this._priv).fromRed(),O=new He.Buffer(F.toArray()),q=this.getPrime();if(O.length=0||!v.umod(i.prime1)||!v.umod(i.prime2));return v}function s(i,u){var v=r(u),b=u.modulus.byteLength(),m=new t(i).mul(v.blinder).umod(u.modulus),g=m.toRed(t.mont(u.prime1)),_=m.toRed(t.mont(u.prime2)),A=u.coefficient,E=u.prime1,R=u.prime2,B=g.redPow(u.exponent1).fromRed(),T=_.redPow(u.exponent2).fromRed(),F=B.isub(T).imul(A).umod(E).imul(R);return T.iadd(F).imul(v.unblinder).umod(u.modulus).toArrayLike(He.Buffer,"be",b)}return s.getr=n,gh=s,gh}var bh={};const Uk="elliptic",Kk="6.5.4",$k="EC cryptography",qk="lib/elliptic.js",Hk=["lib"],zk={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},jk={type:"git",url:"git@github.com:indutny/elliptic"},Gk=["EC","Elliptic","curve","Cryptography"],Vk="Fedor Indutny ",Wk="MIT",Zk={url:"https://github.com/indutny/elliptic/issues"},Jk="https://github.com/indutny/elliptic",Xk={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},Yk={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},Qk={name:Uk,version:Kk,description:$k,main:qk,files:Hk,scripts:zk,repository:jk,keywords:Gk,author:Vk,license:Wk,bugs:Zk,homepage:Jk,devDependencies:Xk,dependencies:Yk};var Rn={},Ki={exports:{}};(function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)})(Ki);var Ov={};(function(t){var e=t;function r(i,u){if(Array.isArray(i))return i.slice();if(!i)return[];var v=[];if(typeof i!="string"){for(var b=0;b>8,_=m&255;g?v.push(g,_):v.push(_)}return v}e.toArray=r;function n(i){return i.length===1?"0"+i:i}e.zero2=n;function s(i){for(var u="",v=0;v(R>>1)-1?F=(R>>1)-O:F=O,B.isubn(F)):F=0,E[T]=F,B.iushrn(1)}return E}e.getNAF=i;function u(g,_){var A=[[],[]];g=g.clone(),_=_.clone();for(var E=0,R=0,B;g.cmpn(-E)>0||_.cmpn(-R)>0;){var T=g.andln(3)+E&3,F=_.andln(3)+R&3;T===3&&(T=-1),F===3&&(F=-1);var O;(T&1)===0?O=0:(B=g.andln(7)+E&7,(B===3||B===5)&&F===2?O=-T:O=T),A[0].push(O);var q;(F&1)===0?q=0:(B=_.andln(7)+R&7,(B===3||B===5)&&T===2?q=-F:q=F),A[1].push(q),2*E===O+1&&(E=1-E),2*R===q+1&&(R=1-R),g.iushrn(1),_.iushrn(1)}return A}e.getJSF=u;function v(g,_,A){var E="_"+_;g.prototype[_]=function(){return this[E]!==void 0?this[E]:this[E]=A.call(this)}}e.cachedProperty=v;function b(g){return typeof g=="string"?e.toArray(g,"hex"):g}e.parseBytes=b;function m(g){return new r(g,"hex","le")}e.intFromLE=m})(Rn);var Fv={},eo=Ki.exports,k0=Rn,bl=k0.getNAF,eP=k0.getJSF,yl=k0.assert;function ja(t,e){this.type=t,this.p=new eo(e.p,16),this.red=e.prime?eo.red(e.prime):eo.mont(this.p),this.zero=new eo(0).toRed(this.red),this.one=new eo(1).toRed(this.red),this.two=new eo(2).toRed(this.red),this.n=e.n&&new eo(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 wu=ja;ja.prototype.point=function(){throw new Error("Not implemented")};ja.prototype.validate=function(){throw new Error("Not implemented")};ja.prototype._fixedNafMul=function(e,r){yl(e.precomputed);var n=e._getDoubles(),s=bl(r,1,this._bitLength),i=(1<=v;m--)b=(b<<1)+s[m];u.push(b)}for(var g=this.jpoint(null,null,null),_=this.jpoint(null,null,null),A=i;A>0;A--){for(v=0;v=0;b--){for(var m=0;b>=0&&u[b]===0;b--)m++;if(b>=0&&m++,v=v.dblp(m),b<0)break;var g=u[b];yl(g!==0),e.type==="affine"?g>0?v=v.mixedAdd(i[g-1>>1]):v=v.mixedAdd(i[-g-1>>1].neg()):g>0?v=v.add(i[g-1>>1]):v=v.add(i[-g-1>>1].neg())}return e.type==="affine"?v.toP():v};ja.prototype._wnafMulAdd=function(e,r,n,s,i){var u=this._wnafT1,v=this._wnafT2,b=this._wnafT3,m=0,g,_,A;for(g=0;g=1;g-=2){var R=g-1,B=g;if(u[R]!==1||u[B]!==1){b[R]=bl(n[R],u[R],this._bitLength),b[B]=bl(n[B],u[B],this._bitLength),m=Math.max(b[R].length,m),m=Math.max(b[B].length,m);continue}var T=[r[R],null,null,r[B]];r[R].y.cmp(r[B].y)===0?(T[1]=r[R].add(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg())):r[R].y.cmp(r[B].y.redNeg())===0?(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].add(r[B].neg())):(T[1]=r[R].toJ().mixedAdd(r[B]),T[2]=r[R].toJ().mixedAdd(r[B].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],O=eP(n[R],n[B]);for(m=Math.max(O[0].length,m),b[R]=new Array(m),b[B]=new Array(m),_=0;_=0;g--){for(var ne=0;g>=0;){var Y=!0;for(_=0;_=0&&ne++,G=G.dblp(ne),g<0)break;for(_=0;_0?A=v[_][W-1>>1]:W<0&&(A=v[_][-W-1>>1].neg()),A.type==="affine"?G=G.mixedAdd(A):G=G.add(A))}}for(g=0;g=Math.ceil((e.bitLength()+1)/r.step):!1};Gn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(E=m,R=g),_.negative&&(_=_.neg(),A=A.neg()),E.negative&&(E=E.neg(),R=R.neg()),[{a:_,b:A},{a:E,b:R}]};Vn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),u=n.b.neg().mul(e).divRound(this.n),v=i.mul(n.a),b=u.mul(s.a),m=i.mul(n.b),g=u.mul(s.b),_=e.sub(v).sub(b),A=m.add(g).neg();return{k1:_,k2:A}};Vn.prototype.pointFromX=function(e,r){e=new lr(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};Vn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};Vn.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,u=0;u":""};Ir.prototype.isInfinity=function(){return this.inf};Ir.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};Ir.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),u=i.redSqr().redISub(this.x.redAdd(this.x)),v=i.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,v)};Ir.prototype.getX=function(){return this.x.fromRed()};Ir.prototype.getY=function(){return this.y.fromRed()};Ir.prototype.mul=function(e){return e=new lr(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Ir.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};Ir.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};Ir.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Ir.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};Ir.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function $r(t,e,r,n){Xs.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new lr(0)):(this.x=new lr(e,16),this.y=new lr(r,16),this.z=new lr(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}Lv($r,Xs.BasePoint);Vn.prototype.jpoint=function(e,r,n){return new $r(this,e,r,n)};$r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};$r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};$r.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),u=this.y.redMul(r.redMul(e.z)),v=e.y.redMul(n.redMul(this.z)),b=s.redSub(i),m=u.redSub(v);if(b.cmpn(0)===0)return m.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=b.redSqr(),_=g.redMul(b),A=s.redMul(g),E=m.redSqr().redIAdd(_).redISub(A).redISub(A),R=m.redMul(A.redISub(E)).redISub(u.redMul(_)),B=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(E,R,B)};$r.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,u=e.y.redMul(r).redMul(this.z),v=n.redSub(s),b=i.redSub(u);if(v.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var m=v.redSqr(),g=m.redMul(v),_=n.redMul(m),A=b.redSqr().redIAdd(g).redISub(_).redISub(_),E=b.redMul(_.redISub(A)).redISub(i.redMul(g)),R=this.z.redMul(v);return this.curve.jpoint(A,E,R)};$r.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};$r.prototype.inspect=function(){return this.isInfinity()?"":""};$r.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ds=Ki.exports,_5=ct.exports,_u=wu,iP=Rn;function Ys(t){_u.call(this,"mont",t),this.a=new ds(t.a,16).toRed(this.red),this.b=new ds(t.b,16).toRed(this.red),this.i4=new ds(4).toRed(this.red).redInvm(),this.two=new ds(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}_5(Ys,_u);var aP=Ys;Ys.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),s=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=s.redSqrt();return i.redSqr().cmp(s)===0};function kr(t,e,r){_u.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ds(e,16),this.z=new ds(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}_5(kr,_u.BasePoint);Ys.prototype.decodePoint=function(e,r){return this.point(iP.toArray(e,r),1)};Ys.prototype.point=function(e,r){return new kr(this,e,r)};Ys.prototype.pointFromJSON=function(e){return kr.fromJSON(this,e)};kr.prototype.precompute=function(){};kr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};kr.fromJSON=function(e,r){return new kr(e,r[0],r[1]||e.one)};kr.prototype.inspect=function(){return this.isInfinity()?"":""};kr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};kr.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),s=n.redSqr(),i=r.redSub(s),u=r.redMul(s),v=i.redMul(s.redAdd(this.curve.a24.redMul(i)));return this.curve.point(u,v)};kr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};kr.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),s=this.x.redSub(this.z),i=e.x.redAdd(e.z),u=e.x.redSub(e.z),v=u.redMul(n),b=i.redMul(s),m=r.z.redMul(v.redAdd(b).redSqr()),g=r.x.redMul(v.redISub(b).redSqr());return this.curve.point(m,g)};kr.prototype.mul=function(e){for(var r=e.clone(),n=this,s=this.curve.point(null,null),i=this,u=[];r.cmpn(0)!==0;r.iushrn(1))u.push(r.andln(1));for(var v=u.length-1;v>=0;v--)u[v]===0?(n=n.diffAdd(s,i),s=s.dbl()):(s=n.diffAdd(s,i),n=n.dbl());return s};kr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};kr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};kr.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};kr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};kr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var oP=Rn,Yi=Ki.exports,M5=ct.exports,Mu=wu,sP=oP.assert;function $i(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Mu.call(this,"edwards",t),this.a=new Yi(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Yi(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Yi(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),sP(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}M5($i,Mu);var fP=$i;$i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};$i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};$i.prototype.jpoint=function(e,r,n,s){return this.point(e,r,n,s)};$i.prototype.pointFromX=function(e,r){e=new Yi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),s=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),u=s.redMul(i.redInvm()),v=u.redSqrt();if(v.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var b=v.fromRed().isOdd();return(r&&!b||!r&&b)&&(v=v.redNeg()),this.point(e,v)};$i.prototype.pointFromY=function(e,r){e=new Yi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),s=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),u=s.redMul(i.redInvm());if(u.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var v=u.redSqrt();if(v.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return v.fromRed().isOdd()!==r&&(v=v.redNeg()),this.point(v,e)};$i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),s=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return s.cmp(i)===0};function Yt(t,e,r,n,s){Mu.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Yi(e,16),this.y=new Yi(r,16),this.z=n?new Yi(n,16):this.curve.one,this.t=s&&new Yi(s,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.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}M5(Yt,Mu.BasePoint);$i.prototype.pointFromJSON=function(e){return Yt.fromJSON(this,e)};$i.prototype.point=function(e,r,n,s){return new Yt(this,e,r,n,s)};Yt.fromJSON=function(e,r){return new Yt(e,r[0],r[1],r[2])};Yt.prototype.inspect=function(){return this.isInfinity()?"":""};Yt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Yt.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var s=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),u=s.redAdd(r),v=u.redSub(n),b=s.redSub(r),m=i.redMul(v),g=u.redMul(b),_=i.redMul(b),A=v.redMul(u);return this.curve.point(m,g,A,_)};Yt.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),s,i,u,v,b,m;if(this.curve.twisted){v=this.curve._mulA(r);var g=v.redAdd(n);this.zOne?(s=e.redSub(r).redSub(n).redMul(g.redSub(this.curve.two)),i=g.redMul(v.redSub(n)),u=g.redSqr().redSub(g).redSub(g)):(b=this.z.redSqr(),m=g.redSub(b).redISub(b),s=e.redSub(r).redISub(n).redMul(m),i=g.redMul(v.redSub(n)),u=g.redMul(m))}else v=r.redAdd(n),b=this.curve._mulC(this.z).redSqr(),m=v.redSub(b).redSub(b),s=this.curve._mulC(e.redISub(v)).redMul(m),i=this.curve._mulC(v).redMul(r.redISub(n)),u=v.redMul(m);return this.curve.point(s,i,u)};Yt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Yt.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),s=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),u=n.redSub(r),v=i.redSub(s),b=i.redAdd(s),m=n.redAdd(r),g=u.redMul(v),_=b.redMul(m),A=u.redMul(m),E=v.redMul(b);return this.curve.point(g,_,E,A)};Yt.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),s=this.x.redMul(e.x),i=this.y.redMul(e.y),u=this.curve.d.redMul(s).redMul(i),v=n.redSub(u),b=n.redAdd(u),m=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(i),g=r.redMul(v).redMul(m),_,A;return this.curve.twisted?(_=r.redMul(b).redMul(i.redSub(this.curve._mulA(s))),A=v.redMul(b)):(_=r.redMul(b).redMul(i.redSub(s)),A=this.curve._mulC(v).redMul(b)),this.curve.point(g,_,A)};Yt.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Yt.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Yt.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};Yt.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};Yt.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};Yt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Yt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Yt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Yt.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Yt.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),s=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(s),this.x.cmp(r)===0)return!0}};Yt.prototype.toP=Yt.prototype.normalize;Yt.prototype.mixedAdd=Yt.prototype.add;(function(t){var e=t;e.base=wu,e.short=nP,e.mont=aP,e.edwards=fP})(Fv);var Au={},yh,wb;function cP(){return wb||(wb=1,yh={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),yh}(function(t){var e=t,r=Cr,n=Fv,s=Rn,i=s.assert;function u(m){m.type==="short"?this.curve=new n.short(m):m.type==="edwards"?this.curve=new n.edwards(m):this.curve=new n.mont(m),this.g=this.curve.g,this.n=this.curve.n,this.hash=m.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=u;function v(m,g){Object.defineProperty(e,m,{configurable:!0,enumerable:!0,get:function(){var _=new u(g);return Object.defineProperty(e,m,{configurable:!0,enumerable:!0,value:_}),_}})}v("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:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),v("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:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),v("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:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),v("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:r.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"]}),v("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:r.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"]}),v("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),v("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:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var b;try{b=cP()}catch{b=void 0}v("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:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})})(Au);var lP=Cr,_o=Ov,A5=qn;function Fa(t){if(!(this instanceof Fa))return new Fa(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=_o.toArray(t.entropy,t.entropyEnc||"hex"),r=_o.toArray(t.nonce,t.nonceEnc||"hex"),n=_o.toArray(t.pers,t.persEnc||"hex");A5(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var uP=Fa;Fa.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Fa.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=_o.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var xl=Ki.exports,Uv=Rn,vP=Uv.assert;function Eu(t,e){if(t instanceof Eu)return t;this._importDER(t,e)||(vP(t.r&&t.s,"Signature without r or s"),this.r=new xl(t.r,16),this.s=new xl(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var mP=Eu;function gP(){this.place=0}function xh(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var s=0,i=0,u=e.place;i>>=0;return s<=127?!1:(e.place=u,s)}function _b(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Eu.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=_b(r),n=_b(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];wh(s,r.length),s=s.concat(r),s.push(2),wh(s,n.length);var i=s.concat(n),u=[48];return wh(u,i.length),u=u.concat(i),Uv.encode(u,e)};var _h,Mb;function bP(){if(Mb)return _h;Mb=1;var t=Ki.exports,e=uP,r=Rn,n=Au,s=Iv(),i=r.assert,u=pP,v=mP;function b(m){if(!(this instanceof b))return new b(m);typeof m=="string"&&(i(Object.prototype.hasOwnProperty.call(n,m),"Unknown curve "+m),m=n[m]),m instanceof n.PresetCurve&&(m={curve:m}),this.curve=m.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=m.curve.g,this.g.precompute(m.curve.n.bitLength()+1),this.hash=m.hash||m.curve.hash}return _h=b,b.prototype.keyPair=function(g){return new u(this,g)},b.prototype.keyFromPrivate=function(g,_){return u.fromPrivate(this,g,_)},b.prototype.keyFromPublic=function(g,_){return u.fromPublic(this,g,_)},b.prototype.genKeyPair=function(g){g||(g={});for(var _=new e({hash:this.hash,pers:g.pers,persEnc:g.persEnc||"utf8",entropy:g.entropy||s(this.hash.hmacStrength),entropyEnc:g.entropy&&g.entropyEnc||"utf8",nonce:this.n.toArray()}),A=this.n.byteLength(),E=this.n.sub(new t(2));;){var R=new t(_.generate(A));if(!(R.cmp(E)>0))return R.iaddn(1),this.keyFromPrivate(R)}},b.prototype._truncateToN=function(g,_){var A=g.byteLength()*8-this.n.bitLength();return A>0&&(g=g.ushrn(A)),!_&&g.cmp(this.n)>=0?g.sub(this.n):g},b.prototype.sign=function(g,_,A,E){typeof A=="object"&&(E=A,A=null),E||(E={}),_=this.keyFromPrivate(_,A),g=this._truncateToN(new t(g,16));for(var R=this.n.byteLength(),B=_.getPrivate().toArray("be",R),T=g.toArray("be",R),F=new e({hash:this.hash,entropy:B,nonce:T,pers:E.pers,persEnc:E.persEnc||"utf8"}),O=this.n.sub(new t(1)),q=0;;q++){var H=E.k?E.k(q):new t(F.generate(this.n.byteLength()));if(H=this._truncateToN(H,!0),!(H.cmpn(1)<=0||H.cmp(O)>=0)){var G=this.g.mul(H);if(!G.isInfinity()){var re=G.getX(),ne=re.umod(this.n);if(ne.cmpn(0)!==0){var Y=H.invm(this.n).mul(ne.mul(_.getPrivate()).iadd(g));if(Y=Y.umod(this.n),Y.cmpn(0)!==0){var W=(G.getY().isOdd()?1:0)|(re.cmp(ne)!==0?2:0);return E.canonical&&Y.cmp(this.nh)>0&&(Y=this.n.sub(Y),W^=1),new v({r:ne,s:Y,recoveryParam:W})}}}}}},b.prototype.verify=function(g,_,A,E){g=this._truncateToN(new t(g,16)),A=this.keyFromPublic(A,E),_=new v(_,"hex");var R=_.r,B=_.s;if(R.cmpn(1)<0||R.cmp(this.n)>=0||B.cmpn(1)<0||B.cmp(this.n)>=0)return!1;var T=B.invm(this.n),F=T.mul(g).umod(this.n),O=T.mul(R).umod(this.n),q;return this.curve._maxwellTrick?(q=this.g.jmulAdd(F,A.getPublic(),O),q.isInfinity()?!1:q.eqXToP(R)):(q=this.g.mulAdd(F,A.getPublic(),O),q.isInfinity()?!1:q.getX().umod(this.n).cmp(R)===0)},b.prototype.recoverPubKey=function(m,g,_,A){i((3&_)===_,"The recovery param is more than two bits"),g=new v(g,A);var E=this.n,R=new t(m),B=g.r,T=g.s,F=_&1,O=_>>1;if(B.cmp(this.curve.p.umod(this.curve.n))>=0&&O)throw new Error("Unable to find sencond key candinate");O?B=this.curve.pointFromX(B.add(this.curve.n),F):B=this.curve.pointFromX(B,F);var q=g.r.invm(E),H=E.sub(R).mul(q).umod(E),G=T.mul(q).umod(E);return this.g.mulAdd(H,B,G)},b.prototype.getKeyRecoveryParam=function(m,g,_,A){if(g=new v(g,A),g.recoveryParam!==null)return g.recoveryParam;for(var E=0;E<4;E++){var R;try{R=this.recoverPubKey(m,g,E)}catch{continue}if(R.eq(_))return E}throw new Error("Unable to find valid recovery factor")},_h}var P0=Rn,E5=P0.assert,Ab=P0.parseBytes,Qs=P0.cachedProperty;function Nr(t,e){this.eddsa=t,this._secret=Ab(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Ab(e.pub)}Nr.fromPublic=function(e,r){return r instanceof Nr?r:new Nr(e,{pub:r})};Nr.fromSecret=function(e,r){return r instanceof Nr?r:new Nr(e,{secret:r})};Nr.prototype.secret=function(){return this._secret};Qs(Nr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Qs(Nr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Qs(Nr,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,s=r.slice(0,e.encodingLength);return s[0]&=248,s[n]&=127,s[n]|=64,s});Qs(Nr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Qs(Nr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Qs(Nr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Nr.prototype.sign=function(e){return E5(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Nr.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};Nr.prototype.getSecret=function(e){return E5(this._secret,"KeyPair is public only"),P0.encode(this.secret(),e)};Nr.prototype.getPublic=function(e){return P0.encode(this.pubBytes(),e)};var yP=Nr,xP=Ki.exports,Su=Rn,wP=Su.assert,Ru=Su.cachedProperty,_P=Su.parseBytes;function Lo(t,e){this.eddsa=t,typeof e!="object"&&(e=_P(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),wP(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof xP&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Ru(Lo,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Ru(Lo,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Ru(Lo,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Ru(Lo,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Lo.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Lo.prototype.toHex=function(){return Su.encode(this.toBytes(),"hex").toUpperCase()};var MP=Lo,AP=Cr,EP=Au,Fs=Rn,SP=Fs.assert,S5=Fs.parseBytes,R5=yP,Eb=MP;function vn(t){if(SP(t==="ed25519","only tested with ed25519 so far"),!(this instanceof vn))return new vn(t);t=EP[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=AP.sha512}var RP=vn;vn.prototype.sign=function(e,r){e=S5(e);var n=this.keyFromSecret(r),s=this.hashInt(n.messagePrefix(),e),i=this.g.mul(s),u=this.encodePoint(i),v=this.hashInt(u,n.pubBytes(),e).mul(n.priv()),b=s.add(v).umod(this.curve.n);return this.makeSignature({R:i,S:b,Rencoded:u})};vn.prototype.verify=function(e,r,n){e=S5(e),r=this.makeSignature(r);var s=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),s.pubBytes(),e),u=this.g.mul(r.S()),v=r.R().add(s.pub().mul(i));return v.eq(u)};vn.prototype.hashInt=function(){for(var e=this.hash(),r=0;r0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(Ah)),Ah.exports}var Eh={},Sh={},Rh,Cb;function Kv(){if(Cb)return Rh;Cb=1;var t=He,e=t.Buffer,r={},n;for(n in t)!t.hasOwnProperty(n)||n==="SlowBuffer"||n==="Buffer"||(r[n]=t[n]);var s=r.Buffer={};for(n in e)!e.hasOwnProperty(n)||n==="allocUnsafe"||n==="allocUnsafeSlow"||(s[n]=e[n]);if(r.Buffer.prototype=e.prototype,(!s.from||s.from===Uint8Array.from)&&(s.from=function(i,u,v){if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof i);if(i&&typeof i.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);return e(i,u,v)}),s.alloc||(s.alloc=function(i,u,v){if(typeof i!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof i);if(i<0||i>=2*(1<<30))throw new RangeError('The value "'+i+'" is invalid for option "size"');var b=e(i);return!u||u.length===0?b.fill(0):typeof v=="string"?b.fill(u,v):b.fill(u),b}),!r.kStringMaxLength)try{r.kStringMaxLength=Je.exports.binding("buffer").kStringMaxLength}catch{}return r.constants||(r.constants={MAX_LENGTH:r.kMaxLength},r.kStringMaxLength&&(r.constants.MAX_STRING_LENGTH=r.kStringMaxLength)),Rh=r,Rh}var Ch={},Bb;function $v(){if(Bb)return Ch;Bb=1;const t=ct.exports;function e(n){this._reporterState={obj:null,path:[],options:n||{},errors:[]}}Ch.Reporter=e,e.prototype.isError=function(s){return s instanceof r},e.prototype.save=function(){const s=this._reporterState;return{obj:s.obj,pathLen:s.path.length}},e.prototype.restore=function(s){const i=this._reporterState;i.obj=s.obj,i.path=i.path.slice(0,s.pathLen)},e.prototype.enterKey=function(s){return this._reporterState.path.push(s)},e.prototype.exitKey=function(s){const i=this._reporterState;i.path=i.path.slice(0,s-1)},e.prototype.leaveKey=function(s,i,u){const v=this._reporterState;this.exitKey(s),v.obj!==null&&(v.obj[i]=u)},e.prototype.path=function(){return this._reporterState.path.join("/")},e.prototype.enterObject=function(){const s=this._reporterState,i=s.obj;return s.obj={},i},e.prototype.leaveObject=function(s){const i=this._reporterState,u=i.obj;return i.obj=s,u},e.prototype.error=function(s){let i;const u=this._reporterState,v=s instanceof r;if(v?i=s:i=new r(u.path.map(function(b){return"["+JSON.stringify(b)+"]"}).join(""),s.message||s,s.stack),!u.options.partial)throw i;return v||u.errors.push(i),i},e.prototype.wrapResult=function(s){const i=this._reporterState;return i.options.partial?{result:this.isError(s)?null:s,errors:i.errors}:s};function r(n,s){this.path=n,this.rethrow(s)}return t(r,Error),r.prototype.rethrow=function(s){if(this.message=s+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(i){this.stack=i.stack}return this},Ch}var lc={},Nb;function u0(){if(Nb)return lc;Nb=1;const t=ct.exports,e=$v().Reporter,r=Kv().Buffer;function n(i,u){if(e.call(this,u),!r.isBuffer(i)){this.error("Input not Buffer");return}this.base=i,this.offset=0,this.length=i.length}t(n,e),lc.DecoderBuffer=n,n.isDecoderBuffer=function(u){return u instanceof n?!0:typeof u=="object"&&r.isBuffer(u.base)&&u.constructor.name==="DecoderBuffer"&&typeof u.offset=="number"&&typeof u.length=="number"&&typeof u.save=="function"&&typeof u.restore=="function"&&typeof u.isEmpty=="function"&&typeof u.readUInt8=="function"&&typeof u.skip=="function"&&typeof u.raw=="function"},n.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},n.prototype.restore=function(u){const v=new n(this.base);return v.offset=u.offset,v.length=this.offset,this.offset=u.offset,e.prototype.restore.call(this,u.reporter),v},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(u){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(u||"DecoderBuffer overrun")},n.prototype.skip=function(u,v){if(!(this.offset+u<=this.length))return this.error(v||"DecoderBuffer overrun");const b=new n(this.base);return b._reporterState=this._reporterState,b.offset=this.offset,b.length=this.offset+u,this.offset+=u,b},n.prototype.raw=function(u){return this.base.slice(u?u.offset:this.offset,this.length)};function s(i,u){if(Array.isArray(i))this.length=0,this.value=i.map(function(v){return s.isEncoderBuffer(v)||(v=new s(v,u)),this.length+=v.length,v},this);else if(typeof i=="number"){if(!(0<=i&&i<=255))return u.error("non-byte EncoderBuffer value");this.value=i,this.length=1}else if(typeof i=="string")this.value=i,this.length=r.byteLength(i);else if(r.isBuffer(i))this.value=i,this.length=i.length;else return u.error("Unsupported type: "+typeof i)}return lc.EncoderBuffer=s,s.isEncoderBuffer=function(u){return u instanceof s?!0:typeof u=="object"&&u.constructor.name==="EncoderBuffer"&&typeof u.length=="number"&&typeof u.join=="function"},s.prototype.join=function(u,v){return u||(u=r.alloc(this.length)),v||(v=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(b){b.join(u,v),v+=b.length}):(typeof this.value=="number"?u[v]=this.value:typeof this.value=="string"?u.write(this.value,v):r.isBuffer(this.value)&&this.value.copy(u,v),v+=this.length)),u},lc}var Bh,Tb;function qv(){if(Tb)return Bh;Tb=1;const t=$v().Reporter,e=u0().EncoderBuffer,r=u0().DecoderBuffer,n=qn,s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s),u=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function v(m,g,_){const A={};this._baseState=A,A.name=_,A.enc=m,A.parent=g||null,A.children=null,A.tag=null,A.args=null,A.reverseArgs=null,A.choice=null,A.optional=!1,A.any=!1,A.obj=!1,A.use=null,A.useDecoder=null,A.key=null,A.default=null,A.explicit=null,A.implicit=null,A.contains=null,A.parent||(A.children=[],this._wrap())}Bh=v;const b=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return v.prototype.clone=function(){const g=this._baseState,_={};b.forEach(function(E){_[E]=g[E]});const A=new this.constructor(_.parent);return A._baseState=_,A},v.prototype._wrap=function(){const g=this._baseState;i.forEach(function(_){this[_]=function(){const E=new this.constructor(this);return g.children.push(E),E[_].apply(E,arguments)}},this)},v.prototype._init=function(g){const _=this._baseState;n(_.parent===null),g.call(this),_.children=_.children.filter(function(A){return A._baseState.parent===this},this),n.equal(_.children.length,1,"Root node can have only one child")},v.prototype._useArgs=function(g){const _=this._baseState,A=g.filter(function(E){return E instanceof this.constructor},this);g=g.filter(function(E){return!(E instanceof this.constructor)},this),A.length!==0&&(n(_.children===null),_.children=A,A.forEach(function(E){E._baseState.parent=this},this)),g.length!==0&&(n(_.args===null),_.args=g,_.reverseArgs=g.map(function(E){if(typeof E!="object"||E.constructor!==Object)return E;const R={};return Object.keys(E).forEach(function(B){B==(B|0)&&(B|=0);const T=E[B];R[T]=B}),R}))},u.forEach(function(m){v.prototype[m]=function(){const _=this._baseState;throw new Error(m+" not implemented for encoding: "+_.enc)}}),s.forEach(function(m){v.prototype[m]=function(){const _=this._baseState,A=Array.prototype.slice.call(arguments);return n(_.tag===null),_.tag=m,this._useArgs(A),this}}),v.prototype.use=function(g){n(g);const _=this._baseState;return n(_.use===null),_.use=g,this},v.prototype.optional=function(){const g=this._baseState;return g.optional=!0,this},v.prototype.def=function(g){const _=this._baseState;return n(_.default===null),_.default=g,_.optional=!0,this},v.prototype.explicit=function(g){const _=this._baseState;return n(_.explicit===null&&_.implicit===null),_.explicit=g,this},v.prototype.implicit=function(g){const _=this._baseState;return n(_.explicit===null&&_.implicit===null),_.implicit=g,this},v.prototype.obj=function(){const g=this._baseState,_=Array.prototype.slice.call(arguments);return g.obj=!0,_.length!==0&&this._useArgs(_),this},v.prototype.key=function(g){const _=this._baseState;return n(_.key===null),_.key=g,this},v.prototype.any=function(){const g=this._baseState;return g.any=!0,this},v.prototype.choice=function(g){const _=this._baseState;return n(_.choice===null),_.choice=g,this._useArgs(Object.keys(g).map(function(A){return g[A]})),this},v.prototype.contains=function(g){const _=this._baseState;return n(_.use===null),_.contains=g,this},v.prototype._decode=function(g,_){const A=this._baseState;if(A.parent===null)return g.wrapResult(A.children[0]._decode(g,_));let E=A.default,R=!0,B=null;if(A.key!==null&&(B=g.enterKey(A.key)),A.optional){let F=null;if(A.explicit!==null?F=A.explicit:A.implicit!==null?F=A.implicit:A.tag!==null&&(F=A.tag),F===null&&!A.any){const O=g.save();try{A.choice===null?this._decodeGeneric(A.tag,g,_):this._decodeChoice(g,_),R=!0}catch{R=!1}g.restore(O)}else if(R=this._peekTag(g,F,A.any),g.isError(R))return R}let T;if(A.obj&&R&&(T=g.enterObject()),R){if(A.explicit!==null){const O=this._decodeTag(g,A.explicit);if(g.isError(O))return O;g=O}const F=g.offset;if(A.use===null&&A.choice===null){let O;A.any&&(O=g.save());const q=this._decodeTag(g,A.implicit!==null?A.implicit:A.tag,A.any);if(g.isError(q))return q;A.any?E=g.raw(O):g=q}if(_&&_.track&&A.tag!==null&&_.track(g.path(),F,g.length,"tagged"),_&&_.track&&A.tag!==null&&_.track(g.path(),g.offset,g.length,"content"),A.any||(A.choice===null?E=this._decodeGeneric(A.tag,g,_):E=this._decodeChoice(g,_)),g.isError(E))return E;if(!A.any&&A.choice===null&&A.children!==null&&A.children.forEach(function(q){q._decode(g,_)}),A.contains&&(A.tag==="octstr"||A.tag==="bitstr")){const O=new r(E);E=this._getUse(A.contains,g._reporterState.obj)._decode(O,_)}}return A.obj&&R&&(E=g.leaveObject(T)),A.key!==null&&(E!==null||R===!0)?g.leaveKey(B,A.key,E):B!==null&&g.exitKey(B),E},v.prototype._decodeGeneric=function(g,_,A){const E=this._baseState;return g==="seq"||g==="set"?null:g==="seqof"||g==="setof"?this._decodeList(_,g,E.args[0],A):/str$/.test(g)?this._decodeStr(_,g,A):g==="objid"&&E.args?this._decodeObjid(_,E.args[0],E.args[1],A):g==="objid"?this._decodeObjid(_,null,null,A):g==="gentime"||g==="utctime"?this._decodeTime(_,g,A):g==="null_"?this._decodeNull(_,A):g==="bool"?this._decodeBool(_,A):g==="objDesc"?this._decodeStr(_,g,A):g==="int"||g==="enum"?this._decodeInt(_,E.args&&E.args[0],A):E.use!==null?this._getUse(E.use,_._reporterState.obj)._decode(_,A):_.error("unknown tag: "+g)},v.prototype._getUse=function(g,_){const A=this._baseState;return A.useDecoder=this._use(g,_),n(A.useDecoder._baseState.parent===null),A.useDecoder=A.useDecoder._baseState.children[0],A.implicit!==A.useDecoder._baseState.implicit&&(A.useDecoder=A.useDecoder.clone(),A.useDecoder._baseState.implicit=A.implicit),A.useDecoder},v.prototype._decodeChoice=function(g,_){const A=this._baseState;let E=null,R=!1;return Object.keys(A.choice).some(function(B){const T=g.save(),F=A.choice[B];try{const O=F._decode(g,_);if(g.isError(O))return!1;E={type:B,value:O},R=!0}catch{return g.restore(T),!1}return!0},this),R?E:g.error("Choice not matched")},v.prototype._createEncoderBuffer=function(g){return new e(g,this.reporter)},v.prototype._encode=function(g,_,A){const E=this._baseState;if(E.default!==null&&E.default===g)return;const R=this._encodeValue(g,_,A);if(R!==void 0&&!this._skipDefault(R,_,A))return R},v.prototype._encodeValue=function(g,_,A){const E=this._baseState;if(E.parent===null)return E.children[0]._encode(g,_||new t);let R=null;if(this.reporter=_,E.optional&&g===void 0)if(E.default!==null)g=E.default;else return;let B=null,T=!1;if(E.any)R=this._createEncoderBuffer(g);else if(E.choice)R=this._encodeChoice(g,_);else if(E.contains)B=this._getUse(E.contains,A)._encode(g,_),T=!0;else if(E.children)B=E.children.map(function(F){if(F._baseState.tag==="null_")return F._encode(null,_,g);if(F._baseState.key===null)return _.error("Child should have a key");const O=_.enterKey(F._baseState.key);if(typeof g!="object")return _.error("Child expected, but input is not object");const q=F._encode(g[F._baseState.key],_,g);return _.leaveKey(O),q},this).filter(function(F){return F}),B=this._createEncoderBuffer(B);else if(E.tag==="seqof"||E.tag==="setof"){if(!(E.args&&E.args.length===1))return _.error("Too many args for : "+E.tag);if(!Array.isArray(g))return _.error("seqof/setof, but data is not Array");const F=this.clone();F._baseState.implicit=null,B=this._createEncoderBuffer(g.map(function(O){const q=this._baseState;return this._getUse(q.args[0],g)._encode(O,_)},F))}else E.use!==null?R=this._getUse(E.use,A)._encode(g,_):(B=this._encodePrimitive(E.tag,g),T=!0);if(!E.any&&E.choice===null){const F=E.implicit!==null?E.implicit:E.tag,O=E.implicit===null?"universal":"context";F===null?E.use===null&&_.error("Tag could be omitted only for .use()"):E.use===null&&(R=this._encodeComposite(F,T,O,B))}return E.explicit!==null&&(R=this._encodeComposite(E.explicit,!1,"context",R)),R},v.prototype._encodeChoice=function(g,_){const A=this._baseState,E=A.choice[g.type];return E||n(!1,g.type+" not found in "+JSON.stringify(Object.keys(A.choice))),E._encode(g.value,_)},v.prototype._encodePrimitive=function(g,_){const A=this._baseState;if(/str$/.test(g))return this._encodeStr(_,g);if(g==="objid"&&A.args)return this._encodeObjid(_,A.reverseArgs[0],A.args[1]);if(g==="objid")return this._encodeObjid(_,null,null);if(g==="gentime"||g==="utctime")return this._encodeTime(_,g);if(g==="null_")return this._encodeNull();if(g==="int"||g==="enum")return this._encodeInt(_,A.args&&A.reverseArgs[0]);if(g==="bool")return this._encodeBool(_);if(g==="objDesc")return this._encodeStr(_,g);throw new Error("Unsupported tag: "+g)},v.prototype._isNumstr=function(g){return/^[0-9 ]*$/.test(g)},v.prototype._isPrintstr=function(g){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(g)},Bh}var Nh={},kb;function Hv(){return kb||(kb=1,function(t){function e(r){const n={};return Object.keys(r).forEach(function(s){(s|0)==s&&(s=s|0);const i=r[s];n[i]=s}),n}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(Nh)),Nh}var Th,Pb;function B5(){if(Pb)return Th;Pb=1;const t=ct.exports,e=Kv().Buffer,r=qv(),n=Hv();function s(b){this.enc="der",this.name=b.name,this.entity=b,this.tree=new i,this.tree._init(b.body)}Th=s,s.prototype.encode=function(m,g){return this.tree._encode(m,g).join()};function i(b){r.call(this,"der",b)}t(i,r),i.prototype._encodeComposite=function(m,g,_,A){const E=v(m,g,_,this.reporter);if(A.length<128){const T=e.alloc(2);return T[0]=E,T[1]=A.length,this._createEncoderBuffer([T,A])}let R=1;for(let T=A.length;T>=256;T>>=8)R++;const B=e.alloc(1+1+R);B[0]=E,B[1]=128|R;for(let T=1+R,F=A.length;F>0;T--,F>>=8)B[T]=F&255;return this._createEncoderBuffer([B,A])},i.prototype._encodeStr=function(m,g){if(g==="bitstr")return this._createEncoderBuffer([m.unused|0,m.data]);if(g==="bmpstr"){const _=e.alloc(m.length*2);for(let A=0;A=40)return this.reporter.error("Second objid identifier OOB");m.splice(0,2,m[0]*40+m[1])}let A=0;for(let B=0;B=128;T>>=7)A++}const E=e.alloc(A);let R=E.length-1;for(let B=m.length-1;B>=0;B--){let T=m[B];for(E[R--]=T&127;(T>>=7)>0;)E[R--]=128|T&127}return this._createEncoderBuffer(E)};function u(b){return b<10?"0"+b:b}i.prototype._encodeTime=function(m,g){let _;const A=new Date(m);return g==="gentime"?_=[u(A.getUTCFullYear()),u(A.getUTCMonth()+1),u(A.getUTCDate()),u(A.getUTCHours()),u(A.getUTCMinutes()),u(A.getUTCSeconds()),"Z"].join(""):g==="utctime"?_=[u(A.getUTCFullYear()%100),u(A.getUTCMonth()+1),u(A.getUTCDate()),u(A.getUTCHours()),u(A.getUTCMinutes()),u(A.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+g+" time is not supported yet"),this._encodeStr(_,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(m,g){if(typeof m=="string"){if(!g)return this.reporter.error("String int or enum given, but no values map");if(!g.hasOwnProperty(m))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(m));m=g[m]}if(typeof m!="number"&&!e.isBuffer(m)){const E=m.toArray();!m.sign&&E[0]&128&&E.unshift(0),m=e.from(E)}if(e.isBuffer(m)){let E=m.length;m.length===0&&E++;const R=e.alloc(E);return m.copy(R),m.length===0&&(R[0]=0),this._createEncoderBuffer(R)}if(m<128)return this._createEncoderBuffer(m);if(m<256)return this._createEncoderBuffer([0,m]);let _=1;for(let E=m;E>=256;E>>=8)_++;const A=new Array(_);for(let E=A.length-1;E>=0;E--)A[E]=m&255,m>>=8;return A[0]&128&&A.unshift(0),this._createEncoderBuffer(e.from(A))},i.prototype._encodeBool=function(m){return this._createEncoderBuffer(m?255:0)},i.prototype._use=function(m,g){return typeof m=="function"&&(m=m(g)),m._getEncoder("der").tree},i.prototype._skipDefault=function(m,g,_){const A=this._baseState;let E;if(A.default===null)return!1;const R=m.join();if(A.defaultBuffer===void 0&&(A.defaultBuffer=this._encodeValue(A.default,g,_).join()),R.length!==A.defaultBuffer.length)return!1;for(E=0;E=31?_.error("Multi-octet tag encoding unsupported"):(m||(A|=32),A|=n.tagClassByName[g||"universal"]<<6,A)}return Th}var kh,Ib;function CP(){if(Ib)return kh;Ib=1;const t=ct.exports,e=B5();function r(n){e.call(this,n),this.enc="pem"}return t(r,e),kh=r,r.prototype.encode=function(s,i){const v=e.prototype.encode.call(this,s).toString("base64"),b=["-----BEGIN "+i.label+"-----"];for(let m=0;m>6],E=(_&32)===0;if((_&31)===31){let B=_;for(_=0;(B&128)===128;){if(B=m.readUInt8(g),m.isError(B))return B;_<<=7,_|=B&127}}else _&=31;const R=s.tag[_];return{cls:A,primitive:E,tag:_,tagStr:R}}function b(m,g,_){let A=m.readUInt8(_);if(m.isError(A))return A;if(!g&&A===128)return null;if((A&128)===0)return A;const E=A&127;if(E>4)return m.error("length octect is too long");A=0;for(let R=0;R0&&O.ishrn(q),O}function E(T,F){T=A(T,F),T=T.mod(F);var O=t.from(T.toArray());if(O.length=g)throw new Error("invalid sig")}return $h=i,$h}var qh,Zb;function UP(){if(Zb)return qh;Zb=1;var t=ut.exports.Buffer,e=N0,r=hl.exports,n=ct.exports,s=FP(),i=LP(),u=s5;Object.keys(u).forEach(function(_){u[_].id=t.from(u[_].id,"hex"),u[_.toLowerCase()]=u[_]});function v(_){r.Writable.call(this);var A=u[_];if(!A)throw new Error("Unknown message digest");this._hashType=A.hash,this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(v,r.Writable),v.prototype._write=function(A,E,R){this._hash.update(A),R()},v.prototype.update=function(A,E){return typeof A=="string"&&(A=t.from(A,E)),this._hash.update(A),this},v.prototype.sign=function(A,E){this.end();var R=this._hash.digest(),B=s(R,A,this._hashType,this._signType,this._tag);return E?B.toString(E):B};function b(_){r.Writable.call(this);var A=u[_];if(!A)throw new Error("Unknown message digest");this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(b,r.Writable),b.prototype._write=function(A,E,R){this._hash.update(A),R()},b.prototype.update=function(A,E){return typeof A=="string"&&(A=t.from(A,E)),this._hash.update(A),this},b.prototype.verify=function(A,E,R){typeof E=="string"&&(E=t.from(E,R)),this.end();var B=this._hash.digest();return i(E,B,A,this._signType,this._tag)};function m(_){return new v(_)}function g(_){return new b(_)}return qh={Sign:m,Verify:g,createSign:m,createVerify:g},qh}var Hh={exports:{}},Jb;function KP(){return Jb||(Jb=1,function(t){(function(e,r){function n(y,a){if(!y)throw new Error(a||"Assertion failed")}function s(y,a){y.super_=a;var f=function(){};f.prototype=a.prototype,y.prototype=new f,y.prototype.constructor=y}function i(y,a,f){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((a==="le"||a==="be")&&(f=a,a=10),this._init(y||0,a||10,f||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=He.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,f){return a.cmp(f)>0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(Hh)),Hh.exports}var zh,Xb;function $P(){if(Xb)return zh;Xb=1;var t=Cu(),e=KP();zh=function(u){return new n(u)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function n(i){this.curveType=r[i],this.curveType||(this.curveType={name:i}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(i,u){return this.keys=this.curve.genKeyPair(),this.getPublicKey(i,u)},n.prototype.computeSecret=function(i,u,v){u=u||"utf8",He.Buffer.isBuffer(i)||(i=new He.Buffer(i,u));var b=this.curve.keyFromPublic(i).getPublic(),m=b.mul(this.keys.getPrivate()).getX();return s(m,v,this.curveType.byteLength)},n.prototype.getPublicKey=function(i,u){var v=this.keys.getPublic(u==="compressed",!0);return u==="hybrid"&&(v[v.length-1]%2?v[0]=7:v[0]=6),s(v,i)},n.prototype.getPrivateKey=function(i){return s(this.keys.getPrivate(),i)},n.prototype.setPublicKey=function(i,u){return u=u||"utf8",He.Buffer.isBuffer(i)||(i=new He.Buffer(i,u)),this.keys._importPublic(i),this},n.prototype.setPrivateKey=function(i,u){u=u||"utf8",He.Buffer.isBuffer(i)||(i=new He.Buffer(i,u));var v=new e(i);return v=v.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(v),this};function s(i,u,v){Array.isArray(i)||(i=i.toArray());var b=new He.Buffer(i);if(v&&b.length0?a:f},i.min=function(a,f){return a.cmp(f)<0?a:f},i.prototype._init=function(a,f,c){if(typeof a=="number")return this._initNumber(a,f,c);if(typeof a=="object")return this._initArray(a,f,c);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),a=a.toString().replace(/\s+/g,"");var l=0;a[0]==="-"&&(l++,this.negative=1),l=0;l-=3)x=a[l]|a[l-1]<<8|a[l-2]<<16,this.words[h]|=x<>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);else if(c==="le")for(l=0,h=0;l>>26-w&67108863,w+=24,w>=26&&(w-=26,h++);return this.strip()};function v(y,a){var f=y.charCodeAt(a);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function b(y,a,f){var c=v(y,f);return f-1>=a&&(c|=v(y,f-1)<<4),c}i.prototype._parseHex=function(a,f,c){this.length=Math.ceil((a.length-f)/6),this.words=new Array(this.length);for(var l=0;l=f;l-=2)w=b(a,f,l)<=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8;else{var p=a.length-f;for(l=p%2===0?f+1:f;l=18?(h-=18,x+=1,this.words[x]|=w>>>26):h+=8}this.strip()};function m(y,a,f,c){for(var l=0,h=Math.min(y.length,f),x=a;x=49?l+=w-49+10:w>=17?l+=w-17+10:l+=w}return l}i.prototype._parseBase=function(a,f,c){this.words=[0],this.length=1;for(var l=0,h=1;h<=67108863;h*=f)l++;l--,h=h/f|0;for(var x=a.length-c,w=x%l,p=Math.min(x,x-w)+c,o=0,d=c;d1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],_=[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],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,f){a=a||10,f=f|0||1;var c;if(a===16||a==="hex"){c="";for(var l=0,h=0,x=0;x>>24-l&16777215,h!==0||x!==this.length-1?c=g[6-p.length]+p+c:c=p+c,l+=2,l>=26&&(l-=26,x--)}for(h!==0&&(c=h.toString(16)+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(a===(a|0)&&a>=2&&a<=36){var o=_[a],d=A[a];c="";var M=this.clone();for(M.negative=0;!M.isZero();){var C=M.modn(d).toString(a);M=M.idivn(d),M.isZero()?c=C+c:c=g[o-C.length]+C+c}for(this.isZero()&&(c="0"+c);c.length%f!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,f){return n(typeof u<"u"),this.toArrayLike(u,a,f)},i.prototype.toArray=function(a,f){return this.toArrayLike(Array,a,f)},i.prototype.toArrayLike=function(a,f,c){var l=this.byteLength(),h=c||Math.max(1,l);n(l<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0"),this.strip();var x=f==="le",w=new a(h),p,o,d=this.clone();if(x){for(o=0;!d.isZero();o++)p=d.andln(255),d.iushrn(8),w[o]=p;for(;o=4096&&(c+=13,f>>>=13),f>=64&&(c+=7,f>>>=7),f>=8&&(c+=4,f>>>=4),f>=2&&(c+=2,f>>>=2),c+f},i.prototype._zeroBits=function(a){if(a===0)return 26;var f=a,c=0;return(f&8191)===0&&(c+=13,f>>>=13),(f&127)===0&&(c+=7,f>>>=7),(f&15)===0&&(c+=4,f>>>=4),(f&3)===0&&(c+=2,f>>>=2),(f&1)===0&&c++,c},i.prototype.bitLength=function(){var a=this.words[this.length-1],f=this._countBits(a);return(this.length-1)*26+f};function E(y){for(var a=new Array(y.bitLength()),f=0;f>>l}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,f=0;fa.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var f;this.length>a.length?f=a:f=this;for(var c=0;ca.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var f,c;this.length>a.length?(f=this,c=a):(f=a,c=this);for(var l=0;la.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var f=Math.ceil(a/26)|0,c=a%26;this._expand(f),c>0&&f--;for(var l=0;l0&&(this.words[l]=~this.words[l]&67108863>>26-c),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,f){n(typeof a=="number"&&a>=0);var c=a/26|0,l=a%26;return this._expand(c+1),f?this.words[c]=this.words[c]|1<a.length?(c=this,l=a):(c=a,l=this);for(var h=0,x=0;x>>26;for(;h!==0&&x>>26;if(this.length=c.length,h!==0)this.words[this.length]=h,this.length++;else if(c!==this)for(;xa.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var f=this.iadd(a);return a.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var c=this.cmp(a);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,h;c>0?(l=this,h=a):(l=a,h=this);for(var x=0,w=0;w>26,this.words[w]=f&67108863;for(;x!==0&&w>26,this.words[w]=f&67108863;if(x===0&&w>>26,M=p&67108863,C=Math.min(o,a.length-1),P=Math.max(0,o-y.length+1);P<=C;P++){var S=o-P|0;l=y.words[S]|0,h=a.words[P]|0,x=l*h+M,d+=x/67108864|0,M=x&67108863}f.words[o]=M|0,p=d|0}return p!==0?f.words[o]=p|0:f.length--,f.strip()}var B=function(a,f,c){var l=a.words,h=f.words,x=c.words,w=0,p,o,d,M=l[0]|0,C=M&8191,P=M>>>13,S=l[1]|0,I=S&8191,U=S>>>13,V=l[2]|0,z=V&8191,X=V>>>13,j=l[3]|0,N=j&8191,$=j>>>13,ee=l[4]|0,J=ee&8191,K=ee>>>13,D=l[5]|0,k=D&8191,L=D>>>13,te=l[6]|0,Z=te&8191,Q=te>>>13,Ie=l[7]|0,ie=Ie&8191,oe=Ie>>>13,Oe=l[8]|0,ae=Oe&8191,fe=Oe>>>13,Ke=l[9]|0,le=Ke&8191,Me=Ke>>>13,Ze=h[0]|0,pe=Ze&8191,Ae=Ze>>>13,ze=h[1]|0,he=ze&8191,Ee=ze>>>13,Ye=h[2]|0,ve=Ye&8191,Se=Ye>>>13,Qe=h[3]|0,me=Qe&8191,Re=Qe>>>13,et=h[4]|0,ge=et&8191,Ce=et>>>13,tt=h[5]|0,be=tt&8191,Be=tt>>>13,rt=h[6]|0,ye=rt&8191,Ne=rt>>>13,nt=h[7]|0,xe=nt&8191,Te=nt>>>13,it=h[8]|0,we=it&8191,ke=it>>>13,at=h[9]|0,_e=at&8191,Pe=at>>>13;c.negative=a.negative^f.negative,c.length=19,p=Math.imul(C,pe),o=Math.imul(C,Ae),o=o+Math.imul(P,pe)|0,d=Math.imul(P,Ae);var Ge=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(I,pe),o=Math.imul(I,Ae),o=o+Math.imul(U,pe)|0,d=Math.imul(U,Ae),p=p+Math.imul(C,he)|0,o=o+Math.imul(C,Ee)|0,o=o+Math.imul(P,he)|0,d=d+Math.imul(P,Ee)|0;var Ve=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(z,pe),o=Math.imul(z,Ae),o=o+Math.imul(X,pe)|0,d=Math.imul(X,Ae),p=p+Math.imul(I,he)|0,o=o+Math.imul(I,Ee)|0,o=o+Math.imul(U,he)|0,d=d+Math.imul(U,Ee)|0,p=p+Math.imul(C,ve)|0,o=o+Math.imul(C,Se)|0,o=o+Math.imul(P,ve)|0,d=d+Math.imul(P,Se)|0;var pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(pt>>>26)|0,pt&=67108863,p=Math.imul(N,pe),o=Math.imul(N,Ae),o=o+Math.imul($,pe)|0,d=Math.imul($,Ae),p=p+Math.imul(z,he)|0,o=o+Math.imul(z,Ee)|0,o=o+Math.imul(X,he)|0,d=d+Math.imul(X,Ee)|0,p=p+Math.imul(I,ve)|0,o=o+Math.imul(I,Se)|0,o=o+Math.imul(U,ve)|0,d=d+Math.imul(U,Se)|0,p=p+Math.imul(C,me)|0,o=o+Math.imul(C,Re)|0,o=o+Math.imul(P,me)|0,d=d+Math.imul(P,Re)|0;var vt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,p=Math.imul(J,pe),o=Math.imul(J,Ae),o=o+Math.imul(K,pe)|0,d=Math.imul(K,Ae),p=p+Math.imul(N,he)|0,o=o+Math.imul(N,Ee)|0,o=o+Math.imul($,he)|0,d=d+Math.imul($,Ee)|0,p=p+Math.imul(z,ve)|0,o=o+Math.imul(z,Se)|0,o=o+Math.imul(X,ve)|0,d=d+Math.imul(X,Se)|0,p=p+Math.imul(I,me)|0,o=o+Math.imul(I,Re)|0,o=o+Math.imul(U,me)|0,d=d+Math.imul(U,Re)|0,p=p+Math.imul(C,ge)|0,o=o+Math.imul(C,Ce)|0,o=o+Math.imul(P,ge)|0,d=d+Math.imul(P,Ce)|0;var mt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,p=Math.imul(k,pe),o=Math.imul(k,Ae),o=o+Math.imul(L,pe)|0,d=Math.imul(L,Ae),p=p+Math.imul(J,he)|0,o=o+Math.imul(J,Ee)|0,o=o+Math.imul(K,he)|0,d=d+Math.imul(K,Ee)|0,p=p+Math.imul(N,ve)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul($,ve)|0,d=d+Math.imul($,Se)|0,p=p+Math.imul(z,me)|0,o=o+Math.imul(z,Re)|0,o=o+Math.imul(X,me)|0,d=d+Math.imul(X,Re)|0,p=p+Math.imul(I,ge)|0,o=o+Math.imul(I,Ce)|0,o=o+Math.imul(U,ge)|0,d=d+Math.imul(U,Ce)|0,p=p+Math.imul(C,be)|0,o=o+Math.imul(C,Be)|0,o=o+Math.imul(P,be)|0,d=d+Math.imul(P,Be)|0;var gt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,p=Math.imul(Z,pe),o=Math.imul(Z,Ae),o=o+Math.imul(Q,pe)|0,d=Math.imul(Q,Ae),p=p+Math.imul(k,he)|0,o=o+Math.imul(k,Ee)|0,o=o+Math.imul(L,he)|0,d=d+Math.imul(L,Ee)|0,p=p+Math.imul(J,ve)|0,o=o+Math.imul(J,Se)|0,o=o+Math.imul(K,ve)|0,d=d+Math.imul(K,Se)|0,p=p+Math.imul(N,me)|0,o=o+Math.imul(N,Re)|0,o=o+Math.imul($,me)|0,d=d+Math.imul($,Re)|0,p=p+Math.imul(z,ge)|0,o=o+Math.imul(z,Ce)|0,o=o+Math.imul(X,ge)|0,d=d+Math.imul(X,Ce)|0,p=p+Math.imul(I,be)|0,o=o+Math.imul(I,Be)|0,o=o+Math.imul(U,be)|0,d=d+Math.imul(U,Be)|0,p=p+Math.imul(C,ye)|0,o=o+Math.imul(C,Ne)|0,o=o+Math.imul(P,ye)|0,d=d+Math.imul(P,Ne)|0;var bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,p=Math.imul(ie,pe),o=Math.imul(ie,Ae),o=o+Math.imul(oe,pe)|0,d=Math.imul(oe,Ae),p=p+Math.imul(Z,he)|0,o=o+Math.imul(Z,Ee)|0,o=o+Math.imul(Q,he)|0,d=d+Math.imul(Q,Ee)|0,p=p+Math.imul(k,ve)|0,o=o+Math.imul(k,Se)|0,o=o+Math.imul(L,ve)|0,d=d+Math.imul(L,Se)|0,p=p+Math.imul(J,me)|0,o=o+Math.imul(J,Re)|0,o=o+Math.imul(K,me)|0,d=d+Math.imul(K,Re)|0,p=p+Math.imul(N,ge)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul($,ge)|0,d=d+Math.imul($,Ce)|0,p=p+Math.imul(z,be)|0,o=o+Math.imul(z,Be)|0,o=o+Math.imul(X,be)|0,d=d+Math.imul(X,Be)|0,p=p+Math.imul(I,ye)|0,o=o+Math.imul(I,Ne)|0,o=o+Math.imul(U,ye)|0,d=d+Math.imul(U,Ne)|0,p=p+Math.imul(C,xe)|0,o=o+Math.imul(C,Te)|0,o=o+Math.imul(P,xe)|0,d=d+Math.imul(P,Te)|0;var Rt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p=Math.imul(ae,pe),o=Math.imul(ae,Ae),o=o+Math.imul(fe,pe)|0,d=Math.imul(fe,Ae),p=p+Math.imul(ie,he)|0,o=o+Math.imul(ie,Ee)|0,o=o+Math.imul(oe,he)|0,d=d+Math.imul(oe,Ee)|0,p=p+Math.imul(Z,ve)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(Q,ve)|0,d=d+Math.imul(Q,Se)|0,p=p+Math.imul(k,me)|0,o=o+Math.imul(k,Re)|0,o=o+Math.imul(L,me)|0,d=d+Math.imul(L,Re)|0,p=p+Math.imul(J,ge)|0,o=o+Math.imul(J,Ce)|0,o=o+Math.imul(K,ge)|0,d=d+Math.imul(K,Ce)|0,p=p+Math.imul(N,be)|0,o=o+Math.imul(N,Be)|0,o=o+Math.imul($,be)|0,d=d+Math.imul($,Be)|0,p=p+Math.imul(z,ye)|0,o=o+Math.imul(z,Ne)|0,o=o+Math.imul(X,ye)|0,d=d+Math.imul(X,Ne)|0,p=p+Math.imul(I,xe)|0,o=o+Math.imul(I,Te)|0,o=o+Math.imul(U,xe)|0,d=d+Math.imul(U,Te)|0,p=p+Math.imul(C,we)|0,o=o+Math.imul(C,ke)|0,o=o+Math.imul(P,we)|0,d=d+Math.imul(P,ke)|0;var Ct=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,p=Math.imul(le,pe),o=Math.imul(le,Ae),o=o+Math.imul(Me,pe)|0,d=Math.imul(Me,Ae),p=p+Math.imul(ae,he)|0,o=o+Math.imul(ae,Ee)|0,o=o+Math.imul(fe,he)|0,d=d+Math.imul(fe,Ee)|0,p=p+Math.imul(ie,ve)|0,o=o+Math.imul(ie,Se)|0,o=o+Math.imul(oe,ve)|0,d=d+Math.imul(oe,Se)|0,p=p+Math.imul(Z,me)|0,o=o+Math.imul(Z,Re)|0,o=o+Math.imul(Q,me)|0,d=d+Math.imul(Q,Re)|0,p=p+Math.imul(k,ge)|0,o=o+Math.imul(k,Ce)|0,o=o+Math.imul(L,ge)|0,d=d+Math.imul(L,Ce)|0,p=p+Math.imul(J,be)|0,o=o+Math.imul(J,Be)|0,o=o+Math.imul(K,be)|0,d=d+Math.imul(K,Be)|0,p=p+Math.imul(N,ye)|0,o=o+Math.imul(N,Ne)|0,o=o+Math.imul($,ye)|0,d=d+Math.imul($,Ne)|0,p=p+Math.imul(z,xe)|0,o=o+Math.imul(z,Te)|0,o=o+Math.imul(X,xe)|0,d=d+Math.imul(X,Te)|0,p=p+Math.imul(I,we)|0,o=o+Math.imul(I,ke)|0,o=o+Math.imul(U,we)|0,d=d+Math.imul(U,ke)|0,p=p+Math.imul(C,_e)|0,o=o+Math.imul(C,Pe)|0,o=o+Math.imul(P,_e)|0,d=d+Math.imul(P,Pe)|0;var Bt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p=Math.imul(le,he),o=Math.imul(le,Ee),o=o+Math.imul(Me,he)|0,d=Math.imul(Me,Ee),p=p+Math.imul(ae,ve)|0,o=o+Math.imul(ae,Se)|0,o=o+Math.imul(fe,ve)|0,d=d+Math.imul(fe,Se)|0,p=p+Math.imul(ie,me)|0,o=o+Math.imul(ie,Re)|0,o=o+Math.imul(oe,me)|0,d=d+Math.imul(oe,Re)|0,p=p+Math.imul(Z,ge)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(Q,ge)|0,d=d+Math.imul(Q,Ce)|0,p=p+Math.imul(k,be)|0,o=o+Math.imul(k,Be)|0,o=o+Math.imul(L,be)|0,d=d+Math.imul(L,Be)|0,p=p+Math.imul(J,ye)|0,o=o+Math.imul(J,Ne)|0,o=o+Math.imul(K,ye)|0,d=d+Math.imul(K,Ne)|0,p=p+Math.imul(N,xe)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul($,xe)|0,d=d+Math.imul($,Te)|0,p=p+Math.imul(z,we)|0,o=o+Math.imul(z,ke)|0,o=o+Math.imul(X,we)|0,d=d+Math.imul(X,ke)|0,p=p+Math.imul(I,_e)|0,o=o+Math.imul(I,Pe)|0,o=o+Math.imul(U,_e)|0,d=d+Math.imul(U,Pe)|0;var Nt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,p=Math.imul(le,ve),o=Math.imul(le,Se),o=o+Math.imul(Me,ve)|0,d=Math.imul(Me,Se),p=p+Math.imul(ae,me)|0,o=o+Math.imul(ae,Re)|0,o=o+Math.imul(fe,me)|0,d=d+Math.imul(fe,Re)|0,p=p+Math.imul(ie,ge)|0,o=o+Math.imul(ie,Ce)|0,o=o+Math.imul(oe,ge)|0,d=d+Math.imul(oe,Ce)|0,p=p+Math.imul(Z,be)|0,o=o+Math.imul(Z,Be)|0,o=o+Math.imul(Q,be)|0,d=d+Math.imul(Q,Be)|0,p=p+Math.imul(k,ye)|0,o=o+Math.imul(k,Ne)|0,o=o+Math.imul(L,ye)|0,d=d+Math.imul(L,Ne)|0,p=p+Math.imul(J,xe)|0,o=o+Math.imul(J,Te)|0,o=o+Math.imul(K,xe)|0,d=d+Math.imul(K,Te)|0,p=p+Math.imul(N,we)|0,o=o+Math.imul(N,ke)|0,o=o+Math.imul($,we)|0,d=d+Math.imul($,ke)|0,p=p+Math.imul(z,_e)|0,o=o+Math.imul(z,Pe)|0,o=o+Math.imul(X,_e)|0,d=d+Math.imul(X,Pe)|0;var Tt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,p=Math.imul(le,me),o=Math.imul(le,Re),o=o+Math.imul(Me,me)|0,d=Math.imul(Me,Re),p=p+Math.imul(ae,ge)|0,o=o+Math.imul(ae,Ce)|0,o=o+Math.imul(fe,ge)|0,d=d+Math.imul(fe,Ce)|0,p=p+Math.imul(ie,be)|0,o=o+Math.imul(ie,Be)|0,o=o+Math.imul(oe,be)|0,d=d+Math.imul(oe,Be)|0,p=p+Math.imul(Z,ye)|0,o=o+Math.imul(Z,Ne)|0,o=o+Math.imul(Q,ye)|0,d=d+Math.imul(Q,Ne)|0,p=p+Math.imul(k,xe)|0,o=o+Math.imul(k,Te)|0,o=o+Math.imul(L,xe)|0,d=d+Math.imul(L,Te)|0,p=p+Math.imul(J,we)|0,o=o+Math.imul(J,ke)|0,o=o+Math.imul(K,we)|0,d=d+Math.imul(K,ke)|0,p=p+Math.imul(N,_e)|0,o=o+Math.imul(N,Pe)|0,o=o+Math.imul($,_e)|0,d=d+Math.imul($,Pe)|0;var kt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,p=Math.imul(le,ge),o=Math.imul(le,Ce),o=o+Math.imul(Me,ge)|0,d=Math.imul(Me,Ce),p=p+Math.imul(ae,be)|0,o=o+Math.imul(ae,Be)|0,o=o+Math.imul(fe,be)|0,d=d+Math.imul(fe,Be)|0,p=p+Math.imul(ie,ye)|0,o=o+Math.imul(ie,Ne)|0,o=o+Math.imul(oe,ye)|0,d=d+Math.imul(oe,Ne)|0,p=p+Math.imul(Z,xe)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(Q,xe)|0,d=d+Math.imul(Q,Te)|0,p=p+Math.imul(k,we)|0,o=o+Math.imul(k,ke)|0,o=o+Math.imul(L,we)|0,d=d+Math.imul(L,ke)|0,p=p+Math.imul(J,_e)|0,o=o+Math.imul(J,Pe)|0,o=o+Math.imul(K,_e)|0,d=d+Math.imul(K,Pe)|0;var Pt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,p=Math.imul(le,be),o=Math.imul(le,Be),o=o+Math.imul(Me,be)|0,d=Math.imul(Me,Be),p=p+Math.imul(ae,ye)|0,o=o+Math.imul(ae,Ne)|0,o=o+Math.imul(fe,ye)|0,d=d+Math.imul(fe,Ne)|0,p=p+Math.imul(ie,xe)|0,o=o+Math.imul(ie,Te)|0,o=o+Math.imul(oe,xe)|0,d=d+Math.imul(oe,Te)|0,p=p+Math.imul(Z,we)|0,o=o+Math.imul(Z,ke)|0,o=o+Math.imul(Q,we)|0,d=d+Math.imul(Q,ke)|0,p=p+Math.imul(k,_e)|0,o=o+Math.imul(k,Pe)|0,o=o+Math.imul(L,_e)|0,d=d+Math.imul(L,Pe)|0;var It=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(It>>>26)|0,It&=67108863,p=Math.imul(le,ye),o=Math.imul(le,Ne),o=o+Math.imul(Me,ye)|0,d=Math.imul(Me,Ne),p=p+Math.imul(ae,xe)|0,o=o+Math.imul(ae,Te)|0,o=o+Math.imul(fe,xe)|0,d=d+Math.imul(fe,Te)|0,p=p+Math.imul(ie,we)|0,o=o+Math.imul(ie,ke)|0,o=o+Math.imul(oe,we)|0,d=d+Math.imul(oe,ke)|0,p=p+Math.imul(Z,_e)|0,o=o+Math.imul(Z,Pe)|0,o=o+Math.imul(Q,_e)|0,d=d+Math.imul(Q,Pe)|0;var Dt=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,p=Math.imul(le,xe),o=Math.imul(le,Te),o=o+Math.imul(Me,xe)|0,d=Math.imul(Me,Te),p=p+Math.imul(ae,we)|0,o=o+Math.imul(ae,ke)|0,o=o+Math.imul(fe,we)|0,d=d+Math.imul(fe,ke)|0,p=p+Math.imul(ie,_e)|0,o=o+Math.imul(ie,Pe)|0,o=o+Math.imul(oe,_e)|0,d=d+Math.imul(oe,Pe)|0;var Ot=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,p=Math.imul(le,we),o=Math.imul(le,ke),o=o+Math.imul(Me,we)|0,d=Math.imul(Me,ke),p=p+Math.imul(ae,_e)|0,o=o+Math.imul(ae,Pe)|0,o=o+Math.imul(fe,_e)|0,d=d+Math.imul(fe,Pe)|0;var Ft=(w+p|0)+((o&8191)<<13)|0;w=(d+(o>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,p=Math.imul(le,_e),o=Math.imul(le,Pe),o=o+Math.imul(Me,_e)|0,d=Math.imul(Me,Pe);var Lt=(w+p|0)+((o&8191)<<13)|0;return w=(d+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,x[0]=Ge,x[1]=Ve,x[2]=pt,x[3]=vt,x[4]=mt,x[5]=gt,x[6]=bt,x[7]=Rt,x[8]=Ct,x[9]=Bt,x[10]=Nt,x[11]=Tt,x[12]=kt,x[13]=Pt,x[14]=It,x[15]=Dt,x[16]=Ot,x[17]=Ft,x[18]=Lt,w!==0&&(x[19]=w,c.length++),c};Math.imul||(B=R);function T(y,a,f){f.negative=a.negative^y.negative,f.length=y.length+a.length;for(var c=0,l=0,h=0;h>>26)|0,l+=x>>>26,x&=67108863}f.words[h]=w,c=x,x=l}return c!==0?f.words[h]=c:f.length--,f.strip()}function F(y,a,f){var c=new O;return c.mulp(y,a,f)}i.prototype.mulTo=function(a,f){var c,l=this.length+a.length;return this.length===10&&a.length===10?c=B(this,a,f):l<63?c=R(this,a,f):l<1024?c=T(this,a,f):c=F(this,a,f),c};function O(y,a){this.x=y,this.y=a}O.prototype.makeRBT=function(a){for(var f=new Array(a),c=i.prototype._countBits(a)-1,l=0;l>=1;return l},O.prototype.permute=function(a,f,c,l,h,x){for(var w=0;w>>1)h++;return 1<>>13,c[2*x+1]=h&8191,h=h>>>13;for(x=2*f;x>=26,f+=l/67108864|0,f+=h>>>26,this.words[c]=h&67108863}return f!==0&&(this.words[c]=f,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var f=E(a);if(f.length===0)return new i(1);for(var c=this,l=0;l=0);var f=a%26,c=(a-f)/26,l=67108863>>>26-f<<26-f,h;if(f!==0){var x=0;for(h=0;h>>26-f}x&&(this.words[h]=x,this.length++)}if(c!==0){for(h=this.length-1;h>=0;h--)this.words[h+c]=this.words[h];for(h=0;h=0);var l;f?l=(f-f%26)/26:l=0;var h=a%26,x=Math.min((a-h)/26,this.length),w=67108863^67108863>>>h<x)for(this.length-=x,o=0;o=0&&(d!==0||o>=l);o--){var M=this.words[o]|0;this.words[o]=d<<26-h|M>>>h,d=M&w}return p&&d!==0&&(p.words[p.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,f,c){return n(this.negative===0),this.iushrn(a,f,c)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var f=a%26,c=(a-f)/26,l=1<=0);var f=a%26,c=(a-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(f!==0&&c++,this.length=Math.min(c,this.length),f!==0){var l=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},i.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(p/67108864|0),this.words[h+c]=x&67108863}for(;h>26,this.words[h+c]=x&67108863;if(w===0)return this.strip();for(n(w===-1),w=0,h=0;h>26,this.words[h]=x&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,f){var c=this.length-a.length,l=this.clone(),h=a,x=h.words[h.length-1]|0,w=this._countBits(x);c=26-w,c!==0&&(h=h.ushln(c),l.iushln(c),x=h.words[h.length-1]|0);var p=l.length-h.length,o;if(f!=="mod"){o=new i(null),o.length=p+1,o.words=new Array(o.length);for(var d=0;d=0;C--){var P=(l.words[h.length+C]|0)*67108864+(l.words[h.length+C-1]|0);for(P=Math.min(P/x|0,67108863),l._ishlnsubmul(h,P,C);l.negative!==0;)P--,l.negative=0,l._ishlnsubmul(h,1,C),l.isZero()||(l.negative^=1);o&&(o.words[C]=P)}return o&&o.strip(),l.strip(),f!=="div"&&c!==0&&l.iushrn(c),{div:o||null,mod:l}},i.prototype.divmod=function(a,f,c){if(n(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,h,x;return this.negative!==0&&a.negative===0?(x=this.neg().divmod(a,f),f!=="mod"&&(l=x.div.neg()),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.iadd(a)),{div:l,mod:h}):this.negative===0&&a.negative!==0?(x=this.divmod(a.neg(),f),f!=="mod"&&(l=x.div.neg()),{div:l,mod:x.mod}):(this.negative&a.negative)!==0?(x=this.neg().divmod(a.neg(),f),f!=="div"&&(h=x.mod.neg(),c&&h.negative!==0&&h.isub(a)),{div:x.div,mod:h}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?f==="div"?{div:this.divn(a.words[0]),mod:null}:f==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,f)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var f=this.divmod(a);if(f.mod.isZero())return f.div;var c=f.div.negative!==0?f.mod.isub(a):f.mod,l=a.ushrn(1),h=a.andln(1),x=c.cmp(l);return x<0||h===1&&x===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},i.prototype.modn=function(a){n(a<=67108863);for(var f=(1<<26)%a,c=0,l=this.length-1;l>=0;l--)c=(f*c+(this.words[l]|0))%a;return c},i.prototype.idivn=function(a){n(a<=67108863);for(var f=0,c=this.length-1;c>=0;c--){var l=(this.words[c]|0)+f*67108864;this.words[c]=l/a|0,f=l%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=new i(0),w=new i(1),p=0;f.isEven()&&c.isEven();)f.iushrn(1),c.iushrn(1),++p;for(var o=c.clone(),d=f.clone();!f.isZero();){for(var M=0,C=1;(f.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(f.iushrn(M);M-- >0;)(l.isOdd()||h.isOdd())&&(l.iadd(o),h.isub(d)),l.iushrn(1),h.iushrn(1);for(var P=0,S=1;(c.words[0]&S)===0&&P<26;++P,S<<=1);if(P>0)for(c.iushrn(P);P-- >0;)(x.isOdd()||w.isOdd())&&(x.iadd(o),w.isub(d)),x.iushrn(1),w.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(x),h.isub(w)):(c.isub(f),x.isub(l),w.isub(h))}return{a:x,b:w,gcd:c.iushln(p)}},i.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var f=this,c=a.clone();f.negative!==0?f=f.umod(a):f=f.clone();for(var l=new i(1),h=new i(0),x=c.clone();f.cmpn(1)>0&&c.cmpn(1)>0;){for(var w=0,p=1;(f.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(f.iushrn(w);w-- >0;)l.isOdd()&&l.iadd(x),l.iushrn(1);for(var o=0,d=1;(c.words[0]&d)===0&&o<26;++o,d<<=1);if(o>0)for(c.iushrn(o);o-- >0;)h.isOdd()&&h.iadd(x),h.iushrn(1);f.cmp(c)>=0?(f.isub(c),l.isub(h)):(c.isub(f),h.isub(l))}var M;return f.cmpn(1)===0?M=l:M=h,M.cmpn(0)<0&&M.iadd(a),M},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var f=this.clone(),c=a.clone();f.negative=0,c.negative=0;for(var l=0;f.isEven()&&c.isEven();l++)f.iushrn(1),c.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;c.isEven();)c.iushrn(1);var h=f.cmp(c);if(h<0){var x=f;f=c,c=x}else if(h===0||c.cmpn(1)===0)break;f.isub(c)}while(!0);return c.iushln(l)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){n(typeof a=="number");var f=a%26,c=(a-f)/26,l=1<>>26,w&=67108863,this.words[x]=w}return h!==0&&(this.words[x]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var f=a<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var c;if(this.length>1)c=1;else{f&&(a=-a),n(a<=67108863,"Number is too big");var l=this.words[0]|0;c=l===a?0:la.length)return 1;if(this.length=0;c--){var l=this.words[c]|0,h=a.words[c]|0;if(l!==h){lh&&(f=1);break}}return f},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var q={k256:null,p224:null,p192:null,p25519:null};function H(y,a){this.name=y,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},H.prototype.ireduce=function(a){var f=a,c;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),c=f.bitLength();while(c>this.n);var l=c0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},H.prototype.split=function(a,f){a.iushrn(this.n,0,f)},H.prototype.imulK=function(a){return a.imul(this.k)};function G(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,H),G.prototype.split=function(a,f){for(var c=4194303,l=Math.min(a.length,9),h=0;h>>22,x=w}x>>>=22,a.words[h-10]=x,x===0&&a.length>10?a.length-=10:a.length-=9},G.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var f=0,c=0;c>>=26,a.words[c]=h,f=l}return f!==0&&(a.words[a.length++]=f),a},i._prime=function(a){if(q[a])return q[a];var f;if(a==="k256")f=new G;else if(a==="p224")f=new re;else if(a==="p192")f=new ne;else if(a==="p25519")f=new Y;else throw new Error("Unknown prime "+a);return q[a]=f,f};function W(y){if(typeof y=="string"){var a=i._prime(y);this.m=a.p,this.prime=a}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,f){n((a.negative|f.negative)===0,"red works only with positives"),n(a.red&&a.red===f.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,f){this._verify2(a,f);var c=a.add(f);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},W.prototype.iadd=function(a,f){this._verify2(a,f);var c=a.iadd(f);return c.cmp(this.m)>=0&&c.isub(this.m),c},W.prototype.sub=function(a,f){this._verify2(a,f);var c=a.sub(f);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},W.prototype.isub=function(a,f){this._verify2(a,f);var c=a.isub(f);return c.cmpn(0)<0&&c.iadd(this.m),c},W.prototype.shl=function(a,f){return this._verify1(a),this.imod(a.ushln(f))},W.prototype.imul=function(a,f){return this._verify2(a,f),this.imod(a.imul(f))},W.prototype.mul=function(a,f){return this._verify2(a,f),this.imod(a.mul(f))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var c=this.m.add(new i(1)).iushrn(2);return this.pow(a,c)}for(var l=this.m.subn(1),h=0;!l.isZero()&&l.andln(1)===0;)h++,l.iushrn(1);n(!l.isZero());var x=new i(1).toRed(this),w=x.redNeg(),p=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,p).cmp(w)!==0;)o.redIAdd(w);for(var d=this.pow(o,l),M=this.pow(a,l.addn(1).iushrn(1)),C=this.pow(a,l),P=h;C.cmp(x)!==0;){for(var S=C,I=0;S.cmp(x)!==0;I++)S=S.redSqr();n(I=0;h--){for(var d=f.words[h],M=o-1;M>=0;M--){var C=d>>M&1;if(x!==l[0]&&(x=this.sqr(x)),C===0&&w===0){p=0;continue}w<<=1,w|=C,p++,!(p!==c&&(h!==0||M!==0))&&(x=this.mul(x,l[w]),p=0,w=0)}o=26}return x},W.prototype.convertTo=function(a){var f=a.umod(this.m);return f===a?f.clone():f},W.prototype.convertFrom=function(a){var f=a.clone();return f.red=null,f},i.mont=function(a){return new se(a)};function se(y){W.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(se,W),se.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},se.prototype.convertFrom=function(a){var f=this.imod(a.mul(this.rinv));return f.red=null,f},se.prototype.imul=function(a,f){if(a.isZero()||f.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.mul=function(a,f){if(a.isZero()||f.isZero())return new i(0)._forceRed(this);var c=a.mul(f),l=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=c.isub(l).iushrn(this.shift),x=h;return h.cmp(this.m)>=0?x=h.isub(this.m):h.cmpn(0)<0&&(x=h.iadd(this.m)),x._forceRed(this)},se.prototype.invm=function(a){var f=this.imod(a._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(t,ue)}(Wh)),Wh.exports}var Zh,ty;function F5(){if(ty)return Zh;ty=1;var t=zv(),e=ut.exports.Buffer;function r(n,s){return e.from(n.toRed(t.mont(s.modulus)).redPow(new t(s.publicExponent)).fromRed().toArray())}return Zh=r,Zh}var Jh,ry;function qP(){if(ry)return Jh;ry=1;var t=Bu(),e=Oa.exports,r=N0,n=D5(),s=O5(),i=zv(),u=F5(),v=Dv(),b=ut.exports.Buffer;Jh=function(E,R,B){var T;E.padding?T=E.padding:B?T=1:T=4;var F=t(E),O;if(T===4)O=m(F,R);else if(T===1)O=g(F,R,B);else if(T===3){if(O=new i(R),O.cmp(F.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return B?v(O,F):u(O,F)};function m(A,E){var R=A.modulus.byteLength(),B=E.length,T=r("sha1").update(b.alloc(0)).digest(),F=T.length,O=2*F;if(B>R-O-2)throw new Error("message too long");var q=b.alloc(R-B-O-2),H=R-F-1,G=e(F),re=s(b.concat([T,q,b.alloc(1,1),E],H),n(G,H)),ne=s(G,n(re,F));return new i(b.concat([b.alloc(1),ne,re],R))}function g(A,E,R){var B=E.length,T=A.modulus.byteLength();if(B>T-11)throw new Error("message too long");var F;return R?F=b.alloc(T-B-3,255):F=_(T-B-3),new i(b.concat([b.from([0,R?1:2]),F,b.alloc(1),E],T))}function _(A){for(var E=b.allocUnsafe(A),R=0,B=e(A*2),T=0,F;RF||new n(E).cmp(T.modulus)>=0)throw new Error("decryption error");var O;R?O=u(new n(E),T):O=s(E,T);var q=v.alloc(F-O.length);if(O=v.concat([q,O],F),B===4)return b(T,O);if(B===1)return m(T,O,R);if(B===3)return O;throw new Error("unknown padding")};function b(_,A){var E=_.modulus.byteLength(),R=i("sha1").update(v.alloc(0)).digest(),B=R.length;if(A[0]!==0)throw new Error("decryption error");var T=A.slice(1,B+1),F=A.slice(B+1),O=r(T,e(F,B)),q=r(F,e(O,E-B-1));if(g(R,q.slice(0,B)))throw new Error("decryption error");for(var H=B;q[H]===0;)H++;if(q[H++]!==1)throw new Error("decryption error");return q.slice(H)}function m(_,A,E){for(var R=A.slice(0,2),B=2,T=0;A[B++]!==0;)if(B>=A.length){T++;break}var F=A.slice(2,B-1);if((R.toString("hex")!=="0002"&&!E||R.toString("hex")!=="0001"&&E)&&T++,F.length<8&&T++,T)throw new Error("decryption error");return A.slice(B)}function g(_,A){_=v.from(_),A=v.from(A);var E=0,R=_.length;_.length!==A.length&&(E++,R=Math.min(_.length,A.length));for(var B=-1;++Bu||A<0)throw new TypeError("offset must be a uint32");if(A>s||A>E)throw new RangeError("offset out of range")}function b(A,E,R){if(typeof A!="number"||A!==A)throw new TypeError("size must be a number");if(A>u||A<0)throw new TypeError("size must be a uint32");if(A+E>R||A>s)throw new RangeError("buffer too small")}i&&i.getRandomValues||!Je.exports.browser?(Zo.randomFill=m,Zo.randomFillSync=_):(Zo.randomFill=t,Zo.randomFillSync=t);function m(A,E,R,B){if(!n.isBuffer(A)&&!(A instanceof ue.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof E=="function")B=E,E=0,R=A.length;else if(typeof R=="function")B=R,R=A.length-E;else if(typeof B!="function")throw new TypeError('"cb" argument must be a function');return v(E,A.length),b(R,E,A.length),g(A,E,R,B)}function g(A,E,R,B){if(Je.exports.browser){var T=A.buffer,F=new Uint8Array(T,E,R);if(i.getRandomValues(F),B){Je.exports.nextTick(function(){B(null,A)});return}return A}if(B){r(R,function(q,H){if(q)return B(q);H.copy(A,E),B(null,A)});return}var O=r(R);return O.copy(A,E),A}function _(A,E,R){if(typeof E>"u"&&(E=0),!n.isBuffer(A)&&!(A instanceof ue.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return v(E,A.length),R===void 0&&(R=A.length-E),b(R,E,A.length),g(A,E,R)}return Zo}var oy;function L5(){if(oy)return lt;oy=1,lt.randomBytes=lt.rng=lt.pseudoRandomBytes=lt.prng=Oa.exports,lt.createHash=lt.Hash=N0,lt.createHmac=lt.Hmac=o5();var t=sk(),e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);lt.getHashes=function(){return r};var n=d5();lt.pbkdf2=n.pbkdf2,lt.pbkdf2Sync=n.pbkdf2Sync;var s=Sk();lt.Cipher=s.Cipher,lt.createCipher=s.createCipher,lt.Cipheriv=s.Cipheriv,lt.createCipheriv=s.createCipheriv,lt.Decipher=s.Decipher,lt.createDecipher=s.createDecipher,lt.Decipheriv=s.Decipheriv,lt.createDecipheriv=s.createDecipheriv,lt.getCiphers=s.getCiphers,lt.listCiphers=s.listCiphers;var i=Lk();lt.DiffieHellmanGroup=i.DiffieHellmanGroup,lt.createDiffieHellmanGroup=i.createDiffieHellmanGroup,lt.getDiffieHellman=i.getDiffieHellman,lt.createDiffieHellman=i.createDiffieHellman,lt.DiffieHellman=i.DiffieHellman;var u=UP();lt.createSign=u.createSign,lt.Sign=u.Sign,lt.createVerify=u.createVerify,lt.Verify=u.Verify,lt.createECDH=$P();var v=zP();lt.publicEncrypt=v.publicEncrypt,lt.privateEncrypt=v.privateEncrypt,lt.publicDecrypt=v.publicDecrypt,lt.privateDecrypt=v.privateDecrypt;var b=jP();return lt.randomFill=b.randomFill,lt.randomFillSync=b.randomFillSync,lt.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` -`))},lt.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},lt}var sy;function I0(){return sy||(sy=1,function(t,e){(function(r,n){t.exports=n()})(ue,function(){var r=r||function(n,s){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof ue<"u"&&ue.crypto&&(i=ue.crypto),!i&&typeof IC=="function")try{i=L5()}catch{}var u=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},v=Object.create||function(){function O(){}return function(q){var H;return O.prototype=q,H=new O,O.prototype=null,H}}(),b={},m=b.lib={},g=m.Base=function(){return{extend:function(O){var q=v(this);return O&&q.mixIn(O),(!q.hasOwnProperty("init")||this.init===q.init)&&(q.init=function(){q.$super.init.apply(this,arguments)}),q.init.prototype=q,q.$super=this,q},create:function(){var O=this.extend();return O.init.apply(O,arguments),O},init:function(){},mixIn:function(O){for(var q in O)O.hasOwnProperty(q)&&(this[q]=O[q]);O.hasOwnProperty("toString")&&(this.toString=O.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),_=m.WordArray=g.extend({init:function(O,q){O=this.words=O||[],q!=s?this.sigBytes=q:this.sigBytes=O.length*4},toString:function(O){return(O||E).stringify(this)},concat:function(O){var q=this.words,H=O.words,G=this.sigBytes,re=O.sigBytes;if(this.clamp(),G%4)for(var ne=0;ne>>2]>>>24-ne%4*8&255;q[G+ne>>>2]|=Y<<24-(G+ne)%4*8}else for(var W=0;W>>2]=H[W>>>2];return this.sigBytes+=re,this},clamp:function(){var O=this.words,q=this.sigBytes;O[q>>>2]&=4294967295<<32-q%4*8,O.length=n.ceil(q/4)},clone:function(){var O=g.clone.call(this);return O.words=this.words.slice(0),O},random:function(O){for(var q=[],H=0;H>>2]>>>24-re%4*8&255;G.push((ne>>>4).toString(16)),G.push((ne&15).toString(16))}return G.join("")},parse:function(O){for(var q=O.length,H=[],G=0;G>>3]|=parseInt(O.substr(G,2),16)<<24-G%8*4;return new _.init(H,q/2)}},R=A.Latin1={stringify:function(O){for(var q=O.words,H=O.sigBytes,G=[],re=0;re>>2]>>>24-re%4*8&255;G.push(String.fromCharCode(ne))}return G.join("")},parse:function(O){for(var q=O.length,H=[],G=0;G>>2]|=(O.charCodeAt(G)&255)<<24-G%4*8;return new _.init(H,q)}},B=A.Utf8={stringify:function(O){try{return decodeURIComponent(escape(R.stringify(O)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(O){return R.parse(unescape(encodeURIComponent(O)))}},T=m.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new _.init,this._nDataBytes=0},_append:function(O){typeof O=="string"&&(O=B.parse(O)),this._data.concat(O),this._nDataBytes+=O.sigBytes},_process:function(O){var q,H=this._data,G=H.words,re=H.sigBytes,ne=this.blockSize,Y=ne*4,W=re/Y;O?W=n.ceil(W):W=n.max((W|0)-this._minBufferSize,0);var se=W*ne,y=n.min(se*4,re);if(se){for(var a=0;a>>7)^(W<<14|W>>>18)^W>>>3,y=_[Y-2],a=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;_[Y]=se+_[Y-7]+a+_[Y-16]}var f=H&G^~H&re,c=T&F^T&O^F&O,l=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),h=(H<<26|H>>>6)^(H<<21|H>>>11)^(H<<7|H>>>25),x=ne+h+f+g[Y]+_[Y],w=l+c;ne=re,re=G,G=H,H=q+x|0,q=O,O=F,F=T,T=x+w|0}B[0]=B[0]+T|0,B[1]=B[1]+F|0,B[2]=B[2]+O|0,B[3]=B[3]+q|0,B[4]=B[4]+H|0,B[5]=B[5]+G|0,B[6]=B[6]+re|0,B[7]=B[7]+ne|0},_doFinalize:function(){var E=this._data,R=E.words,B=this._nDataBytes*8,T=E.sigBytes*8;return R[T>>>5]|=128<<24-T%32,R[(T+64>>>9<<4)+14]=n.floor(B/4294967296),R[(T+64>>>9<<4)+15]=B,E.sigBytes=R.length*4,this._process(),this._hash},clone:function(){var E=v.clone.call(this);return E._hash=this._hash.clone(),E}});s.SHA256=v._createHelper(A),s.HmacSHA256=v._createHmacHelper(A)}(Math),r.SHA256})})(bv);var jv={exports:{}};(function(t,e){(function(r,n){t.exports=n(I0())})(ue,function(r){return r.enc.Hex})})(jv);(function(t){var e=ue&&ue.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBech32Address=t.toBech32Address=t.toChecksumAddress=void 0;var r=e(au.exports),n=e(bv.exports),s=e(jv.exports),i="qpzry9x8gf2tvdw0s3jn54khce6mua7l",u=[996825010,642813549,513874426,1027748829,705979059],v="zil",b="tzil";function m(G,re){return!!G.replace("0x","").match("^[0-9a-fA-F]{".concat(re,"}$"))}function g(G){return m(G,40)}function _(G,re,ne,Y){Y===void 0&&(Y=!0);for(var W=0,se=0,y=[],a=(1<>re!==0)return null;for(W=W<=ne;)se-=ne,y.push(W>>se&a)}if(Y)se>0&&y.push(W<=re||W<>5);for(re.push(0),ne=0;ne>25;re=(re&33554431)<<5^G[ne];for(var W=0;W<5;++W)Y>>W&1&&(re^=u[W])}return re}function R(G,re){for(var ne=He.Buffer.concat([He.Buffer.from(A(G)),re,He.Buffer.from([0,0,0,0,0,0])]),Y=E(ne)^1,W=[],se=0;se<6;++se)W.push(Y>>5*(5-se)&31);return He.Buffer.from(W)}function B(G,re){return E(He.Buffer.concat([A(G),re]))===1}function T(G,re){for(var ne=He.Buffer.concat([re,R(G,re)]),Y=G+"1",W=0;W126)return null;G.charCodeAt(re)>=97&&G.charCodeAt(re)<=122&&(ne=!0),G.charCodeAt(re)>=65&&G.charCodeAt(re)<=90&&(Y=!0)}if(ne&&Y)return null;G=G.toLowerCase();var W=G.lastIndexOf("1");if(W<1||W+7>G.length||G.length>90)return null;var se=G.substring(0,W),y=[];for(re=W+1;re")},r[n.MetadataEndpointError]=function(u){return"Failed to query tokenUri ".concat(u.tokenUri,". Error: ").concat(u.errorMessage)},r[n.UnsupportedService]=function(u){return"Naming service ".concat(u.namingService," is not supported")},r[n.InvalidDomainAddress]=function(u){return"Domain address ".concat(u.domain," is invalid")},r),i=function(u){e(v,u);function v(b,m){m===void 0&&(m={});var g=this,_=s[b],A=m.domain,E=m.method,R=m.currencyTicker,B=_(m);return g=u.call(this,B)||this,g.code=b,g.domain=A,g.method=E,g.currencyTicker=R,g.name="ResolutionError",Object.setPrototypeOf(g,v.prototype),g}return v}(Error);t.ResolutionError=i,t.default=i})(qi);var O0={},ef={},Jp={exports:{}};(function(t,e){var r=typeof self<"u"?self:ue,n=function(){function i(){this.fetch=!1,this.DOMException=r.DOMException}return i.prototype=r,new i}();(function(i){(function(u){var v={searchParams:"URLSearchParams"in i,iterable:"Symbol"in i&&"iterator"in Symbol,blob:"FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in i,arrayBuffer:"ArrayBuffer"in i};function b(c){return c&&DataView.prototype.isPrototypeOf(c)}if(v.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=ArrayBuffer.isView||function(c){return c&&m.indexOf(Object.prototype.toString.call(c))>-1};function _(c){if(typeof c!="string"&&(c=String(c)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(c))throw new TypeError("Invalid character in header field name");return c.toLowerCase()}function A(c){return typeof c!="string"&&(c=String(c)),c}function E(c){var l={next:function(){var h=c.shift();return{done:h===void 0,value:h}}};return v.iterable&&(l[Symbol.iterator]=function(){return l}),l}function R(c){this.map={},c instanceof R?c.forEach(function(l,h){this.append(h,l)},this):Array.isArray(c)?c.forEach(function(l){this.append(l[0],l[1])},this):c&&Object.getOwnPropertyNames(c).forEach(function(l){this.append(l,c[l])},this)}R.prototype.append=function(c,l){c=_(c),l=A(l);var h=this.map[c];this.map[c]=h?h+", "+l:l},R.prototype.delete=function(c){delete this.map[_(c)]},R.prototype.get=function(c){return c=_(c),this.has(c)?this.map[c]:null},R.prototype.has=function(c){return this.map.hasOwnProperty(_(c))},R.prototype.set=function(c,l){this.map[_(c)]=A(l)},R.prototype.forEach=function(c,l){for(var h in this.map)this.map.hasOwnProperty(h)&&c.call(l,this.map[h],h,this)},R.prototype.keys=function(){var c=[];return this.forEach(function(l,h){c.push(h)}),E(c)},R.prototype.values=function(){var c=[];return this.forEach(function(l){c.push(l)}),E(c)},R.prototype.entries=function(){var c=[];return this.forEach(function(l,h){c.push([h,l])}),E(c)},v.iterable&&(R.prototype[Symbol.iterator]=R.prototype.entries);function B(c){if(c.bodyUsed)return Promise.reject(new TypeError("Already read"));c.bodyUsed=!0}function T(c){return new Promise(function(l,h){c.onload=function(){l(c.result)},c.onerror=function(){h(c.error)}})}function F(c){var l=new FileReader,h=T(l);return l.readAsArrayBuffer(c),h}function O(c){var l=new FileReader,h=T(l);return l.readAsText(c),h}function q(c){for(var l=new Uint8Array(c),h=new Array(l.length),x=0;x-1?l:c}function Y(c,l){l=l||{};var h=l.body;if(c instanceof Y){if(c.bodyUsed)throw new TypeError("Already read");this.url=c.url,this.credentials=c.credentials,l.headers||(this.headers=new R(c.headers)),this.method=c.method,this.mode=c.mode,this.signal=c.signal,!h&&c._bodyInit!=null&&(h=c._bodyInit,c.bodyUsed=!0)}else this.url=String(c);if(this.credentials=l.credentials||this.credentials||"same-origin",(l.headers||!this.headers)&&(this.headers=new R(l.headers)),this.method=ne(l.method||this.method||"GET"),this.mode=l.mode||this.mode||null,this.signal=l.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&h)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(h)}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function W(c){var l=new FormData;return c.trim().split("&").forEach(function(h){if(h){var x=h.split("="),w=x.shift().replace(/\+/g," "),p=x.join("=").replace(/\+/g," ");l.append(decodeURIComponent(w),decodeURIComponent(p))}}),l}function se(c){var l=new R,h=c.replace(/\r?\n[\t ]+/g," ");return h.split(/\r?\n/).forEach(function(x){var w=x.split(":"),p=w.shift().trim();if(p){var o=w.join(":").trim();l.append(p,o)}}),l}G.call(Y.prototype);function y(c,l){l||(l={}),this.type="default",this.status=l.status===void 0?200:l.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in l?l.statusText:"OK",this.headers=new R(l.headers),this.url=l.url||"",this._initBody(c)}G.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new R(this.headers),url:this.url})},y.error=function(){var c=new y(null,{status:0,statusText:""});return c.type="error",c};var a=[301,302,303,307,308];y.redirect=function(c,l){if(a.indexOf(l)===-1)throw new RangeError("Invalid status code");return new y(null,{status:l,headers:{location:c}})},u.DOMException=i.DOMException;try{new u.DOMException}catch{u.DOMException=function(l,h){this.message=l,this.name=h;var x=Error(l);this.stack=x.stack},u.DOMException.prototype=Object.create(Error.prototype),u.DOMException.prototype.constructor=u.DOMException}function f(c,l){return new Promise(function(h,x){var w=new Y(c,l);if(w.signal&&w.signal.aborted)return x(new u.DOMException("Aborted","AbortError"));var p=new XMLHttpRequest;function o(){p.abort()}p.onload=function(){var d={status:p.status,statusText:p.statusText,headers:se(p.getAllResponseHeaders()||"")};d.url="responseURL"in p?p.responseURL:d.headers.get("X-Request-URL");var M="response"in p?p.response:p.responseText;h(new y(M,d))},p.onerror=function(){x(new TypeError("Network request failed"))},p.ontimeout=function(){x(new TypeError("Network request failed"))},p.onabort=function(){x(new u.DOMException("Aborted","AbortError"))},p.open(w.method,w.url,!0),w.credentials==="include"?p.withCredentials=!0:w.credentials==="omit"&&(p.withCredentials=!1),"responseType"in p&&v.blob&&(p.responseType="blob"),w.headers.forEach(function(d,M){p.setRequestHeader(M,d)}),w.signal&&(w.signal.addEventListener("abort",o),p.onreadystatechange=function(){p.readyState===4&&w.signal.removeEventListener("abort",o)}),p.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return f.polyfill=!0,i.fetch||(i.fetch=f,i.Headers=R,i.Request=Y,i.Response=y),u.Headers=R,u.Request=Y,u.Response=y,u.fetch=f,Object.defineProperty(u,"__esModule",{value:!0}),u})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=n;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e})(Jp,Jp.exports);var GP=ue&&ue.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})},VP=ue&&ue.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,u;return u={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function v(m){return function(g){return b([m,g])}}function b(m){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=m[0]&2?s.return:m[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,m[1])).done)return i;switch(s=0,i&&(m=[m[0]&2,i.value]),m[0]){case 0:case 1:i=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,s=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]>>24)&16711935|(G<<24|G>>>8)&4278255360,re=(re<<8|re>>>24)&16711935|(re<<24|re>>>8)&4278255360;var ne=O[H];ne.high^=re,ne.low^=G}for(var Y=0;Y<24;Y++){for(var W=0;W<5;W++){for(var se=0,y=0,a=0;a<5;a++){var ne=O[W+5*a];se^=ne.high,y^=ne.low}var f=R[W];f.high=se,f.low=y}for(var W=0;W<5;W++)for(var c=R[(W+4)%5],l=R[(W+1)%5],h=l.high,x=l.low,se=c.high^(h<<1|x>>>31),y=c.low^(x<<1|h>>>31),a=0;a<5;a++){var ne=O[W+5*a];ne.high^=se,ne.low^=y}for(var w=1;w<25;w++){var se,y,ne=O[w],p=ne.high,o=ne.low,d=_[w];d<32?(se=p<>>32-d,y=o<>>32-d):(se=o<>>64-d,y=p<>>64-d);var M=R[A[w]];M.high=se,M.low=y}var C=R[0],P=O[0];C.high=P.high,C.low=P.low;for(var W=0;W<5;W++)for(var a=0;a<5;a++){var w=W+5*a,ne=O[w],S=R[w],I=R[(W+1)%5+5*a],U=R[(W+2)%5+5*a];ne.high=S.high^~I.high&U.high,ne.low=S.low^~I.low&U.low}var ne=O[0],V=E[Y];ne.high^=V.high,ne.low^=V.low}},_doFinalize:function(){var T=this._data,F=T.words;this._nDataBytes*8;var O=T.sigBytes*8,q=this.blockSize*32;F[O>>>5]|=1<<24-O%32,F[(n.ceil((O+1)/q)*q>>>5)-1]|=128,T.sigBytes=F.length*4,this._process();for(var H=this._state,G=this.cfg.outputLength/8,re=G/8,ne=[],Y=0;Y>>24)&16711935|(se<<24|se>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,ne.push(y),ne.push(se)}return new u.init(ne,G)},clone:function(){for(var T=v.clone.call(this),F=T._state=this._state.slice(0),O=0;O<25;O++)F[O]=F[O].clone();return T}});s.SHA3=v._createHelper(B),s.HmacSHA3=v._createHmacHelper(B)}(Math),r.SHA3})})(U5);var K5={exports:{}};(function(t,e){(function(r,n){t.exports=n(I0())})(ue,function(r){return function(){if(typeof ArrayBuffer=="function"){var n=r,s=n.lib,i=s.WordArray,u=i.init,v=i.init=function(b){if(b instanceof ArrayBuffer&&(b=new Uint8Array(b)),(b instanceof Int8Array||typeof Uint8ClampedArray<"u"&&b instanceof Uint8ClampedArray||b instanceof Int16Array||b instanceof Uint16Array||b instanceof Int32Array||b instanceof Uint32Array||b instanceof Float32Array||b instanceof Float64Array)&&(b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength)),b instanceof Uint8Array){for(var m=b.byteLength,g=[],_=0;_>>2]|=b[_]<<24-_%4*8;u.call(this,g,m)}else u.apply(this,arguments)};v.prototype=i}}(),r.lib.WordArray})})(K5);var F0=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Er,"__esModule",{value:!0});Er.fromDecStringToHex=Er.fromHexStringToDecimals=Er.znsChildhash=Er.znsNamehash=Er.eip137Childhash=Er.eip137Namehash=void 0;var $5=F0(bv.exports),q5=F0(U5.exports),zc=F0(jv.exports),iI=F0(K5.exports),H5=F0(au.exports);function aI(t){var e=Gv(t,"sha3");return j5(e)}Er.eip137Namehash=aI;function oI(t,e){return z5(t,e,"sha3")}Er.eip137Childhash=oI;function sI(t){var e=Gv(t,"sha256");return j5(e)}Er.znsNamehash=sI;function fI(t,e){return z5(t,e,"sha256")}Er.znsChildhash=fI;function z5(t,e,r){var n=r==="sha256"?$5.default:q5.default,s={outputLength:256},i=t.replace(/^0x/,""),u=zc.default.stringify(n(e,s));return"0x".concat(zc.default.stringify(n(zc.default.parse("".concat(i).concat(u)),s)))}function Gv(t,e){if(!t)return iI.default.create(Array.from(new Uint8Array(8)));var r=e==="sha256"?$5.default:q5.default,n={outputLength:256},s=t.split("."),i=s[0],u=s.slice(1),v=r(i,n),b=Gv(u.join("."),e);return r(b.concat(v),n)}function j5(t){return"0x".concat(zc.default.stringify(t))}function cI(t){if(t.startsWith("0x")){var e=t.slice(2,t.length),r=new H5.default(e,16);return r.toString(10)}return t}Er.fromHexStringToDecimals=cI;function lI(t){if(!t.startsWith("0x")){var e=new H5.default(t,10),r=e.toString(16);return"0x".concat(r.padStart(64,"0"))}return t}Er.fromDecStringToHex=lI;var tf={};Object.defineProperty(tf,"__esModule",{value:!0});tf.NamingService=void 0;var uI=function(){function t(){}return t}();tf.NamingService=uI;var Lo={};(function(t){var e=ue&&ue.__extends||function(){var u=function(v,b){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var _ in g)Object.prototype.hasOwnProperty.call(g,_)&&(m[_]=g[_])},u(v,b)};return function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");u(v,b);function m(){this.constructor=v}v.prototype=b===null?Object.create(b):(m.prototype=b.prototype,new m)}}(),r;Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationError=t.ConfigurationErrorCode=void 0;var n;(function(u){u.IncorrectProvider="IncorrectProvider",u.UnsupportedNetwork="UnsupportedNetwork",u.UnspecifiedUrl="UnspecifiedUrl",u.NetworkConfigMissing="NetworkConfigMissing",u.CustomNetworkConfigMissing="CustomNetworkConfigMissing",u.InvalidConfigurationField="InvalidProxyReader"})(n=t.ConfigurationErrorCode||(t.ConfigurationErrorCode={}));var s=(r={},r[n.IncorrectProvider]=function(){return"Provider doesn't implement sendAsync or send method"},r[n.UnsupportedNetwork]=function(u){return"Unsupported network in Resolution ".concat(u.method||""," configuration")},r[n.UnspecifiedUrl]=function(u){return"Unspecified url in Resolution ".concat(u.method," configuration")},r[n.NetworkConfigMissing]=function(u){return"Missing configuration in Resolution ".concat(u.method,". Please specify ").concat(u.config)},r[n.CustomNetworkConfigMissing]=function(u){return"Missing configuration in Resolution ".concat(u.method,". Please specify ").concat(u.config," when using a custom network")},r[n.InvalidConfigurationField]=function(u){return"Invalid '".concat(u.field,"' in Resolution ").concat(u.method)},r),i=function(u){e(v,u);function v(b,m){m===void 0&&(m={});var g=this,_=s[b];return g=u.call(this,_(m))||this,g.code=b,g.method=m.method,g.name="ConfigurationError",Object.setPrototypeOf(g,v.prototype),g}return v}(Error);t.ConfigurationError=i,t.default=i})(Lo);var dI=ue&&ue.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_l=ue&&ue.__assign||function(){return _l=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]7?A[B+2].toUpperCase():A[B+2];return R},g=function(A){var E=(0,r.hexToBytes)(He.Buffer.from(A,"utf8").toString("hex")),R=He.Buffer.from(E),B=`Ethereum Signed Message: -`+E.length,T=He.Buffer.from(B),F=He.Buffer.concat([T,R]);return"0x"+(0,e.keccak256)(F.toString())};t.hashMessage=g;var _=function(A,E){var R=(0,t.hashMessage)(A),B=b(E),T={v:v(B[0]),r:B[1].slice(2),s:B[2].slice(2)},F=s.recoverPubKey(He.Buffer.from(R.slice(2),"hex"),T,T.v<2?T.v:1-T.v%2),O="0x"+F.encode("hex",!1).slice(2),q="0x"+(0,e.keccak256)((0,r.hexToBytes)(O));return m("0x"+q.slice(-40))};t.recover=_})(G5);Object.defineProperty(L0,"__esModule",{value:!0});L0.isValidTwitterSignature=void 0;var wI=Ga,_I=$l.exports,MI=G5,AI=Er,EI="0x12cfb13522F13a78b650a8bCbFCf50b7CB899d82",SI=function(t){var e=t.tokenId,r=t.owner,n=t.twitterHandle,s=t.validationSignature,i=(0,AI.fromHexStringToDecimals)(e),u=[i,r,"social.twitter.username",n].map(function(b){return"0x"+(0,_I.keccak256)(b.startsWith("0x")?(0,wI.hexToBytes)(b):b)}).reduce(function(b,m){return b+m},""),v=(0,MI.recover)(u,s);return v===EI};L0.isValidTwitterSignature=SI;var Wv={},Zv={},hc=ue&&ue.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})},pc=ue&&ue.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,u;return u={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function v(m){return function(g){return b([m,g])}}function b(m){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=m[0]&2?s.return:m[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,m[1])).done)return i;switch(s=0,i&&(m=[m[0]&2,i.value]),m[0]){case 0:case 1:i=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,s=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]({address:null,chainId:null,defaultDomain:null,domainSearchStatus:!1,tokenBalances:null,tokenLoadingStatus:!1}),getters:{getDefaultDomain(t){return t.defaultDomain},getDomainSearchStatus(t){return t.domainSearchStatus},getTokenBalances(t){return t.tokenBalances},getTokenLoadingStatus(t){return t.tokenLoadingStatus}},actions:{async fetchTokenBalances(){this.tokenLoadingStatus=!0,this.tokenBalances||(this.tokenBalances=JSON.parse(JSON.stringify(Xp)));const t=new ra(Yp);for(let e in this.tokenBalances[String(to.value)]){let r=Xp[String(to.value)][e];if(r==="0x0")this.tokenBalances[String(to.value)][e]=iv(FD.value);else{let n=new _s(r,t,LD.value),s=await n.balanceOf(sp.value);if(Number(s)>0){let i=await n.decimals();this.tokenBalances[String(to.value)][e]=Yl(s,Number(i))}else this.tokenBalances[String(to.value)][e]=0}}this.tokenLoadingStatus=!1},async setDefaultDomain(){(this.address!=sp.value||this.chainId!=to.value)&&(this.domainSearchStatus=!0,this.fetchTokenBalances(),console.log("start searching for domain"),this.defaultDomain=null,this.address=sp.value,this.chainId=to.value,console.log("start Punk Domain (PD) search"),this.defaultDomain=await KD(this.address),console.log("PD search result:",this.defaultDomain),this.defaultDomain||(console.log("Start ENS search"),this.defaultDomain=await UD(this.address),console.log("ENS search result:",this.defaultDomain)),this.domainSearchStatus=!1)}}}),$D="/assets/logo.6bf30f00.svg";const Uo=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},qD={name:"Navbar",data(){return{filterNetwork:null}},computed:{getDomainOrAddress(){return this.userStore.getDefaultDomain?this.userStore.getDefaultDomain:Z2(this.address)},getNetworks(){const t=this.getSupportedChains();return this.filterNetwork?t.filter(e=>e.includes(this.filterNetwork.toUpperCase())):t}},methods:{changeNetwork(t){this.switchOrAddChain(window.ethereum,t)},disconnectWallet(){this.disconnect(),window.localStorage.removeItem("connected")}},setup(){const{open:t}=ov(),{address:e,chainId:r,isActivated:n}=An(),{disconnect:s}=c0(),{getBlockExplorerBaseUrl:i,getChainName:u,getSupportedChains:v,switchOrAddChain:b}=vv(),m=Iu();return{address:e,chainId:r,disconnect:s,getBlockExplorerBaseUrl:i,getChainName:u,getSupportedChains:v,isActivated:n,open:t,shortenAddress:Z2,switchOrAddChain:b,userStore:m}}},Du=t=>(w1("data-v-9b7406c1"),t=t(),_1(),t),HD={class:"navbar navbar-expand-lg navbar-dark bg-primary"},zD={class:"container-fluid"},jD=Du(()=>ce("img",{class:"img-fluid navbar-img",src:$D},null,-1)),GD=Du(()=>ce("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarColor01","aria-controls":"navbarColor01","aria-expanded":"false","aria-label":"Toggle navigation"},[ce("span",{class:"navbar-toggler-icon"})],-1)),VD={class:"collapse navbar-collapse",id:"navbarColor01"},WD={class:"navbar-nav ms-auto"},ZD=Du(()=>ce("li",{class:"nav-item"},[ce("button",{class:"btn btn-primary","data-bs-toggle":"modal","data-bs-target":"#aboutModal"},"About")],-1)),JD={key:0,class:"nav-item dropdown"},XD={class:"btn btn-primary dropdown-toggle network-dropdown","data-bs-toggle":"dropdown",type:"button","aria-haspopup":"true","aria-expanded":"false"},YD={class:"dropdown-menu p-2 dropdown-menu-end set-cursor-pointer"},QD=["onClick"],eO={key:1,class:"nav-item dropdown"},tO={class:"btn btn-primary dropdown-toggle","data-bs-toggle":"dropdown",type:"button","aria-haspopup":"true","aria-expanded":"false"},rO={key:0,class:"spinner-grow spinner-grow-sm",role:"status","aria-hidden":"true"},nO={class:"dropdown-menu dropdown-menu-end set-cursor-pointer"},iO=["href"],aO={class:"dropdown-item"},oO={class:"nav-item"},sO={key:0,class:"btn btn-primary","data-bs-toggle":"modal","data-bs-target":"#connectModal"},fO=Du(()=>ce("div",{class:"modal fade",id:"aboutModal",tabindex:"-1","aria-labelledby":"aboutModalLabel","aria-hidden":"true"},[ce("div",{class:"modal-dialog",role:"document"},[ce("div",{class:"modal-content"},[ce("div",{class:"modal-header"},[ce("h5",{class:"modal-title"},"About Send2.name"),ce("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},[ce("span",{"aria-hidden":"true"})])]),ce("div",{class:"modal-body"},[ce("p",null,"Send2.name is a web3 app that allows you to send tokens to any supported web3 domain name."),ce("p",null,[Un("The code is completely "),ce("strong",null,"open source"),Un(" and "),ce("a",{target:"_blank",href:"https://github.com/send2-name"},"available on GitHub"),Un(".")]),ce("p",null,"The list of supported domains:"),ce("ul",null,[ce("li",null,[ce("a",{target:"_blank",href:"https://ens.domains"},".eth (ENS, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".ape (Punk Domains, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".arbi (Punk Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".arbitrum (Punk Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://id.basebook.xyz"},".basebook (Basebook, Base)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://basednames.xyz"},".based (The Based DAO, Base)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://id.basepunk.xyz"},".basepunk (BasePunk NFT, Base)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://app.basin.global"},".basin (Basin, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".bitcoin (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".blockchain (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".crypto (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".dao (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://nftdegen.lol"},".degen (NFTdegen.lol, Degen L3 Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://dns.dopewars.gg"},".dope (Dope DAO, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://fairchat.xyz"},".fairchat (Fairchat, ZKFair)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://fantomname.org"},".fantom (Fantom Names, Fantom)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://flr.domains"},".flr (Flare Domains, Flare Network)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://giveth.punk.domains"},".giveth (Giveth DAO, Gnosis Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".gnosis (Punk Domains, Gnosis Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".huwa (HUWA DAO, BSC)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://www.kns.earth"},".klima (Klima DAO, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".L2 (Layer2 DAO, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".misie (Misie Community, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".nft (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://optimistic.domains"},".op (Optimistic Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".optimism (Punk Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".poly (Punk Domains, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://names.pooly.me"},".pool (PoolTogether DAO, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://ppl.domains"},".ppl (People Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains/#/punkangel"},".punkangel (Punk Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".safu (Punk Domains, BSC)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://id.satraps.io"},".satrap (Satrap IDs, Songbird)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://sgb.domains"},".sgb (Songbird Domains, Songbird)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://smol.domains"},".smol (Smol Brains NFT, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".spartan (Punk Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".wagmi (Punk Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".wallet (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://twb.punk.domains"},".wildbunch (The Wild Bunch NFT, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".x (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".xdai (Punk Domains, Gnosis Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".888 (Unstoppable Domains, Ethereum)")])])])])])],-1));function cO(t,e,r,n,s,i){const u=Zr("router-link");return $e(),We(tr,null,[ce("nav",HD,[ce("div",zD,[Wt(u,{to:"/",class:"navbar-brand"},{default:ta(()=>[jD]),_:1}),GD,ce("div",VD,[ce("ul",WD,[ZD,n.isActivated?($e(),We("li",JD,[ce("button",XD,rn(n.getChainName(n.chainId)),1),ce("div",YD,[ss(ce("input",{class:"form-control mb-2",placeholder:"Find network","onUpdate:modelValue":e[0]||(e[0]=v=>s.filterNetwork=v)},null,512),[[Sf,s.filterNetwork]]),($e(!0),We(tr,null,Mo(i.getNetworks,v=>($e(),We("span",{class:"dropdown-item",key:v,onClick:b=>i.changeNetwork(v)},rn(v),9,QD))),128))])])):zt("",!0),n.isActivated?($e(),We("li",eO,[ce("button",tO,[Un(rn(i.getDomainOrAddress)+" ",1),n.userStore.getDomainSearchStatus?($e(),We("span",rO)):zt("",!0)]),ce("div",nO,[ce("a",{href:n.getBlockExplorerBaseUrl(n.chainId)+"/address/"+n.address,class:"short-address",target:"_blank"},[ce("span",aO,rn(n.shortenAddress(n.address)),1)],8,iO),ce("span",{class:"dropdown-item",onClick:e[1]||(e[1]=(...v)=>i.disconnectWallet&&i.disconnectWallet(...v))},"Disconnect")])])):zt("",!0),ce("li",oO,[n.isActivated?zt("",!0):($e(),We("button",sO,"Connect wallet"))])])])])]),fO],64)}const lO=Uo(qD,[["render",cO],["__scopeId","data-v-9b7406c1"]]),uO="/assets/metamask.ee003f7b.png",dO="/assets/bifrost.58f773ff.png",hO="/assets/coinbase.6efcbd0e.png",pO="/assets/rabby.c4b282ef.png",vO="/assets/brave.0cb22c92.png",mO="/assets/trust.00f61f13.png",gO="/assets/imtoken.555e248e.png",bO={name:"App",components:{Navbar:lO},created(){this.isActivated||(localStorage.getItem("connected")=="metamask"?this.connectMetaMask():localStorage.getItem("connected")=="coinbase"&&this.connectCoinbase())},methods:{async connectCoinbase(){await this.connectWith(this.coinbaseConnector),localStorage.setItem("connected","coinbase"),document.getElementById("closeConnectModal").click()},async connectMetaMask(){await this.connectWith(this.mmConnector),localStorage.setItem("connected","metamask"),document.getElementById("closeConnectModal").click()}},setup(){const{address:t,chainId:e,isActivated:r}=An(),{connectWith:n}=c0(),s=Iu(),i=new jR({appName:"Send2.name",jsonRpcUrl:"https://eth-mainnet.public.blastapi.io"}),u=new r4({appUrl:"https://send2.name"});return{address:t,chainId:e,coinbaseConnector:i,connectWith:n,isActivated:r,mmConnector:u,userStore:s}},watch:{address(t,e){t&&this.userStore.setDefaultDomain()},chainId(t,e){t&&this.userStore.setDefaultDomain()},isActivated(t,e){e===!0&&t===!1&&localStorage.clear()}}},yO={class:"modal modal-sm fade",id:"connectModal",tabindex:"-1","aria-labelledby":"connectModalLabel","aria-hidden":"true"},xO={class:"modal-dialog",role:"document"},wO={class:"modal-content"},_O=ce("div",{class:"modal-header"},[ce("h5",{class:"modal-title"},"Connect your wallet"),ce("button",{id:"closeConnectModal",type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},[ce("span",{"aria-hidden":"true"})])],-1),MO={class:"modal-body row"},AO=ce("img",{src:uO,class:"card-img-top card-img-wallet",alt:"MetaMask"},null,-1),EO=[AO],SO=ce("img",{src:dO,class:"card-img-top card-img-wallet",alt:"Bifrost"},null,-1),RO=[SO],CO=ce("img",{src:hO,class:"card-img-top card-img-wallet",alt:"Coinbase"},null,-1),BO=[CO],NO=ce("img",{src:pO,class:"card-img-top card-img-wallet",alt:"Rabby"},null,-1),TO=[NO],kO=ce("img",{src:vO,class:"card-img-top card-img-wallet",alt:"Brave"},null,-1),PO=[kO],IO=ce("img",{src:mO,class:"card-img-top card-img-wallet",alt:"Trust Wallet"},null,-1),DO=[IO],OO=ce("img",{src:gO,class:"card-img-top card-img-wallet",alt:"imToken"},null,-1),FO=[OO];function LO(t,e,r,n,s,i){const u=Zr("Navbar"),v=Zr("router-view");return $e(),We(tr,null,[Wt(u),Wt(v),ce("div",yO,[ce("div",xO,[ce("div",wO,[_O,ce("div",MO,[ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[0]||(e[0]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},EO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[1]||(e[1]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},RO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[2]||(e[2]=(...b)=>i.connectCoinbase&&i.connectCoinbase(...b))},BO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[3]||(e[3]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},TO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[4]||(e[4]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},PO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[5]||(e[5]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},DO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[6]||(e[6]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},FO)])])])])],64)}const UO=Uo(bO,[["render",LO]]);/*! +`))},lt.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},lt}var sy;function I0(){return sy||(sy=1,function(t,e){(function(r,n){t.exports=n()})(ue,function(){var r=r||function(n,s){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof ue<"u"&&ue.crypto&&(i=ue.crypto),!i&&typeof IC=="function")try{i=L5()}catch{}var u=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},v=Object.create||function(){function O(){}return function(q){var H;return O.prototype=q,H=new O,O.prototype=null,H}}(),b={},m=b.lib={},g=m.Base=function(){return{extend:function(O){var q=v(this);return O&&q.mixIn(O),(!q.hasOwnProperty("init")||this.init===q.init)&&(q.init=function(){q.$super.init.apply(this,arguments)}),q.init.prototype=q,q.$super=this,q},create:function(){var O=this.extend();return O.init.apply(O,arguments),O},init:function(){},mixIn:function(O){for(var q in O)O.hasOwnProperty(q)&&(this[q]=O[q]);O.hasOwnProperty("toString")&&(this.toString=O.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),_=m.WordArray=g.extend({init:function(O,q){O=this.words=O||[],q!=s?this.sigBytes=q:this.sigBytes=O.length*4},toString:function(O){return(O||E).stringify(this)},concat:function(O){var q=this.words,H=O.words,G=this.sigBytes,re=O.sigBytes;if(this.clamp(),G%4)for(var ne=0;ne>>2]>>>24-ne%4*8&255;q[G+ne>>>2]|=Y<<24-(G+ne)%4*8}else for(var W=0;W>>2]=H[W>>>2];return this.sigBytes+=re,this},clamp:function(){var O=this.words,q=this.sigBytes;O[q>>>2]&=4294967295<<32-q%4*8,O.length=n.ceil(q/4)},clone:function(){var O=g.clone.call(this);return O.words=this.words.slice(0),O},random:function(O){for(var q=[],H=0;H>>2]>>>24-re%4*8&255;G.push((ne>>>4).toString(16)),G.push((ne&15).toString(16))}return G.join("")},parse:function(O){for(var q=O.length,H=[],G=0;G>>3]|=parseInt(O.substr(G,2),16)<<24-G%8*4;return new _.init(H,q/2)}},R=A.Latin1={stringify:function(O){for(var q=O.words,H=O.sigBytes,G=[],re=0;re>>2]>>>24-re%4*8&255;G.push(String.fromCharCode(ne))}return G.join("")},parse:function(O){for(var q=O.length,H=[],G=0;G>>2]|=(O.charCodeAt(G)&255)<<24-G%4*8;return new _.init(H,q)}},B=A.Utf8={stringify:function(O){try{return decodeURIComponent(escape(R.stringify(O)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(O){return R.parse(unescape(encodeURIComponent(O)))}},T=m.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new _.init,this._nDataBytes=0},_append:function(O){typeof O=="string"&&(O=B.parse(O)),this._data.concat(O),this._nDataBytes+=O.sigBytes},_process:function(O){var q,H=this._data,G=H.words,re=H.sigBytes,ne=this.blockSize,Y=ne*4,W=re/Y;O?W=n.ceil(W):W=n.max((W|0)-this._minBufferSize,0);var se=W*ne,y=n.min(se*4,re);if(se){for(var a=0;a>>7)^(W<<14|W>>>18)^W>>>3,y=_[Y-2],a=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;_[Y]=se+_[Y-7]+a+_[Y-16]}var f=H&G^~H&re,c=T&F^T&O^F&O,l=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),h=(H<<26|H>>>6)^(H<<21|H>>>11)^(H<<7|H>>>25),x=ne+h+f+g[Y]+_[Y],w=l+c;ne=re,re=G,G=H,H=q+x|0,q=O,O=F,F=T,T=x+w|0}B[0]=B[0]+T|0,B[1]=B[1]+F|0,B[2]=B[2]+O|0,B[3]=B[3]+q|0,B[4]=B[4]+H|0,B[5]=B[5]+G|0,B[6]=B[6]+re|0,B[7]=B[7]+ne|0},_doFinalize:function(){var E=this._data,R=E.words,B=this._nDataBytes*8,T=E.sigBytes*8;return R[T>>>5]|=128<<24-T%32,R[(T+64>>>9<<4)+14]=n.floor(B/4294967296),R[(T+64>>>9<<4)+15]=B,E.sigBytes=R.length*4,this._process(),this._hash},clone:function(){var E=v.clone.call(this);return E._hash=this._hash.clone(),E}});s.SHA256=v._createHelper(A),s.HmacSHA256=v._createHmacHelper(A)}(Math),r.SHA256})})(bv);var jv={exports:{}};(function(t,e){(function(r,n){t.exports=n(I0())})(ue,function(r){return r.enc.Hex})})(jv);(function(t){var e=ue&&ue.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBech32Address=t.toBech32Address=t.toChecksumAddress=void 0;var r=e(iu.exports),n=e(bv.exports),s=e(jv.exports),i="qpzry9x8gf2tvdw0s3jn54khce6mua7l",u=[996825010,642813549,513874426,1027748829,705979059],v="zil",b="tzil";function m(G,re){return!!G.replace("0x","").match("^[0-9a-fA-F]{".concat(re,"}$"))}function g(G){return m(G,40)}function _(G,re,ne,Y){Y===void 0&&(Y=!0);for(var W=0,se=0,y=[],a=(1<>re!==0)return null;for(W=W<=ne;)se-=ne,y.push(W>>se&a)}if(Y)se>0&&y.push(W<=re||W<>5);for(re.push(0),ne=0;ne>25;re=(re&33554431)<<5^G[ne];for(var W=0;W<5;++W)Y>>W&1&&(re^=u[W])}return re}function R(G,re){for(var ne=He.Buffer.concat([He.Buffer.from(A(G)),re,He.Buffer.from([0,0,0,0,0,0])]),Y=E(ne)^1,W=[],se=0;se<6;++se)W.push(Y>>5*(5-se)&31);return He.Buffer.from(W)}function B(G,re){return E(He.Buffer.concat([A(G),re]))===1}function T(G,re){for(var ne=He.Buffer.concat([re,R(G,re)]),Y=G+"1",W=0;W126)return null;G.charCodeAt(re)>=97&&G.charCodeAt(re)<=122&&(ne=!0),G.charCodeAt(re)>=65&&G.charCodeAt(re)<=90&&(Y=!0)}if(ne&&Y)return null;G=G.toLowerCase();var W=G.lastIndexOf("1");if(W<1||W+7>G.length||G.length>90)return null;var se=G.substring(0,W),y=[];for(re=W+1;re")},r[n.MetadataEndpointError]=function(u){return"Failed to query tokenUri ".concat(u.tokenUri,". Error: ").concat(u.errorMessage)},r[n.UnsupportedService]=function(u){return"Naming service ".concat(u.namingService," is not supported")},r[n.InvalidDomainAddress]=function(u){return"Domain address ".concat(u.domain," is invalid")},r),i=function(u){e(v,u);function v(b,m){m===void 0&&(m={});var g=this,_=s[b],A=m.domain,E=m.method,R=m.currencyTicker,B=_(m);return g=u.call(this,B)||this,g.code=b,g.domain=A,g.method=E,g.currencyTicker=R,g.name="ResolutionError",Object.setPrototypeOf(g,v.prototype),g}return v}(Error);t.ResolutionError=i,t.default=i})(qi);var O0={},ef={},Jp={exports:{}};(function(t,e){var r=typeof self<"u"?self:ue,n=function(){function i(){this.fetch=!1,this.DOMException=r.DOMException}return i.prototype=r,new i}();(function(i){(function(u){var v={searchParams:"URLSearchParams"in i,iterable:"Symbol"in i&&"iterator"in Symbol,blob:"FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in i,arrayBuffer:"ArrayBuffer"in i};function b(c){return c&&DataView.prototype.isPrototypeOf(c)}if(v.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=ArrayBuffer.isView||function(c){return c&&m.indexOf(Object.prototype.toString.call(c))>-1};function _(c){if(typeof c!="string"&&(c=String(c)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(c))throw new TypeError("Invalid character in header field name");return c.toLowerCase()}function A(c){return typeof c!="string"&&(c=String(c)),c}function E(c){var l={next:function(){var h=c.shift();return{done:h===void 0,value:h}}};return v.iterable&&(l[Symbol.iterator]=function(){return l}),l}function R(c){this.map={},c instanceof R?c.forEach(function(l,h){this.append(h,l)},this):Array.isArray(c)?c.forEach(function(l){this.append(l[0],l[1])},this):c&&Object.getOwnPropertyNames(c).forEach(function(l){this.append(l,c[l])},this)}R.prototype.append=function(c,l){c=_(c),l=A(l);var h=this.map[c];this.map[c]=h?h+", "+l:l},R.prototype.delete=function(c){delete this.map[_(c)]},R.prototype.get=function(c){return c=_(c),this.has(c)?this.map[c]:null},R.prototype.has=function(c){return this.map.hasOwnProperty(_(c))},R.prototype.set=function(c,l){this.map[_(c)]=A(l)},R.prototype.forEach=function(c,l){for(var h in this.map)this.map.hasOwnProperty(h)&&c.call(l,this.map[h],h,this)},R.prototype.keys=function(){var c=[];return this.forEach(function(l,h){c.push(h)}),E(c)},R.prototype.values=function(){var c=[];return this.forEach(function(l){c.push(l)}),E(c)},R.prototype.entries=function(){var c=[];return this.forEach(function(l,h){c.push([h,l])}),E(c)},v.iterable&&(R.prototype[Symbol.iterator]=R.prototype.entries);function B(c){if(c.bodyUsed)return Promise.reject(new TypeError("Already read"));c.bodyUsed=!0}function T(c){return new Promise(function(l,h){c.onload=function(){l(c.result)},c.onerror=function(){h(c.error)}})}function F(c){var l=new FileReader,h=T(l);return l.readAsArrayBuffer(c),h}function O(c){var l=new FileReader,h=T(l);return l.readAsText(c),h}function q(c){for(var l=new Uint8Array(c),h=new Array(l.length),x=0;x-1?l:c}function Y(c,l){l=l||{};var h=l.body;if(c instanceof Y){if(c.bodyUsed)throw new TypeError("Already read");this.url=c.url,this.credentials=c.credentials,l.headers||(this.headers=new R(c.headers)),this.method=c.method,this.mode=c.mode,this.signal=c.signal,!h&&c._bodyInit!=null&&(h=c._bodyInit,c.bodyUsed=!0)}else this.url=String(c);if(this.credentials=l.credentials||this.credentials||"same-origin",(l.headers||!this.headers)&&(this.headers=new R(l.headers)),this.method=ne(l.method||this.method||"GET"),this.mode=l.mode||this.mode||null,this.signal=l.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&h)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(h)}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function W(c){var l=new FormData;return c.trim().split("&").forEach(function(h){if(h){var x=h.split("="),w=x.shift().replace(/\+/g," "),p=x.join("=").replace(/\+/g," ");l.append(decodeURIComponent(w),decodeURIComponent(p))}}),l}function se(c){var l=new R,h=c.replace(/\r?\n[\t ]+/g," ");return h.split(/\r?\n/).forEach(function(x){var w=x.split(":"),p=w.shift().trim();if(p){var o=w.join(":").trim();l.append(p,o)}}),l}G.call(Y.prototype);function y(c,l){l||(l={}),this.type="default",this.status=l.status===void 0?200:l.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in l?l.statusText:"OK",this.headers=new R(l.headers),this.url=l.url||"",this._initBody(c)}G.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new R(this.headers),url:this.url})},y.error=function(){var c=new y(null,{status:0,statusText:""});return c.type="error",c};var a=[301,302,303,307,308];y.redirect=function(c,l){if(a.indexOf(l)===-1)throw new RangeError("Invalid status code");return new y(null,{status:l,headers:{location:c}})},u.DOMException=i.DOMException;try{new u.DOMException}catch{u.DOMException=function(l,h){this.message=l,this.name=h;var x=Error(l);this.stack=x.stack},u.DOMException.prototype=Object.create(Error.prototype),u.DOMException.prototype.constructor=u.DOMException}function f(c,l){return new Promise(function(h,x){var w=new Y(c,l);if(w.signal&&w.signal.aborted)return x(new u.DOMException("Aborted","AbortError"));var p=new XMLHttpRequest;function o(){p.abort()}p.onload=function(){var d={status:p.status,statusText:p.statusText,headers:se(p.getAllResponseHeaders()||"")};d.url="responseURL"in p?p.responseURL:d.headers.get("X-Request-URL");var M="response"in p?p.response:p.responseText;h(new y(M,d))},p.onerror=function(){x(new TypeError("Network request failed"))},p.ontimeout=function(){x(new TypeError("Network request failed"))},p.onabort=function(){x(new u.DOMException("Aborted","AbortError"))},p.open(w.method,w.url,!0),w.credentials==="include"?p.withCredentials=!0:w.credentials==="omit"&&(p.withCredentials=!1),"responseType"in p&&v.blob&&(p.responseType="blob"),w.headers.forEach(function(d,M){p.setRequestHeader(M,d)}),w.signal&&(w.signal.addEventListener("abort",o),p.onreadystatechange=function(){p.readyState===4&&w.signal.removeEventListener("abort",o)}),p.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return f.polyfill=!0,i.fetch||(i.fetch=f,i.Headers=R,i.Request=Y,i.Response=y),u.Headers=R,u.Request=Y,u.Response=y,u.fetch=f,Object.defineProperty(u,"__esModule",{value:!0}),u})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=n;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e})(Jp,Jp.exports);var GP=ue&&ue.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})},VP=ue&&ue.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,u;return u={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function v(m){return function(g){return b([m,g])}}function b(m){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=m[0]&2?s.return:m[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,m[1])).done)return i;switch(s=0,i&&(m=[m[0]&2,i.value]),m[0]){case 0:case 1:i=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,s=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]>>24)&16711935|(G<<24|G>>>8)&4278255360,re=(re<<8|re>>>24)&16711935|(re<<24|re>>>8)&4278255360;var ne=O[H];ne.high^=re,ne.low^=G}for(var Y=0;Y<24;Y++){for(var W=0;W<5;W++){for(var se=0,y=0,a=0;a<5;a++){var ne=O[W+5*a];se^=ne.high,y^=ne.low}var f=R[W];f.high=se,f.low=y}for(var W=0;W<5;W++)for(var c=R[(W+4)%5],l=R[(W+1)%5],h=l.high,x=l.low,se=c.high^(h<<1|x>>>31),y=c.low^(x<<1|h>>>31),a=0;a<5;a++){var ne=O[W+5*a];ne.high^=se,ne.low^=y}for(var w=1;w<25;w++){var se,y,ne=O[w],p=ne.high,o=ne.low,d=_[w];d<32?(se=p<>>32-d,y=o<>>32-d):(se=o<>>64-d,y=p<>>64-d);var M=R[A[w]];M.high=se,M.low=y}var C=R[0],P=O[0];C.high=P.high,C.low=P.low;for(var W=0;W<5;W++)for(var a=0;a<5;a++){var w=W+5*a,ne=O[w],S=R[w],I=R[(W+1)%5+5*a],U=R[(W+2)%5+5*a];ne.high=S.high^~I.high&U.high,ne.low=S.low^~I.low&U.low}var ne=O[0],V=E[Y];ne.high^=V.high,ne.low^=V.low}},_doFinalize:function(){var T=this._data,F=T.words;this._nDataBytes*8;var O=T.sigBytes*8,q=this.blockSize*32;F[O>>>5]|=1<<24-O%32,F[(n.ceil((O+1)/q)*q>>>5)-1]|=128,T.sigBytes=F.length*4,this._process();for(var H=this._state,G=this.cfg.outputLength/8,re=G/8,ne=[],Y=0;Y>>24)&16711935|(se<<24|se>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,ne.push(y),ne.push(se)}return new u.init(ne,G)},clone:function(){for(var T=v.clone.call(this),F=T._state=this._state.slice(0),O=0;O<25;O++)F[O]=F[O].clone();return T}});s.SHA3=v._createHelper(B),s.HmacSHA3=v._createHmacHelper(B)}(Math),r.SHA3})})(U5);var K5={exports:{}};(function(t,e){(function(r,n){t.exports=n(I0())})(ue,function(r){return function(){if(typeof ArrayBuffer=="function"){var n=r,s=n.lib,i=s.WordArray,u=i.init,v=i.init=function(b){if(b instanceof ArrayBuffer&&(b=new Uint8Array(b)),(b instanceof Int8Array||typeof Uint8ClampedArray<"u"&&b instanceof Uint8ClampedArray||b instanceof Int16Array||b instanceof Uint16Array||b instanceof Int32Array||b instanceof Uint32Array||b instanceof Float32Array||b instanceof Float64Array)&&(b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength)),b instanceof Uint8Array){for(var m=b.byteLength,g=[],_=0;_>>2]|=b[_]<<24-_%4*8;u.call(this,g,m)}else u.apply(this,arguments)};v.prototype=i}}(),r.lib.WordArray})})(K5);var F0=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Er,"__esModule",{value:!0});Er.fromDecStringToHex=Er.fromHexStringToDecimals=Er.znsChildhash=Er.znsNamehash=Er.eip137Childhash=Er.eip137Namehash=void 0;var $5=F0(bv.exports),q5=F0(U5.exports),Hc=F0(jv.exports),iI=F0(K5.exports),H5=F0(iu.exports);function aI(t){var e=Gv(t,"sha3");return j5(e)}Er.eip137Namehash=aI;function oI(t,e){return z5(t,e,"sha3")}Er.eip137Childhash=oI;function sI(t){var e=Gv(t,"sha256");return j5(e)}Er.znsNamehash=sI;function fI(t,e){return z5(t,e,"sha256")}Er.znsChildhash=fI;function z5(t,e,r){var n=r==="sha256"?$5.default:q5.default,s={outputLength:256},i=t.replace(/^0x/,""),u=Hc.default.stringify(n(e,s));return"0x".concat(Hc.default.stringify(n(Hc.default.parse("".concat(i).concat(u)),s)))}function Gv(t,e){if(!t)return iI.default.create(Array.from(new Uint8Array(8)));var r=e==="sha256"?$5.default:q5.default,n={outputLength:256},s=t.split("."),i=s[0],u=s.slice(1),v=r(i,n),b=Gv(u.join("."),e);return r(b.concat(v),n)}function j5(t){return"0x".concat(Hc.default.stringify(t))}function cI(t){if(t.startsWith("0x")){var e=t.slice(2,t.length),r=new H5.default(e,16);return r.toString(10)}return t}Er.fromHexStringToDecimals=cI;function lI(t){if(!t.startsWith("0x")){var e=new H5.default(t,10),r=e.toString(16);return"0x".concat(r.padStart(64,"0"))}return t}Er.fromDecStringToHex=lI;var tf={};Object.defineProperty(tf,"__esModule",{value:!0});tf.NamingService=void 0;var uI=function(){function t(){}return t}();tf.NamingService=uI;var Uo={};(function(t){var e=ue&&ue.__extends||function(){var u=function(v,b){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var _ in g)Object.prototype.hasOwnProperty.call(g,_)&&(m[_]=g[_])},u(v,b)};return function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");u(v,b);function m(){this.constructor=v}v.prototype=b===null?Object.create(b):(m.prototype=b.prototype,new m)}}(),r;Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationError=t.ConfigurationErrorCode=void 0;var n;(function(u){u.IncorrectProvider="IncorrectProvider",u.UnsupportedNetwork="UnsupportedNetwork",u.UnspecifiedUrl="UnspecifiedUrl",u.NetworkConfigMissing="NetworkConfigMissing",u.CustomNetworkConfigMissing="CustomNetworkConfigMissing",u.InvalidConfigurationField="InvalidProxyReader"})(n=t.ConfigurationErrorCode||(t.ConfigurationErrorCode={}));var s=(r={},r[n.IncorrectProvider]=function(){return"Provider doesn't implement sendAsync or send method"},r[n.UnsupportedNetwork]=function(u){return"Unsupported network in Resolution ".concat(u.method||""," configuration")},r[n.UnspecifiedUrl]=function(u){return"Unspecified url in Resolution ".concat(u.method," configuration")},r[n.NetworkConfigMissing]=function(u){return"Missing configuration in Resolution ".concat(u.method,". Please specify ").concat(u.config)},r[n.CustomNetworkConfigMissing]=function(u){return"Missing configuration in Resolution ".concat(u.method,". Please specify ").concat(u.config," when using a custom network")},r[n.InvalidConfigurationField]=function(u){return"Invalid '".concat(u.field,"' in Resolution ").concat(u.method)},r),i=function(u){e(v,u);function v(b,m){m===void 0&&(m={});var g=this,_=s[b];return g=u.call(this,_(m))||this,g.code=b,g.method=m.method,g.name="ConfigurationError",Object.setPrototypeOf(g,v.prototype),g}return v}(Error);t.ConfigurationError=i,t.default=i})(Uo);var dI=ue&&ue.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wl=ue&&ue.__assign||function(){return wl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]7?A[B+2].toUpperCase():A[B+2];return R},g=function(A){var E=(0,r.hexToBytes)(He.Buffer.from(A,"utf8").toString("hex")),R=He.Buffer.from(E),B=`Ethereum Signed Message: +`+E.length,T=He.Buffer.from(B),F=He.Buffer.concat([T,R]);return"0x"+(0,e.keccak256)(F.toString())};t.hashMessage=g;var _=function(A,E){var R=(0,t.hashMessage)(A),B=b(E),T={v:v(B[0]),r:B[1].slice(2),s:B[2].slice(2)},F=s.recoverPubKey(He.Buffer.from(R.slice(2),"hex"),T,T.v<2?T.v:1-T.v%2),O="0x"+F.encode("hex",!1).slice(2),q="0x"+(0,e.keccak256)((0,r.hexToBytes)(O));return m("0x"+q.slice(-40))};t.recover=_})(G5);Object.defineProperty(L0,"__esModule",{value:!0});L0.isValidTwitterSignature=void 0;var wI=Ga,_I=Kl.exports,MI=G5,AI=Er,EI="0x12cfb13522F13a78b650a8bCbFCf50b7CB899d82",SI=function(t){var e=t.tokenId,r=t.owner,n=t.twitterHandle,s=t.validationSignature,i=(0,AI.fromHexStringToDecimals)(e),u=[i,r,"social.twitter.username",n].map(function(b){return"0x"+(0,_I.keccak256)(b.startsWith("0x")?(0,wI.hexToBytes)(b):b)}).reduce(function(b,m){return b+m},""),v=(0,MI.recover)(u,s);return v===EI};L0.isValidTwitterSignature=SI;var Wv={},Zv={},hc=ue&&ue.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(u){u(i)})}return new(r||(r=Promise))(function(i,u){function v(g){try{m(n.next(g))}catch(_){u(_)}}function b(g){try{m(n.throw(g))}catch(_){u(_)}}function m(g){g.done?i(g.value):s(g.value).then(v,b)}m((n=n.apply(t,e||[])).next())})},pc=ue&&ue.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,u;return u={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function v(m){return function(g){return b([m,g])}}function b(m){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=m[0]&2?s.return:m[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,m[1])).done)return i;switch(s=0,i&&(m=[m[0]&2,i.value]),m[0]){case 0:case 1:i=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,s=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]({address:null,chainId:null,defaultDomain:null,domainSearchStatus:!1,tokenBalances:null,tokenLoadingStatus:!1}),getters:{getDefaultDomain(t){return t.defaultDomain},getDomainSearchStatus(t){return t.domainSearchStatus},getTokenBalances(t){return t.tokenBalances},getTokenLoadingStatus(t){return t.tokenLoadingStatus}},actions:{async fetchTokenBalances(){this.tokenLoadingStatus=!0,this.tokenBalances||(this.tokenBalances=JSON.parse(JSON.stringify(Xp)));const t=new ra(Yp);for(let e in this.tokenBalances[String(ro.value)]){let r=Xp[String(ro.value)][e];if(r==="0x0")this.tokenBalances[String(ro.value)][e]=iv(LD.value);else{let n=new _s(r,t,UD.value),s=await n.balanceOf(sp.value);if(Number(s)>0){let i=await n.decimals();this.tokenBalances[String(ro.value)][e]=Xl(s,Number(i))}else this.tokenBalances[String(ro.value)][e]=0}}this.tokenLoadingStatus=!1},async setDefaultDomain(){(this.address!=sp.value||this.chainId!=ro.value)&&(this.domainSearchStatus=!0,this.fetchTokenBalances(),this.defaultDomain=null,this.address=sp.value,this.chainId=ro.value,this.defaultDomain=await $D(this.address),this.defaultDomain||(this.defaultDomain=await KD(this.address)),this.domainSearchStatus=!1)}}}),qD="/assets/logo.6bf30f00.svg";const Ko=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},HD={name:"Navbar",data(){return{filterNetwork:null}},computed:{getDomainOrAddress(){return this.userStore.getDefaultDomain?this.userStore.getDefaultDomain:Z2(this.address)},getNetworks(){const t=this.getSupportedChains();return this.filterNetwork?t.filter(e=>e.includes(this.filterNetwork.toUpperCase())):t}},methods:{changeNetwork(t){this.switchOrAddChain(window.ethereum,t)},disconnectWallet(){this.disconnect(),window.localStorage.removeItem("connected")}},setup(){const{open:t}=ov(),{address:e,chainId:r,isActivated:n}=An(),{disconnect:s}=c0(),{getBlockExplorerBaseUrl:i,getChainName:u,getSupportedChains:v,switchOrAddChain:b}=vv(),m=Pu();return{address:e,chainId:r,disconnect:s,getBlockExplorerBaseUrl:i,getChainName:u,getSupportedChains:v,isActivated:n,open:t,shortenAddress:Z2,switchOrAddChain:b,userStore:m}}},Iu=t=>(w1("data-v-9b7406c1"),t=t(),_1(),t),zD={class:"navbar navbar-expand-lg navbar-dark bg-primary"},jD={class:"container-fluid"},GD=Iu(()=>ce("img",{class:"img-fluid navbar-img",src:qD},null,-1)),VD=Iu(()=>ce("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarColor01","aria-controls":"navbarColor01","aria-expanded":"false","aria-label":"Toggle navigation"},[ce("span",{class:"navbar-toggler-icon"})],-1)),WD={class:"collapse navbar-collapse",id:"navbarColor01"},ZD={class:"navbar-nav ms-auto"},JD=Iu(()=>ce("li",{class:"nav-item"},[ce("button",{class:"btn btn-primary","data-bs-toggle":"modal","data-bs-target":"#aboutModal"},"About")],-1)),XD={key:0,class:"nav-item dropdown"},YD={class:"btn btn-primary dropdown-toggle network-dropdown","data-bs-toggle":"dropdown",type:"button","aria-haspopup":"true","aria-expanded":"false"},QD={class:"dropdown-menu p-2 dropdown-menu-end set-cursor-pointer"},eO=["onClick"],tO={key:1,class:"nav-item dropdown"},rO={class:"btn btn-primary dropdown-toggle","data-bs-toggle":"dropdown",type:"button","aria-haspopup":"true","aria-expanded":"false"},nO={key:0,class:"spinner-grow spinner-grow-sm",role:"status","aria-hidden":"true"},iO={class:"dropdown-menu dropdown-menu-end set-cursor-pointer"},aO=["href"],oO={class:"dropdown-item"},sO={class:"nav-item"},fO={key:0,class:"btn btn-primary","data-bs-toggle":"modal","data-bs-target":"#connectModal"},cO=Iu(()=>ce("div",{class:"modal fade",id:"aboutModal",tabindex:"-1","aria-labelledby":"aboutModalLabel","aria-hidden":"true"},[ce("div",{class:"modal-dialog",role:"document"},[ce("div",{class:"modal-content"},[ce("div",{class:"modal-header"},[ce("h5",{class:"modal-title"},"About Send2.name"),ce("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},[ce("span",{"aria-hidden":"true"})])]),ce("div",{class:"modal-body"},[ce("p",null,"Send2.name is a web3 app that allows you to send tokens to any supported web3 domain name."),ce("p",null,[Un("The code is completely "),ce("strong",null,"open source"),Un(" and "),ce("a",{target:"_blank",href:"https://github.com/send2-name"},"available on GitHub"),Un(".")]),ce("p",null,"The list of supported domains:"),ce("ul",null,[ce("li",null,[ce("a",{target:"_blank",href:"https://ens.domains"},".eth (ENS, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".ape (Punk Domains, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".arbi (Punk Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".arbitrum (Punk Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://id.basebook.xyz"},".basebook (Basebook, Base)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://basednames.xyz"},".based (The Based DAO, Base)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://id.basepunk.xyz"},".basepunk (BasePunk NFT, Base)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://app.basin.global"},".basin (Basin, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".bitcoin (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".blockchain (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".crypto (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".dao (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://nftdegen.lol"},".degen (NFTdegen.lol, Degen L3 Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://dns.dopewars.gg"},".dope (Dope DAO, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://fairchat.xyz"},".fairchat (Fairchat, ZKFair)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://fantomname.org"},".fantom (Fantom Names, Fantom)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://flr.domains"},".flr (Flare Domains, Flare Network)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://giveth.punk.domains"},".giveth (Giveth DAO, Gnosis Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".gnosis (Punk Domains, Gnosis Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".huwa (HUWA DAO, BSC)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://www.kns.earth"},".klima (Klima DAO, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".L2 (Layer2 DAO, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".misie (Misie Community, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".nft (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://optimistic.domains"},".op (Optimistic Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".optimism (Punk Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".poly (Punk Domains, Polygon PoS Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://names.pooly.me"},".pool (PoolTogether DAO, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://ppl.domains"},".ppl (People Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains/#/punkangel"},".punkangel (Punk Domains, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".safu (Punk Domains, BSC)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://id.satraps.io"},".satrap (Satrap IDs, Songbird)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://sgb.domains"},".sgb (Songbird Domains, Songbird)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://smol.domains"},".smol (Smol Brains NFT, Arbitrum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".spartan (Punk Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".wagmi (Punk Domains, Optimism)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".wallet (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://twb.punk.domains"},".wildbunch (The Wild Bunch NFT, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".x (Unstoppable Domains, Ethereum)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://punk.domains"},".xdai (Punk Domains, Gnosis Chain)")]),ce("li",null,[ce("a",{target:"_blank",href:"https://unstoppabledomains.com/"},".888 (Unstoppable Domains, Ethereum)")])])])])])],-1));function lO(t,e,r,n,s,i){const u=Zr("router-link");return $e(),We(tr,null,[ce("nav",zD,[ce("div",jD,[Wt(u,{to:"/",class:"navbar-brand"},{default:ta(()=>[GD]),_:1}),VD,ce("div",WD,[ce("ul",ZD,[JD,n.isActivated?($e(),We("li",XD,[ce("button",YD,rn(n.getChainName(n.chainId)),1),ce("div",QD,[ss(ce("input",{class:"form-control mb-2",placeholder:"Find network","onUpdate:modelValue":e[0]||(e[0]=v=>s.filterNetwork=v)},null,512),[[Sf,s.filterNetwork]]),($e(!0),We(tr,null,Ao(i.getNetworks,v=>($e(),We("span",{class:"dropdown-item",key:v,onClick:b=>i.changeNetwork(v)},rn(v),9,eO))),128))])])):zt("",!0),n.isActivated?($e(),We("li",tO,[ce("button",rO,[Un(rn(i.getDomainOrAddress)+" ",1),n.userStore.getDomainSearchStatus?($e(),We("span",nO)):zt("",!0)]),ce("div",iO,[ce("a",{href:n.getBlockExplorerBaseUrl(n.chainId)+"/address/"+n.address,class:"short-address",target:"_blank"},[ce("span",oO,rn(n.shortenAddress(n.address)),1)],8,aO),ce("span",{class:"dropdown-item",onClick:e[1]||(e[1]=(...v)=>i.disconnectWallet&&i.disconnectWallet(...v))},"Disconnect")])])):zt("",!0),ce("li",sO,[n.isActivated?zt("",!0):($e(),We("button",fO,"Connect wallet"))])])])])]),cO],64)}const uO=Ko(HD,[["render",lO],["__scopeId","data-v-9b7406c1"]]),dO="/assets/metamask.ee003f7b.png",hO="/assets/bifrost.58f773ff.png",pO="/assets/coinbase.6efcbd0e.png",vO="/assets/rabby.c4b282ef.png",mO="/assets/brave.0cb22c92.png",gO="/assets/trust.00f61f13.png",bO="/assets/imtoken.555e248e.png",yO={name:"App",components:{Navbar:uO},created(){this.isActivated||(localStorage.getItem("connected")=="metamask"?this.connectMetaMask():localStorage.getItem("connected")=="coinbase"&&this.connectCoinbase())},methods:{async connectCoinbase(){await this.connectWith(this.coinbaseConnector),localStorage.setItem("connected","coinbase"),document.getElementById("closeConnectModal").click()},async connectMetaMask(){await this.connectWith(this.mmConnector),localStorage.setItem("connected","metamask"),document.getElementById("closeConnectModal").click()}},setup(){const{address:t,chainId:e,isActivated:r}=An(),{connectWith:n}=c0(),s=Pu(),i=new jR({appName:"Send2.name",jsonRpcUrl:"https://eth-mainnet.public.blastapi.io"}),u=new r4({appUrl:"https://send2.name"});return{address:t,chainId:e,coinbaseConnector:i,connectWith:n,isActivated:r,mmConnector:u,userStore:s}},watch:{address(t,e){t&&this.userStore.setDefaultDomain()},chainId(t,e){t&&this.userStore.setDefaultDomain()},isActivated(t,e){e===!0&&t===!1&&localStorage.clear()}}},xO={class:"modal modal-sm fade",id:"connectModal",tabindex:"-1","aria-labelledby":"connectModalLabel","aria-hidden":"true"},wO={class:"modal-dialog",role:"document"},_O={class:"modal-content"},MO=ce("div",{class:"modal-header"},[ce("h5",{class:"modal-title"},"Connect your wallet"),ce("button",{id:"closeConnectModal",type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},[ce("span",{"aria-hidden":"true"})])],-1),AO={class:"modal-body row"},EO=ce("img",{src:dO,class:"card-img-top card-img-wallet",alt:"MetaMask"},null,-1),SO=[EO],RO=ce("img",{src:hO,class:"card-img-top card-img-wallet",alt:"Bifrost"},null,-1),CO=[RO],BO=ce("img",{src:pO,class:"card-img-top card-img-wallet",alt:"Coinbase"},null,-1),NO=[BO],TO=ce("img",{src:vO,class:"card-img-top card-img-wallet",alt:"Rabby"},null,-1),kO=[TO],PO=ce("img",{src:mO,class:"card-img-top card-img-wallet",alt:"Brave"},null,-1),IO=[PO],DO=ce("img",{src:gO,class:"card-img-top card-img-wallet",alt:"Trust Wallet"},null,-1),OO=[DO],FO=ce("img",{src:bO,class:"card-img-top card-img-wallet",alt:"imToken"},null,-1),LO=[FO];function UO(t,e,r,n,s,i){const u=Zr("Navbar"),v=Zr("router-view");return $e(),We(tr,null,[Wt(u),Wt(v),ce("div",xO,[ce("div",wO,[ce("div",_O,[MO,ce("div",AO,[ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[0]||(e[0]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},SO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[1]||(e[1]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},CO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[2]||(e[2]=(...b)=>i.connectCoinbase&&i.connectCoinbase(...b))},NO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[3]||(e[3]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},kO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[4]||(e[4]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},IO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[5]||(e[5]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},OO),ce("div",{class:"card col-6 set-cursor-pointer",onClick:e[6]||(e[6]=(...b)=>i.connectMetaMask&&i.connectMetaMask(...b))},LO)])])])])],64)}const KO=Ko(yO,[["render",UO]]);/*! * vue-router v4.1.6 * (c) 2022 Eduardo San Martin Morote * @license MIT - */const os=typeof window<"u";function KO(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const Ht=Object.assign;function fp(t,e){const r={};for(const n in e){const s=e[n];r[n]=fi(s)?s.map(t):t(s)}return r}const qf=()=>{},fi=Array.isArray,$O=/\/$/,qO=t=>t.replace($O,"");function cp(t,e,r="/"){let n,s={},i="",u="";const v=e.indexOf("#");let b=e.indexOf("?");return v=0&&(b=-1),b>-1&&(n=e.slice(0,b),i=e.slice(b+1,v>-1?v:e.length),s=t(i)),v>-1&&(n=n||e.slice(0,v),u=e.slice(v,e.length)),n=GO(n??e,r),{fullPath:n+(i&&"?")+i+u,path:n,query:s,hash:u}}function HO(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function by(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function zO(t,e,r){const n=e.matched.length-1,s=r.matched.length-1;return n>-1&&n===s&&Ls(e.matched[n],r.matched[s])&&Q5(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function Ls(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Q5(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!jO(t[r],e[r]))return!1;return!0}function jO(t,e){return fi(t)?yy(t,e):fi(e)?yy(e,t):t===e}function yy(t,e){return fi(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t.length===1&&t[0]===e}function GO(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),n=t.split("/");let s=r.length-1,i,u;for(i=0;i1&&s--;else break;return r.slice(0,s).join("/")+"/"+n.slice(i-(i===n.length?1:0)).join("/")}var d0;(function(t){t.pop="pop",t.push="push"})(d0||(d0={}));var Hf;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Hf||(Hf={}));function VO(t){if(!t)if(os){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),qO(t)}const WO=/^[^#]+#/;function ZO(t,e){return t.replace(WO,"#")+e}function JO(t,e){const r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-r.left-(e.left||0),top:n.top-r.top-(e.top||0)}}const Ou=()=>({left:window.pageXOffset,top:window.pageYOffset});function XO(t){let e;if("el"in t){const r=t.el,n=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;e=JO(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function xy(t,e){return(history.state?history.state.position-e:-1)+t}const Qp=new Map;function YO(t,e){Qp.set(t,e)}function QO(t){const e=Qp.get(t);return Qp.delete(t),e}let eF=()=>location.protocol+"//"+location.host;function e8(t,e){const{pathname:r,search:n,hash:s}=e,i=t.indexOf("#");if(i>-1){let v=s.includes(t.slice(i))?t.slice(i).length:1,b=s.slice(v);return b[0]!=="/"&&(b="/"+b),by(b,"")}return by(r,t)+n+s}function tF(t,e,r,n){let s=[],i=[],u=null;const v=({state:A})=>{const E=e8(t,location),R=r.value,B=e.value;let T=0;if(A){if(r.value=E,e.value=A,u&&u===R){u=null;return}T=B?A.position-B.position:0}else n(E);s.forEach(F=>{F(r.value,R,{delta:T,type:d0.pop,direction:T?T>0?Hf.forward:Hf.back:Hf.unknown})})};function b(){u=r.value}function m(A){s.push(A);const E=()=>{const R=s.indexOf(A);R>-1&&s.splice(R,1)};return i.push(E),E}function g(){const{history:A}=window;!A.state||A.replaceState(Ht({},A.state,{scroll:Ou()}),"")}function _(){for(const A of i)A();i=[],window.removeEventListener("popstate",v),window.removeEventListener("beforeunload",g)}return window.addEventListener("popstate",v),window.addEventListener("beforeunload",g),{pauseListeners:b,listen:m,destroy:_}}function wy(t,e,r,n=!1,s=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:s?Ou():null}}function rF(t){const{history:e,location:r}=window,n={value:e8(t,r)},s={value:e.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(b,m,g){const _=t.indexOf("#"),A=_>-1?(r.host&&document.querySelector("base")?t:t.slice(_))+b:eF()+t+b;try{e[g?"replaceState":"pushState"](m,"",A),s.value=m}catch(E){console.error(E),r[g?"replace":"assign"](A)}}function u(b,m){const g=Ht({},e.state,wy(s.value.back,b,s.value.forward,!0),m,{position:s.value.position});i(b,g,!0),n.value=b}function v(b,m){const g=Ht({},s.value,e.state,{forward:b,scroll:Ou()});i(g.current,g,!0);const _=Ht({},wy(n.value,b,null),{position:g.position+1},m);i(b,_,!1),n.value=b}return{location:n,state:s,push:v,replace:u}}function nF(t){t=VO(t);const e=rF(t),r=tF(t,e.state,e.location,e.replace);function n(i,u=!0){u||r.pauseListeners(),history.go(i)}const s=Ht({location:"",base:t,go:n,createHref:ZO.bind(null,t)},e,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function iF(t){return typeof t=="string"||t&&typeof t=="object"}function t8(t){return typeof t=="string"||typeof t=="symbol"}const ga={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},r8=Symbol("");var _y;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_y||(_y={}));function Us(t,e){return Ht(new Error,{type:t,[r8]:!0},e)}function zi(t,e){return t instanceof Error&&r8 in t&&(e==null||!!(t.type&e))}const My="[^/]+?",aF={sensitive:!1,strict:!1,start:!0,end:!0},oF=/[.+*?^${}()[\]/\\]/g;function sF(t,e){const r=Ht({},aF,e),n=[];let s=r.start?"^":"";const i=[];for(const m of t){const g=m.length?[]:[90];r.strict&&!m.length&&(s+="/");for(let _=0;_e.length?e.length===1&&e[0]===40+40?1:-1:0}function cF(t,e){let r=0;const n=t.score,s=e.score;for(;r0&&e[e.length-1]<0}const lF={type:0,value:""},uF=/[a-zA-Z0-9_]/;function dF(t){if(!t)return[[]];if(t==="/")return[[lF]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(E){throw new Error(`ERR (${r})/"${m}": ${E}`)}let r=0,n=r;const s=[];let i;function u(){i&&s.push(i),i=[]}let v=0,b,m="",g="";function _(){!m||(r===0?i.push({type:0,value:m}):r===1||r===2||r===3?(i.length>1&&(b==="*"||b==="+")&&e(`A repeatable param (${m}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:m,regexp:g,repeatable:b==="*"||b==="+",optional:b==="*"||b==="?"})):e("Invalid state to consume buffer"),m="")}function A(){m+=b}for(;v{u(O)}:qf}function u(g){if(t8(g)){const _=n.get(g);_&&(n.delete(g),r.splice(r.indexOf(_),1),_.children.forEach(u),_.alias.forEach(u))}else{const _=r.indexOf(g);_>-1&&(r.splice(_,1),g.record.name&&n.delete(g.record.name),g.children.forEach(u),g.alias.forEach(u))}}function v(){return r}function b(g){let _=0;for(;_=0&&(g.record.path!==r[_].record.path||!n8(g,r[_]));)_++;r.splice(_,0,g),g.record.name&&!Sy(g)&&n.set(g.record.name,g)}function m(g,_){let A,E={},R,B;if("name"in g&&g.name){if(A=n.get(g.name),!A)throw Us(1,{location:g});B=A.record.name,E=Ht(Ey(_.params,A.keys.filter(O=>!O.optional).map(O=>O.name)),g.params&&Ey(g.params,A.keys.map(O=>O.name))),R=A.stringify(E)}else if("path"in g)R=g.path,A=r.find(O=>O.re.test(R)),A&&(E=A.parse(R),B=A.record.name);else{if(A=_.name?n.get(_.name):r.find(O=>O.re.test(_.path)),!A)throw Us(1,{location:g,currentLocation:_});B=A.record.name,E=Ht({},_.params,g.params),R=A.stringify(E)}const T=[];let F=A;for(;F;)T.unshift(F.record),F=F.parent;return{name:B,path:R,params:E,matched:T,meta:gF(T)}}return t.forEach(g=>i(g)),{addRoute:i,resolve:m,removeRoute:u,getRoutes:v,getRecordMatcher:s}}function Ey(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function vF(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:mF(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function mF(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="boolean"?r:r[n];return e}function Sy(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function gF(t){return t.reduce((e,r)=>Ht(e,r.meta),{})}function Ry(t,e){const r={};for(const n in t)r[n]=n in e?e[n]:t[n];return r}function n8(t,e){return e.children.some(r=>r===t||n8(t,r))}const i8=/#/g,bF=/&/g,yF=/\//g,xF=/=/g,wF=/\?/g,a8=/\+/g,_F=/%5B/g,MF=/%5D/g,o8=/%5E/g,AF=/%60/g,s8=/%7B/g,EF=/%7C/g,f8=/%7D/g,SF=/%20/g;function Qv(t){return encodeURI(""+t).replace(EF,"|").replace(_F,"[").replace(MF,"]")}function RF(t){return Qv(t).replace(s8,"{").replace(f8,"}").replace(o8,"^")}function e1(t){return Qv(t).replace(a8,"%2B").replace(SF,"+").replace(i8,"%23").replace(bF,"%26").replace(AF,"`").replace(s8,"{").replace(f8,"}").replace(o8,"^")}function CF(t){return e1(t).replace(xF,"%3D")}function BF(t){return Qv(t).replace(i8,"%23").replace(wF,"%3F")}function NF(t){return t==null?"":BF(t).replace(yF,"%2F")}function Ml(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function TF(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;si&&e1(i)):[n&&e1(n)]).forEach(i=>{i!==void 0&&(e+=(e.length?"&":"")+r,i!=null&&(e+="="+i))})}return e}function kF(t){const e={};for(const r in t){const n=t[r];n!==void 0&&(e[r]=fi(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return e}const PF=Symbol(""),By=Symbol(""),Fu=Symbol(""),c8=Symbol(""),t1=Symbol("");function Af(){let t=[];function e(n){return t.push(n),()=>{const s=t.indexOf(n);s>-1&&t.splice(s,1)}}function r(){t=[]}return{add:e,list:()=>t,reset:r}}function Ea(t,e,r,n,s){const i=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((u,v)=>{const b=_=>{_===!1?v(Us(4,{from:r,to:e})):_ instanceof Error?v(_):iF(_)?v(Us(2,{from:e,to:_})):(i&&n.enterCallbacks[s]===i&&typeof _=="function"&&i.push(_),u())},m=t.call(n&&n.instances[s],e,r,b);let g=Promise.resolve(m);t.length<3&&(g=g.then(b)),g.catch(_=>v(_))})}function lp(t,e,r,n){const s=[];for(const i of t)for(const u in i.components){let v=i.components[u];if(!(e!=="beforeRouteEnter"&&!i.instances[u]))if(IF(v)){const m=(v.__vccOpts||v)[e];m&&s.push(Ea(m,r,n,i,u))}else{let b=v();s.push(()=>b.then(m=>{if(!m)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${i.path}"`));const g=KO(m)?m.default:m;i.components[u]=g;const A=(g.__vccOpts||g)[e];return A&&Ea(A,r,n,i,u)()}))}}return s}function IF(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Ny(t){const e=_n(Fu),r=_n(c8),n=nn(()=>e.resolve(mo(t.to))),s=nn(()=>{const{matched:b}=n.value,{length:m}=b,g=b[m-1],_=r.matched;if(!g||!_.length)return-1;const A=_.findIndex(Ls.bind(null,g));if(A>-1)return A;const E=Ty(b[m-2]);return m>1&&Ty(g)===E&&_[_.length-1].path!==E?_.findIndex(Ls.bind(null,b[m-2])):A}),i=nn(()=>s.value>-1&&LF(r.params,n.value.params)),u=nn(()=>s.value>-1&&s.value===r.matched.length-1&&Q5(r.params,n.value.params));function v(b={}){return FF(b)?e[mo(t.replace)?"replace":"push"](mo(t.to)).catch(qf):Promise.resolve()}return{route:n,href:nn(()=>n.value.href),isActive:i,isExactActive:u,navigate:v}}const DF=ci({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ny,setup(t,{slots:e}){const r=Ua(Ny(t)),{options:n}=_n(Fu),s=nn(()=>({[ky(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[ky(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=e.default&&e.default(r);return t.custom?i:k1("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),OF=DF;function FF(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function LF(t,e){for(const r in e){const n=e[r],s=t[r];if(typeof n=="string"){if(n!==s)return!1}else if(!fi(s)||s.length!==n.length||n.some((i,u)=>i!==s[u]))return!1}return!0}function Ty(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const ky=(t,e,r)=>t??e??r,UF=ci({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=_n(t1),s=nn(()=>t.route||n.value),i=_n(By,0),u=nn(()=>{let m=mo(i);const{matched:g}=s.value;let _;for(;(_=g[m])&&!_.components;)m++;return m}),v=nn(()=>s.value.matched[u.value]);Sc(By,nn(()=>u.value+1)),Sc(PF,v),Sc(t1,s);const b=Qr();return bs(()=>[b.value,v.value,t.name],([m,g,_],[A,E,R])=>{g&&(g.instances[_]=m,E&&E!==g&&m&&m===A&&(g.leaveGuards.size||(g.leaveGuards=E.leaveGuards),g.updateGuards.size||(g.updateGuards=E.updateGuards))),m&&g&&(!E||!Ls(g,E)||!A)&&(g.enterCallbacks[_]||[]).forEach(B=>B(m))},{flush:"post"}),()=>{const m=s.value,g=t.name,_=v.value,A=_&&_.components[g];if(!A)return Py(r.default,{Component:A,route:m});const E=_.props[g],R=E?E===!0?m.params:typeof E=="function"?E(m):E:null,T=k1(A,Ht({},R,e,{onVnodeUnmounted:F=>{F.component.isUnmounted&&(_.instances[g]=null)},ref:b}));return Py(r.default,{Component:T,route:m})||T}}});function Py(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const KF=UF;function $F(t){const e=pF(t.routes,t),r=t.parseQuery||TF,n=t.stringifyQuery||Cy,s=t.history,i=Af(),u=Af(),v=Af(),b=Ow(ga);let m=ga;os&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const g=fp.bind(null,S=>""+S),_=fp.bind(null,NF),A=fp.bind(null,Ml);function E(S,I){let U,V;return t8(S)?(U=e.getRecordMatcher(S),V=I):V=S,e.addRoute(V,U)}function R(S){const I=e.getRecordMatcher(S);I&&e.removeRoute(I)}function B(){return e.getRoutes().map(S=>S.record)}function T(S){return!!e.getRecordMatcher(S)}function F(S,I){if(I=Ht({},I||b.value),typeof S=="string"){const N=cp(r,S,I.path),$=e.resolve({path:N.path},I),ee=s.createHref(N.fullPath);return Ht(N,$,{params:A($.params),hash:Ml(N.hash),redirectedFrom:void 0,href:ee})}let U;if("path"in S)U=Ht({},S,{path:cp(r,S.path,I.path).path});else{const N=Ht({},S.params);for(const $ in N)N[$]==null&&delete N[$];U=Ht({},S,{params:_(S.params)}),I.params=_(I.params)}const V=e.resolve(U,I),z=S.hash||"";V.params=g(A(V.params));const X=HO(n,Ht({},S,{hash:RF(z),path:V.path})),j=s.createHref(X);return Ht({fullPath:X,hash:z,query:n===Cy?kF(S.query):S.query||{}},V,{redirectedFrom:void 0,href:j})}function O(S){return typeof S=="string"?cp(r,S,b.value.path):Ht({},S)}function q(S,I){if(m!==S)return Us(8,{from:I,to:S})}function H(S){return ne(S)}function G(S){return H(Ht(O(S),{replace:!0}))}function re(S){const I=S.matched[S.matched.length-1];if(I&&I.redirect){const{redirect:U}=I;let V=typeof U=="function"?U(S):U;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=O(V):{path:V},V.params={}),Ht({query:S.query,hash:S.hash,params:"path"in V?{}:S.params},V)}}function ne(S,I){const U=m=F(S),V=b.value,z=S.state,X=S.force,j=S.replace===!0,N=re(U);if(N)return ne(Ht(O(N),{state:typeof N=="object"?Ht({},z,N.state):z,force:X,replace:j}),I||U);const $=U;$.redirectedFrom=I;let ee;return!X&&zO(n,V,U)&&(ee=Us(16,{to:$,from:V}),o(V,V,!0,!1)),(ee?Promise.resolve(ee):W($,V)).catch(J=>zi(J)?zi(J,2)?J:p(J):x(J,$,V)).then(J=>{if(J){if(zi(J,2))return ne(Ht({replace:j},O(J.to),{state:typeof J.to=="object"?Ht({},z,J.to.state):z,force:X}),I||$)}else J=y($,V,!0,j,z);return se($,V,J),J})}function Y(S,I){const U=q(S,I);return U?Promise.reject(U):Promise.resolve()}function W(S,I){let U;const[V,z,X]=qF(S,I);U=lp(V.reverse(),"beforeRouteLeave",S,I);for(const N of V)N.leaveGuards.forEach($=>{U.push(Ea($,S,I))});const j=Y.bind(null,S,I);return U.push(j),Qo(U).then(()=>{U=[];for(const N of i.list())U.push(Ea(N,S,I));return U.push(j),Qo(U)}).then(()=>{U=lp(z,"beforeRouteUpdate",S,I);for(const N of z)N.updateGuards.forEach($=>{U.push(Ea($,S,I))});return U.push(j),Qo(U)}).then(()=>{U=[];for(const N of S.matched)if(N.beforeEnter&&!I.matched.includes(N))if(fi(N.beforeEnter))for(const $ of N.beforeEnter)U.push(Ea($,S,I));else U.push(Ea(N.beforeEnter,S,I));return U.push(j),Qo(U)}).then(()=>(S.matched.forEach(N=>N.enterCallbacks={}),U=lp(X,"beforeRouteEnter",S,I),U.push(j),Qo(U))).then(()=>{U=[];for(const N of u.list())U.push(Ea(N,S,I));return U.push(j),Qo(U)}).catch(N=>zi(N,8)?N:Promise.reject(N))}function se(S,I,U){for(const V of v.list())V(S,I,U)}function y(S,I,U,V,z){const X=q(S,I);if(X)return X;const j=I===ga,N=os?history.state:{};U&&(V||j?s.replace(S.fullPath,Ht({scroll:j&&N&&N.scroll},z)):s.push(S.fullPath,z)),b.value=S,o(S,I,U,j),p()}let a;function f(){a||(a=s.listen((S,I,U)=>{if(!P.listening)return;const V=F(S),z=re(V);if(z){ne(Ht(z,{replace:!0}),V).catch(qf);return}m=V;const X=b.value;os&&YO(xy(X.fullPath,U.delta),Ou()),W(V,X).catch(j=>zi(j,12)?j:zi(j,2)?(ne(j.to,V).then(N=>{zi(N,20)&&!U.delta&&U.type===d0.pop&&s.go(-1,!1)}).catch(qf),Promise.reject()):(U.delta&&s.go(-U.delta,!1),x(j,V,X))).then(j=>{j=j||y(V,X,!1),j&&(U.delta&&!zi(j,8)?s.go(-U.delta,!1):U.type===d0.pop&&zi(j,20)&&s.go(-1,!1)),se(V,X,j)}).catch(qf)}))}let c=Af(),l=Af(),h;function x(S,I,U){p(S);const V=l.list();return V.length?V.forEach(z=>z(S,I,U)):console.error(S),Promise.reject(S)}function w(){return h&&b.value!==ga?Promise.resolve():new Promise((S,I)=>{c.add([S,I])})}function p(S){return h||(h=!S,f(),c.list().forEach(([I,U])=>S?U(S):I()),c.reset()),S}function o(S,I,U,V){const{scrollBehavior:z}=t;if(!os||!z)return Promise.resolve();const X=!U&&QO(xy(S.fullPath,0))||(V||!U)&&history.state&&history.state.scroll||null;return Rs().then(()=>z(S,I,X)).then(j=>j&&XO(j)).catch(j=>x(j,S,I))}const d=S=>s.go(S);let M;const C=new Set,P={currentRoute:b,listening:!0,addRoute:E,removeRoute:R,hasRoute:T,getRoutes:B,resolve:F,options:t,push:H,replace:G,go:d,back:()=>d(-1),forward:()=>d(1),beforeEach:i.add,beforeResolve:u.add,afterEach:v.add,onError:l.add,isReady:w,install(S){const I=this;S.component("RouterLink",OF),S.component("RouterView",KF),S.config.globalProperties.$router=I,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>mo(b)}),os&&!M&&b.value===ga&&(M=!0,H(s.location).catch(z=>{}));const U={};for(const z in ga)U[z]=nn(()=>b.value[z]);S.provide(Fu,I),S.provide(c8,Ua(U)),S.provide(t1,b);const V=S.unmount;C.add(S),S.unmount=function(){C.delete(S),C.size<1&&(m=ga,a&&a(),a=null,b.value=ga,M=!1,h=!1),V()}}};return P}function Qo(t){return t.reduce((e,r)=>e.then(()=>r()),Promise.resolve())}function qF(t,e){const r=[],n=[],s=[],i=Math.max(e.matched.length,t.matched.length);for(let u=0;uLs(m,v))?n.push(v):r.push(v));const b=t.matched[u];b&&(e.matched.find(m=>Ls(m,b))||s.push(b))}return[r,n,s]}function iK(){return _n(Fu)}const HF={name:"Balance",computed:{getCurrentChainTokens(){const t=this.userStore.getTokenBalances;if(t&&this.chainId){const r=Object.entries(t[String(this.chainId)]).filter(([n,s])=>!String(s).startsWith("0x")&&Number(s)>0);return Object.fromEntries(r)}return null}},setup(){const{chainId:t,isActivated:e}=An(),r=Iu();return{chainId:t,isActivated:e,userStore:r}}},zF={key:0,class:"d-flex justify-content-center"},jF={class:"card text-white bg-secondary balances-card"},GF={class:"card-body text-center"},VF={class:"btn btn-secondary text-uppercase mb-3"},WF={key:0,class:"spinner-grow spinner-grow-sm",role:"status","aria-hidden":"true"},ZF={class:"table table-hover table-secondary table-borderless"};function JF(t,e,r,n,s,i){return n.isActivated?($e(),We("div",zF,[ce("div",jF,[ce("div",GF,[ce("button",VF,[Un(" Your tokens "),n.userStore.getTokenLoadingStatus?($e(),We("span",WF)):zt("",!0)]),ce("table",ZF,[ce("tbody",null,[($e(!0),We(tr,null,Mo(i.getCurrentChainTokens,(u,v)=>($e(),We("tr",{key:v},[ce("td",null,rn(v),1),ce("td",null,rn(Math.round(u*1e4+Number.EPSILON)/1e4),1)]))),128))])])])])])):zt("",!0)}const XF=Uo(HF,[["render",JF],["__scopeId","data-v-ac4cbd6b"]]);var YF=Object.defineProperty,Iy=Object.getOwnPropertySymbols,QF=Object.prototype.hasOwnProperty,eL=Object.prototype.propertyIsEnumerable,Dy=(t,e,r)=>e in t?YF(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l8=(t,e)=>{for(var r in e||(e={}))QF.call(e,r)&&Dy(t,r,e[r]);if(Iy)for(var r of Iy(e))eL.call(e,r)&&Dy(t,r,e[r]);return t},Lu=t=>typeof t=="function",Uu=t=>typeof t=="string",u8=t=>Uu(t)&&t.trim().length>0,tL=t=>typeof t=="number",po=t=>typeof t>"u",h0=t=>typeof t=="object"&&t!==null,rL=t=>Ti(t,"tag")&&u8(t.tag),d8=t=>window.TouchEvent&&t instanceof TouchEvent,h8=t=>Ti(t,"component")&&p8(t.component),nL=t=>Lu(t)||h0(t),p8=t=>!po(t)&&(Uu(t)||nL(t)||h8(t)),Oy=t=>h0(t)&&["height","width","right","left","top","bottom"].every(e=>tL(t[e])),Ti=(t,e)=>(h0(t)||Lu(t))&&e in t,iL=(t=>()=>t++)(0);function up(t){return d8(t)?t.targetTouches[0].clientX:t.clientX}function Fy(t){return d8(t)?t.targetTouches[0].clientY:t.clientY}var aL=t=>{po(t.remove)?t.parentNode&&t.parentNode.removeChild(t):t.remove()},K0=t=>h8(t)?K0(t.component):rL(t)?ci({render(){return t}}):typeof t=="string"?t:Mt(mo(t)),oL=t=>{if(typeof t=="string")return t;const e=Ti(t,"props")&&h0(t.props)?t.props:{},r=Ti(t,"listeners")&&h0(t.listeners)?t.listeners:{};return{component:K0(t),props:e,listeners:r}},sL=()=>typeof window<"u",em=class{constructor(){this.allHandlers={}}getHandlers(t){return this.allHandlers[t]||[]}on(t,e){const r=this.getHandlers(t);r.push(e),this.allHandlers[t]=r}off(t,e){const r=this.getHandlers(t);r.splice(r.indexOf(e)>>>0,1)}emit(t,e){this.getHandlers(t).forEach(n=>n(e))}},fL=t=>["on","off","emit"].every(e=>Ti(t,e)&&Lu(t[e])),Jt;(function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.INFO="info",t.DEFAULT="default"})(Jt||(Jt={}));var p0;(function(t){t.TOP_LEFT="top-left",t.TOP_CENTER="top-center",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_CENTER="bottom-center",t.BOTTOM_RIGHT="bottom-right"})(p0||(p0={}));var wn;(function(t){t.ADD="add",t.DISMISS="dismiss",t.UPDATE="update",t.CLEAR="clear",t.UPDATE_DEFAULTS="update_defaults"})(wn||(wn={}));var ii="Vue-Toastification",Xn={type:{type:String,default:Jt.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},v8={type:Xn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},jc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Xn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},r1={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},m8={transition:{type:[Object,String],default:`${ii}__bounce`}},cL={position:{type:String,default:p0.TOP_RIGHT},draggable:Xn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Xn.trueBoolean,pauseOnHover:Xn.trueBoolean,closeOnClick:Xn.trueBoolean,timeout:r1.timeout,hideProgressBar:r1.hideProgressBar,toastClassName:Xn.classNames,bodyClassName:Xn.classNames,icon:v8.customIcon,closeButton:jc.component,closeButtonClassName:jc.classNames,showCloseButtonOnHover:jc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new em}},lL={id:{type:[String,Number],required:!0,default:0},type:Xn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},uL={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Xn.trueBoolean,maxToasts:{type:Number,default:20},transition:m8.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:t=>t},filterToasts:{type:Function,default:t=>t},containerClassName:Xn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},Qi={CORE_TOAST:cL,TOAST:lL,CONTAINER:uL,PROGRESS_BAR:r1,ICON:v8,TRANSITION:m8,CLOSE_BUTTON:jc},g8=ci({name:"VtProgressBar",props:Qi.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${ii}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function dL(t,e){return $e(),We("div",{style:v0(t.style),class:oi(t.cpClass)},null,6)}g8.render=dL;var hL=g8,b8=ci({name:"VtCloseButton",props:Qi.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?K0(this.component):"button"},classes(){const t=[`${ii}__close-button`];return this.showOnHover&&t.push("show-on-hover"),t.concat(this.classNames)}}}),pL=Un(" \xD7 ");function vL(t,e){return $e(),sn(S1(t.buttonComponent),Fl({"aria-label":t.ariaLabel,class:t.classes},t.$attrs),{default:ta(()=>[pL]),_:1},16,["aria-label","class"])}b8.render=vL;var mL=b8,y8={},gL={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bL=ce("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),yL=[bL];function xL(t,e){return $e(),We("svg",gL,yL)}y8.render=xL;var wL=y8,x8={},_L={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ML=ce("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),AL=[ML];function EL(t,e){return $e(),We("svg",_L,AL)}x8.render=EL;var Ly=x8,w8={},SL={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},RL=ce("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),CL=[RL];function BL(t,e){return $e(),We("svg",SL,CL)}w8.render=BL;var NL=w8,_8={},TL={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},kL=ce("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),PL=[kL];function IL(t,e){return $e(),We("svg",TL,PL)}_8.render=IL;var DL=_8,M8=ci({name:"VtIcon",props:Qi.ICON,computed:{customIconChildren(){return Ti(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Uu(this.customIcon)?this.trimValue(this.customIcon):Ti(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Ti(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:p8(this.customIcon)?K0(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[Jt.DEFAULT]:Ly,[Jt.INFO]:Ly,[Jt.SUCCESS]:wL,[Jt.ERROR]:DL,[Jt.WARNING]:NL}[this.type]},iconClasses(){const t=[`${ii}__icon`];return this.hasCustomIcon?t.concat(this.customIconClass):t}},methods:{trimValue(t,e=""){return u8(t)?t.trim():e}}});function OL(t,e){return $e(),sn(S1(t.component),{class:oi(t.iconClasses)},{default:ta(()=>[Un(rn(t.customIconChildren),1)]),_:1},8,["class"])}M8.render=OL;var FL=M8,A8=ci({name:"VtToast",components:{ProgressBar:hL,CloseButton:mL,Icon:FL},inheritAttrs:!1,props:Object.assign({},Qi.CORE_TOAST,Qi.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const t=[`${ii}__toast`,`${ii}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&t.push("disable-transition"),this.rtl&&t.push(`${ii}__toast--rtl`),t},bodyClasses(){return[`${ii}__toast-${Uu(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Oy(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Ti,getVueComponentFromObj:K0,closeToast(){this.eventBus.emit(wn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const t=this.$el;t.addEventListener("touchstart",this.onDragStart,{passive:!0}),t.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const t=this.$el;t.removeEventListener("touchstart",this.onDragStart),t.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(t){this.beingDragged=!0,this.dragPos={x:up(t),y:Fy(t)},this.dragStart=up(t),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(t){this.beingDragged&&(t.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:up(t),y:Fy(t)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Oy(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),LL=["role"];function UL(t,e){const r=Zr("Icon"),n=Zr("CloseButton"),s=Zr("ProgressBar");return $e(),We("div",{class:oi(t.classes),style:v0(t.draggableStyle),onClick:e[0]||(e[0]=(...i)=>t.clickHandler&&t.clickHandler(...i)),onMouseenter:e[1]||(e[1]=(...i)=>t.hoverPause&&t.hoverPause(...i)),onMouseleave:e[2]||(e[2]=(...i)=>t.hoverPlay&&t.hoverPlay(...i))},[t.icon?($e(),sn(r,{key:0,"custom-icon":t.icon,type:t.type},null,8,["custom-icon","type"])):zt("v-if",!0),ce("div",{role:t.accessibility.toastRole||"alert",class:oi(t.bodyClasses)},[typeof t.content=="string"?($e(),We(tr,{key:0},[Un(rn(t.content),1)],2112)):($e(),sn(S1(t.getVueComponentFromObj(t.content)),Fl({key:1,"toast-id":t.id},t.hasProp(t.content,"props")?t.content.props:{},v9(t.hasProp(t.content,"listeners")?t.content.listeners:{}),{onCloseToast:t.closeToast}),null,16,["toast-id","onCloseToast"]))],10,LL),t.closeButton?($e(),sn(n,{key:1,component:t.closeButton,"class-names":t.closeButtonClassName,"show-on-hover":t.showCloseButtonOnHover,"aria-label":t.accessibility.closeButtonLabel,onClick:S7(t.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):zt("v-if",!0),t.timeout?($e(),sn(s,{key:2,"is-running":t.isRunning,"hide-progress-bar":t.hideProgressBar,timeout:t.timeout,onCloseToast:t.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):zt("v-if",!0)],38)}A8.render=UL;var KL=A8,E8=ci({name:"VtTransition",props:Qi.TRANSITION,emits:["leave"],methods:{hasProp:Ti,leave(t){t instanceof HTMLElement&&(t.style.left=t.offsetLeft+"px",t.style.top=t.offsetTop+"px",t.style.width=getComputedStyle(t).width,t.style.position="absolute")}}});function $L(t,e){return $e(),sn(b7,{tag:"div","enter-active-class":t.transition.enter?t.transition.enter:`${t.transition}-enter-active`,"move-class":t.transition.move?t.transition.move:`${t.transition}-move`,"leave-active-class":t.transition.leave?t.transition.leave:`${t.transition}-leave-active`,onLeave:t.leave},{default:ta(()=>[Jc(t.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}E8.render=$L;var qL=E8,S8=ci({name:"VueToastification",devtools:{hide:!0},components:{Toast:KL,VtTransition:qL},props:Object.assign({},Qi.CORE_TOAST,Qi.CONTAINER,Qi.TRANSITION),data(){return{count:0,positions:Object.values(p0),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const t=this.eventBus;t.on(wn.ADD,this.addToast),t.on(wn.CLEAR,this.clearToasts),t.on(wn.DISMISS,this.dismissToast),t.on(wn.UPDATE,this.updateToast),t.on(wn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(t){Lu(t)&&(t=await t()),aL(this.$el),t.appendChild(this.$el)},setToast(t){po(t.id)||(this.toasts[t.id]=t)},addToast(t){t.content=oL(t.content);const e=Object.assign({},this.defaults,t.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[t.type],t),r=this.defaults.filterBeforeCreate(e,this.toastArray);r&&this.setToast(r)},dismissToast(t){const e=this.toasts[t];!po(e)&&!po(e.onClose)&&e.onClose(),delete this.toasts[t]},clearToasts(){Object.keys(this.toasts).forEach(t=>{this.dismissToast(t)})},getPositionToasts(t){const e=this.filteredToasts.filter(r=>r.position===t).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(t){po(t.container)||this.setup(t.container),this.defaults=Object.assign({},this.defaults,t)},updateToast({id:t,options:e,create:r}){this.toasts[t]?(e.timeout&&e.timeout===this.toasts[t].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[t],e))):r&&this.addToast(Object.assign({},{id:t},e))},getClasses(t){return[`${ii}__container`,t].concat(this.defaults.containerClassName)}}});function HL(t,e){const r=Zr("Toast"),n=Zr("VtTransition");return $e(),We("div",null,[($e(!0),We(tr,null,Mo(t.positions,s=>($e(),We("div",{key:s},[Wt(n,{transition:t.defaults.transition,class:oi(t.getClasses(s))},{default:ta(()=>[($e(!0),We(tr,null,Mo(t.getPositionToasts(s),i=>($e(),sn(r,Fl({key:i.id},i),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}S8.render=HL;var zL=S8,Uy=(t={},e=!0)=>{const r=t.eventBus=t.eventBus||new em;e&&Rs(()=>{const i=t6(zL,l8({},t)),u=i.mount(document.createElement("div")),v=t.onMounted;if(po(v)||v(u,i),t.shareAppContext){const b=t.shareAppContext;b===!0?console.warn(`[${ii}] App to share context with was not provided.`):(i._context.components=b._context.components,i._context.directives=b._context.directives,i._context.mixins=b._context.mixins,i._context.provides=b._context.provides,i.config.globalProperties=b.config.globalProperties)}});const n=(i,u)=>{const v=Object.assign({},{id:iL(),type:Jt.DEFAULT},u,{content:i});return r.emit(wn.ADD,v),v.id};n.clear=()=>r.emit(wn.CLEAR,void 0),n.updateDefaults=i=>{r.emit(wn.UPDATE_DEFAULTS,i)},n.dismiss=i=>{r.emit(wn.DISMISS,i)};function s(i,{content:u,options:v},b=!1){const m=Object.assign({},v,{content:u});r.emit(wn.UPDATE,{id:i,options:m,create:b})}return n.update=s,n.success=(i,u)=>n(i,Object.assign({},u,{type:Jt.SUCCESS})),n.info=(i,u)=>n(i,Object.assign({},u,{type:Jt.INFO})),n.error=(i,u)=>n(i,Object.assign({},u,{type:Jt.ERROR})),n.warning=(i,u)=>n(i,Object.assign({},u,{type:Jt.WARNING})),n},jL=()=>{const t=()=>console.warn(`[${ii}] This plugin does not support SSR!`);return new Proxy(t,{get(){return t}})};function n1(t){return sL()?fL(t)?Uy({eventBus:t},!1):Uy(t,!0):jL()}var R8=Symbol("VueToastification"),C8=new em,GL=(t,e)=>{e?.shareAppContext===!0&&(e.shareAppContext=t);const r=n1(l8({eventBus:C8},e));t.provide(R8,r)},B8=t=>{if(t)return n1(t);const e=Ll()?_n(R8,void 0):void 0;return e||n1(C8)},VL=GL;const WL={name:"PaymentLink",computed:{getPaymentLink(){return"https://send2.name/?to="+this.userStore.getDefaultDomain}},methods:{copyToClipboard(t){navigator.clipboard.writeText(t),this.toast("Payment link copied to your clipboard!",{type:Jt.SUCCESS})}},setup(){const{isActivated:t}=An(),e=Iu(),r=B8();return{isActivated:t,toast:r,userStore:e}}},ZL={key:0,class:"d-flex justify-content-center"},JL={class:"card text-white bg-primary mb-3 send-tokens-card"},XL={class:"card-body text-center"},YL={class:"input-group mb-3"},QL=["value"],eU=ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-clipboard",viewBox:"0 0 16 16"},[ce("path",{d:"M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"}),ce("path",{d:"M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"})],-1),tU=[eU];function rU(t,e,r,n,s,i){return n.userStore.getDefaultDomain?($e(),We("div",ZL,[ce("div",JL,[ce("div",XL,[ce("button",{class:"btn btn-primary text-uppercase mb-3",onClick:e[0]||(e[0]=u=>i.copyToClipboard(i.getPaymentLink))}," Your payment link "),ce("div",YL,[ce("input",{type:"text",class:"form-control text-center set-cursor-pointer","aria-describedby":"button-payment-link",value:i.getPaymentLink,onClick:e[1]||(e[1]=u=>i.copyToClipboard(i.getPaymentLink)),readonly:""},null,8,QL),ce("button",{class:"btn btn-dark",type:"button",id:"button-payment-link",onClick:e[2]||(e[2]=u=>i.copyToClipboard(i.getPaymentLink))},tU)])])])])):zt("",!0)}const nU=Uo(WL,[["render",rU]]),iU={name:"WaitingToast",props:["text"]},aU=ce("span",{class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},null,-1),oU={class:"mx-2"};function sU(t,e,r,n,s,i){return $e(),We("div",null,[aU,ce("span",oU,rn(r.text),1)])}const Ky=Uo(iU,[["render",sU]]),fU={name:"SendTokens",data(){return{filterNetwork:null,filterTokens:null,receiver:null,receiverAddress:null,tokenBalance:0,selectedToken:null,selectedTokenDecimals:null,tokenAmount:null,waiting:!1}},created(){this.setData(),this.receiver=this.$route.query.to},computed:{domainLowerCase(){return this.receiver?this.receiver.toLowerCase():null},formatTokenBalance(){return this.tokenBalance>100?Number(this.tokenBalance).toFixed(2):Number(this.tokenBalance).toFixed(4)},getNetworks(){const t=this.getSupportedChains();return this.filterNetwork?t.filter(e=>e.includes(this.filterNetwork.toUpperCase())):t},getTokenNames(){if(this.getTokens&&!this.filterTokens)return Object.keys(this.getTokens);if(this.getTokens&&this.filterTokens)return Object.keys(this.getTokens).filter(t=>t.includes(this.filterTokens.toUpperCase()))},getTokens(){return this.chainId?Xp[String(this.chainId)]:[]},notValid(){if(this.receiver)if(this.receiver.includes(".")){if(this.receiver.includes(" "))return!0;if(this.receiver.includes("%"))return!0;if(this.receiver.includes("&"))return!0;if(this.receiver.includes("?"))return!0;if(this.receiver.includes("#"))return!0;if(this.receiver.includes("/"))return!0;if(this.tokenAmount){if(isNaN(this.tokenAmount))return!0;if(Number(this.tokenAmount)<=0)return!0;if(Number(this.tokenAmount)>Number(this.tokenBalance))return!0}else return!0}else return!0;else return!0;return!1}},methods:{changeNetwork(t){this.switchOrAddChain(window.ethereum,t)},async getTokenBalance(t){const e=this.getTokens[t];if(e==="0x0")this.tokenBalance=iv(this.balance);else{const r=new ra(Yp),n=new _s(e,r,this.signer),s=await n.balanceOf(this.address);if(Number(s)>0){const i=await n.decimals();this.selectedTokenDecimals=Number(i),this.tokenBalance=Yl(s,this.selectedTokenDecimals)}else this.tokenBalance=0}},selectToken(t){this.selectedToken=t,this.getTokenBalance(t)},setData(){this.getTokens&&(this.selectedToken=Object.keys(this.getTokens)[0],this.isActivated&&this.getTokenBalance(this.selectedToken))},async send(){this.waiting=!0;try{const t=await this.getDomainHolder(this.receiver);if(!t||t===A6){this.toast("This name does not have an owner. Sending aborted.",{type:Jt.ERROR}),this.waiting=!1;return}if(t.toLowerCase()===this.address.toLowerCase()){this.toast("The receiver name is yours. You cannot send tokens to yourself.",{type:Jt.ERROR}),this.waiting=!1;return}this.receiverAddress=t,this.getTokens[this.selectedToken]==="0x0"?this.sendNativeTokens():this.sendErc20Tokens()}catch(t){console.log(t),this.toast(t.message,{type:Jt.ERROR}),this.waiting=!1;return}},async sendErc20Tokens(){try{const t=this.selectedToken,e=this.tokenAmount,r=this.receiver,n=nv(e,this.selectedTokenDecimals),s=this.getTokens[t],i=new ra(Yp),v=await new _s(s,i,this.signer).transfer(this.receiverAddress,n),b=this.toast({component:Ky,props:{text:"Please wait for your transaction to confirm. Click on this notification to see transaction in the block explorer."}},{type:Jt.INFO,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+v.hash,"_blank").focus()}),m=await v.wait();m.status===1?(this.toast.dismiss(b),this.toast("You have successfully sent "+e+" "+t+" to "+r+"!",{type:Jt.SUCCESS,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+v.hash,"_blank").focus()}),this.waiting=!1,this.getTokenBalance(t),this.$gtag.event("send-tokens-success")):(this.toast.dismiss(b),this.toast("Transaction has failed.",{type:Jt.ERROR,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+v.hash,"_blank").focus()}),console.log(m),this.waiting=!1)}catch(t){this.waiting=!1,console.log(t),this.toast(t.message,{type:Jt.ERROR})}},async sendNativeTokens(){this.waiting=!0;try{const t=this.selectedToken,e=this.tokenAmount,r=this.receiver,n=Ux(e),s=await this.signer.sendTransaction({to:this.receiverAddress,value:n}),i=this.toast({component:Ky,props:{text:"Please wait for your transaction to confirm. Click on this notification to see transaction in the block explorer."}},{type:Jt.INFO,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+s.hash,"_blank").focus()}),u=await s.wait();u.status===1?(this.toast.dismiss(i),this.toast("You have successfully sent "+e+" "+t+" to "+r+"!",{type:Jt.SUCCESS,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+s.hash,"_blank").focus()}),this.waiting=!1,this.getTokenBalance(t),this.$gtag.event("send-tokens-success")):(this.toast.dismiss(i),this.toast("Transaction has failed.",{type:Jt.ERROR,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+s.hash,"_blank").focus()}),console.log(u),this.waiting=!1)}catch(t){this.waiting=!1,console.log(t),this.toast(t.message,{type:Jt.ERROR})}}},setup(){const{open:t}=ov(),{address:e,balance:r,chainId:n,isActivated:s,signer:i}=An(),{getBlockExplorerBaseUrl:u,getChainName:v,getSupportedChains:b,switchOrAddChain:m}=vv(),{getDomainHolder:g}=Y5(),_=B8();return{address:e,balance:r,chainId:n,getBlockExplorerBaseUrl:u,getChainName:v,getDomainHolder:g,getSupportedChains:b,isActivated:s,open:t,signer:i,switchOrAddChain:m,toast:_}},watch:{address(){this.setData()},chainId(){this.setData()},isActivated(){this.setData()}}},cU={class:"d-flex justify-content-center"},lU={class:"card text-white bg-primary send-tokens-card"},uU={class:"card-body text-center"},dU={key:0,class:"btn btn-primary",type:"button","data-bs-toggle":"modal","data-bs-target":"#connectModal"},hU={key:1,class:"btn btn-primary dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},pU={key:0},vU={class:"dropdown-menu p-2 dropdown-menu-end"},mU={class:"mb-3"},gU=["onClick"],bU={class:"mt-4"},yU={class:"input-group mt-3"},xU={class:"btn btn-dark dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},wU={class:"dropdown-menu p-2 dropdown-menu-end"},_U={class:"mb-3"},MU=["onClick"],AU=["disabled"],EU={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},SU={key:3,class:"btn btn-lg btn-dark mt-4 mb-2","data-bs-toggle":"modal","data-bs-target":"#connectModal"};function RU(t,e,r,n,s,i){return $e(),We("div",cU,[ce("div",lU,[ce("div",uU,[n.isActivated?zt("",!0):($e(),We("button",dU," Connect wallet ")),n.isActivated?($e(),We("button",hU,[n.getChainName(n.chainId).toLowerCase().startsWith("unsupported")?zt("",!0):($e(),We("span",pU,"SEND ON ")),Un(" "+rn(n.getChainName(n.chainId)),1)])):zt("",!0),ce("div",vU,[ce("div",mU,[ss(ce("input",{class:"form-control mb-2",placeholder:"Find network","onUpdate:modelValue":e[0]||(e[0]=u=>s.filterNetwork=u)},null,512),[[Sf,s.filterNetwork]]),ce("li",null,[($e(!0),We(tr,null,Mo(i.getNetworks,u=>($e(),We("button",{class:"dropdown-item",type:"button",key:u,onClick:v=>i.changeNetwork(u)},"SWITCH TO "+rn(u),9,gU))),128))])])]),ce("div",bU,[ss(ce("input",{"onUpdate:modelValue":e[1]||(e[1]=u=>s.receiver=u),class:"form-control form-control-lg text-center",placeholder:"Receiver's domain name"},null,512),[[Sf,s.receiver]])]),ce("div",yU,[ss(ce("input",{type:"text",class:"form-control form-control-lg text-end","onUpdate:modelValue":e[2]||(e[2]=u=>s.tokenAmount=u),placeholder:"0.0"},null,512),[[Sf,s.tokenAmount]]),ce("button",xU,rn(s.selectedToken),1),ce("div",wU,[ce("div",_U,[ss(ce("input",{class:"form-control mb-2",placeholder:"Filter tokens","onUpdate:modelValue":e[3]||(e[3]=u=>s.filterTokens=u)},null,512),[[Sf,s.filterTokens]]),ce("li",null,[($e(!0),We(tr,null,Mo(i.getTokenNames,u=>($e(),We("button",{class:"dropdown-item",type:"button",key:u,onClick:v=>i.selectToken(u)},rn(u),9,MU))),128))])])])]),ce("div",null,[ce("small",null,[Un(" Balance: "),ce("span",{id:"balance",onClick:e[4]||(e[4]=u=>s.tokenAmount=s.tokenBalance)},rn(i.formatTokenBalance)+" "+rn(s.selectedToken),1)])]),n.isActivated?($e(),We("button",{key:2,class:"btn btn-lg btn-dark mt-4 mb-2",disabled:i.notValid||s.waiting,onClick:e[5]||(e[5]=(...u)=>i.send&&i.send(...u))},[s.waiting?($e(),We("span",EU)):zt("",!0),Un(" Send tokens ")],8,AU)):zt("",!0),n.isActivated?zt("",!0):($e(),We("button",SU," Connect wallet "))])])])}const CU=Uo(fU,[["render",RU]]),BU={name:"Home",components:{Balance:XF,PaymentLink:nU,SendTokens:CU},setup(){}};function NU(t,e,r,n,s,i){const u=Zr("SendTokens"),v=Zr("Balance"),b=Zr("PaymentLink");return $e(),We(tr,null,[Wt(u),Wt(v),Wt(b)],64)}const TU=Uo(BU,[["render",NU]]),kU=[{path:"/",name:"Home",component:TU},{path:"/:pathMatch(.*)*",name:"404",component:()=>o6(()=>import("./Error404.7594d0e5.js"),[])}],PU=$F({history:nF(),routes:kU});function i1(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function a1(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(n,s){if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");if(u.async=!0,u.src=e,u.defer=r.defer,r.preconnectOrigin){var v=document.createElement("link");v.href=r.preconnectOrigin,v.rel="preconnect",i.appendChild(v)}i.appendChild(u),u.onload=n,u.onerror=s}})},DU=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s"u"||typeof document>"u")},qy=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;$0()},OU=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return qy('Missing "appName" property inside the plugin options.',e.app_name==null),qy('Missing "name" property in the route.',e.screen_name==null),e};function FU(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.split("/"),n=e.split("/");return r[0]===""&&e[e.length-1]==="/"&&r.shift(),n.join("/")+r.join("/")}var LU=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},N8={},UU=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=LU();N8=DU(r,e)},Cn=function(){return N8},No=function(){var t,e=Cn(),r=e.globalObjectName;!$0()||typeof window[r]>"u"||(t=window)[r].apply(t,arguments)},tm=function(){for(var t=arguments.length,e=new Array(t),r=0;r0&&arguments[0]!==void 0?arguments[0]:!0,e=Cn(),r=e.config,n=e.includes;Hy(r.id,t),Array.isArray(n)&&n.forEach(function(s){return Hy(s.id,t)})},k8=function(){T8(!0)},KU=function(){T8(!1)},P8,$U=function(e){P8=e},rm=function(){return P8},Ko=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Cn(),n=r.includes,s=r.defaultGroupName;e.send_to==null&&Array.isArray(n)&&n.length&&(e.send_to=n.map(function(i){return i.id}).concat(s)),No("event",t,e)},I8=function(t){if(!!$0()){var e;if(typeof t=="string")e={page_path:t};else if(t.path||t.fullPath){var r=Cn(),n=r.pageTrackerUseFullPath,s=r.pageTrackerPrependBase,i=rm(),u=i&&i.options.base,v=n?t.fullPath:t.path;e=a1(a1({},t.name&&{page_title:t.name}),{},{page_path:s?FU(v,u):v})}else e=t;e.page_location==null&&(e.page_location=window.location.href),e.send_page_view==null&&(e.send_page_view=!0),Ko("page_view",e)}},D8=function(t){var e=Cn(),r=e.appName;if(!!t){var n;typeof t=="string"?n={screen_name:t}:n=t,n.app_name=n.app_name||r,Ko("screen_view",n)}},qU=function(){for(var t=arguments.length,e=new Array(t),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Cn(),n=r.appName,s=r.pageTrackerTemplate,i=r.pageTrackerScreenviewEnabled,u=r.pageTrackerSkipSamePath;if(!(u&&t.path===e.path)){var v=t;if(st(s)?v=s(t,e):i&&(v=OU({app_name:n,screen_name:t.name})),i){D8(v);return}I8(v)}},Gy=function(e){var r=Cn(),n=r.pageTrackerExcludedRoutes;return n.includes(e.path)||n.includes(e.name)},YU=function(){var t=Cn(),e=t.onBeforeTrack,r=t.onAfterTrack,n=rm();n.isReady().then(function(){Rs().then(function(){var s=n.currentRoute;O8(),!Gy(s.value)&&jy(s.value)}),n.afterEach(function(s,i){Rs().then(function(){Gy(s)||(st(e)&&e(s,i),jy(s,i),st(r)&&r(s,i))})})})},QU=function(){var t=Cn(),e=t.onReady,r=t.onError,n=t.globalObjectName,s=t.globalDataLayerName,i=t.config,u=t.customResourceURL,v=t.customPreconnectOrigin,b=t.deferScriptLoad,m=t.pageTrackerEnabled,g=t.disableScriptLoad,_=Boolean(m&&rm());if(XU(),_?YU():O8(),!g)return IU("".concat(u,"?id=").concat(i.id,"&l=").concat(s),{preconnectOrigin:v,defer:b}).then(function(){e&&e(window[n])}).catch(function(A){return r&&r(A),A})},eK=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;JU(e),UU(r),$U(n),Cn().bootstrap&&QU()};const tK=T7(),nf=t6(UO),rK={timeout:5e3,hideProgressBar:!0,closeButton:"button",position:p0.TOP_LEFT,closeOnClick:!1,toastDefaults:{[Jt.INFO]:{timeout:!1,icon:!1}}};nf.use(VL,rK);nf.use(eK,{config:{id:"G-MXWJ4EGXD9",params:{anonymize_ip:!0}}});nf.use(PU);nf.use(tK);nf.use(PC,{});nf.mount("#app");export{ce as a,mo as b,We as c,ci as d,He as e,yv as f,M0 as g,ue as h,Je as i,gr as j,wv as k,_v as l,m0 as m,nK as n,$e as o,pl as r,iK as u}; + */const os=typeof window<"u";function $O(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const Ht=Object.assign;function fp(t,e){const r={};for(const n in e){const s=e[n];r[n]=fi(s)?s.map(t):t(s)}return r}const qf=()=>{},fi=Array.isArray,qO=/\/$/,HO=t=>t.replace(qO,"");function cp(t,e,r="/"){let n,s={},i="",u="";const v=e.indexOf("#");let b=e.indexOf("?");return v=0&&(b=-1),b>-1&&(n=e.slice(0,b),i=e.slice(b+1,v>-1?v:e.length),s=t(i)),v>-1&&(n=n||e.slice(0,v),u=e.slice(v,e.length)),n=VO(n??e,r),{fullPath:n+(i&&"?")+i+u,path:n,query:s,hash:u}}function zO(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function by(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function jO(t,e,r){const n=e.matched.length-1,s=r.matched.length-1;return n>-1&&n===s&&Ls(e.matched[n],r.matched[s])&&Q5(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function Ls(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Q5(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!GO(t[r],e[r]))return!1;return!0}function GO(t,e){return fi(t)?yy(t,e):fi(e)?yy(e,t):t===e}function yy(t,e){return fi(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t.length===1&&t[0]===e}function VO(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),n=t.split("/");let s=r.length-1,i,u;for(i=0;i1&&s--;else break;return r.slice(0,s).join("/")+"/"+n.slice(i-(i===n.length?1:0)).join("/")}var d0;(function(t){t.pop="pop",t.push="push"})(d0||(d0={}));var Hf;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Hf||(Hf={}));function WO(t){if(!t)if(os){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),HO(t)}const ZO=/^[^#]+#/;function JO(t,e){return t.replace(ZO,"#")+e}function XO(t,e){const r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-r.left-(e.left||0),top:n.top-r.top-(e.top||0)}}const Du=()=>({left:window.pageXOffset,top:window.pageYOffset});function YO(t){let e;if("el"in t){const r=t.el,n=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;e=XO(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function xy(t,e){return(history.state?history.state.position-e:-1)+t}const Qp=new Map;function QO(t,e){Qp.set(t,e)}function eF(t){const e=Qp.get(t);return Qp.delete(t),e}let tF=()=>location.protocol+"//"+location.host;function e8(t,e){const{pathname:r,search:n,hash:s}=e,i=t.indexOf("#");if(i>-1){let v=s.includes(t.slice(i))?t.slice(i).length:1,b=s.slice(v);return b[0]!=="/"&&(b="/"+b),by(b,"")}return by(r,t)+n+s}function rF(t,e,r,n){let s=[],i=[],u=null;const v=({state:A})=>{const E=e8(t,location),R=r.value,B=e.value;let T=0;if(A){if(r.value=E,e.value=A,u&&u===R){u=null;return}T=B?A.position-B.position:0}else n(E);s.forEach(F=>{F(r.value,R,{delta:T,type:d0.pop,direction:T?T>0?Hf.forward:Hf.back:Hf.unknown})})};function b(){u=r.value}function m(A){s.push(A);const E=()=>{const R=s.indexOf(A);R>-1&&s.splice(R,1)};return i.push(E),E}function g(){const{history:A}=window;!A.state||A.replaceState(Ht({},A.state,{scroll:Du()}),"")}function _(){for(const A of i)A();i=[],window.removeEventListener("popstate",v),window.removeEventListener("beforeunload",g)}return window.addEventListener("popstate",v),window.addEventListener("beforeunload",g),{pauseListeners:b,listen:m,destroy:_}}function wy(t,e,r,n=!1,s=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:s?Du():null}}function nF(t){const{history:e,location:r}=window,n={value:e8(t,r)},s={value:e.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(b,m,g){const _=t.indexOf("#"),A=_>-1?(r.host&&document.querySelector("base")?t:t.slice(_))+b:tF()+t+b;try{e[g?"replaceState":"pushState"](m,"",A),s.value=m}catch(E){console.error(E),r[g?"replace":"assign"](A)}}function u(b,m){const g=Ht({},e.state,wy(s.value.back,b,s.value.forward,!0),m,{position:s.value.position});i(b,g,!0),n.value=b}function v(b,m){const g=Ht({},s.value,e.state,{forward:b,scroll:Du()});i(g.current,g,!0);const _=Ht({},wy(n.value,b,null),{position:g.position+1},m);i(b,_,!1),n.value=b}return{location:n,state:s,push:v,replace:u}}function iF(t){t=WO(t);const e=nF(t),r=rF(t,e.state,e.location,e.replace);function n(i,u=!0){u||r.pauseListeners(),history.go(i)}const s=Ht({location:"",base:t,go:n,createHref:JO.bind(null,t)},e,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function aF(t){return typeof t=="string"||t&&typeof t=="object"}function t8(t){return typeof t=="string"||typeof t=="symbol"}const ga={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},r8=Symbol("");var _y;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_y||(_y={}));function Us(t,e){return Ht(new Error,{type:t,[r8]:!0},e)}function zi(t,e){return t instanceof Error&&r8 in t&&(e==null||!!(t.type&e))}const My="[^/]+?",oF={sensitive:!1,strict:!1,start:!0,end:!0},sF=/[.+*?^${}()[\]/\\]/g;function fF(t,e){const r=Ht({},oF,e),n=[];let s=r.start?"^":"";const i=[];for(const m of t){const g=m.length?[]:[90];r.strict&&!m.length&&(s+="/");for(let _=0;_e.length?e.length===1&&e[0]===40+40?1:-1:0}function lF(t,e){let r=0;const n=t.score,s=e.score;for(;r0&&e[e.length-1]<0}const uF={type:0,value:""},dF=/[a-zA-Z0-9_]/;function hF(t){if(!t)return[[]];if(t==="/")return[[uF]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(E){throw new Error(`ERR (${r})/"${m}": ${E}`)}let r=0,n=r;const s=[];let i;function u(){i&&s.push(i),i=[]}let v=0,b,m="",g="";function _(){!m||(r===0?i.push({type:0,value:m}):r===1||r===2||r===3?(i.length>1&&(b==="*"||b==="+")&&e(`A repeatable param (${m}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:m,regexp:g,repeatable:b==="*"||b==="+",optional:b==="*"||b==="?"})):e("Invalid state to consume buffer"),m="")}function A(){m+=b}for(;v{u(O)}:qf}function u(g){if(t8(g)){const _=n.get(g);_&&(n.delete(g),r.splice(r.indexOf(_),1),_.children.forEach(u),_.alias.forEach(u))}else{const _=r.indexOf(g);_>-1&&(r.splice(_,1),g.record.name&&n.delete(g.record.name),g.children.forEach(u),g.alias.forEach(u))}}function v(){return r}function b(g){let _=0;for(;_=0&&(g.record.path!==r[_].record.path||!n8(g,r[_]));)_++;r.splice(_,0,g),g.record.name&&!Sy(g)&&n.set(g.record.name,g)}function m(g,_){let A,E={},R,B;if("name"in g&&g.name){if(A=n.get(g.name),!A)throw Us(1,{location:g});B=A.record.name,E=Ht(Ey(_.params,A.keys.filter(O=>!O.optional).map(O=>O.name)),g.params&&Ey(g.params,A.keys.map(O=>O.name))),R=A.stringify(E)}else if("path"in g)R=g.path,A=r.find(O=>O.re.test(R)),A&&(E=A.parse(R),B=A.record.name);else{if(A=_.name?n.get(_.name):r.find(O=>O.re.test(_.path)),!A)throw Us(1,{location:g,currentLocation:_});B=A.record.name,E=Ht({},_.params,g.params),R=A.stringify(E)}const T=[];let F=A;for(;F;)T.unshift(F.record),F=F.parent;return{name:B,path:R,params:E,matched:T,meta:bF(T)}}return t.forEach(g=>i(g)),{addRoute:i,resolve:m,removeRoute:u,getRoutes:v,getRecordMatcher:s}}function Ey(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function mF(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:gF(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function gF(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="boolean"?r:r[n];return e}function Sy(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function bF(t){return t.reduce((e,r)=>Ht(e,r.meta),{})}function Ry(t,e){const r={};for(const n in t)r[n]=n in e?e[n]:t[n];return r}function n8(t,e){return e.children.some(r=>r===t||n8(t,r))}const i8=/#/g,yF=/&/g,xF=/\//g,wF=/=/g,_F=/\?/g,a8=/\+/g,MF=/%5B/g,AF=/%5D/g,o8=/%5E/g,EF=/%60/g,s8=/%7B/g,SF=/%7C/g,f8=/%7D/g,RF=/%20/g;function Qv(t){return encodeURI(""+t).replace(SF,"|").replace(MF,"[").replace(AF,"]")}function CF(t){return Qv(t).replace(s8,"{").replace(f8,"}").replace(o8,"^")}function e1(t){return Qv(t).replace(a8,"%2B").replace(RF,"+").replace(i8,"%23").replace(yF,"%26").replace(EF,"`").replace(s8,"{").replace(f8,"}").replace(o8,"^")}function BF(t){return e1(t).replace(wF,"%3D")}function NF(t){return Qv(t).replace(i8,"%23").replace(_F,"%3F")}function TF(t){return t==null?"":NF(t).replace(xF,"%2F")}function _l(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function kF(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;si&&e1(i)):[n&&e1(n)]).forEach(i=>{i!==void 0&&(e+=(e.length?"&":"")+r,i!=null&&(e+="="+i))})}return e}function PF(t){const e={};for(const r in t){const n=t[r];n!==void 0&&(e[r]=fi(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return e}const IF=Symbol(""),By=Symbol(""),Ou=Symbol(""),c8=Symbol(""),t1=Symbol("");function Af(){let t=[];function e(n){return t.push(n),()=>{const s=t.indexOf(n);s>-1&&t.splice(s,1)}}function r(){t=[]}return{add:e,list:()=>t,reset:r}}function Ea(t,e,r,n,s){const i=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((u,v)=>{const b=_=>{_===!1?v(Us(4,{from:r,to:e})):_ instanceof Error?v(_):aF(_)?v(Us(2,{from:e,to:_})):(i&&n.enterCallbacks[s]===i&&typeof _=="function"&&i.push(_),u())},m=t.call(n&&n.instances[s],e,r,b);let g=Promise.resolve(m);t.length<3&&(g=g.then(b)),g.catch(_=>v(_))})}function lp(t,e,r,n){const s=[];for(const i of t)for(const u in i.components){let v=i.components[u];if(!(e!=="beforeRouteEnter"&&!i.instances[u]))if(DF(v)){const m=(v.__vccOpts||v)[e];m&&s.push(Ea(m,r,n,i,u))}else{let b=v();s.push(()=>b.then(m=>{if(!m)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${i.path}"`));const g=$O(m)?m.default:m;i.components[u]=g;const A=(g.__vccOpts||g)[e];return A&&Ea(A,r,n,i,u)()}))}}return s}function DF(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Ny(t){const e=_n(Ou),r=_n(c8),n=nn(()=>e.resolve(go(t.to))),s=nn(()=>{const{matched:b}=n.value,{length:m}=b,g=b[m-1],_=r.matched;if(!g||!_.length)return-1;const A=_.findIndex(Ls.bind(null,g));if(A>-1)return A;const E=Ty(b[m-2]);return m>1&&Ty(g)===E&&_[_.length-1].path!==E?_.findIndex(Ls.bind(null,b[m-2])):A}),i=nn(()=>s.value>-1&&UF(r.params,n.value.params)),u=nn(()=>s.value>-1&&s.value===r.matched.length-1&&Q5(r.params,n.value.params));function v(b={}){return LF(b)?e[go(t.replace)?"replace":"push"](go(t.to)).catch(qf):Promise.resolve()}return{route:n,href:nn(()=>n.value.href),isActive:i,isExactActive:u,navigate:v}}const OF=ci({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ny,setup(t,{slots:e}){const r=Ua(Ny(t)),{options:n}=_n(Ou),s=nn(()=>({[ky(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[ky(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=e.default&&e.default(r);return t.custom?i:k1("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),FF=OF;function LF(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function UF(t,e){for(const r in e){const n=e[r],s=t[r];if(typeof n=="string"){if(n!==s)return!1}else if(!fi(s)||s.length!==n.length||n.some((i,u)=>i!==s[u]))return!1}return!0}function Ty(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const ky=(t,e,r)=>t??e??r,KF=ci({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=_n(t1),s=nn(()=>t.route||n.value),i=_n(By,0),u=nn(()=>{let m=go(i);const{matched:g}=s.value;let _;for(;(_=g[m])&&!_.components;)m++;return m}),v=nn(()=>s.value.matched[u.value]);Ec(By,nn(()=>u.value+1)),Ec(IF,v),Ec(t1,s);const b=Qr();return bs(()=>[b.value,v.value,t.name],([m,g,_],[A,E,R])=>{g&&(g.instances[_]=m,E&&E!==g&&m&&m===A&&(g.leaveGuards.size||(g.leaveGuards=E.leaveGuards),g.updateGuards.size||(g.updateGuards=E.updateGuards))),m&&g&&(!E||!Ls(g,E)||!A)&&(g.enterCallbacks[_]||[]).forEach(B=>B(m))},{flush:"post"}),()=>{const m=s.value,g=t.name,_=v.value,A=_&&_.components[g];if(!A)return Py(r.default,{Component:A,route:m});const E=_.props[g],R=E?E===!0?m.params:typeof E=="function"?E(m):E:null,T=k1(A,Ht({},R,e,{onVnodeUnmounted:F=>{F.component.isUnmounted&&(_.instances[g]=null)},ref:b}));return Py(r.default,{Component:T,route:m})||T}}});function Py(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const $F=KF;function qF(t){const e=vF(t.routes,t),r=t.parseQuery||kF,n=t.stringifyQuery||Cy,s=t.history,i=Af(),u=Af(),v=Af(),b=Ow(ga);let m=ga;os&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const g=fp.bind(null,S=>""+S),_=fp.bind(null,TF),A=fp.bind(null,_l);function E(S,I){let U,V;return t8(S)?(U=e.getRecordMatcher(S),V=I):V=S,e.addRoute(V,U)}function R(S){const I=e.getRecordMatcher(S);I&&e.removeRoute(I)}function B(){return e.getRoutes().map(S=>S.record)}function T(S){return!!e.getRecordMatcher(S)}function F(S,I){if(I=Ht({},I||b.value),typeof S=="string"){const N=cp(r,S,I.path),$=e.resolve({path:N.path},I),ee=s.createHref(N.fullPath);return Ht(N,$,{params:A($.params),hash:_l(N.hash),redirectedFrom:void 0,href:ee})}let U;if("path"in S)U=Ht({},S,{path:cp(r,S.path,I.path).path});else{const N=Ht({},S.params);for(const $ in N)N[$]==null&&delete N[$];U=Ht({},S,{params:_(S.params)}),I.params=_(I.params)}const V=e.resolve(U,I),z=S.hash||"";V.params=g(A(V.params));const X=zO(n,Ht({},S,{hash:CF(z),path:V.path})),j=s.createHref(X);return Ht({fullPath:X,hash:z,query:n===Cy?PF(S.query):S.query||{}},V,{redirectedFrom:void 0,href:j})}function O(S){return typeof S=="string"?cp(r,S,b.value.path):Ht({},S)}function q(S,I){if(m!==S)return Us(8,{from:I,to:S})}function H(S){return ne(S)}function G(S){return H(Ht(O(S),{replace:!0}))}function re(S){const I=S.matched[S.matched.length-1];if(I&&I.redirect){const{redirect:U}=I;let V=typeof U=="function"?U(S):U;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=O(V):{path:V},V.params={}),Ht({query:S.query,hash:S.hash,params:"path"in V?{}:S.params},V)}}function ne(S,I){const U=m=F(S),V=b.value,z=S.state,X=S.force,j=S.replace===!0,N=re(U);if(N)return ne(Ht(O(N),{state:typeof N=="object"?Ht({},z,N.state):z,force:X,replace:j}),I||U);const $=U;$.redirectedFrom=I;let ee;return!X&&jO(n,V,U)&&(ee=Us(16,{to:$,from:V}),o(V,V,!0,!1)),(ee?Promise.resolve(ee):W($,V)).catch(J=>zi(J)?zi(J,2)?J:p(J):x(J,$,V)).then(J=>{if(J){if(zi(J,2))return ne(Ht({replace:j},O(J.to),{state:typeof J.to=="object"?Ht({},z,J.to.state):z,force:X}),I||$)}else J=y($,V,!0,j,z);return se($,V,J),J})}function Y(S,I){const U=q(S,I);return U?Promise.reject(U):Promise.resolve()}function W(S,I){let U;const[V,z,X]=HF(S,I);U=lp(V.reverse(),"beforeRouteLeave",S,I);for(const N of V)N.leaveGuards.forEach($=>{U.push(Ea($,S,I))});const j=Y.bind(null,S,I);return U.push(j),Qo(U).then(()=>{U=[];for(const N of i.list())U.push(Ea(N,S,I));return U.push(j),Qo(U)}).then(()=>{U=lp(z,"beforeRouteUpdate",S,I);for(const N of z)N.updateGuards.forEach($=>{U.push(Ea($,S,I))});return U.push(j),Qo(U)}).then(()=>{U=[];for(const N of S.matched)if(N.beforeEnter&&!I.matched.includes(N))if(fi(N.beforeEnter))for(const $ of N.beforeEnter)U.push(Ea($,S,I));else U.push(Ea(N.beforeEnter,S,I));return U.push(j),Qo(U)}).then(()=>(S.matched.forEach(N=>N.enterCallbacks={}),U=lp(X,"beforeRouteEnter",S,I),U.push(j),Qo(U))).then(()=>{U=[];for(const N of u.list())U.push(Ea(N,S,I));return U.push(j),Qo(U)}).catch(N=>zi(N,8)?N:Promise.reject(N))}function se(S,I,U){for(const V of v.list())V(S,I,U)}function y(S,I,U,V,z){const X=q(S,I);if(X)return X;const j=I===ga,N=os?history.state:{};U&&(V||j?s.replace(S.fullPath,Ht({scroll:j&&N&&N.scroll},z)):s.push(S.fullPath,z)),b.value=S,o(S,I,U,j),p()}let a;function f(){a||(a=s.listen((S,I,U)=>{if(!P.listening)return;const V=F(S),z=re(V);if(z){ne(Ht(z,{replace:!0}),V).catch(qf);return}m=V;const X=b.value;os&&QO(xy(X.fullPath,U.delta),Du()),W(V,X).catch(j=>zi(j,12)?j:zi(j,2)?(ne(j.to,V).then(N=>{zi(N,20)&&!U.delta&&U.type===d0.pop&&s.go(-1,!1)}).catch(qf),Promise.reject()):(U.delta&&s.go(-U.delta,!1),x(j,V,X))).then(j=>{j=j||y(V,X,!1),j&&(U.delta&&!zi(j,8)?s.go(-U.delta,!1):U.type===d0.pop&&zi(j,20)&&s.go(-1,!1)),se(V,X,j)}).catch(qf)}))}let c=Af(),l=Af(),h;function x(S,I,U){p(S);const V=l.list();return V.length?V.forEach(z=>z(S,I,U)):console.error(S),Promise.reject(S)}function w(){return h&&b.value!==ga?Promise.resolve():new Promise((S,I)=>{c.add([S,I])})}function p(S){return h||(h=!S,f(),c.list().forEach(([I,U])=>S?U(S):I()),c.reset()),S}function o(S,I,U,V){const{scrollBehavior:z}=t;if(!os||!z)return Promise.resolve();const X=!U&&eF(xy(S.fullPath,0))||(V||!U)&&history.state&&history.state.scroll||null;return Rs().then(()=>z(S,I,X)).then(j=>j&&YO(j)).catch(j=>x(j,S,I))}const d=S=>s.go(S);let M;const C=new Set,P={currentRoute:b,listening:!0,addRoute:E,removeRoute:R,hasRoute:T,getRoutes:B,resolve:F,options:t,push:H,replace:G,go:d,back:()=>d(-1),forward:()=>d(1),beforeEach:i.add,beforeResolve:u.add,afterEach:v.add,onError:l.add,isReady:w,install(S){const I=this;S.component("RouterLink",FF),S.component("RouterView",$F),S.config.globalProperties.$router=I,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>go(b)}),os&&!M&&b.value===ga&&(M=!0,H(s.location).catch(z=>{}));const U={};for(const z in ga)U[z]=nn(()=>b.value[z]);S.provide(Ou,I),S.provide(c8,Ua(U)),S.provide(t1,b);const V=S.unmount;C.add(S),S.unmount=function(){C.delete(S),C.size<1&&(m=ga,a&&a(),a=null,b.value=ga,M=!1,h=!1),V()}}};return P}function Qo(t){return t.reduce((e,r)=>e.then(()=>r()),Promise.resolve())}function HF(t,e){const r=[],n=[],s=[],i=Math.max(e.matched.length,t.matched.length);for(let u=0;uLs(m,v))?n.push(v):r.push(v));const b=t.matched[u];b&&(e.matched.find(m=>Ls(m,b))||s.push(b))}return[r,n,s]}function aK(){return _n(Ou)}const zF={name:"Balance",computed:{getCurrentChainTokens(){const t=this.userStore.getTokenBalances;if(t&&this.chainId){const r=Object.entries(t[String(this.chainId)]).filter(([n,s])=>!String(s).startsWith("0x")&&Number(s)>0);return Object.fromEntries(r)}return null}},setup(){const{chainId:t,isActivated:e}=An(),r=Pu();return{chainId:t,isActivated:e,userStore:r}}},jF={key:0,class:"d-flex justify-content-center"},GF={class:"card text-white bg-secondary balances-card"},VF={class:"card-body text-center"},WF={class:"btn btn-secondary text-uppercase mb-3"},ZF={key:0,class:"spinner-grow spinner-grow-sm",role:"status","aria-hidden":"true"},JF={class:"table table-hover table-secondary table-borderless"};function XF(t,e,r,n,s,i){return n.isActivated?($e(),We("div",jF,[ce("div",GF,[ce("div",VF,[ce("button",WF,[Un(" Your tokens "),n.userStore.getTokenLoadingStatus?($e(),We("span",ZF)):zt("",!0)]),ce("table",JF,[ce("tbody",null,[($e(!0),We(tr,null,Ao(i.getCurrentChainTokens,(u,v)=>($e(),We("tr",{key:v},[ce("td",null,rn(v),1),ce("td",null,rn(Math.round(u*1e4+Number.EPSILON)/1e4),1)]))),128))])])])])])):zt("",!0)}const YF=Ko(zF,[["render",XF],["__scopeId","data-v-ac4cbd6b"]]);var QF=Object.defineProperty,Iy=Object.getOwnPropertySymbols,eL=Object.prototype.hasOwnProperty,tL=Object.prototype.propertyIsEnumerable,Dy=(t,e,r)=>e in t?QF(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l8=(t,e)=>{for(var r in e||(e={}))eL.call(e,r)&&Dy(t,r,e[r]);if(Iy)for(var r of Iy(e))tL.call(e,r)&&Dy(t,r,e[r]);return t},Fu=t=>typeof t=="function",Lu=t=>typeof t=="string",u8=t=>Lu(t)&&t.trim().length>0,rL=t=>typeof t=="number",vo=t=>typeof t>"u",h0=t=>typeof t=="object"&&t!==null,nL=t=>Ti(t,"tag")&&u8(t.tag),d8=t=>window.TouchEvent&&t instanceof TouchEvent,h8=t=>Ti(t,"component")&&p8(t.component),iL=t=>Fu(t)||h0(t),p8=t=>!vo(t)&&(Lu(t)||iL(t)||h8(t)),Oy=t=>h0(t)&&["height","width","right","left","top","bottom"].every(e=>rL(t[e])),Ti=(t,e)=>(h0(t)||Fu(t))&&e in t,aL=(t=>()=>t++)(0);function up(t){return d8(t)?t.targetTouches[0].clientX:t.clientX}function Fy(t){return d8(t)?t.targetTouches[0].clientY:t.clientY}var oL=t=>{vo(t.remove)?t.parentNode&&t.parentNode.removeChild(t):t.remove()},K0=t=>h8(t)?K0(t.component):nL(t)?ci({render(){return t}}):typeof t=="string"?t:Mt(go(t)),sL=t=>{if(typeof t=="string")return t;const e=Ti(t,"props")&&h0(t.props)?t.props:{},r=Ti(t,"listeners")&&h0(t.listeners)?t.listeners:{};return{component:K0(t),props:e,listeners:r}},fL=()=>typeof window<"u",em=class{constructor(){this.allHandlers={}}getHandlers(t){return this.allHandlers[t]||[]}on(t,e){const r=this.getHandlers(t);r.push(e),this.allHandlers[t]=r}off(t,e){const r=this.getHandlers(t);r.splice(r.indexOf(e)>>>0,1)}emit(t,e){this.getHandlers(t).forEach(n=>n(e))}},cL=t=>["on","off","emit"].every(e=>Ti(t,e)&&Fu(t[e])),Jt;(function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.INFO="info",t.DEFAULT="default"})(Jt||(Jt={}));var p0;(function(t){t.TOP_LEFT="top-left",t.TOP_CENTER="top-center",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_CENTER="bottom-center",t.BOTTOM_RIGHT="bottom-right"})(p0||(p0={}));var wn;(function(t){t.ADD="add",t.DISMISS="dismiss",t.UPDATE="update",t.CLEAR="clear",t.UPDATE_DEFAULTS="update_defaults"})(wn||(wn={}));var ii="Vue-Toastification",Xn={type:{type:String,default:Jt.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},v8={type:Xn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},zc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Xn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},r1={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},m8={transition:{type:[Object,String],default:`${ii}__bounce`}},lL={position:{type:String,default:p0.TOP_RIGHT},draggable:Xn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Xn.trueBoolean,pauseOnHover:Xn.trueBoolean,closeOnClick:Xn.trueBoolean,timeout:r1.timeout,hideProgressBar:r1.hideProgressBar,toastClassName:Xn.classNames,bodyClassName:Xn.classNames,icon:v8.customIcon,closeButton:zc.component,closeButtonClassName:zc.classNames,showCloseButtonOnHover:zc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new em}},uL={id:{type:[String,Number],required:!0,default:0},type:Xn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},dL={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Xn.trueBoolean,maxToasts:{type:Number,default:20},transition:m8.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:t=>t},filterToasts:{type:Function,default:t=>t},containerClassName:Xn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},Qi={CORE_TOAST:lL,TOAST:uL,CONTAINER:dL,PROGRESS_BAR:r1,ICON:v8,TRANSITION:m8,CLOSE_BUTTON:zc},g8=ci({name:"VtProgressBar",props:Qi.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${ii}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function hL(t,e){return $e(),We("div",{style:v0(t.style),class:oi(t.cpClass)},null,6)}g8.render=hL;var pL=g8,b8=ci({name:"VtCloseButton",props:Qi.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?K0(this.component):"button"},classes(){const t=[`${ii}__close-button`];return this.showOnHover&&t.push("show-on-hover"),t.concat(this.classNames)}}}),vL=Un(" \xD7 ");function mL(t,e){return $e(),sn(S1(t.buttonComponent),Ol({"aria-label":t.ariaLabel,class:t.classes},t.$attrs),{default:ta(()=>[vL]),_:1},16,["aria-label","class"])}b8.render=mL;var gL=b8,y8={},bL={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},yL=ce("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),xL=[yL];function wL(t,e){return $e(),We("svg",bL,xL)}y8.render=wL;var _L=y8,x8={},ML={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},AL=ce("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),EL=[AL];function SL(t,e){return $e(),We("svg",ML,EL)}x8.render=SL;var Ly=x8,w8={},RL={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},CL=ce("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),BL=[CL];function NL(t,e){return $e(),We("svg",RL,BL)}w8.render=NL;var TL=w8,_8={},kL={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},PL=ce("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),IL=[PL];function DL(t,e){return $e(),We("svg",kL,IL)}_8.render=DL;var OL=_8,M8=ci({name:"VtIcon",props:Qi.ICON,computed:{customIconChildren(){return Ti(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Lu(this.customIcon)?this.trimValue(this.customIcon):Ti(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Ti(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:p8(this.customIcon)?K0(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[Jt.DEFAULT]:Ly,[Jt.INFO]:Ly,[Jt.SUCCESS]:_L,[Jt.ERROR]:OL,[Jt.WARNING]:TL}[this.type]},iconClasses(){const t=[`${ii}__icon`];return this.hasCustomIcon?t.concat(this.customIconClass):t}},methods:{trimValue(t,e=""){return u8(t)?t.trim():e}}});function FL(t,e){return $e(),sn(S1(t.component),{class:oi(t.iconClasses)},{default:ta(()=>[Un(rn(t.customIconChildren),1)]),_:1},8,["class"])}M8.render=FL;var LL=M8,A8=ci({name:"VtToast",components:{ProgressBar:pL,CloseButton:gL,Icon:LL},inheritAttrs:!1,props:Object.assign({},Qi.CORE_TOAST,Qi.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const t=[`${ii}__toast`,`${ii}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&t.push("disable-transition"),this.rtl&&t.push(`${ii}__toast--rtl`),t},bodyClasses(){return[`${ii}__toast-${Lu(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Oy(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Ti,getVueComponentFromObj:K0,closeToast(){this.eventBus.emit(wn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const t=this.$el;t.addEventListener("touchstart",this.onDragStart,{passive:!0}),t.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const t=this.$el;t.removeEventListener("touchstart",this.onDragStart),t.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(t){this.beingDragged=!0,this.dragPos={x:up(t),y:Fy(t)},this.dragStart=up(t),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(t){this.beingDragged&&(t.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:up(t),y:Fy(t)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Oy(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),UL=["role"];function KL(t,e){const r=Zr("Icon"),n=Zr("CloseButton"),s=Zr("ProgressBar");return $e(),We("div",{class:oi(t.classes),style:v0(t.draggableStyle),onClick:e[0]||(e[0]=(...i)=>t.clickHandler&&t.clickHandler(...i)),onMouseenter:e[1]||(e[1]=(...i)=>t.hoverPause&&t.hoverPause(...i)),onMouseleave:e[2]||(e[2]=(...i)=>t.hoverPlay&&t.hoverPlay(...i))},[t.icon?($e(),sn(r,{key:0,"custom-icon":t.icon,type:t.type},null,8,["custom-icon","type"])):zt("v-if",!0),ce("div",{role:t.accessibility.toastRole||"alert",class:oi(t.bodyClasses)},[typeof t.content=="string"?($e(),We(tr,{key:0},[Un(rn(t.content),1)],2112)):($e(),sn(S1(t.getVueComponentFromObj(t.content)),Ol({key:1,"toast-id":t.id},t.hasProp(t.content,"props")?t.content.props:{},v9(t.hasProp(t.content,"listeners")?t.content.listeners:{}),{onCloseToast:t.closeToast}),null,16,["toast-id","onCloseToast"]))],10,UL),t.closeButton?($e(),sn(n,{key:1,component:t.closeButton,"class-names":t.closeButtonClassName,"show-on-hover":t.showCloseButtonOnHover,"aria-label":t.accessibility.closeButtonLabel,onClick:S7(t.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):zt("v-if",!0),t.timeout?($e(),sn(s,{key:2,"is-running":t.isRunning,"hide-progress-bar":t.hideProgressBar,timeout:t.timeout,onCloseToast:t.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):zt("v-if",!0)],38)}A8.render=KL;var $L=A8,E8=ci({name:"VtTransition",props:Qi.TRANSITION,emits:["leave"],methods:{hasProp:Ti,leave(t){t instanceof HTMLElement&&(t.style.left=t.offsetLeft+"px",t.style.top=t.offsetTop+"px",t.style.width=getComputedStyle(t).width,t.style.position="absolute")}}});function qL(t,e){return $e(),sn(b7,{tag:"div","enter-active-class":t.transition.enter?t.transition.enter:`${t.transition}-enter-active`,"move-class":t.transition.move?t.transition.move:`${t.transition}-move`,"leave-active-class":t.transition.leave?t.transition.leave:`${t.transition}-leave-active`,onLeave:t.leave},{default:ta(()=>[Zc(t.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}E8.render=qL;var HL=E8,S8=ci({name:"VueToastification",devtools:{hide:!0},components:{Toast:$L,VtTransition:HL},props:Object.assign({},Qi.CORE_TOAST,Qi.CONTAINER,Qi.TRANSITION),data(){return{count:0,positions:Object.values(p0),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const t=this.eventBus;t.on(wn.ADD,this.addToast),t.on(wn.CLEAR,this.clearToasts),t.on(wn.DISMISS,this.dismissToast),t.on(wn.UPDATE,this.updateToast),t.on(wn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(t){Fu(t)&&(t=await t()),oL(this.$el),t.appendChild(this.$el)},setToast(t){vo(t.id)||(this.toasts[t.id]=t)},addToast(t){t.content=sL(t.content);const e=Object.assign({},this.defaults,t.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[t.type],t),r=this.defaults.filterBeforeCreate(e,this.toastArray);r&&this.setToast(r)},dismissToast(t){const e=this.toasts[t];!vo(e)&&!vo(e.onClose)&&e.onClose(),delete this.toasts[t]},clearToasts(){Object.keys(this.toasts).forEach(t=>{this.dismissToast(t)})},getPositionToasts(t){const e=this.filteredToasts.filter(r=>r.position===t).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(t){vo(t.container)||this.setup(t.container),this.defaults=Object.assign({},this.defaults,t)},updateToast({id:t,options:e,create:r}){this.toasts[t]?(e.timeout&&e.timeout===this.toasts[t].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[t],e))):r&&this.addToast(Object.assign({},{id:t},e))},getClasses(t){return[`${ii}__container`,t].concat(this.defaults.containerClassName)}}});function zL(t,e){const r=Zr("Toast"),n=Zr("VtTransition");return $e(),We("div",null,[($e(!0),We(tr,null,Ao(t.positions,s=>($e(),We("div",{key:s},[Wt(n,{transition:t.defaults.transition,class:oi(t.getClasses(s))},{default:ta(()=>[($e(!0),We(tr,null,Ao(t.getPositionToasts(s),i=>($e(),sn(r,Ol({key:i.id},i),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}S8.render=zL;var jL=S8,Uy=(t={},e=!0)=>{const r=t.eventBus=t.eventBus||new em;e&&Rs(()=>{const i=t6(jL,l8({},t)),u=i.mount(document.createElement("div")),v=t.onMounted;if(vo(v)||v(u,i),t.shareAppContext){const b=t.shareAppContext;b===!0?console.warn(`[${ii}] App to share context with was not provided.`):(i._context.components=b._context.components,i._context.directives=b._context.directives,i._context.mixins=b._context.mixins,i._context.provides=b._context.provides,i.config.globalProperties=b.config.globalProperties)}});const n=(i,u)=>{const v=Object.assign({},{id:aL(),type:Jt.DEFAULT},u,{content:i});return r.emit(wn.ADD,v),v.id};n.clear=()=>r.emit(wn.CLEAR,void 0),n.updateDefaults=i=>{r.emit(wn.UPDATE_DEFAULTS,i)},n.dismiss=i=>{r.emit(wn.DISMISS,i)};function s(i,{content:u,options:v},b=!1){const m=Object.assign({},v,{content:u});r.emit(wn.UPDATE,{id:i,options:m,create:b})}return n.update=s,n.success=(i,u)=>n(i,Object.assign({},u,{type:Jt.SUCCESS})),n.info=(i,u)=>n(i,Object.assign({},u,{type:Jt.INFO})),n.error=(i,u)=>n(i,Object.assign({},u,{type:Jt.ERROR})),n.warning=(i,u)=>n(i,Object.assign({},u,{type:Jt.WARNING})),n},GL=()=>{const t=()=>console.warn(`[${ii}] This plugin does not support SSR!`);return new Proxy(t,{get(){return t}})};function n1(t){return fL()?cL(t)?Uy({eventBus:t},!1):Uy(t,!0):GL()}var R8=Symbol("VueToastification"),C8=new em,VL=(t,e)=>{e?.shareAppContext===!0&&(e.shareAppContext=t);const r=n1(l8({eventBus:C8},e));t.provide(R8,r)},B8=t=>{if(t)return n1(t);const e=Fl()?_n(R8,void 0):void 0;return e||n1(C8)},WL=VL;const ZL={name:"PaymentLink",computed:{getPaymentLink(){return"https://send2.name/?to="+this.userStore.getDefaultDomain}},methods:{copyToClipboard(t){navigator.clipboard.writeText(t),this.toast("Payment link copied to your clipboard!",{type:Jt.SUCCESS})}},setup(){const{isActivated:t}=An(),e=Pu(),r=B8();return{isActivated:t,toast:r,userStore:e}}},JL={key:0,class:"d-flex justify-content-center"},XL={class:"card text-white bg-primary mb-3 send-tokens-card"},YL={class:"card-body text-center"},QL={class:"input-group mb-3"},eU=["value"],tU=ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-clipboard",viewBox:"0 0 16 16"},[ce("path",{d:"M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"}),ce("path",{d:"M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"})],-1),rU=[tU];function nU(t,e,r,n,s,i){return n.userStore.getDefaultDomain?($e(),We("div",JL,[ce("div",XL,[ce("div",YL,[ce("button",{class:"btn btn-primary text-uppercase mb-3",onClick:e[0]||(e[0]=u=>i.copyToClipboard(i.getPaymentLink))}," Your payment link "),ce("div",QL,[ce("input",{type:"text",class:"form-control text-center set-cursor-pointer","aria-describedby":"button-payment-link",value:i.getPaymentLink,onClick:e[1]||(e[1]=u=>i.copyToClipboard(i.getPaymentLink)),readonly:""},null,8,eU),ce("button",{class:"btn btn-dark",type:"button",id:"button-payment-link",onClick:e[2]||(e[2]=u=>i.copyToClipboard(i.getPaymentLink))},rU)])])])])):zt("",!0)}const iU=Ko(ZL,[["render",nU]]),aU={name:"WaitingToast",props:["text"]},oU=ce("span",{class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},null,-1),sU={class:"mx-2"};function fU(t,e,r,n,s,i){return $e(),We("div",null,[oU,ce("span",sU,rn(r.text),1)])}const Ky=Ko(aU,[["render",fU]]),cU={name:"SendTokens",data(){return{filterNetwork:null,filterTokens:null,receiver:null,receiverAddress:null,tokenBalance:0,selectedToken:null,selectedTokenDecimals:null,tokenAmount:null,waiting:!1}},created(){this.setData(),this.receiver=this.$route.query.to},computed:{domainLowerCase(){return this.receiver?this.receiver.toLowerCase():null},formatTokenBalance(){return this.tokenBalance>100?Number(this.tokenBalance).toFixed(2):Number(this.tokenBalance).toFixed(4)},getNetworks(){const t=this.getSupportedChains();return this.filterNetwork?t.filter(e=>e.includes(this.filterNetwork.toUpperCase())):t},getTokenNames(){if(this.getTokens&&!this.filterTokens)return Object.keys(this.getTokens);if(this.getTokens&&this.filterTokens)return Object.keys(this.getTokens).filter(t=>t.includes(this.filterTokens.toUpperCase()))},getTokens(){return this.chainId?Xp[String(this.chainId)]:[]},notValid(){if(this.receiver)if(this.receiver.includes(".")){if(this.receiver.includes(" "))return!0;if(this.receiver.includes("%"))return!0;if(this.receiver.includes("&"))return!0;if(this.receiver.includes("?"))return!0;if(this.receiver.includes("#"))return!0;if(this.receiver.includes("/"))return!0;if(this.tokenAmount){if(isNaN(this.tokenAmount))return!0;if(Number(this.tokenAmount)<=0)return!0;if(Number(this.tokenAmount)>Number(this.tokenBalance))return!0}else return!0}else return!0;else return!0;return!1}},methods:{changeNetwork(t){this.switchOrAddChain(window.ethereum,t)},async getTokenBalance(t){const e=this.getTokens[t];if(e==="0x0")this.tokenBalance=iv(this.balance);else{const r=new ra(Yp),n=new _s(e,r,this.signer),s=await n.balanceOf(this.address);if(Number(s)>0){const i=await n.decimals();this.selectedTokenDecimals=Number(i),this.tokenBalance=Xl(s,this.selectedTokenDecimals)}else this.tokenBalance=0}},selectToken(t){this.selectedToken=t,this.getTokenBalance(t)},setData(){this.getTokens&&(this.selectedToken=Object.keys(this.getTokens)[0],this.isActivated&&this.getTokenBalance(this.selectedToken))},async send(){this.waiting=!0;try{const t=await this.getDomainHolder(this.receiver);if(!t||t===A6){this.toast("This name does not have an owner. Sending aborted.",{type:Jt.ERROR}),this.waiting=!1;return}if(t.toLowerCase()===this.address.toLowerCase()){this.toast("The receiver name is yours. You cannot send tokens to yourself.",{type:Jt.ERROR}),this.waiting=!1;return}this.receiverAddress=t,this.getTokens[this.selectedToken]==="0x0"?this.sendNativeTokens():this.sendErc20Tokens()}catch(t){console.log(t),this.toast(t.message,{type:Jt.ERROR}),this.waiting=!1;return}},async sendErc20Tokens(){try{const t=this.selectedToken,e=this.tokenAmount,r=this.receiver,n=nv(e,this.selectedTokenDecimals),s=this.getTokens[t],i=new ra(Yp),v=await new _s(s,i,this.signer).transfer(this.receiverAddress,n),b=this.toast({component:Ky,props:{text:"Please wait for your transaction to confirm. Click on this notification to see transaction in the block explorer."}},{type:Jt.INFO,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+v.hash,"_blank").focus()}),m=await v.wait();m.status===1?(this.toast.dismiss(b),this.toast("You have successfully sent "+e+" "+t+" to "+r+"!",{type:Jt.SUCCESS,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+v.hash,"_blank").focus()}),this.waiting=!1,this.getTokenBalance(t),this.$gtag.event("send-tokens-success")):(this.toast.dismiss(b),this.toast("Transaction has failed.",{type:Jt.ERROR,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+v.hash,"_blank").focus()}),console.log(m),this.waiting=!1)}catch(t){this.waiting=!1,console.log(t),this.toast(t.message,{type:Jt.ERROR})}},async sendNativeTokens(){this.waiting=!0;try{const t=this.selectedToken,e=this.tokenAmount,r=this.receiver,n=Ux(e),s=await this.signer.sendTransaction({to:this.receiverAddress,value:n}),i=this.toast({component:Ky,props:{text:"Please wait for your transaction to confirm. Click on this notification to see transaction in the block explorer."}},{type:Jt.INFO,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+s.hash,"_blank").focus()}),u=await s.wait();u.status===1?(this.toast.dismiss(i),this.toast("You have successfully sent "+e+" "+t+" to "+r+"!",{type:Jt.SUCCESS,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+s.hash,"_blank").focus()}),this.waiting=!1,this.getTokenBalance(t),this.$gtag.event("send-tokens-success")):(this.toast.dismiss(i),this.toast("Transaction has failed.",{type:Jt.ERROR,onClick:()=>window.open(this.getBlockExplorerBaseUrl(this.chainId)+"/tx/"+s.hash,"_blank").focus()}),console.log(u),this.waiting=!1)}catch(t){this.waiting=!1,console.log(t),this.toast(t.message,{type:Jt.ERROR})}}},setup(){const{open:t}=ov(),{address:e,balance:r,chainId:n,isActivated:s,signer:i}=An(),{getBlockExplorerBaseUrl:u,getChainName:v,getSupportedChains:b,switchOrAddChain:m}=vv(),{getDomainHolder:g}=Y5(),_=B8();return{address:e,balance:r,chainId:n,getBlockExplorerBaseUrl:u,getChainName:v,getDomainHolder:g,getSupportedChains:b,isActivated:s,open:t,signer:i,switchOrAddChain:m,toast:_}},watch:{address(){this.setData()},chainId(){this.setData()},isActivated(){this.setData()}}},lU={class:"d-flex justify-content-center"},uU={class:"card text-white bg-primary send-tokens-card"},dU={class:"card-body text-center"},hU={key:0,class:"btn btn-primary",type:"button","data-bs-toggle":"modal","data-bs-target":"#connectModal"},pU={key:1,class:"btn btn-primary dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},vU={key:0},mU={class:"dropdown-menu p-2 dropdown-menu-end"},gU={class:"mb-3"},bU=["onClick"],yU={class:"mt-4"},xU={class:"input-group mt-3"},wU={class:"btn btn-dark dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},_U={class:"dropdown-menu p-2 dropdown-menu-end"},MU={class:"mb-3"},AU=["onClick"],EU=["disabled"],SU={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},RU={key:3,class:"btn btn-lg btn-dark mt-4 mb-2","data-bs-toggle":"modal","data-bs-target":"#connectModal"};function CU(t,e,r,n,s,i){return $e(),We("div",lU,[ce("div",uU,[ce("div",dU,[n.isActivated?zt("",!0):($e(),We("button",hU," Connect wallet ")),n.isActivated?($e(),We("button",pU,[n.getChainName(n.chainId).toLowerCase().startsWith("unsupported")?zt("",!0):($e(),We("span",vU,"SEND ON ")),Un(" "+rn(n.getChainName(n.chainId)),1)])):zt("",!0),ce("div",mU,[ce("div",gU,[ss(ce("input",{class:"form-control mb-2",placeholder:"Find network","onUpdate:modelValue":e[0]||(e[0]=u=>s.filterNetwork=u)},null,512),[[Sf,s.filterNetwork]]),ce("li",null,[($e(!0),We(tr,null,Ao(i.getNetworks,u=>($e(),We("button",{class:"dropdown-item",type:"button",key:u,onClick:v=>i.changeNetwork(u)},"SWITCH TO "+rn(u),9,bU))),128))])])]),ce("div",yU,[ss(ce("input",{"onUpdate:modelValue":e[1]||(e[1]=u=>s.receiver=u),class:"form-control form-control-lg text-center",placeholder:"Receiver's domain name"},null,512),[[Sf,s.receiver]])]),ce("div",xU,[ss(ce("input",{type:"text",class:"form-control form-control-lg text-end","onUpdate:modelValue":e[2]||(e[2]=u=>s.tokenAmount=u),placeholder:"0.0"},null,512),[[Sf,s.tokenAmount]]),ce("button",wU,rn(s.selectedToken),1),ce("div",_U,[ce("div",MU,[ss(ce("input",{class:"form-control mb-2",placeholder:"Filter tokens","onUpdate:modelValue":e[3]||(e[3]=u=>s.filterTokens=u)},null,512),[[Sf,s.filterTokens]]),ce("li",null,[($e(!0),We(tr,null,Ao(i.getTokenNames,u=>($e(),We("button",{class:"dropdown-item",type:"button",key:u,onClick:v=>i.selectToken(u)},rn(u),9,AU))),128))])])])]),ce("div",null,[ce("small",null,[Un(" Balance: "),ce("span",{id:"balance",onClick:e[4]||(e[4]=u=>s.tokenAmount=s.tokenBalance)},rn(i.formatTokenBalance)+" "+rn(s.selectedToken),1)])]),n.isActivated?($e(),We("button",{key:2,class:"btn btn-lg btn-dark mt-4 mb-2",disabled:i.notValid||s.waiting,onClick:e[5]||(e[5]=(...u)=>i.send&&i.send(...u))},[s.waiting?($e(),We("span",SU)):zt("",!0),Un(" Send tokens ")],8,EU)):zt("",!0),n.isActivated?zt("",!0):($e(),We("button",RU," Connect wallet "))])])])}const BU=Ko(cU,[["render",CU]]),NU={name:"Home",components:{Balance:YF,PaymentLink:iU,SendTokens:BU},setup(){}};function TU(t,e,r,n,s,i){const u=Zr("SendTokens"),v=Zr("Balance"),b=Zr("PaymentLink");return $e(),We(tr,null,[Wt(u),Wt(v),Wt(b)],64)}const kU=Ko(NU,[["render",TU]]),PU=[{path:"/",name:"Home",component:kU},{path:"/:pathMatch(.*)*",name:"404",component:()=>o6(()=>import("./Error404.f0a0f48e.js"),[])}],IU=qF({history:iF(),routes:PU});function i1(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function a1(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(n,s){if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");if(u.async=!0,u.src=e,u.defer=r.defer,r.preconnectOrigin){var v=document.createElement("link");v.href=r.preconnectOrigin,v.rel="preconnect",i.appendChild(v)}i.appendChild(u),u.onload=n,u.onerror=s}})},OU=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s"u"||typeof document>"u")},qy=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;$0()},FU=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return qy('Missing "appName" property inside the plugin options.',e.app_name==null),qy('Missing "name" property in the route.',e.screen_name==null),e};function LU(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.split("/"),n=e.split("/");return r[0]===""&&e[e.length-1]==="/"&&r.shift(),n.join("/")+r.join("/")}var UU=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},N8={},KU=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=UU();N8=OU(r,e)},Cn=function(){return N8},To=function(){var t,e=Cn(),r=e.globalObjectName;!$0()||typeof window[r]>"u"||(t=window)[r].apply(t,arguments)},tm=function(){for(var t=arguments.length,e=new Array(t),r=0;r0&&arguments[0]!==void 0?arguments[0]:!0,e=Cn(),r=e.config,n=e.includes;Hy(r.id,t),Array.isArray(n)&&n.forEach(function(s){return Hy(s.id,t)})},k8=function(){T8(!0)},$U=function(){T8(!1)},P8,qU=function(e){P8=e},rm=function(){return P8},$o=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Cn(),n=r.includes,s=r.defaultGroupName;e.send_to==null&&Array.isArray(n)&&n.length&&(e.send_to=n.map(function(i){return i.id}).concat(s)),To("event",t,e)},I8=function(t){if(!!$0()){var e;if(typeof t=="string")e={page_path:t};else if(t.path||t.fullPath){var r=Cn(),n=r.pageTrackerUseFullPath,s=r.pageTrackerPrependBase,i=rm(),u=i&&i.options.base,v=n?t.fullPath:t.path;e=a1(a1({},t.name&&{page_title:t.name}),{},{page_path:s?LU(v,u):v})}else e=t;e.page_location==null&&(e.page_location=window.location.href),e.send_page_view==null&&(e.send_page_view=!0),$o("page_view",e)}},D8=function(t){var e=Cn(),r=e.appName;if(!!t){var n;typeof t=="string"?n={screen_name:t}:n=t,n.app_name=n.app_name||r,$o("screen_view",n)}},HU=function(){for(var t=arguments.length,e=new Array(t),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Cn(),n=r.appName,s=r.pageTrackerTemplate,i=r.pageTrackerScreenviewEnabled,u=r.pageTrackerSkipSamePath;if(!(u&&t.path===e.path)){var v=t;if(st(s)?v=s(t,e):i&&(v=FU({app_name:n,screen_name:t.name})),i){D8(v);return}I8(v)}},Gy=function(e){var r=Cn(),n=r.pageTrackerExcludedRoutes;return n.includes(e.path)||n.includes(e.name)},QU=function(){var t=Cn(),e=t.onBeforeTrack,r=t.onAfterTrack,n=rm();n.isReady().then(function(){Rs().then(function(){var s=n.currentRoute;O8(),!Gy(s.value)&&jy(s.value)}),n.afterEach(function(s,i){Rs().then(function(){Gy(s)||(st(e)&&e(s,i),jy(s,i),st(r)&&r(s,i))})})})},eK=function(){var t=Cn(),e=t.onReady,r=t.onError,n=t.globalObjectName,s=t.globalDataLayerName,i=t.config,u=t.customResourceURL,v=t.customPreconnectOrigin,b=t.deferScriptLoad,m=t.pageTrackerEnabled,g=t.disableScriptLoad,_=Boolean(m&&rm());if(YU(),_?QU():O8(),!g)return DU("".concat(u,"?id=").concat(i.id,"&l=").concat(s),{preconnectOrigin:v,defer:b}).then(function(){e&&e(window[n])}).catch(function(A){return r&&r(A),A})},tK=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;XU(e),KU(r),qU(n),Cn().bootstrap&&eK()};const rK=T7(),nf=t6(KO),nK={timeout:5e3,hideProgressBar:!0,closeButton:"button",position:p0.TOP_LEFT,closeOnClick:!1,toastDefaults:{[Jt.INFO]:{timeout:!1,icon:!1}}};nf.use(WL,nK);nf.use(tK,{config:{id:"G-MXWJ4EGXD9",params:{anonymize_ip:!0}}});nf.use(IU);nf.use(rK);nf.use(PC,{});nf.mount("#app");export{ce as a,go as b,We as c,ci as d,He as e,yv as f,M0 as g,ue as h,Je as i,gr as j,wv as k,_v as l,m0 as m,iK as n,$e as o,hl as r,aK as u}; diff --git a/assets/index.416cabcd.js b/assets/index.edbf2f79.js similarity index 99% rename from assets/index.416cabcd.js rename to assets/index.edbf2f79.js index 528b31e..61007fb 100644 --- a/assets/index.416cabcd.js +++ b/assets/index.edbf2f79.js @@ -1,4 +1,4 @@ -import{e as buffer$1,r as readableBrowser,f as util$5,g as events,h as commonjsGlobal,i as browser,j as getAugmentedNamespace,k as getIntrinsic,l as callBound$1,m as bn,n as getDefaultExportFromCjs}from"./index.43ab1cac.js";function _mergeNamespaces(D,E){for(var W=0;WU[Q]})}}}return Object.freeze(Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}))}const{Transform:Transform$1}=readableBrowser.exports;var keccak$2=D=>class Jt extends Transform$1{constructor(W,U,Q,G,J){super(J),this._rate=W,this._capacity=U,this._delimitedSuffix=Q,this._hashBitLength=G,this._options=J,this._state=new D,this._state.initialize(W,U),this._finalized=!1}_transform(W,U,Q){let G=null;try{this.update(W,U)}catch(J){G=J}Q(G)}_flush(W){let U=null;try{this.push(this.digest())}catch(Q){U=Q}W(U)}update(W,U){if(!buffer$1.Buffer.isBuffer(W)&&typeof W!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return buffer$1.Buffer.isBuffer(W)||(W=buffer$1.Buffer.from(W,U)),this._state.absorb(W),this}digest(W){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let U=this._state.squeeze(this._hashBitLength/8);return W!==void 0&&(U=U.toString(W)),this._resetState(),U}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const W=new Jt(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(W._state),W._finalized=this._finalized,W}};const{Transform}=readableBrowser.exports;var shake=D=>class Yt extends Transform{constructor(W,U,Q,G){super(G),this._rate=W,this._capacity=U,this._delimitedSuffix=Q,this._options=G,this._state=new D,this._state.initialize(W,U),this._finalized=!1}_transform(W,U,Q){let G=null;try{this.update(W,U)}catch(J){G=J}Q(G)}_flush(){}_read(W){this.push(this.squeeze(W))}update(W,U){if(!buffer$1.Buffer.isBuffer(W)&&typeof W!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return buffer$1.Buffer.isBuffer(W)||(W=buffer$1.Buffer.from(W,U)),this._state.absorb(W),this}squeeze(W,U){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let Q=this._state.squeeze(W);return U!==void 0&&(Q=Q.toString(U)),Q}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const W=new Yt(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(W._state),W._finalized=this._finalized,W}};const createKeccak=keccak$2,createShake=shake;var api=function(D){const E=createKeccak(D),W=createShake(D);return function(U,Q){switch(typeof U=="string"?U.toLowerCase():U){case"keccak224":return new E(1152,448,null,224,Q);case"keccak256":return new E(1088,512,null,256,Q);case"keccak384":return new E(832,768,null,384,Q);case"keccak512":return new E(576,1024,null,512,Q);case"sha3-224":return new E(1152,448,6,224,Q);case"sha3-256":return new E(1088,512,6,256,Q);case"sha3-384":return new E(832,768,6,384,Q);case"sha3-512":return new E(576,1024,6,512,Q);case"shake128":return new W(1344,256,31,Q);case"shake256":return new W(1088,512,31,Q);default:throw new Error("Invald algorithm: "+U)}}},keccakStateUnroll={};const P1600_ROUND_CONSTANTS=[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];keccakStateUnroll.p1600=function(D){for(let E=0;E<24;++E){const W=D[0]^D[10]^D[20]^D[30]^D[40],U=D[1]^D[11]^D[21]^D[31]^D[41],Q=D[2]^D[12]^D[22]^D[32]^D[42],G=D[3]^D[13]^D[23]^D[33]^D[43],J=D[4]^D[14]^D[24]^D[34]^D[44],Y=D[5]^D[15]^D[25]^D[35]^D[45],X=D[6]^D[16]^D[26]^D[36]^D[46],ee=D[7]^D[17]^D[27]^D[37]^D[47],Z=D[8]^D[18]^D[28]^D[38]^D[48],ne=D[9]^D[19]^D[29]^D[39]^D[49];let te=Z^(Q<<1|G>>>31),re=ne^(G<<1|Q>>>31);const oe=D[0]^te,be=D[1]^re,fe=D[10]^te,ue=D[11]^re,de=D[20]^te,le=D[21]^re,ye=D[30]^te,Ee=D[31]^re,ve=D[40]^te,Se=D[41]^re;te=W^(J<<1|Y>>>31),re=U^(Y<<1|J>>>31);const Re=D[2]^te,xe=D[3]^re,_e=D[12]^te,Ce=D[13]^re,we=D[22]^te,ie=D[23]^re,se=D[32]^te,ae=D[33]^re,ce=D[42]^te,pe=D[43]^re;te=Q^(X<<1|ee>>>31),re=G^(ee<<1|X>>>31);const he=D[4]^te,ge=D[5]^re,$e=D[14]^te,Ie=D[15]^re,me=D[24]^te,Me=D[25]^re,Ae=D[34]^te,ke=D[35]^re,Oe=D[44]^te,Te=D[45]^re;te=J^(Z<<1|ne>>>31),re=Y^(ne<<1|Z>>>31);const Ne=D[6]^te,At=D[7]^re,Ot=D[16]^te,Tt=D[17]^re,Nt=D[26]^te,Ft=D[27]^re,Dt=D[36]^te,Lt=D[37]^re,Pt=D[46]^te,jt=D[47]^re;te=X^(W<<1|U>>>31),re=ee^(U<<1|W>>>31);const Bt=D[8]^te,Wt=D[9]^re,Ht=D[18]^te,Ut=D[19]^re,zt=D[28]^te,Qt=D[29]^re,Vt=D[38]^te,qt=D[39]^re,Gt=D[48]^te,Kt=D[49]^re,Fe=oe,De=be,Le=ue<<4|fe>>>28,Pe=fe<<4|ue>>>28,je=de<<3|le>>>29,Be=le<<3|de>>>29,We=Ee<<9|ye>>>23,He=ye<<9|Ee>>>23,Ue=ve<<18|Se>>>14,ze=Se<<18|ve>>>14,Qe=Re<<1|xe>>>31,Ve=xe<<1|Re>>>31,qe=Ce<<12|_e>>>20,Ge=_e<<12|Ce>>>20,Ke=we<<10|ie>>>22,Je=ie<<10|we>>>22,Ye=ae<<13|se>>>19,Xe=se<<13|ae>>>19,Ze=ce<<2|pe>>>30,et=pe<<2|ce>>>30,tt=ge<<30|he>>>2,rt=he<<30|ge>>>2,nt=$e<<6|Ie>>>26,it=Ie<<6|$e>>>26,st=Me<<11|me>>>21,ot=me<<11|Me>>>21,at=Ae<<15|ke>>>17,ct=ke<<15|Ae>>>17,ut=Te<<29|Oe>>>3,lt=Oe<<29|Te>>>3,ht=Ne<<28|At>>>4,ft=At<<28|Ne>>>4,dt=Tt<<23|Ot>>>9,pt=Ot<<23|Tt>>>9,bt=Nt<<25|Ft>>>7,_t=Ft<<25|Nt>>>7,gt=Dt<<21|Lt>>>11,yt=Lt<<21|Dt>>>11,mt=jt<<24|Pt>>>8,vt=Pt<<24|jt>>>8,St=Bt<<27|Wt>>>5,wt=Wt<<27|Bt>>>5,Et=Ht<<20|Ut>>>12,xt=Ut<<20|Ht>>>12,Rt=Qt<<7|zt>>>25,$t=zt<<7|Qt>>>25,Ct=Vt<<8|qt>>>24,kt=qt<<8|Vt>>>24,Mt=Gt<<14|Kt>>>18,It=Kt<<14|Gt>>>18;D[0]=Fe^~qe&st,D[1]=De^~Ge&ot,D[10]=ht^~Et&je,D[11]=ft^~xt&Be,D[20]=Qe^~nt&bt,D[21]=Ve^~it&_t,D[30]=St^~Le&Ke,D[31]=wt^~Pe&Je,D[40]=tt^~dt&Rt,D[41]=rt^~pt&$t,D[2]=qe^~st>,D[3]=Ge^~ot&yt,D[12]=Et^~je&Ye,D[13]=xt^~Be&Xe,D[22]=nt^~bt&Ct,D[23]=it^~_t&kt,D[32]=Le^~Ke&at,D[33]=Pe^~Je&ct,D[42]=dt^~Rt&We,D[43]=pt^~$t&He,D[4]=st^~gt&Mt,D[5]=ot^~yt&It,D[14]=je^~Ye&ut,D[15]=Be^~Xe<,D[24]=bt^~Ct&Ue,D[25]=_t^~kt&ze,D[34]=Ke^~at&mt,D[35]=Je^~ct&vt,D[44]=Rt^~We&Ze,D[45]=$t^~He&et,D[6]=gt^~Mt&Fe,D[7]=yt^~It&De,D[16]=Ye^~ut&ht,D[17]=Xe^~lt&ft,D[26]=Ct^~Ue&Qe,D[27]=kt^~ze&Ve,D[36]=at^~mt&St,D[37]=ct^~vt&wt,D[46]=We^~Ze&tt,D[47]=He^~et&rt,D[8]=Mt^~Fe&qe,D[9]=It^~De&Ge,D[18]=ut^~ht&Et,D[19]=lt^~ft&xt,D[28]=Ue^~Qe&nt,D[29]=ze^~Ve&it,D[38]=mt^~St&Le,D[39]=vt^~wt&Pe,D[48]=Ze^~tt&dt,D[49]=et^~rt&pt,D[0]^=P1600_ROUND_CONSTANTS[E*2],D[1]^=P1600_ROUND_CONSTANTS[E*2+1]}};const keccakState=keccakStateUnroll;function Keccak(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Keccak.prototype.initialize=function(D,E){for(let W=0;W<50;++W)this.state[W]=0;this.blockSize=D/8,this.count=0,this.squeezing=!1};Keccak.prototype.absorb=function(D){for(let E=0;E>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(keccakState.p1600(this.state),this.count=0);return E};Keccak.prototype.copy=function(D){for(let E=0;E<50;++E)D.state[E]=this.state[E];D.blockSize=this.blockSize,D.count=this.count,D.squeezing=this.squeezing};var keccak$1=Keccak,js=api(keccak$1);const processFn$1=(D,E)=>function(){const W=E.promiseModule,U=new Array(arguments.length);for(let Q=0;Q{E.errorFirst?U.push(function(J,Y){if(E.multiArgs){const X=new Array(arguments.length-1);for(let ee=1;ee{E=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},E);const W=Q=>{const G=J=>typeof J=="string"?Q===J:J.test(Q);return E.include?E.include.some(G):!E.exclude.some(G)};let U;typeof D=="function"?U=function(){return E.excludeMain?D.apply(this,arguments):processFn$1(D,E).apply(this,arguments)}:U=Object.create(Object.getPrototypeOf(D));for(const Q in D){const G=D[Q];U[Q]=typeof G=="function"&&W(Q)?processFn$1(G,E):G}return U},immutable=extend$1,hasOwnProperty=Object.prototype.hasOwnProperty;function extend$1(){for(var D={},E=0;E0&&(G=E[0]),G instanceof Error)throw G;var J=new Error("Unhandled error."+(G?" ("+G.message+")":""));throw J.context=G,J}var Y=Q[D];if(Y===void 0)return!1;if(typeof Y=="function")safeApply$1(Y,this,E);else for(var X=Y.length,ee=arrayClone$1(Y,X),W=0;W{throw U})}}function arrayClone$1(D,E){for(var W=new Array(E),U=0;UD+E,blockTrackerEvents=["sync","latest"];class BaseBlockTracker$1 extends SafeEventEmitter$3{constructor(E={}){super(),this._blockResetDuration=E.blockResetDuration||20*sec$1,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(W=>this.once("latest",W))}removeAllListeners(E){E?super.removeAllListeners(E):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(E,W){!blockTrackerEvents.includes(E)||this._maybeStart()}_onRemoveListener(E,W){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){!this._isRunning||(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return blockTrackerEvents.map(E=>this.listenerCount(E)).reduce(calculateSum)}_newPotentialLatest(E){const W=this._currentBlock;W&&hexToInt$4(E)<=hexToInt$4(W)||this._setCurrentBlock(E)}_setCurrentBlock(E){const W=this._currentBlock;this._currentBlock=E,this.emit("latest",E),this.emit("sync",{oldBlock:W,newBlock:E})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}var base=BaseBlockTracker$1;function hexToInt$4(D){return Number.parseInt(D,16)}const pify$2=pify$3,BaseBlockTracker=base,sec=1e3;class PollingBlockTracker$1 extends BaseBlockTracker{constructor(E={}){if(!E.provider)throw new Error("PollingBlockTracker - no provider specified.");const W=E.pollingInterval||20*sec,U=E.retryTimeout||W/10,Q=E.keepEventLoopActive!==void 0?E.keepEventLoopActive:!0,G=E.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:W},E)),this._provider=E.provider,this._pollingInterval=W,this._retryTimeout=U,this._keepEventLoopActive=Q,this._setSkipCacheFlag=G}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch(E=>this.emit("error",E))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await timeout$1(this._pollingInterval,!this._keepEventLoopActive)}catch(E){const W=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: +import{e as buffer$1,r as readableBrowser,f as util$5,g as events,h as commonjsGlobal,i as browser,j as getAugmentedNamespace,k as getIntrinsic,l as callBound$1,m as bn,n as getDefaultExportFromCjs}from"./index.999ce201.js";function _mergeNamespaces(D,E){for(var W=0;WU[Q]})}}}return Object.freeze(Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}))}const{Transform:Transform$1}=readableBrowser.exports;var keccak$2=D=>class Jt extends Transform$1{constructor(W,U,Q,G,J){super(J),this._rate=W,this._capacity=U,this._delimitedSuffix=Q,this._hashBitLength=G,this._options=J,this._state=new D,this._state.initialize(W,U),this._finalized=!1}_transform(W,U,Q){let G=null;try{this.update(W,U)}catch(J){G=J}Q(G)}_flush(W){let U=null;try{this.push(this.digest())}catch(Q){U=Q}W(U)}update(W,U){if(!buffer$1.Buffer.isBuffer(W)&&typeof W!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return buffer$1.Buffer.isBuffer(W)||(W=buffer$1.Buffer.from(W,U)),this._state.absorb(W),this}digest(W){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let U=this._state.squeeze(this._hashBitLength/8);return W!==void 0&&(U=U.toString(W)),this._resetState(),U}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const W=new Jt(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(W._state),W._finalized=this._finalized,W}};const{Transform}=readableBrowser.exports;var shake=D=>class Yt extends Transform{constructor(W,U,Q,G){super(G),this._rate=W,this._capacity=U,this._delimitedSuffix=Q,this._options=G,this._state=new D,this._state.initialize(W,U),this._finalized=!1}_transform(W,U,Q){let G=null;try{this.update(W,U)}catch(J){G=J}Q(G)}_flush(){}_read(W){this.push(this.squeeze(W))}update(W,U){if(!buffer$1.Buffer.isBuffer(W)&&typeof W!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return buffer$1.Buffer.isBuffer(W)||(W=buffer$1.Buffer.from(W,U)),this._state.absorb(W),this}squeeze(W,U){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let Q=this._state.squeeze(W);return U!==void 0&&(Q=Q.toString(U)),Q}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const W=new Yt(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(W._state),W._finalized=this._finalized,W}};const createKeccak=keccak$2,createShake=shake;var api=function(D){const E=createKeccak(D),W=createShake(D);return function(U,Q){switch(typeof U=="string"?U.toLowerCase():U){case"keccak224":return new E(1152,448,null,224,Q);case"keccak256":return new E(1088,512,null,256,Q);case"keccak384":return new E(832,768,null,384,Q);case"keccak512":return new E(576,1024,null,512,Q);case"sha3-224":return new E(1152,448,6,224,Q);case"sha3-256":return new E(1088,512,6,256,Q);case"sha3-384":return new E(832,768,6,384,Q);case"sha3-512":return new E(576,1024,6,512,Q);case"shake128":return new W(1344,256,31,Q);case"shake256":return new W(1088,512,31,Q);default:throw new Error("Invald algorithm: "+U)}}},keccakStateUnroll={};const P1600_ROUND_CONSTANTS=[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];keccakStateUnroll.p1600=function(D){for(let E=0;E<24;++E){const W=D[0]^D[10]^D[20]^D[30]^D[40],U=D[1]^D[11]^D[21]^D[31]^D[41],Q=D[2]^D[12]^D[22]^D[32]^D[42],G=D[3]^D[13]^D[23]^D[33]^D[43],J=D[4]^D[14]^D[24]^D[34]^D[44],Y=D[5]^D[15]^D[25]^D[35]^D[45],X=D[6]^D[16]^D[26]^D[36]^D[46],ee=D[7]^D[17]^D[27]^D[37]^D[47],Z=D[8]^D[18]^D[28]^D[38]^D[48],ne=D[9]^D[19]^D[29]^D[39]^D[49];let te=Z^(Q<<1|G>>>31),re=ne^(G<<1|Q>>>31);const oe=D[0]^te,be=D[1]^re,fe=D[10]^te,ue=D[11]^re,de=D[20]^te,le=D[21]^re,ye=D[30]^te,Ee=D[31]^re,ve=D[40]^te,Se=D[41]^re;te=W^(J<<1|Y>>>31),re=U^(Y<<1|J>>>31);const Re=D[2]^te,xe=D[3]^re,_e=D[12]^te,Ce=D[13]^re,we=D[22]^te,ie=D[23]^re,se=D[32]^te,ae=D[33]^re,ce=D[42]^te,pe=D[43]^re;te=Q^(X<<1|ee>>>31),re=G^(ee<<1|X>>>31);const he=D[4]^te,ge=D[5]^re,$e=D[14]^te,Ie=D[15]^re,me=D[24]^te,Me=D[25]^re,Ae=D[34]^te,ke=D[35]^re,Oe=D[44]^te,Te=D[45]^re;te=J^(Z<<1|ne>>>31),re=Y^(ne<<1|Z>>>31);const Ne=D[6]^te,At=D[7]^re,Ot=D[16]^te,Tt=D[17]^re,Nt=D[26]^te,Ft=D[27]^re,Dt=D[36]^te,Lt=D[37]^re,Pt=D[46]^te,jt=D[47]^re;te=X^(W<<1|U>>>31),re=ee^(U<<1|W>>>31);const Bt=D[8]^te,Wt=D[9]^re,Ht=D[18]^te,Ut=D[19]^re,zt=D[28]^te,Qt=D[29]^re,Vt=D[38]^te,qt=D[39]^re,Gt=D[48]^te,Kt=D[49]^re,Fe=oe,De=be,Le=ue<<4|fe>>>28,Pe=fe<<4|ue>>>28,je=de<<3|le>>>29,Be=le<<3|de>>>29,We=Ee<<9|ye>>>23,He=ye<<9|Ee>>>23,Ue=ve<<18|Se>>>14,ze=Se<<18|ve>>>14,Qe=Re<<1|xe>>>31,Ve=xe<<1|Re>>>31,qe=Ce<<12|_e>>>20,Ge=_e<<12|Ce>>>20,Ke=we<<10|ie>>>22,Je=ie<<10|we>>>22,Ye=ae<<13|se>>>19,Xe=se<<13|ae>>>19,Ze=ce<<2|pe>>>30,et=pe<<2|ce>>>30,tt=ge<<30|he>>>2,rt=he<<30|ge>>>2,nt=$e<<6|Ie>>>26,it=Ie<<6|$e>>>26,st=Me<<11|me>>>21,ot=me<<11|Me>>>21,at=Ae<<15|ke>>>17,ct=ke<<15|Ae>>>17,ut=Te<<29|Oe>>>3,lt=Oe<<29|Te>>>3,ht=Ne<<28|At>>>4,ft=At<<28|Ne>>>4,dt=Tt<<23|Ot>>>9,pt=Ot<<23|Tt>>>9,bt=Nt<<25|Ft>>>7,_t=Ft<<25|Nt>>>7,gt=Dt<<21|Lt>>>11,yt=Lt<<21|Dt>>>11,mt=jt<<24|Pt>>>8,vt=Pt<<24|jt>>>8,St=Bt<<27|Wt>>>5,wt=Wt<<27|Bt>>>5,Et=Ht<<20|Ut>>>12,xt=Ut<<20|Ht>>>12,Rt=Qt<<7|zt>>>25,$t=zt<<7|Qt>>>25,Ct=Vt<<8|qt>>>24,kt=qt<<8|Vt>>>24,Mt=Gt<<14|Kt>>>18,It=Kt<<14|Gt>>>18;D[0]=Fe^~qe&st,D[1]=De^~Ge&ot,D[10]=ht^~Et&je,D[11]=ft^~xt&Be,D[20]=Qe^~nt&bt,D[21]=Ve^~it&_t,D[30]=St^~Le&Ke,D[31]=wt^~Pe&Je,D[40]=tt^~dt&Rt,D[41]=rt^~pt&$t,D[2]=qe^~st>,D[3]=Ge^~ot&yt,D[12]=Et^~je&Ye,D[13]=xt^~Be&Xe,D[22]=nt^~bt&Ct,D[23]=it^~_t&kt,D[32]=Le^~Ke&at,D[33]=Pe^~Je&ct,D[42]=dt^~Rt&We,D[43]=pt^~$t&He,D[4]=st^~gt&Mt,D[5]=ot^~yt&It,D[14]=je^~Ye&ut,D[15]=Be^~Xe<,D[24]=bt^~Ct&Ue,D[25]=_t^~kt&ze,D[34]=Ke^~at&mt,D[35]=Je^~ct&vt,D[44]=Rt^~We&Ze,D[45]=$t^~He&et,D[6]=gt^~Mt&Fe,D[7]=yt^~It&De,D[16]=Ye^~ut&ht,D[17]=Xe^~lt&ft,D[26]=Ct^~Ue&Qe,D[27]=kt^~ze&Ve,D[36]=at^~mt&St,D[37]=ct^~vt&wt,D[46]=We^~Ze&tt,D[47]=He^~et&rt,D[8]=Mt^~Fe&qe,D[9]=It^~De&Ge,D[18]=ut^~ht&Et,D[19]=lt^~ft&xt,D[28]=Ue^~Qe&nt,D[29]=ze^~Ve&it,D[38]=mt^~St&Le,D[39]=vt^~wt&Pe,D[48]=Ze^~tt&dt,D[49]=et^~rt&pt,D[0]^=P1600_ROUND_CONSTANTS[E*2],D[1]^=P1600_ROUND_CONSTANTS[E*2+1]}};const keccakState=keccakStateUnroll;function Keccak(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Keccak.prototype.initialize=function(D,E){for(let W=0;W<50;++W)this.state[W]=0;this.blockSize=D/8,this.count=0,this.squeezing=!1};Keccak.prototype.absorb=function(D){for(let E=0;E>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(keccakState.p1600(this.state),this.count=0);return E};Keccak.prototype.copy=function(D){for(let E=0;E<50;++E)D.state[E]=this.state[E];D.blockSize=this.blockSize,D.count=this.count,D.squeezing=this.squeezing};var keccak$1=Keccak,js=api(keccak$1);const processFn$1=(D,E)=>function(){const W=E.promiseModule,U=new Array(arguments.length);for(let Q=0;Q{E.errorFirst?U.push(function(J,Y){if(E.multiArgs){const X=new Array(arguments.length-1);for(let ee=1;ee{E=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},E);const W=Q=>{const G=J=>typeof J=="string"?Q===J:J.test(Q);return E.include?E.include.some(G):!E.exclude.some(G)};let U;typeof D=="function"?U=function(){return E.excludeMain?D.apply(this,arguments):processFn$1(D,E).apply(this,arguments)}:U=Object.create(Object.getPrototypeOf(D));for(const Q in D){const G=D[Q];U[Q]=typeof G=="function"&&W(Q)?processFn$1(G,E):G}return U},immutable=extend$1,hasOwnProperty=Object.prototype.hasOwnProperty;function extend$1(){for(var D={},E=0;E0&&(G=E[0]),G instanceof Error)throw G;var J=new Error("Unhandled error."+(G?" ("+G.message+")":""));throw J.context=G,J}var Y=Q[D];if(Y===void 0)return!1;if(typeof Y=="function")safeApply$1(Y,this,E);else for(var X=Y.length,ee=arrayClone$1(Y,X),W=0;W{throw U})}}function arrayClone$1(D,E){for(var W=new Array(E),U=0;UD+E,blockTrackerEvents=["sync","latest"];class BaseBlockTracker$1 extends SafeEventEmitter$3{constructor(E={}){super(),this._blockResetDuration=E.blockResetDuration||20*sec$1,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(W=>this.once("latest",W))}removeAllListeners(E){E?super.removeAllListeners(E):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(E,W){!blockTrackerEvents.includes(E)||this._maybeStart()}_onRemoveListener(E,W){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){!this._isRunning||(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return blockTrackerEvents.map(E=>this.listenerCount(E)).reduce(calculateSum)}_newPotentialLatest(E){const W=this._currentBlock;W&&hexToInt$4(E)<=hexToInt$4(W)||this._setCurrentBlock(E)}_setCurrentBlock(E){const W=this._currentBlock;this._currentBlock=E,this.emit("latest",E),this.emit("sync",{oldBlock:W,newBlock:E})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}var base=BaseBlockTracker$1;function hexToInt$4(D){return Number.parseInt(D,16)}const pify$2=pify$3,BaseBlockTracker=base,sec=1e3;class PollingBlockTracker$1 extends BaseBlockTracker{constructor(E={}){if(!E.provider)throw new Error("PollingBlockTracker - no provider specified.");const W=E.pollingInterval||20*sec,U=E.retryTimeout||W/10,Q=E.keepEventLoopActive!==void 0?E.keepEventLoopActive:!0,G=E.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:W},E)),this._provider=E.provider,this._pollingInterval=W,this._retryTimeout=U,this._keepEventLoopActive=Q,this._setSkipCacheFlag=G}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch(E=>this.emit("error",E))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await timeout$1(this._pollingInterval,!this._keepEventLoopActive)}catch(E){const W=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: ${E.stack}`);try{this.emit("error",W)}catch{console.error(W)}await timeout$1(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const E=await this._fetchLatestBlock();this._newPotentialLatest(E)}async _fetchLatestBlock(){const E={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(E.skipCache=!0);const W=await pify$2(U=>this._provider.sendAsync(E,U))();if(W.error)throw new Error(`PollingBlockTracker - encountered error fetching block: ${W.error}`);return W.result}}var polling=PollingBlockTracker$1;function timeout$1(D,E){return new Promise(W=>{const U=setTimeout(W,D);U.unref&&E&&U.unref()})}var lib$1={},Mutex$2={},tslib={exports:{}};(function(D){var E,W,U,Q,G,J,Y,X,ee,Z,ne,te,re,oe,be,fe,ue,de,le,ye,Ee,ve,Se,Re,xe;(function(_e){var Ce=typeof commonjsGlobal=="object"?commonjsGlobal:typeof self=="object"?self:typeof this=="object"?this:{};_e(we(Ce,we(D.exports)));function we(ie,se){return ie!==Ce&&(typeof Object.create=="function"?Object.defineProperty(ie,"__esModule",{value:!0}):ie.__esModule=!0),function(ae,ce){return ie[ae]=se?se(ae,ce):ce}}})(function(_e){var Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,se){ie.__proto__=se}||function(ie,se){for(var ae in se)Object.prototype.hasOwnProperty.call(se,ae)&&(ie[ae]=se[ae])};E=function(ie,se){if(typeof se!="function"&&se!==null)throw new TypeError("Class extends value "+String(se)+" is not a constructor or null");Ce(ie,se);function ae(){this.constructor=ie}ie.prototype=se===null?Object.create(se):(ae.prototype=se.prototype,new ae)},W=Object.assign||function(ie){for(var se,ae=1,ce=arguments.length;ae=0;$e--)(ge=ie[$e])&&(he=(pe<3?ge(he):pe>3?ge(se,ae,he):ge(se,ae))||he);return pe>3&&he&&Object.defineProperty(se,ae,he),he},G=function(ie,se){return function(ae,ce){se(ae,ce,ie)}},J=function(ie,se){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(ie,se)},Y=function(ie,se,ae,ce){function pe(he){return he instanceof ae?he:new ae(function(ge){ge(he)})}return new(ae||(ae=Promise))(function(he,ge){function $e(Me){try{me(ce.next(Me))}catch(Ae){ge(Ae)}}function Ie(Me){try{me(ce.throw(Me))}catch(Ae){ge(Ae)}}function me(Me){Me.done?he(Me.value):pe(Me.value).then($e,Ie)}me((ce=ce.apply(ie,se||[])).next())})},X=function(ie,se){var ae={label:0,sent:function(){if(he[0]&1)throw he[1];return he[1]},trys:[],ops:[]},ce,pe,he,ge;return ge={next:$e(0),throw:$e(1),return:$e(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function $e(me){return function(Me){return Ie([me,Me])}}function Ie(me){if(ce)throw new TypeError("Generator is already executing.");for(;ge&&(ge=0,me[0]&&(ae=0)),ae;)try{if(ce=1,pe&&(he=me[0]&2?pe.return:me[0]?pe.throw||((he=pe.return)&&he.call(pe),0):pe.next)&&!(he=he.call(pe,me[1])).done)return he;switch(pe=0,he&&(me=[me[0]&2,he.value]),me[0]){case 0:case 1:he=me;break;case 4:return ae.label++,{value:me[1],done:!1};case 5:ae.label++,pe=me[1],me=[0];continue;case 7:me=ae.ops.pop(),ae.trys.pop();continue;default:if(he=ae.trys,!(he=he.length>0&&he[he.length-1])&&(me[0]===6||me[0]===2)){ae=0;continue}if(me[0]===3&&(!he||me[1]>he[0]&&me[1]=ie.length&&(ie=void 0),{value:ie&&ie[ce++],done:!ie}}};throw new TypeError(se?"Object is not iterable.":"Symbol.iterator is not defined.")},ne=function(ie,se){var ae=typeof Symbol=="function"&&ie[Symbol.iterator];if(!ae)return ie;var ce=ae.call(ie),pe,he=[],ge;try{for(;(se===void 0||se-- >0)&&!(pe=ce.next()).done;)he.push(pe.value)}catch($e){ge={error:$e}}finally{try{pe&&!pe.done&&(ae=ce.return)&&ae.call(ce)}finally{if(ge)throw ge.error}}return he},te=function(){for(var ie=[],se=0;se1||$e(ke,Oe)})})}function $e(ke,Oe){try{Ie(ce[ke](Oe))}catch(Te){Ae(he[0][3],Te)}}function Ie(ke){ke.value instanceof be?Promise.resolve(ke.value.v).then(me,Me):Ae(he[0][2],ke)}function me(ke){$e("next",ke)}function Me(ke){$e("throw",ke)}function Ae(ke,Oe){ke(Oe),he.shift(),he.length&&$e(he[0][0],he[0][1])}},ue=function(ie){var se,ae;return se={},ce("next"),ce("throw",function(pe){throw pe}),ce("return"),se[Symbol.iterator]=function(){return this},se;function ce(pe,he){se[pe]=ie[pe]?function(ge){return(ae=!ae)?{value:be(ie[pe](ge)),done:pe==="return"}:he?he(ge):ge}:he}},de=function(ie){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var se=ie[Symbol.asyncIterator],ae;return se?se.call(ie):(ie=typeof Z=="function"?Z(ie):ie[Symbol.iterator](),ae={},ce("next"),ce("throw"),ce("return"),ae[Symbol.asyncIterator]=function(){return this},ae);function ce(he){ae[he]=ie[he]&&function(ge){return new Promise(function($e,Ie){ge=ie[he](ge),pe($e,Ie,ge.done,ge.value)})}}function pe(he,ge,$e,Ie){Promise.resolve(Ie).then(function(me){he({value:me,done:$e})},ge)}},le=function(ie,se){return Object.defineProperty?Object.defineProperty(ie,"raw",{value:se}):ie.raw=se,ie};var we=Object.create?function(ie,se){Object.defineProperty(ie,"default",{enumerable:!0,value:se})}:function(ie,se){ie.default=se};ye=function(ie){if(ie&&ie.__esModule)return ie;var se={};if(ie!=null)for(var ae in ie)ae!=="default"&&Object.prototype.hasOwnProperty.call(ie,ae)&&xe(se,ie,ae);return we(se,ie),se},Ee=function(ie){return ie&&ie.__esModule?ie:{default:ie}},ve=function(ie,se,ae,ce){if(ae==="a"&&!ce)throw new TypeError("Private accessor was defined without a getter");if(typeof se=="function"?ie!==se||!ce:!se.has(ie))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ae==="m"?ce:ae==="a"?ce.call(ie):ce?ce.value:se.get(ie)},Se=function(ie,se,ae,ce,pe){if(ce==="m")throw new TypeError("Private method is not writable");if(ce==="a"&&!pe)throw new TypeError("Private accessor was defined without a setter");if(typeof se=="function"?ie!==se||!pe:!se.has(ie))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ce==="a"?pe.call(ie,ae):pe?pe.value=ae:se.set(ie,ae),ae},Re=function(ie,se){if(se===null||typeof se!="object"&&typeof se!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof ie=="function"?se===ie:ie.has(se)},_e("__extends",E),_e("__assign",W),_e("__rest",U),_e("__decorate",Q),_e("__param",G),_e("__metadata",J),_e("__awaiter",Y),_e("__generator",X),_e("__exportStar",ee),_e("__createBinding",xe),_e("__values",Z),_e("__read",ne),_e("__spread",te),_e("__spreadArrays",re),_e("__spreadArray",oe),_e("__await",be),_e("__asyncGenerator",fe),_e("__asyncDelegator",ue),_e("__asyncValues",de),_e("__makeTemplateObject",le),_e("__importStar",ye),_e("__importDefault",Ee),_e("__classPrivateFieldGet",ve),_e("__classPrivateFieldSet",Se),_e("__classPrivateFieldIn",Re)})})(tslib);var Semaphore$1={};Object.defineProperty(Semaphore$1,"__esModule",{value:!0});var tslib_1$2=tslib.exports,Semaphore=function(){function D(E){if(this._maxConcurrency=E,this._queue=[],E<=0)throw new Error("semaphore must be initialized to a positive value");this._value=E}return D.prototype.acquire=function(){var E=this,W=this.isLocked(),U=new Promise(function(Q){return E._queue.push(Q)});return W||this._dispatch(),U},D.prototype.runExclusive=function(E){return tslib_1$2.__awaiter(this,void 0,void 0,function(){var W,U,Q;return tslib_1$2.__generator(this,function(G){switch(G.label){case 0:return[4,this.acquire()];case 1:W=G.sent(),U=W[0],Q=W[1],G.label=2;case 2:return G.trys.push([2,,4,5]),[4,E(U)];case 3:return[2,G.sent()];case 4:return Q(),[7];case 5:return[2]}})})},D.prototype.isLocked=function(){return this._value<=0},D.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var E=this._currentReleaser;this._currentReleaser=void 0,E()}},D.prototype._dispatch=function(){var E=this,W=this._queue.shift();if(!!W){var U=!1;this._currentReleaser=function(){U||(U=!0,E._value++,E._dispatch())},W([this._value--,this._currentReleaser])}},D}();Semaphore$1.default=Semaphore;Object.defineProperty(Mutex$2,"__esModule",{value:!0});var tslib_1$1=tslib.exports,Semaphore_1=Semaphore$1,Mutex$1=function(){function D(){this._semaphore=new Semaphore_1.default(1)}return D.prototype.acquire=function(){return tslib_1$1.__awaiter(this,void 0,void 0,function(){var E,W;return tslib_1$1.__generator(this,function(U){switch(U.label){case 0:return[4,this._semaphore.acquire()];case 1:return E=U.sent(),W=E[1],[2,W]}})})},D.prototype.runExclusive=function(E){return this._semaphore.runExclusive(function(){return E()})},D.prototype.isLocked=function(){return this._semaphore.isLocked()},D.prototype.release=function(){this._semaphore.release()},D}();Mutex$2.default=Mutex$1;var withTimeout$1={};Object.defineProperty(withTimeout$1,"__esModule",{value:!0});withTimeout$1.withTimeout=void 0;var tslib_1=tslib.exports;function withTimeout(D,E,W){var U=this;return W===void 0&&(W=new Error("timeout")),{acquire:function(){return new Promise(function(Q,G){return tslib_1.__awaiter(U,void 0,void 0,function(){var J,Y,X;return tslib_1.__generator(this,function(ee){switch(ee.label){case 0:return J=!1,setTimeout(function(){J=!0,G(W)},E),[4,D.acquire()];case 1:return Y=ee.sent(),J?(X=Array.isArray(Y)?Y[1]:Y,X()):Q(Y),[2]}})})})},runExclusive:function(Q){return tslib_1.__awaiter(this,void 0,void 0,function(){var G,J;return tslib_1.__generator(this,function(Y){switch(Y.label){case 0:G=function(){},Y.label=1;case 1:return Y.trys.push([1,,7,8]),[4,this.acquire()];case 2:return J=Y.sent(),Array.isArray(J)?(G=J[1],[4,Q(J[0])]):[3,4];case 3:return[2,Y.sent()];case 4:return G=J,[4,Q()];case 5:return[2,Y.sent()];case 6:return[3,8];case 7:return G(),[7];case 8:return[2]}})})},release:function(){D.release()},isLocked:function(){return D.isLocked()}}}withTimeout$1.withTimeout=withTimeout;(function(D){Object.defineProperty(D,"__esModule",{value:!0}),D.withTimeout=D.Semaphore=D.Mutex=void 0;var E=Mutex$2;Object.defineProperty(D,"Mutex",{enumerable:!0,get:function(){return E.default}});var W=Semaphore$1;Object.defineProperty(D,"Semaphore",{enumerable:!0,get:function(){return W.default}});var U=withTimeout$1;Object.defineProperty(D,"withTimeout",{enumerable:!0,get:function(){return U.withTimeout}})})(lib$1);var dist$2={},idRemapMiddleware={},getUniqueId$1={};Object.defineProperty(getUniqueId$1,"__esModule",{value:!0});getUniqueId$1.getUniqueId=void 0;const MAX=4294967295;let idCounter=Math.floor(Math.random()*MAX);function getUniqueId(){return idCounter=(idCounter+1)%MAX,idCounter}getUniqueId$1.getUniqueId=getUniqueId;Object.defineProperty(idRemapMiddleware,"__esModule",{value:!0});idRemapMiddleware.createIdRemapMiddleware=void 0;const getUniqueId_1=getUniqueId$1;function createIdRemapMiddleware(){return(D,E,W,U)=>{const Q=D.id,G=getUniqueId_1.getUniqueId();D.id=G,E.id=G,W(J=>{D.id=Q,E.id=Q,J()})}}idRemapMiddleware.createIdRemapMiddleware=createIdRemapMiddleware;var createAsyncMiddleware$3={};Object.defineProperty(createAsyncMiddleware$3,"__esModule",{value:!0});createAsyncMiddleware$3.createAsyncMiddleware=void 0;function createAsyncMiddleware$2(D){return async(E,W,U,Q)=>{let G;const J=new Promise(Z=>{G=Z});let Y=null,X=!1;const ee=async()=>{X=!0,U(Z=>{Y=Z,G()}),await J};try{await D(E,W,ee),X?(await J,Y(null)):Q(null)}catch(Z){Y?Y(Z):Q(Z)}}}createAsyncMiddleware$3.createAsyncMiddleware=createAsyncMiddleware$2;var createScaffoldMiddleware$3={};Object.defineProperty(createScaffoldMiddleware$3,"__esModule",{value:!0});createScaffoldMiddleware$3.createScaffoldMiddleware=void 0;function createScaffoldMiddleware$2(D){return(E,W,U,Q)=>{const G=D[E.method];return G===void 0?U():typeof G=="function"?G(E,W,U,Q):(W.result=G,Q())}}createScaffoldMiddleware$3.createScaffoldMiddleware=createScaffoldMiddleware$2;var JsonRpcEngine$1={},safeEventEmitter={};Object.defineProperty(safeEventEmitter,"__esModule",{value:!0});const events_1=events.exports;function safeApply(D,E,W){try{Reflect.apply(D,E,W)}catch(U){setTimeout(()=>{throw U})}}function arrayClone(D){const E=D.length,W=new Array(E);for(let U=0;U0&&([J]=W),J instanceof Error)throw J;const Y=new Error(`Unhandled error.${J?` (${J.message})`:""}`);throw Y.context=J,Y}const G=Q[E];if(G===void 0)return!1;if(typeof G=="function")safeApply(G,this,W);else{const J=G.length,Y=arrayClone(G);for(let X=0;X"u"&&(U=defaultOptions()),decirc(D,"",0,[],void 0,0,U);var Q;try{replacerStack.length===0?Q=JSON.stringify(D,E,W):Q=JSON.stringify(D,replaceGetterValues(E),W)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;arr.length!==0;){var G=arr.pop();G.length===4?Object.defineProperty(G[0],G[1],G[3]):G[0][G[1]]=G[2]}}return Q}function setReplace(D,E,W,U){var Q=Object.getOwnPropertyDescriptor(U,W);Q.get!==void 0?Q.configurable?(Object.defineProperty(U,W,{value:D}),arr.push([U,W,E,Q])):replacerStack.push([E,W,D]):(U[W]=D,arr.push([U,W,E]))}function decirc(D,E,W,U,Q,G,J){G+=1;var Y;if(typeof D=="object"&&D!==null){for(Y=0;YJ.depthLimit){setReplace(LIMIT_REPLACE_NODE,D,E,Q);return}if(typeof J.edgesLimit<"u"&&W+1>J.edgesLimit){setReplace(LIMIT_REPLACE_NODE,D,E,Q);return}if(U.push(D),Array.isArray(D))for(Y=0;YE?1:0}function deterministicStringify(D,E,W,U){typeof U>"u"&&(U=defaultOptions());var Q=deterministicDecirc(D,"",0,[],void 0,0,U)||D,G;try{replacerStack.length===0?G=JSON.stringify(Q,E,W):G=JSON.stringify(Q,replaceGetterValues(E),W)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;arr.length!==0;){var J=arr.pop();J.length===4?Object.defineProperty(J[0],J[1],J[3]):J[0][J[1]]=J[2]}}return G}function deterministicDecirc(D,E,W,U,Q,G,J){G+=1;var Y;if(typeof D=="object"&&D!==null){for(Y=0;YJ.depthLimit){setReplace(LIMIT_REPLACE_NODE,D,E,Q);return}if(typeof J.edgesLimit<"u"&&W+1>J.edgesLimit){setReplace(LIMIT_REPLACE_NODE,D,E,Q);return}if(U.push(D),Array.isArray(D))for(Y=0;Y0)for(var U=0;U=1e3&&D<=4999}function stringifyReplacer(D,E){if(E!=="[Circular]")return E}var utils$3={},errorConstants={};Object.defineProperty(errorConstants,"__esModule",{value:!0});errorConstants.errorValues=errorConstants.errorCodes=void 0;errorConstants.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};errorConstants.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(D){Object.defineProperty(D,"__esModule",{value:!0}),D.serializeError=D.isValidCode=D.getMessageFromCode=D.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const E=errorConstants,W=classes,U=E.errorCodes.rpc.internal,Q="Unspecified error message. This is a bug, please report it.",G={code:U,message:J(U)};D.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function J(te,re=Q){if(Number.isInteger(te)){const oe=te.toString();if(ne(E.errorValues,oe))return E.errorValues[oe].message;if(ee(te))return D.JSON_RPC_SERVER_ERROR_MESSAGE}return re}D.getMessageFromCode=J;function Y(te){if(!Number.isInteger(te))return!1;const re=te.toString();return!!(E.errorValues[re]||ee(te))}D.isValidCode=Y;function X(te,{fallbackError:re=G,shouldIncludeStack:oe=!1}={}){var be,fe;if(!re||!Number.isInteger(re.code)||typeof re.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(te instanceof W.EthereumRpcError)return te.serialize();const ue={};if(te&&typeof te=="object"&&!Array.isArray(te)&&ne(te,"code")&&Y(te.code)){const le=te;ue.code=le.code,le.message&&typeof le.message=="string"?(ue.message=le.message,ne(le,"data")&&(ue.data=le.data)):(ue.message=J(ue.code),ue.data={originalError:Z(te)})}else{ue.code=re.code;const le=(be=te)===null||be===void 0?void 0:be.message;ue.message=le&&typeof le=="string"?le:re.message,ue.data={originalError:Z(te)}}const de=(fe=te)===null||fe===void 0?void 0:fe.stack;return oe&&te&&de&&typeof de=="string"&&(ue.stack=de),ue}D.serializeError=X;function ee(te){return te>=-32099&&te<=-32e3}function Z(te){return te&&typeof te=="object"&&!Array.isArray(te)?Object.assign({},te):te}function ne(te,re){return Object.prototype.hasOwnProperty.call(te,re)}})(utils$3);var errors={};Object.defineProperty(errors,"__esModule",{value:!0});errors.ethErrors=void 0;const classes_1=classes,utils_1=utils$3,error_constants_1=errorConstants;errors.ethErrors={rpc:{parse:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.parse,D),invalidRequest:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidRequest,D),invalidParams:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidParams,D),methodNotFound:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.methodNotFound,D),internal:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.internal,D),server:D=>{if(!D||typeof D!="object"||Array.isArray(D))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:E}=D;if(!Number.isInteger(E)||E>-32005||E<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return getEthJsonRpcError(E,D)},invalidInput:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidInput,D),resourceNotFound:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.resourceNotFound,D),resourceUnavailable:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.resourceUnavailable,D),transactionRejected:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.transactionRejected,D),methodNotSupported:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.methodNotSupported,D),limitExceeded:D=>getEthJsonRpcError(error_constants_1.errorCodes.rpc.limitExceeded,D)},provider:{userRejectedRequest:D=>getEthProviderError(error_constants_1.errorCodes.provider.userRejectedRequest,D),unauthorized:D=>getEthProviderError(error_constants_1.errorCodes.provider.unauthorized,D),unsupportedMethod:D=>getEthProviderError(error_constants_1.errorCodes.provider.unsupportedMethod,D),disconnected:D=>getEthProviderError(error_constants_1.errorCodes.provider.disconnected,D),chainDisconnected:D=>getEthProviderError(error_constants_1.errorCodes.provider.chainDisconnected,D),custom:D=>{if(!D||typeof D!="object"||Array.isArray(D))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:E,message:W,data:U}=D;if(!W||typeof W!="string")throw new Error('"message" must be a nonempty string');return new classes_1.EthereumProviderError(E,W,U)}}};function getEthJsonRpcError(D,E){const[W,U]=parseOpts(E);return new classes_1.EthereumRpcError(D,W||utils_1.getMessageFromCode(D),U)}function getEthProviderError(D,E){const[W,U]=parseOpts(E);return new classes_1.EthereumProviderError(D,W||utils_1.getMessageFromCode(D),U)}function parseOpts(D){if(D){if(typeof D=="string")return[D];if(typeof D=="object"&&!Array.isArray(D)){const{message:E,data:W}=D;if(E&&typeof E!="string")throw new Error("Must specify string message.");return[E||void 0,W]}}return[]}(function(D){Object.defineProperty(D,"__esModule",{value:!0}),D.getMessageFromCode=D.serializeError=D.EthereumProviderError=D.EthereumRpcError=D.ethErrors=D.errorCodes=void 0;const E=classes;Object.defineProperty(D,"EthereumRpcError",{enumerable:!0,get:function(){return E.EthereumRpcError}}),Object.defineProperty(D,"EthereumProviderError",{enumerable:!0,get:function(){return E.EthereumProviderError}});const W=utils$3;Object.defineProperty(D,"serializeError",{enumerable:!0,get:function(){return W.serializeError}}),Object.defineProperty(D,"getMessageFromCode",{enumerable:!0,get:function(){return W.getMessageFromCode}});const U=errors;Object.defineProperty(D,"ethErrors",{enumerable:!0,get:function(){return U.ethErrors}});const Q=errorConstants;Object.defineProperty(D,"errorCodes",{enumerable:!0,get:function(){return Q.errorCodes}})})(dist$1);var __importDefault$7=commonjsGlobal&&commonjsGlobal.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(JsonRpcEngine$1,"__esModule",{value:!0});JsonRpcEngine$1.JsonRpcEngine=void 0;const safe_event_emitter_1$1=__importDefault$7(safeEventEmitter),eth_rpc_errors_1$3=dist$1;class JsonRpcEngine extends safe_event_emitter_1$1.default{constructor(){super(),this._middleware=[]}push(E){this._middleware.push(E)}handle(E,W){if(W&&typeof W!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(E)?W?this._handleBatch(E,W):this._handleBatch(E):W?this._handle(E,W):this._promiseHandle(E)}asMiddleware(){return async(E,W,U,Q)=>{try{const[G,J,Y]=await JsonRpcEngine._runAllMiddleware(E,W,this._middleware);return J?(await JsonRpcEngine._runReturnHandlers(Y),Q(G)):U(async X=>{try{await JsonRpcEngine._runReturnHandlers(Y)}catch(ee){return X(ee)}return X()})}catch(G){return Q(G)}}}async _handleBatch(E,W){try{const U=await Promise.all(E.map(this._promiseHandle.bind(this)));return W?W(null,U):U}catch(U){if(W)return W(U);throw U}}_promiseHandle(E){return new Promise(W=>{this._handle(E,(U,Q)=>{W(Q)})})}async _handle(E,W){if(!E||Array.isArray(E)||typeof E!="object"){const J=new eth_rpc_errors_1$3.EthereumRpcError(eth_rpc_errors_1$3.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof E}`,{request:E});return W(J,{id:void 0,jsonrpc:"2.0",error:J})}if(typeof E.method!="string"){const J=new eth_rpc_errors_1$3.EthereumRpcError(eth_rpc_errors_1$3.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof E.method}`,{request:E});return W(J,{id:E.id,jsonrpc:"2.0",error:J})}const U=Object.assign({},E),Q={id:U.id,jsonrpc:U.jsonrpc};let G=null;try{await this._processRequest(U,Q)}catch(J){G=J}return G&&(delete Q.result,Q.error||(Q.error=eth_rpc_errors_1$3.serializeError(G))),W(G,Q)}async _processRequest(E,W){const[U,Q,G]=await JsonRpcEngine._runAllMiddleware(E,W,this._middleware);if(JsonRpcEngine._checkForCompletion(E,W,Q),await JsonRpcEngine._runReturnHandlers(G),U)throw U}static async _runAllMiddleware(E,W,U){const Q=[];let G=null,J=!1;for(const Y of U)if([G,J]=await JsonRpcEngine._runMiddleware(E,W,Y,Q),J)break;return[G,J,Q.reverse()]}static _runMiddleware(E,W,U,Q){return new Promise(G=>{const J=X=>{const ee=X||W.error;ee&&(W.error=eth_rpc_errors_1$3.serializeError(ee)),G([ee,!0])},Y=X=>{W.error?J(W.error):(X&&(typeof X!="function"&&J(new eth_rpc_errors_1$3.EthereumRpcError(eth_rpc_errors_1$3.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof X}" for request: ${jsonify(E)}`,{request:E})),Q.push(X)),G([null,!1]))};try{U(E,W,Y,J)}catch(X){J(X)}})}static async _runReturnHandlers(E){for(const W of E)await new Promise((U,Q)=>{W(G=>G?Q(G):U())})}static _checkForCompletion(E,W,U){if(!("result"in W)&&!("error"in W))throw new eth_rpc_errors_1$3.EthereumRpcError(eth_rpc_errors_1$3.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: diff --git a/index.html b/index.html index f879c89..3520317 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ - +